:root {
  --bg: #f6efe6;
  --surface: rgba(255, 251, 246, 0.92);
  --surface-strong: #fffdf9;
  --surface-muted: #f6ede4;
  --ink: #26151d;
  --muted: #685b5f;
  --line: #e3d6c9;
  --accent: #ba6147;
  --accent-dark: #964634;
  --accent-soft: rgba(186, 97, 71, 0.12);
  --olive: #667154;
  --olive-soft: #e7ebdf;
  --rose-soft: #f4e1db;
  --plum-soft: rgba(72, 31, 51, 0.08);
  --shadow: 0 20px 48px rgba(38, 21, 29, 0.08);
  --radius: 16px;
  --radius-lg: 26px;
  --max: 1200px;
}

/* Application page: short first step, calm proof, and progressive detail. */
.apply-hero-photo {
  position: relative;
  width: 100%;
  min-height: 250px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(227, 214, 201, 0.9);
  border-radius: 20px;
  background: #e9ded4;
  box-shadow: 0 20px 48px rgba(54, 24, 38, 0.12);
}

.apply-hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 250px;
  object-fit: cover;
  object-position: center 48%;
}

.apply-hero-photo figcaption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  width: fit-content;
  max-width: calc(100% - 28px);
  padding: 8px 11px;
  border-radius: 8px;
  background: rgba(50, 24, 37, 0.82);
  color: #fffdf9;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  backdrop-filter: blur(10px);
}

.apply-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 24px;
}

.apply-layout > .panel {
  margin-bottom: 0;
}

