/* ============================================================================
   THE WEDDING EDIT — DESIGN INTENSIVE BOOKING
   Component styles. Mobile-first: base rules describe the phone, and the
   `lg` breakpoint (1024px) introduces the two-panel desktop composition,
   exactly as the Wedding Edit OS prototype does.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--surface-canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-body-size);
  font-weight: 400;
  line-height: var(--t-body-leading);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

/* Never let a mobile tap zoom the viewport. iOS zooms below 16px inputs. */
input, select, textarea { font-family: var(--font-body); font-size: 16px; }

/* ---------------------------------------------------------------- TYPOGRAPHY */

.eyebrow {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--t-eyebrow-size);
  letter-spacing: var(--t-eyebrow-track);
  text-transform: uppercase;
  line-height: 1;
  color: var(--ink);
  margin: 0;
}
.eyebrow--soft { color: var(--ink-soft); }
.eyebrow--onDark { color: rgba(242, 237, 232, 0.72); }

.head {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--t-head-size);
  letter-spacing: var(--t-head-track);
  line-height: var(--t-head-leading);
  text-transform: uppercase;
  color: var(--ink);
  margin: 14px 0 0;
  text-wrap: balance;
}
.head--sm { font-size: 22px; letter-spacing: 0.06em; }
.head--lg { font-size: calc(var(--t-head-size) * 1.15); }

.tagline {
  font-family: var(--font-tagline);
  font-weight: 400;
  font-size: var(--t-tagline-size);
  line-height: 1.15;
  color: var(--ink-on-dark);
  margin: 0;
  max-width: 32rem;
}
.tagline em { font-style: italic; }

.body-copy { margin: 18px 0 0; color: var(--ink); max-width: 34rem; }
.body-copy--soft { color: var(--ink-soft); }
.body-copy--sm { font-size: 16px; }

.script { font-family: var(--font-script); font-size: 22px; line-height: 1.7; }

.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* ------------------------------------------------------------------- LAYOUT */

.shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

/* Mobile chrome bar — mirrors the prototype's sticky #565F68 h-14 header. */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--surface-chrome);
  border-bottom: 1px solid rgba(242, 237, 232, 0.1);
  height: var(--bar-h);
  display: flex; align-items: center; justify-content: center;
  padding: 0 16px;
}
.topbar img { height: 18px; width: auto; }
@media (min-width: 1024px) { .topbar { display: none; } }

.split { display: flex; flex: 1; min-height: 0; min-width: 0; }

/* Image panel: hidden on mobile entirely, per the prototype. */
.panel-image {
  display: none;
  position: relative;
  overflow: hidden;
  flex-direction: column;
  padding: var(--pad-panel);
  background: var(--twe-ganache);
}
@media (min-width: 1024px) {
  .panel-image {
    display: flex;
    width: var(--panel-image);
    height: 100vh;
    position: sticky; top: 0;
    flex-shrink: 0;
  }
}
.panel-image__media {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.panel-image__scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(46,23,28,0.34) 0%, rgba(46,23,28,0.12) 42%, rgba(46,23,28,0.72) 100%);
}
/* The panel is a column flex container, so a bare img would be stretched to
   the full panel width by the default `align-items: stretch`. `width: auto`
   does not prevent that — `align-self: flex-start` does. */
.panel-image__mark {
  position: relative; z-index: 2;
  align-self: flex-start;
  height: 44px; width: auto;
  flex: 0 0 auto;
  opacity: 0.95;
}
.panel-image__foot { position: relative; z-index: 2; flex: 1; display: flex; align-items: flex-end; }

.panel-form {
  flex: 1;
  background: var(--surface-canvas);
  display: flex; flex-direction: column;
  min-width: 0;
}
@media (min-width: 1024px) {
  .panel-form { width: var(--panel-form); flex-shrink: 0; min-height: 100vh; }
}

.panel-form__head {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 1024px) { .panel-form__head { padding: 30px var(--pad-panel) 22px; } }

.panel-form__body {
  flex: 1;
  padding: 34px 24px 40px;
  display: flex; flex-direction: column; justify-content: center;
}
@media (min-width: 1024px) { .panel-form__body { padding: 56px var(--pad-panel); } }

.panel-form__inner { width: 100%; max-width: 40rem; }

/* --------------------------------------------------------------- PROGRESS */

