/* PlainSpeak site. The app's own light palette and type, so the page and the
   screenshots read as one product. One loud element: the live scan in the
   hero, whose highlights use the app's tell colours. Everything else quiet. */
@font-face { font-family: "Space Grotesk"; src: url("fonts/space-grotesk-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("fonts/space-grotesk-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --paper: #f5f1e8;
  --sheet: #fffdf7;
  --tint: #f0eadd;
  --rule: #ddd3c0;
  --ink: #2c271f;
  --muted: #6b6255;
  --amber: #b57f1f;
  --amber-ink: #8a5d10;
  --on-amber: #1a1308;
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --measure: 34rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--amber-ink); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; margin: 0 0 0.6em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; max-width: var(--measure); }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { max-width: 46rem; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--sheet); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.top { border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: 0; z-index: 5; }
.top-row { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.wordmark { font: 700 1.35rem/1 var(--display); letter-spacing: -0.03em; color: var(--ink); text-decoration: none; }
.wm-speak { color: var(--amber); }
.top nav { display: flex; gap: 22px; margin-left: auto; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.top nav a:hover { color: var(--ink); }

/* Buttons */
.btn {
  display: inline-block; font: 600 1rem/1 var(--body); padding: 14px 20px; border-radius: 10px;
  background: var(--amber); color: var(--on-amber); text-decoration: none; border: 1px solid var(--amber);
  cursor: pointer;
}
.btn:hover { background: #c68c26; color: var(--on-amber); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-quiet:hover { background: var(--sheet); border-color: var(--amber); color: var(--ink); }
.btn-small { padding: 9px 14px; font-size: 0.9rem; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 12px; }
.fine { font-size: 0.92rem; color: var(--muted); }

/* Hero: the copy on the left, the live scan on the right, top aligned. */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 56px; padding: 72px 0 80px; align-items: start; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); margin-bottom: 0.45em; }
.lede { font-size: 1.2rem; color: var(--ink); }

/* The demo: a sheet of paper with the draft on it. */
.demo { background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px; padding: 22px 22px 18px; box-shadow: 0 1px 2px rgba(60, 50, 35, 0.05), 0 18px 40px rgba(60, 50, 35, 0.09); }
.demo-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.demo-title { font-size: 1rem; margin: 0; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.demo-score { margin: 0; font: 700 1rem/1 var(--display); }
.demo-score .clean { color: #2d7437; }
.demo-score .heavy { color: #a4520f; }

/* The textarea sits over a layer that draws the highlights; both share
   every metric, so the marks land under the words. */
.scan-box { position: relative; background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; }
.scan-layer, #scan-input {
  font: 400 1rem/1.75 var(--body); padding: 16px 18px; margin: 0; border: 0;
  white-space: pre-wrap; overflow-wrap: break-word; word-break: break-word;
}
.scan-layer { color: var(--ink); min-height: 12rem; pointer-events: none; }
#scan-input {
  position: absolute; inset: 0; width: 100%; height: 100%; resize: none; overflow: hidden;
  background: transparent; color: transparent; caret-color: var(--ink); outline: none; border-radius: 10px;
}
#scan-input:focus-visible { box-shadow: 0 0 0 3px var(--amber); }
#scan-input::selection { background: rgba(181, 127, 31, 0.3); color: transparent; }

/* The negative margin cancels the padding, so the layer's text stays exactly
   under the transparent textarea and the caret lines up (as in the app). */
mark { color: inherit; border-radius: 3px; padding: 0 1px; margin: 0 -1px; text-decoration: underline 2px; text-underline-offset: 3px; }
.t-ai { background: rgba(226, 89, 75, 0.2); text-decoration-color: #e2594b; }
.t-jargon { background: rgba(224, 138, 60, 0.18); text-decoration-color: #e08a3c; }
.t-cliche { background: rgba(212, 160, 58, 0.2); text-decoration-color: #d4a03a; }
.t-connector { background: rgba(217, 106, 128, 0.16); text-decoration-color: #d96a80; }
.t-antithesis { background: rgba(140, 120, 200, 0.16); text-decoration-color: #8c78c8; }
.t-closer { background: rgba(120, 140, 160, 0.16); text-decoration-color: #78889a; }
.t-em, .t-chain, .t-uniform { background: rgba(143, 136, 128, 0.14); text-decoration-color: #8f8880; }
.t-hedge, .t-adverb, .t-passive, .t-triplet, .t-serial, .t-abstract, .t-long, .t-opener { background: transparent; text-decoration: none; }

.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 14px 0 6px; min-height: 1.6rem; }
.legend li { font-size: 0.85rem; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.t-ai { background: #e2594b; }
.dot.t-jargon { background: #e08a3c; }
.dot.t-cliche { background: #d4a03a; }
.dot.t-connector { background: #d96a80; }
.dot.t-antithesis { background: #8c78c8; }
.dot.t-closer { background: #78889a; }
.dot.t-em, .dot.t-chain, .dot.t-uniform { background: #8f8880; }
.demo-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.demo-help { font-size: 0.85rem; color: var(--muted); margin: 0; flex: 1 1 16rem; }
.demo-source { font-size: 0.85rem; color: var(--muted); margin: 10px 0 0; }

/* Alternate bands give the long page a rhythm without boxes everywhere. */
.band { background: var(--tint); border-block: 1px solid var(--rule); padding: 72px 0; }
section.wrap { padding: 72px 0; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }

.tells { margin: 0; display: grid; gap: 14px; }
.tells div { display: grid; grid-template-columns: 11rem 1fr; gap: 12px; align-items: baseline; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.tells dt { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.tells dd { margin: 0; color: var(--muted); font-style: italic; }

/* A real sequence, so it is numbered. */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 28px 0 48px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: block; font: 700 2.4rem/1 var(--display); color: var(--amber); margin-bottom: 14px; }
.steps p { color: var(--muted); }

.shot { margin: 0; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; box-shadow: 0 18px 40px rgba(60, 50, 35, 0.12); }

.plain-list { padding-left: 1.2em; margin: 0 0 1em; }
.plain-list li { margin-bottom: 0.45em; }
.builders { background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; padding: 24px 26px 12px; }
.builders .plain-list { color: var(--muted); }

.price { max-width: 40rem; }
.price-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.amount { font: 700 3rem/1 var(--display); letter-spacing: -0.03em; margin: 0; }
.amount span { font-size: 1.1rem; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.price-list { font-size: 1.05rem; margin-top: 10px; }

details { border-bottom: 1px solid var(--rule); padding: 16px 0; }
summary { font: 600 1.08rem/1.4 var(--body); cursor: pointer; list-style-position: outside; }
summary:hover { color: var(--amber-ink); }
details p { margin: 12px 0 0; color: var(--muted); }
.ask { margin-top: 28px; }

.foot { padding: 32px 0 48px; color: var(--muted); font-size: 0.92rem; }
.foot-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot-row p { margin: 0; }
.foot-row a { margin-left: 16px; }

/* Privacy page */
.doc { padding: 56px 0 80px; }
.doc h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.doc h2 { font-size: 1.35rem; margin-top: 2em; }
.doc p, .doc li { max-width: 40rem; }

/* Docs: a sidebar of groups and pages beside the page. */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; }
.docs-nav { position: sticky; top: 88px; padding: 56px 0 40px; font-size: 0.93rem; }
.docs-nav ul { list-style: none; margin: 0 0 18px; padding: 0; }
.docs-nav li { margin: 0; }
.docs-nav a { display: block; padding: 5px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; }
.docs-nav a:hover { color: var(--ink); background: var(--tint); }
.docs-nav a[aria-current="page"] { color: var(--ink); background: var(--sheet); box-shadow: inset 3px 0 0 var(--amber); }
.docs-group { margin: 0 0 6px; padding: 0 10px; font: 700 0.75rem/1.4 var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
.docs-body h3 { margin-top: 1.6em; }
.docs-body [id] { scroll-margin-top: 88px; }
.docs-body ul, .docs-body ol { padding-left: 1.3em; margin: 0 0 1em; }
.docs-body li { margin-bottom: 0.35em; }
.docs-body code { font-size: 0.88em; background: var(--tint); padding: 1px 6px; border-radius: 5px; }
.docs-body pre { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: 14px 16px; overflow-x: auto; }
.docs-body pre code { background: none; padding: 0; }
.docs-body figure { margin: 18px 0 26px; }
.docs-body figure img { border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 12px 30px -18px rgba(44, 39, 31, 0.35); }
.docs-body .note { max-width: 40rem; margin: 0 0 1.2em; padding: 12px 16px; background: var(--sheet); border: 1px solid var(--rule); border-left: 4px solid var(--amber); border-radius: 8px; }
.docs-body .note p { margin: 0; }
.docs-body .table { max-width: 46rem; overflow-x: auto; margin: 0 0 1.4em; }
.docs-body table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.docs-body th, .docs-body td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--rule); }
.docs-body th { font-family: var(--display); font-weight: 700; }

@media (max-width: 900px) {
  .hero, .two-col { grid-template-columns: 1fr; gap: 36px; }
  .hero { padding: 40px 0 56px; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .top nav { display: none; }
  .top-row .btn-small { margin-left: auto; }
  .tells div { grid-template-columns: 1fr; gap: 2px; }
  .docs { grid-template-columns: 1fr; gap: 0; }
  .docs-nav { position: static; padding: 24px 0 0; border-bottom: 1px solid var(--rule); }
  .docs-nav ul { display: flex; flex-wrap: wrap; gap: 2px 4px; }
  .docs-body.doc { padding-top: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
