/* SquidWings site. Direction g06-5e6008 "Tech precise, IBM Plex Mono / IBM Plex Serif, product sheet":
   a spec sheet with hairline rules and callout lines; dials toned to ENERGY 2, RHYTHM 2, MOTION 2 (clean). */

@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-mono-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 700; font-display: swap; src: url("/fonts/ibm-plex-mono-700.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Serif"; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-serif-400.woff2") format("woff2"); }

:root {
  --bg: #0E1517;
  --surface: #132529;
  --text: #DAECF0;
  --muted: #94A9AE;
  --line: #2A3538;
  --accent: #47B5CD;
  --accent-ink: #111111;
  --accent-text: #52BFD7;
  --accent2: #C39466;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--bg);
  /* The faint layout grid of a spec sheet: it lines up with the content columns. */
  background-image:
    linear-gradient(to right, rgba(148, 169, 174, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 169, 174, 0.045) 1px, transparent 1px);
  background-size: 80px 80px;
  color: var(--text);
  font: 400 16.5px/1.65 var(--serif);
  text-rendering: optimizeLegibility;
}

a { color: var(--accent-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 4px; }

code, pre, kbd { font-family: var(--mono); font-size: 0.92em; }
code { color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 0.05em 0.35em; overflow-wrap: anywhere; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: var(--gutter); top: -60px; z-index: 20;
  background: var(--accent); color: var(--accent-ink); font-family: var(--mono); padding: 10px 16px; border-radius: 999px;
}
.skip:focus { top: 12px; }

/* Header */
.top { border-bottom: 1px solid var(--line); background: rgba(14, 21, 23, 0.92); position: sticky; top: 0; z-index: 10; }
.top .wrap { display: flex; align-items: center; gap: 24px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 700 17px/1 var(--mono); }
.brand svg { width: 28px; height: 28px; flex: none; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; font: 500 14px/1 var(--mono); padding: 12px 0; }
.nav a:hover { color: var(--text); }
.nav .lang, .nav .gh { color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; }
.nav .gh:hover, .nav .lang:hover { border-color: var(--accent); }

/* Labels and headings */
.label { font: 500 12.5px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent2); margin: 0 0 14px; }
h1, h2, h3 { font-family: var(--mono); font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3.15rem); max-width: 17ch; text-wrap: balance; }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2.05rem); max-width: 26ch; }
h3 { font-size: 1.02rem; letter-spacing: 0; }
.lead { font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.2rem); color: var(--text); max-width: 60ch; margin: 22px 0 0; }
.muted { color: var(--muted); }

section { padding-block: clamp(48px, 7vw, 80px); border-top: 1px solid var(--line); scroll-margin-top: 64px; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 30px; }
.section-head p { margin: 0; color: var(--muted); max-width: 64ch; }

/* Hero: the sheet's title block and the product view */
.hero { border-top: 0; padding-top: clamp(40px, 7vw, 84px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(36px, 5vw, 64px); }
@media (min-width: 980px) { .hero .wrap { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: start; } }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 30px; }
.button {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px;
  background: var(--accent); color: var(--accent-ink); border-radius: 999px; text-decoration: none;
  font: 700 15px/1 var(--mono); transition: transform 0.2s ease, background-color 0.2s ease;
}
.button:hover { background: var(--accent-text); transform: translateY(-1px); }
.button svg { width: 18px; height: 18px; }
.textlink { font: 500 15px/1.4 var(--mono); padding-block: 12px; }

.facts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 28px 0 0; }
.facts li { font: 500 13px/1 var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; }

/* Command block */
.cmd { position: relative; margin-top: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
.cmd pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-size: 14px; line-height: 1.75; color: var(--text); }
.cmd .prompt { color: var(--accent2); user-select: none; }
.cmd .note { color: var(--muted); }
.cmd-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding: 6px 8px 6px 16px; font: 500 12.5px/1 var(--mono); color: var(--muted); }
.sr-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.copy {
  font: 500 13px/1 var(--mono); color: var(--text); background: transparent; border: 1px solid var(--line);
  border-radius: 999px; min-height: 36px; padding: 0 14px; cursor: pointer;
}
.copy:hover { border-color: var(--accent); }
.copy.is-done { color: var(--accent-text); border-color: var(--accent); }