.progress { display: flex; gap: 6px; margin-top: 14px; }
.progress__seg {
  height: 2px; width: 32px;
  background: var(--progress-idle);
  transition: width var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.progress__seg--active { width: 48px; background: var(--ink); }
.progress__seg--done { background: rgba(46, 23, 28, 0.45); }

/* ---------------------------------------------------------------- ACTIONBAR */

.actionbar {
  position: sticky; bottom: 0; z-index: 30;
  background: var(--surface-canvas);
  border-top: 1px solid var(--rule);
  padding: 14px 24px calc(14px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px;
}
@media (min-width: 1024px) { .actionbar { padding: 18px var(--pad-panel); } }
.actionbar__spacer { flex: 1; }

/* ----------------------------------------------------------------- BUTTONS */

.btn {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--t-button-size);
  letter-spacing: var(--t-button-track);
  text-transform: uppercase;
  border: 0;
  border-radius: var(--r-button);
  padding: 12px 22px;
  min-height: 44px;                 /* comfortable one-handed tap target */
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
              opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--ink); color: var(--twe-linen); }
.btn--primary:hover { background: #401f26; }
.btn--primary[disabled] { background: var(--chip-idle); color: var(--ink-soft); cursor: not-allowed; transform: none; }

.btn--ghost { background: transparent; color: var(--ink-soft); padding-left: 4px; padding-right: 4px; }
.btn--ghost:hover { color: var(--ink); }

.btn--outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule-strong); }
.btn--outline:hover { background: rgba(46, 23, 28, 0.04); }

.btn--onDark { background: var(--twe-linen); color: var(--ink); }
.btn--onDark:hover { background: #fff; }

.btn--block { width: 100%; }
.btn--lg { min-height: 52px; font-size: 16px; padding: 16px 28px; }

/* Chips — the prototype's Bride/Groom/Partner selector, generalised. */
.chip {
  font-family: var(--font-body);
  font-weight: 500; font-size: var(--t-button-size);
  letter-spacing: var(--t-button-track); text-transform: uppercase;
  background: var(--chip-idle); color: #341e22;
  border: 0; border-radius: var(--r-button);
  padding: 11px 18px; min-height: 42px;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.chip:hover { background: rgba(133, 121, 112, 0.38); }
.chip[aria-pressed='true'] { background: var(--ink); color: var(--twe-linen); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* -------------------------------------------------------------------- FORM */

.field { margin-top: 26px; }
.field__label {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--t-label-size);
  letter-spacing: var(--t-label-track);
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 8px;
}
.field__help { font-size: 15px; color: var(--ink-soft); margin: 6px 0 0; line-height: 1.45; }
.field__error { font-size: 15px; color: var(--destructive); margin: 6px 0 0; }

/* Underline inputs — the prototype uses bottom-border only, no radius. */
.input {
  width: 100%;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--input);
  border-radius: 0;
  padding: 0 0 8px;
  transition: border-color var(--t-fast) var(--ease);
  appearance: none;
}
.input::placeholder { color: var(--ink-soft); opacity: 0.75; }
.input:focus { outline: none; border-bottom-color: var(--ink); }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; padding-top: 4px; }
select.input {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%),
                    linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: right 10px center, right 5px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 26px;
}

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 24px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* Checkbox — square, brand-ink, matching the prototype's checklist. */
.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; margin-top: 18px; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check__box {
  flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px;
  border: 1px solid var(--rule-strong); border-radius: 1px;
  background: transparent;
  display: grid; place-items: center;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.check input:checked + .check__box { background: var(--ink); border-color: var(--ink); }
.check__box::after {
  content: ''; width: 9px; height: 5px;
  border-left: 1.5px solid var(--twe-linen); border-bottom: 1.5px solid var(--twe-linen);
  transform: rotate(-45deg) scale(0); transform-origin: center;
  transition: transform var(--t-fast) var(--ease);
  margin-top: -2px;
}
.check input:checked + .check__box::after { transform: rotate(-45deg) scale(1); }
.check input:focus-visible + .check__box { outline: 2px solid var(--primary); outline-offset: 2px; }
.check__text { font-size: 17px; line-height: 1.45; }

/* Conditional reveal */
.reveal { overflow: hidden; animation: reveal var(--t-base) var(--ease); }
@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* -------------------------------------------------------------------- CARDS */

.card {
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  padding: 22px;
}
.card--flat { background: transparent; }
.card__title {
  font-family: var(--font-display); font-weight: 300;
  font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase;
  margin: 0 0 4px; color: var(--ink);
}

/* Included / value list on the intro screen */
.includes { list-style: none; margin: 0; padding: 0; }
.includes li {
  display: flex; gap: 14px; align-items: baseline;
  padding: 14px 0; border-bottom: 1px solid var(--rule-faint);
}
.includes li:last-child { border-bottom: 0; }
.includes__num {
  font-family: var(--font-display); font-weight: 300;
  font-size: 11px; letter-spacing: 0.14em; color: var(--ink-soft);
  flex-shrink: 0; min-width: 22px;
}
.includes__text { font-size: 17px; line-height: 1.45; }

/* Price display */
.price { display: flex; align-items: baseline; gap: 12px; margin-top: 8px; }
.price__figure {
  font-family: var(--font-body); font-weight: 500;
  font-size: var(--t-stat-size); letter-spacing: -0.01em; color: var(--ink);
  line-height: 1;
}
.price__note { font-size: 15px; color: var(--ink-soft); }

/* Order summary rows */
.summary { border-top: 1px solid var(--rule); margin-top: 24px; }
.summary__row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--rule-faint);
}
.summary__row--total { border-bottom: 0; border-top: 1px solid var(--rule); padding-top: 18px; }
.summary__key {
  font-family: var(--font-body); font-weight: 600; font-size: 13px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft);
}
.summary__val { font-size: 17px; text-align: right; }
.summary__val--big { font-family: var(--font-body); font-weight: 500; font-size: 26px; letter-spacing: -0.01em; }

