/* The Ink Set. Every style is a numbered ink; --ink-c is the ink of the page or of the selected style.
   Black is the base ink for pages that belong to no single style. White paper, black text, a warm desk under sheets, tinted with the current ink. */
:root {
  --k: #17151c; --k2: #45424f; --muted: #5d5a66; --rule: #e4e3e9; --line: #c9c7d1;
  --desk: #f1eee8; --paper: #ffffff;
  --ink-c: #17151c;
  --ui: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --script: "Pinyon Script", "Snell Roundhand", cursive;
  --r: 8px;
  --shadow-paper: 0 1px 2px rgba(23, 21, 28, .1), 0 14px 34px rgba(23, 21, 28, .12);
  --ease: cubic-bezier(.16, 1, .3, 1);
  /* One authored arrow and one plus/minus, drawn at the same 1.8 stroke, used as masks so they take any ink. */
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 8h11M9 3.5 13.5 8 9 12.5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 3v10M3 8h10' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  --minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8h10' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}
.go::after, .goes-with b::after, .related a::after, .hub-card.plain b::after { content: ""; display: inline-block; flex: none; width: 15px; height: 15px; margin-left: 6px; vertical-align: -2px;
  background: var(--ink-c); -webkit-mask: var(--arrow) no-repeat center / contain; mask: var(--arrow) no-repeat center / contain; transition: transform .25s var(--ease); }
