/* UtilioFlow styles. Tokens first, then layout, then tool parts. See design/DESIGN-SYSTEM.md. */

:root {
  --bg: #f6fafc; --surface: #fff; --field: #f6fafc; --ink: #082f35; --ink2: #3f5b60; --line: #d3e0dd; --ctl: #9db4b1;
  --brand: #0a535c; --on-brand: #fff; --tint: #e4f6ef; --tint-ink: #0a535c; --link: #0a535c; --focus: #0a535c;
  --wave-a: #b8f1de; --wave-b: #d9f9ee; --wave-c: #fff; --hdr: rgba(246, 250, 252, .82);
  --tile: linear-gradient(145deg, #00eed5 0%, #03d9c3 55%, #02afa1 100%);
  --ok: #0a6b3a; --warn: #8a5a00; --bad: #b3261e; --mark: #fff3bf; --err-col: rgba(179, 38, 30, .28);
  --hdr-h: 56px; --c: 44px; --gap: 12px; --pad: 14px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b1220; --surface: #111a2e; --field: #0b1220; --ink: #f1f5f9; --ink2: #94a3b8; --line: #1e293b; --ctl: #334155;
  --brand: #3ccf9b; --on-brand: #06262b; --tint: #113a3a; --tint-ink: #7fe3bd; --link: #5de0b0; --focus: #7fe3bd;
  --wave-a: rgba(20, 184, 166, .16); --wave-b: rgba(45, 212, 191, .09); --wave-c: rgba(17, 26, 46, .9); --hdr: rgba(11, 18, 32, .82);
  --tile: linear-gradient(145deg, #2dd4bf 0%, #14b8a6 55%, #0d9488 100%);
  --ok: #5de0b0; --warn: #f0b429; --bad: #ff8a80; --mark: #5c4a00; --err-col: rgba(255, 138, 128, .34);
  color-scheme: dark;
}
@media (min-width: 800px) {
  :root { --hdr-h: 64px; --gap: 14px; --pad: 22px; }
}
@media (min-width: 800px) and (max-height: 720px) {
  :root { --hdr-h: 56px; --c: 40px; --gap: 10px; --pad: 14px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr-h) + 12px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--link); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.container--narrow { max-width: 800px; }
@media (min-width: 800px) {
  .container { padding: 0 24px; }
}

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; background: var(--brand); color: var(--on-brand); border-radius: 10px; font-weight: 600; }
.skip:focus { top: 8px; }

/* Background waves, copied from the earlier sites and fixed to the screen */
.waves { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.waves svg { position: absolute; display: block; max-width: none; }
.waves__top { top: 0; right: 0; width: 90vw; height: auto; opacity: .8; }
.waves__side { display: none; left: 0; top: 30vh; width: min(20vw, 260px); height: auto; }
.waves__bottom { left: 0; bottom: 0; width: 100%; height: clamp(120px, 22vh, 200px); }
.w-a { stop-color: var(--wave-a); }
.w-b { stop-color: var(--wave-b); }
.w-c { stop-color: var(--wave-c); }
@media (min-width: 900px) {
  .waves__top { width: min(58vw, 760px); opacity: 1; }
  .waves__side { display: block; }
  .waves__bottom { height: clamp(160px, 30vh, 340px); }
}

/* Edition suggestion bar */
.suggest { position: fixed; top: 0; left: 0; right: 0; z-index: 30; background: #082f35; color: #e9f4f2; font-size: 14.5px; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.suggest__in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-top: 10px; padding-bottom: 10px; }
.suggest p { flex: 1 1 260px; }
.suggest__btns { display: flex; gap: 8px; }

/* Header */
.hdr { position: sticky; top: 0; z-index: 20; background: var(--hdr); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
.hdr__in { display: flex; align-items: center; gap: 12px; height: var(--hdr-h); }
.brand { display: flex; align-items: center; min-height: 44px; flex: none; }
.logo { display: block; height: 28px; width: auto; }
.logo--dark, :root[data-theme="dark"] .logo--light { display: none; }
:root[data-theme="dark"] .logo--dark { display: block; }
.hdr__btns { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.iconbtn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; border-radius: 12px; color: var(--ink); }
.iconbtn:hover { background: var(--tint); color: var(--tint-ink); }
#theme [data-sun], :root[data-theme="dark"] #theme [data-moon] { display: none; }
:root[data-theme="dark"] #theme [data-sun] { display: block; }
.nav-toggle [data-x], .nav-toggle[aria-expanded="true"] [data-menu] { display: none; }
.nav-toggle[aria-expanded="true"] [data-x] { display: block; }
.nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; max-height: calc(100vh - var(--hdr-h)); overflow: auto; }
.nav.is-open { display: block; }
.nav a { display: flex; align-items: center; min-height: 46px; padding: 0 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--tint); color: var(--tint-ink); }
.nav a[aria-current="page"] { background: var(--brand); color: var(--on-brand); font-weight: 600; }
@media (min-width: 1100px) {
  .hdr__in { gap: 24px; }
  .logo { height: 32px; }
  .nav-toggle { display: none; }
  .nav { display: block; position: static; flex: 1; background: none; border: 0; padding: 0; max-height: none; overflow: visible; }
  .nav ul { display: flex; align-items: center; gap: 2px; }
  .nav a { min-height: 40px; padding: 0 10px; font-size: 14.5px; white-space: nowrap; }
}

/* Buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--c); padding: 0 20px; border: 1px solid var(--brand); border-radius: 12px; background: var(--surface); color: var(--tint-ink); font-size: 15.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--tint); }
.btn--primary { background: var(--brand); color: var(--on-brand); padding: 0 26px; }
.btn--primary:hover { background: var(--brand); filter: brightness(1.12); }
.btn--line { border-color: var(--line); color: var(--ink); }
.btn--sm { min-height: 44px; padding: 0 14px; font-size: 14.5px; }
.btn--mint { background: #3ccf9b; border-color: #3ccf9b; color: #06262b; }
.btn--mint:hover { background: #5de0b0; }
.btn--ghost-dark { background: none; border-color: #7fa8a5; color: #e9f4f2; }
.btn--ghost-dark:hover { background: rgba(255, 255, 255, .1); }
.btn[disabled] { opacity: .55; cursor: default; }
.linkbtn { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; text-align: left; }
.field { width: 100%; min-width: 0; height: calc(var(--c) + 6px); padding: 0 14px; border: 1.5px solid var(--ctl); border-radius: 12px; background: var(--field); color: var(--ink); }
.field--out { border-color: var(--brand); font-family: var(--mono); font-size: 17px; letter-spacing: .02em; }
.field:focus-visible, .ta:focus-visible { outline-offset: 0; border-radius: 12px; }
.select { height: var(--c); padding: 0 34px 0 12px; border: 1px solid var(--ctl); border-radius: 12px; background: var(--surface); color: var(--ink); }
.ta { display: block; width: 100%; flex: 1; min-height: 96px; padding: 12px 14px; border: 1.5px solid var(--ctl); border-radius: 12px; background: var(--field); color: var(--ink); font: 14.5px/1.5 var(--mono); resize: none; tab-size: 2; white-space: pre; overflow: auto; }
.ta--wrap { white-space: pre-wrap; word-break: break-word; }
.ta--text { font-family: var(--sans); font-size: 16px; white-space: pre-wrap; }
.ta[readonly] { background: var(--surface); }
label, .lbl { font-size: 15px; font-weight: 600; }

/* Tool screen: tool and advert fit in the window */
.screen { display: flex; flex-direction: column; gap: var(--gap); padding-top: 10px; padding-bottom: 10px; min-height: calc(100vh - var(--hdr-h)); min-height: calc(100dvh - var(--hdr-h)); }
.screen__head { display: flex; flex-direction: column; gap: 0; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink2); min-height: 28px; }
.crumbs a, a.hint:not(.lg) { display: inline-flex; align-items: center; min-height: 28px; }
.screen__title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 20px; }
h1 { font-size: 24px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--tint-ink); }
.screen__body { flex: 1; display: flex; gap: 20px; min-height: 0; }
.tool { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); padding: var(--pad); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.rail { display: none; }
@media (min-width: 800px) {
  .screen { padding-top: 14px; padding-bottom: 12px; }
  h1 { font-size: 28px; }
  .chip { padding: 6px 14px 6px 10px; background: var(--tint); border-radius: 999px; font-size: 14px; }
  .tool { border-radius: 20px; padding: var(--pad) calc(var(--pad) + 2px); }
}
@media (min-width: 1024px) {
  .rail { display: flex; flex: none; width: 290px; flex-direction: column; gap: var(--gap); }
  .more { display: none; }
}
.rail__box { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px 10px 8px 16px; }
.rail__box h2, .more h2 { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); margin-bottom: 4px; }
.rail__box a, .more a { display: flex; align-items: center; gap: 12px; min-height: 46px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15.5px; }
.rail__box a:hover span:last-child, .more a:hover span:last-child { text-decoration: underline; }
.rail__pin[aria-pressed="true"] .i { fill: currentColor; }
.rail__note { font-size: 13.5px; color: var(--ink2); padding: 0 6px; }
.tile { flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--tile); box-shadow: 0 4px 12px -2px rgba(13, 148, 136, .4), inset 0 1px 0 rgba(255, 255, 255, .3); display: inline-flex; align-items: center; justify-content: center; }
.tile--sm { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 3px 8px -2px rgba(13, 148, 136, .4), inset 0 1px 0 rgba(255, 255, 255, .3); }

