/* giftex design tokens — source of truth: docs/design/README.md */
:root {
  --ink: #1E1B3A;
  --ground: #F5F4F8;
  --surface: #FFFFFF;
  --accent: #C2410C;
  --accent-hover: #9A3412;
  --accent-light: #F59E6B;
  --secondary: #3B3470;
  --muted: #57536E;
  --border: #DCDAE6;
  --border-input: #C9C6D6;
  --success-bg: #DDEBE2;
  --success-fg: #1E5B3A;
  --waiting-bg: #F6E7C8;
  --waiting-fg: #6B4A00;
  --error-bg: #F6DCDA;
  --error-fg: #8E1C16;
  /* Ink-surface shades used on dark backgrounds (header, landing hero) */
  --ink-soft: #CFCBE3;
  --ink-line: #4A4385;
  --ink-raised: #2E2A52;
  --tab-track: #ECEBF2;

  --font-heading: 'Bricolage Grotesque', 'Trebuchet MS', sans-serif;
  --font-body: 'Figtree', 'Segoe UI', system-ui, sans-serif;

  --radius-control: 12px;
  --radius-input: 10px;
  --radius-card: 16px;
  --radius-pill: 999px;
  --control-height: 44px;
  --max-width: 1120px;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1, h2, h3 { font-family: var(--font-heading); margin: 0; }
h1 { font-weight: 800; font-size: 48px; line-height: 1.05; letter-spacing: -0.02em; }

/* ---- Header ---- */
.site-header { background: var(--ink); color: var(--ground); }
.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}
.brand:hover { color: inherit; }
.brand__mark { height: 36px; width: auto; }
.brand__wordmark {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.04em;
}
.brand__wordmark span { color: var(--accent-light); }

/* ---- Page ---- */
.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 32px 64px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.lead { margin: 0; color: var(--muted); font-size: 18px; }

/* ---- Controls ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--control-height);
  padding: 0 24px;
  border: 0;
  border-radius: var(--radius-control);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn--primary { background: var(--accent); color: var(--surface); }
.btn--primary:hover { background: var(--accent-hover); color: var(--surface); }
.btn--secondary { background: var(--surface); color: var(--secondary); border: 1.5px solid var(--border-input); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
}
.pill--success { background: var(--success-bg); color: var(--success-fg); }
.pill--waiting { background: var(--waiting-bg); color: var(--waiting-fg); }
.pill--error { background: var(--error-bg); color: var(--error-fg); }

/* ---- Header: account ---- */
.site-header__link {
  display: flex;
  align-items: center;
  min-height: var(--control-height);
  color: var(--ink-soft);
  font-weight: 600;
  text-decoration: none;
}
.site-header__link:hover { color: var(--ground); }
.account { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-soft); }
.account__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink-line);
  color: var(--surface);
  font-weight: 700;
}
.account form { margin: 0; }
.account__signout {
  min-height: var(--control-height);
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.account__signout:hover { color: var(--ground); }

.page__heading { display: flex; flex-direction: column; gap: 8px; }

/* ---- Forms ---- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 14px; }
.field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-input);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.field .field__input--invalid { border-color: var(--error-fg); }
.field__error { font-size: 13px; font-weight: 600; color: var(--error-fg); }
.field__hint { font-size: 13px; color: var(--muted); }

.password { position: relative; }
.password input { padding-right: 56px; }
.password__toggle {
  position: absolute;
  right: 2px;
  top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--control-height);
  height: var(--control-height);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.notice { margin: 0; padding: 10px 14px; border-radius: var(--radius-input); background: var(--success-bg); color: var(--success-fg); font-size: 14px; font-weight: 600; }
.notice--error { background: var(--error-bg); color: var(--error-fg); }

/* ---- Landing ---- */
.landing { display: flex; flex-direction: column; }
.hero { background: var(--ink); color: var(--ground); overflow: hidden; }
.hero__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 32px 80px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
}
.hero__copy { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero__tag {
  margin: 0;
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--ink-line);
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
}
.hero__title { font-size: 72px; line-height: 0.98; letter-spacing: -0.035em; text-wrap: balance; }
.hero__title span { color: var(--accent-light); }
.hero__lead { margin: 0; max-width: 540px; color: var(--ink-soft); font-size: 20px; text-wrap: pretty; }
.hero__cards { position: relative; height: 150px; max-width: 460px; }
.hero__card { position: absolute; padding: 18px 20px; border-radius: var(--radius-card); display: flex; flex-direction: column; }
.hero__card--link { left: 0; top: 18px; width: 250px; gap: 6px; background: var(--ink-raised); transform: rotate(-4deg); }
.hero__card--match {
  left: 190px;
  top: 0;
  width: 240px;
  gap: 4px;
  background: var(--ground);
  color: var(--ink);
  transform: rotate(3deg);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.hero__card-label { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.hero__card--match .hero__card-label { color: var(--accent-hover); }
.hero__card-button {
  height: 36px;
  border-radius: var(--radius-input);
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--surface);
  font-weight: 700;
  font-size: 14px;
}
.hero__card-name { font-family: var(--font-heading); font-weight: 800; font-size: 30px; line-height: 1.05; }

.auth {
  flex: 1 1 380px;
  min-width: 0;
  max-width: 440px;
  background: var(--surface);
  color: var(--ink);
  border-radius: 20px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}
.auth__tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-control);
  background: var(--tab-track);
}
.auth__tab {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--control-height);
  border-radius: 9px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.auth__tab:hover { color: var(--ink); }
