.gf-buddy { --gf-buddy-paper: var(--gf-sticky);
  display: block; flex: none; overflow: visible; }
.gf-buddy .zz, .gf-buddy .ink, .gf-buddy .thought { stroke: var(--gf-sticky-ink); stroke-linecap: round; stroke-linejoin: round; }
.gf-buddy .zz, .gf-buddy .ink { fill: none; }
.gf-buddy .zz { stroke: var(--gf-graphite, var(--gf-sticky-ink)); stroke-width: 0.9; } /* drawn off the paper, on the page */
.gf-buddy .ink { stroke-width: 0.6; }
.gf-buddy .thought { fill: var(--gf-buddy-paper); stroke-width: 0.45; }
.gf-buddy .spark { fill: var(--gf-sticky-back); }
.gf-buddy .pencil-body, .gf-buddy .pencil-lead { fill: var(--gf-sticky-ink); }
.gf-buddy .pencil-cap { fill: var(--gf-sticky-blush); }
.gf-buddy .pencil-wood { fill: #f1d3a6; }
@media (prefers-color-scheme: dark) {
  .gf-buddy { --gf-buddy-paper: color-mix(in srgb, var(--gf-sticky) 93%, #000); }
}
@media (forced-colors: active) {
  .gf-buddy { forced-color-adjust: none; }
}

/*
  grammarfree website: one stylesheet for every page.
  The tokens are the extension's own (src/ui/tokens.css, "margin notes", see docs/design.md),
  inlined at the marker below when the site is staged, as is buddy.css. The buddy is drawn as in
  src/ui/Buddy.tsx and the pictured controls follow src/ui/components.css.
  One family, Atkinson Hyperlegible Next, served from fonts/ (public/fonts) under its OFL licence.
*/

@font-face { font-family: 'gf Atkinson'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(fonts/atkinson-latin-ext-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'gf Atkinson'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(fonts/atkinson-latin-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'gf Atkinson'; font-style: italic; font-weight: 200 800; font-display: swap;
  src: url(fonts/atkinson-latin-ext-italic.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'gf Atkinson'; font-style: italic; font-weight: 200 800; font-display: swap;
  src: url(fonts/atkinson-latin-italic.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* The extension's tokens (src/ui/tokens.css): scripts/stage-site.mjs puts them here. */
/*
  grammarfree design tokens: "margin notes" (see docs/design.md).
  Calm, neutral surfaces; warmth lives in the hand-drawn marks and the
  sticky-note buddy. One family, Atkinson Hyperlegible Next, for everything.
*/
:host, :root {
  --gf-paper: #ffffff;
  --gf-wash: #f4f5f7;
  --gf-rule: #e6e7eb;
  --gf-ink: #24252b;
  --gf-graphite: #6c6e78;
  --gf-faint: #9a9da6;
  --gf-sticky: #ffe15a;         /* the buddy; never text */
  --gf-sticky-back: #e2b931;    /* the back of the paper, on the buddy's folded corner */
  --gf-sticky-pad-a: #ffa6d2;   /* the pad behind is a few colours: these are the sheets under the note */
  --gf-sticky-pad-b: #94d4ff;
  --gf-sticky-flip: #8cc8f2;    /* the other face of a folded model */
  --gf-sticky-blush: #ff9b7a;   /* the pencil cap */
  --gf-sticky-ink: #2b2a22;     /* lines drawn on the buddy's paper, in both themes */
  --gf-focus: #4c6fff;
  --gf-tint: #eaeeff;           /* selected rows, soft focus wells */
  --gf-warn: #b86e00;           /* a status that needs the person: no key yet, signed out */

  /* Suggestion kinds: each has its own colour and its own stroke. */
  --gf-correctness: #e5484d;
  --gf-clarity: #3e6bef;
  --gf-engagement: #1f9d63;
  --gf-delivery: #8d4fd8;

  --gf-ui: 'gf Atkinson', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* The user's words use the same family; kept as its own token for proofs. */
  --gf-text: var(--gf-ui);

  /* Type scale. The user's words are 15px ink; the tool's words are 13px graphite. */
  --gf-fs-xs: 11.5px;
  --gf-fs-sm: 13px;
  --gf-fs-md: 14px;
  --gf-fs-words: 15px;
  --gf-fs-lg: 16px;
  --gf-fs-xl: 20px;
  --gf-fs-2xl: 28px;

  /* Spacing, on a 4px grid. */
  --gf-space-1: 4px;
  --gf-space-2: 8px;
  --gf-space-3: 12px;
  --gf-space-4: 16px;
  --gf-space-5: 24px;
  --gf-space-6: 32px;

  /* Radii by role. */
  --gf-r-pill: 999px;
  --gf-r-tag: 4px;              /* small inline labels and keys */
  --gf-r-control: 8px;
  --gf-r-card: 12px;
  --gf-r-panel: 16px;

  /* Floating surfaces: hairline plus a soft layered shadow. Page surfaces use borders only. */
  --gf-hairline: 0 0 0 1px rgb(36 37 43 / 0.08);
  --gf-shadow: var(--gf-hairline), 0 1px 2px rgb(36 37 43 / 0.06), 0 6px 16px -4px rgb(36 37 43 / 0.12), 0 18px 40px -16px rgb(36 37 43 / 0.22);

  --gf-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --gf-dur: 120ms;

  /*
    Hand-drawn strokes, tiled and used as masks so the colour comes from CSS.
    Use each with its tile size: mask: var(--gf-stroke-x) repeat-x 0 50% / var(--gf-tile-x).
  */
  --gf-stroke-correctness: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7'%3E%3Cpath d='M0 3.5Q2.5 .9 5 3.5T10 3.5' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
  --gf-tile-correctness: 10px 7px;
  --gf-stroke-clarity: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='7'%3E%3Cpath d='M0 3.6C5 2.6 11 4.3 16 3.4S27 4.6 32 3.6' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
  --gf-tile-clarity: 32px 7px;
  --gf-stroke-engagement: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7'%3E%3Ccircle cx='3.5' cy='3.5' r='1.6' fill='%23000'/%3E%3C/svg%3E");
  --gf-tile-engagement: 7px 7px;
  --gf-stroke-delivery: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M2 3.6L7.6 3.3' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
  --gf-tile-delivery: 12px 7px;
  /* The plain pencil line, for UI accents such as the active tab. */
  --gf-stroke: var(--gf-stroke-clarity);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :host, :root {
    --gf-paper: #1e1f24;
    --gf-wash: #2a2b31;
    --gf-rule: #363840;
    --gf-ink: #ecedf0;
    --gf-graphite: #a2a5ae;
    --gf-faint: #7b7e88;
    --gf-sticky: #f2cf3d;
    --gf-sticky-back: #c9a226;
    --gf-sticky-pad-a: #e98fbd;
    --gf-sticky-pad-b: #7cbde9;
    --gf-sticky-flip: #75b1db;
    --gf-sticky-blush: #ec8a6b;
    --gf-sticky-ink: #2b2a22;
    --gf-focus: #7d97ff;
    --gf-tint: #2a3156;
    --gf-warn: #f0ad45;
    --gf-correctness: #ff7b7b;
    --gf-clarity: #7c9bff;
    --gf-engagement: #4cc38a;
    --gf-delivery: #b78cf5;
    --gf-hairline: 0 0 0 1px rgb(255 255 255 / 0.09);
    --gf-shadow: var(--gf-hairline), 0 1px 2px rgb(0 0 0 / 0.3), 0 18px 40px -12px rgb(0 0 0 / 0.6);
    color-scheme: dark;
  }
}

/* Site-only values. */
:root {
  /* The sticky header's height with its rule, for pages that fill the window under it. */
  --site-head: 77px;
  --wrap: 72rem;
  --gutter: clamp(20px, 4vw, 40px);
  /* How much of a kind's colour washes behind a word: under the pointer, and while its card is open. */
  --wash: 13%;
  --wash-open: 17%;
}
@media (prefers-color-scheme: dark) {
  :root { --wash: 22%; --wash-open: 28%; }
}

/* Each kind's colour (--c), stroke (--s) and tile size (--t), inherited by whatever draws it. */
[data-kind='correctness'] { --c: var(--gf-correctness); --s: var(--gf-stroke-correctness); --t: var(--gf-tile-correctness); }
[data-kind='clarity'] { --c: var(--gf-clarity); --s: var(--gf-stroke-clarity); --t: var(--gf-tile-clarity); }
[data-kind='engagement'] { --c: var(--gf-engagement); --s: var(--gf-stroke-engagement); --t: var(--gf-tile-engagement); }
[data-kind='delivery'] { --c: var(--gf-delivery); --s: var(--gf-stroke-delivery); --t: var(--gf-tile-delivery); }

/* ---- Base ------------------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--gf-paper);
  color: var(--gf-ink);
  font: 400 1.0625rem/1.6 var(--gf-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, pre { margin: 0; }
h1, h2, h3 { font-family: var(--gf-ui); font-weight: 750; letter-spacing: -0.02em; text-wrap: balance; }
/* Display sizes run 44 to 64px. */
h1 { font-size: clamp(2.75rem, 1.95rem + 3.3vw, 4rem); line-height: 1.04; }
h2 { font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem); line-height: 1.1; }
h3 { font-size: 1.1875rem; line-height: 1.3; letter-spacing: -0.01em; }
p, li, dd { text-wrap: pretty; }
button, input, textarea, select { font: inherit; color: inherit; }
img, svg, iframe { max-width: 100%; }
/* Links are ink with a soft underline: calm in running text, and the colours stay with the four kinds. */
a { color: var(--gf-ink); text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-color: currentColor; text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--gf-focus); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--gf-tint); color: var(--gf-ink); }
strong { font-weight: 650; }
code, pre { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
code { font-size: 0.88em; padding: 0.1em 0.35em; border-radius: 4px; background: var(--gf-wash); overflow-wrap: anywhere; }
pre { margin-top: 12px; padding: 14px 16px; overflow-x: auto; border: 1px solid var(--gf-rule); border-radius: var(--gf-r-control); background: var(--gf-wash); font-size: 0.875rem; line-height: 1.55; }
pre code { padding: 0; background: none; font-size: inherit; overflow-wrap: normal; }
/* Scrollbars inside the page are thin and quiet, so they don't crowd the words. */
:where(textarea, pre, .table-wrap, [contenteditable]) { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--gf-ink) 24%, transparent) transparent; }
kbd { font: 600 0.82em/1 var(--gf-ui); padding: 0.2em 0.45em; border: 1px solid var(--gf-rule); border-bottom-width: 2px; border-radius: 5px; background: var(--gf-paper); white-space: nowrap; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: 12px; top: -48px; z-index: 10; padding: 10px 14px; border-radius: var(--gf-r-control);
  background: var(--gf-ink); color: var(--gf-paper); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---- Header and footer -------------------------------------------------------------- */

.site-head { border-bottom: 1px solid var(--gf-rule); background: var(--gf-paper); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 32px; min-height: 72px; padding-block: 12px; }

/* The wordmark: the buddy, then the name. */
.wordmark { display: inline-flex; align-items: center; gap: 10px; font: 750 1.3125rem/1 var(--gf-ui); letter-spacing: -0.02em; color: var(--gf-ink); text-decoration: none; }
.wordmark:hover { text-decoration: none; }
.wordmark .gf-buddy { width: 32px; height: 32px; transition: transform 160ms var(--gf-ease); }
.wordmark:hover .gf-buddy { transform: rotate(-7deg) scale(1.06); }

.nav ul { display: flex; flex-wrap: wrap; gap: 0 24px; padding: 0; list-style: none; }
.nav a { position: relative; display: inline-block; padding: 10px 0; font: 600 0.9375rem/1 var(--gf-ui); color: var(--gf-graphite); text-decoration: none; }
.nav a:hover { color: var(--gf-ink); }
.nav a[aria-current] { color: var(--gf-ink); }
.nav a[aria-current]::after {
  content: ''; position: absolute; left: -2px; right: -2px; bottom: 0; height: 7px;
  background: var(--gf-ink);
  -webkit-mask: var(--gf-stroke) repeat-x 0 50% / var(--gf-tile-clarity); mask: var(--gf-stroke) repeat-x 0 50% / var(--gf-tile-clarity);
}

.site-foot { padding-block: 44px 52px; border-top: 1px solid var(--gf-rule); font-size: 0.9375rem; color: var(--gf-graphite); }
.site-foot .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 56px; align-items: start; }
.site-foot .wordmark { font-size: 1.125rem; padding-top: 2px; }
.site-foot .nav a { padding-top: 2px; }
.site-foot p { grid-column: 2; max-width: 46rem; }
@media (max-width: 40rem) {
  .site-foot .wrap { grid-template-columns: minmax(0, 1fr); }
  .site-foot p { grid-column: auto; }
}

/* ---- Buttons --------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px;
  border: 1px solid transparent; border-radius: var(--gf-r-control);
  font: 600 1rem/1.1 var(--gf-ui); text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--gf-dur), border-color var(--gf-dur);
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--gf-ink); color: var(--gf-paper); }
.btn-primary:hover { background: color-mix(in srgb, var(--gf-ink) 86%, var(--gf-paper)); }
.btn-quiet { background: var(--gf-paper); color: var(--gf-ink); border-color: var(--gf-rule); }
.btn-quiet:hover { border-color: color-mix(in srgb, var(--gf-ink) 32%, var(--gf-rule)); }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 0.875rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.actions-note { flex-basis: 100%; font-size: 0.9375rem; color: var(--gf-graphite); }

/* ---- Pieces of the extension's own UI, pictured ---------------------------------------- */

/* A short stroke in a kind's colour and line: that kind's legend. */
.gf-mark { display: inline-block; width: 20px; height: 7px; flex: none;
  background: var(--c, var(--gf-ink));
  -webkit-mask: var(--s, var(--gf-stroke)) repeat-x 0 50% / var(--t, var(--gf-tile-clarity));
  mask: var(--s, var(--gf-stroke)) repeat-x 0 50% / var(--t, var(--gf-tile-clarity)); }

/*
  A word as the extension marks it: its kind's hand-drawn line under it. One line, so the stroke stays under the words.
  The line's centre sits max(4px, 0.22em) under the baseline, as in the extension. The mark's box ends at Atkinson's
  descent (0.316em under the baseline), and the line is 7px tall, so its foot sits that far above the box's foot.
*/
mark.mk { position: relative; padding: 0 1px; margin: 0 -1px; border-radius: 3px; background: none; color: inherit; white-space: nowrap;
  transition: background-color var(--gf-dur); }
mark.mk::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: calc(0.316em - max(4px, 0.22em) - 3.5px); height: 7px;
  background: var(--c, var(--gf-clarity));
  -webkit-mask: var(--s, var(--gf-stroke)) repeat-x 0 50% / var(--t, var(--gf-tile-clarity));
  mask: var(--s, var(--gf-stroke)) repeat-x 0 50% / var(--t, var(--gf-tile-clarity));
  transition: transform var(--gf-dur) var(--gf-ease);
}
/* Pointing at a word washes it in its kind's colour and thickens its line. Nothing opens. */
mark.mk:hover, mark.mk.is-hover { background: color-mix(in srgb, var(--c) var(--wash), transparent); }
mark.mk:hover::after, mark.mk.is-hover::after, mark.mk[data-active]::after { transform: scaleY(1.25); }
/* The word whose card is open keeps a slightly deeper wash of the same colour. */
mark.mk[data-active] { background: color-mix(in srgb, var(--c) var(--wash-open), transparent); }

/* The count on the buddy's corner, in the colour of the most pressing kind. */
.buddy-tag { position: absolute; top: -6px; right: -8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--gf-r-pill);
  background: var(--c, var(--gf-ink)); color: var(--gf-paper); box-shadow: 0 0 0 2px var(--gf-paper);
  font: 750 var(--gf-fs-xs)/18px var(--gf-ui); text-align: center; font-variant-numeric: tabular-nums; }

/* The proof, as in the extension: what goes struck through in graphite, what comes in set in bold
   ink over a low marker swipe in its kind's colour (the focus blue for rewrites, which have no
   kind), and a flagged passage underlined in its kind's line, placed like mark.mk's. */
.gf-proof { font: 400 15px/1.55 var(--gf-text); color: var(--gf-ink); overflow-wrap: anywhere; }
.gf-proof .ctx { color: var(--gf-graphite); }
.gf-proof del, .gf-proof ins { padding: 0 2px; border-radius: 3px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.gf-proof del { color: var(--gf-graphite); text-decoration: line-through 1.5px color-mix(in srgb, var(--gf-graphite) 80%, transparent); }
.gf-proof ins { --swipe: color-mix(in srgb, var(--c, var(--gf-focus)) 22%, transparent);
  color: var(--gf-ink); font-weight: 650; text-decoration: none; background: linear-gradient(transparent 48%, var(--swipe) 48%); }
.gf-proof mark.flag { position: relative; background: none; color: inherit; }
.gf-proof mark.flag::after { content: ''; position: absolute; left: 0; right: 0; bottom: calc(0.316em - max(4px, 0.22em) - 3.5px); height: 7px;
  background: var(--c, var(--gf-graphite)); -webkit-mask: var(--s, var(--gf-stroke)) repeat-x 0 50% / var(--t, var(--gf-tile-clarity));
  mask: var(--s, var(--gf-stroke)) repeat-x 0 50% / var(--t, var(--gf-tile-clarity)); }
@media (prefers-color-scheme: dark) {
  .gf-proof ins { --swipe: color-mix(in srgb, var(--c, var(--gf-focus)) 30%, transparent); }
}

/* Buttons in pictures of the extension: they look like its buttons but do nothing, so they aren't buttons. */
.fake-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 12px; flex: none;
  border: 1px solid transparent; border-radius: var(--gf-r-control); font: 600 var(--gf-fs-sm)/1 var(--gf-ui); color: var(--gf-ink); white-space: nowrap; }
.fake-btn.primary { background: var(--gf-ink); color: var(--gf-paper); }
.fake-btn.quiet { border-color: var(--gf-rule); background: var(--gf-paper); }
.fake-btn.ghost { padding: 0 8px; color: var(--gf-graphite); }
.fake-btn.sm { height: 26px; padding: 0 10px; font-size: 12px; }
/* An alternative fix: the user's own words, a little lighter than the actions. */
.fake-btn.chip { padding: 0 10px; font-weight: 500; }
.fake-btn svg { width: 14px; height: 14px; flex: none; }

/* The card that opens under a word, laid out as the extension's: kind and title, the change in
   its sentence, the actions, then the reason in full. */
.gf-card { width: 21rem; max-width: 100%; padding: 10px 10px 12px 14px; border-radius: var(--gf-r-card); background: var(--gf-paper); box-shadow: var(--gf-shadow);
  font: 400 var(--gf-fs-sm)/1.5 var(--gf-ui); color: var(--gf-graphite); text-align: left; }
.card-top { display: flex; align-items: center; gap: 8px; min-height: 24px; }
.card-top .gf-mark { width: 16px; }
.card-kind { font: 600 var(--gf-fs-md)/1.3 var(--gf-ui); color: var(--gf-ink); }
.card-more { display: grid; place-items: center; width: 28px; height: 24px; margin-left: auto; border-radius: 6px; color: var(--gf-graphite); }
.card-more svg { width: 16px; height: 16px; fill: currentColor; }
.card-proof { margin: 6px 4px 0 0; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.card-actions .fake-btn.primary { padding: 0 12px 0 10px; }
.card-actions .fake-btn.ghost { margin-left: auto; }
.card-reason { margin: 10px 4px 0 0; text-wrap: pretty; }

/* The buddy peeled into a pill: the count for each kind. */
.gf-pill { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 5px 14px 5px 6px; border-radius: var(--gf-r-pill);
  background: var(--gf-paper); box-shadow: var(--gf-shadow); font: 650 var(--gf-fs-sm)/1 var(--gf-ui); color: var(--gf-ink); font-variant-numeric: tabular-nums; }
.gf-pill .gf-buddy { width: 28px; height: 28px; }
.pill-count { display: inline-flex; align-items: center; gap: 6px; }
.pill-count .gf-mark { width: 16px; }
.pill-clear { color: var(--gf-graphite); font-weight: 600; }

/* What's left after accepting: a small note with Undo. */
.gf-toast { display: inline-flex; align-items: center; gap: 8px; padding: 5px 5px 5px 12px; border-radius: var(--gf-r-pill);
  background: var(--gf-paper); box-shadow: var(--gf-shadow); font: 600 var(--gf-fs-sm)/1 var(--gf-ui); color: var(--gf-ink); white-space: nowrap; }
.gf-toast svg { width: 14px; height: 14px; flex: none; }
.gf-toast b { font-weight: 750; }
.toast-undo { margin-left: 6px; padding: 7px 11px; border-radius: var(--gf-r-pill); background: var(--gf-wash); color: var(--gf-ink); }

/* ---- Home: the hero ----------------------------------------------------------------- */

.hero { padding-block: clamp(48px, 7vw, 96px) clamp(56px, 8vw, 112px); background: var(--gf-wash); border-bottom: 1px solid var(--gf-rule); }
.hero h1 { max-width: 21ch; }
.lede { max-width: 40rem; margin-top: 22px; font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem); line-height: 1.55; color: var(--gf-graphite); }
.hero .actions { margin-top: 32px; }

.stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, 17rem); gap: 40px clamp(32px, 5vw, 64px); margin-top: clamp(48px, 7vw, 80px); }

