/* Shared stylesheet. Mobile-first, light/dark via prefers-color-scheme, no external fonts. */
/* Colours come from theme.css, generated from the brand palette by scripts/build.js. */
:root { --radius: 10px; --gap: 1rem; color-scheme: light dark; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif; }
.wrap { max-width: 52rem; margin: 0 auto; padding: 0 1rem; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--card); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }
h1 { font-size: 1.75rem; line-height: 1.25; margin: 1.25rem 0 .5rem; }
h2 { font-size: 1.3rem; line-height: 1.3; margin: 2rem 0 .5rem; }
h3 { font-size: 1.08rem; margin: 1.5rem 0 .25rem; }
.lede { color: var(--muted); font-size: 1.05rem; margin-top: 0; }
code, pre, kbd, textarea.mono, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .95em; }

/* header / footer */
.site-header { border-bottom: 1px solid var(--line); background: var(--card); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding-top: .6rem; padding-bottom: .6rem; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--fg); text-decoration: none; }
.nav { list-style: none; display: flex; gap: 1rem; margin: 0; padding: 0; }
.nav a[aria-current="page"] { font-weight: 600; }
.site-footer { margin-top: 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; padding: 1rem 0 2rem; }

/* cards and home */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.tool-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; grid-template-columns: 1fr; }
.tool-list a { display: block; padding: .9rem 1rem; text-decoration: none; color: var(--fg); height: 100%; }
.tool-list a strong { display: block; color: var(--accent); }
.tool-list a.has-icon { display: grid; grid-template-columns: auto 1fr; gap: 0 .75rem; align-items: start; }
.tool-list a .tool-icon { grid-row: span 2; width: 2rem; height: 2rem; margin-top: .15rem; }
.tool-icon { color: var(--icon); flex: none; }
.title-row { display: flex; align-items: center; gap: .6rem; }
.title-row .tool-icon { width: 2.25rem; height: 2.25rem; }
.brand { display: inline-flex; align-items: center; gap: .45rem; }
.brand img { width: 1.6rem; height: 1.6rem; }
.tool-list a span { color: var(--muted); font-size: .95rem; }
@media (min-width: 40rem) { .tool-list { grid-template-columns: 1fr 1fr; } h1 { font-size: 2rem; } }

/* tool forms */
.tool { padding: 1rem; margin: 1rem 0 1.5rem; }
.tool form { margin: 0; }
.field { margin: 0 0 .85rem; }
.row { display: grid; gap: 0 .75rem; grid-template-columns: 1fr; }
@media (min-width: 34rem) { .row { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); } }
label, legend { display: block; font-weight: 600; margin-bottom: .25rem; }
.hint { display: block; color: var(--muted); font-size: .88rem; font-weight: 400; }
input[type="text"], input[type="number"], input[type="date"], input[type="datetime-local"], select, textarea {
  width: 100%; min-height: 2.75rem; padding: .5rem .65rem; font: inherit; color: var(--fg); background: var(--bg);
  border: 1px solid var(--muted); border-radius: 8px;
}
textarea { min-height: 9rem; resize: vertical; line-height: 1.45; }
fieldset { border: 0; padding: 0; margin: 0 0 .85rem; min-width: 0; }
.choices { display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
.choices label, .check { font-weight: 400; display: inline-flex; align-items: center; gap: .4rem; margin: 0; min-height: 2rem; }
input[type="checkbox"], input[type="radio"] { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .25rem; }
button { font: inherit; font-weight: 600; min-height: 2.75rem; padding: .5rem 1.1rem; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-fg); }
button.secondary { background: transparent; color: var(--accent); }
.tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.tabs button[aria-pressed="false"] { background: transparent; color: var(--accent); }
[hidden] { display: none !important; }