.application-form {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.apply-first-step {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.apply-first-step legend {
  margin-bottom: 12px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.apply-more {
  overflow: hidden;
  border: 1px solid rgba(177, 78, 63, 0.18);
  border-radius: 14px;
  background: rgba(255, 253, 249, 0.78);
}

.apply-more summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 12px 16px;
  list-style: none;
  cursor: pointer;
  background: var(--accent-dark);
  color: #fffdf9;
}

.apply-more summary::-webkit-details-marker {
  display: none;
}

.apply-more summary::after {
  content: "↓";
  font-size: 1.1rem;
  font-weight: 800;
}

.apply-more[open] summary::after {
  content: "↑";
}

.apply-more summary span {
  font-weight: 800;
}

.apply-more summary small {
  grid-column: 1;
  color: rgba(255, 253, 249, 0.78);
  font-size: 0.78rem;
  font-weight: 600;
}

.apply-more-fields {
  padding: 18px;
}

.apply-more label > small {
  color: var(--muted);
  font-weight: 500;
}

.apply-next-panel {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(255, 253, 249, 0.96), rgba(231, 235, 223, 0.76));
  box-shadow: var(--shadow);
}

.apply-next-panel h2,
.apply-next-panel p,
.apply-next-panel ol {
  margin: 0;
}

.apply-next-panel h2 {
  color: #321824;
  font-size: 1.45rem;
}

.apply-next-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.apply-time {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(82, 97, 63, 0.12);
  color: #52613f;
  font-size: 0.78rem;
  font-weight: 800;
}

.apply-sign-in {
  padding-top: 14px;
  border-top: 1px solid rgba(227, 214, 201, 0.84);
}

@media (max-width: 980px) {
  .apply-layout {
    grid-template-columns: 1fr;
  }

  .apply-next-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .apply-hero-photo,
  .apply-hero-photo img {
    min-height: 230px;
  }

  .apply-hero-photo {
    border-radius: 16px;
  }

  .apply-more summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .apply-more-fields {
    padding: 14px;
  }

  .apply-next-panel {
    padding: 18px;
  }
}

/* Signed-out app home: one clear choice, then the shortest useful story. */
.hero-card.guest-home-hero {
  grid-template-columns: minmax(0, 1.02fr) minmax(380px, 0.98fr);
  align-items: center;
  gap: 34px;
  padding: 30px;
  background: linear-gradient(140deg, rgba(255, 253, 249, 0.98), rgba(244, 225, 219, 0.72));
}

.hero-card.hero-compact.guest-home-hero h1 {
  max-width: 12ch;
  font-size: 3rem;
  line-height: 1.02;
}

.guest-home-hero-detail {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.guest-home-hero-detail .hero-actions {
  margin: 0;
}

.guest-home-trust {
  color: var(--muted);
  font-size: 0.86rem !important;
  font-weight: 700;
}

.guest-home-hero-photo,
.guest-home-story-photo {
  position: relative;
  width: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: #dfd2c8;
}

.guest-home-hero-photo {
  min-height: 410px;
  border-radius: 8px;
  box-shadow: 0 22px 52px rgba(54, 24, 38, 0.16);
}

.guest-home-hero-photo img,
.guest-home-story-photo img {
  object-fit: cover;
}

.guest-home-hero-photo img {
  object-position: center 48%;
}

.guest-home-hero-photo figcaption {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 1;
  width: fit-content;
  max-width: calc(100% - 32px);
  padding: 8px 11px;
  border-radius: 6px;
  background: rgba(50, 24, 37, 0.82);
  color: #fffdf9;
  font-size: 0.82rem;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.guest-home-steps {
  display: grid;
  grid-template-columns: minmax(230px, 0.7fr) minmax(0, 1.3fr);
  gap: 42px;
  align-items: start;
  margin: 8px 0 28px;
  padding: 34px 6px 38px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.guest-home-section-head h2,
.guest-home-section-head p,
.guest-home-step-list,
.guest-home-step-list p {
  margin: 0;
}

.guest-home-section-head h2 {
  margin-top: 8px;
  color: #321824;
  font-size: 2rem;
  line-height: 1.12;
}

.guest-home-section-head p {
  max-width: 30ch;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.55;
}

.guest-home-step-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0;
  list-style: none;
}

.guest-home-step-list li {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 2px 22px;
  border-left: 1px solid var(--line);
}

.guest-home-step-list li > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #321824;
  color: #fffdf9;
  font-size: 0.84rem;
  font-weight: 800;
}

.guest-home-step-list strong {
  color: #321824;
  font-size: 1rem;
  line-height: 1.3;
}

.guest-home-step-list p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.guest-home-story {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  min-height: 430px;
  margin-bottom: 28px;
  overflow: hidden;
  border-radius: 8px;
  background: #321824;
  color: #fffdf9;
  box-shadow: 0 24px 60px rgba(54, 24, 38, 0.16);
}

.guest-home-story-photo img {
  object-position: center 48%;
}

.guest-home-story-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 44px;
}

.guest-home-story-copy .eyebrow {
  color: #f0b8a6;
}

.guest-home-story-copy h2,
.guest-home-story-copy p,
.guest-home-story-copy ul {
  margin: 0;
}

.guest-home-story-copy h2 {
  margin-top: 10px;
  color: #fffdf9;
  font-size: 2.35rem;
  line-height: 1.08;
}

.guest-home-story-copy p {
  margin-top: 16px;
  color: rgba(255, 253, 249, 0.82);
  line-height: 1.6;
}

.guest-home-story-copy ul {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  padding-left: 20px;
  color: rgba(255, 253, 249, 0.9);
}

.guest-home-story-copy .button {
  margin-top: 26px;
}

.button-light {
  border-color: #fffdf9;
  background: #fffdf9;
  color: #321824;
}

.button-light:hover {
  border-color: #f4e1db;
  background: #f4e1db;
  color: #321824;
}

@media (max-width: 980px) {
  .hero-card.guest-home-hero,
  .guest-home-steps,
  .guest-home-story {
    grid-template-columns: 1fr;
  }

  .guest-home-hero-photo {
    min-height: 360px;
  }

  .guest-home-steps {
    gap: 28px;
  }

  .guest-home-story-photo {
    min-height: 340px;
  }
}

@media (max-width: 640px) {
  .hero-card.hero-compact.guest-home-hero h1 {
    max-width: 12ch;
    font-size: 2.25rem;
  }

  .guest-home-hero-photo {
    min-height: 280px;
  }

  .guest-home-hero-photo img {
    object-position: 58% 48%;
  }

  .guest-home-steps {
    padding: 28px 2px;
  }

  .guest-home-step-list {
    grid-template-columns: 1fr;
  }

  .guest-home-step-list li {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 18px 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .guest-home-step-list li > span {
    grid-row: 1 / span 2;
  }

  .guest-home-step-list p {
    grid-column: 2;
  }

  .guest-home-story-photo {
    min-height: 270px;
  }

  .guest-home-story-copy {
    padding: 28px 22px 32px;
  }

  .guest-home-story-copy h2 {
    font-size: 2rem;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top left, rgba(186, 97, 71, 0.06), transparent 26%),
    linear-gradient(180deg, #fcf7f1 0%, #f6ede5 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #7f3f2f;
  outline-offset: 3px;
}

p {
  color: var(--muted);
}

code {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(34, 28, 30, 0.06);
  font-family: "SFMono-Regular", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 18px 28px;
  background: rgba(252, 247, 241, 0.9);
  border-bottom: 1px solid rgba(227, 214, 201, 0.94);
  backdrop-filter: blur(20px);
}

.mobile-menu {
  display: none;
  position: relative;
}

.mobile-menu summary {
  list-style: none;
}

.mobile-menu summary::-webkit-details-marker {
  display: none;
}

.brand-cluster,
.brand-block {
  display: flex;
  align-items: center;
}

.brand-cluster {
  gap: 14px;
}

.brand-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(36, 20, 31, 0.14);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #341724;
}

.brand-subtitle {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.topnav,
.session-block,
.hero-actions,
.action-row,
.panel-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.action-row form,
.panel-actions form,
.hero-actions form {
  display: inline-flex;
}

.topnav {
  justify-content: center;
  flex-wrap: wrap;
}

.nav-link {
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 700;
  color: #392f33;
}

.nav-link:hover {
  background: rgba(186, 97, 71, 0.08);
}

.nav-link.is-active {
  background: rgba(186, 97, 71, 0.12);
  color: var(--accent-dark);
}

.session-block {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.session-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(227, 214, 201, 0.88);
}

.session-copy strong {
  font-size: 0.92rem;
}

.session-copy span {
  font-size: 0.82rem;
  color: var(--muted);
}

.mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(102, 113, 84, 0.22);
  background: rgba(244, 247, 239, 0.92);
  color: #49533c;
  font-size: 0.84rem;
  font-weight: 800;
}

.mode-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--olive);
}

