:root,
:root[data-theme="light"] {
  color-scheme: light;
  --paper: #F4EAD3;
  --surface: #FFFBF0;
  --ink: #1F1A17;
  --muted: #5B4F45;
  --line: #1F1A17;
  --red: #B3261E;
  --on-red: #FFFBF0;
  --navy: #1E3A5F;
  --mustard: #E0A526;
  --teal: #2B7A78;
  --green: #39FF88;
  --term: #0B0F0C;
  --dot: rgba(31, 26, 23, .14);
  --shadow: #1F1A17;
  --focus: #B3261E;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #14110F;
  --surface: #1E1915;
  --ink: #F4EAD3;
  --muted: #B8A998;
  --line: #F4EAD3;
  --red: #E5534B;
  --on-red: #14110F;
  --navy: #8DB4E2;
  --mustard: #E8B83E;
  --teal: #5CC2BD;
  --green: #39FF88;
  --term: #0B0F0C;
  --dot: rgba(244, 234, 211, .10);
  --shadow: #000;
  --focus: #E8B83E;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    color-scheme: dark;
    --paper: #14110F;
    --surface: #1E1915;
    --ink: #F4EAD3;
    --muted: #B8A998;
    --line: #F4EAD3;
    --red: #E5534B;
    --on-red: #14110F;
    --navy: #8DB4E2;
    --mustard: #E8B83E;
    --teal: #5CC2BD;
    --green: #39FF88;
    --term: #0B0F0C;
    --dot: rgba(244, 234, 211, .10);
    --shadow: #000;
    --focus: #E8B83E;
  }
}

html,
body {
  color: var(--ink);
  background-color: var(--paper);
}

body {
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.4px);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.page {
  max-width: 1280px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 64px;
  padding: 8px 0;
  border-bottom: 3px solid var(--line);
  background: var(--paper);
}

.mobile-join {
  display: none;
}

.nav-toggle {
  display: none;
}

.brand-mark {
  color: var(--on-red);
}

.nav {
  gap: 18px;
}

.nav > .theme-control {
  display: none;
}

.nav-login,
.nav-join {
  min-height: 44px;
  padding: 8px 14px;
  border: 3px solid var(--line);
  box-shadow: 4px 4px 0 var(--shadow);
}

.nav-join,
.button-x,
.button-red {
  background: var(--red);
  color: var(--on-red);
}

.save-request,
.chat-ui button:not(.option-list button),
.compose-row button {
  color: var(--on-red);
}

.hero {
  align-items: center;
  margin-top: 56px;
}

.hero h1 {
  max-width: 660px;
  font-size: clamp(54px, 7vw, 84px);
}

.hero-lead,
.micro,
.live-profiles-lead,
.progress-caption {
  color: var(--muted);
}

.auth-actions {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 52px;
  padding: 10px 18px;
}

.button-x,
.button-google,
.nav-login,
.nav-join {
  box-shadow: 4px 4px 0 var(--shadow);
}

.chat {
  overflow: hidden;
  border-color: var(--line);
  background: var(--surface);
  box-shadow: 6px 6px 0 var(--shadow);
}

.chat-head {
  background: var(--teal);
  color: var(--paper);
}

.scripted-chat {
  padding: 18px;
}

.scripted-bubble {
  max-width: 92%;
  margin: 10px 0;
  padding: 12px 14px;
  border: 2px solid var(--line);
  background: var(--paper);
  line-height: 1.55;
}

.scripted-bubble.user {
  margin-left: auto;
  background: var(--ink);
  color: var(--paper);
}

