/* Self-hosted fonts (SIL Open Font License). Latin and Latin Extended cover every EU language written in Latin script. */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/bricolage-grotesque-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/bricolage-grotesque-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/bricolage-grotesque-latin-ext-700-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/bricolage-grotesque-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-sans-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/ibm-plex-sans-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/ibm-plex-sans-latin-ext-600-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-mono-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/ibm-plex-mono-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Layout: a drop "dock" on the left where files wait, a ring of formats that opens where you drop, and a manifest of converted files on the right. */
:root {
  --bg: #e9ecf1;
  --surface: #f7f8fa;
  --raised: #ffffff;
  --ink: #171a26;
  --muted: #5d6474;
  --line: #d3d8e1;
  --accent: #2f45c9;
  --accent-ink: #ffffff;
  --accent-soft: #dfe3fa;
  --moon: #d99a1e;
  --c-image: #d9573b;
  --c-doc: #2f45c9;
  --c-audio: #138a7e;
  --c-video: #b7791f;
  --c-data: #3f8a3a;
  --ok: #2f7d45;
  --err: #b42f3a;
  --ring-bg: rgba(247, 248, 250, .985);
  --shadow: 0 18px 50px -18px rgba(23, 26, 38, .35);
  --f-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --f-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12141b; --surface: #1a1d27; --raised: #222632; --ink: #e8eaf1; --muted: #9aa1b2; --line: #2f3443;
    --accent: #8796ff; --accent-ink: #10131c; --accent-soft: #262c4d; --moon: #f3d27a;
    --c-image: #f08166; --c-doc: #8796ff; --c-audio: #45c2b3; --c-video: #e3a64a; --c-data: #7cc56f;
    --ok: #6fcf8a; --err: #ff7f88; --ring-bg: rgba(26, 29, 39, .985); --shadow: 0 18px 50px -14px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12141b; --surface: #1a1d27; --raised: #222632; --ink: #e8eaf1; --muted: #9aa1b2; --line: #2f3443;
  --accent: #8796ff; --accent-ink: #10131c; --accent-soft: #262c4d; --moon: #f3d27a;
  --c-image: #f08166; --c-doc: #8796ff; --c-audio: #45c2b3; --c-video: #e3a64a; --c-data: #7cc56f;
  --ok: #6fcf8a; --err: #ff7f88; --ring-bg: rgba(26, 29, 39, .985); --shadow: 0 18px 50px -14px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--f-body); }
.wrap { max-width: 1180px; margin: 0 auto; padding-block: 28px 56px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 22px; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap > header { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand h1 { font: 700 34px/1 var(--f-display); letter-spacing: -.02em; margin: 0; }
.brand svg { width: 38px; height: 38px; flex: none; }
.tag { color: var(--muted); margin: 0; max-width: 46ch; }
.privacy { font: 500 12px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ok); display: inline-flex; align-items: center; gap: 8px; }
.privacy::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }

.main { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 860px) { .main { grid-template-columns: minmax(0, 1fr); } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: grid; gap: 14px; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.panel-head h2 { font: 600 13px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0; }

.dock { position: relative; border: 1.5px dashed var(--line); border-radius: 12px; min-height: 230px; padding: 16px; display: grid; align-content: start; gap: 14px; background: var(--raised); transition: border-color .15s, background .15s; }
.dock.over { border-color: var(--accent); background: var(--accent-soft); }
.dock-hint { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.dock-hint p { margin: 0; color: var(--muted); max-width: 52ch; }
.dock-hint strong { color: var(--ink); font-weight: 600; }
kbd { font: 500 12px var(--f-mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; background: var(--surface); }

.btn { border: 1px solid var(--line); background: var(--raised); border-radius: 9px; padding: 8px 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 7px; }

.tray { display: flex; flex-wrap: wrap; gap: 8px; min-height: 40px; }
.tray-empty { color: var(--muted); font-size: 14px; align-self: center; }
.chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 6px 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13.5px; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--k, var(--muted)); }
.chip .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 24ch; }
.chip .sz { white-space: nowrap; font: 12px var(--f-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.chip .badge { font: 500 10.5px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 3px 4px; }
.chip button { border: 0; background: transparent; width: 22px; height: 22px; border-radius: 50%; color: var(--muted); display: grid; place-items: center; padding: 0; }
.chip button:hover { background: var(--line); color: var(--ink); }

.targets { display: grid; gap: 8px; }
.targets-label { font: 500 12px var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.target-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tgt { border: 1px solid var(--line); background: var(--raised); border-radius: 8px; padding: 6px 11px; font: 500 13px var(--f-mono); letter-spacing: .03em; display: inline-flex; align-items: center; gap: 7px; }
.tgt::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--k); }
.tgt:hover { border-color: var(--k); background: color-mix(in srgb, var(--k) 10%, var(--raised)); }

.options { display: flex; flex-wrap: wrap; gap: 10px 18px; padding-top: 4px; border-top: 1px solid var(--line); }
.opt { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); min-width: 120px; }
.opt select, .opt input[type=range] { accent-color: var(--accent); }
.opt select { border: 1px solid var(--line); background: var(--raised); border-radius: 7px; padding: 5px 8px; font-size: 13.5px; }
.opt.check { display: flex; align-items: center; gap: 8px; align-self: end; padding-bottom: 6px; }
.opt output { font: 12px var(--f-mono); color: var(--ink); }

.manifest { display: grid; gap: 8px; }
.row { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--raised); }
.thumb { width: 46px; height: 46px; border-radius: 8px; background: color-mix(in srgb, var(--k) 14%, var(--surface)); display: grid; place-items: center; overflow: hidden; font: 600 11px var(--f-mono); color: var(--k); text-transform: uppercase; position: relative; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb svg { position: absolute; inset: 5px; width: 36px; height: 36px; }
.row .info { min-width: 0; display: grid; gap: 2px; }
.row .fn { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .meta { font: 12px var(--f-mono); color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.row .meta .route b { color: var(--ink); font-weight: 500; }
.row.err .meta .msg { color: var(--err); font-family: var(--f-body); }
.row .msg { font-family: var(--f-body); }
.row.done .state { color: var(--ok); }
.empty-manifest { border: 1px dashed var(--line); border-radius: 10px; padding: 22px 16px; color: var(--muted); font-size: 14px; text-align: center; }
.manifest-foot { display: flex; gap: 8px; flex-wrap: wrap; }

.ring-progress circle { fill: none; stroke-width: 4; }
.ring-progress .trk { stroke: color-mix(in srgb, var(--k) 22%, transparent); }
.ring-progress .bar { stroke: var(--k); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset .2s; }
.ring-progress.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* The format ring */
#ring { position: fixed; left: 0; top: 0; width: 320px; height: 320px; z-index: 50; pointer-events: none; opacity: 0; transform: scale(.85); transition: opacity .14s, transform .14s; }
#ring.open { opacity: 1; transform: scale(1); pointer-events: auto; }
#ring svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 16px 30px rgba(10, 12, 20, .28)); }
.slice path { fill: var(--ring-bg); stroke: var(--line); stroke-width: 1; transition: fill .1s; }
.slice .lab { font: 600 13px var(--f-mono); fill: var(--ink); letter-spacing: .04em; pointer-events: none; }
.slice .tick { fill: var(--k); pointer-events: none; }
.slice { cursor: pointer; outline: none; }
.slice.hot path { fill: var(--k); stroke: var(--k); }
.slice.hot .lab { fill: #fff; }
.slice.hot .tick { fill: #fff; }
.hub circle { fill: var(--raised); stroke: var(--line); }
.hub .t1 { font: 700 15px var(--f-display); fill: var(--ink); }
.hub .t2 { font: 11px var(--f-mono); fill: var(--muted); }
#scrim { position: fixed; inset: 0; z-index: 40; display: none; }
#scrim.open { display: block; }

.ref { display: grid; gap: 12px; }
.ref h2 { font: 700 22px/1.2 var(--f-display); margin: 0; letter-spacing: -.01em; text-wrap: balance; }
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.kind { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 8px; align-content: start; }
.kind h3 { margin: 0; font: 600 15px var(--f-body); display: flex; align-items: center; gap: 8px; }
.kind h3::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--k); }
.kind .from, .kind .to { font: 12.5px/1.6 var(--f-mono); color: var(--muted); margin: 0; }
.kind .to b { color: var(--ink); font-weight: 500; }
.kind .note { font-size: 13px; color: var(--muted); margin: 0; }
.fine { color: var(--muted); font-size: 13px; margin: 0; max-width: 80ch; }

#toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; z-index: 60; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Site chrome added for the hosted app */
.head-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.net { font: 500 12px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--c-video); border: 1px solid currentColor; border-radius: 999px; padding: 5px 9px; }
.faq { display: grid; gap: 10px; }
.faq h2 { font: 700 22px/1.2 var(--f-display); margin: 0; letter-spacing: -.01em; }
.faq-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq details p { margin: 8px 0 2px; color: var(--muted); max-width: 65ch; }
.wrap > footer { border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; color: var(--muted); font-size: 13px; }
.wrap > footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.wrap > footer a, .prose a { color: var(--accent); }
.prose { max-width: 68ch; display: grid; gap: 6px; }
.prose h1 { font: 700 34px/1.1 var(--f-display); margin: 0 0 8px; letter-spacing: -.02em; }
.prose h2 { font: 600 18px/1.3 var(--f-body); margin: 18px 0 0; }
.prose p, .prose li { color: var(--ink); }
.prose .muted { color: var(--muted); }
.brand a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 12px; }
@media (max-width: 520px) { .faq-list { grid-template-columns: minmax(0, 1fr); } }

/* Off-screen stage where Word documents are laid out for PDF export: keep the site's styles out of it. */
.docx-stage, .docx-stage * { box-sizing: content-box; }

/* Language switch */
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--raised); }
.lang-switch button { border: 0; background: transparent; padding: 5px 9px; font: 500 12px/1 var(--f-mono); letter-spacing: .06em; color: var(--muted); }
.lang-switch button + button { border-left: 1px solid var(--line); }
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.lang-switch button:hover:not([aria-pressed="true"]) { color: var(--ink); }

