/* Синглик — «поля и сноски».
   Paper, ink and one green. Yellow marker means only one thing: "check this yourself". */

/* ---------- Fonts ----------
   Literata, Fira Sans, Cascadia Mono: SIL Open Font License 1.1 (fonts/licenses).
   Served from this site; unicode-range loads only the scripts a page actually uses. */
@font-face { font-family: "Literata"; font-style: italic; font-weight: 400 700; font-display: swap; src: url("fonts/literata-italic-400-700-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 400 700; font-display: swap; src: url("fonts/literata-italic-400-700-greek.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 400 700; font-display: swap; src: url("fonts/literata-italic-400-700-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 400 700; font-display: swap; src: url("fonts/literata-italic-400-700-latin.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: "Literata"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/literata-normal-400-700-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/literata-normal-400-700-greek.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/literata-normal-400-700-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/literata-normal-400-700-latin.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: "Fira Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/fira-sans-normal-400-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/fira-sans-normal-400-greek.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/fira-sans-normal-400-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/fira-sans-normal-400-latin.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: "Fira Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/fira-sans-normal-500-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/fira-sans-normal-500-greek.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/fira-sans-normal-500-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/fira-sans-normal-500-latin.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: "Fira Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/fira-sans-normal-600-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/fira-sans-normal-600-greek.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/fira-sans-normal-600-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/fira-sans-normal-600-latin.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: "Cascadia Mono"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/cascadia-mono-normal-400-700-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cascadia Mono"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/cascadia-mono-normal-400-700-greek.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Cascadia Mono"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/cascadia-mono-normal-400-700-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cascadia Mono"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/cascadia-mono-normal-400-700-latin.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; }

/* ---------- Tokens ---------- */
:root {
  --paper: #f3f1ea;
  --sheet: #fbfaf6;
  --field: #fffefb;
  --ink: #1a1c1b;
  --ink-2: #464c49;
  --ink-3: #646a66;
  --rule: #dad6cb;
  --rule-2: #8e9189;
  --green: #0d5c49;
  --green-wash: #dfeae2;
  --marker: #f1d97a;
  --marker-ink: #3d3207;
  --note: #f5eed3;
  --red: #a33a2b;
  --red-wash: #f6e2dc;
  --margin-line: #e3ada2;
  --strip: #1a1c1b;
  --strip-ink: #d9dcd5;
  --focus: rgb(13 92 73 / .25);

  /* Literata has an optical-size axis: the same family is set tighter for headlines and sturdier for text. */
  --font-text: "Literata", "Sitka Text", "PT Serif", Georgia, serif;
  --font-display: "Literata", "Sitka Display", "PT Serif", Georgia, serif;
  --font-banner: "Literata", "Sitka Banner", "PT Serif", Georgia, serif;
  --font-sans: "Fira Sans", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-mono: "Cascadia Mono", Consolas, "SF Mono", "Roboto Mono", monospace;

  --radius: 3px;
  --gutter: 32px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131513;
    --sheet: #1a1d1b;
    --field: #161917;
    --ink: #ebe9e2;
    --ink-2: #b8bbb4;
    --ink-3: #8f948e;
    --rule: #2e322f;
    --rule-2: #676c67;
    --green: #78c9aa;
    --green-wash: #1b2d26;
    --marker: #4b4321;
    --marker-ink: #f3e4a6;
    --note: #23211a;
    --red: #ef917f;
    --red-wash: #3a1f1a;
    --margin-line: #6a3b31;
    --strip: #1f2321;
    --strip-ink: #b8bbb4;
    --focus: rgb(120 201 170 / .3);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  display: flex; flex-direction: column; min-height: 100vh; margin: 0;
  background: var(--paper); color: var(--ink);
  font: 400 16px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { text-decoration-color: var(--green); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
::selection { background: var(--marker); color: var(--ink); }
h1, h2, h3 {
  margin: 0; color: var(--ink);
  font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -.012em;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
b, strong { font-weight: 600; }
sup { line-height: 0; }
code { font-family: var(--font-mono); font-size: .92em; }

.shell { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; top: -100px; left: 12px; z-index: 10; padding: 10px 14px; border-radius: var(--radius); background: var(--ink); color: var(--paper); }
.skip:focus { top: 12px; }

/* ---------- Strip, header, footer ---------- */
.strip {
  padding: 7px 16px;
  background-color: var(--strip);
  background-image: repeating-linear-gradient(-45deg, transparent 0 7px, rgb(255 255 255 / .045) 7px 14px);
  color: var(--strip-ink); font-size: 12.5px; line-height: 1.4; text-align: center; letter-spacing: .01em;
}

.site-header { border-bottom: 1px solid var(--rule); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 80px; }
.brand { display: inline-flex; flex: none; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 34px; height: 34px; }
.brand-bracket { fill: none; stroke: currentColor; stroke-width: 3.6; }
.brand-dot { fill: var(--green); }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font: 600 25px/1 var(--font-display); letter-spacing: -.015em; }
.brand-tag { margin-top: 5px; color: var(--ink-3); font-size: 12px; line-height: 1.2; }
.site-nav { display: flex; align-items: center; gap: 24px; min-width: 0; font-size: 15px; }
.site-nav form { margin: 0; }
.site-nav > a:not(.btn), .link-button { color: var(--ink-2); text-decoration: none; }
.site-nav > a:not(.btn):hover, .link-button:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--green); }
.site-nav > a[aria-current="page"] { color: var(--ink); text-decoration: underline 2px var(--green); text-underline-offset: .5em; }
.link-button { padding: 0; border: 0; background: none; font-size: 15px; cursor: pointer; }
.nav-account {
  max-width: 230px; padding: 3px 11px; overflow: hidden;
  border: 1px solid var(--rule); border-radius: 99px;
  font: 12.5px/1.5 var(--font-mono); text-overflow: ellipsis; white-space: nowrap;
}

.site-footer { margin-top: auto; padding: 28px 0 40px; border-top: 1px solid var(--rule); color: var(--ink-3); font-size: 14px; }
.footer-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 32px; }
.footer-brand { margin-right: auto; }
.footer-brand strong { margin-right: 8px; color: var(--ink); font: 600 17px var(--font-display); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-nav a { color: var(--ink-2); text-decoration-color: var(--rule-2); }
.footer-nav a:hover { color: var(--ink); text-decoration-color: var(--green); }
.footer-meta { font-family: var(--font-mono); font-size: 12.5px; }

/* ---------- Buttons, links, labels ---------- */
.btn {
  --bg: transparent; --fg: var(--ink); --bd: var(--rule-2);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: 11px 20px;
  border: 1px solid var(--bd); border-radius: var(--radius); background: var(--bg); color: var(--fg);
  font: 600 15px/1.25 var(--font-sans); text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { --bg: var(--ink); --fg: var(--paper); --bd: var(--ink); }
.btn-primary:hover { --bg: var(--green); --bd: var(--green); }
.btn-secondary:hover { --bg: var(--sheet); --bd: var(--ink); }
.btn-danger { --fg: var(--red); --bd: var(--red); }
.btn-danger:hover { --bg: var(--red); --fg: var(--paper); }
.btn-sm { min-height: 38px; padding: 7px 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn:disabled { opacity: .6; cursor: progress; }

.link { color: var(--green); font-weight: 500; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.link:hover { text-decoration-color: currentColor; }

.kicker {
  display: flex; align-items: center; gap: 10px; margin: 0 0 20px;
  color: var(--ink-2); font-size: 13px; font-weight: 500; line-height: 1.3; letter-spacing: .015em;
}
.kicker::before { content: ""; flex: none; width: 7px; height: 7px; background: var(--green); }

.cite { margin-left: .12em; color: var(--green); font: 600 .62em/0 var(--font-mono); font-style: normal; letter-spacing: 0; }
mark {
  margin: 0 -.08em; padding: 0 .08em; color: inherit;
  background: linear-gradient(transparent .2em, var(--marker) .2em, var(--marker) calc(100% - .06em), transparent calc(100% - .06em));
  border-radius: .2em .45em .25em .5em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

.tag {
  display: inline-flex; align-items: center; gap: .5em; padding: 4px 10px;
  border-radius: var(--radius); font-size: 12.5px; font-weight: 500; line-height: 1.3; white-space: nowrap;
}
.tag-ok { background: var(--green-wash); color: var(--green); }
.tag-ok::before { content: ""; width: 10px; height: 10px; background: currentColor; clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0, 43% 62%); }
.tag-check { background: var(--marker); color: var(--marker-ink); border-radius: .3em .7em .35em .8em / .7em .35em .8em .4em; }

/* Status glyphs: ring — waiting, half — working, dot — done, diamond — failed, dash — cancelled. */
.status { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 13px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.status::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px currentColor; }
.status-running, .status-succeeded { color: var(--green); }
.status-running::before { background: conic-gradient(currentColor 0 50%, transparent 0); animation: spin 1.4s linear infinite; }
.status-succeeded::before { background: currentColor; }
.status-failed { color: var(--red); }
.status-failed::before { border-radius: 1px; background: currentColor; box-shadow: none; transform: rotate(45deg) scale(.8); }
.status-cancelled { color: var(--ink-3); }
.status-cancelled::before { height: 2px; border-radius: 0; background: currentColor; box-shadow: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.notice {
  margin: 0 0 32px; padding: 14px 18px;
  border-radius: var(--radius); background: var(--note); box-shadow: inset 3px 0 0 var(--marker);
  color: var(--ink-2); font-size: 15px; line-height: 1.55;
}
.notice strong { color: var(--ink); font-weight: 600; }
.messages { display: grid; gap: 8px; margin-top: 28px; }
.messages p { padding: 12px 16px; border-radius: var(--radius); background: var(--green-wash); color: var(--ink); font-size: 15px; }

.card { padding: 32px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); }
.card h2 { margin-bottom: 24px; font-size: 26px; }
.card-alt { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--rule); color: var(--ink-3); font-size: 14px; }
.card-alt a { color: var(--green); font-weight: 500; }

.page-head { padding: 56px 0 32px; }
.page-head h1 { font: 500 clamp(2.2rem, 1.5rem + 2.6vw, 3.4rem)/1.04 var(--font-banner); letter-spacing: -.022em; }
.page-lead { max-width: 48ch; margin-top: 14px; color: var(--ink-2); font: 400 18px/1.55 var(--font-text); }
.lead { max-width: 36ch; margin-bottom: 36px; color: var(--ink-2); font: 400 clamp(1.1rem, 1rem + .35vw, 1.25rem)/1.55 var(--font-text); }
.help { margin-top: 8px; color: var(--ink-3); font-size: 13px; line-height: 1.55; }
.help ul { margin: 6px 0 0; padding-left: 1.1em; }
.help a { color: var(--ink-2); }

/* ---------- Home ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 64px; align-items: center; padding: 80px 0 88px; }
.hero-copy { container-type: inline-size; }
/* Sized by the column, so the headline keeps two lines on any desktop width. */
.display { margin: 0 0 28px; font: 500 clamp(2.1rem, 8.8cqi, 4.4rem)/1 var(--font-banner); letter-spacing: -.022em; }
.display em { color: var(--green); font-style: italic; font-weight: 400; }
.display .cite { position: relative; top: -1.75em; margin-left: .06em; font-size: .27em; vertical-align: baseline; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.footnote {
  position: relative; display: flex; gap: .45em; max-width: 46ch; margin-top: 40px; padding-top: 14px;
  color: var(--ink-3); font-size: 13.5px; line-height: 1.55;
}
.footnote::before { content: ""; position: absolute; top: 0; left: 0; width: 72px; height: 1px; background: var(--ink-3); }
.footnote sup { color: var(--green); font: 600 12px/1.6 var(--font-mono); vertical-align: baseline; }

.specimen { position: relative; isolation: isolate; margin: 0 10px 10px 0; }
.sheet { position: relative; border: 1px solid var(--rule); background: var(--sheet); }
.sheet::before { content: ""; position: absolute; inset: -1px; z-index: -1; border: 1px solid var(--rule); background: var(--paper); transform: translate(10px, 10px); }
.sheet-head { display: flex; justify-content: space-between; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--rule); color: var(--ink-3); font-size: 12.5px; line-height: 1.4; }
.sheet-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 39%); }
.sheet-text { padding: 26px 22px 28px; color: var(--ink-2); font: 400 16.5px/1.6 var(--font-text); }
.sheet-title { margin-bottom: 14px; color: var(--ink); font: 500 24px/1.15 var(--font-display); letter-spacing: -.012em; text-wrap: balance; }
.sheet-margin { display: grid; align-content: start; gap: 20px; padding: 28px 20px 24px; border-left: 1px solid var(--margin-line); }
.note { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; color: var(--ink-2); font-size: 13px; line-height: 1.45; }
.note .cite { grid-row: span 2; margin: 0; font-size: 11px; line-height: 1.75; }
.note-quote { color: var(--ink); font: italic 400 14px/1.45 var(--font-text); }
.note-source { margin-top: 4px; color: var(--ink-3); font: 11.5px/1.4 var(--font-mono); }
.sheet-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 22px 16px; border-top: 1px solid var(--rule); }
.specimen figcaption { margin-top: 22px; color: var(--ink-3); font-size: 12.5px; line-height: 1.4; text-align: right; }

.section { padding: 72px 0 80px; border-top: 1px solid var(--rule); }
.section-head h2 { max-width: 22ch; font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.6rem); font-weight: 500; letter-spacing: -.02em; }
.steps { margin: 44px 0 0; padding: 0; border-top: 1px solid var(--ink); list-style: none; }
.step { display: grid; grid-template-columns: 100px minmax(0, 4fr) minmax(0, 7fr); gap: 8px 32px; align-items: baseline; padding: 30px 0 32px; border-bottom: 1px solid var(--rule); }
.step-num { color: var(--green); font: 400 64px/.8 var(--font-banner); font-variant-numeric: oldstyle-nums; }
.step h3 { font-size: 24px; font-weight: 500; }
.step p { max-width: 54ch; color: var(--ink-2); }