/* ------------------------------------------------------------------ CALENDAR */

.cal { margin-top: 24px; }
.cal__nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cal__month {
  font-family: var(--font-display); font-weight: 300; font-size: 15px;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.cal__navbtn {
  background: transparent; border: 1px solid var(--rule); border-radius: 1px;
  width: 36px; height: 36px; color: var(--ink);
  display: grid; place-items: center;
  transition: background var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
.cal__navbtn:hover:not([disabled]) { background: rgba(46,23,28,0.05); }
.cal__navbtn[disabled] { opacity: 0.3; cursor: not-allowed; }

.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal__dow {
  font-family: var(--font-display); font-weight: 300;
  font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft); text-align: center; padding-bottom: 8px;
}
.cal__day {
  aspect-ratio: 1; min-height: 42px;
  background: transparent; border: 1px solid transparent; border-radius: 1px;
  font-family: var(--font-body); font-weight: 500; font-size: 16px;
  color: var(--ink);
  display: grid; place-items: center;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
}
.cal__day--available { background: var(--chip-idle); }
.cal__day--available:hover { background: rgba(133,121,112,0.45); }
.cal__day--selected { background: var(--ink); color: var(--twe-linen); }
.cal__day--muted { color: rgba(133,121,112,0.5); cursor: not-allowed; }
.cal__day--empty { visibility: hidden; }

.timelist { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.time {
  background: var(--chip-idle); border: 0; border-radius: var(--r-button);
  padding: 14px 12px; min-height: 48px;
  font-family: var(--font-body); font-weight: 500; font-size: 16px;
  letter-spacing: 0.06em; text-transform: uppercase; color: #341e22;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.time:hover { background: rgba(133,121,112,0.4); }
.time[aria-pressed='true'] { background: var(--ink); color: var(--twe-linen); }

/* --------------------------------------------------------------- SIGNATURE */

.sig {
  margin-top: 12px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-card);
  background: var(--surface-raised);
  position: relative;
  overflow: hidden;
}
.sig canvas { display: block; width: 100%; height: 170px; touch-action: none; cursor: crosshair; }
.sig__baseline {
  position: absolute; left: 24px; right: 24px; bottom: 44px;
  height: 1px; background: var(--rule); pointer-events: none;
}
.sig__hint {
  position: absolute; left: 24px; bottom: 20px;
  font-size: 14px; color: var(--ink-soft); pointer-events: none;
  transition: opacity var(--t-fast) var(--ease);
}
.sig__typed {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-script); font-size: 40px; color: var(--ink);
  pointer-events: none;
}
.sig__tools { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.sig__tab {
  background: transparent; border: 0; padding: 6px 2px; margin-right: 14px;
  font-family: var(--font-body); font-weight: 600; font-size: 13px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.sig__tab[aria-selected='true'] { color: var(--ink); border-bottom-color: var(--ink); }

/* Agreement scroll box */
.agreement {
  max-height: 300px; overflow-y: auto;
  border: 1px solid var(--rule); border-radius: var(--r-card);
  background: var(--surface-raised);
  padding: 22px; margin-top: 20px;
  font-size: 16px; line-height: 1.6; color: var(--ink);
}
.agreement h5 {
  font-family: var(--font-display); font-weight: 300; font-size: 13px;
  letter-spacing: 0.1em; text-transform: uppercase; margin: 22px 0 6px;
}
.agreement h5:first-child { margin-top: 0; }
.agreement p { margin: 0 0 10px; }
.placeholder-tag {
  display: inline-block; margin-bottom: 14px;
  font-family: var(--font-body); font-weight: 600; font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--destructive);
  border: 1px dashed rgba(94, 59, 61, 0.4);
  border-radius: 1px; padding: 6px 10px;
}

/* ------------------------------------------------------------ UPLOAD ZONE */

/* A compact row, not a hero panel. The old version used 22–26px of padding
   and centred text, which made it the loudest thing on the floor-plan screen
   — an upload field shouldn't outweigh the question above it. */
.upload {
  margin-top: 10px;
  border: 1px dashed var(--rule-strong); border-radius: var(--r-card);
  padding: 12px 14px;
  min-height: 48px;
  display: flex; align-items: center;
  background: rgba(253, 252, 251, 0.5);
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  cursor: pointer;
}
.upload:hover, .upload--drag { background: var(--surface-raised); border-color: var(--ink-soft); }
.upload__label {
  font-size: 15px; color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 8px;
}
.upload__label svg { flex-shrink: 0; width: 15px; height: 15px; }
.upload__file {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 10px; padding: 12px 14px;
  background: var(--surface-raised); border: 1px solid var(--rule); border-radius: var(--r-card);
  font-size: 16px;
}
.upload__remove { background: none; border: 0; color: var(--ink-soft); font-size: 20px; line-height: 1; padding: 4px; }

/* ------------------------------------------------------- INTEGRATION STUBS */

.integration-stub {
  border: 1px dashed rgba(105, 92, 57, 0.45);
  border-radius: var(--r-card);
  background: rgba(105, 92, 57, 0.05);
  padding: 20px; margin-top: 16px;
}
.integration-stub__tag {
  font-family: var(--font-body); font-weight: 600; font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary);
  margin: 0 0 8px;
}
.integration-stub__title {
  font-family: var(--font-display); font-weight: 300; font-size: 15px;
  letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 8px; color: var(--ink);
}
.integration-stub__note { font-size: 16px; color: var(--ink-soft); margin: 0 0 12px; line-height: 1.5; }
.integration-stub__label {
  font-family: var(--font-body); font-weight: 600; font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 6px;
}
.integration-stub__list { margin: 0; padding-left: 18px; font-size: 16px; color: var(--ink-soft); line-height: 1.55; }
.integration-stub__list li { margin-bottom: 4px; }

.embed-frame { width: 100%; min-height: 520px; border: 1px solid var(--rule); border-radius: var(--r-card); }

/* ------------------------------------------------------------ CONFIRMATION */

.confirm-mark { display: grid; place-items: center; margin-bottom: 26px; }
.confirm-mark svg { width: 52px; height: 52px; }
.confirm-mark circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw 0.7s var(--ease) forwards; }
.confirm-mark path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw 0.4s var(--ease) 0.5s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.fade-up { animation: fadeUp var(--t-slow) var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.d1 { animation-delay: 0.08s; } .d2 { animation-delay: 0.16s; }
.d3 { animation-delay: 0.24s; } .d4 { animation-delay: 0.32s; }

/* ---------------------------------------------------------------- DASHBOARD */

.dash { display: flex; min-height: 100vh; background: var(--surface-shell); }

.dash__side {
  display: none;
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--surface-chrome);
  border-right: 1px solid rgba(242, 237, 232, 0.04);
  height: 100vh; position: sticky; top: 0;
  flex-direction: column;
}
@media (min-width: 1024px) { .dash__side { display: flex; } }
.dash__brand { padding: 24px 20px; border-bottom: 1px solid rgba(242,237,232,0.07); }
.dash__brand img { height: 20px; width: auto; }
.dash__navgroup { padding: 18px 0 0; }
.dash__navlabel {
  font-family: var(--font-display); font-weight: 300; font-size: 9px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(242, 237, 232, 0.5); padding: 0 20px; margin: 0 0 8px;
}
.dash__navitem {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: transparent; border: 0;
  padding: 10px 20px; text-align: left;
  font-family: var(--font-body); font-weight: 400; font-size: 15px;
  letter-spacing: 0.08em; color: rgba(242, 237, 232, 0.82);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.dash__navitem:hover { background: rgba(242, 237, 232, 0.07); color: #fff; }
.dash__navitem--active { background: rgba(234, 227, 219, 0.16); color: #fff; }
.dash__navitem svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.8; }
.dash__user {
  margin-top: auto; padding: 18px 20px;
  display: flex; align-items: center; gap: 12px;
  border-top: 1px solid rgba(242,237,232,0.07);
}
.dash__avatar {
  width: 32px; height: 32px; border-radius: 999px;
  background: rgba(242,237,232,0.16); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-body); font-weight: 600; font-size: 13px; letter-spacing: 0.06em;
}
.dash__username {
  font-family: var(--font-display); font-weight: 300; font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase; color: rgba(242,237,232,0.9);
}

.dash__main { flex: 1; min-width: 0; padding: 24px 20px 60px; }
@media (min-width: 1024px) { .dash__main { padding: 32px 40px 80px; } }
.dash__inner { max-width: var(--content-max); margin: 0 auto; }

.dash__greeting {
  font-family: var(--font-display); font-weight: 300;
  font-size: 22px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--foreground); margin: 0 0 20px;
}