.mobile-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid rgba(34, 28, 30, 0.12);
  border-radius: 12px;
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
}

.mobile-menu[open] .mobile-menu-toggle {
  background: rgba(177, 78, 63, 0.08);
  border-color: rgba(177, 78, 63, 0.22);
}

.mobile-menu-panel {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(232, 216, 203, 0.92);
  border-radius: 18px;
  background: rgba(255, 250, 245, 0.98);
  box-shadow: var(--shadow);
}

.mobile-menu-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.mobile-menu-links,
.mobile-menu-actions {
  display: grid;
  gap: 10px;
}

.mobile-menu-links .nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(34, 28, 30, 0.04);
  font-weight: 700;
}

.mobile-menu-links .nav-link.is-active {
  background: rgba(177, 78, 63, 0.12);
}

.mobile-menu-actions form,
.mobile-menu-actions .button {
  width: 100%;
}

.page {
  width: min(calc(100% - 36px), var(--max));
  margin: 0 auto;
  padding: 26px 0 64px;
}

.preview-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 20px;
  padding: 18px 20px;
  border: 1px solid rgba(38, 21, 29, 0.08);
  border-radius: 18px;
  background: rgba(255, 252, 248, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.preview-strip strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.preview-strip-compact {
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
}

.preview-strip-compact strong {
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.preview-strip-compact p {
  font-size: 0.88rem;
}

.preview-strip p {
  margin: 0;
  font-size: 0.92rem;
}

.preview-strip-copy {
  max-width: 60ch;
}

.preview-gate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.preview-badge {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(38, 21, 29, 0.04);
  border: 1px solid rgba(227, 214, 201, 0.82);
  color: #463a3f;
  font-size: 0.8rem;
  font-weight: 700;
}

.preview-gate-details {
  padding: 12px 14px;
  border: 1px solid rgba(227, 214, 201, 0.88);
  border-radius: 16px;
  background: rgba(255, 253, 249, 0.9);
}

.preview-gate-details summary {
  list-style: none;
  cursor: pointer;
}

.preview-gate-details summary::-webkit-details-marker {
  display: none;
}

.preview-gate-summary {
  display: grid;
  gap: 4px;
}

.preview-gate-summary span {
  color: #321824;
  font-size: 0.92rem;
  font-weight: 800;
}

.preview-gate-summary small {
  color: var(--muted);
  font-size: 0.8rem;
}

.preview-gate-details .preview-gate-grid {
  margin-top: 12px;
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: stretch;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 253, 249, 0.96), rgba(244, 225, 219, 0.78));
  box-shadow: var(--shadow);
  border: 1px solid rgba(186, 97, 71, 0.08);
  margin-bottom: 24px;
  overflow: hidden;
}