/* Product view: the layers of SquidWings with callout lines */
.view { margin: 0; }
.layers { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.layer { display: grid; gap: 8px; }
.layer-box {
  display: flex; align-items: baseline; gap: 12px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 4px; padding: 14px 16px;
}
.layer-box b { font: 700 15px/1.3 var(--mono); }
.layer-box span { font: 500 12px/1 var(--mono); color: var(--accent2); }
.layer-note { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; padding-left: 18px; position: relative; }
.layer-note::before { content: ""; position: absolute; left: 6px; top: -8px; bottom: 50%; border-left: 1px solid var(--accent); border-bottom: 1px solid var(--accent); width: 8px; }
.layer:first-child .layer-box { border-color: var(--accent); }
@media (min-width: 640px) {
  .layer { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; gap: 0; }
  .layer-note { padding-left: 46px; }
  .layer-note::before { left: 0; top: 50%; bottom: auto; width: 36px; border-left: 0; border-bottom: 0; border-top: 1px solid var(--accent); }
  .layer-note::after { content: ""; position: absolute; left: 34px; top: calc(50% - 3px); width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
}
.view figcaption { margin-top: 16px; font: 500 12.5px/1.5 var(--mono); color: var(--muted); }

/* Spec table */
.sheet { width: 100%; border-collapse: collapse; }
.sheet th, .sheet td { text-align: left; vertical-align: top; padding: 15px 0; border-bottom: 1px solid var(--line); }
.sheet tr:first-child th, .sheet tr:first-child td { border-top: 1px solid var(--line); }
.sheet th { font: 500 14px/1.5 var(--mono); color: var(--accent2); width: 30%; padding-right: 24px; }
.sheet td { color: var(--text); }
@media (max-width: 639px) {
  .sheet, .sheet tbody, .sheet tr, .sheet th, .sheet td { display: block; width: 100%; }
  .sheet th { border-bottom: 0; padding-bottom: 2px; }
  .sheet td { padding-top: 0; }
  .sheet tr:first-child td { border-top: 0; }
}

/* Numbered steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 18px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.steps li:first-child { border-top: 1px solid var(--line); }
.steps li::before { counter-increment: step; content: counter(step, decimal-leading-zero); grid-row: span 2; font: 700 30px/1 var(--mono); color: var(--accent-text); }
.steps h3 { align-self: end; }
.steps p { margin: 0; color: var(--muted); max-width: 66ch; }
@media (min-width: 760px) { .steps li { grid-template-columns: 96px minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: baseline; } .steps li::before { grid-row: auto; font-size: 38px; } }

.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; } }

/* Data tables that may be wider than a phone scroll inside their own box */
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.data { width: 100%; border-collapse: collapse; font-size: 15px; }
.data th, .data td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data tr:last-child td { border-bottom: 0; }
.data thead th { font: 500 12.5px/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.data td code { background: transparent; border: 0; padding: 0; }
.data.wrap-cells td { white-space: normal; }
.data.wrap-cells td code { overflow-wrap: anywhere; }

.callout { margin: 22px 0 0; border-left: 2px solid var(--accent2); padding: 4px 0 4px 16px; color: var(--muted); max-width: 70ch; }

.addons { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.addons li { padding: 20px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.addons li:first-child { border-top: 1px solid var(--line); }
.addons p { margin: 0; color: var(--muted); max-width: 72ch; }
@media (min-width: 760px) { .addons li { grid-template-columns: minmax(0, 0.32fr) minmax(0, 1fr); gap: 24px; } }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center;
  font: 700 16px/1.4 var(--mono); padding: 18px 0; min-height: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 500 22px/1 var(--mono); color: var(--accent-text); flex: none; transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; color: var(--muted); max-width: 72ch; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding-block: 36px 48px; font: 500 13.5px/1.6 var(--mono); color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; }
.foot ul { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; margin: 0; padding: 0; }
.foot a { color: var(--muted); display: inline-block; padding-block: 8px; }
.foot a:hover { color: var(--text); }

/* Preview: real screenshots and terminal output, framed like the sheet's figures */
.shots { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
@media (min-width: 900px) { .shots { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 28px 40px; } .shot-wide { grid-column: 1 / -1; } }
.shot-side .cmd { margin-top: 0; }
/* On a phone the desktop shot is too small to read, and the phone shot below shows the same answer. */
@media (max-width: 639px) { .shot-wide { display: none; } }
.output pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.shot-phone { max-width: 320px; }
.shot figcaption, .output-note { margin-top: 12px; font: 500 12.5px/1.55 var(--mono); color: var(--muted); }
.output pre { font-size: 13px; line-height: 1.65; }
.output .ok { color: var(--accent-text); }

/* Two guides, side by side from tablet width */
.guides { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 760px) { .guides { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.guides a { display: block; height: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 4px; padding: 18px 20px; text-decoration: none; color: var(--text); transition: border-color 0.2s ease; }
.guides a:hover { border-color: var(--accent); }
.guides b { display: block; font: 700 16px/1.3 var(--mono); color: var(--accent-text); }
.guides span { display: block; margin-top: 6px; color: var(--muted); }

/* Guide pages: a table of contents beside the article from desktop width */
.nav a[aria-current="page"] { color: var(--text); }
.doc-head { border-top: 0; padding-block: clamp(32px, 6vw, 64px) clamp(28px, 4vw, 44px); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0 10px; padding: 0; margin: 0 0 18px; font: 500 13px/1.4 var(--mono); color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 10px; }
.crumbs a { color: var(--muted); display: inline-block; padding-block: 10px; }
.crumbs a:hover { color: var(--text); }
.doc-meta { margin: 18px 0 0; font: 500 13px/1.5 var(--mono); color: var(--muted); }
.doc { padding-top: clamp(28px, 4vw, 44px); }
.doc > .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; }
@media (min-width: 980px) { .doc > .wrap { grid-template-columns: 230px minmax(0, 1fr); gap: 56px; } .toc { position: sticky; top: 84px; align-self: start; } }
.toc ol { list-style: none; counter-reset: toc; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; padding: 7px 0 7px 14px; color: var(--muted); text-decoration: none; font: 500 13.5px/1.4 var(--mono); }
.toc a::before { content: counter(toc, decimal-leading-zero); color: var(--accent2); }
.toc a:hover { color: var(--text); }
.doc article section { border-top: 1px solid var(--line); padding-block: 34px; scroll-margin-top: 72px; }
.doc article section:first-child { border-top: 0; padding-top: 0; }
.doc article h2 { max-width: none; font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem); }
.doc article h2 span { color: var(--accent-text); margin-right: 12px; }
.doc article h3 { margin-top: 22px; }
.doc article p { margin: 14px 0 0; max-width: 70ch; }
.doc article .cmd, .doc article .scroll, .doc article .shot { margin-top: 18px; }
.doc article .faq { margin-top: 18px; }
.points { margin: 14px 0 0; padding-left: 20px; max-width: 70ch; }
.points li { margin: 8px 0; }
.points li::marker { color: var(--accent2); }
.prompts { list-style: none; padding: 0; margin: 18px 0 0; }
.prompts li { display: grid; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.prompts li:first-child { border-top: 1px solid var(--line); }
@media (min-width: 760px) { .prompts li { grid-template-columns: 150px minmax(0, 1fr); gap: 20px; } }
.prompts b { font: 500 13.5px/1.6 var(--mono); color: var(--accent2); }
.doc article .prompts p { margin: 0; }
.next { margin-top: 8px; padding-top: 28px; border-top: 1px solid var(--line); font: 500 15px/1.5 var(--mono); }

/* Small screens: the section links step aside; GitHub and the language stay. */
@media (max-width: 759px) {
  .nav .sec { display: none; }
  .nav { gap: 8px; }
}

/* Motion, calm: the title block and the layers settle in once. */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .lead, .hero .actions, .hero .cmd { animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero .lead { animation-delay: 0.07s; }
  .hero .actions { animation-delay: 0.14s; }
  .hero .cmd { animation-delay: 0.21s; }
  .layer { animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .layer:nth-child(2) { animation-delay: 0.08s; }
  .layer:nth-child(3) { animation-delay: 0.16s; }
  .layer:nth-child(4) { animation-delay: 0.24s; }
  .layer:nth-child(5) { animation-delay: 0.32s; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Not found page */
.missing { min-height: 60vh; display: grid; align-content: center; gap: 18px; padding-block: 80px; }