/* The text box: a page surface with a border. With grammarfree installed, the real underlines appear here. */
.demo-sheet { position: relative; padding: clamp(20px, 3.5vw, 36px) clamp(20px, 4vw, 44px) 72px; border: 1px solid var(--gf-rule); border-radius: var(--gf-r-card); background: var(--gf-paper); }
.demo-sheet:focus-within { border-color: var(--gf-focus); outline: 2px solid var(--gf-focus); outline-offset: 2px; }
.demo-label { display: block; margin-bottom: 14px; font: 600 0.875rem/1.3 var(--gf-ui); color: var(--gf-graphite); }
.demo-text { font: 400 clamp(1.1875rem, 1.05rem + 0.6vw, 1.4375rem)/1.7 var(--gf-text); color: var(--gf-ink); caret-color: var(--gf-focus); overflow-wrap: break-word; }
.demo-text p + p { margin-top: 0.6em; }
/* The sheet around it carries the focus ring. */
.demo-text:focus { outline: none; }

/* The buddy sits in the text box's corner. */
.field-buddy { position: absolute; right: 16px; bottom: 16px; width: 34px; height: 34px; }
.field-buddy .gf-buddy { width: 34px; height: 34px; }

/* The card under "libary". Without anchor positioning it simply follows the text. */
.demo-card { position: relative; z-index: 1; margin-top: 14px; }
@supports (anchor-name: --a) {
  .demo-sheet { padding-bottom: 184px; }
  .demo-anchor { anchor-name: --gf-demo-word; }
  .demo-card {
    --card-w: min(21rem, calc(100% - 24px));
    position: absolute; margin: 0; width: var(--card-w);
    position-anchor: --gf-demo-word;
    top: calc(anchor(bottom) + 8px);
    left: max(12px, min(calc(anchor(left) - 14px), calc(100% - var(--card-w) - 12px)));
  }
}
@supports (anchor-name: --a) {
  @media (max-width: 40rem) { .demo-sheet { padding-bottom: 228px; } }
}

