/* ============================================================================
   Hall Planner — shell design system
   Aesthetic: printed stationery. Warm paper, deep ink, brass accents, hairline
   rules and letterpressed small-caps. The product's output is a printed seating
   chart, so the account around it is dressed like fine event stationery.
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400..700;1,6..96,400..600&family=Karla:ital,wght@0,300..700;1,300..600&display=swap");

:root {
  --paper: #f4efe6;
  --paper-raised: #fffdf8;
  --paper-sunk: #ebe4d7;
  --ink: #1b2330;
  --ink-2: #2c3849;
  --ink-soft: #5c6878;
  --ink-faint: #8b93a0;
  --rule: #ddd3c1;
  --rule-strong: #c6b9a2;
  --brass: #9a6c26;
  --brass-bright: #c08b3c;
  --brass-wash: #f3e6cf;
  --sage: #46664f;
  --sage-wash: #e2ebe1;
  --clay: #a1442c;
  --clay-wash: #f6e3dc;
  --slate-wash: #e6e9ee;

  --radius: 4px;
  --radius-lg: 8px;
  --shadow-card: 0 1px 2px rgba(27, 35, 48, 0.05), 0 12px 28px -18px rgba(27, 35, 48, 0.4);
  --shadow-lift: 0 2px 6px rgba(27, 35, 48, 0.07), 0 26px 48px -26px rgba(27, 35, 48, 0.45);

  --font-display: "Bodoni Moda", "Times New Roman", serif;
  --font-ui: Karla, ui-sans-serif, system-ui, "Segoe UI", sans-serif;

  --measure: 1180px;
}

* { box-sizing: border-box; }

/* Author `display` rules outrank the browser's own [hidden] rule, so state the
   winner once rather than remembering it at every call site. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(120% 90% at 12% -10%, rgba(192, 139, 60, 0.13), transparent 58%),
    radial-gradient(90% 70% at 100% 0%, rgba(70, 102, 79, 0.09), transparent 52%);
  background-attachment: fixed;
  font-variant-numeric: tabular-nums;
}

/* Fine paper grain. Fixed and non-interactive so it never costs a repaint. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.28;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.12;
  margin: 0;
}

h1 { font-size: clamp(2.1rem, 4.4vw, 3.3rem); }
h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1rem; }
a { color: var(--brass); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }

.eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 0.6rem;
}

.lede { color: var(--ink-soft); font-size: 1.05rem; max-width: 56ch; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.85rem; }
.tiny { font-size: 0.76rem; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.stack > * + * { margin-top: var(--gap, 1rem); }

/* ---------------------------------------------------------------- masthead */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--ink);
  color: #ece5d8;
  border-bottom: 3px double rgba(236, 229, 216, 0.32);
}

.masthead-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
  margin-right: auto;
}

.wordmark-mark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--brass-bright);
  border: 1px solid rgba(192, 139, 60, 0.55);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  flex: none;
}

.wordmark-text {
  font-family: var(--font-display);
  font-size: 1.28rem;
  letter-spacing: 0.01em;
}

.wordmark-text em { font-style: italic; color: var(--brass-bright); }

.masthead nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

.masthead nav a {
  color: rgba(236, 229, 216, 0.78);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.masthead nav a:hover,
.masthead nav a[aria-current="page"] {
  color: #fffdf8;
  border-bottom-color: var(--brass-bright);
}

.masthead-account {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: rgba(236, 229, 216, 0.7);
}

/* ------------------------------------------------------------------ layout */

.shell {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.75rem 1.5rem 5rem;
}

.page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: end;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2rem;
}

@media (max-width: 720px) {
  .page-head { grid-template-columns: 1fr; align-items: start; }
}

/* ------------------------------------------------------------------ panels */

.panel {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1.6rem;
}

.panel-tight { padding: 1.15rem 1.25rem; }

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.rule-label {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 2.6rem 0 1.1rem;
}

.rule-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ----------------------------------------------------------------- buttons */

.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fffdf8;
  --btn-border: var(--ink);
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  padding: 0.62rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.14s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -8px rgba(27, 35, 48, 0.6); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

.btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-brass { --btn-bg: var(--brass); --btn-border: var(--brass); }
.btn-brass:hover { --btn-bg: var(--brass-bright); }

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-border: var(--rule-strong);
}
.btn-ghost:hover { --btn-bg: var(--paper-sunk); }

.btn-quiet {
  --btn-bg: transparent;
  --btn-fg: var(--ink-soft);
  --btn-border: transparent;
  padding: 0.4rem 0.5rem;
}
.btn-quiet:hover { --btn-fg: var(--ink); --btn-bg: var(--paper-sunk); box-shadow: none; }

.btn-danger { --btn-bg: transparent; --btn-fg: var(--clay); --btn-border: rgba(161, 68, 44, 0.4); }
.btn-danger:hover { --btn-bg: var(--clay-wash); }

/* Google's mark keeps its own colours; everything around it stays on the
   paper palette so the button still belongs to this page. */
.btn-google {
  --btn-bg: var(--paper-raised);
  --btn-fg: var(--ink);
  --btn-border: var(--rule-strong);
}
.btn-google:hover { --btn-bg: #fff; --btn-border: var(--ink-faint); }
.btn-google svg { width: 18px; height: 18px; flex: none; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.5rem 0;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.82rem; }
.btn-lg { padding: 0.8rem 1.5rem; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.55rem; }

/* ------------------------------------------------------------------- forms */

.field { display: block; margin-bottom: 1.05rem; }

.field > span {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(192, 139, 60, 0.18);
}

input::placeholder, textarea::placeholder { color: var(--ink-faint); }

.field-hint { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.3rem; }

.checkline {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.checkline input { width: auto; }

/* ------------------------------------------------------------------ notice */

.notice {
  border: 1px solid var(--rule-strong);
  border-left: 3px solid var(--brass);
  background: var(--brass-wash);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-size: 0.92rem;
  margin-bottom: 1.2rem;
}

.notice-error { border-left-color: var(--clay); background: var(--clay-wash); }
.notice-success { border-left-color: var(--sage); background: var(--sage-wash); }
.notice p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------- verification banner */

/* Sits directly under the masthead on every shell page until the address on
   the account has been confirmed. Brass wash, not an alarm colour: nothing is
   broken, there is simply one thing left to do. */
.verify-banner {
  background: var(--brass-wash);
  border-bottom: 1px solid var(--rule-strong);
}

.verify-banner-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.verify-banner p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-2);
  max-width: 68ch;
}

/* ------------------------------------------------------------------- pills */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.24rem 0.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.pill-live { color: var(--sage); background: var(--sage-wash); border-color: rgba(70, 102, 79, 0.25); }
.pill-locked { color: var(--clay); background: var(--clay-wash); border-color: rgba(161, 68, 44, 0.25); }
.pill-neutral { color: var(--ink-soft); background: var(--slate-wash); border-color: var(--rule); }
.pill-brass { color: var(--brass); background: var(--brass-wash); border-color: rgba(154, 108, 38, 0.28); }

/* ------------------------------------------------------------ project grid */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.1rem;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .project-card { animation: none; }
  .btn:hover, .project-card:hover { transform: none; }
}

.project-card-body { padding: 1.25rem 1.35rem 1rem; flex: 1; }

.project-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.15rem;
  overflow-wrap: anywhere;
}

.project-meta {
  font-size: 0.84rem;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  margin-bottom: 0.9rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 0.7rem 0;
  margin-bottom: 0.9rem;
}

.stat { text-align: center; }

.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1;
}

.stat span {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 0.28rem;
}

.project-card-foot {
  padding: 0.85rem 1.35rem 1.1rem;
  background: linear-gradient(var(--paper-sunk), var(--paper-sunk)) border-box;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.card-archived { opacity: 0.72; }

/* --------------------------------------------------------------- pricing */

.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
}

.price-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  background: var(--paper-raised);
  padding: 1.4rem;
}

.price-card .amount {
  font-family: var(--font-display);
  font-size: 2.6rem;
  line-height: 1;
  margin: 0.5rem 0 0.15rem;
}

