:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #1b2233;
  --muted: #566078;
  --border: #d5d9e4;
  --accent: #2756c9;
  --accent-text: #ffffff;
  --accent-soft: #e6edfc;
  --ok: #1c7a45;
  --ok-soft: #e4f4ea;
  --err: #b42318;
  --err-soft: #fdecea;
  --warn: #8a5a00;
  --code-bg: #eef1f7;
  --focus: #b86e00; /* 3.99:1 on white, 3.72:1 on the page (WCAG 1.4.11); #f2a900 was 2:1 */
  --radius: 10px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1420;
    --focus: #f2a900;
    --surface: #171e2d;
    --text: #e6e9f0;
    --muted: #a3abbd;
    --border: #2f3a50;
    --accent: #7aa2ff;
    --accent-text: #0b1020;
    --accent-soft: #1f2a44;
    --ok: #6fd39a;
    --ok-soft: #14301f;
    --err: #ff8a80;
    --err-soft: #3a1714;
    --warn: #f0c060;
    --code-bg: #222b3d;
  }
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Cantarell, sans-serif;
}

a { color: var(--accent); }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible, .file-input:focus-visible + label {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

code, pre, textarea {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

code {
  background: var(--code-bg);
  padding: 0.05em 0.3em;
  border-radius: 6px;
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px;
}

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  padding: 8px 12px;
  z-index: 10;
}
.skip:focus { left: 8px; top: 8px; z-index: 100; }

/* header */
.top {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.top-in {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  min-width: 0;
}
.brand img { border-radius: 8px; flex: none; }

/* header menus: <details> dropdowns (work without scripts; site.js closes
   them on an outside click or Esc) */
.top-menus { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.menu { position: relative; }
.menu > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin: 0 2px 3px 2px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.6;
}
.menu[open] > summary::after { transform: rotate(-135deg); margin-bottom: -3px; }
.menu > summary:hover, .menu[open] > summary { border-color: var(--accent); }
.menu-ic { width: 16px; height: 16px; flex: none; fill: var(--accent); }
.menu-lang .menu-ic { fill: none; stroke: var(--accent); stroke-width: 1.8; }
.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 50;
  margin: 0;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(15, 20, 32, 0.22);
}
.menu-tools .menu-panel {
  width: min(860px, calc(100vw - 240px));
  /* the panel scrolls inside the window (the header is sticky); the columns
     are on an inner box without a height limit, so they stay balanced */
  max-height: calc(100vh - var(--top-h) - 20px);
  max-height: calc(100dvh - var(--top-h) - 20px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
/* groups flow down the columns one after another: no empty cells */
.menu-cols { columns: 3 250px; column-gap: 12px; }
.menu-group { break-inside: avoid; padding-bottom: 6px; }
.menu-lang .menu-panel { min-width: 200px; list-style: none; }
.menu-panel ul { list-style: none; margin: 0; padding: 0; }
.menu-gh { margin: 8px 10px 4px; color: var(--muted); font-size: 0.875rem; font-weight: 600; }
.menu-panel a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}
.menu-panel a:hover, .menu-panel a:focus-visible { background: var(--accent-soft); }
.menu-panel a[aria-current="page"] { background: var(--accent-soft); font-weight: 600; }
.menu-panel .tool-ic { height: 14px; width: auto; margin: 0; flex: none; }
.menu-panel .lang-code { display: inline-block; min-width: 28px; color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
/* parts of a name that are not shown are hidden visually, not removed, so the
   accessible name always contains the visible text (WCAG 2.5.3) */
.menu-lang summary .lang-code { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 600px) {
  .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .menu > summary { padding: 6px 10px; }
  .menu-lang summary .lang-cur { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .menu-lang summary .lang-code { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .menu-panel { position: fixed; left: 12px; right: 12px; top: calc(var(--top-h) + 6px); width: auto; max-height: calc(100vh - var(--top-h) - 18px); max-height: calc(100dvh - var(--top-h) - 18px); overflow: auto; }
}
/* up to 1024 px the tools panel spans the window (anchored to its button it
   ran off the left edge: at 901-918 px with the longer Ukrainian labels) and
   uses a grid: CSS columns with a height limit pushed groups into hidden
   columns to the right */
@media (max-width: 1024px) {
  .menu-tools .menu-panel {
    position: fixed; left: 12px; right: 12px; top: calc(var(--top-h) + 6px); width: auto;
    max-height: calc(100vh - var(--top-h) - 18px); max-height: calc(100dvh - var(--top-h) - 18px); overflow: auto;
  }
  .menu-tools .menu-cols {
    columns: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); column-gap: 12px; align-items: start;
  }
}

/* text */
main { padding-top: 8px; padding-bottom: 40px; }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.2; margin: 24px 0 8px; }
h2 { font-size: 1.375rem; margin: 32px 0 10px; }
h3 { font-size: 1.0625rem; margin: 20px 0 6px; }
.lead { font-size: 1.125rem; color: var(--muted); margin: 0 0 8px; max-width: 70ch; }
.local {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 2px 0 14px;
  padding: 4px 12px 4px 10px;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
  font-weight: 600;
  font-size: 0.875rem;
}
.local::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 7V5a4 4 0 0 1 8 0v2h1v8H3V7zm2 0h4V5a2 2 0 0 0-4 0z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 7V5a4 4 0 0 1 8 0v2h1v8H3V7zm2 0h4V5a2 2 0 0 0-4 0z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.text p, .text li { max-width: 75ch; overflow-wrap: anywhere; }
.text ul, .text ol { padding-left: 1.3em; }
.text li { margin: 4px 0; }

/* tool */
.tool {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 8px 0 28px;
  box-shadow: 0 1px 2px rgb(16 24 40 / 0.05), 0 2px 8px rgb(16 24 40 / 0.06);
}
@media (prefers-color-scheme: dark) { .tool { box-shadow: none; } }
.drop {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
}
.drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.file-input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  overflow: hidden;
}
.drop-hint { color: var(--muted); }
.file-name { flex-basis: 100%; font-weight: 600; overflow-wrap: anywhere; }
.file-name:empty { display: none; }
.paste-label { display: block; margin: 14px 0 6px; font-weight: 600; }
textarea {
  width: 100%;
  min-height: 9em;
  padding: 10px;
  border: 1px solid var(--field-border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.45;
  resize: vertical;
}
.actions, .out-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--accent-soft); border-color: transparent; color: var(--text); }
.btn.small { min-height: 34px; padding: 4px 12px; font-size: 0.875rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:disabled:hover { border-color: var(--border); }
.btn.ghost:disabled:hover { background: transparent; border-color: transparent; }

.options {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 14px 0 0;
  padding: 10px 14px 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px 18px;
  align-items: end;
}
.options legend { font-weight: 600; padding: 0 6px; }
.opt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.opt[hidden] { display: none; }
.opt-wide { grid-column: 1 / -1; }
.opt label { font-size: 0.875rem; color: var(--muted); }
.opt-check { flex-direction: row; align-items: center; gap: 8px; min-height: 42px; }
.opt-check label { color: var(--text); }
.opt-check input { width: 20px; height: 20px; flex: none; margin: 0; accent-color: var(--accent); }
.opt select, .opt input[type="text"] {
  width: 100%;
  min-height: 42px;
  padding: 6px 10px;
  border: 1px solid var(--field-border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--accent-soft);
}
.status[hidden] { display: none; }
.status.is-error { background: var(--err-soft); color: var(--err); font-weight: 600; }
.status progress { flex: 1 1 160px; height: 10px; }

.output { margin-top: 14px; }
.output[hidden] { display: none; }
.notes { list-style: none; margin: 10px 0; padding: 0; font-size: 0.9375rem; }
.notes li { margin: 4px 0; padding-left: 1.2em; position: relative; }
.notes li::before { content: "•"; position: absolute; left: 0.2em; color: var(--muted); }
.notes li.warn { color: var(--warn); }
.notes li.warn::before { content: "!"; font-weight: 700; color: var(--warn); }
.notes:empty { display: none; }
#out-text { min-height: 16em; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
.table-wrap table { border-collapse: collapse; font-size: 0.875rem; min-width: 100%; }
.table-wrap caption { text-align: left; padding: 8px 10px; color: var(--muted); }
.table-wrap th, .table-wrap td { border-top: 1px solid var(--border); padding: 5px 10px; text-align: left; white-space: nowrap; vertical-align: top; }
.table-wrap th { background: var(--code-bg); font-weight: 600; }

.report { border-radius: 8px; padding: 12px 14px; }
.report.is-ok { background: var(--ok-soft); }
.report.is-error { background: var(--err-soft); }
.report p { margin: 4px 0; overflow-wrap: anywhere; }
.report .verdict { font-weight: 700; font-size: 1.1rem; }
.report.is-ok .verdict { color: var(--ok); }
.report.is-error .verdict, .report.is-error p:first-child { color: var(--err); }
.excerpt {
  margin: 10px 0 0;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.4;
}
.excerpt code { background: none; padding: 0; }

.problems { list-style: none; margin: 8px 0 0; padding: 0; max-height: 28em; overflow-y: auto; }
.problems li { margin: 0; padding: 6px 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.problems .lvl { display: inline-block; min-width: 0; padding: 0 6px; border-radius: 6px; font-size: 0.8125rem; font-weight: 700; }
.problems .is-err .lvl { background: var(--err); color: var(--bg); }
.problems .is-warn .lvl { background: var(--warn); color: var(--bg); }
#out-cats { margin-top: 10px; }
.mapping[hidden] { display: none; }
.map-hint { grid-column: 1 / -1; margin: 0; font-size: 0.875rem; color: var(--muted); }
.affil { font-size: 0.9375rem; color: var(--muted); }

.steps li { margin: 6px 0; }
.related { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0 !important; }

/* home */
.cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.cards > li > a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
}
.cards > li > a:hover { border-color: var(--accent); }
.cards > li > a strong { color: var(--accent); font-size: 1.0625rem; }
.cards > li > a span { color: var(--muted); font-size: 0.9375rem; }

/* footer */
.foot { border-top: 1px solid var(--border); background: var(--surface); padding: 16px 0 24px; color: var(--muted); font-size: 0.875rem; }
.foot ul { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 6px 0 0; padding: 0; }
.foot a { color: var(--muted); }
.foot p { margin: 0; }

@media (max-width: 560px) {
  .tool { padding: 12px; }
  .actions .btn, .out-actions .btn { flex: 1 1 auto; }
}

/* ---------------------------------------------------------------- QR pages */
/* generator v2: content, then style, then design; the preview stays in
   view on tablets and desktops, and comes right after the content on phones */
.qr-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 360px);
  grid-template-areas: "content preview" "style preview" "design preview";
  grid-template-rows: auto auto 1fr;
  gap: 18px 22px;
  align-items: start;
}
.qr-s-content { grid-area: content; }
.qr-s-style { grid-area: style; }
.qr-s-design { grid-area: design; }
.qr-preview { grid-area: preview; }
@media (max-width: 760px) {
  .qr-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "content" "preview" "style" "design"; grid-template-rows: none; }

}
.qr-step { min-width: 0; }
.qr-h { margin: 0 0 10px; font-size: 1.1rem; }
.qr-types { display: grid; gap: 10px; }
.qr-tgroup-h { margin: 0 0 4px; color: var(--muted); font-size: 0.875rem; }
.qr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.qr-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 6px 12px 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  font-size: 0.9375rem;
  user-select: none;
}
.qr-chip-in { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.qr-glyph { width: 18px; height: 14px; fill: var(--muted); flex: none; }
.qr-chip:hover { border-color: var(--accent); }
.qr-chip:has(.qr-chip-in:checked) { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.qr-chip:has(.qr-chip-in:checked) .qr-glyph { fill: var(--accent); }
.qr-chip:has(.qr-chip-in:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.qr-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.qr-style {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 8px 6px 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}
.qr-style { position: relative; min-width: 0; }
.qr-style-name { max-width: 100%; text-align: center; line-height: 1.25; overflow-wrap: anywhere; hyphens: auto; }
.qr-style:hover { border-color: var(--accent); }
.qr-style:has(.qr-chip-in:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.qr-style:has(.qr-chip-in:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.qr-thumb { display: block; width: 72px; height: 72px; border-radius: 6px; overflow: hidden; background: #ffffff; }
.qr-thumb svg { display: block; width: 100%; height: 100%; }
.qr-sections { display: grid; gap: 8px; }
.qr-sec { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.qr-sec > summary { cursor: pointer; padding: 12px 14px; font-weight: 600; list-style-position: inside; min-height: 44px; }
.qr-sec[open] > summary { border-bottom: 1px solid var(--border); }
.qr-sec > .options { border: 0; margin: 0; padding: 12px 14px 14px; }
@media (max-width: 420px) {
  .qr-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .qr-thumb { width: 64px; height: 64px; }
}
.qr-fields-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 14px; margin: 12px 0; }
.qr-fields-box textarea, .qr-fields-box input[type="email"], .qr-fields-box input[type="url"], .qr-fields-box input[type="tel"], .qr-fields-box input[type="password"], .qr-fields-box input[type="datetime-local"], .qr-fields-box select {
  width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid var(--field-border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit;
}
.opt input[type="url"], .opt input[type="email"], .opt input[type="tel"], .opt input[type="password"], .opt input[type="datetime-local"] {
  width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid var(--field-border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit;
}
.qr-design-box { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 8px 12px; }
.qr-design-box summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.qr-design-box .options { border: 0; padding: 8px 0 4px; margin: 0; }
.opt input[type="color"] { width: 100%; height: 42px; padding: 2px; border: 1px solid var(--field-border); border-radius: 8px; background: var(--surface); }
.opt input[type="range"] { width: 100%; accent-color: var(--accent); }
.qr-palette { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.qr-palette input[type="color"] { width: 46px; height: 38px; padding: 2px; border: 1px solid var(--field-border); border-radius: 8px; }
.qr-palette .lab, .qr-logo .lab { width: 100%; font-size: 0.875rem; color: var(--muted); }
.qr-logo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (min-width: 761px) { .qr-preview { position: sticky; top: calc(var(--top-h) + 12px); } }
.qr-canvas { background: repeating-conic-gradient(#e9ecef 0 25%, #ffffff 0 50%) 50% / 20px 20px; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; display: flex; justify-content: center; }
.qr-canvas svg { width: 100%; max-width: 420px; height: auto; display: block; }
.qr-check { margin: 10px 0 4px; padding: 8px 12px; border-radius: 8px; background: var(--code-bg); font-size: 0.9375rem; }
.qr-check:empty { display: none; }
.qr-check.is-ok { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.qr-check.is-error { background: var(--err-soft); color: var(--err); font-weight: 600; }
.notes li.note-warn { color: var(--warn); }
.qr-info { margin: 10px 0 4px; font-size: 0.875rem; color: var(--muted); }
.qr-preview textarea, .qr-result textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--field-border); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 0.875rem; resize: vertical; }
.qr-nothing { font-size: 0.875rem; color: var(--muted); }
.qr-video { width: 100%; max-width: 520px; border-radius: var(--radius); border: 1px solid var(--border); margin: 10px 0; background: #000; }
.qr-results { display: grid; gap: 16px; margin-top: 12px; }
.qr-result { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 14px 16px; }
.qr-result h3 { margin: 0 0 4px; }
.qr-by { margin: 0 0 10px; color: var(--muted); font-size: 0.875rem; }
.qr-fields { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0 0 10px; }
.qr-fields dt { color: var(--muted); }
.qr-fields dd { margin: 0; overflow-wrap: anywhere; }
.qr-secret { font-family: ui-monospace, Menlo, Consolas, monospace; }
.qr-signals { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.qr-signals li { padding: 8px 10px; border-radius: 8px; background: var(--code-bg); }
.qr-signals .sig-ok { background: var(--ok-soft); color: var(--ok); }
.qr-signals .sig-warn { background: #fff4db; color: #6b4400; }
.qr-signals .sig-danger { background: var(--err-soft); color: var(--err); font-weight: 600; }
@media (prefers-color-scheme: dark) { .qr-signals .sig-warn { background: #3a2d10; color: #f0c060; } .qr-canvas { background: repeating-conic-gradient(#2a3346 0 25%, #1c2333 0 50%) 50% / 20px 20px; } }
.sig-icon { display: inline-block; width: 1.3em; }
.qr-disclaimer { font-size: 0.875rem; color: var(--muted); margin: 6px 0 10px; }
.qr-raw-label { display: block; font-size: 0.875rem; color: var(--muted); margin-bottom: 4px; }
.tm { font-size: 0.875rem; color: var(--muted); margin-top: 24px; }

/* home: tool groups (v2). Each group has its own hue, used only by the
   module-grid icons, the group mark and the card border on hover/focus. */
:root {
  --h-tables: #0e7c7b;
  --h-qr: #c2255c;
  --h-data: #6a4bc4;
  --h-docs: #a8641a;
  --h-sellers: #2f855a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --h-tables: #3cc4c2;
    --h-qr: #f06595;
    --h-data: #a48bf0;
    --h-docs: #e3a159;
    --h-sellers: #63c58f;
  }
}
.groups { display: grid; gap: 30px; margin: 6px 0 8px; }
.group { --hue: var(--accent); }
.g-tables { --hue: var(--h-tables); }
.g-qr { --hue: var(--h-qr); }
.g-data { --hue: var(--h-data); }
.g-docs { --hue: var(--h-docs); }
.g-sellers { --hue: var(--h-sellers); }
.group h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.25rem; }
.grp-ic { width: 26px; height: 22px; fill: var(--hue); flex: none; }
.group-note { margin: 2px 0 12px; color: var(--muted); }
.groups .cards > li > a { gap: 6px; padding: 16px 16px 14px; }
.groups .cards > li > a strong { color: var(--text); }
.tool-ic { height: 28px; width: auto; align-self: flex-start; margin-bottom: 6px; }
.tool-ic .g-from { fill: color-mix(in srgb, var(--hue) 45%, var(--surface)); }
.tool-ic .g-arrow { fill: var(--muted); opacity: 0.55; }
.tool-ic .g-to { fill: var(--hue); }
.groups .cards > li > a:hover, .groups .cards > li > a:focus-visible { border-color: var(--hue); }
.groups .cards > li > a:hover strong, .groups .cards > li > a:focus-visible strong { color: var(--hue); }
@media (prefers-reduced-motion: no-preference) {
  .groups .cards > li > a { transition: border-color 0.15s, transform 0.15s; }
  .groups .cards > li > a:hover { transform: translateY(-2px); }
}
@media (max-width: 560px) {
  .groups .cards > li > a { display: grid; grid-template-columns: 78px minmax(0, 1fr); column-gap: 12px; row-gap: 2px; align-items: start; padding: 12px 14px; }
  .groups .cards > li > a .tool-ic { grid-row: 1 / span 2; height: 20px; margin: 4px 0 0; }
}

/* footer: remember my choices on this device */
.foot-mem { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 0; }
.foot-mem label { min-width: 0; overflow-wrap: anywhere; }
.foot-mem input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; }
.memory { margin: 8px 0 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.memory .memory-state { color: var(--muted); margin: 6px 0 10px; }

/* generator: downloads (PNG first, its size beside it, SVG below) */
.qr-dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin: 10px 0 8px; }
.qr-dl .btn { min-height: 44px; justify-content: center; }
.qr-dl #qr-svg { grid-column: 1 / -1; }
.qr-dl select { min-height: 44px; padding: 0 10px; border: 1px solid var(--field-border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.status.is-hint { color: var(--muted); background: transparent; border: 1px dashed var(--border); font-weight: 400; }
.qr-empty { margin: 0; padding: 48px 16px; text-align: center; color: var(--muted); }

/* developer tools: input, chain of steps, result */
.dev-tool { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.dev-tool > *, .dev-box > *, .dev-step > * { min-width: 0; }
.dev-tool select { max-width: 100%; }
.dev-box { display: grid; gap: 6px; }
.dev-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-weight: 600; }
.dev-head-tools { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 400; }
.dev-head select, .dev-step select, .dev-opt input[type="text"], .dev-opt input[type="password"] {
  min-height: 36px; padding: 4px 8px; border: 1px solid var(--field-border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 0.9375rem;
}
.dev-tool textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--field-border); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 0.875rem; line-height: 1.45; resize: vertical; }
.dev-note { margin: 0; color: var(--muted); font-size: 0.875rem; font-weight: 400; }
.dev-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; border: 1px dashed var(--accent); border-radius: 10px; background: var(--accent-soft); }
.dev-suggest-lab { color: var(--muted); font-size: 0.875rem; margin-right: 2px; }
.dev-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: none; }
.dev-step { border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 10px; background: var(--surface); padding: 8px 10px; display: grid; gap: 6px; }
.dev-step-head { display: flex; align-items: flex-start; gap: 8px; }
.dev-step-head > .dev-step-n, .dev-step-head > .btn { margin-top: 6px; }
.dev-step-head select { flex: 1 1 auto; min-width: 0; font-weight: 600; }
.dev-step-n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--accent); color: var(--accent-text); font-size: 0.8125rem; font-weight: 700; }
.dev-opts { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.dev-opts:empty { display: none; }
.dev-opt { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 100%; font-size: 0.875rem; }
.dev-opt input[type="text"], .dev-opt input[type="password"] { min-width: 0; flex: 1 1 12ch; }
.dev-step-out { margin: 0; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.8125rem; color: var(--muted); overflow-wrap: anywhere; }
.dev-step-out:empty { display: none; }
.dev-step-out.is-error { color: var(--err); font-family: inherit; font-size: 0.875rem; font-weight: 600; }
.dev-add { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.dev-add-label { font-weight: 600; min-height: 36px; display: inline-flex; align-items: center; }
.dev-add-pick { flex: 0 1 360px; min-width: 0; }
/* the step picker: a button and a searchable list inside the page */
.dev-pick { position: relative; flex: 1 1 auto; min-width: 0; }
.dev-pick-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 36px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 0.9375rem; text-align: left; cursor: pointer; }
.dev-step-head .dev-pick-btn { font-weight: 600; }
.dev-pick-btn:hover { border-color: var(--accent); }
.dev-pick-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-pick-chev { flex: none; width: 8px; height: 8px; margin: 0 2px 3px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 0.15s; }
.dev-pick-btn[aria-expanded="true"] .dev-pick-chev { transform: rotate(-135deg); margin-bottom: -3px; }
.dev-pick-panel { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; display: grid; gap: 6px; padding: 6px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28); }
.dev-pick-panel[hidden] { display: none; }
.dev-pick-search { width: 100%; min-height: 36px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 0.9375rem; }
.dev-pick-list, .dev-pick-list ul { list-style: none; margin: 0; padding: 0; }
.dev-pick-list { max-height: min(50vh, 360px); overflow-y: auto; overscroll-behavior: contain; }
.dev-pick-glabel { padding: 8px 8px 2px; color: var(--muted); font-size: 0.8125rem; font-weight: 700; }
.dev-pick-opt { padding: 7px 10px 7px 16px; border-radius: 6px; cursor: pointer; font-size: 0.9375rem; font-weight: 400; overflow-wrap: anywhere; }
.dev-pick-opt:hover, .dev-pick-opt.is-active { background: var(--accent-soft); }
.dev-pick-opt.is-active { outline: 2px solid var(--accent); outline-offset: -2px; }
.dev-pick-opt[aria-selected="true"] { color: var(--accent); font-weight: 700; }
.dev-pick-empty { margin: 4px 8px; color: var(--muted); font-size: 0.875rem; }
.dev-pick-empty:empty { margin: 0; }
@media (pointer: coarse) { .dev-pick-opt { padding-top: 11px; padding-bottom: 11px; } }
.dev-result .notes { margin: 0; }

/* ---------------------------------------------------------------- UX pass 2026-11-26 */
/* converter input: a head with the actions, the text box is also the drop target */
.tool-in, .tool-out { min-width: 0; }
.in-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 10px; }
.in-label { font-weight: 600; }
.in-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.drop.drop-text { display: block; border: 0; padding: 0; }
.drop.drop-text textarea { display: block; }
.drop.drop-text.is-over { background: transparent; }
.drop.drop-text.is-over textarea { border-color: var(--accent); background: var(--accent-soft); }
.drop.drop-file { justify-content: center; min-height: 112px; text-align: center; }
.drop .file-name { margin-top: 8px; font-weight: 600; }
.drop.drop-file .file-name { margin-top: 0; }
textarea[wrap="off"] { white-space: pre; overflow-wrap: normal; overflow-x: auto; }
::placeholder { color: var(--muted); opacity: 1; }
input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.opt-checks { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.status.is-ok { background: var(--ok-soft); color: var(--ok); }
.status #again { margin-left: auto; }
.output > :not([hidden]) + :not([hidden]) { margin-top: 12px; }
.output .notes { margin: 0; }
.table-wrap td.num { text-align: right; font-variant-numeric: tabular-nums; }
/* CSV and Excel to PDF: the first page of the PDF as it is */
.pdf-first { margin: 0; padding: 12px; background: var(--code-bg); }
.pdf-first canvas { display: block; width: 100%; max-width: 720px; height: auto; margin: 0 auto; background: #fff; box-shadow: 0 1px 4px rgb(0 0 0 / 0.25); }
.pdf-first figcaption { margin-top: 8px; text-align: center; color: var(--muted); font-size: 0.875rem; }
.out-empty { display: none; }
.tool-note { margin: -12px 0 24px; }
/* Rozetka columns: a disclosure that says how many columns matched */
.mapping { margin: 14px 0 0; border: 1px solid var(--border); border-radius: 8px; }
.mapping > summary { padding: 10px 14px; min-height: 44px; font-weight: 600; }
.mapping .map-sum { color: var(--muted); font-weight: 400; }
.mapping.is-missing .map-sum { color: var(--err); font-weight: 600; }
.mapping[open] > summary { border-bottom: 1px solid var(--border); }
.mapping .map-hint { margin: 10px 14px 0; }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 18px; padding: 10px 14px 14px; }
/* disclosures share one chevron: QR settings, column mapping, FAQ */
.qr-sec > summary, .mapping > summary, .faq > summary, .bc-sec > summary, .tone-wav > summary { list-style: none; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.qr-sec > summary::-webkit-details-marker, .mapping > summary::-webkit-details-marker, .faq > summary::-webkit-details-marker, .bc-sec > summary::-webkit-details-marker, .tone-wav > summary::-webkit-details-marker { display: none; }
.qr-sec > summary::after, .mapping > summary::after, .faq > summary::after, .bc-sec > summary::after, .tone-wav > summary::after {
  content: ""; flex: none; width: 8px; height: 8px; margin: 0 4px 4px auto;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); opacity: 0.6;
}
.qr-sec[open] > summary::after, .mapping[open] > summary::after, .faq[open] > summary::after, .bc-sec[open] > summary::after, .tone-wav[open] > summary::after { transform: rotate(-135deg); margin-bottom: -4px; }
.faqs { border-top: 1px solid var(--border); max-width: 80ch; }
.faq { border-bottom: 1px solid var(--border); }
.faq > summary { padding: 12px 0; min-height: 44px; }
.faq > summary h3 { margin: 0; font-size: 1.0625rem; }
.faq > p { margin: 0 0 14px; }
.faq > summary:hover h3 { color: var(--accent); }
/* related tools: chips with the target glyph */
.related { --hue: var(--accent); }
.related a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; }
.related a:hover { border-color: var(--accent); }
.related .tool-ic { height: 12px; margin: 0; }
/* tools menu: one column for the icons, so the names line up; a filter */
.menu-panel .tool-ic { width: 44px; height: 12px; }
.menu-find { break-inside: avoid; column-span: all; grid-column: 1 / -1; padding: 2px 2px 6px; }
.menu-find-in { width: 100%; min-height: 40px; padding: 6px 12px; border: 1px solid var(--field-border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.menu-group.is-empty, .menu-panel li.is-out { display: none; }
/* home: search, group links, groups side by side when they are small */
.find { margin: 18px 0 10px; max-width: 560px; }
.find-in {
  width: 100%; min-height: 46px; padding: 10px 16px 10px 42px; border: 1px solid var(--field-border); border-radius: 999px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23858ea3' stroke-width='2'%3E%3Ccircle cx='8.5' cy='8.5' r='6'/%3E%3Cpath d='m13 13 5 5'/%3E%3C/svg%3E") 15px 50% / 18px no-repeat;
  color: var(--text); font: inherit;
}
.find-empty { margin: 8px 4px 0; color: var(--muted); }
.find-empty:empty { display: none; }
.jump ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 8px 0 26px; padding: 0; }
.jump a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 8px 6px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.9375rem; }
.jump a:hover { border-color: var(--hue, var(--accent)); }
.jump-n { min-width: 26px; padding: 1px 7px; border-radius: 999px; background: var(--code-bg); color: var(--muted); font-size: 0.8125rem; text-align: center; }
.jump .g-tables { --hue: var(--h-tables); } .jump .g-qr { --hue: var(--h-qr); } .jump .g-data { --hue: var(--h-data); } .jump .g-docs { --hue: var(--h-docs); } .jump .g-sellers { --hue: var(--h-sellers); }
.group h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.25rem; scroll-margin-top: 16px; }
.group.is-empty, .cards li.is-out { display: none; }
.groups { --cols: 4; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 30px 16px; }
.group { --span: var(--cols); grid-column: span var(--span); min-width: 0; }
.group[data-count="3"] { --span: min(3, var(--cols)); }
.group[data-count="2"] { --span: min(2, var(--cols)); }
.group[data-count="1"] { --span: 1; }
.groups .cards { grid-template-columns: repeat(var(--span), minmax(0, 1fr)); }
@media (max-width: 1020px) { .groups { --cols: 2; } }
@media (max-width: 560px) { .groups { --cols: 1; } .group[data-count] { --span: 1; } }
/* footer: tools by group, the facts, the links */
.foot { padding: 28px 0 24px; }
.foot-gh { margin: 0 0 6px; color: var(--text); font-weight: 600; }
.foot-group ul, .nf-tools ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.foot-group a { text-decoration: none; }
.foot-group a:hover { text-decoration: underline; }
.foot-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; }
.foot .foot-facts, .foot .foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0; padding: 0; }
.foot-facts li { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 600; }
.foot-facts li::before { content: ""; width: 8px; height: 5px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg) translateY(-2px); }
.foot-project { margin-top: 14px; font-size: 0.875rem; }
/* 404 */
.nf-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px 24px; margin-bottom: 26px; }
.nf-tools .foot-gh { color: var(--muted); }
.nf-links { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.nf-links a { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); text-decoration: none; }
/* developer tools: input left, result right on wide screens */
.dev-in { display: grid; gap: 12px; min-width: 0; }
.dev-as { display: inline-flex; align-items: center; gap: 6px; }
.dev-as[hidden] { display: none; }
.dev-head-tools .btn.small, .dev-head select { min-height: 34px; }
.dev-file { display: flex; align-items: center; gap: 8px; margin: 0; padding: 4px 6px 4px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--code-bg); overflow-wrap: anywhere; }
.dev-file[hidden] { display: none; }
.dev-file-text { flex: 1 1 auto; min-width: 0; font-weight: 600; }
.dev-note, .dev-step-out { overflow-wrap: anywhere; }
.dev-hint { font-size: 0.875rem; }
.dev-step-head .dev-pick-btn { min-height: 40px; }
.dev-step-head > .btn { min-width: 40px; min-height: 40px; margin-top: 0; }
.dev-step-head > .dev-step-n { margin-top: 8px; }
.dev-result .notes:not(:empty) { margin: 0 0 4px; }
.dev-pw { display: inline-flex; align-items: center; gap: 6px; }
.dev-cmp { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.dev-cmp input { flex: 1 1 260px; min-height: 36px; padding: 4px 10px; border: 1px solid var(--field-border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.875rem; }
.dev-cmp-res { font-weight: 600; }
.dev-cmp-res.is-ok { color: var(--ok); }
.dev-cmp-res.is-err { color: var(--err); }
@media (max-width: 420px) { .dev-pick-name { white-space: normal; overflow-wrap: anywhere; } }
@media (min-width: 900px) {
  .tool-conv, .dev-tool { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 24px; align-items: start; }
  .tool-conv > h2, .tool-conv > noscript, .dev-tool > h2, .dev-tool > noscript { grid-column: 1 / -1; }
  .tool-out > .status:first-child { margin-top: 0; }
  .tool-out .output { margin-top: 12px; }
  .tool-out > .status:not([hidden]) ~ .output { margin-top: 12px; }
  .tool-out > .status[hidden] ~ .out-empty + .output { margin-top: 0; }
  .out-empty { display: grid; place-items: center; min-height: 260px; margin: 0; padding: 24px; border: 2px dashed var(--border); border-radius: var(--radius); color: var(--muted); text-align: center; }
  .tool-out:has(> .status:not([hidden])) > .out-empty, .tool-out:has(> .output:not([hidden])) > .out-empty { display: none; }
  .dev-result textarea { min-height: 18em; }
}
/* QR generator: on phones the download stays at hand at the bottom */
.qr-text-label { display: block; margin: 10px 0 4px; color: var(--muted); font-size: 0.875rem; }
.qr-bar { display: none; }
@media (max-width: 760px) {
  .qr-bar:not([hidden]) {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; gap: 10px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border);
    box-shadow: 0 -6px 18px rgb(0 0 0 / 0.12);
  }
  .qr-bar-thumb { flex: none; width: 48px; height: 48px; padding: 2px; border-radius: 6px; background: #ffffff; }
  .qr-bar-thumb svg { display: block; width: 100%; height: 100%; }
  .qr-bar-check { flex: 1 1 auto; min-width: 0; font-size: 0.875rem; font-weight: 600; }
  .qr-bar-check.is-ok { color: var(--ok); }
  .qr-bar-check.is-error { color: var(--err); }
  body:has(.qr-bar:not([hidden])) .foot { padding-bottom: 88px; }
}
.qr-out-n { margin: 0 0 2px; color: var(--muted); font-size: 0.875rem; font-weight: 600; }
.qr-result textarea { field-sizing: content; min-height: 3.2em; max-height: 14em; }
.range-out { min-width: 3.5em; color: var(--muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
/* the logo stands out from the dark header */
@media (prefers-color-scheme: dark) { .brand img { box-shadow: 0 0 0 1px rgb(255 255 255 / 0.18); } }
@media (prefers-reduced-motion: reduce) { .dev-pick-chev { transition: none; } }
@media (max-width: 560px) {
  .options { border: 0; padding: 0; margin-top: 16px; }
  .options legend { padding: 0; margin-bottom: 4px; }
  /* phones: "Input" and "Clear" on one line, the two main buttons below */
  .in-actions { display: contents; }
  .in-head #clear { order: 1; margin-left: auto; }
  .in-head label.btn, .in-head #sample, .in-head #sample-file { order: 2; flex: 1 1 40%; }
  .groups .cards > li > a { grid-template-columns: 64px minmax(0, 1fr); }
  .groups .cards > li > a .tool-ic { height: 16px; }
}

/* form fields: a boundary of at least 3:1 against what is around it (WCAG
   1.4.11), checked by tests/smoke.mjs in both themes. Light #7a8398: 3.8:1 on
   white, 3.4:1 on the code background, 3.2:1 on the accent tint; dark
   #7582a0: 4.3:1 on the surface, 3.7:1 on the code background. Every field
   rule uses this colour (the round-3 review measured 1.4:1, because .opt
   rules with var(--border) won over the rule below). */
:root { --field-border: #7a8398; }
@media (prefers-color-scheme: dark) { :root { --field-border: #7582a0; } }
body :is(textarea, select, input[type="text"], input[type="search"], input[type="password"], input[type="email"], input[type="url"], input[type="tel"], input[type="number"], input[type="date"], input[type="datetime-local"], input[type="color"], .drop, .dev-pick-btn) { border-color: var(--field-border); }
body .drop.is-over { border-color: var(--accent); }

/* touch screens: targets of at least 44 px; no "drop it here" or Ctrl+V hints */
@media (pointer: coarse) {
  .btn, .btn.small, .dev-pick-btn, .dev-pick-search, .dev-tool select, .dev-opt input[type="text"], .dev-opt input[type="password"], .file-input + label { min-height: 44px; }
  .dev-opt-check, label:has(> input[type="checkbox"]) { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; }
  input[type="range"] { min-height: 44px; }
  .menu-panel a, .menu > summary, .brand, .opt select, .opt input[type="text"], .opt input[type="url"], .opt input[type="email"], .opt input[type="tel"], .opt input[type="password"], .opt input[type="datetime-local"], .opt input[type="color"] { min-height: 44px; }
  .opt-check, .foot-mem { min-height: 44px; align-items: center; }
  .opt-check label, .foot-mem label { min-height: 44px; display: flex; align-items: center; }
  .opt-check input, .foot-mem input { width: 24px; height: 24px; margin: 0; }
  input[type="checkbox"] { width: 24px; height: 24px; }
  .foot ul { row-gap: 0; }
  .foot ul a { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (hover: none) { .drop-hint { display: none; } }

/* forced colours (Windows contrast themes): a selected choice keeps a visible mark */
@media (forced-colors: active) {
  .qr-style:has(.qr-chip-in:checked), .qr-chip:has(.qr-chip-in:checked) { outline: 3px solid Highlight; outline-offset: -3px; }
  .menu-panel a[aria-current="page"], .menu-lang a[aria-current="page"], .dev-pick-opt[aria-selected="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
  .local::before, .foot-facts li::before { background: CanvasText; border-color: CanvasText; }
}

/* print: light colours, no controls */
@media print {
  :root { color-scheme: light; --bg: #ffffff; --surface: #ffffff; --text: #000000; --muted: #333333; --border: #999999; --accent: #1a3f9a; --code-bg: #f2f2f2; --ok: #145a32; --ok-soft: #ffffff; --err: #8b1a10; --err-soft: #ffffff; }
  .top-menus, .skip, .crumbs, .in-actions, .actions, .out-actions, .foot-mem, .jump, .find, .drop-hint, .qr-dl, .qr-bar, .qr-gallery, .qr-sections, .dev-add, .dev-suggest, #again, #cancel { display: none !important; }
  .tool { box-shadow: none; border-color: #999999; }
  a { color: #000000; }
}
.opt-range-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.qr-result { min-width: 0; }
/* touch screens: the controls added in the 2026-11-26 pass are 44 px too */
@media (pointer: coarse) {
  .menu-find-in, .find-in, .dev-head-tools .btn.small, .dev-head select, .dev-step-head .dev-pick-btn, .dev-step-head > .btn,
  .dev-cmp input, .dev-pw .btn, .related a, .jump a, .nf-links a, .in-actions .btn, .mapping > summary, .faq > summary { min-height: 44px; }
  .foot-group a { display: inline-flex; align-items: center; min-height: 44px; }
}
.qr-preview textarea { min-height: 3.4em; }

/* ---------------------------------------------------------------- re-review fixes (2026-11-26) */
/* one result block: the size and time sit beside the download */
.out-meta { color: var(--muted); font-size: 0.875rem; align-self: center; }
.notes li:only-child { padding-left: 0; }
.notes li:only-child::before { content: none; }
.status:focus { outline: none; }
.status:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* QR phone bar: one line, never a broken button */
@media (max-width: 760px) {
  .qr-bar:not([hidden]) { gap: 10px; padding-top: 6px; padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
  .qr-bar-thumb { width: 40px; height: 40px; }
  .qr-bar-check { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .qr-bar .btn { flex: none; white-space: nowrap; overflow-wrap: normal; }
}
@media (max-width: 760px) and (max-height: 480px) { .qr-bar:not([hidden]) { display: none; } }
/* tools menu: never taller than the window; says when nothing matches */
/* the long developer group may run into the next column, so the columns balance
   (a height limit on CSS columns hid groups in extra columns: see above) */
.menu-group.g-dev { break-inside: auto; }
.menu-gh { break-after: avoid; }
.menu-find-empty { margin: 6px 4px 0; color: var(--muted); }
.menu-find-empty:empty { display: none; }
/* phones: the main buttons keep their words on one line */
@media (max-width: 560px) {
  .in-head .btn { white-space: nowrap; }
  .in-head label.btn, .in-head #sample, .in-head #sample-file, .in-head #qr-camera, .in-head #qr-sample { flex: 1 1 auto; }
  .jump ul { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin-bottom: 18px; scrollbar-width: thin; }
  .jump li { flex: none; }
  .problems { max-height: none; }
}
#out-cats th { white-space: normal; }
.dev-result .actions #dev-clear { margin-left: auto; }
.dev-result textarea:placeholder-shown { color: var(--muted); }
.dev-result .is-busy { opacity: 0.55; }
/* footer: the switch beside the owner line */
.foot-last { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; margin-top: 12px; }
.foot-last .foot-project { margin: 0; }
.foot-last .foot-mem { margin: 0; }
/* 404 */
.nf-links { margin: 6px 0 26px; }
.nf-tools .foot-group:has(li:nth-child(9)) { grid-column: 1 / -1; }
.nf-tools .foot-group:has(li:nth-child(9)) ul { display: block; columns: 3 200px; }
/* the QR reader's drop area under its head */
#qr-drop { min-height: 96px; margin-bottom: 4px; }
.qr-h { font-size: 1.125rem; }
@media (pointer: coarse) { .qr-bar .btn { min-height: 44px; } }
@media (max-width: 560px) { .in-head #sample-file { white-space: normal; flex-basis: 100%; } }
/* final review fixes (2026-11-26) */
/* touch screens have no drag and drop: no empty dashed box (it holds only the drop hint) */
@media (hover: none) {
  .drop.drop-file:has(.file-name:empty), #qr-drop { display: none; }
  .drop.drop-file { min-height: 0; border-style: solid; }
}
h1 { text-wrap: balance; }
/* quiet hints are plain text, not a box that looks like a field */
.status.is-hint { border: 0; padding: 4px 0; background: transparent; }
.qr-preview .actions .btn { flex: 1 1 0; }
.related .tool-ic { height: 16px; align-self: center; }
.options { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.dev-step-out:empty { display: none; }
.group:not(:has(.group-note)) .cards { margin-top: calc(1.55rem + 14px); } /* level with the groups that have a note */
/* developer pages: facts with their own copy buttons; single-tool pages without step preview */
.dev-facts { display: grid; gap: 0; margin: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.dev-facts:empty { display: none; }
.dev-fact { display: grid; grid-template-columns: minmax(7rem, max-content) minmax(0, 1fr); align-items: center; gap: 4px 14px; padding: 6px 6px 6px 12px; border-top: 1px solid var(--border); }
.dev-fact:first-child { border-top: 0; }
.dev-fact dt { color: var(--muted); font-size: 0.875rem; }
.dev-fact dd { display: flex; align-items: center; gap: 8px; margin: 0; min-width: 0; }
.dev-fact-v { flex: 1 1 auto; min-width: 0; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.875rem; overflow-wrap: anywhere; }
.dev-fact .btn { flex: none; }
@media (max-width: 480px) { .dev-fact { grid-template-columns: minmax(0, 1fr); } }
.dev-result.has-facts #dev-output, .dev-result.has-facts #dev-copy { display: none; }
.dev-tool.is-single .dev-step-out:not(.is-error) { display: none; }
.dev-pw { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.dev-pw input { flex: 1 1 10rem; min-width: 0; }
.dev-pw .btn { flex: none; white-space: nowrap; }
.output { scroll-margin-top: 12px; }
.foot-group a, .foot-links a { display: inline-block; min-height: 24px; line-height: 24px; }

/* ---------------------------------------------------------------- images, subtitles (2026-11-26) */
:root { --h-images: #b83280; --h-media: #2b6cb0; }
@media (prefers-color-scheme: dark) { :root { --h-images: #f07ac0; --h-media: #74a9e8; } }
.g-images, .jump .g-images { --hue: var(--h-images); }
.g-media, .jump .g-media { --hue: var(--h-media); }
.opt input[type="number"] { width: 100%; min-height: 42px; padding: 6px 10px; border: 1px solid var(--field-border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.opt label output { color: var(--text); font-weight: 600; }
.ico-sizes { border: 0; margin: 0; padding: 0; min-width: 0; }
.ico-sizes legend { font-size: 0.875rem; color: var(--muted); padding: 0; margin-bottom: 4px; }
.img-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.img-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 10px 12px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.img-item.is-error { border-color: var(--err); background: var(--err-soft); }
.img-thumb { width: 64px; height: 64px; object-fit: contain; border-radius: 6px; background: repeating-conic-gradient(#e9ecef 0 25%, #ffffff 0 50%) 50% / 12px 12px; }
.img-thumb-none { display: block; background: var(--code-bg); }
.img-info { display: grid; gap: 2px; min-width: 0; font-size: 0.875rem; color: var(--muted); }
.img-info .img-name { color: var(--text); font-size: 0.9375rem; overflow-wrap: anywhere; }
.img-info .notes { margin: 2px 0 0; font-size: 0.8125rem; }
.img-err { color: var(--err); font-weight: 600; }
.img-bigger { color: var(--warn); }
@media (max-width: 420px) { .img-item { grid-template-columns: 48px minmax(0, 1fr); } .img-thumb { width: 48px; height: 48px; } .img-item > .btn { grid-column: 1 / -1; justify-self: start; } }
@media (prefers-color-scheme: dark) { .img-thumb { background: repeating-conic-gradient(#2a3140 0 25%, #1b2130 0 50%) 50% / 12px 12px; } }
.suggest { margin: 26px 0 0; color: var(--muted); }
@media (pointer: coarse) { .opt input[type="number"] { min-height: 44px; } .suggest a { display: inline-flex; align-items: center; min-height: 44px; } }

/* ---------------------------------------------------------------- PDF pages (2026-11-27) */
:root { --h-pdf: #c53030; }
@media (prefers-color-scheme: dark) { :root { --h-pdf: #f28b82; } }
.g-pdf, .jump .g-pdf { --hue: var(--h-pdf); }
.opt input#opt-ranges { width: 100%; }
.pdf-list { margin-top: 14px; }
.pdf-actions { margin-top: 14px; }
.pdf-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pdf-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.pdf-row.is-error { border-color: var(--err); background: var(--err-soft); }
.pdf-row-info { display: grid; gap: 2px; min-width: 0; font-size: 0.875rem; color: var(--muted); }
.pdf-row-info strong { color: var(--text); font-size: 0.9375rem; overflow-wrap: anywhere; }
.pdf-ranges-label { margin-top: 4px; }
.pdf-ranges { width: 100%; min-height: 38px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.pdf-row-btns { display: inline-flex; gap: 2px; }
.pdf-row-btns .btn { min-width: 36px; justify-content: center; }
.pdf-thumb { display: grid; place-items: center; width: 56px; height: 72px; overflow: hidden; border-radius: 4px; background: var(--code-bg); }
.pdf-thumb img, .pdf-thumb canvas { max-width: 100%; max-height: 100%; display: block; box-shadow: 0 0 0 1px var(--border); background: #ffffff; }
.pdf-thumb.is-bad { background: var(--err-soft); }
.pdf-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; max-height: 70vh; overflow-y: auto; }
.pdf-cell { display: grid; justify-items: center; gap: 4px; padding: 6px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.pdf-cell .pdf-thumb { width: 84px; height: 112px; }
.pdf-cell .pdf-thumb canvas { transform: rotate(var(--rot, 0deg)); transition: transform 0.15s; }
.pdf-num { font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pdf-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 22em; overflow-y: auto; font-size: 0.9375rem; }
.pdf-files:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .pdf-cell .pdf-thumb canvas { transition: none; } }
@media (max-width: 420px) { .pdf-row { grid-template-columns: 48px minmax(0, 1fr); } .pdf-row-btns { grid-column: 1 / -1; justify-self: end; } }
@media (pointer: coarse) { .pdf-ranges { min-height: 44px; } .pdf-files a { display: inline-flex; align-items: center; min-height: 44px; } }

/* ---------------------------------------------------------------- audio from video (2026-11-27) */
.av-info { margin-top: 12px; padding: 8px 12px; border-radius: 8px; background: var(--code-bg); font-size: 0.9375rem; }
.av-info p { margin: 0; overflow-wrap: anywhere; }
.av-tracks { border: 1px solid var(--border); border-radius: 8px; margin: 12px 0 0; padding: 6px 14px 8px; }
.av-tracks legend { font-weight: 600; padding: 0 6px; }
/* players for a chosen file and a result (audio from video, tone generator) */
.media-preview { margin-top: 12px; }
.media-preview video { display: block; width: 100%; max-height: 360px; border-radius: 8px; background: #000; }
.media-preview audio { display: block; width: 100%; min-height: 44px; }
.media-note { margin: 0; padding: 8px 12px; border-radius: 8px; background: var(--code-bg); font-size: 0.9375rem; }
#av-tracks > .out-meta { display: block; margin-top: 8px; }
.av-options select option:disabled { color: var(--muted); }
#av-choice-notes { margin: 8px 0 0; }
.av-tool .actions { margin-top: 14px; }

/* ---------------------------------------------------------------- JSON, JSON Schema, UUID, password and diff pages (2026-11-27) */
:root { --diff-del: #fdecea; --diff-del-hi: #f5bdb6; --diff-ins: #e4f4ea; --diff-ins-hi: #aedfbe; }
@media (prefers-color-scheme: dark) { :root { --diff-del: #3a1714; --diff-del-hi: #74302a; --diff-ins: #14301f; --diff-ins-hi: #275e3e; } }
.util-tool .u-file { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.util-tool .report-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.util-tool .tool-in .actions { margin-top: 14px; }
.util-tool #u-out { min-height: 4em; }
/* UUID and password pages: the result and Copy come first (round-3 review:
   the password was below the first screen of a phone); one ID never clipped */
.util-tool .gen-result #u-out { min-height: 0; display: block; }
.gen-result .out-actions { margin-top: 10px; }
.gen-result .pw-strength { margin-top: 10px; }
.pw-length-row { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 12px; align-items: center; }
.util-tool .opt input[type="range"] { width: 100%; accent-color: var(--accent); }
.util-tool .opt-wide.dev-note { margin: 0; font-size: 0.875rem; color: var(--muted); }
.util-tool label code { font-size: 0.8125rem; }
.gen-out { font-size: 0.9375rem; }
/* a phone: one UUID (38 characters with braces) fits; longer lines wrap */
@media (max-width: 560px) { textarea.gen-out, textarea.gen-out[wrap="off"] { font-size: 0.8125rem; white-space: pre-wrap; overflow-wrap: anywhere; } }
.pw-strength { margin: 0; }
.pw-strength.is-weak strong { color: var(--err); }
.pw-strength.is-fair strong { color: var(--warn); }
.pw-strength.is-strong strong, .pw-strength.is-veryStrong strong { color: var(--ok); }
#opt-symbol-list { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
/* diff: the two texts side by side from 760 px, the result below them */
.diff-inputs { display: grid; gap: 14px 24px; }
@media (min-width: 760px) { .diff-inputs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.diff-side { min-width: 0; }
.diff-name { font-size: 0.875rem; }
.diff-summary { margin: 0; font-weight: 600; }
.diff-summary.is-same { color: var(--ok); }
.diff-wrap { border: 1px solid var(--border); border-radius: 8px; overflow-x: auto; }
table.diff { width: 100%; border-collapse: collapse; table-layout: fixed; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.8125rem; line-height: 1.45; }
table.diff col.c-n { width: 3.4em; }
table.diff col.c-m { width: 1.3em; }
.diff td { padding: 1px 6px; vertical-align: top; }
.diff .d-n { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; background: var(--code-bg); user-select: none; }
.diff .d-m { padding: 1px 0; text-align: center; color: var(--muted); user-select: none; }
.diff .d-t { white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4; }
.diff .d-old, .diff tr.d-del:not(.d-ignored) .d-t { background: var(--diff-del); }
.diff .d-new, .diff tr.d-ins:not(.d-ignored) .d-t { background: var(--diff-ins); }
.diff del { background: var(--diff-del-hi); text-decoration: none; border-radius: 2px; }
.diff ins { background: var(--diff-ins-hi); text-decoration: none; border-radius: 2px; }
.diff .d-none { background: var(--code-bg); }
.diff tr.d-ignored .d-t { color: var(--muted); }
.diff tr.d-skip td { padding: 3px 6px; background: var(--code-bg); text-align: center; font-family: system-ui, sans-serif; }
.diff tr + tr.d-skip td, .diff tr.d-skip + tr td { border-top: 1px solid var(--border); }
.diff tr:focus { outline: 3px solid var(--focus); outline-offset: -3px; }
.diff tr.is-at .d-n { box-shadow: inset 3px 0 0 var(--accent); }
.diff-tool .out-actions #u-pos { min-width: 8em; }
@media (forced-colors: active) {
  .diff del { text-decoration: line-through; }
  .diff ins { text-decoration: underline; }
  .diff tr.is-at .d-n { outline: 2px solid Highlight; }
}
@media print { .diff-tool .out-actions, .diff-actions { display: none !important; } }
.diff .d-cr { color: var(--muted); font-size: 0.75em; }

/* ---------------------------------------------------------------- barcode generator (2026-11-27) */
.bc-hint { margin: 6px 0 0; color: var(--muted); font-size: 0.9375rem; overflow-wrap: anywhere; }
.bc-error { margin: 6px 0 0; color: var(--err); font-weight: 600; overflow-wrap: anywhere; }
/* barcode page laid out like the QR page (round-3 review): the preview right
   under the input on a phone, beside it from 900 px; settings and many
   barcodes in folded blocks */
.bc-grid { display: grid; gap: 14px 24px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "input" "out" "more" "batch"; }
.bc-input { grid-area: input; min-width: 0; }
.bc-value-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.bc-gs1 { margin: 12px 0 0; }
.bc-out { grid-area: out; min-width: 0; }
.bc-more { grid-area: more; }
.bc-batch { grid-area: batch; }
@media (min-width: 900px) {
  .bc-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "input out" "more out" "batch out"; grid-template-rows: auto auto 1fr; align-items: start; }
  .bc-out { position: sticky; top: calc(var(--top-h) + 12px); }
}
.bc-sec { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); min-width: 0; }
.bc-sec > summary { padding: 10px 14px; min-height: 44px; font-weight: 600; }
.bc-sec[open] > summary { border-bottom: 1px solid var(--border); }
.bc-sec .bc-options { border: 0; margin: 0; padding: 12px 14px 14px; }
.bc-sec-body { padding: 4px 14px 14px; }
.bc-sec-body .status { margin-top: 12px; }
.bc-options input[type=color] { width: 100%; min-height: 44px; padding: 2px; border: 1px solid var(--field-border); border-radius: 8px; background: var(--surface); }
.bc-preview { padding: 12px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  background: repeating-conic-gradient(#e9ecf2 0 25%, #ffffff 0 50%) 50% / 16px 16px; }
.bc-preview svg { display: block; width: 100%; max-width: 520px; height: auto; margin: 0 auto; }
.bc-batch textarea { width: 100%; }
#bc-zip { margin-top: 12px; }
@media (prefers-color-scheme: dark) { .bc-preview { background: repeating-conic-gradient(#2a3346 0 25%, #1c2333 0 50%) 50% / 16px 16px; } }

/* ---------------------------------------------------------------- tone generator (2026-11-27) */
.tone-safety { margin: 0 0 14px; padding: 8px 12px; border-left: 4px solid var(--warn); border-radius: 8px; background: var(--code-bg); font-size: 0.9375rem; }
.tone-freq #tn-freq { font-size: 1.5rem; max-width: 12ch; }
/* Play next to the frequency (round-3 review: it was 1,382 px down on a phone) */
.tone-freq-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.tone-freq-row .opt { flex: 0 1 12ch; }
.tone-freq-row #tn-play { min-width: 8em; min-height: 48px; font-size: 1.125rem; }
.tone-freq input[type=range], .tone-volume input[type=range] { width: 100%; min-height: 44px; }
/* the 8 step buttons in even rows: 4 + 4 where 8 do not fit */
.tone-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
@media (min-width: 560px) and (max-width: 899px), (min-width: 1100px) { .tone-steps { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.tone-steps .btn { padding-left: 4px; padding-right: 4px; white-space: nowrap; }
.tone-sweep { margin-top: 0; }
.tone-sweep-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.tone-wav { margin-top: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 0 14px; }
.tone-wav > summary { cursor: pointer; padding: 12px 0; font-weight: 600; min-height: 44px; }
.tone-wav[open] > summary { border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.tone-wav-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.tone-wav .actions { margin: 12px 0 14px; }
.tone-tool .tool-out > .status { margin-top: 14px; }
.tone-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }
.tone-volume { margin-top: 14px; }
.tone-sweep legend .opt-check { display: inline-flex; align-items: center; gap: 8px; }
.tone-now { margin: 0 0 12px; font-size: 1.25rem; font-weight: 600; min-height: 1.5em; }

/* ---------------------------------------------------------------- site structure (stage 1a, 2026-11-27) */
/* The header stays at the top. --top-h is its height: site.js measures it,
   these are the values without scripts. scroll-padding keeps the element in
   focus out from under it (WCAG 2.2, 2.4.11). */
:root { --top-h: 61px; }
@media (pointer: coarse) { :root { --top-h: 65px; } }
@media (max-width: 600px) { :root { --top-h: 53px; } }
.top { position: sticky; top: 0; z-index: 60; }
html { scroll-padding-top: calc(var(--top-h) + 8px); }
@media (max-width: 600px) { .top-in { min-height: 52px; padding-top: 4px; padding-bottom: 4px; } }
/* short windows (a phone held sideways, a high zoom): the header scrolls away */
@media (max-height: 480px) { .top { position: static; } html { scroll-padding-top: 0; } }
.menu-lang .menu-panel { max-height: calc(100vh - var(--top-h) - 20px); max-height: calc(100dvh - var(--top-h) - 20px); overflow-y: auto; }
@media print { .top { position: static; } }
/* The line under the header that offers this page in the visitor's language
   (site.js; drawn only when there is one, so other visitors see no shift).
   It scrolls with the page: the header stays the only sticky bar. */
.lang-hint { background: var(--accent-soft); border-bottom: 1px solid var(--border); }
.lang-hint-in { display: flex; align-items: center; gap: 8px; padding-top: 0; padding-bottom: 0; }
.lang-hint p { flex: 1 1 auto; min-width: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; }
.lang-hint span { padding: 10px 0; }
.lang-hint a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; font-weight: 600; }
.lang-hint-x { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -10px;
  padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.lang-hint-x:hover { background: var(--surface); }
@media print { .lang-hint { display: none; } }

/* tools menu: converters with one input in a row of chips */
.menu-row { display: flex; align-items: flex-start; gap: 6px; padding: 4px 6px 4px 10px; }
.menu-row .row-in { flex: 0 0 4.7em; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; color: var(--muted); font-size: 0.875rem; font-weight: 600; }
.menu-panel .row-in .tool-ic { width: 12px; height: 10px; }
.row-arrow { color: var(--muted); font-weight: 400; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; min-width: 0; }
.menu-panel .chips a { min-height: 34px; padding: 4px 9px; border: 1px solid var(--border); border-radius: 999px; font-size: 0.9375rem; }
.menu-panel .chips a[aria-current="page"] { border-color: var(--accent); }
@media (pointer: coarse) { .menu-panel .chips a { min-height: 44px; padding: 4px 12px; } .menu-row .row-in { min-height: 44px; } }
.menu-row.is-out { display: none; }

/* tools hub: a row card holds the chips of one input format */
.cards .row-box { height: 100%; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.row-h { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 1.0625rem; }
.row-h .tool-ic { height: 20px; width: auto; margin: 0; }
.cards .chips { gap: 6px; }
.cards .chips a { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); color: var(--text); text-decoration: none; font-weight: 600; }
.cards .chips a:hover, .cards .chips a:focus-visible { border-color: var(--hue, var(--accent)); color: var(--hue, var(--accent)); }
@media (pointer: coarse) { .cards .chips a { min-height: 44px; } }

/* breadcrumb on tool pages */
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; list-style: none; margin: 14px 0 0; padding: 0; color: var(--muted); font-size: 0.875rem; }
.crumbs li { display: inline-flex; align-items: center; min-width: 0; overflow-wrap: anywhere; }
.crumbs li + li::before { content: "›"; padding: 0 8px; }
.crumbs a { display: inline-flex; align-items: center; min-height: 24px; color: var(--muted); }
@media (pointer: coarse) { .crumbs a { min-height: 44px; } }
.crumbs + h1 { margin-top: 6px; }

/* Kadben start page */
.find-results { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; max-width: 560px; }
.find-results a { display: flex; align-items: center; min-height: 44px; padding: 6px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; }
.find-results a:hover, .find-results a:focus-visible { border-color: var(--accent); }
.popular { margin-top: 26px; }
.popular h2 { margin: 0 0 12px; }
.popular .cards { --hue: var(--accent); }
.popular .cards > li > a strong { color: var(--text); }
.popular .cards > li > a:hover, .popular .cards > li > a:focus-visible { border-color: var(--hue); }
.all-tools { margin: 18px 0 0; }
.all-tools .btn { min-height: 44px; }

/* ---------------------------------------------------------------- round 3, batch C: kit pages (2026-11-27) */
.kit-tool .tool-in .actions { margin-top: 14px; }
.kit-tool .opt input[type="range"] { width: 100%; accent-color: var(--accent); }
.kit-tool .opt input[type="number"], .kit-tool .opt input[type="text"], .kit-tool .opt input[type="password"] { min-height: 40px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; width: 100%; }
.kit-tool .opt input[type="color"] { width: 100%; min-height: 44px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
@media (pointer: coarse) { .kit-tool .opt input[type="number"], .kit-tool .opt input[type="text"], .kit-tool .opt input[type="password"] { min-height: 44px; } }
.kit-note { margin: 8px 0 0; color: var(--muted); font-size: 0.9375rem; }
/* crop */
.crop-editor { margin-top: 14px; }
.crop-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.crop-tools .btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.crop-help, .crop-note { margin: 0 0 8px; color: var(--muted); font-size: 0.875rem; }
.crop-note { margin: 0; }
.crop-stage { position: relative; max-width: 100%; margin: 0 auto; user-select: none; -webkit-user-select: none; touch-action: none;
  background: repeating-conic-gradient(#e9ecef 0 25%, #ffffff 0 50%) 50% / 16px 16px; }
@media (prefers-color-scheme: dark) { .crop-stage { background: repeating-conic-gradient(#2a3140 0 25%, #1b2130 0 50%) 50% / 16px 16px; } }
.crop-canvas { display: block; }
.crop-box { position: absolute; box-sizing: border-box; border: 2px solid #ffffff; outline: 1px solid #000000; cursor: move; touch-action: none;
  box-shadow: 0 0 0 9999px rgb(0 0 0 / 0.5); }
.crop-stage { overflow: hidden; }
.crop-box:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.crop-grid { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to right, transparent calc(33.33% - 0.5px), rgb(255 255 255 / 0.6) calc(33.33% - 0.5px) calc(33.33% + 0.5px), transparent calc(33.33% + 0.5px) calc(66.66% - 0.5px), rgb(255 255 255 / 0.6) calc(66.66% - 0.5px) calc(66.66% + 0.5px), transparent calc(66.66% + 0.5px)),
    linear-gradient(to bottom, transparent calc(33.33% - 0.5px), rgb(255 255 255 / 0.6) calc(33.33% - 0.5px) calc(33.33% + 0.5px), transparent calc(33.33% + 0.5px) calc(66.66% - 0.5px), rgb(255 255 255 / 0.6) calc(66.66% - 0.5px) calc(66.66% + 0.5px), transparent calc(66.66% + 0.5px)); }
.crop-h { position: absolute; width: 44px; height: 44px; min-height: 0; margin: -22px 0 0 -22px; padding: 0; border: 0; background: transparent; touch-action: none; }
.crop-h::after { content: ""; position: absolute; left: 15px; top: 15px; width: 14px; height: 14px; box-sizing: border-box; background: #ffffff; border: 2px solid #000000; border-radius: 3px; }
.crop-h:focus-visible { outline: none; }
.crop-h:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 1px; background: var(--accent); }
.h-nw { left: 0; top: 0; cursor: nwse-resize; } .h-n { left: 50%; top: 0; cursor: ns-resize; } .h-ne { left: 100%; top: 0; cursor: nesw-resize; }
.h-e { left: 100%; top: 50%; cursor: ew-resize; } .h-se { left: 100%; top: 100%; cursor: nwse-resize; } .h-s { left: 50%; top: 100%; cursor: ns-resize; }
.h-sw { left: 0; top: 100%; cursor: nesw-resize; } .h-w { left: 0; top: 50%; cursor: ew-resize; }
.crop-size { margin: 8px 0 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.crop-options { margin-top: 14px; }
.crop-custom .crop-pair { display: flex; align-items: center; gap: 6px; }
.crop-custom-label { font-size: 0.875rem; color: var(--muted); }
@media (forced-colors: active) { .crop-box { border-color: Highlight; } .crop-h::after { background: Canvas; border-color: Highlight; } }
/* kit pages in one column: the result under the input */
.kit-tool:not(.tool-conv) .tool-out { margin-top: 16px; }
.kit-tool .tool-out:has(> .status:not([hidden])) > .out-empty, .kit-tool .tool-out:has(> .output:not([hidden])) > .out-empty { display: none; }
.kit-tool .tool-out .output { margin-top: 12px; }
/* encrypt file */
.enc-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.enc-mode-label { font-size: 0.875rem; color: var(--muted); }
.enc-modes { display: flex; flex-wrap: wrap; gap: 0 18px; }
.enc-modes .opt-check { display: inline-flex; }
.enc-modes input[type=radio] { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.enc-pw { display: flex; gap: 8px; align-items: center; }
.enc-pw input { flex: 1 1 auto; min-width: 0; }
.enc-warn { border-left: 4px solid var(--warn); padding-left: 8px; }
/* certificate decoder */
.cert-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cert-card { padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); min-width: 0; }
.cert-card.is-error { border-color: var(--err); background: var(--err-soft); }
.cert-card h3 { margin: 0 0 8px; font-size: 1.0625rem; overflow-wrap: anywhere; }
.cert-kind { color: var(--muted); font-weight: 600; }
.cert-dl { display: grid; grid-template-columns: minmax(8em, max-content) minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 0.9375rem; }
.cert-dl dt { color: var(--muted); }
.cert-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.cert-dl code { font-size: 0.8125rem; overflow-wrap: anywhere; }
.cert-values { margin: 0; padding-left: 1.1em; }
.cert-more summary { cursor: pointer; min-height: 32px; }
.cert-state.is-ok { color: var(--ok); } .cert-state.is-warn { color: var(--warn); } .cert-state.is-bad { color: var(--err); }
.cert-sub { color: var(--muted); }
.cert-chain { margin-bottom: 12px; padding: 8px 12px; border-radius: 8px; background: var(--code-bg); border-left: 4px solid var(--ok); }
.cert-chain.is-warn { border-left-color: var(--warn); }
.cert-chain p { margin: 0; }
.cert-chain-line { font-weight: 600; }
@media (max-width: 560px) { .cert-dl { grid-template-columns: minmax(0, 1fr); } .cert-dl dd { margin-bottom: 6px; } }
@media (pointer: coarse) { .cert-more summary { min-height: 44px; display: flex; align-items: center; } }
/* ZIP */
.zip-tool .enc-mode { margin-bottom: 12px; }
.zip-add { list-style: none; margin: 10px 0 0; padding: 6px 10px; max-height: 12em; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; font-size: 0.875rem; }
.zip-add li { overflow-wrap: anywhere; }
.zip-name { margin-top: 12px; max-width: 28em; }
.zip-scroll { overflow-x: auto; max-height: 60vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; margin-top: 10px; }
.zip-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.zip-table th, .zip-table td { padding: 4px 8px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--border); }
.zip-table thead th { position: sticky; top: 0; background: var(--surface); }
.zip-table tbody th { font-weight: 400; overflow-wrap: anywhere; min-width: 10em; }
.zip-table td:nth-child(2), .zip-table td:nth-child(3) { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.zip-table tr.is-dir th { color: var(--muted); }
.zip-table tr.is-error th { color: var(--err); }
/* transliteration and slugs */
.tr-table-wrap { overflow-x: auto; }
.tr-table { border-collapse: collapse; font-size: 0.9375rem; }
.tr-table th, .tr-table td { padding: 3px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.tr-table tbody th { font-weight: 600; }
/* contrast checker */
.ct-pair { display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 8px; align-items: center; min-width: 0; }
.kit-tool .ct-pair input[type=text] { flex: 1 1 0; width: auto; min-width: 0; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.ct-pair input[type=color] { box-sizing: border-box; width: 48px; min-width: 0; min-height: 44px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.ct-preview { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; }
.ct-preview p { margin: 0 0 8px; }
.ct-normal { font-size: 1rem; }
.ct-large { font-size: 1.5rem; }
.ct-ui { display: flex; gap: 12px; align-items: center; }
.ct-ui-box { display: inline-block; padding: 6px 12px; border: 2px solid var(--ct-fg, currentColor); border-radius: 6px; }
.ct-ui-icon { display: inline-block; width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--ct-fg, currentColor); }
.ct-ratio { margin: 0 0 10px; font-size: 1.125rem; }
.ct-ratio strong { font-size: 2rem; font-variant-numeric: tabular-nums; }
.ct-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.ct-table th, .ct-table td { padding: 5px 8px; text-align: left; border-bottom: 1px solid var(--border); }
.ct-table tbody th { font-weight: 400; }
.ct-table .is-pass strong { color: var(--ok); }
.ct-table .is-fail strong { color: var(--err); }
.ct-sub { margin: 16px 0 6px; font-size: 1rem; }
.ct-suggest { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ct-suggest li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ct-chip { display: inline-block; width: 22px; height: 22px; border-radius: 4px; border: 1px solid var(--border); flex: none; }
@media (forced-colors: active) { .ct-preview { forced-color-adjust: none; } }
/* regex tester */
.rx-pattern-row { display: flex; align-items: center; gap: 4px; }
.rx-pattern-row input { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 1rem; }
.rx-slash, .rx-flags-text { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 1.125rem; color: var(--muted); }
.rx-flags { border: 1px solid var(--border); border-radius: 8px; margin: 10px 0; padding: 4px 12px 8px; }
.rx-flags legend { font-weight: 600; padding: 0 6px; }
.rx-flag-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15em), 1fr)); gap: 0 14px; }
.rx-flag label { font-size: 0.9375rem; }
.rx-label { display: block; margin: 10px 0 6px; }
.rx-replace { margin-top: 10px; }
.rx-replace input { min-height: 44px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.rx-sub { margin: 14px 0 6px; font-size: 1rem; }
.rx-marked { margin: 0; padding: 10px; max-height: 40vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid var(--border); border-radius: 8px; background: var(--code-bg); font-size: 0.875rem; }
.rx-marked mark { border-radius: 2px; color: inherit; }
.rx-m0 { background: #ffe08a; } .rx-m1 { background: #a8e1ff; }
@media (prefers-color-scheme: dark) { .rx-m0 { background: #6b5200; } .rx-m1 { background: #0d4a6b; } }
@media (forced-colors: active) { .rx-marked mark { forced-color-adjust: none; background: Highlight; color: HighlightText; } }
.rx-table td { vertical-align: top; overflow-wrap: anywhere; }
.rx-split { margin: 0; padding-left: 2.5em; max-height: 30vh; overflow: auto; font-size: 0.875rem; }
/* cron */
.cron-expr input { font-size: 1.125rem; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.cron-presets, .cron-tz { margin-top: 10px; }
.cron-fields { grid-template-columns: repeat(auto-fill, minmax(min(100%, 9em), 1fr)); }
.cron-summary { margin: 0 0 10px; font-size: 1.125rem; font-weight: 600; }
.cron-next { margin: 0; padding-left: 1.8em; font-variant-numeric: tabular-nums; }
.cron-next li { margin: 2px 0; }
/* Markdown and HTML */
.md-preview { display: block; width: 100%; height: 360px; border: 1px solid var(--border); border-radius: 8px; background: #ffffff; resize: vertical; }
/* SVG cleaner */
.svg-item { grid-template-columns: auto minmax(0, 1fr) auto; }
.svg-thumbs { display: inline-flex; gap: 4px; }
.svg-thumbs .img-thumb { width: 48px; height: 48px; }
.svg-saved { font-weight: 600; }
@media (max-width: 420px) { .svg-item { grid-template-columns: minmax(0, 1fr); } .svg-item > .btn { justify-self: start; } }
/* screen info */
.scr-groups { display: grid; gap: 12px; margin-top: 12px; }
@media (min-width: 760px) { .scr-groups { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.scr-group { padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); min-width: 0; }
.scr-group h3 { margin: 0 0 8px; font-size: 1rem; }
/* barcode scanner (the QR reader page in its 1D mode) */
.bc-data { margin: 4px 0 10px; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 1.25rem; letter-spacing: 0.04em; overflow-wrap: anywhere; white-space: pre-wrap; }
/* subnet calculator */
.sn-table td.code { overflow-wrap: anywhere; white-space: pre-wrap; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.875rem; }
.sn-member { margin: 0 0 10px; font-weight: 600; overflow-wrap: anywhere; }
/* exact counts are long numbers without spaces (2^128 has 39 digits) */
#sn-split-sum, .sn-tool .notes li, .sn-tool #k-status-text { overflow-wrap: anywhere; }
.sn-member.is-in { color: var(--ok); }
.sn-member.is-out, .sn-member.is-error { color: var(--err); }
.sn-scroll { overflow: auto; max-height: 60vh; border: 1px solid var(--border); border-radius: 8px; }
.sn-split td.code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.875rem; overflow-wrap: anywhere; }
.sn-tool .tool-out .actions { margin-top: 10px; }
/* vCard and ICS generators: the main fields, then the file (on phones right
   after them, so the result and its button are on the first screens), then
   the other fields folded */
.vc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "main out" "more out"; gap: 16px 24px; align-items: start; }
.vc-main { grid-area: main; margin-top: 0; }
.vc-out { grid-area: out; min-width: 0; }
.vc-more { grid-area: more; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
@media (max-width: 760px) { .vc-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "out" "more"; } }
.vc-more > summary { display: flex; align-items: center; min-height: 44px; padding: 0 14px; cursor: pointer; font-weight: 600; }
.vc-more > .options { border: 0; margin: 0; }
.vc-tool .opt :is(input[type="text"], input[type="tel"], input[type="email"], input[type="url"], input[type="date"], input[type="datetime-local"], input[type="number"], select, textarea) {
  width: 100%; min-height: 44px; padding: 6px 10px; border: 1px solid var(--field-border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit;
}
.vc-tool .opt textarea { min-height: 4.5em; resize: vertical; }
.vc-tool .opt label.check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--text); font-size: 1rem; }
.vc-tool .opt label.check input { width: 24px; height: 24px; accent-color: var(--accent); }
.vc-out .output { margin-top: 0; }
.vc-out .actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.vc-preview-label { display: block; margin: 12px 0 4px; font-size: 0.875rem; color: var(--muted); }
.vc-preview { display: block; width: 100%; padding: 8px 10px; border: 1px solid var(--field-border); border-radius: 8px; background: var(--surface); color: var(--text); font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.8125rem; line-height: 1.4; resize: vertical; }
.vc-photo { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vc-photo-label { font-size: 0.875rem; color: var(--muted); }
.vc-thumb { width: 48px; height: 48px; object-fit: cover; border: 1px solid var(--border); border-radius: 6px; }
/* EPC QR code page (2026-11-28): the vCard page's layout; the checks under
   the IBAN and RF fields, the character counts, the element table */
.epc-tool .epc-check { margin-top: 4px; font-size: 0.875rem; }
.epc-tool .epc-check.is-ok { color: var(--ok); }
.epc-tool .epc-check.is-error, .epc-tool .epc-count.is-error { color: var(--err); }
.epc-tool .epc-count { margin-top: 2px; font-size: 0.8125rem; }
.epc-tool .epc-check:empty, .epc-tool .epc-count:empty { display: none; }
.epc-tool #ep-ref-use { align-self: flex-start; min-height: 44px; margin-top: 6px; }
.epc-tool .epc-rem { gap: 6px; }
.epc-qr svg { max-width: 360px; }
.epc-table-wrap { overflow-x: auto; margin: 12px 0 0; }
.epc-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.epc-table th, .epc-table td { padding: 4px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.epc-table th { color: var(--muted); font-weight: 600; }
.epc-table .epc-n { color: var(--muted); width: 2.5em; }
.epc-table .epc-v { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.epc-table .epc-empty { color: var(--muted); font-family: inherit; font-style: italic; }
.epc-notes { margin-top: 12px; }
/* number base converter */
.nb-in { min-height: 3.2em; font-size: 1rem; }
.nb-read { margin: 0 0 8px; }
.nb-table td { vertical-align: top; }
.nb-val { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.9375rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.nb-val.is-long { max-height: 9em; overflow: auto; }
.nb-copy { width: 1%; white-space: nowrap; }
.nb-other { margin: 10px 0 0; max-width: 16em; }
.nb-twos td.code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.875rem; overflow-wrap: anywhere; }
.nb-twos td.nb-bin { min-width: 12em; }
/* HMAC generator */
.hm-field { margin-bottom: 12px; }
.hm-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.hm-head label { font-size: 0.875rem; color: var(--muted); }
.hm-len { font-size: 0.875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.hm-key { min-height: 3.2em; }
.hm-enc { margin-top: 6px; max-width: 16em; }
.hm-out { margin: 0 0 8px; max-width: 16em; }
.hm-table tr.is-match th, .hm-table tr.is-match td { background: var(--accent-soft); }
.hm-expect { margin-top: 12px; }
.hm-verdict { margin: 8px 0 0; font-weight: 600; }
.hm-verdict.is-in { color: var(--ok); }
.hm-verdict.is-out { color: var(--err); }
/* HTML entities */
.he-dir { margin: 0 0 8px; }
.he-opts { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 18px; margin-top: 10px; }
.he-opts .opt:first-child { min-width: min(100%, 20em); }
.he-tool .tool-out .out-actions { margin-bottom: 8px; }
/* colour converter */
.cc-swatch { margin-top: 12px; height: 72px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  background: repeating-conic-gradient(#d9dde3 0 25%, #ffffff 0 50%) 50% / 16px 16px; }
.cc-swatch span { display: block; height: 100%; }
@media (forced-colors: active) { .cc-swatch { forced-color-adjust: none; } }
/* case converter */
.cs-modes { margin-top: 12px; }
.cs-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 11em), 1fr)); gap: 0 14px; }
.cs-list label.code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.cs-tool .tool-out .out-actions { margin-bottom: 8px; }
/* time zone converter */
.tz-pair { display: flex; gap: 8px; align-items: center; min-width: 0; }
.tz-pair > input, .tz-pair > select { flex: 1 1 0; min-width: 0; }
.kit-tool .tz-pair input[type="datetime-local"] { min-height: 44px; padding: 4px 10px; border: 1px solid var(--field-border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.tz-situation { margin: 12px 0; padding: 10px 12px; border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 8px; }
.tz-situation p { margin: 0 0 6px; }
.tz-instant { margin: 0 0 8px; overflow-wrap: anywhere; }
.tz-table td, .tz-table th { vertical-align: top; }
.tz-tool .tool-out { min-width: 0; }
.tz-scroll { max-width: 100%; }
.tz-zone { overflow-wrap: anywhere; }
.tz-time .code, .tz-off .code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.tz-time span, .tz-off span { display: block; }
.tz-wd { color: var(--muted); font-size: 0.875rem; }
/* date calculator */
.dc-amounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.5em), 1fr)); gap: 8px 12px; margin-top: 10px; }
.kit-tool .dc-tool .tz-pair input[type="date"], .dc-tool .tz-pair input[type="date"] { min-height: 44px; padding: 4px 10px; border: 1px solid var(--field-border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.dc-main { margin: 0 0 8px; font-size: 1.125rem; font-weight: 600; }