/* Watercolor banner */
/* Brand-colored fallback sits behind the image, so a failed photo load
   degrades to a considered field rather than a white gap. */
.banner {
  position: relative; overflow: hidden; border-radius: var(--r-card);
  min-height: 230px; display: flex;
  background: linear-gradient(120deg, var(--twe-ganache) 0%, var(--twe-dusty-rose) 55%, var(--twe-ash) 100%);
}
@media (min-width: 1024px) { .banner { min-height: 300px; } }
.banner__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner__scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(46,23,28,0.5) 0%, rgba(46,23,28,0.18) 60%, rgba(46,23,28,0.05) 100%); }
.banner__body { position: relative; z-index: 2; padding: 28px 24px; display: flex; flex-direction: column; justify-content: center; flex: 1; }
@media (min-width: 1024px) { .banner__body { padding: 40px; } }
.banner__names {
  font-family: var(--font-display); font-weight: 300;
  font-size: 30px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-on-dark); margin: 10px 0 0;
}
@media (min-width: 1024px) { .banner__names { font-size: 46px; } }
.banner__meta { color: rgba(242,237,232,0.86); font-size: 16px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid rgba(242,237,232,0.3); max-width: 24rem; }
.banner__count { position: absolute; right: 40px; bottom: 34px; z-index: 2; text-align: right; display: none; }
@media (min-width: 1024px) { .banner__count { display: block; } }
.banner__countnum { font-family: var(--font-body); font-weight: 300; font-size: 64px; line-height: 1; color: rgba(242,237,232,0.92); }
.banner__countlabel { font-family: var(--font-display); font-weight: 300; font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(242,237,232,0.75); margin-top: 6px; }