/* results */
.result:empty { display: none; }
.result { margin-top: 1rem; padding: .9rem 1rem; border-radius: 8px; background: var(--ok-bg); overflow-wrap: anywhere; }
.result.error { background: var(--err-bg); color: var(--err-fg); }
.result .big { font-size: 1.5rem; font-weight: 700; line-height: 1.3; margin: 0 0 .25rem; }
.result p { margin: .25rem 0; }
.result dl { display: grid; grid-template-columns: auto 1fr; gap: .2rem 1rem; margin: .5rem 0 0; }
.result dt { color: var(--muted); }
.result dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.output { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.table-wrap { overflow-x: auto; margin-top: .75rem; max-height: 28rem; overflow-y: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: .93rem; }
th, td { text-align: right; padding: .35rem .5rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { position: sticky; top: 0; background: var(--card); }
details { margin-top: .75rem; }
summary { cursor: pointer; font-weight: 600; }

/* content */
.content { margin-top: 1rem; }
.content table { margin: .75rem 0; }
.formula { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 6px; padding: .6rem .9rem; overflow-x: auto; }
.note { color: var(--muted); font-size: .93rem; border-top: 1px solid var(--line); padding-top: .75rem; margin-top: 1.5rem; }
.faq h3 { margin-top: 1.1rem; }
.related ul { padding-left: 1.2rem; }
.prose { max-width: 44rem; }
.placeholder-box { border: 2px dashed var(--muted); padding: .75rem 1rem; border-radius: 8px; color: var(--muted); }
@media print { .site-header, .site-footer, .related, .tool form { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* wheel spinner */
.wheel-layout { display: grid; gap: 1rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 44rem) { .wheel-layout { grid-template-columns: 1fr 1fr; } }
.wheel-box { position: relative; max-width: 24rem; width: 100%; margin: 0 auto; }
.wheel-box canvas { display: block; width: 100%; height: auto; }
.wheel-pointer { position: absolute; left: 50%; top: -4px; transform: translateX(-50%); width: 0; height: 0; z-index: 1;
  border-left: 14px solid transparent; border-right: 14px solid transparent; border-top: 26px solid var(--fg); }
button:disabled { opacity: .6; cursor: wait; }

/* image compressor */
.img-out { margin-top: 1rem; }
.img-out img { display: block; max-width: 100%; height: auto; max-height: 24rem; border: 1px solid var(--line); border-radius: 8px; }
input[type="file"] { font: inherit; max-width: 100%; }

/* invoice generator */
.item-row { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin-bottom: .6rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
.item-row .item-desc { grid-column: 1 / -1; }
@media (min-width: 40rem) { .item-row { grid-template-columns: 3fr 1fr 1.3fr auto; border: 0; padding: 0; } .item-row .item-desc { grid-column: auto; } }
.item-row input { width: 100%; min-height: 2.75rem; padding: .5rem .65rem; font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--muted); border-radius: 8px; }
.invoice-sheet { background: #fff; color: #1a1a1a; border: 1px solid var(--line); border-radius: 8px; padding: 1.25rem; margin: 1rem 0; overflow-x: auto; }
.invoice-sheet:empty { display: none; }
.inv-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.inv-title { margin: 0; font-size: 1.6rem; }
.inv-meta, .inv-from p, .inv-to p { margin: .25rem 0; }
.inv-to { margin: 1rem 0; }
.pre { white-space: pre-line; }
.inv-table th, .inv-table td { border-bottom: 1px solid #ddd; white-space: normal; }
.inv-table thead th { background: #fff; color: #1a1a1a; position: static; }
.inv-table tfoot td { text-align: right; border: 0; }
.inv-table tfoot td:last-child { white-space: nowrap; }
.inv-total td { font-weight: 700; border-top: 2px solid #1a1a1a !important; }
.inv-notes { margin-top: 1rem; font-size: .93rem; }
@media print {
  .invoice-page .lede, .invoice-page .title-row, .invoice-page .tool form, .invoice-page #result, .invoice-page .content,
  .invoice-page .related, .skip { display: none !important; }
  .invoice-page .tool { border: 0; padding: 0; margin: 0; background: none; }
  .invoice-sheet { border: 0; padding: 0; margin: 0; }
  body { background: #fff; }
}
.inv-table td:nth-child(3), .inv-table td:nth-child(4) { white-space: nowrap; }

/* QR code generator */
.qr-out { margin-top: 1rem; }
.qr-out canvas { display: block; width: 100%; max-width: 20rem; height: auto; image-rendering: pixelated; border: 1px solid var(--line); border-radius: 8px; margin-bottom: .75rem; }
.result .warn { color: var(--err-fg); background: var(--err-bg); padding: .5rem .75rem; border-radius: 6px; }
.footer-note { font-size: .85rem; }
.subhead { font-weight: 600; margin: -.25rem 0 .5rem; }
.policy-index { margin-top: 2rem; }

/* PDF merge & split */
.pdf-list { list-style: none; padding: 0; margin: .5rem 0 1rem; }
.pdf-list li { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.pdf-name { overflow-wrap: anywhere; flex: 1 1 14rem; }
.pdf-name .hint { display: block; }
.pdf-btns { display: flex; gap: .35rem; }
.pdf-btns button { min-width: 2.75rem; }
.pdf-list .bad { color: var(--err-fg); }
.dl-list { padding-left: 1.2rem; }
.dl-link { overflow-wrap: anywhere; }

.related-tool { margin: 1rem 0 0; }

/* Meeting planner */
.zone-row { display: grid; grid-template-columns: minmax(12rem, 2fr) repeat(2, minmax(6.5rem, 1fr)) auto; gap: .5rem; align-items: end; margin-bottom: .5rem; }
@media (max-width: 40rem) { .zone-row { grid-template-columns: 1fr 1fr; } .zone-row .field:first-child { grid-column: 1 / -1; } }
.zone-row .field { margin-bottom: 0; }
.mp-grid td, .mp-grid th { text-align: center; white-space: nowrap; }
.mp-grid .work { background: var(--ok-bg); }
.mp-grid tr.all th, .mp-grid tr.all td { font-weight: 700; box-shadow: inset 0 0 0 1px var(--accent); }
.mp-grid small { font-weight: 400; opacity: .8; }
button.linkish { background: none; border: 0; padding: 0; min-height: 0; color: var(--accent); text-decoration: underline; font: inherit; cursor: pointer; }
.slot-list { margin: .5rem 0; }
.mp-pick { margin-top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* OCR */
.ocr-drop { border: 2px dashed var(--line); border-radius: 8px; padding: .75rem; margin-bottom: 1rem; }
.ocr-drop.over { border-color: var(--accent); }
.ocr-drop img { display: block; max-width: 100%; max-height: 18rem; height: auto; margin-top: .5rem; border-radius: 6px; }
#ocr-progress { width: 100%; max-width: 20rem; vertical-align: middle; }
#ocr-text { width: 100%; font-family: inherit; }

/* Grade calculator */
.grade-row { display: grid; gap: 0 .5rem; grid-template-columns: 1.4fr 1fr .8fr; }
.grade-row + .grade-row label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grade-scale { margin-top: 1rem; }

/* JPG to PDF */
.img-list .thumb { width: 3rem; height: 3rem; object-fit: cover; border-radius: 4px; flex: none; margin-right: .5rem; }
.thumb.rot-90 { transform: rotate(90deg); } .thumb.rot-180 { transform: rotate(180deg); } .thumb.rot-270 { transform: rotate(270deg); }

/* Link styled as a button (downloads) */
a.button { display: inline-flex; align-items: center; font-weight: 600; min-height: 2.75rem; padding: .5rem 1.1rem; border-radius: 8px;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-fg); text-decoration: none; }
a.button.secondary { background: transparent; color: var(--accent); }

/* Time card */
.tc-table td { padding: .2rem .25rem; } .tc-table th[scope="row"] { text-align: left; font-weight: 600; padding-right: .5rem; }
.tc-table input { width: 100%; min-width: 9rem; } .tc-table td:last-child input { min-width: 3.5rem; max-width: 5rem; }
@media print { .site-header, .site-footer, .tabs, .actions, .related, .content, .lede, .subhead { display: none !important; } }
.gpa-row { display: grid; gap: 0 .5rem; grid-template-columns: 1.4fr .7fr .7fr 1.1fr; }
.gpa-row + .gpa-row label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Signature generator: OFL fonts served from this site (see assets/fonts/signature/FONT-LICENSES.txt). Style samples switch on (.sig-fonts.on) after page load so the fonts do not delay first paint. */
@font-face { font-family: "Alex Brush"; src: url("../fonts/signature/AlexBrush-Regular.ttf") format("truetype"); font-display: swap; }
.sig-fonts.on .sig-f1 { font-family: "Alex Brush", cursive; }
@font-face { font-family: "Allura"; src: url("../fonts/signature/Allura-Regular.ttf") format("truetype"); font-display: swap; }
.sig-fonts.on .sig-f2 { font-family: "Allura", cursive; }
@font-face { font-family: "Dancing Script"; src: url("../fonts/signature/DancingScript-VariableFont_wght.ttf") format("truetype"); font-display: swap; }
.sig-fonts.on .sig-f3 { font-family: "Dancing Script", cursive; }
@font-face { font-family: "Sacramento"; src: url("../fonts/signature/Sacramento-Regular.ttf") format("truetype"); font-display: swap; }
.sig-fonts.on .sig-f4 { font-family: "Sacramento", cursive; }
@font-face { font-family: "Mr Dafoe"; src: url("../fonts/signature/MrDafoe-Regular.ttf") format("truetype"); font-display: swap; }
.sig-fonts.on .sig-f5 { font-family: "Mr Dafoe", cursive; }
.notice { border-left: 4px solid #b26b00; background: #fff7e6; padding: .6rem .8rem; border-radius: 4px; }
.sig-fonts { border: 0; padding: 0; margin: 0 0 .75rem; display: grid; gap: .4rem; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
.sig-fonts legend { font-weight: 600; margin-bottom: .3rem; }
.sig-font { display: flex; flex-direction: column; border: 1px solid #ccd; border-radius: 6px; padding: .4rem .6rem; cursor: pointer; }
.sig-font input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sig-font span { font-size: 1.9rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sig-font small { color: #555; }
.sig-font:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.sig-font input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.sig-pad { display: block; width: 100%; height: 220px; border: 1px dashed #889; border-radius: 6px; background: #fff; touch-action: none; cursor: crosshair; margin-bottom: .75rem; }
.sig-out { max-width: 100%; height: auto; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0 / 16px 16px; border-radius: 4px; }
.sig-mail { border: 1px solid #ddd; border-radius: 6px; padding: .8rem 1rem; background: #fff; margin-top: .75rem; }
.sig-mail img { display: block; max-width: 260px; height: auto; margin: .3rem 0; }
/* Colour picker */
.field-row { display: grid; gap: 0 .75rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.cp-wrap { position: relative; margin-bottom: .75rem; }
.cp-canvas { display: block; max-width: 100%; height: auto; cursor: crosshair; border-radius: 4px; touch-action: manipulation; }
.cp-canvas:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.cp-loupe { position: absolute; top: .5rem; right: .5rem; width: 132px; height: 132px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #0006, 0 2px 8px #0005; pointer-events: none; image-rendering: pixelated; background: #fff; }
.cp-swatches { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem; }
.cp-swatch { min-width: 5.5rem; padding: .5rem .5rem .35rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: .8rem; text-align: left; cursor: pointer; line-height: 1.3; }
.cp-big { display: flex; align-items: center; justify-content: center; height: 4.5rem; border-radius: 8px; border: 1px solid var(--line); font-weight: 600; margin-bottom: .5rem; }
.cp-codes { display: grid; grid-template-columns: auto 1fr auto; gap: .3rem .6rem; align-items: center; margin: .5rem 0; }
.cp-codes code { font-size: .95rem; word-break: break-all; }
.cp-codes button { padding: .2rem .6rem; font-size: .8rem; }
.cp-demo { display: block; width: 100%; max-width: 320px; height: auto; border: 1px solid var(--line); border-radius: 6px; margin: .4rem 0; }
.pass, .fail { font-weight: 600; padding: 0 .3rem; border-radius: 3px; } .pass { background: var(--ok-bg); color: var(--fg); } .fail { background: var(--err-bg); color: var(--err-fg); }
ul.plain { list-style: none; padding: 0; } ul.plain li { margin: .25rem 0; }
h2.sub { font-size: 1.05rem; margin: 1rem 0 .4rem; }
/* Roman numerals: OFL display fonts served from this site (see assets/fonts/roman/FONT-LICENSES.txt), downloaded only where used. */
@font-face { font-family: "Cinzel"; src: url("../fonts/roman/Cinzel-VariableFont_wght.ttf") format("truetype"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Marcellus"; src: url("../fonts/roman/Marcellus-Regular.ttf") format("truetype"); font-display: swap; }
.rn-big { font-size: clamp(2rem, 8vw, 3.4rem); line-height: 1.3; margin: .2rem 0 .4rem; letter-spacing: .04em; word-break: break-all; }
.rn-cinzel { font-family: "Cinzel", Georgia, serif; } .rn-marcellus { font-family: "Marcellus", Georgia, serif; } .rn-serif { font-family: Georgia, "Times New Roman", serif; }
.rn-big .ov { text-decoration: overline; text-decoration-thickness: .06em; }
/* Text compare: removed = brand red family, added = teal from the brand focus colour (the theme has no green). */
:root { --tx-del-bg: #FBEAE6; --tx-del-hi: #F2C2B7; --tx-add-bg: #E2F0EE; --tx-add-hi: #B5D9D4; }
@media (prefers-color-scheme: dark) { :root { --tx-del-bg: #4A2620; --tx-del-hi: #73352A; --tx-add-bg: #1E3A3B; --tx-add-hi: #2E5F62; } }
.tx-pair { display: grid; gap: 0 .75rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.tx-pair textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; }
.tx-drop.over textarea { outline: 2px dashed var(--accent); }
.tx-file { display: inline-block; font-weight: 400; font-size: .9rem; margin-top: .3rem; }
.tx-out { max-height: 70vh; overflow: auto; }
.tx-table { width: 100%; border-collapse: collapse; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; }
.tx-table th, .tx-table td { text-align: left; }
.tx-table td { vertical-align: top; white-space: pre-wrap; overflow-wrap: anywhere; padding: .1rem .4rem; border-bottom: 1px solid var(--line); }
.tx-table td.n { color: var(--muted); text-align: right !important; width: 1%; white-space: nowrap; user-select: none; }
.tx-table td.m { width: 1%; font-weight: 700; }
.tx-side td.ta, .tx-side td.tb { width: 49%; }
.tx-side .tx-del td.ta, .tx-side .tx-change td.ta, .tx-inline .tx-del td:last-child { background: var(--tx-del-bg); }
.tx-side .tx-add td.tb, .tx-side .tx-change td.tb, .tx-inline .tx-add td:last-child { background: var(--tx-add-bg); }
.tx-table del { background: var(--tx-del-hi); text-decoration: line-through; color: var(--fg); }
.tx-table ins { background: var(--tx-add-hi); text-decoration: underline; color: var(--fg); }
.tx-skip td { color: var(--muted); text-align: center; font-style: italic; }

/* Fraction calculator: stacked fractions in the answer */
.fr { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; line-height: 1.1; margin: 0 .1em; }
.fr-n { border-bottom: 2px solid currentColor; padding: 0 .15em; }
.fr-d { padding: 0 .15em; }
.result .fr-big { font-size: 1.6rem; }
.fr-steps { padding-left: 1.4rem; margin: .25rem 0 0; } .fr-steps li { margin: .2rem 0; }
.fr-ops { display: grid; gap: 0 .5rem; grid-template-columns: 1fr; }
@media (min-width: 34rem) { .fr-ops { grid-template-columns: 1fr auto 1fr; align-items: end; } }

/* W22-W31 tools (hand-written during the code hold; check in the browser after the rebuild) */
/* Square footage: one row per room part */
.sq-row { display: grid; gap: 0 .6rem; grid-template-columns: 1fr 1fr; align-items: end; padding: .4rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 40rem) { .sq-row { grid-template-columns: 1.4fr 1.1fr 1fr 1fr auto; } }
.sq-row .field { margin-bottom: .4rem; }
/* Rent split: one fieldset per room */
.rs-row { border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .8rem .2rem; margin: 0 0 .8rem; display: grid; gap: 0 .6rem; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.rs-row legend { font-weight: 600; padding: 0 .3rem; }
/* Online timer */
.tm-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: 1rem; text-align: center; }
.tm-label { margin: 0; color: var(--muted); }
.tm-display { font: 700 clamp(3rem, 16vw, 6.5rem)/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; margin: .2rem 0 .4rem; letter-spacing: .02em; }
.tm-shared { justify-content: center; }
.tm-box:fullscreen { display: flex; flex-direction: column; justify-content: center; border: 0; border-radius: 0; }
.tm-box:fullscreen .tm-display { font-size: min(24vw, 40vh); }
/* Typing speed test */
.ty-clock { font: 700 2rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; margin: .2rem 0; }
.ty-text { font: 1.15rem/1.9 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .9rem; margin-bottom: .6rem; max-height: 14rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; user-select: none; }
.ty-ok { color: var(--muted); }
.ty-bad { background: var(--tx-del-hi); color: var(--fg); text-decoration: underline; }
.ty-next { border-bottom: 3px solid var(--accent); }
/* Random number generator: single big result */
.rn-one { font-size: clamp(2.2rem, 10vw, 4rem); line-height: 1.15; overflow-wrap: anywhere; }
/* Barcode generator: white background so dark mode still scans */
.bc-out { background: #fff; display: inline-block; padding: .5rem; border-radius: 4px; max-width: 100%; overflow-x: auto; }
.bc-out svg, .bc-label svg { display: block; max-width: 100%; height: auto; }
.bc-sheet { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); margin: .6rem 0; }
.bc-label { background: #fff; margin: 0; padding: .4rem; border: 1px solid var(--line); border-radius: 4px; break-inside: avoid; }
@media print { .bc-sheet { grid-template-columns: repeat(3, 1fr); } .bc-label { border-color: #ccc; } }
/* CSV to JSON: monospace output boxes */
#cj-csv, #cj-out, #jc-json, #jc-out { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; }
/* Cron: expression input and notes */
#cr-expr { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.15rem; }
.notes { padding-left: 1.2rem; color: var(--muted); }
.notes li { margin: .25rem 0; }

/* W32-W37 tools (hand-written during the code hold; check in the browser after the rebuild) */
/* Days until: live countdown line and share box */
.du-live { font: 700 1.15rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; margin: .2rem 0 .6rem; }
.du-share { margin-top: 1rem; }
.du-share input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; }
/* UAE gratuity: "More options" disclosure */
#gr-form details { margin: 0 0 .85rem; }
#gr-form summary { cursor: pointer; font-weight: 600; margin-bottom: .5rem; }
