:root {
  color-scheme: light;
  --paper: #f6f0e7;
  --paper-soft: #fbf8f3;
  --ink: #1e1712;
  --muted: #695c52;
  --line: rgba(30, 23, 18, 0.12);
  --line-strong: rgba(30, 23, 18, 0.22);
  --accent: #aa3d1c;
  --accent-deep: #7c2610;
  --accent-soft: rgba(170, 61, 28, 0.12);
  --olive: #4d5b36;
  --olive-soft: rgba(77, 91, 54, 0.12);
  --panel: rgba(255, 251, 245, 0.82);
  --panel-strong: rgba(255, 252, 248, 0.94);
  --panel-solid: #fffdf9;
  --shadow-soft: 0 18px 50px rgba(33, 23, 14, 0.08);
  --shadow-card: 0 28px 80px rgba(33, 23, 14, 0.12);
  --radius-xl: 38px;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --max: 1220px;
  --narrow: 1080px;
  --legal: 980px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(170, 61, 28, 0.1), transparent 26%),
    radial-gradient(circle at 80% 16%, rgba(77, 91, 54, 0.09), transparent 22%),
    linear-gradient(180deg, #fdf9f4 0%, var(--paper) 46%, var(--paper-soft) 100%);
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-color: rgba(170, 61, 28, 0.5);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration: none;
}

h1,
h2,
h3,
p,
ul,
pre {
  margin-top: 0;
}

h1,
h2,
h3,
.site-brand strong,
.button,
.card-link {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

.site-frame {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
  padding: 22px 0 64px;
}

.site-frame.narrow {
  width: min(calc(100% - 32px), var(--narrow));
}

.site-frame.legal-width {
  width: min(calc(100% - 32px), var(--legal));
}

.site-nav {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
  padding: 12px 0 18px;
  border-bottom: 1px solid var(--line);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
}

.site-brand img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.site-brand strong {
  display: block;
  font-size: 1.12rem;
  letter-spacing: -0.03em;
}

.site-brand span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
}

.site-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  max-width: 60%;
}

.site-links a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.site-links a:hover {
  color: var(--ink);
}

.panel,
.card,
.status,
article,
.story-block,
.proof-copy,
.footer-card,
.redirect-card,
.auth-intro,
.auth-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.button,
.card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--ink);
  color: #fffaf4;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button:hover,
.card-link:hover {
  transform: translateY(-1px);
  background: #120d0a;
}

.button.secondary,
.card-link.secondary {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.button.secondary:hover,
.card-link.secondary:hover {
  background: rgba(30, 23, 18, 0.04);
}

.button:focus-visible,
.card-link:focus-visible,
.site-brand:focus-visible,
.site-links a:focus-visible {
  outline: 3px solid rgba(170, 61, 28, 0.24);
  outline-offset: 3px;
  border-radius: 14px;
}

.eyebrow,
.mini-pill,
.pill,
.tier-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 250, 243, 0.75);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hidden {
  display: none !important;
}

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

.home-page .hero {
  padding: 26px;
  border-radius: var(--radius-xl);
}

.home-page .hero-grid {
  display: grid;
  gap: 28px;
}

.home-page .hero-copy {
  max-width: 44rem;
}

.home-page h1 {
  margin: 18px 0 0;
  font-size: clamp(3.2rem, 8vw, 6.9rem);
  line-height: 0.9;
  letter-spacing: -0.08em;
  max-width: 8.8ch;
}

.home-page .hero-lede {
  margin-top: 18px;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.7;
}

.home-page .hero-actions,
.home-page .footer-actions,
.auth-page .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.home-page .hero-meta,
.legal-page .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.home-page .hero-visual {
  display: grid;
  gap: 14px;
}

.home-page .editorial-shot {
  border-radius: 26px;
  box-shadow: var(--shadow-card);
  background: transparent;
}

.home-page .editorial-shot img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.home-page .hero-stack {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
  align-items: start;
}

.home-page .section {
  margin-top: 18px;
  padding: 26px;
  border-radius: var(--radius-xl);
}

.home-page h2 {
  margin: 0;
  font-size: clamp(2.4rem, 5.2vw, 4.7rem);
  line-height: 0.94;
  letter-spacing: -0.07em;
  max-width: 11ch;
}

.home-page .section-lede {
  margin-top: 14px;
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.72;
}

