/* Generated by tools/gen-tokens.mjs from design/tokens.json. Do not edit. */
:root {
  --paper: #FAF7F2;
  --surface: #FFFFFF;
  --sunk: #F2EDE4;
  --ink: #1B1A17;
  --muted: #6A645B;
  --line: #E6DFD3;
  --accent: #B73A15;
  --accent-ink: #FFFFFF;
  --accent-soft: #FBE6DD;
  --success: #2B7A4B;
  --warning: #8F5B00;
  --error: #B3261E;
  --chip-from: #E9E3D8;
  --chip-to: #B73A15;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  color-scheme: light dark;
}
/* Follows the system unless the visitor picked a theme (theme.js sets data-theme). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141311;
    --surface: #1E1C19;
    --sunk: #191815;
    --ink: #F3EFE8;
    --muted: #A8A196;
    --line: #33302B;
    --accent: #FF7A50;
    --accent-ink: #1B0F0A;
    --accent-soft: #3A2219;
    --success: #5FC48A;
    --warning: #E8B04B;
    --error: #FF8A80;
    --chip-from: #2C2A26;
    --chip-to: #FF7A50;
  }
}
:root[data-theme="dark"] {
  --paper: #141311;
  --surface: #1E1C19;
  --sunk: #191815;
  --ink: #F3EFE8;
  --muted: #A8A196;
  --line: #33302B;
  --accent: #FF7A50;
  --accent-ink: #1B0F0A;
  --accent-soft: #3A2219;
  --success: #5FC48A;
  --warning: #E8B04B;
  --error: #FF8A80;
  --chip-from: #2C2A26;
  --chip-to: #FF7A50;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }
/* NoHEIC site styles. Colours, radii and spacing come from tokens.css (generated from design/tokens.json). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand, .drop-title, .btn, .tag { font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 var(--s-4); }
h1 { font-size: clamp(34px, 4.2vw, 56px); font-weight: 750; }
h2 { font-size: clamp(24px, 2.4vw, 32px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 700; }
p { margin: 0 0 var(--s-4); }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.wrap { width: min(1320px, 100% - 32px); margin: 0 auto; }
.narrow { width: min(780px, 100% - 32px); }

/* ---------- header ---------- */
.top { border-bottom: 1px solid var(--line); background: var(--paper); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); min-height: 76px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 850; font-size: 26px; letter-spacing: -0.02em; }
.logo { width: 42px; height: 42px; flex: none; }
.foot .brand { font-size: 22px; }
.foot .logo { width: 36px; height: 36px; }
.logo-photo { fill: var(--sunk); stroke: var(--ink); stroke-width: 1.6; }
.logo-hill { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.logo-sun { fill: var(--ink); }
.logo-tag { fill: var(--accent); }
.logo-jpg { fill: none; stroke: var(--accent-ink); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.nav { display: flex; gap: var(--s-5); flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; padding: 6px 0; white-space: nowrap; }
.nav { gap: var(--s-4) !important; }
.nav a:hover, .nav a[aria-current] { color: var(--accent); }
.nav { align-items: center; }
.theme-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; padding: 0; }
.theme-btn:hover { border-color: var(--accent); color: var(--accent); }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-btn .i-sun { display: none; } :root:not([data-theme="light"]) .theme-btn .i-moon { display: block; } }
:root[data-theme="dark"] .theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-moon { display: block; }

/* ---------- hero ---------- */
.hero { padding: var(--s-7) 0 var(--s-7); }
.hero-tool { padding: var(--s-6) 0 var(--s-7); }
.crumbs { font-size: 14px; margin-bottom: var(--s-3); }
.crumbs a { color: var(--muted); }
.lede { font-size: clamp(18px, 1.4vw, 21px); color: var(--ink); max-width: 36em; }
.hero-plain .lede { color: var(--muted); }
.trust { list-style: none; padding: 0; margin: var(--s-5) 0 0; display: grid; gap: 10px; }
.trust li { position: relative; padding-left: 30px; font-weight: 500; }
.trust li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); }
.trust li::after { content: ""; position: absolute; left: 7px; top: 7px; width: 5px; height: 9px; border: solid var(--accent); border-width: 0 2.2px 2.2px 0; transform: rotate(45deg); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: var(--s-2); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 22px; border-radius: var(--r-pill);
  background: var(--accent); color: var(--accent-ink); border: 0; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; position: relative; }
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn-lg { min-height: 56px; padding: 14px 32px; font-size: 18px; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }

/* ---------- the tool ---------- */
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-4); box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(40, 30, 20, 0.28); }
.drop { border: 2px dashed var(--line); border-radius: calc(var(--r-lg) - 6px); background: var(--sunk); padding: clamp(24px, 3.4vw, 44px) var(--s-5); text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--s-3); transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop-art { display: flex; align-items: center; gap: 10px; margin-bottom: var(--s-1); }
.tag { display: inline-block; font-weight: 800; font-size: 15px; letter-spacing: 0.04em; padding: 6px 12px; border-radius: 9px; }
.tag-from { background: var(--chip-from); color: var(--muted); }
.tag-to { background: var(--chip-to); color: var(--accent-ink); }
.arrow { color: var(--muted); font-weight: 700; }
.is-busy .tag-to { animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .is-busy .tag-to { animation: none; } }
.drop-title { font-size: clamp(20px, 1.6vw, 24px); font-weight: 750; margin: 0; }
.drop-sub { color: var(--muted); font-size: 15px; margin: 0; max-width: 30em; }
.opts { margin-top: var(--s-4); }
.fmt { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fmt legend { float: left; margin-right: var(--s-3); font-weight: 650; font-size: 15px; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-block; padding: 8px 18px; border-radius: var(--r-pill); border: 1.5px solid var(--line); font-weight: 700; font-size: 15px; cursor: pointer; }
.chip input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.more { margin-top: var(--s-3); border-top: 1px solid var(--line); padding-top: var(--s-3); }
.more summary { cursor: pointer; font-weight: 650; font-size: 15px; }
.more summary .muted { font-weight: 400; margin-left: 6px; }
/* Flex, not grid: which fields show depends on the format, and an odd one out should stretch, not leave a hole. */
.grid-opts { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-4); margin-top: var(--s-3); }
.grid-opts > .field { flex: 1 1 calc(50% - var(--s-4)); min-width: 200px; }
.field { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.field select, .field input[type=range] { width: 100%; font: inherit; font-weight: 400; }
.field select { padding: 9px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.field input[type=range] { accent-color: var(--accent); margin-top: 8px; }
[hidden] { display: none !important; }
.bar { width: 100%; height: 8px; margin-top: var(--s-4); accent-color: var(--accent); }
.status { margin: var(--s-3) 0 0; font-weight: 550; min-height: 0; }
.status:empty { display: none; }
.rows { list-style: none; margin: var(--s-3) 0 0; padding: 0; max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--s-3); align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.row:last-child { border-bottom: 0; }
.row-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.row-state { color: var(--muted); }
.row.ok .row-state { color: var(--success); }
.row.bad .row-state { color: var(--error); grid-column: 2 / 4; }
.row-dl { background: none; border: 0; color: var(--accent); font: inherit; font-weight: 650; cursor: pointer; padding: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-4); }

/* ---------- bands ---------- */
.band { padding: var(--s-7) 0; border-top: 1px solid var(--line); }
.band-sunk { background: var(--sunk); }
.prose h2 { margin-top: 0; }
.prose h3 { margin-top: var(--s-6); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 var(--s-4); }
.prose li { margin-bottom: 6px; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 var(--s-5); font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 700; background: var(--sunk); }
.prose code { background: var(--sunk); padding: 2px 6px; border-radius: 6px; font-size: 0.92em; overflow-wrap: anywhere; }
.prose pre { overflow-x: auto; background: var(--sunk); padding: var(--s-4); border-radius: var(--r-md); white-space: pre-wrap; overflow-wrap: anywhere; }
.prose table { display: block; overflow-x: auto; }
.steps { counter-reset: s; }
.prose ol > li::marker { font-weight: 700; color: var(--accent); }

.app-band { background: var(--sunk); }
.app-in { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.app-points { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.app-points li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-4) var(--s-5); display: grid; gap: 2px; }
.app-points span { color: var(--muted); font-size: 15px; }

.faq h2 { margin-bottom: var(--s-5); }
.qa { border-bottom: 1px solid var(--line); padding: var(--s-4) 0; }
.qa summary { cursor: pointer; font-weight: 650; font-size: 18px; }
.qa div { margin-top: var(--s-3); }
.qa div p:last-child { margin-bottom: 0; }

/* Flex so a short last row stretches instead of leaving a hole (layout gate "cells"). */
.link-grid { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s-3); }
.link-grid > li { flex: 1 1 260px; }
.link-grid a { display: grid; gap: 4px; height: 100%; padding: var(--s-4) var(--s-5); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-decoration: none; color: var(--ink); }
.link-grid a:hover { border-color: var(--accent); }
.link-grid span { color: var(--muted); font-size: 15px; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: var(--s-7) 0 var(--s-5); background: var(--paper); }
.foot-in { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s-6); }
.foot-about p { max-width: 26em; margin-top: var(--s-3); }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
.foot-h { font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: var(--s-3); }
.foot-cols a { display: block; color: var(--ink); text-decoration: none; padding: 4px 0; font-size: 15px; }
.foot-cols a:hover { color: var(--accent); }
.fine { margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid var(--line); font-size: 13px; }
.fine a { color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-in, .app-in, .foot-in { grid-template-columns: 1fr; }
}
/* Phones cannot drag and drop: the button is the whole story there. */
@media (pointer: coarse) { .drop-title, .drop-sub { display: none; } }
@media (max-width: 600px) {
  body { font-size: 16px; }
  .fmt legend { float: none; width: 100%; margin-bottom: 6px; }
  .chip span { padding: 8px 14px; }
  .hero, .hero-tool { padding: var(--s-5) 0 var(--s-6); }
  .foot-cols { grid-template-columns: 1fr 1fr; }

  .band { padding: var(--s-6) 0; }
}