.scripted-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.scripted-chips button {
  min-height: 44px;
  padding: 8px 12px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.scripted-chips button:hover {
  background: var(--mustard);
  color: #1F1A17;
}

.scripted-chat-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.scripted-chat-foot a {
  color: var(--teal);
}

.progress-strip {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 6px 28px;
  align-items: center;
  margin-top: 64px;
  padding: 24px 28px;
  border: 2px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
}

.progress-label {
  grid-column: 1;
  color: var(--teal);
}

.progress-number {
  grid-column: 1;
  margin: 0;
  font-size: 42px;
}

.progress-number span {
  color: var(--muted);
  font: 700 20px var(--mono);
}

.progress-bar {
  grid-column: 2;
  grid-row: 1;
  height: 14px;
  border: 0;
  border-radius: 20px;
  background: var(--paper);
}

.progress-fill {
  min-width: 0;
  border-radius: 20px;
  background: var(--red);
}

.progress-caption {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
}

.live-profile-card,
.sample,
.step,
.founding-card,
.faq details {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: 4px 4px 0 var(--shadow);
}

.live-profile-summary {
  color: var(--ink);
}

.live-profile-skills span {
  border-color: var(--line);
  background: var(--paper);
  color: var(--ink);
}

.plain-profile,
.how,
.content-section {
  margin-top: 72px;
}

.content-section h2 {
  font: 900 clamp(32px, 5vw, 48px)/1.08 var(--display);
}

.content-section > p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.7;
}

.step {
  border-width: 2px;
}

.trust-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 28px;
  padding-left: 22px;
}

.trust-list li {
  padding: 8px 0;
}

.faq details {
  margin: 10px 0;
  padding: 14px;
  border: 2px solid var(--line);
}

.faq summary {
  min-height: 32px;
  cursor: pointer;
  font-weight: 700;
}

.founding-card {
  padding: 24px;
  border: 2px solid var(--line);
}

.final-cta {
  margin-top: 72px;
  padding: 32px;
  border: 3px solid var(--line);
  background: var(--navy);
  color: var(--paper);
  box-shadow: 6px 6px 0 var(--shadow);
}

.final-cta p {
  color: var(--paper);
}

.site-footer {
  margin-top: 72px;
  padding: 28px 0;
  border-top: 3px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.footer-col a {
  min-height: 32px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--muted);
  color: var(--muted);
  font-size: 12px;
}

.theme-control {
  display: flex;
  align-items: center;
  gap: 4px;
}

.theme-control button {
  min-height: 44px;
  padding: 6px 9px;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
}

.theme-control button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.theme-status {
  min-height: 20px;
  color: var(--red);
  font-size: 12px;
}

.signed-footer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--muted);
}

.signed-footer .theme-control {
  flex-wrap: wrap;
}

.account-menu .theme-control {
  flex-wrap: wrap;
  gap: 2px;
  padding: 6px 4px;
  border-top: 1px solid var(--muted);
}

.account-menu .theme-control button {
  flex: 1;
  padding: 4px;
}

@media (max-width: 700px) {
  .topbar {
    flex-wrap: nowrap;
    gap: 8px;
    margin-inline: -16px;
    padding: 8px 16px;
  }

  .brand {
    flex: 0 1 auto;
    gap: 7px;
    font-size: 20px;
    white-space: nowrap;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 20px;
  }

  .mobile-join {
    display: inline-flex;
    flex: 0 0 auto;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding: 6px 8px;
    border: 2px solid var(--line);
    background: var(--red);
    color: var(--on-red);
    font-weight: 700;
    font-size: 12px;
    text-decoration: none;
  }

  .nav-toggle {
    display: inline-grid;
    flex: 0 0 auto;
    width: auto;
    min-width: 60px;
    min-height: 44px;
    place-items: center;
    padding: 8px 10px;
    border: 2px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    font-weight: 700;
    white-space: nowrap;
  }

  .nav {
    position: absolute;
    top: calc(100% + 2px);
    right: 12px;
    left: 12px;
    z-index: 12;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border: 2px solid var(--line);
    background: var(--surface);
    box-shadow: 4px 4px 0 var(--shadow);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a,
  .nav a:not(.nav-login) {
    display: flex;
    min-height: 44px;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid var(--muted);
  }

  .nav .nav-login,
  .nav .nav-join {
    justify-content: center;
  }

  .nav .theme-control {
    display: flex;
    flex-wrap: wrap;
    margin-top: 6px;
  }

  .hero {
    margin-top: 36px;
  }

  .hero h1 {
    font-size: 52px;
  }

  .auth-actions {
    flex-direction: column;
  }

  .progress-strip {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 18px;
  }

  .progress-label,
  .progress-number,
  .progress-bar,
  .progress-caption {
    grid-column: 1;
    grid-row: auto;
  }

  .progress-number {
    font-size: 38px;
  }

  .progress-bar {
    height: 12px;
  }

  .trust-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

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