.hero-card.hero-deep {
  background: linear-gradient(135deg, rgba(255, 249, 243, 0.96), rgba(231, 235, 223, 0.92));
}

.hero-card.hero-compact {
  padding: 24px;
  gap: 22px;
  margin-bottom: 18px;
}

.hero-card.hero-compact h1 {
  font-size: clamp(2rem, 3.2vw, 3rem);
  max-width: 11ch;
}

.hero-card.hero-compact p {
  max-width: 54ch;
  font-size: 0.98rem;
}

.hero-card.hero-compact .hero-side-card {
  gap: 14px;
  padding: 18px;
}

.hero-card.hero-entry {
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.78fr);
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-card h1 {
  margin: 8px 0 12px;
  font-size: clamp(2.2rem, 3.8vw, 3.6rem);
  line-height: 0.98;
  letter-spacing: 0;
  color: #361826;
}

.hero-card p {
  max-width: 62ch;
  margin: 0;
  font-size: 1.04rem;
}

.hero-detail {
  margin-top: 22px;
}

.hero-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.hero-proof-card {
  display: grid;
  gap: 8px;
  min-height: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(227, 214, 201, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.hero-proof-card span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-proof-card strong {
  font-size: 1rem;
  line-height: 1.3;
}

.hero-proof-card small {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.hero-kicker {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(177, 78, 63, 0.1);
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-side {
  display: flex;
  align-items: stretch;
}

.hero-side-card {
  display: grid;
  gap: 16px;
  width: 100%;
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(227, 214, 201, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-side-grid {
  display: grid;
  gap: 12px;
}

.hero-side-item {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(227, 214, 201, 0.78);
}

.hero-side-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.hero-side-item span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.hero-side-item strong {
  display: block;
  font-size: 0.96rem;
  line-height: 1.4;
}

.entry-side-card {
  gap: 14px;
}

.inline-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 0;
}

.sample-account-details {
  margin-top: 14px;
  border: 1px solid rgba(227, 214, 201, 0.92);
  border-radius: 16px;
  background: rgba(255, 253, 249, 0.88);
  overflow: hidden;
}

.sample-account-details summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-size: 0.92rem;
  font-weight: 800;
  color: #321824;
}

.sample-account-details summary::-webkit-details-marker {
  display: none;
}

.sample-account-copy {
  padding: 0 16px 16px;
}

.sample-account-copy p {
  margin: 0 0 12px;
  font-size: 0.92rem;
}

.entry-action-stack,
.entry-rail {
  display: grid;
  gap: 10px;
}

.entry-action-stack .button {
  width: 100%;
}

.entry-rail-item {
  padding-top: 10px;
  border-top: 1px solid rgba(227, 214, 201, 0.78);
}

.entry-rail-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.entry-rail-item span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.entry-rail-item strong {
  display: block;
  color: #321824;
  font-size: 0.96rem;
  line-height: 1.35;
}

.entry-rail-item small,
.entry-note {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.entry-note {
  margin: 0;
}

.metric-grid,
.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card,
.list-card,
.panel,
.credential-card,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 18px;
  background: rgba(255, 251, 246, 0.92);
}

.metric-card span,
.metric-card small {
  display: block;
}

.metric-card span {
  font-size: 0.88rem;
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 1.55rem;
  color: #321824;
}

.metric-card small {
  font-size: 0.88rem;
  color: var(--muted);
}

.two-up {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.panel {
  padding: 22px;
  margin-bottom: 24px;
}

.section-anchor {
  scroll-margin-top: 110px;
}

.panel-head,
.list-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.panel-head h2,
.list-card-head h3 {
  margin: 0 0 8px;
}

.panel-head p,
.list-card-head p {
  margin: 0;
}

.list-card {
  padding: 20px;
}

.queue-card-target {
  scroll-margin-top: 120px;
}

.queue-card-target:target {
  border-color: rgba(177, 78, 63, 0.48);
  box-shadow: 0 0 0 3px rgba(177, 78, 63, 0.12), var(--shadow);
}

.stack {
  display: grid;
  gap: 16px;
}

.surface-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.88fr);
  gap: 18px;
  margin-bottom: 24px;
}

.journey-panel {
  display: grid;
  gap: 18px;
}

.progress-meter {
  display: grid;
  gap: 12px;
}

.progress-meter-track {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(38, 21, 29, 0.08);
  overflow: hidden;
}

.progress-meter-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(186, 97, 71, 0.88), rgba(102, 113, 84, 0.88));
}

.progress-meter-copy {
  display: grid;
  gap: 4px;
}

.progress-meter-copy strong {
  color: #321824;
  font-size: 0.98rem;
}

.progress-meter-copy span {
  color: var(--muted);
  font-size: 0.9rem;
}

.journey-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.journey-chip {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(227, 214, 201, 0.94);
  background: rgba(255, 253, 249, 0.94);
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.journey-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(186, 97, 71, 0.24);
  box-shadow: 0 14px 32px rgba(38, 21, 29, 0.08);
}

.journey-chip.is-current {
  border-color: rgba(186, 97, 71, 0.36);
  box-shadow: 0 0 0 3px rgba(186, 97, 71, 0.08);
}

.journey-chip-index {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.journey-chip strong {
  color: #321824;
  font-size: 0.98rem;
}

.journey-chip small {
  color: var(--muted);
  font-size: 0.84rem;
}

.journey-focus-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 16px;
  align-items: start;
}

.journey-context-grid {
  display: grid;
  gap: 12px;
}

.journey-context-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(227, 214, 201, 0.88);
  background: rgba(255, 253, 249, 0.88);
}