.support { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px 56px; align-items: center; padding: 56px 0 80px; border-top: 1px solid var(--rule); }
.support .kicker { grid-column: 1 / -1; margin: 0; }
/* Logos keep their original colours, so they always sit on a light plate. */
.support-logos { display: flex; align-items: center; gap: 30px; padding: 18px 28px; border: 1px solid var(--rule); border-radius: var(--radius); background: #fbfaf6; }
.support-logos img { width: auto; height: 76px; }
.support-logos .platform-logo { height: 108px; margin: -16px 0; }
.support-text { max-width: 62ch; color: var(--ink-2); font-size: 15px; line-height: 1.65; }

/* ---------- Auth ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 80px; align-items: start; padding: 72px 0 96px; }
.auth-intro h1 { margin-bottom: 24px; font: 500 clamp(2.5rem, 1.6rem + 3.2vw, 4.25rem)/1 var(--font-banner); letter-spacing: -.026em; }
.auth-intro .lead { margin-bottom: 32px; }
.auth-intro .notice { max-width: 46ch; margin: 0; }
.legal-hint { margin: 4px 0 18px; }

/* ---------- Forms ---------- */
.field { min-width: 0; margin: 0 0 22px; padding: 0; border: 0; }
.field > label, .field > legend { display: block; margin: 0 0 8px; padding: 0; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.4; }
.field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea {
  display: block; width: 100%; min-width: 0; padding: 11px 14px;
  border: 1px solid var(--rule-2); border-radius: var(--radius); background: var(--field); color: var(--ink);
  font: 400 16px/1.5 var(--font-sans);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 7.2em; max-height: 22em; resize: vertical; field-sizing: content; }
.field-topic textarea { font: 400 18px/1.5 var(--font-text); }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--ink-3); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px var(--focus); }
.field.has-error input, .field.has-error textarea, .field.has-error select, .field [aria-invalid="true"] { border-color: var(--red); }
::placeholder { color: var(--ink-3); opacity: 1; }
.errorlist { margin: 8px 0 0; padding: 0; list-style: none; color: var(--red); font-size: 13.5px; font-weight: 500; line-height: 1.5; }
.errorlist.nonfield { margin: 0 0 22px; padding: 12px 16px; border-radius: var(--radius); background: var(--red-wash); }
.form-note { margin: 4px 0 20px; }

