/* ghostwrit.in. Ported from the Claude Design file `Ghostwritin Landing.dc.html`.
   Tokens first; everything below reads them. Paper page, one ink footer. */

:root {
  --paper: oklch(0.975 0.005 235);
  --paper-2: oklch(0.955 0.008 235);
  --card: oklch(0.995 0.002 235);
  --ink: oklch(0.25 0.015 250);
  --ink-hover: oklch(0.35 0.02 250);
  --body: oklch(0.42 0.015 250);
  --mute: oklch(0.45 0.015 250);
  --deep: oklch(0.35 0.015 250);
  --line: oklch(0.89 0.008 240);
  --line-soft: oklch(0.92 0.006 240);
  --rule: oklch(0.86 0.01 240);
  --blue: oklch(0.47 0.11 235);
  --blue-hover: oklch(0.40 0.11 235);
  --sky: oklch(0.86 0.07 218);
  --red: oklch(0.53 0.19 27);
  --green: oklch(0.50 0.11 160);
  --night: oklch(0.23 0.015 250);
  --night-2: oklch(0.27 0.015 250);
  --night-line: oklch(0.35 0.015 250);
  --night-text: oklch(0.93 0.01 235);

  --serif: 'Newsreader', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --pad: clamp(20px, 5vw, 64px);
}