.journey-context-card span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.journey-context-card strong {
  color: #321824;
  font-size: 0.96rem;
}

.journey-context-card small {
  color: var(--muted);
  font-size: 0.84rem;
}

.journey-list {
  display: grid;
  gap: 12px;
}

.journey-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid rgba(227, 214, 201, 0.88);
}

.journey-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.journey-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: rgba(186, 97, 71, 0.1);
  color: var(--accent-dark);
  font-size: 0.88rem;
  font-weight: 800;
}

.journey-copy {
  display: grid;
  gap: 8px;
}

.journey-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.journey-head strong,
.signal-card strong,
.lane-card strong {
  color: #321824;
}

.journey-copy p,
.signal-card small,
.lane-card small {
  margin: 0;
}

.text-link {
  color: var(--accent-dark);
  font-size: 0.92rem;
  font-weight: 700;
}

.signal-grid,
.lane-grid {
  display: grid;
  gap: 14px;
}

.start-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.signal-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lane-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.signal-card,
.lane-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(227, 214, 201, 0.92);
  background: rgba(255, 253, 249, 0.9);
}

.path-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(227, 214, 201, 0.92);
  background: rgba(255, 253, 249, 0.94);
  box-shadow: 0 12px 26px rgba(38, 21, 29, 0.04);
}