.go:hover::after, .goes-with a:hover b::after, .related a:hover::after, .hub-card.plain:hover b::after { transform: translateX(3px); }
* { box-sizing: border-box; }
/* Tints are derived wherever an ink is set, so they follow the local ink, not the root one. */
:root, body, [style*="--ink-c"] { --ink-soft: color-mix(in srgb, var(--ink-c) 9%, #fff); --ink-mid: color-mix(in srgb, var(--ink-c) 30%, #fff); }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line) transparent; }
body { margin: 0; overflow-x: clip; background: var(--paper); color: var(--k); font: 16px/1.55 var(--ui); accent-color: var(--ink-c); caret-color: var(--ink-c); }
[hidden] { display: none !important; }
::selection { background: var(--ink-c); color: #fff; }
a { color: var(--k); text-decoration-color: var(--ink-c); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--ink-c); }
:focus-visible { outline: 2.5px solid var(--k); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { text-wrap: balance; }
img { max-width: 100%; }
.wrap { max-width: 1280px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
@media (min-width: 900px) { .wrap { padding-left: 40px; padding-right: 40px; } }

/* Top bar */
.topbar { background: var(--paper); border-bottom: 1px solid var(--rule); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 10px 28px; min-height: 64px; flex-wrap: wrap; padding-block: 8px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--k); text-decoration: none; }
.logo:hover { color: var(--k); }
.logo-mark { font: 400 34px/1 var(--script); color: var(--ink-c); width: 1.3em; text-align: center; transition: color .5s var(--ease); }
.logo-word { font-weight: 800; font-size: 17px; letter-spacing: -.015em; }
.topbar nav { display: flex; gap: 4px 24px; flex-wrap: wrap; }
.topbar nav a { color: var(--k); text-decoration: none; font-weight: 500; font-size: 15px; padding-block: 6px; }
.topbar nav a:hover { color: var(--ink-c); }
.topbar nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--k); }

/* The ink band: every page opens on its ink. Full-bleed from inside .wrap. */
.intro { position: relative; background-color: var(--ink-c); border-image: conic-gradient(var(--ink-c) 0 0) fill 0 / / 0 100vmax; color: #fff; transition: background-color .4s;
  padding-block: 40px 44px; margin-bottom: 8px; }
.intro h1 { margin: 0; font-size: clamp(2rem, 4.4vw, 3.3rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.02; max-width: 22ch; }
.intro > p { margin: 14px 0 0; max-width: 60ch; font-size: 1.08rem; color: #fff; }
.intro a { color: #fff; text-decoration-color: rgba(255, 255, 255, .6); }
.intro a:hover { color: #fff; text-decoration-color: #fff; }
.intro :focus-visible { outline-color: #fff; }
.crumbs { font-size: .88rem; margin-bottom: 18px; color: #fff; }
.crumbs a { color: #fff; }

/* Style pages: the letterforms at specimen scale beside the title */
.intro.spec { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 40px; align-items: end; }
.intro.spec > * { grid-column: 1; }
.intro.spec .style-facts { grid-column: 1 / -1; }
.specimen { grid-column: 2 !important; grid-row: 1 / span 3; align-self: center; font-size: clamp(7rem, 17vw, 15rem); line-height: .9; color: #fff;
  white-space: nowrap; user-select: none; padding-right: 8px; }
.ink-tag { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 10px; }
.ink-tag::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
@media (max-width: 760px) { .intro.spec { grid-template-columns: 1fr; } .specimen { grid-row: 1; grid-column: 1 !important; justify-self: end; font-size: 8.5rem; margin: -10px -8px -24px 0; opacity: 1; } }

/* Facts strip: one label, segmented, tabular */
.style-facts { display: flex; flex-wrap: wrap; margin: 26px 0 0; background: var(--paper); color: var(--k); border-radius: var(--r); width: fit-content; max-width: 100%; }
.style-facts div { padding: 10px 18px; border-left: 1.5px dashed var(--line); }
.style-facts div:first-child { border-left: 0; }
.style-facts dt, .facts dt { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.style-facts dd, .facts dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.style-facts dt { white-space: nowrap; }
.style-facts dd.plain { font-variant-numeric: normal; }
.style-facts dd small { display: block; font-weight: 400; font-size: .78rem; color: var(--muted); }
@media (max-width: 760px) { .style-facts { width: 100%; } .style-facts div { flex: 1 1 45%; border-left: 0; border-top: 1.5px dashed var(--line); } .style-facts div:nth-child(-n+2) { border-top: 0; } }

/* Buttons */
button { font: 600 15px var(--ui); color: var(--k); cursor: pointer; }
.button, button.primary, button.ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: var(--r); border: 1.5px solid var(--k); background: var(--paper); color: var(--k); font: 600 15px/1.2 var(--ui); text-decoration: none;
  transition: background-color .2s, border-color .2s, transform .2s var(--ease); }
.button:hover, button.ghost:hover { color: var(--k); background: var(--ink-soft); }
.button.primary, button.primary { background: var(--ink-c); border-color: var(--ink-c); color: #fff; }
.button.primary:hover, button.primary:hover { color: #fff; background: color-mix(in srgb, var(--ink-c) 86%, #000); }
.button:active, button.primary:active, button.ghost:active { transform: translateY(1px); }
.intro .button { border-color: #fff; background: #fff; color: var(--ink-c); }
.intro .button:hover { background: color-mix(in srgb, #fff 88%, var(--ink-c)); color: var(--ink-c); }

/* Form controls */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 0; margin-bottom: 10px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .lbl { font-size: .86rem; font-weight: 600; color: var(--k); letter-spacing: 0; text-transform: none; }
.field small, .computed { color: var(--muted); font-size: .8rem; }
.computed { margin: 0; font-variant-numeric: tabular-nums; }
input[type=text], input[type=number], select, textarea {
  width: 100%; font: 500 15px/1.35 var(--ui); color: var(--k); background: var(--paper);
  border: 1.5px solid var(--line); border-radius: var(--r); padding: 9px 11px; min-height: 42px; font-variant-numeric: tabular-nums;
  transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: var(--k2); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 0; border-color: var(--k); box-shadow: 0 0 0 3px var(--ink-mid); border-radius: var(--r); }
input:disabled { color: var(--muted); background: #f6f6f8; border-color: var(--rule); }
select { appearance: none; padding-right: 32px; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2317151c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center; }
textarea { resize: vertical; }
input[type=range] { width: 100%; accent-color: var(--ink-c); }
.check { display: flex; align-items: center; gap: 10px; font-size: .92rem; font-weight: 500; flex-wrap: wrap; min-height: 32px; }
.check input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: var(--k); }
.check input[type=number] { width: 72px; min-height: 36px; padding: 5px 8px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* Segmented control */
.seg-row { display: grid; grid-template-columns: repeat(4, 1fr); border: 1.5px solid var(--k); border-radius: var(--r); overflow: hidden; }
.seg-row label { position: relative; border-left: 1.5px solid var(--k); }
.seg-row label:first-child { border-left: 0; }
.seg-row input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-row span { display: grid; place-items: center; min-height: 42px; padding: 6px 4px; text-align: center; font-size: .86rem; font-weight: 600; line-height: 1.15; cursor: pointer; transition: background-color .15s; }
.seg-row input:hover + span { background: var(--ink-soft); }
.seg-row input:checked + span { background: var(--k); color: #fff; }
.seg-row input:focus-visible + span { outline: 2.5px solid var(--ink-c); outline-offset: -4px; }

/* ---------- Worksheet maker ---------- */
.maker-band { padding-bottom: 0 !important; margin-bottom: 0; }
.maker-band .ink-wipe { position: absolute; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); background: var(--ink-prev, var(--ink-c)); clip-path: inset(0 0 0 100%); pointer-events: none; }
.maker-band.wiping .ink-wipe { animation: inkwipe .55s var(--ease) both; }
@keyframes inkwipe { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 0 0 100%); } }
.maker-band > :not(.ink-wipe) { position: relative; }
.inks { display: flex; gap: 6px; margin: 30px 0 0; padding: 0; border: 0; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.inks::-webkit-scrollbar { display: none; }
.inks legend { color: #fff; position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.ink-label { position: relative; flex: 1 0 auto; min-width: max-content; scroll-snap-align: start; text-decoration: none; }
.ink-label input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ink-label span { display: grid; gap: 2px; height: 100%; padding: 11px 12px 13px; border-radius: 10px 10px 0 0; color: #fff;
  background: rgba(0, 0, 0, .16); cursor: pointer; transition: background-color .2s, color .2s; }
.ink-label small { display: flex; align-items: center; gap: 6px; font: 700 .72rem/1.2 var(--ui); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.ink-label small::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--dot); box-shadow: 0 0 0 1.5px #fff; }
.ink-label em { font-style: normal; font-size: 27px; line-height: 1.2; white-space: nowrap; }
.ink-label input:hover + span, a.ink-label:hover span { background: rgba(0, 0, 0, .28); color: #fff; }
a.ink-label:focus-visible { outline: 0; } a.ink-label:focus-visible span { outline: 2.5px solid #fff; outline-offset: 2px; }
.intro.has-tabs { padding-bottom: 0; }
.ink-label input:checked + span { background: var(--paper); color: var(--k); }
.ink-label input:checked + span small::before { box-shadow: none; }
.ink-label input:focus-visible + span { outline: 2.5px solid #fff; outline-offset: 2px; }

.maker { display: grid; grid-template-columns: 372px minmax(0, 1fr); align-items: start; }
.controls { padding: 26px 28px 40px 2px; display: grid; gap: 22px; align-content: start; border-right: 1px solid var(--rule);
  position: sticky; top: 0; max-height: 100vh; overflow-y: auto; scrollbar-width: thin; }
.box { border-top: 1px solid var(--rule); padding-top: 18px; display: grid; gap: 12px; }
.group { display: grid; gap: 14px; }
.actions { display: grid; gap: 10px; border-top: 1px solid var(--rule); padding-top: 20px; }
.actions .primary { min-height: 52px; font-size: 16px; }
.toast { font-size: .85rem; color: var(--muted); min-height: 1.3em; }

/* The desk takes a little of the current ink, so the sheet sits on a mat of its own colour. */
.desk, .sheet-cards { --desk: color-mix(in oklab, var(--ink-c) 7%, #f3f0ea); }
.desk { padding: 26px 0 56px 32px; min-width: 0; border-image: conic-gradient(var(--desk) 0 0) fill 0 / / 0 100vmax 0 0; }
.desk-top { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 18px; }
.facts { display: flex; flex-wrap: wrap; margin: 0; background: var(--paper); border: 1.5px solid var(--k); border-radius: var(--r); font-size: .88rem; }
.facts div { padding: 6px 14px; border-left: 1.5px dashed var(--line); }
.facts div:first-child { border-left: 0; }
.facts dt { font-size: .72rem; }
.preview-note { font-size: .82rem; color: var(--muted); flex-basis: 100%; order: 3; margin: -6px 0 0; }
.print-top { flex: none; margin-left: auto; }
.desk-body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; align-items: start; }
#pages-root { display: grid; gap: 24px; justify-items: center; min-width: 0; }
/* Reserve a letter-sized page before the script draws the sheet, so the layout doesn't jump. */
#pages-root:empty::before { content: ""; width: 100%; max-width: 760px; aspect-ratio: 215.9 / 279.4; background: #fff; box-shadow: var(--shadow-paper); }
.page { width: 100%; max-width: 760px; background: #fff; box-shadow: var(--shadow-paper); overflow: hidden; }
.page svg { display: block; width: 100%; height: auto; }

.goes-with { position: sticky; top: 20px; display: grid; gap: 4px; }
.goes-with h2 { font-size: .95rem; font-weight: 700; margin: 0 0 8px; letter-spacing: -.01em; }
.goes-with a { display: grid; gap: 3px; padding: 14px 16px; background: var(--paper); border-radius: var(--r); text-decoration: none; color: var(--k);
  border: 1.5px solid transparent; transition: border-color .2s, transform .25s var(--ease); }
.goes-with a:hover { border-color: var(--ink-c); color: var(--k); transform: translateY(-1px); }
.goes-with b { font-size: .98rem; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.goes-with span { font-size: .84rem; color: var(--muted); line-height: 1.4; }
.goes-with .aff { font-size: .74rem; color: var(--muted); margin: 6px 2px 0; }

@media (max-width: 1180px) { .desk-body { grid-template-columns: 1fr; } .goes-with { position: static; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); } .goes-with h2 { grid-column: 1 / -1; } }
@media (max-width: 900px) {
  .maker { grid-template-columns: 1fr; }
  .controls { border-right: 0; padding-right: 0; position: static; max-height: none; overflow: visible; }
  .desk { padding: 24px 0 40px; border-image: conic-gradient(var(--desk) 0 0) fill 0 / / 0 100vmax; }
}
@media (max-width: 900px) {
  .print-top { position: fixed; left: 16px; right: 16px; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 5; min-height: 52px;
    box-shadow: 0 10px 28px rgba(23, 21, 28, .28); }
  .maker-page .sitefoot { padding-bottom: 96px; }
}
@media (max-width: 480px) { .seg-row { grid-template-columns: 1fr 1fr; } .seg-row label:nth-child(3) { border-left: 0; } .seg-row label:nth-child(n+3) { border-top: 1.5px solid var(--k); } .row3 { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { .maker-band.wiping .ink-wipe { animation: none; } * { transition-duration: 0s !important; } }

/* ---------- Content sections ---------- */
.content { padding-block: 56px 72px; display: grid; gap: 52px; }
.content > *, .guide > * { max-width: 880px; }
.content > * { min-width: 0; }
.content h2, .block h2 { font-size: clamp(1.45rem, 2.4vw, 1.85rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.15; margin: 0 0 14px; }
.content h3 { font-size: 1.15rem; letter-spacing: -.01em; }
.content p, .content li { max-width: 68ch; }
.content ol { padding-left: 22px; display: grid; gap: 10px; }
.content ol li::marker { font-weight: 800; color: var(--ink-c); }
.block { padding-block: 44px 8px; }
.block-head { display: flex; justify-content: space-between; align-items: end; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 18px; }
.block-head h2 { margin: 0; }
.lede { color: var(--k2); margin: 0 0 22px; max-width: 64ch; font-size: 1.04rem; }
.note { font-size: .86rem; color: var(--muted); }

/* Style links: each style as its numbered ink */
.style-links { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 10px; }
.style-links li { position: relative; display: grid; gap: 2px; padding: 14px 16px 16px; border: 1.5px solid var(--rule); border-radius: 10px; background: var(--paper); transition: border-color .2s; }
.style-links li:hover { border-color: var(--ink-c); }
.style-links li:has(a:focus-visible) { outline: 2.5px solid var(--k); outline-offset: 2px; }
.style-links a { font-weight: 700; text-decoration: none; color: var(--k); display: flex; align-items: center; gap: 9px; }
.style-links a::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--ink-c); flex: none; }
.style-links a::after { content: ""; position: absolute; inset: 0; }
.style-links a:focus-visible { outline: 0; }
.style-links span { font-size: .84rem; color: var(--muted); }
.style-links .sample { font-size: 1.7rem; color: var(--ink-c); line-height: 1.25; margin: 4px 0 2px; }

/* FAQ */
#faq details { border-top: 1px solid var(--rule); }
#faq details:last-of-type { border-bottom: 1px solid var(--rule); }
summary { list-style: none; cursor: pointer; font-weight: 700; padding: 16px 40px 16px 0; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::before, summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 2px; background: var(--ink-c); transition: transform .3s var(--ease); }
summary::after { transform: rotate(90deg); }
details[open] summary::after { transform: rotate(0); }
summary:hover { color: var(--ink-c); }
details p { margin: 0 0 18px; color: var(--k2); max-width: 68ch; }

/* Footer: the whole ink set */
.sitefoot { background: var(--k); color: #fff; padding-block: 44px 32px; }
.ink-set { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; box-shadow: inset 0 -2px 0 rgba(255, 255, 255, .18); }
.ink-set a { display: grid; gap: 2px; padding: 12px 12px 14px; background: var(--ink-c); color: #fff; text-decoration: none;
  border-radius: 10px 10px 0 0; transition: transform .3s var(--ease); transform-origin: bottom; }
.ink-set a:hover { color: #fff; transform: translateY(-5px); }
.ink-set a:focus-visible { outline-color: #fff; }
.ink-no { font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; font-weight: 700; white-space: nowrap; }
.ink-name { font-size: 1.75rem; line-height: 1.2; font-weight: 400; white-space: nowrap; }
.foot-row { display: flex; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap; margin-top: 30px; font-size: .88rem; }
.foot-row p { margin: 0; max-width: 60ch; color: #fff; }
.footlinks { display: flex; gap: 6px 22px; flex-wrap: wrap; }
.footlinks a { color: #fff; text-decoration-color: rgba(255, 255, 255, .45); }
.footlinks a:hover { color: #fff; text-decoration-color: #fff; }
@media (max-width: 1100px) { .ink-set { display: flex; overflow-x: auto; scrollbar-width: none; } .ink-set a { flex: 1 0 auto; min-width: max-content; } }

/* Print: only the sheets, whether printed with the button or the browser's own Print (Ctrl+P). */
@media print {
  .maker-page { background: #fff; }
  .maker-page .topbar, .maker-page .sitefoot, .maker-page .intro, .maker-page .content,
  .maker-page .controls, .maker-page .desk-top, .maker-page .goes-with, .maker-page main > :not(form) { display: none !important; }
  .maker-page main, .maker-page .maker, .maker-page .desk, .maker-page .desk-body, .maker-page #pages-root { display: block; padding: 0; margin: 0; max-width: none; background: none; box-shadow: none; border-image: none; }
  .maker-page .page { box-shadow: none; max-width: none; width: auto; border-radius: 0; break-after: page; page-break-after: always; }
  .maker-page .page:last-child { break-after: auto; page-break-after: auto; }
  .maker-page .page svg { display: block; }
}

/* ---------- Generator ---------- */
.gen { display: grid; gap: 20px; padding-block: 28px 56px; }
.gen-controls { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto auto; gap: 18px 28px; align-items: end;
  padding: 20px 22px; border: 1.5px solid var(--k); border-radius: 12px; background: var(--paper); position: sticky; top: 10px; z-index: 2;
  box-shadow: 0 10px 30px rgba(23, 21, 28, .08); }
@media (max-width: 1000px) { .gen-controls { grid-template-columns: 1fr 1fr; position: static; } .gen-text { grid-column: 1 / -1; } }
@media (max-width: 560px) { .gen-controls { grid-template-columns: 1fr; } }
.gen-text textarea { font-size: 1.1rem; font-weight: 500; min-height: 52px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { position: relative; display: grid; justify-items: center; gap: 4px; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.swatch span { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--line); display: block; }
.swatch span.clear { background: repeating-conic-gradient(#dcdbe2 0 25%, #fff 0 50%) 0 0 / 10px 10px; }
.swatch em { font-style: normal; font-size: .72rem; font-weight: 500; color: var(--muted); }
.swatch input:checked + span { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--k); }
.swatch input:focus-visible + span { outline: 2.5px solid var(--k); outline-offset: 5px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; border-radius: 999px; padding: 7px 16px; font-size: .9rem;
  border: 1.5px solid var(--line); background: var(--paper); transition: border-color .15s, background-color .15s; }
.chips button::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--chip, var(--k)); }
.chips button:hover { border-color: var(--k); }
.chips button[aria-pressed="true"] { background: var(--chip, var(--k)); border-color: var(--chip, var(--k)); color: #fff; }
.chips button[aria-pressed="true"]::before { background: #fff; }
.gen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 14px; }
.gen-card { background: var(--paper); border: 1.5px solid var(--rule); border-radius: 12px; overflow: hidden; display: grid; grid-template-rows: 1fr auto; transition: border-color .2s; }
.gen-card:hover { border-color: var(--line); }
.gen-sample { min-height: 170px; padding: 26px 22px; display: flex; align-items: center; justify-content: center; text-align: center;
  line-height: 1.25; overflow-wrap: anywhere; min-width: 0; }
.gen-sample[data-bg="clear"] { background: repeating-conic-gradient(#f3f2f6 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.gen-sample.skin { box-shadow: inset 0 0 60px rgba(60, 30, 10, .18); }
.gen-sample.dark[data-bg="clear"] { background: repeating-conic-gradient(#2a2832 0 25%, #221f29 0 50%) 0 0 / 16px 16px; }
.gen-meta { display: grid; gap: 10px; padding: 12px 14px 14px 16px; border-top: 1.5px solid var(--rule); }
.gen-name { font-weight: 700; font-size: .95rem; display: grid; }
.gen-name small { font-weight: 500; color: var(--muted); font-size: .78rem; display: flex; align-items: center; gap: 6px; }
.gen-name small::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--chip, var(--k)); }
.gen-btns { display: flex; gap: 14px; align-items: center; justify-content: space-between; }
.gen-practice { font-size: .88rem; font-weight: 600; }
.gen-dl { min-height: 38px; padding: 7px 14px; font: 600 .86rem var(--ui); border-radius: var(--r); border: 1.5px solid var(--ink-c); background: var(--ink-c); color: #fff; cursor: pointer; transition: background-color .3s; }
.gen-dl:hover { background: color-mix(in srgb, var(--ink-c) 86%, #000); }

/* ---------- Style pages and alphabet hub ---------- */
.chart { background: var(--paper); border: 1.5px solid var(--rule); border-radius: 12px; padding: 6px 24px 24px; }
.chart h3 { font: 700 .72rem/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.chart-grid span { position: relative; display: grid; place-items: center; height: 92px; font-size: 48px; line-height: 1; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); color: var(--k);
  background: linear-gradient(var(--ink-mid), var(--ink-mid)) 0 64% / 100% 1px no-repeat; transition: color .15s, background-color .15s; }
.chart-grid span:hover { color: var(--ink-c); background-color: var(--ink-soft); }
.chart-img { margin: 22px 0 0; display: flex; gap: 22px; align-items: center; }
.chart-img img { width: 170px; height: auto; border: 1.5px solid var(--rule); border-radius: 6px; flex: none; transition: transform .3s var(--ease), box-shadow .3s; }
.chart-img a:hover img { transform: translateY(-3px) rotate(-1deg); box-shadow: var(--shadow-paper); }
.chart-img figcaption { color: var(--k2); font-size: .94rem; max-width: 46ch; }
@media (max-width: 560px) { .chart-img { flex-direction: column; align-items: flex-start; } }

.sizes { display: grid; gap: 0; border: 1.5px solid var(--rule); border-radius: 12px; overflow: hidden; background: var(--paper); }
.sizes div { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 16px; padding: 10px 24px; border-top: 1px solid var(--rule); }
.sizes div:first-child { border-top: 0; }
.sizes dt { font-family: var(--ui); font-style: normal; font-size: .8rem; font-weight: 700; color: var(--muted); }
.sizes dd { margin: 0; color: var(--k); line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: clip;
  background: linear-gradient(var(--ink-mid), var(--ink-mid)) 0 70% / 100% 1px no-repeat; }

.sheet-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 16px; padding: 22px; margin: 0 -22px; background: var(--desk); border-radius: 14px; }
.sheet-card { display: grid; gap: 4px; align-content: start; color: var(--k); text-decoration: none; }
.sheet-card .thumb { box-shadow: var(--shadow-paper); transition: transform .3s var(--ease), box-shadow .3s; }
.sheet-card:hover { color: var(--k); }
.sheet-card:hover .thumb { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(23,21,28,.1), 0 22px 40px rgba(23,21,28,.16); }
.sheet-card b { font-size: .98rem; margin-top: 12px; }
.sheet-card:hover b { color: var(--ink-c); }
.sheet-card span { font-size: .84rem; color: var(--k2); }
.thumb { aspect-ratio: 215.9 / 279.4; max-width: 100%; background: #fff; overflow: hidden; }
.thumb svg { display: block; width: 100%; height: auto; }


.mistakes { display: grid; margin: 0; counter-reset: m; }
.mistakes div { display: grid; gap: 4px; padding: 16px 0; border-top: 1px solid var(--rule); }
.mistakes div:last-child { border-bottom: 1px solid var(--rule); }
.mistakes dt { font-weight: 700; display: flex; align-items: center; gap: 10px; }
.mistakes dt::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--ink-c); flex: none; transform: rotate(45deg); }
.mistakes dd { margin: 0 0 0 18px; color: var(--k2); max-width: 66ch; }

.pen, .cta { display: grid; gap: 8px; justify-items: start; padding: 26px 28px; border-radius: 14px; background: var(--ink-soft); border: 1.5px solid var(--ink-mid); }
.pen h2, .cta h2 { margin: 0; }
.pen p, .cta p { margin: 0; color: var(--k2); }
.pen-links { display: flex; gap: 10px 22px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.pen-links a:not(.button) { font-weight: 600; }

.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.hub-card { display: grid; grid-template-rows: auto 1fr; border-radius: 12px; overflow: hidden; color: var(--k); text-decoration: none; border: 1.5px solid var(--rule); background: var(--paper);
  transition: transform .3s var(--ease), box-shadow .3s, border-color .2s; }
.hub-card:hover { color: var(--k); transform: translateY(-3px); box-shadow: 0 18px 36px rgba(23, 21, 28, .1); border-color: var(--ink-c); }
.hub-top { background: var(--ink-c); color: #fff; padding: 14px 18px 10px; display: grid; gap: 2px; }
.hub-top small { font: 700 .72rem/1.2 var(--ui); letter-spacing: .11em; text-transform: uppercase; }
.hub-sample { font-size: 3rem; line-height: 1.25; white-space: nowrap; overflow: hidden; }
.hub-body { display: grid; gap: 6px; align-content: start; padding: 16px 18px 20px; }
.hub-card b { font-size: 1.12rem; letter-spacing: -.01em; }
.hub-card:not(.hub-top-card) b:only-child { margin: 0; }
.hub-meta { font-size: .84rem; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hub-desc { font-size: .9rem; color: var(--k2); line-height: 1.45; }
.hub-card.plain { padding: 20px 22px 22px; gap: 8px; grid-template-rows: none; align-content: start; }

.level { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1.5px solid var(--k); color: var(--k); }
.level.l2 { background: var(--desk); }
.level.l3 { background: var(--k); color: #fff; }

/* Tables */
.tbl-wrap { overflow-x: auto; border: 1.5px solid var(--rule); border-radius: 12px; background: var(--paper); }
.compare { width: 100%; border-collapse: collapse; min-width: 560px; font-size: .94rem; }
.compare th { text-align: left; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1.5px solid var(--k); background: #fafafb; }
.compare tbody th { font: 700 .94rem var(--ui); letter-spacing: 0; text-transform: none; color: var(--k); background: none; border-bottom: 1px solid var(--rule); }
.compare td { padding: 12px 14px; border-bottom: 1px solid var(--rule); font-variant-numeric: tabular-nums; vertical-align: top; }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare tbody tr:hover > * { background: #fafafb; }
.compare a { font-weight: 600; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-c); margin-right: 8px; vertical-align: 1px; }

/* ---------- Buying guides ---------- */
.trust { margin-top: 26px; padding: 16px 20px; max-width: 760px; border-radius: 12px; background: rgba(255, 255, 255, .1); border: 1.5px solid rgba(255, 255, 255, .35); }
.trust p { margin: 0; font-size: .92rem; color: #fff; }
.trust b { color: #fff; }
.disclosure { font-size: .84rem; margin-top: 8px !important; }
.picks td:first-child { font-weight: 700; white-space: nowrap; }
.types { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.type-card { padding: 18px 20px 20px; display: grid; gap: 6px; align-content: start; border-radius: 12px; border: 1.5px solid var(--rule); background: var(--paper); }
.type-sample { font-size: 2.6rem; line-height: 1.25; color: var(--ink-c); }
.type-card b { font-size: 1.05rem; }
.type-card p { margin: 0; font-size: .9rem; color: var(--k2); }

.product { padding: 24px 26px; display: grid; gap: 12px; scroll-margin-top: 16px; border-radius: 14px; border: 1.5px solid var(--rule); background: var(--paper); }
section .product + .product, .guide > .product + .product { margin-top: 16px; }
.guide > h2 + .product { margin-top: 4px; }
.product-head { display: grid; gap: 6px; justify-items: start; }
.product h3 { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.product p { margin: 0; color: var(--k2); }
.pick { display: inline-flex; align-items: center; gap: 7px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: var(--k); color: #fff; }
.product-meta { font-size: .88rem; color: var(--muted) !important; }
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 16px 18px; background: #fafafb; border-radius: 10px; }
@media (max-width: 560px) { .proscons { grid-template-columns: 1fr; } }
.proscons b { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.proscons ul { margin: 8px 0 0; padding-left: 0; list-style: none; font-size: .92rem; display: grid; gap: 5px; }
.proscons li { padding-left: 20px; position: relative; }
.proscons li::before { content: ""; position: absolute; left: 0; top: .28em; width: 14px; height: 14px; -webkit-mask: var(--plus) no-repeat center / contain; mask: var(--plus) no-repeat center / contain; background: #0c7f54; }
.proscons div:last-child li::before { -webkit-mask-image: var(--minus); mask-image: var(--minus); background: #a3122b; }
.product-actions { display: flex; gap: 12px 20px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.product-actions > a:not(.button) { font-weight: 600; font-size: .94rem; }
.checks { padding-left: 0; list-style: none; display: grid; gap: 8px; }
.checks li { padding-left: 30px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 2px; top: .3em; width: 16px; height: 16px; border-radius: 50%; background: var(--k)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l3 3 5-6' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center; }
.builds { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; margin-top: 16px; }
.build { padding: 18px 20px; border-radius: 12px; border: 1.5px solid var(--rule); background: var(--paper); }
.build ul { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 5px; font-size: .92rem; }
.build li:last-child a { font-weight: 700; }
.related { list-style: none; padding: 0; display: grid; gap: 0; }
.related li { border-top: 1px solid var(--rule); }
.related li:last-child { border-bottom: 1px solid var(--rule); }
.related a { display: flex; justify-content: space-between; padding: 14px 0; font-weight: 600; text-decoration: none; }

.vs { min-width: 640px; }
.vs th[scope=row] { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

/* ---------- About, privacy, 404 ---------- */
.prose { gap: 16px; padding-block: 48px 72px; }
.prose h2 { margin: 24px 0 0; font-size: 1.35rem; }
.prose p, .prose ul { margin: 0; }
.prose ul { padding-left: 20px; display: grid; gap: 8px; }
.prose .note { margin-bottom: 4px; }
a > .dot { width: 9px; height: 9px; margin-right: 6px; }
td a + a, .product-meta a + a { margin-left: 12px; }
@media (max-width: 520px) { .topbar nav { gap: 4px 15px; } .topbar nav a { font-size: 14px; } .logo-word { font-size: 16px; } }
@media (max-width: 700px) {
  .sheet-cards { margin: 0 -8px; padding: 14px; gap: 12px; grid-template-columns: 1fr 1fr; }
  .chart { padding: 4px 12px 16px; }
  .chart-grid { grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); }
  .chart-grid span { height: 62px; font-size: 32px; }
  .sizes div { grid-template-columns: 1fr; gap: 0; padding: 10px 16px; }
}

/* Home: the seven inks in one row */
.ink-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.ink-row li { display: grid; }
.ink-row .hub-sample { font-size: 3.4rem; }
.ink-row .hub-body { padding: 12px 14px 16px; }
.ink-row .hub-card b { font-size: 1rem; }
.ink-row-sec { padding-top: 56px; }
@media (max-width: 1100px) { .ink-row { display: flex; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; } .ink-row li { flex: 0 0 180px; scroll-snap-align: start; } }

/* Pens guide: the shortlist as a two-up grid at the table's width */
.guide > .shortlist { max-width: none; }
.shortlist h2 { margin-bottom: 18px; }
.shortlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 16px; align-items: start; }
.ink-row .hub-top { padding: 12px 14px 8px; }
.ink-row .hub-top small { line-height: 1.35; }
.ink-row .hub-card { height: 100%; }
.shortlist-grid > * { margin: 0; }

/* Worksheet cards: the guide-paper card shows ruled guide lines instead of letters */
.sheet-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.sheet-grid .hub-sample { font-size: 2.6rem; white-space: nowrap; }
.hub-lines { display: block; height: 3.2rem; margin-top: 6px;
  background: linear-gradient(rgba(255,255,255,.85), rgba(255,255,255,.85)) 0 18% / 100% 1px no-repeat,
    linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,.5)) 0 48% / 100% 1px no-repeat,
    linear-gradient(#fff, #fff) 0 78% / 100% 1.5px no-repeat; }
#sheets { padding-top: 8px; }