/* Stat strip */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 28px; border-bottom: 1px solid var(--rule); }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 16px 20px 22px; border-right: 1px solid var(--rule); }
.stat:last-child { border-right: 0; }
@media (max-width: 899px) { .stat:nth-child(2n) { border-right: 0; } .stat:nth-child(-n+2) { border-bottom: 1px solid var(--rule); } }
.stat__label { font-family: var(--font-body); font-weight: 600; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.stat__value { font-family: var(--font-body); font-weight: 500; font-size: var(--t-stat-size); letter-spacing: -0.01em; color: var(--surface-chrome); margin: 8px 0 6px; line-height: 1; }
.stat__sub { font-family: var(--font-body); font-weight: 400; font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }

/* Section heads inside the dashboard */
.dash__section { margin-top: 44px; }
.dash__sectionhead {
  font-family: var(--font-display); font-weight: 300;
  font-size: 22px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink); margin: 0 0 4px;
  display: inline-block; padding-bottom: 8px; border-bottom: 2px solid var(--ink);
}

/* Milestone tracker */
.track { margin-top: 22px; }
.track__item { display: flex; gap: 16px; padding-bottom: 4px; }
.track__rail { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.track__dot {
  width: 22px; height: 22px; border-radius: 999px; flex-shrink: 0;
  border: 1px solid var(--rule-strong); background: var(--surface-raised);
  display: grid; place-items: center; margin-top: 2px;
}
.track__dot--done { background: var(--ink); border-color: var(--ink); }
.track__dot--active { border-color: var(--ink); border-width: 2px; background: var(--surface-raised); }
.track__dot--done svg { width: 11px; height: 11px; }
.track__dot--active::after { content: ''; width: 8px; height: 8px; border-radius: 999px; background: var(--ink); }
.track__line { width: 1px; flex: 1; background: var(--rule-strong); min-height: 34px; margin: 4px 0; }
.track__item:last-child .track__line { display: none; }
.track__body { padding-bottom: 26px; flex: 1; min-width: 0; }
.track__title { font-family: var(--font-display); font-weight: 300; font-size: 14px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink); margin: 2px 0 0; }