.choices { display: grid; gap: 8px; }
.choice {
  display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 12px; align-items: start;
  padding: 13px 16px; border: 1px solid var(--rule-2); border-radius: var(--radius); background: var(--field);
  cursor: pointer; transition: border-color .15s ease, background-color .15s ease;
}
.choice:hover { border-color: var(--ink-3); }
.choice:has(input:checked) { border-color: var(--green); background: var(--green-wash); }
.choice input {
  appearance: none; -webkit-appearance: none; display: grid; place-content: center; grid-row: span 2;
  width: 18px; height: 18px; margin: 2px 0 0; border: 1.5px solid var(--ink-3); border-radius: 50%; background: var(--field); cursor: pointer;
}
.choice input::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); transform: scale(0); transition: transform .15s ease; }
.choice input:checked { border-color: var(--green); }
.choice input:checked::before { transform: scale(1); }
.choice-title { font-size: 15px; font-weight: 600; line-height: 1.4; }
.choice-desc { color: var(--ink-3); font-size: 13.5px; line-height: 1.45; }
.choice:has(input:checked) .choice-desc { color: var(--ink-2); }
/* The arXiv query only matters for arXiv; without :has() support the field simply stays visible. */
.research-form:has(input[value="sample"]:checked) .field-search_query { display: none; }