.demo-hint { max-width: 44rem; margin-top: 14px; font-size: 0.9375rem; line-height: 1.5; color: var(--gf-graphite); }
.demo-hint .when-live { display: none; }

/* Once grammarfree itself is running on the page, the picture steps aside for the real thing. */
.demo[data-live] mark.mk { background: none; }
.demo[data-live] mark.mk::after, .demo[data-live] .demo-card, .demo[data-live] .field-buddy { display: none; }
.demo[data-live] .demo-hint .when-live { display: inline; }
.demo[data-live] .demo-hint .when-picture { display: none; }
.demo[data-live] .demo-sheet { padding-bottom: 72px; }
/* A word the visitor has changed loses its picture underline. */
mark.mk[data-done] { background: none; white-space: normal; }
mark.mk[data-done]::after { display: none; }

/* Notes in the margin beside the text box. */
.margin { display: flex; flex-direction: column; gap: 32px; padding-left: clamp(20px, 3vw, 32px); border-left: 1px solid var(--gf-rule); font-size: 0.9375rem; line-height: 1.5; color: var(--gf-graphite); }
.margin .note-push { margin-top: auto; }
.note-title { font-weight: 650; color: var(--gf-ink); }
.legend { display: grid; gap: 10px; margin-top: 12px; padding: 0; list-style: none; }
.legend li { display: flex; align-items: center; gap: 12px; color: var(--gf-ink); }
.legend .gf-mark { width: 30px; }
.margin .gf-pill { margin-bottom: 14px; }