/* Adverts: space is reserved so nothing moves when one loads */
.ad { display: flex; flex-direction: column; align-items: center; gap: 4px; }
/* Label and clear space (27 November 2026): every advert is labelled and kept at least 48px from anything clickable,
   so it cannot be mistaken for a menu, navigation or download link. Checked by tools/ad-spacing-check.mjs. */
.ad__label { display: block; font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); text-align: center; }
.screen > .ad--tool { margin-top: 8px; }
.prose > .ad--guide { margin: 48px 0 0; }
.home-prose { margin-top: 32px; }
.prose > .ad--home { margin: 48px 0; }
.side__in .ad__label { margin-bottom: 4px; }
/* Advert sizes are set in each page, not here, following Google's own example (see adSizes in src/layout.js). */
/* Google's advert frame is a light-mode page. In dark theme the browser paints a solid white backdrop behind a frame whose
   colour scheme differs from the page around it, so an empty slot showed as a white box. Marking the slot as light removes
   that backdrop. It changes no size, position or advert content (Greg, 22 November 2026). */
ins.adsbygoogle { color-scheme: light; }
/* The advert under a tool is centred under the tool, not under the tool plus the right-hand rail (290px rail + 20px gap).
   "safe" keeps it from running off the left edge when the tool is narrower than the advert. */