.check { display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 12px; align-items: start; margin: 0 0 14px; }
.check input {
  appearance: none; -webkit-appearance: none; display: grid; place-content: center;
  width: 20px; height: 20px; margin: 2px 0 0; border: 1.5px solid var(--ink-3); border-radius: var(--radius); background: var(--field);
  cursor: pointer; transition: background-color .15s ease, border-color .15s ease;
}
.check input::before { content: ""; width: 12px; height: 12px; background: var(--paper); clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0, 43% 62%); transform: scale(0); transition: transform .12s ease; }
.check input:hover { border-color: var(--ink-2); }
.check input:checked { border-color: var(--green); background: var(--green); }
.check input:checked::before { transform: scale(1); }
.check label { font-size: 15px; line-height: 1.5; cursor: pointer; }
.check .errorlist { grid-column: 2; margin-top: 2px; }

/* ---------- Workspace ---------- */
.workspace { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; padding-bottom: 96px; }
.history-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.history-head h2 { font-size: 26px; }
.count { color: var(--ink-3); font: 500 14px var(--font-mono); }
.runs { margin: 0; padding: 0; list-style: none; }
.run { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: center; padding: 20px 4px 22px 0; border-bottom: 1px solid var(--rule); color: inherit; text-decoration: none; }
.run-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; color: var(--ink-3); font-size: 13px; }
.run-topic {
  display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  color: var(--ink); font: 500 20px/1.35 var(--font-display); letter-spacing: -.008em; overflow-wrap: anywhere;
  transition: color .15s ease;
}
.run-open { grid-column: 2; grid-row: 1 / span 2; color: var(--ink-3); font-size: 20px; transition: transform .2s ease, color .2s ease; }
.run:hover .run-topic, .run:hover .run-open { color: var(--green); }
.run:hover .run-open { transform: translateX(4px); }