.auth__tab[aria-selected="true"] { background: var(--surface); box-shadow: 0 1px 3px rgba(30, 27, 58, 0.18); }
.auth__heading { font-size: 28px; font-weight: 800; line-height: 1.1; }
.auth__form { display: flex; flex-direction: column; gap: 16px; }
.auth__submit { height: 52px; margin-top: 4px; }
.auth__note { margin: 0; font-size: 14px; color: var(--muted); text-align: center; }

.how { width: 100%; max-width: 1180px; margin: 0 auto; padding: 72px 32px 80px; display: flex; flex-direction: column; gap: 36px; }
.how__title { font-weight: 800; font-size: 40px; line-height: 1.05; letter-spacing: -0.02em; }
.how__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 20px;
}
.how__step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}
.how__step h3 { font-family: var(--font-body); font-size: 20px; font-weight: 700; }
.how__step p { margin: 0; color: var(--muted); }
.how__number { font-family: var(--font-heading); font-weight: 800; font-size: 40px; line-height: 1; color: var(--accent); }

.site-footer { border-top: 1px solid var(--border); }
.site-footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 32px;
  font-size: 14px;
  color: var(--muted);
}

/* ---- Home ---- */
.page__heading--split { flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.page__heading--split form { margin: 0; }
.btn--large { height: 52px; }
.btn--compact { height: var(--control-height); padding: 0 16px; gap: 8px; border-radius: var(--radius-input); }
.btn--dark { background: var(--ink); color: var(--surface); }
.btn--dark:hover { background: var(--secondary); color: var(--surface); }

.exchange-list { display: flex; flex-direction: column; gap: 32px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--control-height);
  padding: 0 16px;
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.filter__count { font-size: 13px; font-weight: 700; opacity: 0.8; }

.exchange-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 20px;
}
.exchange { display: flex; flex-direction: column; gap: 16px; }
.exchange__top, .exchange__actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.exchange__actions { margin-top: auto; padding-top: 4px; }
.exchange__when, .exchange__meta { font-size: 13px; color: var(--muted); }
.exchange__title { display: flex; flex-direction: column; gap: 4px; }
.exchange__title h2 { font-size: 24px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.exchange__meta { margin: 0; font-size: 15px; }
.exchange__progress { display: flex; flex-direction: column; gap: 8px; }
.exchange__seen { font-size: 14px; font-weight: 600; }
.exchange__failed { font-size: 14px; font-weight: 600; color: var(--error-fg); }
.pill--draft { background: var(--tab-track); color: var(--secondary); }
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.meter { height: 8px; border-radius: var(--radius-pill); background: #E6E4EE; overflow: hidden; }
.meter__fill { height: 8px; border-radius: var(--radius-pill); background: var(--success-fg); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.steps__step { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.steps__bar { height: 6px; border-radius: var(--radius-pill); background: #E6E4EE; }
.steps__step--done, .steps__step--current { color: var(--ink); }
.steps__step--done .steps__bar { background: var(--secondary); }
.steps__step--current .steps__bar { background: var(--accent); }

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--control-height);
  height: var(--control-height);
  border: 0;
  border-radius: var(--radius-input);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.icon-btn:hover { background: var(--tab-track); color: var(--error-fg); }

.empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 32px;
  border: 1.5px dashed var(--border-input);
  border-radius: var(--radius-card);
}
.empty form { margin: 0; }
.empty__title { margin: 0; font-weight: 600; font-size: 18px; }
.link-btn { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--accent-hover); }

/* ---- Setup flow ---- */
.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; }
.setup-nav ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; font-weight: 600; }
.setup-nav__step {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--control-height);
  padding: 8px 14px 8px 8px;
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  text-decoration: none;
}
.setup-nav__step:hover { color: var(--ground); }
.setup-nav__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid #8B87A6;
}
.setup-nav__step--current { background: var(--ground); color: var(--ink); }
.setup-nav__step--current:hover { color: var(--ink); }
.setup-nav__step--current .setup-nav__number { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.setup-nav__step--locked { opacity: 0.6; }

.eyebrow { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.lead--narrow { max-width: 620px; }
.muted { color: var(--muted); font-weight: 500; }
.setup-form { display: flex; flex-direction: column; gap: 32px; }
.field--narrow { max-width: 520px; }
.setup-form__next { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.setup-form__next p { margin: 0; color: var(--muted); font-size: 15px; }

.card--flush { padding: 0; overflow: hidden; }
.card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid #E6E4EE; }
.card__head h2 { font-size: 22px; font-weight: 700; }
.card__note { margin: 0; font-size: 14px; color: var(--muted); }
.card__note--error { color: var(--error-fg); font-weight: 600; }
.card__foot { padding: 0 24px 24px; display: flex; flex-wrap: wrap; gap: 12px; }

.people__cols, .people__row { display: grid; grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1.3fr) 48px; gap: 12px; }
.people__cols { padding: 12px 24px 0; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.people { list-style: none; margin: 0; padding: 8px 24px 16px; display: flex; flex-direction: column; }
.people__row { align-items: start; padding: 8px 0; border-bottom: 1px solid #EFEEF4; }
.people__cell { display: flex; flex-direction: column; gap: 4px; }
.people__cell input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-input);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.people__cell .field__input--invalid { border-color: var(--error-fg); }
.people__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-top: 6px;
  border-radius: 50%;
  background: #E8E5F5;
  color: var(--secondary);
  font-weight: 700;
  font-size: 14px;
}
.icon-btn--tall { width: 48px; height: 48px; }
.btn-add {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px;
  border: 1.5px dashed #8B87A6;
  border-radius: var(--radius-input);
  background: #F8F7FB;
  color: var(--secondary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn-import {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px;
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-input);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.plan-badge { padding: 1px 7px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; }
.limit-notice {
  margin: 0 24px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 12px;
  background: #FCE9DC;
  color: #6B2A0A;
}
.limit-notice__text { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.limit-notice__text strong { font-size: 16px; }
.limit-notice .btn { height: 48px; white-space: nowrap; }
.limit-notice form { margin: 0; }
.limit-notice--page { margin: 0; }
.field input.field__input--invalid, #exchange-name.field__input--invalid { border-color: var(--error-fg); }

/* ---- Phones ---- */
@media (max-width: 640px) {
  .site-header__inner { padding: 12px 16px; }
  .page { padding: 32px 16px 48px; }
  h1 { font-size: 36px; }
  .hero__inner { padding: 24px 16px 56px; gap: 40px; }
  .hero__title { font-size: 44px; }
  .hero__cards { display: none; }
  .auth { padding: 24px; }
  .how { padding: 56px 16px 64px; }
  .site-footer__inner { padding: 24px 16px; }
  .people__cols { display: none; }
  .people { padding: 8px 16px 16px; }
  .people__row { grid-template-columns: 40px minmax(0, 1fr); }
  .people__row > :nth-child(n+3) { grid-column: 2; }
  .people__row > .icon-btn { justify-self: end; }
  .card__head, .card__foot { padding-left: 16px; padding-right: 16px; }
}

/* ---- Rules step ---- */
.rules { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.rules__add { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.rules__add h2, .rules__current h2 { font-size: 22px; font-weight: 700; }
.rules__current { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.rules__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rule { display: flex; align-items: center; gap: 16px; padding: 14px 14px 14px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.rule__text { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-weight: 600; }
.rule .pill { padding: 2px 10px; }
.select {
  height: 48px;
  padding: 0 12px;
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-input);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.check { display: flex; align-items: center; gap: 12px; min-height: var(--control-height); font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.btn--block { width: 100%; height: 48px; border-radius: var(--radius-input); }
.banner { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 12px; font-weight: 600; }
.banner--ok { background: var(--success-bg); color: var(--success-fg); }
.banner--error { background: var(--error-bg); color: var(--error-fg); }
.empty--inline { margin: 0; padding: 20px; border: 1.5px dashed var(--border-input); border-radius: 12px; color: var(--muted); }
.back-link { display: flex; align-items: center; height: 52px; padding: 0 8px; color: var(--secondary); font-weight: 600; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Message step ---- */
.message { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.message__compose, .preview { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.modes { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.modes legend { padding: 0; margin-bottom: 10px; font-weight: 600; font-size: 14px; }
.mode { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 12px; border: 2px solid var(--border); background: #F8F7FB; cursor: pointer; }
.mode:has(input:checked) { border-color: var(--accent); background: var(--surface); }
.mode:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.mode__title { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.mode__title input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.mode__note { font-size: 14px; color: var(--muted); }
.field textarea {
  padding: 12px 14px;
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-input);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  line-height: 1.55;
  resize: vertical;
}
.field textarea.field__input--invalid { border-color: var(--error-fg); }
.textarea--locked { background: #EFEEF4 !important; }
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.tags code { padding: 2px 8px; border-radius: 6px; background: #E8E5F5; color: var(--secondary); font-size: 13px; }
.preview { gap: 10px; }
.preview h2 { font-family: var(--font-body); font-weight: 600; font-size: 14px; }
.preview__mail { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; }
.preview__head { padding: 14px 20px; border-bottom: 1px solid #E6E4EE; font-size: 14px; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.preview__body { padding: 28px 24px; display: flex; flex-direction: column; gap: 20px; }
.preview__text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.preview__button { align-self: flex-start; display: flex; align-items: center; height: 48px; padding: 0 22px; border-radius: var(--radius-control); background: var(--accent); color: var(--surface); font-weight: 700; }
.preview__note { margin: 0; font-size: 13px; color: var(--muted); }
.preview__wishlist { display: none; margin: 0; padding: 12px 14px; border-radius: var(--radius-input); background: var(--ground); font-size: 15px; }
.message:has(#wishlists-switch:checked) .preview__wishlist { display: block; }

/* Plus switches on the message step: border and note follow the checkbox, no request needed. */
.feature-switch { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--border); }
.feature-switch:has(input:checked) { border-color: var(--accent); }
.feature-switch__label { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.feature-switch__text { display: flex; flex-direction: column; gap: 2px; }
.feature-switch__title { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.feature-switch__note { font-size: 14px; color: var(--muted); }
.feature-switch__label input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--accent); }
.feature-switch__plus { display: none; margin: 0; padding-top: 12px; border-top: 1px solid #E6E4EE; font-size: 14px; color: #3F3B5C; }
.feature-switch:has(input:checked) .feature-switch__plus { display: block; }
.plus-badge { padding: 1px 8px; border-radius: 6px; background: #FCE9DC; color: var(--accent-hover); font-size: 12px; font-weight: 700; }
.send-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; background: var(--ink); color: var(--ground); border-radius: var(--radius-card); }
.send-bar__text { display: flex; flex-direction: column; gap: 2px; }
.send-bar__title { font-family: var(--font-heading); font-weight: 700; font-size: 20px; }
.send-bar__detail { font-size: 15px; color: var(--ink-soft); }
.send-bar__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.btn--light { background: transparent; color: var(--ground); border: 1.5px solid var(--ink-line); height: 52px; }
.btn--light:hover { background: var(--ink-raised); color: var(--ground); }
@media (max-width: 640px) { .modes { grid-template-columns: 1fr; } }

/* Participant reveal page (mobile first, dark) */
body.reveal { margin: 0; min-height: 100vh; box-sizing: border-box; padding: 48px 28px 40px; display: flex; flex-direction: column; gap: 32px; background: var(--ink); color: var(--ground); font-family: var(--font-body); font-size: 16px; line-height: 1.5; }
.reveal__brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-heading); font-weight: 800; font-size: 17px; }
.reveal__panel { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; width: 100%; max-width: 480px; margin: 0 auto; }
.reveal__intro { display: flex; flex-direction: column; gap: 12px; }
.reveal__intro h1 { margin: 0; font-family: var(--font-heading); font-weight: 800; font-size: 44px; line-height: 1.02; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.reveal__intro p { margin: 0; color: var(--ink-soft); font-size: 17px; }
.reveal__gift { align-self: center; position: relative; width: 220px; height: 210px; }
.reveal__gift-box { position: absolute; left: 10px; top: 70px; width: 200px; height: 140px; border-radius: 12px; background: var(--accent); }
.reveal__gift-lid { position: absolute; left: 0; top: 40px; width: 220px; height: 44px; border-radius: 10px; background: #D9581F; }
.reveal__gift-ribbon { position: absolute; left: 96px; top: 40px; width: 28px; height: 170px; background: #E9C46A; }
.reveal__gift-bow { position: absolute; top: 4px; width: 46px; height: 40px; border: 8px solid #E9C46A; box-sizing: border-box; }
.reveal__gift-bow--left { left: 62px; border-radius: 50% 50% 0 50%; transform: rotate(10deg); }
.reveal__gift-bow--right { left: 112px; border-radius: 50% 50% 50% 0; transform: rotate(-10deg); }
.reveal__primary, .reveal__secondary { font: inherit; font-weight: 700; border-radius: 14px; cursor: pointer; }
.reveal__primary { height: 56px; border: 0; background: var(--ground); color: var(--ink); font-size: 17px; }
.reveal__secondary { height: 52px; border: 1.5px solid #6A6590; background: transparent; color: var(--ground); font-weight: 600; }
.reveal__primary:focus-visible, .reveal__secondary:focus-visible { outline: 2px solid var(--ground); outline-offset: 3px; }
.reveal__result { display: flex; flex-direction: column; gap: 16px; padding-top: 48px; }
.reveal__eyebrow { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #E9C46A; }
.reveal__name { margin: 0; font-family: var(--font-heading); font-weight: 800; font-size: 64px; line-height: 0.98; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.reveal__footer { display: flex; flex-direction: column; gap: 16px; }
.reveal__note { display: flex; gap: 12px; padding: 16px; border-radius: 14px; background: var(--ink-raised); }
.reveal__note svg { flex: none; margin-top: 1px; }
.reveal__note p { margin: 0; font-size: 15px; color: #E2E0EE; }
.reveal__wide { width: 100%; }
.reveal__primary--accent { background: var(--accent); color: #fff; }
.reveal__primary--accent:hover { background: var(--accent-hover); color: #fff; }

/* Participant wishlists (mobile first): dark header with tabs, light lists below */
body.wishlist { margin: 0; min-height: 100vh; background: var(--ground); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.5; }
.wishlist__frame { max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.wishlist__head { background: var(--ink); color: var(--ground); padding: 32px 20px 16px; display: flex; flex-direction: column; gap: 16px; }
.wishlist__head h1 { font-weight: 800; font-size: 32px; line-height: 1.05; letter-spacing: -0.02em; }
.wishlist__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wishlist__back { display: flex; align-items: center; gap: 6px; min-height: 44px; color: var(--ink-soft); font-size: 15px; font-weight: 600; text-decoration: none; }
.wishlist__back:hover { color: var(--ground); }
.wishlist__exchange { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink-soft); min-width: 0; }
.wishlist__tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px; background: var(--ink-raised); }
.wishlist__tab { display: flex; align-items: center; justify-content: center; height: 44px; border-radius: 9px; color: var(--ink-soft); font-size: 15px; font-weight: 700; text-decoration: none; }
.wishlist__tab:hover { color: var(--ground); }
.wishlist__tab[aria-selected="true"] { background: var(--ground); color: var(--ink); }
.wishlist__body { flex: 1 1 auto; padding: 20px 20px 32px; display: flex; flex-direction: column; gap: 16px; }
.wishlist__lead { margin: 0; font-size: 15px; color: var(--muted); }
.wishlist__items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.wishlist__item { display: flex; gap: 14px; padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.wishlist__item--mine { align-items: flex-start; gap: 10px; padding: 14px 8px 14px 16px; }
.wishlist__item--got { background: #EEF5F0; }
.wishlist__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.wishlist__title { font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }
.wishlist__item--got .wishlist__title { text-decoration: line-through; color: var(--muted); }
.wishlist__details { font-size: 15px; color: var(--muted); overflow-wrap: anywhere; }
.wishlist__link { align-self: flex-start; display: flex; align-items: center; gap: 6px; min-height: 32px; color: var(--secondary); font-size: 14px; font-weight: 600; }
.wishlist__site { font-size: 14px; color: var(--secondary); font-weight: 600; }
.wishlist__got { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 56px; min-height: 52px; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; }
.wishlist__got input { width: 22px; height: 22px; margin: 0; accent-color: var(--success-fg); }
.wishlist__item--got .wishlist__got { color: var(--success-fg); }
.wishlist__empty { margin: 0; padding: 18px; border: 1.5px dashed var(--border-input); border-radius: 14px; color: var(--muted); font-size: 15px; }
.wishlist__info { display: flex; gap: 10px; padding: 14px 16px; border-radius: 12px; background: #E8E5F5; color: var(--secondary); font-size: 14px; }
.wishlist__info svg { flex: none; margin-top: 2px; }
.wishlist__add { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.wishlist__add h2 { font-size: 20px; font-weight: 800; }
.wishlist__field { display: flex; flex-direction: column; gap: 4px; }
.wishlist__field label { font-size: 14px; font-weight: 600; }
.wishlist__field input { height: 48px; box-sizing: border-box; padding: 0 12px; border: 1.5px solid var(--border-input); border-radius: var(--radius-input); background: var(--surface); color: var(--ink); font: inherit; }
.wishlist__field input.field__input--invalid { border-color: var(--error-fg); }
.wishlist__add .btn { height: 48px; }
.wishlist__ask { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; border-radius: 12px; border: 1.5px solid var(--secondary); color: var(--secondary); font-weight: 700; text-decoration: none; }
.wishlist__ask:hover { background: #E8E5F5; }

/* Anonymous questions: same dark header and tabs as the wishlists, a bubble thread and a compose box below */
.wishlist__tab { gap: 8px; }
.questions__badge { display: flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: var(--radius-pill); background: var(--accent); color: #FFFFFF; font-size: 12px; }
.questions__thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.questions__message { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.questions__message--mine { align-items: flex-end; }
.questions__who { font-size: 12px; font-weight: 700; color: var(--muted); }
.questions__bubble { margin: 0; max-width: 85%; padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: var(--surface); color: var(--ink); border: 1px solid var(--border); overflow-wrap: anywhere; white-space: pre-line; }
.questions__message--mine .questions__bubble { border-radius: 16px 16px 4px 16px; background: var(--accent); color: #FFFFFF; border-color: var(--accent); }
.questions__waiting { margin: 0; align-self: flex-end; font-size: 13px; color: var(--muted); }
.questions__compose { position: sticky; bottom: 0; padding: 12px 16px 24px; background: var(--surface); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.questions__ideas { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.questions__idea { flex: none; display: flex; align-items: center; height: 36px; padding: 0 12px; border: 1.5px solid var(--border-input); border-radius: var(--radius-pill); background: var(--surface); color: var(--secondary); font-size: 14px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.questions__idea:hover { border-color: var(--secondary); }
.questions__row { display: flex; align-items: flex-end; gap: 8px; }
.questions__row textarea { flex: 1 1 auto; min-width: 0; box-sizing: border-box; padding: 10px 12px; border: 1.5px solid var(--border-input); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; line-height: 1.4; resize: none; }
.questions__row textarea.field__input--invalid { border-color: var(--error-fg); }
.questions__send { flex: none; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 0; border-radius: 12px; background: var(--accent); color: #FFFFFF; cursor: pointer; }
.questions__send:hover { background: var(--accent-hover); }
.questions__foot { font-size: 12px; color: var(--muted); }

/* Organizer dashboard */
.back-link { align-self: flex-start; display: flex; align-items: center; gap: 6px; min-height: 44px; margin: -20px 0 -16px; color: var(--secondary); font-weight: 600; text-decoration: none; }
.eyebrow--secondary { color: var(--secondary); }
.dash__lock { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; }
.stat { padding: 20px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); display: flex; flex-direction: column; gap: 12px; }
.stat__label { font-size: 14px; font-weight: 600; color: var(--muted); }
.stat__value { font-family: var(--font-heading); font-weight: 800; font-size: 40px; line-height: 1; }
.stat__value--error { color: var(--error-fg); }
.stat__of { font-size: 22px; color: var(--muted); font-weight: 600; }
.meter__fill--secondary { background: var(--secondary); }
.toast { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: var(--radius-control); background: var(--success-bg); color: var(--success-fg); font-weight: 600; }
.toast--error { background: var(--error-bg); color: var(--error-fg); }
.toast__close { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; background: transparent; color: var(--secondary); cursor: pointer; }
.card--flush { padding: 0; overflow: hidden; }
.people-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid #E6E4EE; }
.people-head h2 { margin: 0; font-family: var(--font-heading); font-size: 22px; font-weight: 700; }
.people-head p { margin: 0; font-size: 14px; color: var(--muted); }
.table-scroll { overflow-x: auto; }
.people-table { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 15px; }
.people-table th, .people-table td { padding: 14px 12px; text-align: left; }
.people-table thead th { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding-top: 12px; padding-bottom: 12px; }
.people-table tbody tr { border-top: 1px solid #EFEEF4; }
.people-table th:first-child, .people-table td:first-child { padding-left: 24px; }
.people-table th:last-child, .people-table td:last-child { padding-right: 24px; }
.people-table tbody th { font-weight: 600; white-space: nowrap; }
.people-table__actions { text-align: right !important; }
.people-table__sent { color: var(--muted); white-space: nowrap; }
.people-table__email { word-break: break-all; }
.people-table__row--failed { background: #FDF6F5; }
.people-table__row--failed .people-table__email { color: var(--error-fg); }
.people-table__input { width: 100%; min-width: 220px; height: 44px; box-sizing: border-box; padding: 0 12px; border: 1.5px solid var(--accent); border-radius: var(--radius-input); background: var(--surface); color: var(--ink); font: inherit; }
.people-table__buttons { display: flex; justify-content: flex-end; gap: 8px; }
.people-table__buttons .btn { white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.reveal__link { display: flex; align-items: center; justify-content: center; text-decoration: none; }

/* ---- Beta waitlist ---- */
.brand__beta {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent-light);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.auth__intro { display: flex; flex-direction: column; gap: 10px; }
.auth__intro p { margin: 0; color: var(--muted); }
.auth__done { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 8px 0; }
.auth__done p { margin: 0; color: var(--muted); }
.auth__done strong { color: var(--ink); word-break: break-all; }
.auth__done-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success-fg);
}
.auth__link { display: inline-flex; align-items: center; min-height: var(--control-height); font-weight: 600; text-decoration: underline; }

/* ---- Public pages: header nav, footer, About, Pricing, Privacy, Terms ---- */
.site-header__nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.site-header__nav .site-header__link { padding: 0 12px; }
.site-header__link--button { padding: 0 18px; border: 1.5px solid #6A6590; border-radius: var(--radius-input); color: var(--ground); }
.site-footer__inner--split { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer__links a { color: var(--muted); }

.public { display: flex; flex-direction: column; background: var(--ground); font-size: 18px; line-height: 1.6; }
.pub-hero { background: var(--ink); color: var(--ground); }
.pub-hero__inner { max-width: 1180px; margin: 0 auto; padding: 56px 32px 88px; display: flex; flex-direction: column; gap: 24px; }
.pub-hero--centered .pub-hero__inner { align-items: center; text-align: center; }
.pub-hero--tall .pub-hero__inner { padding-bottom: 140px; }
.pub-eyebrow { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-light); }
.pub-title { max-width: 820px; font-size: 68px; line-height: 1; letter-spacing: -0.035em; text-wrap: balance; }
.pub-title--legal { font-size: 60px; }
.pub-title span { color: var(--accent-light); }
.pub-hero__lead { margin: 0; max-width: 620px; color: var(--ink-soft); font-size: 19px; text-wrap: pretty; }
.pub-hero__effective { margin: 0; color: var(--ink-soft); font-size: 16px; }
.pub-hero__effective span { color: var(--accent-light); font-weight: 600; }
.beta-note { margin: 0; display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: var(--radius-pill); background: var(--ink-raised); font-size: 15px; font-weight: 600; }
.beta-note__tag { padding: 2px 8px; border-radius: 6px; background: var(--accent-light); color: var(--ink); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

.pub-section { max-width: 1180px; width: 100%; margin: 0 auto; padding: 56px 32px; display: flex; flex-direction: column; gap: 32px; }
.pub-split { max-width: 1180px; width: 100%; margin: 0 auto; padding: 56px 32px; display: flex; flex-wrap: wrap; gap: 32px 64px; }
.pub-split__title { flex: 1 1 240px; font-size: 32px; line-height: 1.1; letter-spacing: -0.02em; }
.pub-split__body { flex: 999 1 520px; min-width: 0; max-width: 720px; display: flex; flex-direction: column; gap: 20px; }
.pub-split__body p { margin: 0; color: #3F3B5C; }
.pub-split__body .pub-lead { color: var(--ink); font-size: 22px; line-height: 1.55; }
.pub-split__body .pub-signoff { font-family: var(--font-heading); font-weight: 700; font-size: 20px; color: var(--ink); }
.pub-intro { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.pub-intro p { margin: 0; color: var(--muted); }
.pub-heading { font-size: 44px; line-height: 1.05; letter-spacing: -0.025em; text-wrap: balance; }

.promises { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 20px; }
.promise { display: flex; flex-direction: column; gap: 14px; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; }
.promise h3 { font-family: var(--font-body); font-size: 20px; font-weight: 700; line-height: 1.25; }
.promise p { margin: 0; font-size: 16px; color: var(--muted); }
.promise__icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: var(--radius-control); background: #E8E5F5; color: var(--secondary); }
.money { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 48px; padding: 36px 40px; border-radius: 20px; background: var(--ink); color: var(--ground); }
.money h3 { flex: 1 1 260px; font-size: 30px; line-height: 1.1; letter-spacing: -0.02em; }
.money p { flex: 999 1 420px; min-width: 0; margin: 0; color: var(--ink-soft); }
.money strong { color: #fff; }
.pub-cta { border-top: 1px solid var(--border); }
.pub-cta__inner { max-width: 1180px; margin: 0 auto; padding: 64px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.pub-cta__title { font-size: 36px; line-height: 1.1; letter-spacing: -0.02em; }

.pricing { max-width: 1180px; width: 100%; margin: -96px auto 0; padding: 0 32px 80px; display: flex; flex-direction: column; gap: 72px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 22px; padding: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 20px 40px rgba(30, 27, 58, 0.08); }
.plan--featured { border: 2.5px solid var(--accent); box-shadow: 0 24px 48px rgba(194, 65, 12, 0.16); }
.plan__flag { position: absolute; top: -15px; left: 32px; padding: 4px 12px; border-radius: var(--radius-pill); background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; }
.plan__head { display: flex; flex-direction: column; gap: 6px; }
.plan__head h2 { font-size: 26px; }
.plan__head p { margin: 0; color: var(--muted); font-size: 15px; }
.plan__price { margin: 0; display: flex; align-items: baseline; gap: 8px; color: var(--muted); font-size: 15px; }
.plan__price span { font-family: var(--font-heading); font-weight: 800; font-size: 52px; line-height: 1; color: var(--ink); }
.plan__price--small span { font-size: 36px; }
.plan .btn { height: 50px; }
.btn--outline { border: 1.5px solid var(--ink); background: transparent; color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--surface); }
.feat { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 16px; }
.feat li { display: flex; gap: 10px; align-items: flex-start; }
.feat .feat__lead { font-weight: 600; }
.tick { flex: none; margin-top: 3px; color: var(--success-fg); }
.pass { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding: 24px 32px; border-radius: 18px; background: #E8E5F5; }
.pass__copy { display: flex; flex-direction: column; gap: 2px; }
.pass__copy h2 { font-size: 22px; }
.pass__copy p { margin: 0; color: #3F3B5C; font-size: 16px; }
.pass__copy .pass__promise { margin-top: 6px; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--success-fg); }
.pass__promise .tick { margin-top: 0; }
.pricing .pub-split { padding: 0; }
.faq { flex: 999 1 520px; min-width: 0; margin: 0; display: flex; flex-direction: column; gap: 24px; }
.faq > div { display: flex; flex-direction: column; gap: 6px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.faq > div:last-child { padding-bottom: 0; border-bottom: 0; }
.faq dt { font-weight: 700; font-size: 18px; }
.faq dd { margin: 0; color: var(--muted); }

.legal-layout { max-width: 1180px; width: 100%; margin: 0 auto; padding: 56px 32px 80px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px 64px; font-size: 17px; line-height: 1.65; }
.legal-toc { flex: 1 1 220px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.legal-toc p { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.legal-toc a { display: flex; align-items: center; min-height: 36px; color: var(--secondary); font-weight: 600; text-decoration: none; }
.legal-toc a:hover { color: var(--accent-hover); }
.legal { flex: 999 1 560px; min-width: 0; max-width: 760px; display: flex; flex-direction: column; gap: 40px; }
.legal h2 { padding-top: 8px; font-size: 28px; line-height: 1.15; letter-spacing: -0.015em; }
.legal h3 { font-family: var(--font-body); font-size: 18px; font-weight: 700; }
.legal p, .legal ul { margin: 0; }
.legal ul { padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.legal section { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 16px; }
.legal__summary { display: flex; flex-direction: column; gap: 12px; padding: 24px 28px; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--border); }
.legal__summary h2 { font-size: 22px; padding-top: 0; }
.legal .ph { background: #FCE9DC; color: var(--accent-hover); padding: 0 4px; border-radius: 4px; font-weight: 600; }

@media (max-width: 640px) {
  .pub-hero__inner { padding: 32px 16px 56px; }
  .pub-hero--tall .pub-hero__inner { padding-bottom: 112px; }
  .pub-title, .pub-title--legal { font-size: 40px; }
  .pub-section, .pub-split, .legal-layout, .pub-cta__inner { padding-left: 16px; padding-right: 16px; }
  .pub-heading { font-size: 32px; }
  .pricing { padding: 0 16px 56px; margin-top: -72px; }
  .money { padding: 28px 24px; }
  .site-header__nav { gap: 0; }
  .site-header__nav .site-header__link { padding: 0 8px; }
  .site-header__link--button { padding: 0 12px; }
}

/* ---- Account ---- */
.account__profile { display: flex; align-items: center; gap: 10px; min-height: var(--control-height); color: inherit; text-decoration: none; }
.account__profile:hover { color: var(--ground); }
.account-page { max-width: 760px; }
.account-card { display: flex; flex-direction: column; gap: 16px; padding: 28px; }
.account-card h2 { font-size: 22px; font-weight: 700; }
.account-card p { margin: 0; color: #3F3B5C; }
.account-card ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; color: #3F3B5C; }
.account-card__details { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.account-card__details div { display: flex; flex-direction: column; gap: 2px; }
.account-card__details dt { font-size: 14px; font-weight: 600; color: var(--muted); }
.account-card__details dd { margin: 0; font-weight: 600; }
.account-card__email { word-break: break-all; }
.account-card--danger { border: 1.5px solid #E8B4AE; }
.account-card--danger h2 { color: var(--error-fg); }
.btn--danger-outline { height: 48px; border: 1.5px solid var(--error-fg); background: var(--surface); color: var(--error-fg); }
.btn--danger-outline:hover { background: var(--error-bg); color: var(--error-fg); }
.btn--danger { height: 48px; background: var(--error-fg); color: #fff; }
.btn--danger:hover { background: #701510; color: #fff; }
.btn--danger:disabled { background: #C9A3A0; cursor: not-allowed; }
.delete-confirm { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: var(--radius-control); background: #FDF3F2; }
.delete-confirm .field input { max-width: 320px; }
.delete-confirm__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.delete-confirm__actions .btn { height: 48px; }
.account-deleted { max-width: 640px; align-items: flex-start; padding-top: 96px; }
.account-deleted h1 { font-size: 44px; }

/* ---- Upgrade ---- */
.upgrade-page { max-width: 820px; gap: 28px; }
.upgrade-page h1 { font-weight: 800; font-size: 44px; line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
.upgrade-form { display: flex; flex-direction: column; gap: 28px; }
.upgrade-plans { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.upgrade-plan { display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: var(--radius-card); border: 2px solid var(--border); background: var(--surface); cursor: pointer; }
.upgrade-plan:has(input:checked) { border-color: var(--accent); }
.upgrade-plan__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.upgrade-plan__name { display: flex; align-items: center; gap: 10px; font-family: var(--font-heading); font-weight: 800; font-size: 22px; }
.upgrade-plan__name input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.upgrade-plan__price { font-family: var(--font-heading); font-weight: 800; font-size: 28px; }
.upgrade-plan__summary { color: var(--muted); font-size: 15px; }
.upgrade-summary { display: flex; flex-direction: column; gap: 28px; }
.upgrade-features { display: flex; flex-direction: column; gap: 12px; padding: 24px 28px; }
.upgrade-features h2 { font-family: var(--font-body); font-size: 17px; font-weight: 700; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 8px 24px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list svg { flex: none; margin-top: 3px; color: var(--accent); }
.upgrade-total { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-radius: var(--radius-card); background: var(--ink); color: var(--ground); }
.upgrade-total__text { display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--ink-soft); }
.upgrade-total__price { font-family: var(--font-heading); font-weight: 800; font-size: 22px; color: var(--ground); }
.upgrade-total__price small { font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--ink-soft); }
.upgrade-total .btn { gap: 10px; }
.upgrade-note { margin: 0; font-size: 14px; color: var(--muted); }

/* ---- Archive ---- */
.banner--archived { background: var(--tab-track); color: var(--secondary); }
.archive-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 28px; }
.archive-card__text { display: flex; flex-direction: column; gap: 4px; max-width: 640px; }
.archive-card__text h2 { font-family: var(--font-body); font-size: 17px; font-weight: 700; }
.archive-card__text p { margin: 0; color: var(--muted); font-size: 15px; }
.archive-card form { margin: 0; }
.archive-card .btn { height: 48px; }
.pill--archived { background: var(--tab-track); color: var(--muted); }
@media (max-width: 640px) {
  .upgrade-page h1 { font-size: 34px; }
}