.price-card .period { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 1rem; }
.price-card p { font-size: 0.9rem; color: var(--ink-soft); }
.price-card .btn { margin-top: auto; }

/* --------------------------------------------------------------- empty state */

.empty {
  text-align: center;
  padding: 3.5rem 1.5rem;
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.6);
}

.empty svg { color: var(--rule-strong); margin-bottom: 1rem; }
.empty h3 { font-size: 1.6rem; margin-bottom: 0.4rem; }
.empty p { color: var(--ink-soft); max-width: 44ch; margin: 0 auto 1.4rem; }

/* --------------------------------------------------------------- skeleton */

.skeleton {
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, var(--paper-sunk) 25%, #f2ece1 37%, var(--paper-sunk) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}

.skeleton-card { height: 232px; }

/* ----------------------------------------------------------------- tables */

.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }

.data-table th {
  text-align: left;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 700;
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--rule-strong);
}

.data-table td {
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.data-table tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; }

/* ----------------------------------------------------------------- dialog */

dialog {
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  background: var(--paper-raised);
  color: var(--ink);
  padding: 0;
  max-width: min(94vw, 460px);
  width: 100%;
  box-shadow: 0 40px 90px -30px rgba(27, 35, 48, 0.55);
}

dialog::backdrop { background: rgba(27, 35, 48, 0.42); backdrop-filter: blur(2px); }
.dialog-body { padding: 1.6rem; }
.dialog-body h2 { margin-bottom: 0.35rem; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1.3rem; }

/* -------------------------------------------------------------- auth page */

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
}

.auth-aside {
  position: relative;
  background: var(--ink);
  color: #ece5d8;
  padding: 3rem 3.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.auth-aside h1 { color: #fffdf8; font-size: clamp(2.4rem, 3.6vw, 3.5rem); }
.auth-aside h1 em { font-style: italic; color: var(--brass-bright); }
.auth-aside p { color: rgba(236, 229, 216, 0.72); max-width: 40ch; }

.auth-aside-plan {
  position: absolute;
  right: -6rem;
  bottom: -7rem;
  width: 34rem;
  opacity: 0.16;
  pointer-events: none;
}

.auth-points { list-style: none; margin: 0; padding: 0; font-size: 0.94rem; position: relative; }
.auth-points li { padding: 0.55rem 0 0.55rem 1.5rem; border-top: 1px solid rgba(236, 229, 216, 0.16); position: relative; }
.auth-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 0.5rem;
  height: 0.5rem;
  border: 1px solid var(--brass-bright);
  transform: rotate(45deg);
}

.auth-main { display: grid; place-items: center; padding: 3rem 1.5rem; }
.auth-card { width: min(100%, 25rem); }

.tabs { display: flex; gap: 0.4rem; border-bottom: 1px solid var(--rule); margin-bottom: 1.6rem; }

.tab {
  appearance: none;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 0.55rem 0.2rem;
  margin-right: 1.2rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brass); }

/* ------------------------------------------------------------ planner bar */

.planner-bar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.45rem 1rem;
  background: var(--ink);
  color: #ece5d8;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(236, 229, 216, 0.18);
}

.planner-bar .btn { padding: 0.35rem 0.7rem; font-size: 0.8rem; }
.planner-bar-title { font-family: var(--font-display); font-size: 1.05rem; margin-right: auto; }
.planner-bar-title small { font-family: var(--font-ui); font-size: 0.72rem; color: rgba(236, 229, 216, 0.6); display: block; letter-spacing: 0.08em; text-transform: uppercase; }

.save-state { font-size: 0.78rem; color: rgba(236, 229, 216, 0.7); min-width: 8ch; }
.save-state[data-state="saving"] { color: var(--brass-bright); }
.save-state[data-state="error"] { color: #e8a08d; }

/* ------------------------------------------------------------------ misc */

.inline-form { display: flex; gap: 0.5rem; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { margin-bottom: 0; flex: 1 1 12rem; }

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.1rem; }

.footer-note {
  margin-top: 4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  font-size: 0.82rem;
  color: var(--ink-faint);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