.path-card .action-row {
  margin-top: auto;
}

.path-card-primary {
  border-color: rgba(186, 97, 71, 0.24);
  background: linear-gradient(180deg, rgba(255, 248, 244, 0.98), rgba(255, 253, 249, 0.94));
  box-shadow: 0 18px 38px rgba(186, 97, 71, 0.08);
}

.signal-card span,
.lane-card span,
.path-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.signal-card strong,
.path-card strong {
  font-size: 1rem;
}

.signal-card small,
.lane-card small,
.path-card small {
  color: var(--muted);
  font-size: 0.86rem;
}

.lane-card {
  gap: 6px;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.lane-card:hover {
  transform: translateY(-1px);
  border-color: rgba(186, 97, 71, 0.24);
  box-shadow: 0 14px 32px rgba(38, 21, 29, 0.08);
}

.surface-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.operator-command-grid {
  align-items: start;
}

.operator-unlock-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.operator-unlock-item,
.operator-ready-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(227, 214, 201, 0.88);
}

.operator-unlock-item:first-child,
.operator-ready-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.operator-unlock-item strong,
.operator-ready-item strong {
  display: block;
  margin-bottom: 4px;
  color: #321824;
}

.operator-unlock-item p,
.operator-ready-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.bullet-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.bullet-list li + li {
  margin-top: 8px;
}

.step-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.step-list li + li {
  margin-top: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.button-primary {
  background: var(--accent-dark);
  color: #fffefc;
}

.button-primary:hover {
  background: #743326;
}

.button-secondary {
  background: var(--surface-strong);
  color: var(--ink);
  border-color: rgba(34, 28, 30, 0.14);
}

.form-stack,
.form-grid {
  display: grid;
  gap: 16px;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-draft-assistant {
  display: grid;
  gap: 18px;
  margin: 20px 0 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.profile-draft-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.profile-draft-head h3 {
  margin: 5px 0 6px;
  font-size: 1.35rem;
}

.profile-draft-head p,
.profile-draft-section p,
.profile-gap-list p,
.profile-draft-ready p,
.profile-draft-boundary {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.profile-draft-state {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(177, 78, 63, 0.18);
  border-radius: 999px;
  background: rgba(177, 78, 63, 0.08);
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 800;
}

.profile-draft-state.is-ready {
  border-color: rgba(94, 112, 80, 0.22);
  background: rgba(94, 112, 80, 0.1);
  color: #46583a;
}

.profile-draft-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(220px, 0.92fr);
  gap: 24px;
}

.profile-draft-preview,
.profile-draft-guidance {
  min-width: 0;
}

.profile-draft-section {
  padding: 12px 0;
  border-top: 1px solid rgba(227, 214, 201, 0.78);
}

.profile-draft-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.profile-draft-section span {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-draft-section p {
  overflow-wrap: anywhere;
}

.profile-gap-list {
  display: grid;
  gap: 14px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.profile-gap-list li {
  padding-top: 14px;
  border-top: 1px solid rgba(227, 214, 201, 0.78);
}

.profile-gap-list li:first-child {
  padding-top: 0;
  border-top: 0;
}

.profile-gap-list strong,
.profile-draft-ready strong {
  display: block;
  margin-bottom: 4px;
}

.profile-gap-action {
  min-height: 34px;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}

.profile-gap-action:hover {
  text-decoration: underline;
}

.profile-draft-ready {
  margin-top: 10px;
}

.profile-draft-boundary {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(227, 214, 201, 0.78);
  font-size: 0.82rem;
}

.field-help {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.45;
}

.compact-grid {
  margin-top: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(34, 28, 30, 0.14);
  border-radius: 12px;
  background: #fffdfa;
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
}

.full-span {
  grid-column: 1 / -1;
}

.form-foot {
  display: grid;
  gap: 12px;
}

.consent-stack {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--line);
  background: var(--surface-muted);
}

.consent-row {
  display: grid;
  grid-template-columns: 1.15rem minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
  font-weight: 500;
  line-height: 1.5;
}

.consent-row input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.2rem;
}

.consent-row a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.detail-list div {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 253, 249, 0.85);
  border: 1px solid rgba(232, 216, 203, 0.85);
}

.detail-list dt {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
}

.detail-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
}

.pill-success {
  background: rgba(102, 113, 84, 0.12);
  color: #49533c;
}

.pill-info {
  background: rgba(177, 78, 63, 0.11);
  color: var(--accent-dark);
}

.pill-warn {
  background: rgba(255, 204, 128, 0.26);
  color: #805116;
}

.pill-danger {
  background: rgba(177, 78, 63, 0.16);
  color: #7d2d24;
}

.pill-neutral {
  background: rgba(34, 28, 30, 0.07);
  color: var(--muted);
}

.notice {
  padding: 14px 16px;
  border-radius: 16px;
  margin-bottom: 20px;
  font-weight: 600;
}

.notice-success {
  background: rgba(102, 113, 84, 0.12);
  border: 1px solid rgba(102, 113, 84, 0.18);
  color: #48513c;
}

.notice-error {
  background: rgba(177, 78, 63, 0.12);
  border: 1px solid rgba(177, 78, 63, 0.18);
  color: #7c3026;
}

.callout {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--rose-soft);
}