@media (min-width: 1024px) {
  .ad--tool { padding-right: 310px; align-items: center; align-items: safe center; }
}
@media (min-width: 1280px) and (max-width: 1759px) {
  .ad--tool { padding-right: 0; }
}

/* Password Generator and Word Unscrambler, at every screen size (desktop 21 November, phones and tablets 22 November 2026):
   the tool is only as tall as its content, and the advert follows it. The word list grows with its results up to the height
   it had before, then scrolls, so the advert stays on screen. */
.screen--fit { min-height: 0; }
.screen--fit .screen__body { flex: none; }
/* The fixed amounts below are everything on the screen except the word list, including the advert's label and clear space
   (28px, added 27 November 2026). */
.screen--fit .scroll#un-results { flex: none; min-height: 0; max-height: max(72px, calc(100vh - 508px)); max-height: max(72px, calc(100dvh - 508px)); }
@media (max-width: 799px) and (max-height: 700px) {
  .screen--fit .scroll#un-results { max-height: max(56px, calc(100vh - 506px)); max-height: max(56px, calc(100dvh - 506px)); }
}
@media (min-width: 800px) {
  .screen--fit .scroll#un-results { max-height: max(72px, calc(100vh - 626px)); max-height: max(72px, calc(100dvh - 626px)); }
}
@media (min-width: 800px) and (max-height: 720px) {
  .screen--fit .scroll#un-results { max-height: max(40px, calc(100vh - 565px)); max-height: max(40px, calc(100dvh - 565px)); }
}