.home-page .story-grid,
.home-page .proof-grid,
.home-page .plan-grid,
.home-page .footer-grid {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.home-page .story-block,
.home-page .proof-copy,
.home-page .plan-copy,
.home-page .footer-card {
  padding: 22px;
  border-radius: var(--radius-lg);
}

.home-page .story-block h3,
.home-page .proof-copy h3,
.home-page .plan-tier h3,
.home-page .footer-card h3 {
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.home-page .story-block p,
.home-page .proof-copy p,
.home-page .plan-copy p,
.home-page .plan-tier p,
.home-page .footer-card p {
  color: var(--muted);
}

.home-page .story-block p,
.home-page .proof-copy p,
.home-page .plan-copy p,
.home-page .footer-card p {
  margin-top: 12px;
  line-height: 1.7;
}

.home-page .story-points,
.home-page .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.home-page .story-points span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(30, 23, 18, 0.05);
  color: var(--muted);
  font-size: 0.9rem;
}

.home-page .chapter-grid {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.home-page .chapter {
  padding: 20px;
  border-top: 1px solid var(--line);
}

.home-page .chapter:first-child {
  border-top: 0;
  padding-top: 0;
}

.home-page .chapter-kicker {
  display: block;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-page .chapter h3 {
  margin-top: 12px;
  font-size: 1.8rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.home-page .chapter p {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.home-page .proof-frame {
  overflow: visible;
  border-radius: 26px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 250, 243, 0.72), rgba(243, 234, 224, 0.58));
  box-shadow: var(--shadow-card);
}

.home-page .proof-frame img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.home-page .proof-frame.tall {
  aspect-ratio: auto;
}

.home-page .proof-frame.wide {
  aspect-ratio: auto;
}

.home-page .proof-gallery {
  display: grid;
  gap: 16px;
}

.home-page .proof-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.home-page .plan-copy {
  padding: 0;
}

.home-page .plan-note {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 250, 243, 0.62);
  border: 1px solid var(--line);
}

.home-page .plan-note + .plan-note {
  margin-top: 16px;
}

.home-page .plan-tiers {
  display: grid;
  gap: 16px;
}

.home-page .plan-tier {
  padding: 22px;
  border-radius: var(--radius-lg);
}

.home-page .plan-tier.featured {
  background: linear-gradient(180deg, rgba(255, 248, 240, 0.95), rgba(249, 236, 228, 0.95));
  border: 1px solid rgba(170, 61, 28, 0.2);
}

.home-page .tier-metric {
  margin-top: 16px;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 2.7rem;
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.home-page .stat-note {
  margin-top: 8px;
  color: var(--muted);
}

.home-page .plan-tier ul {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.home-page .plan-tier li + li {
  margin-top: 8px;
}

.home-page .footer-card {
  min-height: 100%;
}

.home-page .footer-links a {
  color: var(--muted);
}

.auth-page .site-frame {
  width: min(calc(100% - 32px), 760px);
}

.auth-page .auth-stage {
  display: block;
}

.auth-page .card {
  padding: 26px;
  border-radius: var(--radius-xl);
  text-align: center;
}

.auth-page h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.auth-page .auth-subtitle,
.auth-page .lede {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.auth-page .status {
  margin-top: 20px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(30, 23, 18, 0.03);
}

.auth-page .status-label {
  display: block;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-page .status-copy {
  display: block;
  margin-top: 8px;
}

.auth-page .form {
  display: none;
  margin-top: 22px;
}

.auth-page .card[data-state="ready"] .form,
.auth-page .card[data-state="success"] .form,
.auth-page .card[data-state="error"] .form {
  display: grid;
  gap: 14px;
}

.auth-page .field {
  display: grid;
  gap: 8px;
}

.auth-page label {
  font-size: 0.94rem;
  font-weight: 700;
}

.auth-page input {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(255, 253, 249, 0.92);
  color: var(--ink);
  font: inherit;
}

.auth-page input:focus {
  outline: 3px solid rgba(170, 61, 28, 0.18);
  outline-offset: 2px;
  border-color: rgba(170, 61, 28, 0.3);
}

.auth-page .message {
  min-height: 24px;
}

.auth-page .message.error {
  color: #a12424;
}

.auth-page .message.success {
  color: #315c1d;
}

.auth-page .footer {
  margin-top: 18px;
  text-align: center;
}

.auth-page .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.legal-page .site-frame {
  width: min(calc(100% - 32px), var(--legal));
}

.legal-page .hero {
  padding: 26px;
  border-radius: var(--radius-xl);
  margin-bottom: 20px;
}

.legal-page h1,
.legal-page .page-title {
  margin: 18px 0 0;
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: -0.08em;
  max-width: 10ch;
}

.legal-page .lede,
.legal-page .version,
.legal-page .footer,
.legal-page article p,
.legal-page article li,
.legal-page .note {
  color: var(--muted);
}

.legal-page .lede,
.legal-page .version {
  margin-top: 16px;
  max-width: 42rem;
  line-height: 1.75;
}

.legal-page .meta {
  margin-top: 20px;
}

.legal-page .grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.legal-page article {
  padding: 24px;
  border-radius: var(--radius-lg);
}

.legal-page article h2 {
  font-size: 1.5rem;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.legal-page article h3 {
  margin: 18px 0 10px;
  font-size: 1rem;
  font-weight: 700;
}

.legal-page article p,
.legal-page article ul {
  margin-top: 12px;
  line-height: 1.75;
}

.legal-page article ul {
  padding-left: 20px;
}

.legal-page article li + li {
  margin-top: 8px;
}

.legal-page .callout {
  border-left: 4px solid rgba(170, 61, 28, 0.3);
  background: rgba(170, 61, 28, 0.05);
}

.legal-page .legal-copy {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.82;
}

.legal-page .footer {
  margin-top: 18px;
}

.legal-page .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.redirect-page .site-frame {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding-top: 0;
  padding-bottom: 0;
}

.redirect-page .redirect-card {
  width: min(100%, 720px);
  padding: 30px;
  border-radius: var(--radius-xl);
}

.redirect-page h1 {
  margin: 18px 0 0;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.redirect-page p {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.72;
}

.redirect-page {
  overflow: hidden;
}

@media (min-width: 860px) {
  .home-page .hero-grid,
  .home-page .proof-grid,
  .home-page .plan-grid,
  .home-page .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .home-page .story-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .home-page .proof-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-page .plan-tiers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-frame,
  .site-frame.narrow,
  .site-frame.legal-width {
    width: min(calc(100% - 18px), var(--max));
    padding-top: 16px;
  }

  .site-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .site-links {
    max-width: none;
    justify-content: flex-start;
  }

  .home-page .hero,
  .home-page .section,
  .auth-page .auth-intro,
  .auth-page .card,
  .legal-page .hero,
  .legal-page article,
  .redirect-page .redirect-card {
    padding: 22px;
    border-radius: 24px;
  }

  .home-page .hero-stack {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