@media (max-width: 62rem) {
  .stage { grid-template-columns: minmax(0, 1fr); }
  .margin { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 28px 40px; padding: 28px 0 0; border-left: 0; border-top: 1px solid var(--gf-rule); }
  .margin .note-push { margin-top: 0; }
}

/* ---- Sections ----------------------------------------------------------------------------- */

.section { padding-block: clamp(64px, 9vw, 120px); }
.section + .section { border-top: 1px solid var(--gf-rule); }
.section h2 { max-width: 24ch; }
.section-lede { max-width: 42rem; margin-top: 16px; font-size: 1.1875rem; line-height: 1.55; color: var(--gf-graphite); }
.small-note { max-width: 44rem; margin-top: 24px; font-size: 0.9375rem; color: var(--gf-graphite); }

/* How it works: three moves, each pictured in a well. */
.moves { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px clamp(24px, 3vw, 40px); margin-top: 52px; padding: 0; list-style: none; }
.move-art { position: relative; display: grid; place-items: center; min-height: 184px; padding: 28px 16px; border: 1px solid var(--gf-rule); border-radius: var(--gf-r-card); background: var(--gf-wash); overflow: hidden; }
.move h3 { margin-top: 22px; }
.move p { margin-top: 8px; color: var(--gf-graphite); }
.art-words { font: 400 1.25rem/1.6 var(--gf-text); color: var(--gf-ink); white-space: nowrap; }
.art-cursor { position: absolute; left: calc(50% + 4px); top: calc(50% + 4px); width: 18px; height: 22px; color: var(--gf-ink); }
.art-cursor path { fill: currentColor; stroke: var(--gf-paper); stroke-width: 1.4; stroke-linejoin: round; }
.art-stack { display: grid; justify-items: start; gap: 6px; }
.art-stack .gf-card { width: auto; padding: 8px 8px 8px 12px; }
.art-stack .card-proof { margin-top: 0; }
.art-stack .card-actions { margin-top: 8px; }
@media (max-width: 62rem) { .moves { grid-template-columns: minmax(0, 1fr); max-width: 34rem; } }

/* Four kinds of suggestion, one cell each, ruled like a page. */
.kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 52px; padding: 0; list-style: none;
  border: 1px solid var(--gf-rule); border-radius: var(--gf-r-card); background: var(--gf-rule); overflow: hidden; }
.kind { display: flex; flex-direction: column; padding: 28px 24px 26px; background: var(--gf-paper); }
.kind-stroke { display: block; width: 72px; height: 9px; background: var(--c);
  -webkit-mask: var(--s) repeat-x 0 50% / auto 100%; mask: var(--s) repeat-x 0 50% / auto 100%; }
.kind h3 { margin-top: 20px; }
.kind-line { margin-top: 2px; font-size: 0.9375rem; color: var(--gf-graphite); }
.kind p:not(.kind-line, .sample) { margin-top: 12px; color: var(--gf-graphite); }
.kind .sample { margin-top: auto; padding-top: 22px; font: 400 1.0625rem/1.6 var(--gf-text); color: var(--gf-ink); }
.kind .sample::before { content: ''; display: block; margin-bottom: 16px; border-top: 1px solid var(--gf-rule); }
@media (max-width: 62rem) { .kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 36rem) { .kinds { grid-template-columns: minmax(0, 1fr); } }