/* ---------- viewer ---------- */
.drop.compact { padding: var(--s-4); flex-direction: row; flex-wrap: wrap; justify-content: center; }
.drop.compact .drop-art, .drop.compact .drop-sub, .drop.compact .drop-title { display: none; }
.view { margin-top: var(--s-4); display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--s-4); align-items: start; }
.view-img { width: 100%; height: auto; max-height: 520px; object-fit: contain; border-radius: var(--r-md); background: var(--sunk); }
.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.view .actions { grid-column: 1 / -1; margin-top: 0; }
@media (max-width: 600px) { .view { grid-template-columns: 1fr; } }

.pills { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pill { display: inline-block; padding: 9px 16px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.pill:hover { border-color: var(--accent); color: var(--accent); }
.h-gap { margin-top: var(--s-6); }


/* ================= tools-site layout (29 Oct redesign) ================= */
/* Centred tool: title, one line, the upload box, then everything else below. */
.hero-tool { padding: var(--s-6) 0 var(--s-6); text-align: center; }
.tool-wrap { width: min(980px, 100% - 32px); }
.hero-tool h1 { margin-bottom: var(--s-3); }
.hero-tool .lede { margin: 0 auto var(--s-5); max-width: 40em; color: var(--muted); }
.hero-tool .tool { text-align: left; }
.hero-tool .trust { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2) var(--s-5); margin: var(--s-4) 0 0; font-size: 15px; color: var(--muted); }
.hero-tool .trust li { font-weight: 500; }
.tool .drop { min-height: 300px; justify-content: center; }
.btn-xl { min-height: 64px; padding: 16px 40px; font-size: 20px; border-radius: 18px; box-shadow: 0 10px 24px -12px rgba(183, 58, 21, 0.55); }
.btn-ghost.btn-xl { box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-sm { min-height: 38px; padding: 6px 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: default; }
.stage-work { display: grid; gap: var(--s-4); }
.work-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.work-count { margin: 0; font-weight: 750; font-size: 18px; font-family: ui-rounded, -apple-system, sans-serif; }
.work-actions { display: flex; gap: var(--s-2); }
.thumbs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: var(--s-3); max-height: 460px; overflow: auto; }
.thumb { position: relative; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px; }
.thumb-img { aspect-ratio: 1; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: var(--surface); }
.thumb-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-img strong { font-size: 24px; color: var(--muted); }
.thumb-name { margin: 6px 2px 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb-meta { margin: 0 2px 2px; font-size: 12px; color: var(--muted); }
.thumb-x { position: absolute; top: 2px; right: 2px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 18px; line-height: 1; cursor: pointer; }
.thumb.ok { border-color: var(--success); }
.thumb.ok .thumb-meta { color: var(--success); }
.thumb.bad { border-color: var(--error); }
.thumb.bad .thumb-meta { color: var(--error); white-space: normal; }
.is-busy .thumb:not(.ok):not(.bad) .thumb-img { animation: fade 1.2s ease-in-out infinite; }
@keyframes fade { 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .is-busy .thumb .thumb-img { animation: none; } }
.opts { margin: 0; padding: var(--s-4); background: var(--sunk); border-radius: var(--r-md); border: 1px solid var(--line); }
.opts .grid-opts { margin-top: var(--s-4); }
.opts-note { margin: var(--s-3) 0 0; font-size: 14px; }
.bar { margin: 0; height: 10px; }
.done { display: grid; gap: var(--s-3); }
.done:empty { display: none; }
.done-head { display: flex; align-items: center; gap: var(--s-3); }
.done-check { width: 40px; height: 40px; border-radius: 50%; background: var(--success); flex: none; position: relative; }
.done-check::after { content: ""; position: absolute; left: 14px; top: 9px; width: 9px; height: 16px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.done-title { margin: 0; font-weight: 750; font-size: 20px; font-family: ui-rounded, -apple-system, sans-serif; }
.done-sub { margin: 0; font-size: 14px; }
.done-row { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.done-row .btn { flex: 1 1 200px; }

/* Header: a few tools plus an "All tools" menu. */
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; font-weight: 550; font-size: 15px; padding: 6px 0; color: var(--ink); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: " ▾"; color: var(--muted); }
.menu[open] summary { color: var(--accent); }
.menu-panel { position: absolute; right: 0; top: calc(100% + 10px); z-index: 20; width: 320px; padding: var(--s-2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.35); display: grid; }
.menu-panel a { display: flex; align-items: center; gap: var(--s-3); padding: 8px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.menu-panel a:hover { background: var(--sunk); color: var(--accent); }
.menu-panel .ti { width: 36px; height: 36px; font-size: 10px; border-radius: 9px; }
.menu-panel .ti small { display: none; }

/* Tool badges and the tools grid. Badge colours work in both themes (white text on a mid tone). */
.ti { flex: none; width: 56px; height: 56px; border-radius: 14px; display: inline-grid; place-content: center; text-align: center; color: #fff; font-weight: 800; font-size: 14px; letter-spacing: 0.03em; line-height: 1.05; font-family: ui-rounded, -apple-system, sans-serif; }
.ti small { display: block; font-size: 9px; font-weight: 700; opacity: 0.8; letter-spacing: 0.06em; }
.c-jpg { background: #B73A15; } .c-png { background: #2563A8; } .c-pdf { background: #B42318; } .c-jpeg { background: #B4570F; }
.c-heif { background: #0F766E; } .c-zip { background: #6D28D9; } .c-webp { background: #2F7D32; } .c-view { background: #475467; } .c-gps { background: #1F2937; }
.tools-band h2 { text-align: center; margin-bottom: var(--s-6); }
.tools-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
.tool-card { display: grid; gap: var(--s-2); align-content: start; height: 100%; padding: var(--s-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.tool-card:hover { border-color: var(--ink); transform: translateY(-2px); box-shadow: 0 14px 30px -20px rgba(0, 0, 0, 0.35); }
.tool-card strong { font-size: 19px; font-family: ui-rounded, -apple-system, sans-serif; margin-top: var(--s-2); }
.tool-card span:last-child { color: var(--muted); font-size: 15px; line-height: 1.5; }
/* Column counts that divide the tile count, so no row is left with one tile. */
.tools-grid.n9 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tools-grid.n9 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) { .tools-grid.n9 { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .tools-grid { grid-template-columns: 1fr; }
  .tool .drop { min-height: 230px; }
  .btn-xl { width: 100%; font-size: 18px; }
  .thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Keep Convert in reach while the options are scrolled. */
  .stage-work [data-convert] { position: sticky; bottom: 12px; z-index: 5; }
  .menu-panel { position: fixed; left: 16px; right: 16px; top: 120px; width: auto; }
}

/* Nine tool links: below 1240px they move to their own scrolling row under the logo. */
@media (max-width: 1240px) {
  /* One scrolling row of links on phones, so the tool stays near the top. */
  .top-in { gap: var(--s-2); padding-bottom: var(--s-2); }
  .nav { gap: var(--s-4); flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }
  .brand { order: 1; }
  .theme-btn { order: 2; flex: none; margin-left: auto; }
  .nav { order: 3; }
}
