/* fof.lol — shared look of the single-page *Bench tools (SpeedBench, WhereBench, KeyBench, DropBench, MeetBench, PrivacyBench, PhotoBench, TypeBench, ToolBench, QRBench, PDFBench, PassBench, TimeBench, TuneBench, DrawBench, RandomBench, ScanBench, TextBench, PowerBench, ColorBench, DevBench).
   A tool sets its colour with two tokens and keeps only its own components inline:
     :root { --accent: var(--pumpkin); --accent-ui: var(--melon); }
   --accent tints the product name and the shared/saved banner; --accent-ui is the focus ring and primary-button hover. */
:root {
  --bg: #f4f3ee;
  --surface: #ffffff;
  --surface-2: #eceae3;
  --line: rgba(22, 24, 29, .10);
  --line-2: rgba(22, 24, 29, .18);
  --ink: #16181d;
  --ink-2: #474b54;
  --muted: #737780;
  --marker: #ffd23f;
  --marker-ink: #7a5a00;
  --melon: #e8173f;
  --pumpkin: #e8651a;
  --apple: #4f9a18;
  --leaf: #159a3a;
  --me: #2b7fff;
  --track: #e4e2da;
  --tile-filter: none;
  --accent: var(--melon);
  --accent-ui: var(--accent);
  --shadow: 0 1px 2px rgba(22, 24, 29, .05), 0 18px 40px -24px rgba(22, 24, 29, .28);
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Unbounded', 'Onest', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1114; --surface: #171a1f; --surface-2: #1f232a;
    --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .15);
    --ink: #eceef2; --ink-2: #b4b8c1; --muted: #82878f;
    --marker: #ffd23f; --marker-ink: #ffd23f; --melon: #ff5a78; --pumpkin: #ff9a3c; --apple: #8ad94f; --leaf: #3fdc5a; --me: #5c9dff; --track: #262a32;
    --tile-filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.7);
    --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 20px 44px -26px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1114; --surface: #171a1f; --surface-2: #1f232a;
  --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .15);
  --ink: #eceef2; --ink-2: #b4b8c1; --muted: #82878f;
  --marker: #ffd23f; --marker-ink: #ffd23f; --melon: #ff5a78; --pumpkin: #ff9a3c; --apple: #8ad94f; --leaf: #3fdc5a; --me: #5c9dff; --track: #262a32;
  --tile-filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.7);
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 20px 44px -26px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.12; text-wrap: balance; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-ui); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 32px; }
@media (max-width: 640px) { .wrap { padding-inline: 16px; } }