/* Tool parts */
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.row--split { justify-content: space-between; }
.row--rule { padding-top: var(--gap); border-top: 1px solid var(--line); }
.grow { flex: 1; min-width: 0; }
.push { margin-left: auto; }
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--field); border: 1px solid var(--line); border-radius: 14px; align-self: flex-start; max-width: 100%; }
.seg button { min-height: var(--c); padding: 0 16px; border: 0; border-radius: 10px; background: none; color: var(--ink); font-size: 15px; font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
.seg--full { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-self: stretch; }
.out { display: flex; gap: 8px; }
.out .iconbtn { flex: none; width: calc(var(--c) + 6px); height: calc(var(--c) + 6px); border: 1px solid var(--line); color: var(--tint-ink); background: var(--surface); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--ctl); border-radius: 12px; overflow: hidden; background: var(--surface); }
.stepper button { width: var(--c); height: var(--c); border: 0; background: none; color: var(--tint-ink); font-size: 20px; line-height: 1; }
.stepper button:hover { background: var(--tint); }
.stepper input { width: 52px; height: var(--c); border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 0; text-align: center; font-weight: 600; background: var(--surface); }
.ctl { display: inline-flex; align-items: center; gap: 10px; }
.chips { display: none; gap: 6px; }
.chips button { min-width: 48px; height: var(--c); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: 15px; }
.chips button[aria-pressed="true"] { border: 1.5px solid var(--brand); background: var(--tint); color: var(--tint-ink); font-weight: 700; }
.checks { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 0 22px; }
.check { display: inline-flex; align-items: center; gap: 9px; min-height: var(--c); font-size: 15px; font-weight: 400; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.lg { display: none; }
.meter { flex: none; width: 120px; height: 6px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.meter i { border-radius: 3px; background: var(--line); }
.meter[data-level="1"] i:nth-child(-n+1), .meter[data-level="2"] i:nth-child(-n+2), .meter[data-level="3"] i:nth-child(-n+3), .meter[data-level="4"] i { background: var(--brand); }
.meter[data-level="1"] i:nth-child(1) { background: var(--bad); }
.strength { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--ink2); }
.strength strong { color: var(--ink); }
.hint { font-size: 13.5px; color: var(--ink2); }
.hint--end { margin-top: auto; }
.status { font-size: 14.5px; min-height: 22px; }
.status[data-kind="ok"] { color: var(--ok); }
.status[data-kind="warn"] { color: var(--warn); }
.status[data-kind="bad"] { color: var(--bad); font-weight: 600; }
.list { flex: 1; min-height: 0; max-height: 9.5rem; overflow: auto; border: 1.5px solid var(--brand); border-radius: 12px; background: var(--field); }
.list--tall { max-height: none; flex-basis: 8rem; }
.list li { display: flex; align-items: center; gap: 8px; padding: 0 4px 0 14px; border-bottom: 1px solid var(--line); min-height: 44px; }
.list li:last-child { border-bottom: 0; }
.list code { flex: 1; min-width: 0; font: 15.5px var(--mono); overflow-wrap: anywhere; }
.list .iconbtn { flex: none; color: var(--tint-ink); }
.io { flex: 1; min-height: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.io__pane { display: flex; flex-direction: column; gap: 6px; min-height: 0; min-width: 0; }
.io__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
.io[data-pane="in"] .io__pane--out, .io[data-pane="out"] .io__pane--in { display: none; }
/* Code box with line numbers, and the error view (JSON and HTML tools). See assets/js/tools/editor.js */
.ed { flex: 1; min-height: 96px; display: flex; border: 1.5px solid var(--ctl); border-radius: 12px; background: var(--field); overflow: hidden; }
.ed:focus-within { outline: 3px solid var(--focus); outline-offset: 0; }
.ed__gutter { flex: none; position: relative; overflow: hidden; width: calc(3ch + 19px); border-right: 1px solid var(--line); background: var(--surface); color: var(--ink2); font: 14.5px/22px var(--mono); text-align: right; font-variant-numeric: tabular-nums; -webkit-user-select: none; user-select: none; }
.ed__nums { position: absolute; top: 0; left: 0; right: 0; }
.ed__nums div { height: 22px; padding: 0 8px 0 10px; }
.ed__nums .is-err { background: var(--bad); color: var(--surface); font-weight: 700; }
.ed__main { position: relative; flex: 1; min-width: 0; }
.ed .ta { position: absolute; inset: 0; height: 100%; min-height: 0; border: 0; border-radius: 0; background: transparent; line-height: 22px; }
.ed .ta:focus-visible { outline: 0; }
.ed__marks { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.ed__band { position: absolute; top: 0; left: 0; right: 0; height: 22px; background: var(--mark); box-shadow: inset 0 2px 0 var(--bad), inset 0 -2px 0 var(--bad); }
.ed__mir { position: absolute; top: 0; left: 0; white-space: pre; tab-size: 2; font: 14.5px/22px var(--mono); color: transparent; }
.ed__col { display: inline-block; min-width: 1ch; height: 22px; vertical-align: top; background: var(--err-col); border-bottom: 4px solid var(--bad); }
.errcount { font-size: 13.5px; font-weight: 600; color: var(--ink2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tool.is-errview .io__pane--out, .tool.is-errview .tabs-sm { display: none !important; }
.tool.is-errview .io__pane--in { display: flex !important; }
.tool.is-errview .io--two { grid-template-columns: minmax(0, 1fr); }
.tool.is-errview .errbar .status { flex-basis: 260px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--field); }
.stat b { display: block; font-size: 20px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--ink2); }
.kv { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.kv th, .kv td { text-align: left; vertical-align: top; padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line); }
.kv th { font-weight: 600; white-space: nowrap; }
.kv td { overflow-wrap: anywhere; }
.scroll { flex: 1; min-height: 0; overflow: auto; }
.words { display: flex; flex-wrap: wrap; gap: 6px; }
.words button { min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); font: 15px var(--mono); }
.words button:hover { border-color: var(--brand); }
.words sup { font: 11px var(--sans); color: var(--ink2); margin-left: 4px; }
.group-h { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink2); margin: 10px 0 6px; }
.group-h:first-child { margin-top: 0; }
.tabs-sm { display: grid; }
@media (min-width: 800px) {
  .seg button { padding: 0 18px; }
  .chips { display: inline-flex; }
  .lg { display: inline; }
  a.hint.lg { display: inline-flex; align-items: center; min-height: 28px; }
  .sm { display: none; }
  .meter { width: 160px; }
  .io--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .io--two .io__pane { display: flex !important; }
  .tabs-sm { display: none; }
  .stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .field--out { height: calc(var(--c) + 8px); }
  .list { max-height: 11rem; }
  .list--tall { max-height: none; }
}
.linkbtn.hint { min-height: 28px; padding: 0 2px; }
@media (max-width: 799px) {
  .screen h1 { font-size: 20px; }
  .status { font-size: 13.5px; }
  .btn--primary { padding: 0 18px; }
  .tool { gap: 10px; padding: 12px; }
  .seg { padding: 3px; }
  .seg button { min-height: 38px; padding: 0 12px; }
  .io__head { min-height: 0; }
  .io__head > label, .io__head > .lbl, .strength span, .actions .btn--line span, .label-lg {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .actions .btn--line { width: 44px; padding: 0; }
  .actions .btn { padding-left: 16px; padding-right: 16px; }
  .checks { gap: 0 14px; }
  .meter { width: 64px; }
  .stat { padding: 4px 8px; }
  .stat b { font-size: 17px; white-space: nowrap; }
  .stat span { font-size: 12px; white-space: nowrap; }
  .list { max-height: 6.5rem; }
  .list--tall { max-height: none; flex-basis: 5rem; }
  .pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pair .ctl { flex-direction: column; align-items: flex-start; gap: 3px; margin-left: 0; }
  .pair label { font-size: 13.5px; }
  .stepper button { width: 40px; }
  .un-go { display: none; }
}
@media (max-width: 380px) {
  .actions .btn:not(.btn--line) .i { display: none; }
}
@media (max-width: 799px) and (max-height: 700px) {
  :root { --c: 42px; }
  .hint--opt { display: none; }
  .scroll#un-results, .scroll#jwt-result { min-height: 56px; }
}
@media (min-width: 800px) and (max-height: 720px) {
  .list { max-height: 6.4rem; }
  .list--tall { max-height: none; }
  .ta, .ed { min-height: 72px; }
  .status { min-height: 20px; }
  .scroll#un-results, .scroll#jwt-result { min-height: 40px; }
}
@media (min-width: 800px) and (max-height: 720px) {
  .hint--opt { display: none; }
  h1 { font-size: 24px; }
}

.row--end { align-items: flex-end; }
.fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fld > label { font-size: 13.5px; }
.fld .field { height: var(--c); }
.field--letters { height: calc(var(--c) + 6px) !important; font: 600 19px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.field--num { width: 76px; height: var(--c); text-align: center; }
.filters { display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.filters.is-open { display: grid; }
.issues { flex: 1; min-height: 96px; margin: 0; padding: 4px 12px; overflow: auto; border: 1.5px solid var(--ctl); border-radius: 12px; background: var(--surface); font-size: 14.5px; }
.issues li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.issues li:last-child { border-bottom: 0; }
.issues .linkbtn { font-weight: 600; color: var(--link); margin-right: 6px; min-height: 24px; }
pre.code { margin: 0 0 4px; padding: 10px 12px; background: var(--field); border: 1px solid var(--line); border-radius: 10px; font: 13.5px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
#un-results, #jwt-result { min-height: 72px; }
@media (min-width: 800px) {
  .filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .filters-toggle { display: none; }
}
@media (max-width: 799px) and (max-height: 700px) {
  .ta, .ed { min-height: 72px; }
  /* Short phones: slightly tighter spacing, so the advert's label and clear space (27 November 2026) still leave the
     advert on screen. The advert stays at least 48px from every button (checked by tools/ad-spacing-check.mjs). */
  :root { --gap: 10px; }
  .screen { padding-top: 6px; }
  .tool { gap: 8px; }
  .screen > .ad--tool { margin-top: 6px; }
}

/* Toast and hints */
.toast { position: fixed; left: 50%; bottom: 18px; z-index: 40; transform: translateX(-50%); max-width: calc(100vw - 24px); padding: 10px 16px; border-radius: 12px; background: #082f35; color: #e9f4f2; font-size: 14.5px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .15s; }
.toast.is-on { opacity: 1; pointer-events: auto; }
.toast button { margin-left: 12px; background: none; border: 0; color: #7fe3bd; font-weight: 600; text-decoration: underline; min-height: 24px; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* Homepage */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 56px; padding: 28px 0 22px; }
.hero__text { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--tint-ink); }
.t-home h1 { font-size: 31px; line-height: 1.1; }
.lede { font-size: 16.5px; color: var(--ink2); max-width: 620px; }
.hero__list { flex: 1 1 300px; display: flex; flex-direction: column; gap: 10px; padding: 18px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; font-size: 15.5px; font-weight: 500; }
.hero__list li { display: flex; align-items: center; gap: 12px; }
.hero__list .i { flex: none; color: var(--tint-ink); }
.tools__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; margin-bottom: 14px; }
.tools__head h2 { font-size: 21px; letter-spacing: -.01em; }
.tools__head p { font-size: 14px; color: var(--ink2); }
.grid { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.card { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 2px 10px 12px; }
.card__link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.card__link:hover .card__name { text-decoration: underline; }
.card__text { display: flex; flex-direction: column; gap: 2px; }
.card__name { font-size: 16.5px; font-weight: 650; }
.card__desc { font-size: 14px; color: var(--ink2); }
.pin { flex: none; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; border-radius: 12px; color: var(--ink2); }
.pin[aria-pressed="true"] { color: var(--tint-ink); }
.pin[aria-pressed="true"] .i { fill: currentColor; }
.home-prose { padding-bottom: 48px; }
@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .card { align-items: flex-start; padding: 18px 8px 18px 18px; border-radius: 18px; }
  .card__link { align-items: flex-start; gap: 14px; }
}
@media (min-width: 1024px) {
  .hero { padding: 52px 0 36px; }
  .t-home h1 { font-size: 46px; line-height: 1.08; }
  .lede { font-size: 18px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Right-hand advert column on the homepage and tool pages: 1280px and wider only.
   Below 1280px .stage does nothing and the advert is hidden, so it is never requested.
   The page content keeps its left edge in line with the header. On a wide screen it keeps its full width and the advert sits
   in the margin beside it; on a laptop the content narrows to make room. The advert is sticky inside its own column, so it
   only moves vertically and stops at the end of the page content, above the footer. */
.side { display: none; }
@media (min-width: 1280px) {
  /* 48px clear of the page content and of the header (27 November 2026): no button, link or menu within 48px of the advert */
  .stage { display: grid; grid-template-columns: minmax(0, 1152px) 300px; column-gap: 48px; max-width: 1548px; margin-left: max(0px, calc((100% - 1200px) / 2)); padding: 0 24px; }
  .stage .container { max-width: none; padding-left: 0; padding-right: 0; }
  .side { display: block; padding: 48px 0 24px; }
  .side__in { position: sticky; top: calc(var(--hdr-h) + 48px); width: 300px; height: 620px; }
  /* With less room for the content, lay it out as on a smaller screen */
  .stage .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage .rail { display: none; }
  .stage .more { display: block; }
}
@media (min-width: 1280px) and (max-height: 749px) {
  .side__in { height: 270px; }
}
@media (min-width: 1640px) {
  .stage .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1760px) {
  .stage .rail { display: flex; }
  .stage .more { display: none; }
}

/* Long-form text */
.page { padding-top: 20px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 12px; }
.page h1 { font-size: 30px; margin-top: 6px; }
.guide-wrap { padding-top: 28px; padding-bottom: 56px; }
.guide { max-width: 800px; }
.prose { font-size: 16.5px; line-height: 1.65; }
.prose > * + * { margin-top: 14px; }
.prose h2 { font-size: 23px; line-height: 1.25; letter-spacing: -.01em; margin-top: 36px; }
.prose h3 { font-size: 18px; line-height: 1.3; margin-top: 24px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 6px; }
.prose code, .prose kbd { font: .92em var(--mono); background: var(--tint); color: var(--tint-ink); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.prose pre { overflow: auto; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font: 14px/1.5 var(--mono); }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); }
.table-wrap { overflow-x: auto; }
.prose .box { padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.prose .box > :first-child { margin-top: 0; }
.prose .more ul, .prose .more { list-style: none; padding-left: 0; }
.more { margin-top: 32px; }
.updated { font-size: 14px; color: var(--ink2); margin-top: 28px; }
.mail { font-size: 19px; font-weight: 600; }

/* Guide style (24 November 2026): large section headings with thin dividing lines, in the guide under each tool and on
   the homepage below the "How UtilioFlow stays free" box. site.js adds .acc-js and marks the section being read with
   .is-on; the other headings turn grey. Only colours change while scrolling, so nothing on the page moves.
   The grey keeps at least 3:1 contrast, the minimum for large text: light #6f8589 is 3.7:1 on the page and 3.1:1 on the
   strongest wave green; dark #6b7c93 is 4.4:1. Without JavaScript every heading stays dark. */
:root { --acc-dim: #6f8589; }
:root[data-theme="dark"] { --acc-dim: #6b7c93; }
.prose > .acc { margin-top: 0; border-top: 1px solid var(--line); }
.prose > .acc:last-of-type { border-bottom: 1px solid var(--line); }
.home-prose > .acc:first-of-type { margin-top: 28px; }
.guide > .acc:first-child { margin-top: 36px; } /* the same gap below the tool as the old first heading had */
.prose .acc > .acc__h { margin: 0; padding: 22px 0 16px; font-size: 26px; line-height: 1.12; letter-spacing: -.025em; font-weight: 750; color: var(--ink); transition: color .35s ease; }
.acc-js .acc:not(.is-on) > .acc__h { color: var(--acc-dim); }
.acc__pad { padding-bottom: 26px; }
.acc__pad > * + * { margin-top: 14px; }
.prose .acc__pad > h3:not(:first-child) { margin-top: 22px; }
@media (min-width: 800px) {
  .prose .acc > .acc__h { font-size: 36px; padding: 28px 0 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .prose .acc > .acc__h { transition: none; }
}

/* Footer */
.ftr { background: #082f35; color: #e9f4f2; font-size: 14.5px; }
:root[data-theme="dark"] .ftr { background: #111a2e; border-top: 1px solid #1e293b; }
.ftr__grid { display: grid; gap: 28px 40px; padding-top: 40px; padding-bottom: 24px; grid-template-columns: minmax(0, 1fr); }
.ftr h2 { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #b9d0cd; margin-bottom: 8px; }
.ftr a, .ftr .linkbtn { display: inline-block; padding: 7px 0; color: #e9f4f2; }
.ftr nav a { text-decoration: none; }
.ftr nav a:hover { text-decoration: underline; }
.ftr__brand { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.ftr__brand p { color: #b9d0cd; }
.ftr .ftr__mail { color: #7fe3bd; }
.ftr__two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.ftr__legal { padding-top: 14px; padding-bottom: 26px; border-top: 1px solid #1c4148; font-size: 13.5px; color: #b9d0cd; }
@media (min-width: 900px) {
  .ftr__grid { grid-template-columns: 1.1fr 1.7fr .9fr 1.1fr; }
}