/* Stage number — same Storica treatment as the eyebrow, just inline. */
.track__num { color: var(--ink-soft); margin-right: 8px; }

/* "You are here" marker. Appears exactly once. */
.track__here {
  font-family: var(--font-body); font-weight: 600; font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--primary); margin: 0 0 4px;
}

/* Date or deadline for a journey stage. Sits directly under the title so the
   "when" is answered before the "what". */
.track__when {
  font-family: var(--font-body); font-weight: 600; font-size: 13px;
  letter-spacing: 0.06em; color: var(--ink); margin: 6px 0 0;
}

/* Payment area before Stripe is connected. Deliberately neutral — no
   developer language ever reaches a customer. */
.pay-pending {
  margin-top: 18px;
  border: 1px dashed var(--rule-strong);
  border-radius: var(--r-card);
  background: rgba(242, 237, 232, 0.6);
  padding: 34px 22px;
  display: grid; place-items: center;
}
.pay-pending__text {
  margin: 0; font-size: 16px; color: var(--ink-soft); text-align: center;
}
.track__meta { font-size: 16px; color: var(--ink-soft); margin: 4px 0 0; }
.track__item--pending .track__title, .track__item--pending .track__meta { opacity: 0.55; }

.status-tag {
  display: inline-block; margin-top: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 1px;
}
.status-tag--done { background: rgba(74, 72, 52, 0.14); color: var(--twe-greenery); }
.status-tag--active { background: var(--ink); color: var(--twe-linen); }
.status-tag--todo { background: var(--chip-idle); color: #341e22; }
.status-tag--urgent { background: var(--destructive); color: var(--twe-linen); }

/* Dashboard card grid */
.cardgrid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 22px; }
@media (min-width: 700px) { .cardgrid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1200px) { .cardgrid--3 { grid-template-columns: repeat(3, 1fr); } }