/* header: fof.lol / logo ProductBench */
header.top { padding-block: calc(22px + env(safe-area-inset-top, 0px)) 0; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.crumbs { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo { display: inline-flex; color: var(--ink); text-decoration: none; line-height: 0; }
.logo svg { display: block; height: 17.6px; width: auto; overflow: visible; }
.logo .lo { fill: var(--marker); stroke: var(--marker); stroke-width: 12; }
.logo .lt { fill: var(--melon); }
.crumbs .sep { color: var(--line-2); font-size: 22px; }
.product { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: -.02em; }
.product img { width: 34px; height: 34px; margin-block: -6px; }
.product b { color: var(--accent); font-weight: inherit; }
.top nav { display: flex; gap: 22px; font-size: 14.5px; font-weight: 500; }
.top nav a { text-decoration: none; color: var(--ink-2); }
.top nav a:hover { color: var(--ink); }
@media (max-width: 640px) { .top nav { display: none; } }
/* right side of the header (shared/bench.js): the nav and the tools button */
.top-end { display: flex; align-items: center; gap: 18px; flex: none; }
/* tools button: a 2×2 crate of tool fruits + a chevron, so it reads as a drop-down; the list is the home page's Tools menu */
.tools-pick { position: relative; }
.tools-btn {
  display: inline-flex; align-items: center; gap: 5px; height: 38px; margin-block: -4px; padding: 0 9px 0 10px;
  border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--ink-2); cursor: pointer;
  transition: color .15s, border-color .15s;
}
.tools-btn:hover, .tools-btn[aria-expanded="true"] { color: var(--ink); border-color: var(--ink-2); }
.tools-btn .tg-grid { width: 22px; height: 22px; overflow: visible; }
/* the fruit crate: tool colours, each fruit edged with a deeper tone of its own skin (a black ink outline looked dirty
   at 22 px), a highlight for volume; the fruits hop in turn on hover */
.tg-grid * { stroke-width: 1px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.tg-grid .tg-stem { fill: none; stroke: var(--leaf); stroke-width: 1.2px; }
.tg-grid .tg-leaf { fill: var(--leaf); stroke: none; }
.tg-grid .tg-rib { fill: none; }
.tg-grid .tg-hi { fill: #fff; stroke: none; opacity: .8; }
.tg-cherry .tg-body { fill: var(--melon); stroke: #b70d2f; }
.tg-lemon .tg-body { fill: var(--marker); stroke: #e3a400; }
.tg-apple .tg-body { fill: var(--apple); stroke: #3c7d0f; }
.tg-pumpkin .tg-body { fill: var(--pumpkin); stroke: #c24d0c; }
.tg-pumpkin .tg-rib { stroke: #c24d0c; }
/* dark theme: the brighter fills need no edge, the dark ones would only dim them */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tg-grid .tg-body { stroke: none; } }
:root[data-theme="dark"] .tg-grid .tg-body { stroke: none; }
.tg-f { transform-box: fill-box; transform-origin: 50% 100%; }
.tools-btn:hover .tg-f { animation: tg-hop .42s ease-out; }
.tools-btn:hover .tg-lemon { animation-delay: .06s; }
.tools-btn:hover .tg-pumpkin { animation-delay: .12s; }
.tools-btn:hover .tg-apple { animation-delay: .18s; }
@keyframes tg-hop { 0%, 100% { transform: none; } 40% { transform: translateY(-2.2px) scaleY(1.04); } 70% { transform: translateY(0) scale(1.06, .94); } }
.tools-btn .tg-chev { width: 11px; height: 11px; transition: transform .15s; }
.tools-btn[aria-expanded="true"] .tg-chev { transform: rotate(180deg); }
.tools-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; width: min(340px, calc(100vw - 32px));
  list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow);
  /* --menu-top: the list's top edge in the viewport, set by the script when it opens */
  max-height: calc(100vh - var(--menu-top, 64px) - 16px); max-height: calc(100dvh - var(--menu-top, 64px) - 16px); overflow-y: auto; overscroll-behavior: contain;
  font-family: var(--font); font-size: 16px; letter-spacing: normal; text-align: left;
}
.tools-menu a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 11px; color: inherit; text-decoration: none; }
.tools-menu a:hover, .tools-menu a:focus-visible, .tools-menu a[aria-current] { background: var(--surface-2); outline-offset: -2px; }
.tools-menu img { width: 34px; height: 34px; flex: none; object-fit: contain; }
.tools-menu span { min-width: 0; }
.tools-menu b { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.tools-menu small { display: block; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
/* the page's own nav links at the top of the list, phones only (the nav itself is hidden there) */
.tools-menu .tm-page { display: none; }
.tools-menu .tm-link { padding: 11px 12px; font-size: 15.5px; font-weight: 500; color: var(--ink); }
.tools-menu .tm-head {
  margin: 6px 6px 4px; padding: 10px 6px 0; border-top: 1px solid var(--line);
  font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
@media (max-width: 640px) {
  .top .wrap { gap: 10px; }
  .tools-btn { gap: 4px; height: 42px; margin-block: -6px; padding: 0 8px 0 9px; color: var(--ink); }
  .tools-btn .tg-grid { width: 23px; height: 23px; }
  /* the button is not always at the screen edge, so a list anchored to it could leave the screen; span the screen instead */
  .tools-menu { position: fixed; left: 16px; right: 16px; top: var(--menu-top, 64px); width: auto; }
  .tools-menu .tm-page { display: block; }
  /* every "fof.lol / logo ProductBench" fits next to the button at 375 px; narrower screens cut the name with "…" */
  .crumbs { gap: 7px; }
  .product { min-width: 0; gap: 6px; font-size: 16px; }
  .product > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* 360 px Android phones: without the "/" and a size smaller, RandomBench still fits */
@media (max-width: 380px) {
  .crumbs > .sep:not(.here) { display: none; }
  .product { font-size: 15px; }
}

/* intro */
.intro { padding-block: 44px 26px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.intro h1 { font-family: var(--display); font-weight: 600; font-size: clamp(30px, 5vw, 52px); letter-spacing: -.045em; }
.intro .lead { margin-top: 12px; font-size: 17px; color: var(--ink-2); max-width: 58ch; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
}
.badge svg { width: 16px; height: 16px; color: var(--leaf); flex: none; }
@media (max-width: 640px) { .intro { padding-block: 28px 18px; } .intro .lead { font-size: 15.5px; } }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-h h2 { font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: -.02em; }
.card-h .aside { font-size: 13px; color: var(--muted); }
.pad { padding: 22px 24px; }
.cols { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 900px) { .cols { grid-template-columns: minmax(0, 1fr); } }

/* decoration: a sprig of the tool's plant hanging from the bottom-right corner of the main block (data-sprig="<id>",
   drawings in shared/sprigs/, built by og-src/sprigs.py). Out of the flow and click-through, so it never moves or covers
   anything. The drawing's box is 112 x 200 with the corner at (24, 70): 24px lies over the card, 88px hangs into the page
   margin. --sz follows that margin, (100vw - 1120px) / 2 + 32px, so the sprig never makes the page scroll sideways. */
[data-sprig] { position: relative; }
[data-sprig]::after {
  --sz: clamp(38px, calc(50vw - 528px), 112px);
  content: ''; position: absolute; z-index: 1; pointer-events: none;
  width: var(--sz); height: calc(var(--sz) * 200 / 112);
  left: calc(100% - var(--sz) * 24 / 112); top: calc(100% - var(--sz) * 70 / 112);
  background: no-repeat 0 0 / 100% 100%;
  transform-origin: 21% 35%;
}
@media (prefers-reduced-motion: no-preference) {
  [data-sprig]::after { animation: sprig-in .9s cubic-bezier(.2, .8, .2, 1) .25s both; }
  @keyframes sprig-in { from { opacity: 0; transform: rotate(-8deg) scale(.92); } }
}
@media (max-width: 640px) { [data-sprig]::after { display: none; } }
@media print { [data-sprig]::after { display: none; } }
[data-sprig="speed"]::after { background-image: url(sprigs/speed.svg); }
[data-sprig="where"]::after { background-image: url(sprigs/where.svg); }
[data-sprig="key"]::after { background-image: url(sprigs/key.svg); }
[data-sprig="drop"]::after { background-image: url(sprigs/drop.svg); }
[data-sprig="meet"]::after { background-image: url(sprigs/meet.svg); }
[data-sprig="privacy"]::after { background-image: url(sprigs/privacy.svg); }
[data-sprig="photo"]::after { background-image: url(sprigs/photo.svg); }
[data-sprig="type"]::after { background-image: url(sprigs/type.svg); }
[data-sprig="random"]::after { background-image: url(sprigs/random.svg); }
[data-sprig="scan"]::after { background-image: url(sprigs/scan.svg); }
[data-sprig="text"]::after { background-image: url(sprigs/text.svg); }
[data-sprig="power"]::after { background-image: url(sprigs/power.svg); }
[data-sprig="color"]::after { background-image: url(sprigs/color.svg); }
[data-sprig="dev"]::after { background-image: url(sprigs/dev.svg); }
[data-sprig="money"]::after { background-image: url(sprigs/money.svg); }
[data-sprig="draw"]::after { background-image: url(sprigs/draw.svg); }
[data-sprig="pass"]::after { background-image: url(sprigs/pass.svg); }
[data-sprig="pdf"]::after { background-image: url(sprigs/pdf.svg); }
[data-sprig="qr"]::after { background-image: url(sprigs/qr.svg); }
[data-sprig="time"]::after { background-image: url(sprigs/time.svg); }
[data-sprig="tool"]::after { background-image: url(sprigs/tool.svg); }
[data-sprig="tune"]::after { background-image: url(sprigs/tune.svg); }
[data-sprig="score"]::after { background-image: url(sprigs/score.svg); }

/* buttons and controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 13px;
  font-weight: 600; font-size: 14.5px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; transition: background .15s, transform .1s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ink); color: var(--bg); border-color: transparent; }
.btn-primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--accent-ui)); }
.btn svg { width: 17px; height: 17px; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 13.5px; border-radius: 11px; }
.btn-sm svg { width: 15px; height: 15px; }
.btn:disabled { opacity: .55; cursor: progress; }
a.btn { text-decoration: none; color: inherit; }
a.btn-primary { color: var(--bg); }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.link-btn { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.link-btn:hover { background: var(--surface-2); }
label.link-btn { display: inline-flex; align-items: center; }
.link-btn.armed, .btn.armed { color: var(--melon); background: color-mix(in srgb, var(--melon) 12%, transparent); }

/* history */
.hist { margin-top: 18px; }
.hist .card-h { flex-wrap: wrap; }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
th { text-align: left; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 0 4px 8px; }
td { padding: 9px 4px; border-top: 1px solid var(--line); }
td .sub { display: block; font-size: 12px; color: var(--muted); }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
.empty { color: var(--muted); font-size: 14px; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hist-act { display: flex; gap: 4px; justify-content: flex-end; align-items: center; }
.hist-act .link-btn { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; }
.hist-act .link-btn svg { width: 16px; height: 16px; }

/* shared / saved result banner */
.viewnote {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 16px 20px; margin-bottom: 18px; border-radius: 18px;
  background: color-mix(in srgb, var(--accent) 11%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.viewnote.err { background: color-mix(in srgb, var(--melon) 9%, var(--surface)); border-color: color-mix(in srgb, var(--melon) 35%, transparent); }
.vn-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; flex: none; color: var(--accent); background: var(--surface); }
.viewnote.err .vn-ic { color: var(--melon); }
.vn-ic svg { width: 20px; height: 20px; }
.vn-t { flex: 1 1 280px; font-size: 14.5px; color: var(--ink-2); }
.vn-t b { display: block; color: var(--ink); font-size: 16px; }
.vn-a { display: flex; gap: 8px; flex-wrap: wrap; }

/* share & save panels */
.share-grid .note { font-size: 14px; color: var(--ink-2); margin-bottom: 14px; }
.share-link { display: flex; gap: 8px; }
.share-link input {
  flex: 1; min-width: 0; height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--ink); font-family: var(--mono); font-size: 13px;
}
.targets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tiny { font-size: 12.5px; color: var(--muted); margin-top: 14px; }
@media (max-width: 420px) { .share-link { flex-direction: column; } .share-link input { flex: none; } }

/* how it works */
.about { margin-top: 64px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px; padding-top: 36px; border-top: 1px solid var(--line); }
.about h2 { font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: -.02em; }
.about-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.about-list h3 { font-size: 15.5px; font-weight: 600; margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.about-list h3 span { font-family: var(--mono); font-size: 12px; color: var(--marker-ink); background: color-mix(in srgb, var(--marker) 30%, transparent); padding: 1px 7px; border-radius: 6px; }
.about-list p { font-size: 14.5px; color: var(--ink-2); }
@media (max-width: 900px) { .about { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
@media (max-width: 640px) { .about-list { grid-template-columns: minmax(0, 1fr); } .about { margin-top: 48px; } }

/* footer */
footer.bottom { margin-top: 64px; padding-block: 22px calc(28px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.bottom .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
/* site footer (shared/bench.js siteFooter): services on the left, fof.lol pages and switches on the right */
.ff { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 28px 48px; width: 100%; padding-top: 10px; }
.ff-h { font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.ff-tools { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 20px; }
.ff-tools a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; margin-inline: -10px; border-radius: 14px; text-decoration: none; color: inherit; transition: background .15s; }
.ff-tools a:hover, .ff-tools a[aria-current] { background: var(--surface-2); }
.ff-tools img { width: 30px; height: 30px; flex: none; object-fit: contain; }
.ff-tools span { min-width: 0; }
.ff-tools b { display: block; font-size: 14px; font-weight: 600; color: var(--ink, var(--text)); }
.ff-tools small { display: block; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.ff-links { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 9px; }
.ff-links a { font-size: 14px; font-weight: 500; color: var(--ink-2, var(--text-2)); text-decoration: none; }
.ff-links a:hover, .ff-links a[aria-current] { color: var(--ink, var(--text)); text-decoration: underline; text-underline-offset: 3px; }
.ff-set { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ff-follow { margin: 0 0 22px; }
.ff-note { margin: -4px 0 12px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.ff-soc { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ff-soc a { display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: inherit; text-decoration: none; transition: background .15s, border-color .15s; }
.ff-soc a:hover { background: var(--surface-2); border-color: var(--line-2); }
.ff-soc a:focus-visible { outline: 2px solid var(--ink, var(--text)); outline-offset: 2px; }
.ff-ico { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 12px; color: var(--ink, var(--text)); background: color-mix(in srgb, var(--marker, #ffd23f) 40%, transparent); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.ff-x .ff-ico { background: color-mix(in srgb, var(--melon, #e8173f) 22%, transparent); }
.ff-ico svg { width: 18px; height: 18px; }
.ff-soc a:hover .ff-ico { transform: rotate(-10deg) scale(1.08); }
.ff-soc b { display: block; font-size: 14px; font-weight: 600; line-height: 1.25; color: var(--ink, var(--text)); }
.ff-soc small { display: block; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .ff-soc a:hover .ff-ico { transform: none; } }
.ff-copy { grid-column: 1 / -1; margin: 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
@media (max-width: 760px) { .ff { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 440px) { .ff-tools { grid-template-columns: minmax(0, 1fr); } }
/* language drop-down (shared/bench.js langSwitcher) */
.lang-pick { position: relative; display: inline-flex; align-items: center; gap: 8px; max-width: 100%; font-size: 13px; color: var(--muted); }
.lang-pick::after { content: ''; position: absolute; right: 13px; top: 50%; width: 6px; height: 6px; border: solid var(--ink-2, var(--text-2)); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.lang-select { min-width: 0; text-overflow: ellipsis; appearance: none; -webkit-appearance: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink, var(--text)); background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 7px 34px 7px 12px; cursor: pointer; }
.lang-select:hover { border-color: var(--ink-2, var(--text-2)); }
.lang-select:focus-visible { outline: 2px solid var(--ink, var(--text)); outline-offset: 2px; }
/* theme switch (shared/bench.js themeSwitcher): icon-only segmented control next to the language menu */
.theme-seg button { display: inline-grid; place-items: center; padding: 6px 9px; line-height: 0; }
.theme-seg svg { width: 16px; height: 16px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; transition: opacity .2s, transform .2s; z-index: 2000; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* print / PDF: light; each tool hides its own controls on top of this */
@media print {
  :root, :root[data-theme="dark"], :root:not([data-theme="light"]) {
    --bg: #fff; --surface: #fff; --surface-2: #f1f0eb; --line: rgba(0, 0, 0, .12); --line-2: rgba(0, 0, 0, .2);
    --ink: #111; --ink-2: #333; --muted: #666; --track: #e4e2da; --tile-filter: none; --shadow: none; color-scheme: light;
  }
  body { background: #fff; }
  .top nav, .tools-pick, #share, #history, .about, footer.bottom, .vn-a, .toast, .badge { display: none !important; }
  .card { box-shadow: none; break-inside: avoid; }
  .intro { padding-block: 16px 12px; }
}

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

/* ---------- text pages (/terms/, /license/) ---------- */
.doc { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 56px; }
.toc { position: sticky; top: 16px; }
.toc .eyebrow { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.toc ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 7px; font-size: 14px; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--ink); text-decoration: underline; }
.prose { padding: 28px 32px; min-width: 0; }
.prose section + section { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.prose h2 { font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: -.02em; margin: 0 0 12px; scroll-margin-top: 16px; }
.prose h2 .n { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-right: 10px; }
.prose p, .prose li { color: var(--ink-2); }
.prose p { margin: 0 0 10px; max-width: 72ch; }
.prose ul { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 7px; max-width: 72ch; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--ink); }
.prose pre { font-family: var(--mono); font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); border-radius: 14px; padding: 16px 18px; margin: 0; }
.prose table { min-width: 0; }
.prose td:first-child a { font-weight: 600; }
@media (max-width: 860px) {
  .doc { grid-template-columns: 1fr; }
  .toc { position: static; }
  .prose { padding: 20px; }
}

/* ---------- tool guides (/<tool>/about/): .doc layout above + header crumb, meta line, sub-headings, steps ---------- */
a.product { color: inherit; text-decoration: none; }
.crumbs .here { font-size: 14.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.crumbs .sep.here { color: var(--line-2); font-size: 22px; font-weight: 400; }
@media (max-width: 480px) { .crumbs .here { display: none; } }
.guide-meta { margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.prose h3 { font-size: 16px; font-weight: 600; color: var(--ink); margin: 18px 0 6px; }
.prose ol { margin: 0 0 10px; padding-left: 22px; display: grid; gap: 7px; max-width: 72ch; }
.prose .table-wrap { margin: 4px 0 14px; }
.prose th, .prose td { padding-inline: 6px; vertical-align: top; }
.prose td:first-child { color: var(--ink); font-weight: 500; }
.guide-end { margin: 20px 0 56px; }
.guide-end .btn { margin-top: 4px; }
/* link from a tool's "How it works" to its guide */
.about-more { margin-top: 10px; font-size: 14.5px; }
.about-more a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
/* the header menu is already tight on tablets: there the guide stays reachable from "How it works" */
@media (min-width: 641px) and (max-width: 900px) { .top nav a[data-t="navGuide"] { display: none; } }
/* .prose a would paint the button text in the button colour */
.prose a.btn { text-decoration: none; }
.prose a.btn-primary { color: var(--bg); }