/* The buddy's moods. */
.moods { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 40px 24px; margin-top: 52px; padding: 0; list-style: none; }
.mood-art { position: relative; display: inline-block; }
.mood .gf-buddy { width: 68px; height: 68px; }
.mood .buddy-tag { top: -2px; right: -10px; }
.mood h3 { margin-top: 16px; font-size: 1.0625rem; }
.mood p { margin-top: 4px; font-size: 0.9375rem; color: var(--gf-graphite); }
@media (max-width: 62rem) { .moods { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 36rem) { .moods { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* The assistant panel, pictured, beside what each part does. */
.assistant { display: grid; grid-template-columns: minmax(0, 27rem) minmax(0, 1fr); gap: 48px clamp(32px, 5vw, 72px); align-items: start; margin-top: 52px; }
.panel-stage { padding: clamp(20px, 3.5vw, 32px); border: 1px solid var(--gf-rule); border-radius: var(--gf-r-panel); background: var(--gf-wash); }
.assistant figcaption { margin-top: 14px; font-size: 0.875rem; color: var(--gf-graphite); }
.panel-mock { max-width: 23rem; margin-inline: auto; overflow: hidden; background: var(--gf-paper); border-radius: var(--gf-r-panel); box-shadow: var(--gf-shadow);
  font: 400 var(--gf-fs-sm)/1.45 var(--gf-ui); color: var(--gf-graphite); }
.pm-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 6px 18px; }
.pm-brand { font: 750 var(--gf-fs-lg)/1 var(--gf-ui); letter-spacing: -0.02em; color: var(--gf-ink); }
.pm-close { width: 16px; height: 16px; color: var(--gf-graphite); }
.pm-tabs { display: flex; gap: 2px; padding: 4px 12px 0; border-bottom: 1px solid var(--gf-rule); overflow: hidden; white-space: nowrap; }
.pm-tabs span { position: relative; display: inline-flex; align-items: center; gap: 5px; padding: 9px 6px 12px; font: 600 var(--gf-fs-sm)/1 var(--gf-ui); }
.pm-tabs .on { color: var(--gf-ink); }
.pm-tabs .on::after { content: ''; position: absolute; left: 4px; right: 4px; bottom: -2px; height: 7px; background: var(--gf-ink);
  -webkit-mask: var(--gf-stroke) repeat-x 0 50% / var(--gf-tile-clarity); mask: var(--gf-stroke) repeat-x 0 50% / var(--gf-tile-clarity); }
/* Too narrow for all five tabs: show the strip scrolled to its end, where History is. */
@media (max-width: 30rem) {
  .pm-tabs { justify-content: flex-end; -webkit-mask: linear-gradient(to right, transparent, #000 28px); mask: linear-gradient(to right, transparent, #000 28px); }
}
.pm-tabs b { min-width: 18px; padding: 3px 5px; border-radius: var(--gf-r-pill); background: var(--gf-wash); color: var(--gf-ink); font: 650 var(--gf-fs-xs)/1 var(--gf-ui); text-align: center; }
.pm-body { padding: 14px 18px 6px; }
.pm-sub { font: 600 var(--gf-fs-sm)/1.3 var(--gf-ui); color: var(--gf-ink); }
.pm-rows { margin-top: 4px; padding: 0; list-style: none; }
.pm-rows li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; padding: 12px 0; }
.pm-rows li + li { border-top: 1px solid var(--gf-rule); }
.pm-title { grid-column: 2; font-weight: 600; color: var(--gf-ink); }
.pm-rows .gf-mark { grid-column: 1; grid-row: 1; }
.pm-rows .gf-proof { grid-column: 2; font-size: var(--gf-fs-md); line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-rows .fake-btn { grid-column: 3; grid-row: 1 / span 2; }
.pm-foot { padding: 12px 18px 14px; border-top: 1px solid var(--gf-rule); font-size: 12px; }

.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 40px; }
.features dt { font-weight: 650; }
.features dd { margin-top: 6px; color: var(--gf-graphite); }
@media (max-width: 62rem) { .assistant { grid-template-columns: minmax(0, 1fr); } .assistant figure { max-width: 30rem; } }
@media (max-width: 40rem) { .features { grid-template-columns: minmax(0, 1fr); } }

/* Where text goes: two routes, with the middleman struck out like a word in a proof. */
.routes { margin-top: 48px; }
.route { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 14px 40px; align-items: center; padding-block: 28px; border-top: 1px solid var(--gf-rule); }
.route:last-child { border-bottom: 1px solid var(--gf-rule); }
.route h3 { font-size: 1.0625rem; }
.route-line { display: flex; align-items: center; min-width: 0; }
.route-note { grid-column: 2; max-width: 40rem; font-size: 0.9375rem; color: var(--gf-graphite); }
.node { flex: none; padding: 8px 14px; border: 1px solid var(--gf-rule); border-radius: var(--gf-r-pill); background: var(--gf-paper); font: 600 0.9375rem/1.2 var(--gf-ui); white-space: nowrap; }
.node-struck { position: relative; border-style: dashed; color: var(--gf-graphite); text-decoration: none; }
.node-struck::after { content: ''; position: absolute; left: 8px; right: 8px; top: 50%; height: 7px; transform: translateY(-50%) rotate(-3deg);
  background: var(--gf-correctness); -webkit-mask: var(--gf-stroke) repeat-x 0 50% / var(--gf-tile-clarity); mask: var(--gf-stroke) repeat-x 0 50% / var(--gf-tile-clarity); }
.wire { position: relative; flex: 1 1 32px; min-width: 20px; height: 7px; background: var(--gf-faint);
  -webkit-mask: var(--gf-stroke) repeat-x 0 50% / var(--gf-tile-clarity); mask: var(--gf-stroke) repeat-x 0 50% / var(--gf-tile-clarity); }
.arrowhead { flex: none; width: 8px; height: 12px; margin: 0 6px 0 -8px; background: var(--gf-faint); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.stays { margin-left: 16px; font: 600 0.9375rem/1.2 var(--gf-ui); color: var(--gf-graphite); }
@media (max-width: 52rem) {
  .route { grid-template-columns: minmax(0, 1fr); }
  .route-note { grid-column: auto; }
  .route-line { flex-direction: column; align-items: flex-start; }
  .wire { flex: none; width: 4px; height: 22px; margin-left: 22px;
    -webkit-mask: none; mask: none; background: none; border-left: 2px dotted var(--gf-faint); }
  .arrowhead { width: 12px; height: 8px; margin: -2px 0 0 18px; clip-path: polygon(0 0, 100% 0, 50% 100%); }
  .stays { margin: 10px 0 0; }
}

/* Providers */
.table-wrap { margin-top: 40px; overflow-x: auto; border: 1px solid var(--gf-rule); border-radius: var(--gf-r-card); }
.table-wrap:focus-visible { outline-offset: 4px; }
table { width: 100%; min-width: 46rem; border-collapse: collapse; font-size: 0.96875rem; line-height: 1.5; }
th, td { padding: 14px 20px; border-bottom: 1px solid var(--gf-rule); text-align: left; vertical-align: top; }
tbody tr:last-child > * { border-bottom: 0; }
thead th { background: var(--gf-wash); font: 600 0.875rem/1.3 var(--gf-ui); color: var(--gf-graphite); }
tbody th { font-weight: 650; }
td { color: var(--gf-graphite); }
td.here { color: var(--gf-ink); }

/* Privacy in short */
.points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 48px; max-width: 58rem; margin-top: 36px; padding: 0; list-style: none; }
.points li { position: relative; padding-left: 32px; }
.points li::before { content: ''; position: absolute; left: 0; top: calc(0.68em - 1px); width: 20px; height: 7px; background: var(--gf-faint);
  -webkit-mask: var(--gf-stroke) repeat-x 0 50% / var(--gf-tile-clarity); mask: var(--gf-stroke) repeat-x 0 50% / var(--gf-tile-clarity); }
.section .more { margin-top: 28px; }
@media (max-width: 40rem) { .points { grid-template-columns: minmax(0, 1fr); } }

/* Closing call to action, on the same wash as the hero. */
.cta { background: var(--gf-wash); }
.cta .actions { margin-top: 32px; }

/* ---- Inner pages ----------------------------------------------------------------------- */

.page-head { padding-block: clamp(48px, 7vw, 88px) clamp(36px, 5vw, 60px); background: var(--gf-wash); border-bottom: 1px solid var(--gf-rule); }
.page-head h1 { max-width: 20ch; font-size: clamp(2.75rem, 2.2rem + 2.2vw, 3.5rem); }
.page-head .meta { margin-top: 16px; font-size: 0.9375rem; color: var(--gf-graphite); }

/* A guide with its contents beside it on wide screens. */
.guide { display: grid; grid-template-columns: 13rem minmax(0, 44rem); gap: 0 clamp(32px, 6vw, 88px); padding-block: 56px 104px; }
.toc { position: sticky; top: 24px; align-self: start; padding-top: 8px; font-size: 0.9375rem; }
.toc h2 { font: 600 0.875rem/1.3 var(--gf-ui); letter-spacing: 0; color: var(--gf-graphite); }
.toc ul { margin-top: 10px; padding: 0; list-style: none; }
.toc li + li { margin-top: 2px; }
.toc a { display: block; padding: 5px 0; color: var(--gf-ink); text-decoration: none; }
.toc a:hover { text-decoration: underline; }
@media (max-width: 56rem) {
  .guide { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; padding: 0 0 32px; margin-bottom: 8px; border-bottom: 1px solid var(--gf-rule); }
  .toc ul { display: flex; flex-wrap: wrap; gap: 0 18px; }
}

/* Prose shared by the guide and the policy. Kept at low specificity (:where) so components can override it. */
.prose :where(*) + :where(p, ul, ol, pre, div) { margin-top: 14px; }
.prose :where(*) + :where(h2) { margin-top: 64px; }
.prose :where(*) + :where(h3) { margin-top: 36px; }
.prose :where(h2, h3) + :where(*) { margin-top: 12px; }
.prose :where(li) + :where(li) { margin-top: 8px; }
.prose h2 { font-size: clamp(1.5rem, 1.3rem + 0.7vw, 1.875rem); }
.prose :where(ul, ol) { padding-left: 1.4em; }
.prose li::marker { color: var(--gf-graphite); }
.prose .note { font-size: 0.9375rem; color: var(--gf-graphite); }
.placeholder { padding: 0.05em 0.35em; border-radius: 4px; background: var(--gf-tint); color: var(--gf-ink); }

/* Setup steps happen in order, so they're numbered. */
.steps { padding: 0; list-style: none; counter-reset: step; }
.steps > li { position: relative; padding: 40px 0 8px 60px; counter-increment: step; }
.steps > li + li { margin-top: 32px; border-top: 1px solid var(--gf-rule); }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 37px; width: 38px; height: 38px;
  display: grid; place-items: center; border: 1px solid var(--gf-rule); border-radius: 50%; background: var(--gf-wash);
  font: 750 1.0625rem/1 var(--gf-ui); color: var(--gf-ink);
}
.guide .after-steps { margin-top: 72px; padding-top: 8px; border-top: 1px solid var(--gf-rule); }
@media (max-width: 40rem) {
  .steps > li { padding-left: 0; padding-top: 92px; }
}

.store-note { padding: 14px 16px; border: 1px solid var(--gf-rule); border-radius: var(--gf-r-control); background: var(--gf-wash); }
.store-note p + p { margin-top: 6px; }

/* ---- Try it ------------------------------------------------------------------------------ */

.surfaces { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 56px 40px; padding-block: 56px 104px; }
.surface { grid-column: span 6; min-width: 0; }
.surface.wide { grid-column: span 7; }
.surface.narrow { grid-column: span 5; }
.surface.full { grid-column: 1 / -1; }
/* Says the sample page needs the extension; site.js takes it away once grammarfree is on the page. */
.surfaces .try-notice { grid-column: 1 / -1; margin-block: 0; }
.try-notice[data-missing] { --callout-accent: var(--gf-correctness); }
.try-notice p + p { margin-top: 8px; }
/* The same news where the visitor is looking, once they have clicked a box and nothing came. */
.try-toast { position: fixed; left: 50%; bottom: 20px; z-index: 9; transform: translateX(-50%); display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; width: max-content; max-width: calc(100vw - 32px); padding: 10px 10px 10px 16px; border-radius: 12px; background: var(--gf-ink); color: var(--gf-paper); font-size: 0.9375rem; box-shadow: var(--gf-shadow); }
.try-toast:empty { padding: 0; box-shadow: none; }
.try-toast a { color: inherit; font-weight: 600; }
.try-toast button { min-height: 32px; padding: 0 10px; border: 1px solid color-mix(in srgb, var(--gf-paper) 36%, transparent); border-radius: var(--gf-r-control); background: none; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
@media (max-width: 62rem) { .surface, .surface.wide, .surface.narrow { grid-column: 1 / -1; } }

.surface-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.surface-head h2 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.01em; }
.surface-hint { max-width: 60ch; margin-top: 4px; font-size: 0.9375rem; color: var(--gf-graphite); }
.surface-body { margin-top: 16px; overflow: hidden; background: var(--gf-paper); border: 1px solid var(--gf-rule); border-radius: var(--gf-r-card); }

/* Fields hold the visitor's words. */
.field { width: 100%; padding: 10px 12px; border: 1px solid var(--gf-rule); border-radius: var(--gf-r-control); background: var(--gf-paper); color: var(--gf-ink);
  font: 400 1.0625rem/1.55 var(--gf-text); }
.field:hover { border-color: color-mix(in srgb, var(--gf-ink) 30%, var(--gf-rule)); }
.field:focus-visible { outline: 2px solid var(--gf-focus); outline-offset: 1px; border-color: var(--gf-focus); }
/* Text boxes grow with their words, as composers do, and only scroll once they're very long.
   No resize grip: the buddy sits in that corner. */
textarea.field { display: block; resize: none; field-sizing: content; max-height: 70vh; }
.field-label { display: block; margin-bottom: 6px; font: 600 0.875rem/1.3 var(--gf-ui); color: var(--gf-graphite); }

/* Fields that sit flush inside a surface, the way an email or post composer draws them. */
.flush { border: 0; border-radius: 0; }
.flush:hover { border-color: transparent; }
.flush:focus-visible { outline-offset: -2px; }

.mail-row { display: flex; align-items: center; gap: 12px; padding-left: 16px; border-bottom: 1px solid var(--gf-rule); }
.mail-row label { flex: none; width: 4.5em; font: 600 0.875rem/1 var(--gf-ui); color: var(--gf-graphite); }
.mail-row .field { padding-left: 0; }
.mail-body { padding: 16px; min-height: 18rem; }

.doc { min-height: 20rem; padding: clamp(20px, 4vw, 40px) clamp(20px, 5vw, 56px); font: 400 1.125rem/1.65 var(--gf-text); color: var(--gf-ink); overflow-wrap: break-word; }
.doc:focus { outline: none; }
.surface-body:has(.doc:focus-visible) { outline: 2px solid var(--gf-focus); outline-offset: 2px; }
.doc > * + * { margin-top: 0.7em; }
.doc h3 { font: 750 1.625rem/1.25 var(--gf-text); letter-spacing: -0.02em; }
.doc h4 { margin-top: 1.4em; font: 700 1.1875rem/1.35 var(--gf-text); }
.doc ul { padding-left: 1.3em; }
.doc li + li { margin-top: 0.35em; }

.post-from { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; font: 600 0.875rem/1.3 var(--gf-ui); color: var(--gf-graphite); }
.post-from i { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border: 1px solid var(--gf-rule); border-radius: 50%; background: var(--gf-wash);
  color: var(--gf-ink); font: normal 700 11px/1 var(--gf-ui); }
.post-text { padding: 10px 16px 16px; min-height: 10rem; }
.post-foot { display: flex; justify-content: flex-end; padding: 10px 16px; border-top: 1px solid var(--gf-rule); font: 600 0.875rem/1.3 var(--gf-ui); color: var(--gf-graphite); font-variant-numeric: tabular-nums; }
.post-foot [data-over] { color: var(--gf-ink); font-weight: 750; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; padding: 20px; }
.form-grid .span { grid-column: 1 / -1; }
@media (max-width: 36rem) { .form-grid { grid-template-columns: minmax(0, 1fr); } }

.skipped .surface-body { padding: 16px; background: var(--gf-wash); }
.skipped .field { min-height: 6rem; }

.frame { display: block; width: 100%; height: 300px; border: 0; }

.tips { align-self: start; padding: 22px 26px; border: 1px solid var(--gf-rule); border-radius: var(--gf-r-card); background: var(--gf-wash); }
.tips h2 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.01em; }
.tips ul { margin-top: 12px; padding-left: 1.2em; color: var(--gf-graphite); }
.tips li + li { margin-top: 8px; }
.tips li::marker { color: var(--gf-faint); }

/* The page inside the frame. */
.framed { padding: 16px; background: var(--gf-paper); }
.framed .surface-head h2 { font-size: 1rem; }
.framed .field { min-height: 9rem; margin-top: 10px; }

/* ---- 404 -------------------------------------------------------------------------------- */

.lost { padding-block: clamp(56px, 10vw, 128px); }
.lost .gf-buddy { width: 88px; height: 88px; margin-bottom: 28px; }
.lost .actions { margin-top: 36px; }

/* ---- Preferences ------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* High-contrast modes would otherwise wipe out the hand-drawn lines, which are masked backgrounds.
   Every line keeps its own shape, so kinds stay apart even when they share one colour. */
@media (forced-colors: active) {
  .gf-mark, mark.mk::after, .gf-proof mark.flag::after, .kind-stroke, .node-struck::after, .wire, .arrowhead,
  .nav a[aria-current]::after, .docs-nav a[aria-current]::after, .pm-tabs .on::after, .points li::before { forced-color-adjust: none; background: CanvasText; }
  /* The buddy is a picture with its own contrast: yellow paper, dark ink. */
  .gf-card, .gf-pill, .gf-toast, .panel-mock, .buddy-tag { border: 1px solid CanvasText; }
  mark.mk[data-active] { outline: 1px solid CanvasText; }
  .demo-sheet:focus-within { outline: 2px solid Highlight; }
  .gf-proof ins { text-decoration: underline 2px; }
}

/* Site rhythm and documentation. Page surfaces have borders, not shadows. */
:root { --space-1: 8px; --space-2: 16px; --space-3: 24px; --space-4: 32px; --space-6: 48px; --space-8: 64px; }
html { scroll-padding-top: 104px; }
.site-head { position: sticky; top: 0; z-index: 8; }
.site-head .wrap { min-height: calc(var(--site-head) - 1px); }
.site-head .nav a { padding-block: 14px; }
.eyebrow { font-size: .9375rem; font-weight: 600; color: var(--gf-graphite); margin-bottom: 16px; }
.hero h1 { max-width: 13ch; }
.hero .lede { max-width: 42rem; font-size: clamp(1.125rem, 1rem + .4vw, 1.375rem); line-height: 1.55; }
.hero .actions { margin-top: 32px; }
.section { padding-block: clamp(56px, 7vw, 96px); }
.section h2 { max-width: 26ch; }
.section-lede { max-width: 58ch; }
.btn { white-space: normal; text-align: center; }
.menu-toggle { margin-left: auto; }
.toc { top: 104px; max-height: calc(100vh - 128px); overflow-y: auto; }
.toc h2 { margin-top: 16px; }
.site-foot .nav a { min-height: 44px; display: inline-flex; align-items: center; }
.site-foot p { line-height: 1.7; }
.docs-layout { display: grid; grid-template-columns: 13rem minmax(0, 48rem); gap: clamp(32px, 5vw, 80px); padding-block: 56px 96px; }
.docs-nav { position: sticky; top: 108px; align-self: start; max-height: calc(100vh - 132px); overflow: auto; font-size: .9375rem; }
.docs-nav ul { list-style: none; padding: 0; }
.docs-nav a { position: relative; display: block; width: fit-content; max-width: 100%; padding: 10px 12px; border-radius: 8px; color: var(--gf-graphite); text-decoration: none; line-height: 1.4; }
.docs-nav a:hover { color: var(--gf-ink); background: var(--gf-wash); }
/* The page you are on is underlined with the pencil stroke, as in the header. */
.docs-nav a[aria-current] { color: var(--gf-ink); font-weight: 600; }
.docs-nav a[aria-current]::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 7px; pointer-events: none;
  background: var(--gf-ink);
  -webkit-mask: var(--gf-stroke) repeat-x 0 50% / var(--gf-tile-clarity); mask: var(--gf-stroke) repeat-x 0 50% / var(--gf-tile-clarity);
}
.docs-toggle { margin-bottom: 8px; }
.doc-article { min-width: 0; }
.doc-head { padding-bottom: 32px; }
.doc-head h1 { font-size: clamp(2.75rem, 4vw, 3.5rem); max-width: 18ch; line-height: 1.08; }
.doc-head .lede { font-size: 1.25rem; max-width: 48ch; margin-top: 20px; }
.doc-toc { position: static; max-height: none; padding: 20px 24px; margin-bottom: 40px; border: 1px solid var(--gf-rule); border-radius: 12px; background: var(--gf-wash); }
.doc-toc h2 { margin: 0; }
.doc-toc ul { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.doc-article .prose section + section { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--gf-rule); }
.heading-link { text-decoration: none; }
.heading-link:hover { text-decoration: underline; }
.doc-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.doc-card { display: block; padding: 24px; border: 1px solid var(--gf-rule); border-radius: 12px; text-decoration: none; }
.doc-card:hover { border-color: var(--gf-graphite); background: var(--gf-wash); }
.doc-card p { font-size: 1rem; color: var(--gf-graphite); margin-top: 8px; }
.doc-pagination { display: flex; justify-content: space-between; gap: 24px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--gf-rule); font-size: 1rem; }
.doc-pagination a { max-width: 48%; }
.callout { display: flex; align-items: start; gap: 14px; padding: 20px; margin-block: 24px; border: 1px solid var(--gf-rule); border-left: 3px solid var(--gf-graphite); border-radius: 12px; background: var(--gf-wash); font-size: 1rem; }
.callout-icon { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid currentColor; border-radius: 50%; font-weight: 600; }
.callout p { margin-top: 4px; }
.diagram { margin-block: 24px; padding: 24px; border: 1px solid var(--gf-rule); border-radius: 12px; }
.diagram svg { display: block; width: 340px; margin-inline: auto; overflow: visible; }
.diagram rect { fill: var(--gf-wash); stroke: var(--gf-rule); }
.diagram text { fill: var(--gf-ink); font: 600 16px var(--gf-ui); }
.diagram path { fill: none; stroke: var(--gf-graphite); stroke-width: 1.5; }
.diagram figcaption { margin-top: 16px; color: var(--gf-graphite); font-size: .9375rem; }
.doc-kinds { list-style: none; padding-left: 0 !important; }
.doc-kinds .gf-mark { margin-right: 8px; }
@media (max-width: 56rem) {
  .docs-layout { grid-template-columns: minmax(0,1fr); gap: 32px; padding-top: 32px; }
  .docs-nav { position: static; max-height: none; padding-bottom: 24px; border-bottom: 1px solid var(--gf-rule); }
  .docs-nav ul { display: flex; flex-wrap: wrap; gap: 4px; }
  .docs-nav ul[data-collapsed] { display: none; }
  .docs-nav a { padding: 8px 12px; }
  .toc { max-height: none; }
}
@media (max-width: 40rem) {
  :root { --site-head: 69px; }
  .site-head .wrap { gap: 12px; min-height: calc(var(--site-head) - 1px); }
  .site-head .nav { width: 100%; }
  .site-head .nav ul { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px 16px; }
  .site-head .nav a { display: block; padding: 12px 8px; }
  .site-head .nav[data-collapsed] { display: none; }
  .hero { padding-top: 48px; }
  .doc-grid { grid-template-columns: minmax(0,1fr); }
  .doc-pagination { flex-direction: column; }
  .doc-pagination a { max-width: none; }
  .diagram { padding: 16px; }
}
.site-foot .resource-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
@media (max-width: 62rem) { .surfaces { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 40rem) { .site-head .nav a { width: fit-content; } }

/* Composition: one spacing scale across the public pages. */
:root { --space-5: 40px; --space-12: 96px; }
.hero { padding-block: var(--space-12); }
.hero > .wrap { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: var(--space-8); align-items: center; }
.hero-copy { padding-block: var(--space-5); }
.hero h1 { font-size: clamp(3.5rem, 5vw, 4rem); line-height: 1.04; max-width: 11ch; letter-spacing: -.035em; }
.hero .lede { max-width: 31ch; font-size: 1.25rem; line-height: 1.6; margin-top: var(--space-3); }
.hero .actions { margin-top: var(--space-5); gap: var(--space-2); }
.hero .actions-note { margin-top: var(--space-1); }
.hero .stage { display: block; margin-top: 0; min-width: 0; }
.hero .margin { display: none; }
.hero .demo-sheet { border-radius: var(--gf-r-panel); padding-inline: var(--space-4); border-color: color-mix(in srgb, var(--gf-ink) 18%, var(--gf-rule)); }
.hero .demo-text { font-size: 1.125rem; line-height: 1.8; }
.hero .demo-hint { padding-inline: var(--space-1); font-size: .875rem; }
.section { padding-block: var(--space-12); }
.section-heading { max-width: 44rem; margin-bottom: var(--space-5); }
.section-heading h2 { max-width: 23ch; font-size: clamp(2rem, 3vw, 2.5rem); line-height: 1.15; }
.section-heading .section-lede { margin-top: var(--space-2); max-width: 52ch; line-height: 1.6; }
.section :is(.moves, .kinds, .moods, .assistant, .routes, .points, .table-wrap) { margin-top: 0; }
.section :is(.move, .kind, .mood) { border: 1px solid var(--gf-rule); border-radius: var(--gf-r-card); padding: var(--space-3); background: var(--gf-paper); }
.section .moves { gap: var(--space-3); }
.section .kinds { gap: var(--space-3); }
.section .moods { gap: var(--space-2); }
.section .small-note, .section .more { margin-top: var(--space-3); }
.section .move-art { border: 0; border-radius: 8px; }
.table-hint { display: none; font-size: .9375rem; color: var(--gf-graphite); margin-bottom: var(--space-2); }
.site-foot { padding-block: var(--space-8) var(--space-4); background: var(--gf-wash); }
.site-foot .footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.site-foot h2 { font-size: 1rem; line-height: 1.5; letter-spacing: 0; }
.site-foot ul { list-style: none; padding: 0; margin-top: var(--space-2); }
.site-foot li + li { margin-top: var(--space-1); }
.site-foot nav a { display: inline-block; padding-block: 4px; text-decoration: none; }
.site-foot nav a:hover { text-decoration: underline; }
.site-foot p { grid-column: auto; }
.footer-brand p { margin-top: var(--space-2); }
.footer-brand .store-status { font-size: .875rem; max-width: 24ch; }
.site-foot .footer-bottom { grid-column: 1 / -1; border-top: 1px solid var(--gf-rule); padding-top: var(--space-3); font-size: .875rem; }
.doc-toc-right { display: none; }
.doc-article .callout { margin-block: var(--space-3); }
.callout-note { --callout-accent: var(--gf-clarity); }
.callout-tip { --callout-accent: var(--gf-engagement); }
.callout-warning { --callout-accent: var(--gf-correctness); }
.callout-privacy { --callout-accent: var(--gf-delivery); }
.callout { border: 1px solid color-mix(in srgb, var(--callout-accent) 32%, var(--gf-rule)); border-left: 3px solid var(--callout-accent); background: color-mix(in srgb, var(--callout-accent) 5%, var(--gf-paper)); }
.callout-icon { color: var(--gf-ink); border-color: var(--callout-accent); background: color-mix(in srgb, var(--callout-accent) 12%, var(--gf-paper)); }
.callout > div { margin-top: 0; }
.numbered-steps { list-style: none; counter-reset: provider-step; padding: 0 !important; }
.numbered-steps > li { counter-increment: provider-step; position: relative; padding: 16px 0 16px 52px; border-bottom: 1px solid var(--gf-rule); }
.numbered-steps > li::before { content: counter(provider-step); position: absolute; left: 0; top: 16px; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--gf-rule); border-radius: 50%; background: var(--gf-wash); font-weight: 600; }
.diagram { padding: var(--space-3); }
.diagram svg { width: 300px; max-width: 100%; }
.diagram .flow-zone { fill: var(--gf-wash); stroke: var(--gf-rule); }
.diagram .provider-zone { fill: color-mix(in srgb, var(--gf-delivery) 5%, var(--gf-paper)); stroke: color-mix(in srgb, var(--gf-delivery) 40%, var(--gf-rule)); }
.diagram .flow-box { fill: var(--gf-paper); stroke: color-mix(in srgb, var(--gf-graphite) 35%, var(--gf-rule)); }
.diagram text { font-size: 16px; }
.diagram .flow-sub { font-size: 14px; font-weight: 400; }
.diagram .zone-title { font-size: 16px; font-weight: 750; }
.diagram .connector { stroke: var(--gf-graphite); stroke-width: 1.5; fill: none; }
.diagram .arrow-fill { fill: var(--gf-graphite); stroke: none; }
@media (min-width: 75rem) {
  .docs-layout { max-width: 1400px; grid-template-columns: 12rem minmax(0, 44rem) 11rem; gap: var(--space-5); }
  .doc-article .doc-toc { display: none; }
  .doc-toc-right { display: block; position: sticky; top: 108px; margin: 0; padding: 0 0 0 20px; border-left: 1px solid var(--gf-rule); }
  .doc-toc-right h2 { margin-top: 0; }
  .doc-toc-right a { font-size: .875rem; padding-block: 8px; }
}
@media (max-width: 74.99rem) {
  .hero > .wrap { gap: var(--space-5); }
}
@media (max-width: 56rem) {
  .hero { padding-block: var(--space-8); }
  .hero > .wrap { grid-template-columns: minmax(0,1fr); gap: var(--space-5); }
  .hero-copy { padding: 0; }
  .hero h1 { max-width: 13ch; }
  .hero .lede { max-width: 40ch; }
  .hero .stage { max-width: 40rem; }
  .section { padding-block: var(--space-8); }
  .site-foot .footer-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: var(--space-4); }
  .footer-brand { grid-column: 1 / -1; }
  .table-hint { display: block; }
}
@media (max-width: 40rem) {
  .hero h1 { font-size: 3.5rem; }
  .hero .demo-sheet { padding-inline: var(--space-3); }
  .hero .actions { align-items: stretch; }
  .hero .actions .btn { width: 100%; }
  .section-heading { margin-bottom: var(--space-4); }
  .section :is(.move, .kind, .mood) { padding: var(--space-2); }
  .site-foot .footer-grid { gap: 32px 16px; }
  .site-foot nav a { font-size: .875rem; }
  .diagram { padding: 16px; }
}

@media (max-width: 40rem) { .site-foot .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