.tile {
  background: var(--surface-raised); border: 1px solid var(--rule); border-radius: var(--r-card);
  padding: 22px; text-align: left; width: 100%;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.tile:hover { border-color: var(--ink-soft); transform: translateY(-1px); }
.tile__title { font-family: var(--font-display); font-weight: 300; font-size: 14px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink); margin: 0; }
.tile__desc { font-size: 16px; color: var(--ink-soft); margin: 2px 0 0; line-height: 1.45; flex: 1; }
.tile__foot { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* Mobile dashboard nav */
.dash__mobilenav {
  display: flex; gap: 4px; overflow-x: auto; padding: 10px 16px;
  background: var(--surface-chrome); position: sticky; top: var(--bar-h); z-index: 35;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.dash__mobilenav::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) { .dash__mobilenav { display: none; } }
.dash__mobilenav button {
  flex-shrink: 0; background: transparent; border: 0; border-radius: 1px;
  padding: 8px 12px; font-family: var(--font-body); font-weight: 500; font-size: 14px;
  letter-spacing: 0.08em; text-transform: uppercase; color: rgba(242,237,232,0.75);
}
.dash__mobilenav button[aria-current='true'] { background: rgba(234,227,219,0.18); color: #fff; }

/* -------------------------------------------------------------- UTILITIES */

.stack > * + * { margin-top: 16px; }
.muted { color: var(--ink-soft); }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-sm { margin-top: 10px; }
.mt-md { margin-top: 24px; }
.mt-lg { margin-top: 40px; }
.hide-mobile { display: none; }
@media (min-width: 1024px) { .hide-mobile { display: initial; } }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================================================
   MOBILE QA PASS
   ----------------------------------------------------------------------------
   Most paid-social traffic arrives on a phone, one-handed. These rules raise
   touch targets to Apple's 44px minimum and fix spacing at iPhone widths.
   Desktop rendering is deliberately untouched — every rule is inside a
   max-width query. No colours, type, or layout structure changed.
   ========================================================================== */

@media (max-width: 1023px) {

  /* Chips were 42px. Below the 44px threshold, mis-taps rise sharply. */
  .chip { min-height: 44px; padding: 12px 18px; }

  /* Calendar days are the single most-tapped element in the flow. */
  .cal__day { min-height: 46px; font-size: 17px; }
  .cal__grid { gap: 5px; }

  /* Month arrows were 36px — too small to hit reliably with a thumb. */
  .cal__navbtn { width: 44px; height: 44px; }

  /* The action bar holds Back + Continue. At 390px the labels can collide,
     so let the primary button take the room it needs and stop the ghost
     button from shrinking into an unreadable sliver. */
  .actionbar { gap: 8px; padding-left: 20px; padding-right: 20px; }
  .actionbar .btn--ghost { flex-shrink: 0; padding-left: 8px; padding-right: 8px; }
  .actionbar .btn--primary { flex-shrink: 1; min-width: 0; }
  .actionbar .btn--primary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* A full-width primary CTA is easier to hit than a right-aligned one. */
  .actionbar .btn--lg { flex: 1; }

  /* Form rhythm: slightly tighter so more of the form is visible above the
     keyboard, without crowding. */
  .field { margin-top: 22px; }

  /* Stop the sticky action bar from covering the last field when the
     keyboard is open. */
  .panel-form__body { padding-bottom: 28px; }

  /* Signature pad needs room for a finger, not a trackpad. */
  .sig canvas { height: 190px; }

  /* Draw / Type tabs measured 33px — too small to switch reliably. */
  .sig__tab { min-height: 44px; padding: 12px 4px; }

  /* Portal section nav measured 37px. It scrolls horizontally, so an
     undersized target here is especially easy to miss. */
  .dash__mobilenav { padding: 8px 16px; }
  .dash__mobilenav button { min-height: 44px; padding: 10px 14px; }

  /* Portal tiles: full-width targets read better than a cramped grid. */
  .cardgrid { gap: 12px; }

  /* Journey rail stays legible when the text wraps to several lines. */
  .track__body { padding-bottom: 22px; }

  /* Still a comfortable 48px tap target on a phone, without dominating. */
  .upload { padding: 13px 14px; }

  /* Intake carries three actions (Back · Save + exit · Continue). At 390px
     they cannot sit on one line without truncating, so let them wrap and
     give Continue the full width — it is the action people actually want. */
  .intake-actions { flex-wrap: wrap; }
  .intake-actions .actionbar__spacer { display: none; }
  .intake-actions .btn--ghost { flex: 0 0 auto; }
  .intake-actions .btn--primary { flex: 1 0 100%; order: -1; margin-bottom: 6px; }

  /* Ranked chips wrap to two lines on narrow screens; keep the number
     aligned with the first line of the label. */
  .chip--rank { align-items: center; }
}

/* Very narrow devices — iPhone SE and similar at 375px and below. */
@media (max-width: 380px) {
  .timelist { grid-template-columns: 1fr; }   /* stacked times, full width */
  .cal__day { min-height: 42px; font-size: 16px; }
  .actionbar .btn { padding-left: 14px; padding-right: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------- INTAKE */

/* Ranked priority chips. The number sits inside the chip so the order is
   readable at a glance without a separate legend. */
.chip__rank {
  display: inline-grid; place-items: center;
  width: 18px; height: 18px; margin-right: 8px;
  border-radius: 999px;
  background: var(--twe-linen); color: var(--ink);
  font-family: var(--font-body); font-weight: 600; font-size: 11px;
  letter-spacing: 0;
}
.chip[aria-pressed='true'] .chip__rank { background: var(--twe-linen); color: var(--ink); }

.rank-list {
  margin: 8px 0 0; padding-left: 20px;
  font-size: 17px; line-height: 1.6; color: var(--ink);
}
.rank-list li { margin-bottom: 2px; }