html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--serif); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
* { box-sizing: border-box; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, p { margin: 0; }
summary::-webkit-details-marker { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 10; padding: 12px 16px; background: var(--ink); color: var(--paper); font-size: 16px; text-decoration: none; border-radius: 6px; }
.skip:focus { top: 16px; color: var(--paper); }
.wrap { max-width: 1320px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.section { border-top: 1px solid var(--line); }
.section > .wrap { padding-top: clamp(64px, 8vw, 120px); padding-bottom: clamp(64px, 8vw, 120px); }
.h2 { font-size: clamp(36px, 4vw, 56px); line-height: 1; letter-spacing: -0.025em; font-weight: 500; }
.lede { font-size: 20px; line-height: 1.5; color: var(--body); text-wrap: pretty; }
.chip { display: inline-flex; align-items: center; gap: 6px; font: 500 12.5px var(--mono); letter-spacing: .01em; color: var(--deep); border: 1px solid var(--rule); background: var(--card); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.chip-soon { color: oklch(0.38 0.1 235); border-color: oklch(0.80 0.06 225); background: oklch(0.94 0.03 225); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 999px; font-size: 16px; font-weight: 500; text-decoration: none; white-space: nowrap; font-family: inherit; cursor: pointer; }
.btn-ink { background: var(--ink); color: var(--paper); border: 0; }
.btn-ink:hover { background: var(--ink-hover); color: var(--paper); }
.btn-blue { min-height: 52px; padding: 0 26px; font-size: 18px; background: var(--blue); color: oklch(0.99 0.003 235); border: 0; }
.btn-blue:hover { background: var(--blue-hover); color: oklch(0.99 0.003 235); }
.btn-line { border: 1px solid var(--ink); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--ink); color: var(--paper); }

/* Header */
.top { padding-top: 24px; padding-bottom: 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.brand img { width: 36px; height: 36px; display: block; }
.brand:hover { color: var(--ink); }
.top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; font-size: 17px; order: 3; flex: 1 1 auto; justify-content: flex-end; }
.top nav a { color: var(--ink); text-decoration: none; padding: 10px 0; }
.top nav a:hover { text-decoration: underline; }
.top .btn { order: 4; }
@media (max-width: 640px) { .top nav { order: 5; flex-basis: 100%; justify-content: flex-start; } }

/* Hero */
.hero { padding-top: clamp(40px, 7vw, 96px); padding-bottom: clamp(72px, 10vw, 140px); display: flex; flex-wrap: wrap; gap: 56px 64px; align-items: flex-start; }
.hero-copy { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.hero h1 { font-size: clamp(40px, 6.2vw, 96px); line-height: 0.95; letter-spacing: -0.035em; font-weight: 500; }
.hero h1 span { white-space: nowrap; }
.hero-sub { max-width: 30ch; font-size: clamp(20px, 1.8vw, 24px); line-height: 1.45; color: var(--body); text-wrap: pretty; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.hero .actions .gh { display: inline-flex; align-items: center; min-height: 52px; font-size: 18px; color: var(--ink); }
.hero-note { font-size: 16px; color: var(--mute); }

.demo { flex: 1 1 440px; min-width: 0; margin: clamp(0px, 6vw, 96px) 0 0; display: flex; flex-direction: column; gap: 14px; }
.sheet { background: var(--card); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 1px 0 var(--line), 0 24px 48px -28px oklch(0.25 0.03 250 / 0.25); overflow: hidden; }
.sheet-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 14px 22px; border-bottom: 1px solid var(--line-soft); font-size: 15px; color: var(--mute); }
.sheet-bar span:last-child { font-variant-numeric: tabular-nums; }
.stage { position: relative; display: grid; padding: 28px 26px 30px; font-size: clamp(19px, 1.7vw, 22px); line-height: 1.6; }
.stage p { grid-area: 1 / 1; }
.stage .before { clip-path: inset(0 0 0 100%); }
.stage .after { clip-path: inset(0 0 0 0); }
.flag { text-decoration: underline wavy var(--red); text-decoration-thickness: 1.5px; text-underline-offset: 5px; background: oklch(0.53 0.19 27 / 0.07); }
.sweep { position: absolute; top: 0; bottom: 0; width: 72px; margin-left: -36px; left: 100%; opacity: 0; background: linear-gradient(90deg, oklch(0.86 0.07 218 / 0), oklch(0.86 0.07 218 / 0.55), oklch(0.86 0.07 218 / 0)); mix-blend-mode: multiply; pointer-events: none; }
.stage.static { display: flex; flex-direction: column; gap: 18px; padding: 24px 26px 28px; }
.stage.static p { grid-area: auto; }
.stage.static .before, .stage.static .after { clip-path: none; }
.stage.static .label { display: block; margin: 0 0 4px; font-size: 15px; color: var(--mute); line-height: 1.4; }
.stage.static .after { border-top: 1px solid var(--line-soft); padding-top: 16px; }
.stage .label { display: none; }
.sheet-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 20px; padding: 16px 22px; border-top: 1px solid var(--line-soft); background: var(--paper); }
.score { display: flex; align-items: baseline; gap: 10px; }
.score b { font-size: 36px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--green); transition: color 400ms; }
.score span { font-size: 16px; color: var(--deep); }
.replay { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid oklch(0.80 0.01 240); background: transparent; color: var(--ink); font: inherit; font-size: 16px; cursor: pointer; }
.replay:hover { border-color: var(--blue); color: var(--blue); }
.demo figcaption { font-size: 15px; line-height: 1.5; color: var(--mute); max-width: 52ch; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }

/* How */
.how > .wrap { display: flex; flex-wrap: wrap; gap: 40px 64px; }
.how .h2 { flex: 1 1 280px; }
.steps { flex: 3 1 640px; min-width: 0; margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; }
.steps li { display: flex; flex-direction: column; gap: 12px; }
.steps .n { font-size: 56px; line-height: 1; font-style: italic; font-weight: 300; color: var(--blue); }
.steps h3 { font-size: 24px; font-weight: 500; letter-spacing: -0.01em; }
.steps p { font-size: 18px; line-height: 1.55; color: var(--body); text-wrap: pretty; }

/* Surfaces */
.surfaces { background: var(--paper-2); }
.surfaces > .wrap { display: flex; flex-direction: column; gap: 48px; }
.surfaces .intro { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.surface { display: flex; flex-wrap: wrap; gap: 16px 48px; padding: 32px 0; border-top: 1px solid var(--rule); }
.surface > div:first-child { flex: 1 1 300px; min-width: 0; }
.surface h3 { margin: 0 0 8px; font-size: 26px; font-weight: 500; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.surface p { font-size: 18px; line-height: 1.5; color: var(--body); max-width: 40ch; }
.surface .code { flex: 2 1 520px; min-width: 0; position: relative; background: var(--night); border-radius: 6px; }
.surface .web { flex: 2 1 520px; min-width: 0; display: flex; align-items: center; font-size: 20px; color: var(--body); }
.surface pre { margin: 0; padding: 22px 120px 22px 22px; overflow-x: auto; font-family: var(--mono); font-size: 14.5px; line-height: 1.7; color: var(--night-text); scrollbar-width: thin; scrollbar-color: var(--night-line) transparent; }
.surface pre .c { color: oklch(0.70 0.02 240); }
.copy { position: absolute; top: 10px; right: 10px; min-height: 44px; min-width: 84px; padding: 0 14px; border-radius: 999px; border: 1px solid oklch(0.40 0.02 250); background: var(--night-2); color: var(--night-text); font: inherit; font-size: 15px; cursor: pointer; }
.copy:hover { border-color: var(--sky); }

/* Proof */
.proof > .wrap { display: flex; flex-wrap: wrap; gap: 48px 64px; }
.proof .side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.proof .side p { font-size: 19px; line-height: 1.55; color: var(--body); max-width: 36ch; text-wrap: pretty; }
.legend { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 17px; }
.legend li { display: flex; align-items: center; gap: 12px; }
.legend li span { color: var(--body); }
del { color: var(--red); text-decoration-thickness: 1.5px; }
ins { text-decoration: none; background: oklch(0.86 0.07 218 / 0.45); border-bottom: 2px solid var(--blue); padding: 0 1px; }
mark { background: transparent; color: inherit; outline: 1px dashed var(--mute); outline-offset: 1px; padding: 0 2px; }
.paper { flex: 2 1 560px; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 6px; }
.paper-head { display: flex; justify-content: flex-end; padding: 14px clamp(24px, 3.5vw, 44px) 0; }
.paper > p { padding: clamp(16px, 2.5vw, 28px) clamp(24px, 3.5vw, 44px) clamp(24px, 3.5vw, 44px); font-size: clamp(19px, 1.8vw, 23px); line-height: 1.75; max-width: 62ch; text-wrap: pretty; }
.stats { display: flex; flex-wrap: wrap; gap: 16px 40px; padding: 20px clamp(24px, 3.5vw, 44px); border-top: 1px solid var(--line-soft); font-size: 16px; color: var(--deep); }
.stats div { display: flex; align-items: baseline; gap: 8px; }
.stats b { font-size: 28px; font-weight: 500; font-variant-numeric: tabular-nums; }
.stats .r { color: var(--red); }
.stats .g { color: var(--green); }

/* Tech */
.tech > .wrap { display: flex; flex-wrap: wrap; gap: 48px 64px; }
.tech .side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.tech .side p { font-size: 19px; line-height: 1.55; color: var(--body); max-width: 38ch; text-wrap: pretty; }
.layers { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.layer { border-top: 1px solid var(--rule); padding-top: 18px; }
.layer h3 { font-size: 24px; font-weight: 500; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.layer ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 32px; }
.layer li { display: flex; flex-direction: column; gap: 4px; }
.layer b { font-weight: 600; font-size: 17px; }
.layer li span { font-size: 16.5px; line-height: 1.5; color: var(--body); }
.layer code { font-family: var(--mono); font-size: .88em; }

/* Privacy */
.privacy > .wrap { display: flex; flex-wrap: wrap; gap: 48px 64px; }
.privacy .side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.privacy .side p { font-size: 19px; line-height: 1.55; color: var(--body); max-width: 36ch; text-wrap: pretty; }
.privacy .side a { font-size: 18px; }
.rules { flex: 2 1 560px; min-width: 0; margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px 40px; }
.rules li { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--rule); padding-top: 18px; }
.rules h3 { font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
.rules p { font-size: 17px; line-height: 1.55; color: var(--body); text-wrap: pretty; }

/* Policy page */
.policy { padding-top: clamp(32px, 5vw, 72px); padding-bottom: clamp(72px, 10vw, 140px); max-width: calc(68ch + 2 * var(--pad)); }
.policy h1 { font-size: clamp(40px, 5vw, 72px); line-height: .95; letter-spacing: -0.035em; font-weight: 500; margin-bottom: 16px; }
.policy h2 { font-size: 28px; font-weight: 500; letter-spacing: -0.015em; margin: 44px 0 12px; }
.policy p, .policy li { font-size: 19px; line-height: 1.6; color: var(--deep); text-wrap: pretty; }
.policy p + p { margin-top: 12px; }
.policy ul { margin: 12px 0 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 8px; }
.policy .meta { font-size: 16px; color: var(--mute); }

/* Pricing */
.pricing > .wrap { display: flex; flex-direction: column; gap: 40px; }
.pricing .head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 48px; }
.pricing .head p { font-size: 18px; color: var(--body); max-width: 44ch; }
.plans { display: flex; flex-direction: column; border-bottom: 1px solid var(--rule); }
.plan { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 40px; padding: 28px 0; border-top: 1px solid var(--rule); }
.plan h3 { flex: 0 0 140px; font-size: 28px; font-weight: 500; }
.plan .price { flex: 0 0 200px; font-size: 28px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.plan .price span { font-size: 17px; color: var(--mute); }
.plan .inc { flex: 1 1 260px; font-size: 18px; line-height: 1.5; color: var(--deep); }

/* FAQ */
.faq > .wrap { display: flex; flex-wrap: wrap; gap: 32px 64px; }
.faq .h2 { flex: 1 1 280px; }
.faq-list { flex: 3 1 600px; min-width: 0; border-bottom: 1px solid var(--rule); }
.faq details { border-top: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 44px; padding: 22px 0; font-size: 22px; font-weight: 500; }
.faq summary span { font-size: 26px; font-weight: 300; color: var(--blue); transition: transform 200ms; }
.faq details[open] summary span { transform: rotate(45deg); }
.faq details p { margin: 0 0 26px; max-width: 62ch; font-size: 18px; line-height: 1.65; color: var(--deep); text-wrap: pretty; }

/* Footer / waitlist */
.foot { background: var(--night); color: var(--night-text); }
.foot > .wrap { padding-top: clamp(72px, 9vw, 128px); padding-bottom: 40px; display: flex; flex-direction: column; gap: 72px; }
.foot .ask { display: flex; flex-wrap: wrap; gap: 32px 64px; align-items: flex-end; }
.foot .ask > div { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.foot h2 { font-size: clamp(44px, 6vw, 88px); line-height: 0.95; letter-spacing: -0.03em; font-weight: 500; }
.foot .ask p { font-size: 19px; line-height: 1.5; color: oklch(0.80 0.012 240); max-width: 40ch; }
.foot form { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.foot label { font-size: 16px; color: oklch(0.85 0.01 240); }
.foot .row { display: flex; flex-wrap: wrap; gap: 10px; }
.foot input { flex: 1 1 240px; min-width: 0; min-height: 52px; padding: 0 18px; border-radius: 999px; border: 1px solid oklch(0.45 0.02 250); background: var(--night-2); color: oklch(0.97 0.005 235); font: inherit; font-size: 18px; }
.foot input[aria-invalid="true"] { border-color: oklch(0.78 0.12 27); }
.foot button { min-height: 52px; padding: 0 24px; border-radius: 999px; border: 0; background: var(--sky); color: var(--night); font: inherit; font-size: 18px; font-weight: 500; cursor: pointer; }
.foot button:hover { background: oklch(0.91 0.05 218); }
.foot .msg { margin: 0; min-height: 24px; font-size: 16px; color: var(--sky); }
.foot .msg.err { color: oklch(0.78 0.12 27); }
.foot .msg a { color: var(--sky); }
.foot .base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; padding-top: 28px; border-top: 1px solid var(--night-line); font-size: 16px; color: oklch(0.78 0.012 240); }
.foot .base nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot .base a { color: var(--sky); }
.foot .base a:hover { color: var(--night-text); }

/* 404 */
.lost { padding-top: clamp(64px, 10vw, 140px); padding-bottom: clamp(96px, 14vw, 200px); display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.lost h1 { font-size: clamp(44px, 7vw, 96px); line-height: .95; letter-spacing: -0.035em; font-weight: 500; }
.lost p { font-size: 20px; color: var(--body); max-width: 36ch; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