.callout.warn {
  background: rgba(244, 214, 154, 0.35);
  border: 1px solid rgba(190, 134, 34, 0.22);
}

.callout.danger {
  background: rgba(227, 130, 112, 0.14);
  border: 1px solid rgba(177, 78, 63, 0.22);
}

.callout.subtle {
  background: rgba(231, 235, 223, 0.75);
}

.callout strong {
  display: block;
  margin-bottom: 6px;
}

.operator-trust-grid {
  margin-top: 16px;
  margin-bottom: 0;
}

.trust-note {
  margin: 12px 0 0;
  font-size: 0.92rem;
}

.trust-note-muted {
  color: var(--muted);
}

.credential-stack {
  display: grid;
  gap: 14px;
}

.credential-card {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.credential-card span {
  font-size: 0.85rem;
  color: var(--muted);
}

.checkbox-row {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.checkbox-row input {
  width: auto;
}

.empty-state {
  padding: 22px;
  text-align: center;
}

.activity-timeline {
  display: grid;
  gap: 14px;
}

.activity-item {
  display: grid;
  gap: 10px;
  padding: 16px 0 0 18px;
  border-top: 1px solid rgba(34, 28, 30, 0.08);
  border-left: 3px solid rgba(177, 78, 63, 0.16);
}

.activity-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.activity-head,
.activity-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.activity-item strong,
.activity-item p {
  margin: 0;
}

.activity-head small,
.activity-meta span {
  color: var(--muted);
  font-size: 0.88rem;
}

.activity-link {
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 700;
}

.message-stack {
  display: grid;
  gap: 14px;
}

.message-bubble {
  max-width: min(100%, 720px);
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.message-self {
  justify-self: end;
  background: rgba(244, 225, 219, 0.72);
}

.message-other {
  justify-self: start;
  background: rgba(231, 235, 223, 0.62);
}

.message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.message-bubble p,
.message-bubble small {
  margin: 0;
}

@media (max-width: 960px) {
  .journey-chip-grid,
  .journey-focus-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .journey-chip-grid {
    grid-template-columns: 1fr;
  }

  .journey-chip,
  .journey-context-card {
    padding: 12px;
  }
}

.message-bubble small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

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

@media (max-width: 980px) {
  .topbar,
  .preview-strip,
  .hero-card,
  .surface-grid,
  .two-up,
  .metric-grid,
  .overview-grid,
  .signal-grid,
  .hero-proof-grid,
  .start-grid,
  .lane-grid,
  .form-grid,
  .detail-list {
    grid-template-columns: 1fr;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    justify-items: stretch;
  }

  .topnav,
  .session-block {
    display: none;
  }

  .mobile-menu {
    display: block;
    justify-self: end;
  }

  .hero-card {
    align-items: start;
  }

  .hero-card.hero-entry {
    grid-template-columns: 1fr;
  }

  .hero-side {
    width: 100%;
  }

  .profile-draft-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page {
    width: min(calc(100% - 24px), var(--max));
  }

  .topbar {
    padding: 16px 12px;
    gap: 14px;
  }

  .brand {
    font-size: 1.35rem;
  }

  .profile-draft-head {
    display: grid;
  }

  .profile-draft-state {
    justify-self: start;
  }

  .brand-subtitle {
    font-size: 0.78rem;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 50%;
  }

  .mobile-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    width: min(320px, calc(100vw - 24px));
    margin-top: 0;
    z-index: 30;
  }

  .hero-card,
  .panel,
  .list-card,
  .metric-card {
    padding: 18px;
  }

  .page-guest .hero-card.hero-compact {
    padding: 16px;
    gap: 14px;
  }

  .page-guest .hero-card.hero-compact h1 {
    font-size: clamp(1.85rem, 11vw, 2.45rem);
    max-width: 9ch;
  }

  .page-guest .hero-card.hero-compact p {
    font-size: 0.94rem;
  }

  .page-guest .hero-card.hero-compact .hero-side-card {
    padding: 14px;
    gap: 10px;
  }

  .hero-detail {
    margin-top: 16px;
  }

  .hero-proof-card {
    padding: 12px 14px;
  }

  .preview-strip {
    gap: 12px;
    padding: 14px;
  }

  .preview-strip-compact {
    gap: 10px;
    padding: 12px 14px;
  }

  .preview-strip p {
    font-size: 0.88rem;
  }

  .preview-gate-grid {
    grid-template-columns: 1fr;
  }

  .preview-gate-details {
    padding: 10px 12px;
  }

  .preview-badge {
    font-size: 0.76rem;
    white-space: normal;
    line-height: 1.35;
  }

  .journey-item {
    grid-template-columns: 1fr;
  }

  .journey-step {
    width: 28px;
    height: 28px;
  }

  .hero-actions,
  .action-row,
  .panel-actions {
    flex-wrap: wrap;
    width: 100%;
  }

  .hero-actions .button,
  .action-row .button,
  .panel-actions .button,
  .hero-actions form,
  .action-row form,
  .panel-actions form {
    flex: 1 1 100%;
    width: 100%;
  }
}

/* Keep the guest-home composition ahead of the shared hero defaults. */
.hero-card.hero-compact.hero-entry.guest-home-hero {
  grid-template-columns: minmax(0, 1.02fr) minmax(380px, 0.98fr);
  align-items: center;
  gap: 34px;
  padding: 30px;
  background: linear-gradient(140deg, rgba(255, 253, 249, 0.98), rgba(244, 225, 219, 0.72));
}

.page-guest .hero-card.hero-compact.guest-home-hero h1 {
  max-width: 12ch;
  font-size: 3rem;
  line-height: 1.02;
}

@media (max-width: 980px) {
  .hero-card.hero-compact.hero-entry.guest-home-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero-card.hero-compact.hero-entry.guest-home-hero {
    gap: 16px;
    padding: 16px;
  }

  .page-guest .hero-card.hero-compact.guest-home-hero h1 {
    max-width: 12ch;
    font-size: 2.25rem;
  }
}