/* Files can be dragged into a new order (the order a merge follows) */
.chip[draggable="true"] { cursor: grab; }
.chip[draggable="true"]:active { cursor: grabbing; }
.chip.dragging { opacity: .45; }
.opt > span { display: inline-flex; gap: 6px; align-items: baseline; }

/* PDF editor */
html.ed-open, html.ed-open body { overflow: hidden; }
#editor { position: fixed; inset: 0; z-index: 70; background: var(--bg); display: flex; flex-direction: column; }
.ed-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding-block: calc(12px + env(safe-area-inset-top, 0px)) 12px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); background: var(--surface); border-bottom: 1px solid var(--line); }
.ed-name { display: grid; min-width: 0; max-width: 32ch; }
.ed-name strong { font: 700 18px/1.2 var(--f-display); }
.ed-name span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; flex: 1; min-width: 0; }
.ed-actions { display: flex; gap: 8px; margin-left: auto; }
.ed-hint { font-size: 13px; color: var(--muted); }
.ed-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-block: 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); background: var(--accent-soft); border-bottom: 1px solid var(--line); font-weight: 500; }
.btn.danger { background: var(--err); border-color: var(--err); color: #fff; }
.ed-body { flex: 1; overflow: auto; padding-block: 20px 40px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.ed-loading { color: var(--muted); }
.ed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; max-width: 1180px; margin: 0 auto; }
.ed-card { background: var(--raised); border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: grid; gap: 6px; cursor: grab; }
.ed-card.dragging { opacity: .4; }
.ed-card.deleted { opacity: .45; cursor: default; border-style: dashed; }
.ed-thumb { border: 0; padding: 0; height: 200px; display: grid; place-items: center; background: var(--surface); border-radius: 6px; overflow: hidden; cursor: pointer; }
.ed-thumb:disabled { cursor: default; }
.ed-thumb img { max-width: 92%; max-height: 92%; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); transition: transform .15s; background: #fff; }
.ed-card.deleted .ed-thumb img { filter: grayscale(1); }
.ed-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.ed-num { font: 500 12px var(--f-mono); color: var(--muted); }
.ed-btns { display: flex; gap: 2px; }
.ed-ico { border: 0; background: transparent; width: 30px; height: 30px; border-radius: 7px; display: inline-grid; place-items: center; color: var(--ink); font-size: 20px; line-height: 1; padding: 0; }
.ed-ico svg { width: 18px; height: 18px; }
.ed-ico:hover:not(:disabled) { background: var(--accent-soft); }
.ed-ico:disabled { opacity: .35; cursor: default; }
.ed-pager { display: inline-flex; align-items: center; gap: 4px; font: 500 13px var(--f-mono); }
.ed-size { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.ed-size select { border: 1px solid var(--line); background: var(--raised); border-radius: 7px; padding: 4px 6px; font-size: 13px; }
.ed-stage-wrap { overflow-x: auto; }
.ed-stage { position: relative; margin: 0 auto; background: #fff; box-shadow: 0 6px 30px -10px rgba(10, 12, 20, .45); }
.ed-stage canvas { display: block; }
.ed-layer { position: absolute; inset: 0; }
.ed-stage.adding .ed-layer { cursor: crosshair; }
.ed-field { position: absolute; box-sizing: border-box; margin: 0; padding: 1px 3px; border: 1px solid rgba(47, 69, 201, .55); background: rgba(223, 227, 250, .55); color: #111; font-family: Helvetica, Arial, sans-serif; border-radius: 2px; resize: none; }
.ed-field:focus { outline: 2px solid #2f45c9; background: rgba(255, 255, 255, .9); }
input.ed-field[type="checkbox"], input.ed-field[type="radio"] { accent-color: #2f45c9; padding: 0; }
.ed-text { position: absolute; display: flex; align-items: flex-start; }
.ed-text textarea { border: 1px dashed transparent; background: transparent; color: #000; font-family: Helvetica, Arial, sans-serif; line-height: 1.2; padding: 0 2px; margin: 0; resize: none; overflow: hidden; min-width: 3ch; }
.ed-text textarea:focus, .ed-text:hover textarea { border-color: #2f45c9; background: rgba(255, 255, 255, .7); outline: none; }
.ed-grip { position: absolute; left: -14px; top: 0; width: 12px; height: 100%; min-height: 14px; cursor: move; border-radius: 3px; background: repeating-linear-gradient(to bottom, #2f45c9 0 2px, transparent 2px 4px); opacity: 0; touch-action: none; }
.ed-x { position: absolute; right: -28px; top: -4px; opacity: 0; color: #b42f3a; background: #fff; width: 24px; height: 24px; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.ed-x svg { width: 14px; height: 14px; }
.ed-text:hover .ed-grip, .ed-text:focus-within .ed-grip, .ed-text:hover .ed-x, .ed-text:focus-within .ed-x { opacity: 1; }
@media (max-width: 640px) { .ed-name { max-width: 100%; } .ed-actions { margin-left: 0; width: 100%; } .ed-actions .btn { flex: 1; justify-content: center; } }
.ed-run { position: absolute; border: 1px solid transparent; background: transparent; padding: 0; cursor: text; border-radius: 2px; }
.ed-run:hover, .ed-run:focus-visible { border-color: #2f45c9; background: rgba(47, 69, 201, .08); outline: none; }
.ed-edit { position: absolute; box-sizing: border-box; border: 1px dashed #2f45c9; padding: 0 2px; margin: 0; line-height: 1; border-radius: 2px; }
.ed-edit:focus { outline: 2px solid #2f45c9; outline-offset: 1px; }
.ed-undo { position: absolute; background: #fff; width: 24px; height: 24px; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); color: #2f45c9; }
.ed-undo svg { width: 14px; height: 14px; }
.ed-delline { color: #b3261e; }
.ed-edit.ed-done { border-color: transparent; pointer-events: none; }
.ed-done-btn { display: inline-flex; align-items: center; gap: 6px; }
.ed-done-btn svg { width: 16px; height: 16px; }

/* One-time note: no cookies */
.cookie-note { position: fixed; z-index: 55; left: max(16px, env(safe-area-inset-left, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); max-width: min(440px, calc(100vw - 32px)); display: flex; align-items: center; gap: 12px 16px; padding: 12px 14px 12px 16px; background: var(--raised); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); font-size: 14px; }
.cookie-note p { margin: 0; line-height: 1.45; }
.cookie-note a { color: var(--accent); white-space: nowrap; }
.cookie-note .btn { flex: none; }
html.ed-open .cookie-note { display: none; }
@media (max-width: 520px) { .cookie-note { right: max(16px, env(safe-area-inset-right, 0px)); max-width: none; } }

/* Brand link and page heading (each page has its own H1 for search engines) */
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 12px; }
.brand-name { font: 700 34px/1 var(--f-display); letter-spacing: -.02em; }
.hero { display: grid; gap: 8px; max-width: 70ch; }
.hero h1 { font: 700 clamp(26px, 4vw, 38px)/1.12 var(--f-display); letter-spacing: -.02em; margin: 0; text-wrap: balance; }
.hero .lead { margin: 0; font-size: 17px; color: var(--muted); max-width: 62ch; }
.crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.crumbs a { color: var(--accent); }
.tgt.preset { border-color: var(--k); background: color-mix(in srgb, var(--k) 14%, var(--raised)); font-weight: 600; }

/* How-to, tools and about sections */
.howto { display: grid; gap: 10px; }
.howto h2, .tools h2, .about h2 { font: 700 22px/1.2 var(--f-display); margin: 0; letter-spacing: -.01em; }
.howto ol { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.howto li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 14px 14px 52px; position: relative; }
.howto li::before { content: counter(step); position: absolute; left: 14px; top: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 600 14px/26px var(--f-mono); text-align: center; }
.tools { display: grid; gap: 10px; }
.tool-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.tool-grid a { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 500; }
.tool-grid a:hover { border-color: var(--accent); color: var(--accent); }
.tool-grid a[aria-current="page"] { border-color: var(--accent); background: var(--accent-soft); }
.about { display: grid; gap: 10px; max-width: 900px; }
.about > p { margin: 0; max-width: 72ch; color: var(--ink); }
.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.facts div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.facts dt { font: 500 11.5px var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 500; }
.facts a { color: var(--accent); }
.faq-list { align-items: start; }