.empty { margin-top: 24px; padding: 36px 32px 32px; border: 1px dashed var(--rule-2); border-radius: var(--radius); }
.empty h3 { margin-bottom: 8px; font-size: 22px; font-weight: 500; }
.empty p { max-width: 44ch; color: var(--ink-2); font-size: 15px; }
/* An empty notebook page: ruled lines and a margin. */
.empty::after {
  content: ""; display: block; height: 61px; margin-top: 26px;
  background:
    linear-gradient(90deg, transparent 28px, var(--margin-line) 28px 29px, transparent 29px),
    repeating-linear-gradient(transparent 0 14px, var(--rule) 14px 15px);
}

/* ---------- Research document ---------- */
.back { display: inline-flex; gap: 8px; margin-bottom: 28px; color: var(--ink-2); font-size: 14px; text-decoration: none; }
.back:hover { color: var(--ink); }
.doc-head h1.doc-title { max-width: 30ch; font-size: clamp(1.9rem, 1.35rem + 2vw, 3rem); overflow-wrap: anywhere; }
.doc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; margin-top: 18px; color: var(--ink-3); font-size: 13.5px; }

.state { margin: 0 0 96px; padding: 40px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); }
.state h2 { margin-bottom: 10px; font-size: 28px; }
.state > p { max-width: 68ch; color: var(--ink-2); }
.state > .btn, .state > form { margin-top: 24px; }
.state-failed { border-color: color-mix(in srgb, var(--red) 45%, var(--rule)); }
.state code { padding: 1px 6px; border: 1px solid var(--rule); border-radius: 2px; background: var(--paper); color: var(--ink); }

.stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 32px 0 26px; padding: 0; list-style: none; }
.stages li { position: relative; padding: 24px 12px 0 0; color: var(--ink-3); font-size: 14px; line-height: 1.4; }
.stages li::before { content: ""; position: absolute; top: 5px; right: 0; left: 0; height: 2px; background: var(--rule); }
.stages li:last-child::before { display: none; }
.stages li::after { content: ""; position: absolute; top: 0; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--sheet); box-shadow: inset 0 0 0 2px var(--rule-2); }
.stages .is-done { color: var(--ink-2); }
.stages .is-done::before, .stages .is-done::after { background: var(--green); box-shadow: none; }
.stages .is-current { color: var(--ink); font-weight: 600; }
.stages .is-current::before { background: linear-gradient(var(--green), var(--green)) no-repeat, var(--rule); background-size: 30% 100%; animation: sweep 1.8s ease-in-out infinite; }
.stages .is-current::after { background: var(--sheet); box-shadow: inset 0 0 0 2px var(--green), 0 0 0 4px var(--focus); }
@keyframes sweep { from { background-position: -43% 0, 0 0; } to { background-position: 143% 0, 0 0; } }

.result { padding-bottom: 96px; }
.result-bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin: 8px 0 22px; }
.result-bar h2 { margin-bottom: 6px; font-size: clamp(1.5rem, 1.25rem + .9vw, 2rem); }
.result-bar .help { margin: 0; font-size: 14px; }
.downloads { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.downloads-label { margin-right: 4px; color: var(--ink-3); font-size: 13px; }
.warnings { display: grid; gap: 6px; margin: 0 0 28px; padding: 0; list-style: none; }
.warnings li { position: relative; padding-left: 24px; color: var(--ink-2); font-size: 14px; }
.warnings li::before {
  content: "!"; position: absolute; top: .2em; left: 0; display: grid; place-items: center; width: 15px; height: 15px;
  border-radius: 50%; background: var(--marker); color: var(--marker-ink); font: 700 10px/1 var(--font-mono);
}

/* Parallel text: the claim on the page, the quote in the margin. */
.claims { margin: 0; padding: 0; border-top: 1px solid var(--ink); list-style: none; }
.claim { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); border-bottom: 1px solid var(--rule); }
.claim-body { position: relative; padding: 30px 36px 32px 64px; }
.claim-num { position: absolute; top: 22px; left: 0; color: var(--green); font: 400 44px/1 var(--font-banner); font-variant-numeric: oldstyle-nums; }
.claim-label { margin-bottom: 10px; color: var(--ink-3); font-size: 12.5px; font-weight: 500; letter-spacing: .01em; }
.claim-text { margin-bottom: 18px; color: var(--ink); font: 400 18px/1.65 var(--font-text); white-space: pre-wrap; overflow-wrap: anywhere; }
.claim-evidence { padding: 30px 0 32px 32px; border-left: 1px solid var(--margin-line); }
.quote { margin: 0; color: var(--ink-2); font: italic 400 16px/1.6 var(--font-text); white-space: pre-wrap; overflow-wrap: anywhere; }
.quote-missing { color: var(--ink-3); font-style: normal; }
.source { margin-top: 16px; color: var(--ink-3); font-size: 13px; line-height: 1.5; }
.source-key { margin-right: 4px; padding: 1px 5px; border: 1px solid currentColor; border-radius: 2px; color: var(--green); font: 600 11.5px var(--font-mono); }

.raw-draft { margin-top: 40px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); }
.raw-draft summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; font-size: 15px; font-weight: 600; list-style: none; cursor: pointer; }
.raw-draft summary::-webkit-details-marker { display: none; }
.raw-draft summary::after { content: "+"; color: var(--ink-3); font: 400 20px/1 var(--font-mono); }
.raw-draft[open] summary::after { content: "−"; }
.raw-draft summary:hover { color: var(--green); }
.raw-draft pre { max-height: 70vh; margin: 0; padding: 20px 24px 24px; overflow: auto; border-top: 1px solid var(--rule); color: var(--ink-2); font: 13px/1.75 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Account, legal ---------- */
.narrow { max-width: 760px; padding-bottom: 96px; }
.facts { display: grid; gap: 4px; margin: 22px 0 0; }
.facts div { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 15px; }
.facts dt { min-width: 150px; color: var(--ink-3); }
.facts dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.facts dd .inline-form { display: inline-block; margin: 6px 0 0; }
.facts .mono { font: 14px/1.7 var(--font-mono); }
.danger { padding: 32px; border: 1px solid color-mix(in srgb, var(--red) 35%, var(--rule)); border-radius: var(--radius); background: var(--sheet); }
.danger h2 { margin-bottom: 14px; color: var(--red); font-size: 26px; }
.danger > p { max-width: 62ch; margin-bottom: 20px; color: var(--ink-2); }
.danger .notice { margin-bottom: 26px; }
.danger .btn { margin-top: 8px; }

.legal { display: grid; grid-template-columns: 220px minmax(0, 1fr); column-gap: 64px; padding-bottom: 96px; }
.legal-head { grid-column: 1 / -1; }
.legal-short { grid-template-columns: minmax(0, 1fr); }
.toc { position: sticky; top: 24px; align-self: start; font-size: 14px; }
.toc-title { margin-bottom: 10px; color: var(--ink-3); font-size: 12.5px; font-weight: 600; }
.toc ol { margin: 0; padding: 0; border-left: 1px solid var(--rule); list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; margin-left: -1px; padding: 6px 0 6px 14px; border-left: 2px solid transparent; color: var(--ink-2); line-height: 1.4; text-decoration: none; }
.toc a::before { content: counter(toc); color: var(--ink-3); font: 12px/1.6 var(--font-mono); }
.toc a:hover { border-left-color: var(--green); color: var(--ink); }
.legal-body { max-width: 68ch; }
.legal-body h2 { margin: 44px 0 14px; font-size: 24px; scroll-margin-top: 24px; }
.legal-body > p { color: var(--ink-2); font: 400 17px/1.72 var(--font-text); }
.legal-body > p + p { margin-top: 1em; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero { gap: 48px; }
  .workspace { gap: 36px; }
  .auth { gap: 48px; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 56px; padding: 48px 0 72px; }
  .specimen { max-width: 560px; }
  .workspace, .auth, .legal, .support, .claim { grid-template-columns: minmax(0, 1fr); }
  .auth { padding: 48px 0 72px; }
  .toc { position: static; margin-bottom: 8px; }
  .step { grid-template-columns: 72px minmax(0, 1fr); }
  .step p { grid-column: 2; }
  .claim-body { padding: 28px 0 20px 52px; }
  .claim-evidence { margin-left: 52px; padding: 16px 0 28px 20px; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .header-row { gap: 12px; min-height: 64px; }
  .brand { gap: 10px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-name { font-size: 21px; }
  .nav-account { display: none; }
  .site-nav { gap: 16px; font-size: 14px; }
  .link-button { font-size: 14px; }
  .page-head { padding: 36px 0 24px; }
  .card, .state, .danger { padding: 22px; }
  .hero { padding-top: 36px; }
  .sheet-body { grid-template-columns: minmax(0, 1fr); }
  .sheet-text { padding: 22px 20px; }
  .sheet-title { font-size: 22px; }
  .sheet-margin { padding: 18px 20px 20px; border-top: 1px solid var(--margin-line); border-left: 0; }
  .section { padding: 56px 0; }
  .step { grid-template-columns: 48px minmax(0, 1fr); gap: 6px 16px; padding: 24px 0; }
  .step-num { font-size: 48px; }
  .support { padding: 44px 0 56px; }
  .support-logos { justify-content: center; gap: 24px; padding: 16px; }
  .support-logos img { height: 60px; }
  .support-logos .platform-logo { height: 86px; margin: -13px 0; }
  .stages { grid-template-columns: minmax(0, 1fr); }
  .stages li { padding: 0 0 18px 28px; }
  .stages li::before { top: 14px; right: auto; bottom: -2px; left: 5px; width: 2px; height: auto; }
  .stages .is-current::before { background-size: 100% 30%; animation-name: sweep-y; }
  .claim-body { padding-left: 40px; }
  .claim-num { font-size: 36px; }
  .claim-evidence { margin-left: 40px; }
  .claim-text { font-size: 17px; -webkit-hyphens: auto; hyphens: auto; }
  .legal-body > p { font-size: 16px; }
  .footer-row { flex-direction: column; gap: 14px; }
}

@media (max-width: 480px) {
  .brand-tag { display: none; }
}

@media (max-width: 380px) {
  .header-row { gap: 8px; }
  .brand { gap: 7px; }
  .brand-mark { width: 24px; height: 24px; }
  .brand-name { font-size: 18px; }
  .site-nav { gap: 10px; font-size: 13px; }
  .site-nav > a, .link-button { font-size: 13px; white-space: nowrap; }
  .site-nav .btn-sm { padding: 6px 10px; }
}

@keyframes sweep-y { from { background-position: 0 -43%, 0 0; } to { background-position: 0 143%, 0 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
  .status-running::before { animation: none; }
  .stages .is-current::before { background-size: 50% 100%; background-position: 0 0, 0 0; animation: none; }
}

@media print {
  .strip, .site-header, .site-footer, .skip, .back, .downloads, .raw-draft, .waiting form { display: none !important; }
  body { background: #fff; color: #000; }
  .claim { break-inside: avoid; }
}
