/* Fix Watermark: one stylesheet for every page (the CSP allows style-src 'self' only, so there are no inline styles).
   Look: warm off-white page, one accent (a stamp-ink orange), Bricolage Grotesque headings, a system sans body, soft
   bordered cards. Mobile first; nothing scrolls sideways at 320 px. Contrast checked for WCAG 2.2 AA:
   ink on page 15.9, muted 5.9, accent on white 5.8, white on accent 5.8, control borders 3.9 (3:1 needed). */

/* ---------- fonts (variable: wght 200 to 800, opsz 12 to 96) ---------- */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/bricolage-v9-latin.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: 200 800;
  font-display: swap;
  src: url("/fonts/bricolage-v9-latin-ext.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;
}

/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  --bg: #faf6ee;
  --surface: #ffffff;
  --tint: #f3ecdf;
  --tint-2: #ece3d2;
  --line: #e5dccb;
  --line-strong: #8a7f6e;
  --ink: #1f1b16;
  --ink-2: #4a443b;
  --muted: #665e52;
  --accent: #b2400c;
  --accent-ink: #8a2f07;
  --accent-soft: #fbeadd;
  --accent-line: #efc9ae;
  --ok: #17653a;
  --ok-soft: #e6f3ea;
  --warn: #7a4b00;
  --warn-soft: #fdf1d3;
  --bad: #a31d1d;
  --bad-soft: #fdeceb;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-head: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --gutter: clamp(16px, 4vw, 32px);
  --max: 1200px;
  --prose: 46rem;
  --shadow: 0 1px 2px rgba(60, 42, 16, 0.06), 0 8px 22px -12px rgba(60, 42, 16, 0.18);
  --shadow-sm: 0 1px 2px rgba(60, 42, 16, 0.06);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.6 var(--font-body);
  min-width: 320px;
  overflow-wrap: break-word;
}
[hidden] { display: none !important; }
img, svg, canvas, video { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-ink); }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-optical-sizing: auto;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.012em;
  color: var(--ink);
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2rem, 1.3rem + 3.2vw, 3.3rem); font-weight: 780; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); }
h3 { font-size: 1.15rem; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }
::selection { background: var(--accent-soft); color: var(--accent-ink); }
.sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; max-width: 1px !important; margin: -1px !important;
  padding: 0 !important; border: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important;
}
.skip-link {
  position: absolute; left: 12px; top: -64px; z-index: 50; padding: 0.6rem 1rem; border-radius: 10px;
  background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 700; transition: top 0.15s;
}
.skip-link:focus { top: 12px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* ---------- header and footer ---------- */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); }
.site-header__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1rem;
  width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; padding-block: 0.7rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem; color: var(--ink); text-decoration: none;
  font-family: var(--font-head); font-weight: 780; font-size: 1.25rem; letter-spacing: -0.015em;
}
.brand:hover { color: var(--ink); }
.brand__mark { width: 30px; height: 30px; flex: none; }
.brand__mark .back { stroke: var(--ink); }
.brand__mark .front { fill: var(--accent); }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.2rem; margin: 0; padding: 0; list-style: none; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0.3rem 0.85rem; border-radius: 999px;
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 0.95rem; border: 1px solid transparent;
}
.site-nav a:hover { background: var(--tint-2); color: var(--ink); }
.site-nav a[aria-current="page"],
body[data-path="/"] .site-nav a[href="/"],
body[data-path="/pdf/"] .site-nav a[href="/pdf/"],
body[data-path="/video/"] .site-nav a[href="/video/"],
body[data-path="/copyright-metadata/"] .site-nav a[href="/copyright-metadata/"] { background: var(--ink); color: var(--bg); }
.site-nav a.nav-pro { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent-line); }
.site-nav a.nav-pro:hover { background: #f7dcc8; }
.site-nav a.nav-pro[aria-current="page"], body[data-path^="/pro/"] .site-nav a.nav-pro { background: var(--accent); border-color: var(--accent); color: #fff; }

.site-footer { margin-top: 4rem; border-top: 1px solid var(--line); background: var(--tint); color: var(--ink-2); }
.site-footer__inner {
  display: grid; gap: 0.7rem; width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; padding-block: 1.8rem 2.2rem;
}
.site-footer__promise { font-family: var(--font-head); font-weight: 650; font-size: 1.1rem; color: var(--ink); }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; }
.site-footer__links a { color: var(--ink-2); font-weight: 600; text-underline-offset: 0.2em; }
.site-footer__links a:hover { color: var(--accent-ink); }
.site-footer__legal { font-size: 0.88rem; color: var(--muted); }

/* ---------- page head (a faint tile of our own name, the idea of the tool itself) ---------- */
.page-head {
  position: relative; background: var(--bg) url("/img/tile.svg") 0 0 / 280px 190px repeat;
  padding: clamp(1.6rem, 5vw, 3.4rem) 0 clamp(1.1rem, 3vw, 1.8rem);
}
.page-head::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(250, 246, 238, 0.35), var(--bg) 92%); pointer-events: none; }
.page-head .wrap { position: relative; z-index: 1; display: grid; gap: 0.9rem; }
.page-head h1 { max-width: 22ch; }
.lead { font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem); color: var(--ink-2); max-width: 46rem; line-height: 1.55; }
.facts { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; margin: 0.2rem 0 0; padding: 0; list-style: none; font-size: 0.95rem; font-weight: 600; color: var(--ink-2); }
.facts li { display: inline-flex; align-items: center; gap: 0.45rem; }
.facts li::before {
  content: ""; flex: none; width: 1.15rem; height: 1.15rem; border-radius: 50%; border: 1px solid var(--accent-line); background-color: var(--accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a2f07' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E");
  background-position: center; background-size: 70%; background-repeat: no-repeat;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 44px; padding: 0.5rem 1.15rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink);
  font-weight: 650; line-height: 1.2; text-decoration: none; cursor: pointer; text-align: center;
  transition: background-color 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.btn:hover { background: var(--tint); color: var(--ink); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn--small { min-height: 38px; padding: 0.3rem 0.8rem; font-size: 0.92rem; }
.btn--ghost { border-color: transparent; background: transparent; color: var(--ink-2); text-decoration: underline; text-underline-offset: 0.2em; }
.btn--ghost:hover { background: var(--tint-2); }
.btn--wide { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.btn[disabled]:hover, .btn[aria-disabled="true"]:hover { background: var(--surface); }
.btn--primary[disabled]:hover, .btn--primary[aria-disabled="true"]:hover { background: var(--accent); }
.icon { width: 1.15em; height: 1.15em; flex: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid transparent; border-radius: 9px;
  background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--tint-2); color: var(--ink); }
.badge-pro {
  display: inline-block; padding: 0.08rem 0.45rem; border: 1px solid var(--accent-line); border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink);
  font: 800 0.68rem/1.4 var(--font-body); letter-spacing: 0.07em; text-transform: uppercase; vertical-align: 0.1em;
}

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1rem; }
.card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 0.7rem; }
.card__head h2 { font-size: 1.1rem; }

/* ---------- the tool ---------- */
.tool { padding-bottom: 1rem; }
.free-line {
  margin: 0 0 1rem; padding: 0.8rem 1.05rem; border: 1px solid var(--accent-line); border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink);
  font-weight: 600; font-size: 0.97rem; line-height: 1.5;
}
.free-line[data-tier="pro"] { background: var(--ok-soft); border-color: #c4e3cf; color: var(--ok); }
.noscript { padding: 1rem; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }

.dropzone {
  display: grid; justify-items: center; gap: 0.35rem; padding: clamp(1.4rem, 4vw, 2.3rem) 1rem; text-align: center; cursor: pointer;
  border: 2px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface);
  transition: background-color 0.15s, border-color 0.15s;
}
.dropzone:hover, .dropzone.is-over { background: var(--accent-soft); border-color: var(--accent); }
.dropzone:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.dropzone__icon { width: 2.6rem; height: 2.6rem; color: var(--accent); }
.dropzone__title { font-family: var(--font-head); font-size: clamp(1.2rem, 1rem + 1vw, 1.5rem); font-weight: 700; color: var(--ink); }
.dropzone__sub { color: var(--ink-2); }
.dropzone__link { color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 0.2em; }
.dropzone__hint { color: var(--muted); font-size: 0.9rem; max-width: 36rem; }
.dropzone.is-compact { padding: 0.9rem 1rem; gap: 0.1rem; }
.dropzone.is-compact .dropzone__icon, .dropzone.is-compact .dropzone__hint { display: none; }
.dropzone.is-compact .dropzone__title { font-size: 1.05rem; }
.dropzone-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-top: 0.6rem; }
.dropzone-extra .help { margin: 0; }

.workspace { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
/* On phones the wrapper and the stage are transparent, so preview, controls, run card and list interleave by order. */
.workspace-main { display: contents; }
.stage { display: contents; }
.preview-card { order: 1; position: sticky; top: 0; z-index: 6; padding: 0.55rem; box-shadow: var(--shadow); }
.controls { order: 2; display: grid; gap: 0.75rem; align-content: start; min-width: 0; }
.run-card { order: 3; }
.list-card { order: 4; }
.preview-card .card__head, .preview-help { display: none; }
.preview-frame { position: relative; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background-color: var(--tint-2); }
/* The checkerboard sits behind the canvas itself, so it only shows through transparent pixels (a PNG with alpha). */
.preview-frame canvas {
  display: block; width: auto; height: auto; max-width: 100%; max-height: 30vh; cursor: crosshair; background-color: #fff;
  background-image: linear-gradient(45deg, #e4dac7 25%, transparent 25%, transparent 75%, #e4dac7 75%), linear-gradient(45deg, #e4dac7 25%, transparent 25%, transparent 75%, #e4dac7 75%);
  background-size: 16px 16px; background-position: 0 0, 8px 8px;
}
.preview-frame.is-dragging canvas { cursor: grabbing; }
.preview-frame.is-move-mode canvas { touch-action: none; outline: 3px solid var(--accent); outline-offset: -3px; }
.preview-note { color: var(--muted); font-size: 0.88rem; }
.preview-help { color: var(--muted); font-size: 0.88rem; margin-top: 0.5rem; }
.preview-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.4rem; }
.preview-actions:empty { display: none; }

.run-card { display: grid; gap: 0.75rem; }
.run-summary { font-weight: 650; color: var(--ink); }
.run-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.run-actions .btn { flex: 1 1 11rem; }
.run-status { color: var(--ink-2); font-size: 0.92rem; min-height: 1.4em; }
.run-card progress { width: 100%; }
.run-warnings { display: grid; gap: 0.4rem; }

@media (min-width: 960px) {
  /* The sticky stage lives in .workspace-main, so it stops at the end of the controls and never rides over the list. */
  .workspace { display: block; }
  .workspace-main { display: grid; grid-template-columns: minmax(0, 1fr) 25rem; gap: 1.25rem 1.5rem; align-items: start; }
  .stage { display: grid; gap: 1rem; grid-column: 1; grid-row: 1; position: sticky; top: 1rem; align-self: start; min-width: 0; }
  .preview-card { order: 0; position: static; padding: 1rem; box-shadow: var(--shadow-sm); }
  .preview-card .card__head, .preview-help { display: flex; }
  .preview-help { display: block; }
  .preview-frame canvas { max-height: min(58vh, 640px); }
  .controls { order: 0; grid-column: 2; grid-row: 1; }
  .run-card, .list-card { order: 0; }
  .list-card { margin-top: 1.25rem; }
}
@media (max-height: 520px) { .preview-card { position: static; } }
/* On a short desktop window the sticky preview and buttons could be taller than the screen, so they scroll normally. */
@media (min-width: 960px) and (max-height: 700px) { .stage { position: static; } }

/* ---------- panels (collapsible groups of controls) ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 52px; padding: 0.7rem 1.1rem; cursor: pointer; list-style: none;
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem;
}
.panel > summary::-webkit-details-marker { display: none; }
.panel > summary::after {
  content: ""; flex: none; width: 0.55rem; height: 0.55rem; margin-right: 0.15rem; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2);
  transform: translateY(-2px) rotate(45deg); transition: transform 0.15s;
}
.panel[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.panel[open] > summary { border-bottom: 1px solid var(--line); }
.panel__body { display: grid; gap: 1rem; padding: 1rem 1.1rem 1.15rem; }
.mark-panel { display: grid; gap: 0.75rem; }
.group { display: grid; gap: 0.9rem; }
.subgroup { display: grid; gap: 0.8rem; padding: 0.85rem; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--line); }

/* ---------- form controls ---------- */
.field { display: grid; gap: 0.3rem; min-width: 0; }
.field > label, .field-label { font-weight: 650; font-size: 0.93rem; color: var(--ink); }
.help { color: var(--muted); font-size: 0.86rem; line-height: 1.45; }
.field-error { color: var(--bad); font-size: 0.88rem; font-weight: 600; }
input[type="text"], input[type="url"], input[type="email"], input[type="number"], input[type="search"], select, textarea {
  width: 100%; min-width: 0; min-height: 44px; padding: 0.45rem 0.7rem; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; color: var(--ink);
}
select { appearance: none; padding-right: 2.2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a443b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.6rem center; background-size: 1.1rem; }
input[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); }
input::placeholder { color: #81786a; opacity: 1; }
input[type="file"] { width: 100%; max-width: 100%; padding: 0.45rem; border: 1px dashed var(--line-strong); border-radius: 9px; background: var(--bg); }
input[type="file"]::file-selector-button { margin-right: 0.7rem; padding: 0.4rem 0.8rem; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; font-weight: 650; cursor: pointer; }
input[type="color"] { width: 100%; max-width: 7rem; height: 44px; padding: 3px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; cursor: pointer; }
input[type="range"] { width: 100%; min-width: 0; height: 28px; margin: 0; accent-color: var(--accent); background: transparent; cursor: pointer; }
input[type="checkbox"], input[type="radio"] { width: 1.25rem; height: 1.25rem; margin: 0.15rem 0 0; flex: none; accent-color: var(--accent); cursor: pointer; }
.check { display: flex; align-items: flex-start; gap: 0.65rem; }
.check__text { display: grid; gap: 0.15rem; min-width: 0; }
.check label { font-weight: 600; cursor: pointer; }
.range-row { display: grid; grid-template-columns: minmax(0, 1fr) 5.4rem; gap: 0.75rem; align-items: center; }
.range-row input[type="number"] { min-height: 40px; padding-inline: 0.5rem; }
.row { display: flex; align-items: stretch; gap: 0.5rem; min-width: 0; }
.row > select, .row > input[type="text"] { flex: 1 1 0; }
.row .btn { flex: none; }
.row--wrap { flex-wrap: wrap; }
.row-2 { display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem; gap: 0.75rem; align-items: start; }
.row-2 .field--color { align-content: start; }
.row-2 input[type="color"] { max-width: none; }
@media (max-width: 340px) { .row-2 { grid-template-columns: minmax(0, 1fr); } .row-2 input[type="color"] { max-width: 7rem; } }
.msg { padding: 0.6rem 0.85rem; border-radius: 10px; font-size: 0.92rem; font-weight: 600; background: var(--tint); color: var(--ink-2); }
.msg--ok { background: var(--ok-soft); color: var(--ok); }
.msg--warn { background: var(--warn-soft); color: var(--warn); }
.msg--bad { background: var(--bad-soft); color: var(--bad); }
.msg--info { background: var(--tint); color: var(--ink-2); }

.seg { display: inline-flex; margin: 0; padding: 3px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg); min-width: 0; width: 100%; }
.seg__item { position: relative; flex: 1; display: block; text-align: center; cursor: pointer; }
.seg__item input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg__item span { display: block; padding: 0.55rem 1rem; border-radius: 9px; font-weight: 700; color: var(--ink-2); }
.seg__item input:checked + span { background: var(--ink); color: var(--bg); }
.seg__item input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.pos-layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1rem 1.25rem; }
.pos-grid { display: grid; grid-template-columns: repeat(3, 3.1rem); grid-template-rows: repeat(3, 2.6rem); gap: 6px; margin: 0; padding: 8px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg); min-width: 0; }
.pos-grid:disabled { opacity: 0.45; }
.pos-cell { position: relative; display: block; }
.pos-cell input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pos-cell__dot { display: grid; place-items: center; width: 100%; height: 100%; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; }
.pos-cell__dot::after { content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--line-strong); }
.pos-cell:hover .pos-cell__dot { background: var(--accent-soft); }
.pos-cell input:checked + .pos-cell__dot { background: var(--accent); border-color: var(--accent); }
.pos-cell input:checked + .pos-cell__dot::after { background: #fff; }
.pos-cell input:focus-visible + .pos-cell__dot { outline: 3px solid var(--ink); outline-offset: 2px; }
.pos-side { display: grid; gap: 0.6rem; flex: 1 1 10rem; min-width: 0; }
.custom-note { display: grid; gap: 0.5rem; justify-items: start; padding: 0.6rem 0.75rem; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); font-size: 0.9rem; font-weight: 600; }

.logo-current { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.9rem; }
.logo-thumb { max-width: 9rem; max-height: 4.5rem; border: 1px solid var(--line); border-radius: 8px; background-color: var(--tint-2); padding: 4px; object-fit: contain; }
.logo-name { color: var(--ink-2); font-size: 0.9rem; overflow-wrap: anywhere; }

.lock-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.7rem 0.85rem; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--ink); text-decoration: none; font-weight: 650;
}
.lock-row:hover { background: var(--accent-soft); color: var(--ink); }
.lock-row__text { display: grid; gap: 0.1rem; min-width: 0; }
.lock-row__help { color: var(--muted); font-weight: 400; font-size: 0.86rem; }
.btn .badge-pro { margin-left: 0.1rem; }
.presets { display: grid; gap: 0.9rem; }
.preset-lock { display: block; }
.profile-form { display: grid; gap: 0.9rem; }
.profile-form.is-off > .group { display: none; }

/* ---------- file list ---------- */
.file-list { list-style: none; margin: 0; padding: 0; }
.file { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.3rem 0.75rem; align-items: center; padding: 0.7rem 0; border-top: 1px solid var(--line); }
.file:first-child { border-top: 0; }
.file__main { display: grid; gap: 0.05rem; min-width: 0; }
.file__name { font-weight: 650; overflow-wrap: anywhere; }
.file__meta { color: var(--muted); font-size: 0.85rem; }
.file__side { display: inline-flex; align-items: center; gap: 0.35rem; }
.file__progress, .file__notes, .file__extra { grid-column: 1 / -1; }
.file__notes { display: grid; gap: 0.35rem; }
.file__notes:empty, .file__extra:empty { display: none; }
.file__note { padding: 0.4rem 0.65rem; border-radius: 8px; font-size: 0.88rem; background: var(--tint); color: var(--ink-2); }
.file__note--warn { background: var(--warn-soft); color: var(--warn); }
.file__note--bad { background: var(--bad-soft); color: var(--bad); }
.file__note--ok { background: var(--ok-soft); color: var(--ok); }
.chip { display: inline-block; padding: 0.12rem 0.6rem; border-radius: 999px; background: var(--tint-2); color: var(--ink-2); font-size: 0.78rem; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.chip--ok { background: var(--ok-soft); color: var(--ok); }
.chip--warn { background: var(--warn-soft); color: var(--warn); }
.chip--bad { background: var(--bad-soft); color: var(--bad); }
.chip--run { background: var(--accent-soft); color: var(--accent-ink); }
.chip--wait { background: var(--tint); color: var(--muted); border: 1px dashed var(--line-strong); }
progress {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 8px; border: 0; border-radius: 999px; background: var(--tint-2); overflow: hidden; accent-color: var(--accent);
}
progress::-webkit-progress-bar { background: var(--tint-2); border-radius: 999px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; transition: width 0.2s; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }

/* ---------- before and after tables (copyright tool), comparison tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); max-width: 100%; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 0.6rem 0.8rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
tr:last-child > th, tr:last-child > td { border-bottom: 0; }
thead th { background: var(--tint); font-family: var(--font-head); font-size: 0.95rem; white-space: nowrap; }
tbody th { font-weight: 650; background: transparent; }
.table-wrap table { min-width: 28rem; }
caption { padding: 0.65rem 0.8rem; text-align: left; font-family: var(--font-head); font-weight: 700; font-size: 1rem; color: var(--ink); caption-side: top; }
.cell--changed { background: var(--ok-soft); }
.cell--kept { background: var(--warn-soft); }
.cell--empty { color: var(--muted); }

/* ---------- Pro pages ---------- */
.offer { display: grid; gap: 1.25rem; padding: clamp(1.2rem, 4vw, 2rem); border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.offer__top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1rem; }
.offer__price { font-family: var(--font-head); font-size: clamp(2.8rem, 9vw, 3.9rem); font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.offer__once { font-size: 1.05rem; font-weight: 650; color: var(--ink-2); }
.unlocks { display: grid; gap: 0.7rem; margin: 0; padding: 0; list-style: none; }
.unlocks li { display: flex; align-items: flex-start; gap: 0.65rem; }
.unlocks li::before {
  content: ""; flex: none; width: 1.3rem; height: 1.3rem; margin-top: 0.12rem; border-radius: 50%; border: 1px solid var(--accent-line); background-color: var(--accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a2f07' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E");
  background-position: center; background-size: 70%; background-repeat: no-repeat;
}
.pro-layout { display: grid; gap: 1.5rem; padding-block: 1.5rem 0.5rem; }
.pro-stack { display: grid; gap: 1.1rem; align-content: start; min-width: 0; }
.pro-stack h2 { font-size: 1.3rem; }
.pro-stack .card { display: grid; gap: 0.6rem; }
@media (min-width: 860px) { .pro-layout { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 2rem; align-items: start; } }
.status-card { display: grid; gap: 0.9rem; max-width: 40rem; padding: clamp(1.2rem, 4vw, 2rem); border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.status-card h2 { font-size: 1.5rem; }
.status-card .row { flex-wrap: wrap; }
.state-line { display: flex; align-items: center; gap: 0.75rem; font-weight: 650; }
.spinner { flex: none; width: 1.3rem; height: 1.3rem; border: 3px solid var(--tint-2); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tick { flex: none; display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--ok); color: #fff; }
.tick .icon { width: 1rem; height: 1rem; }
textarea { min-height: 4.5rem; resize: vertical; line-height: 1.4; }
.paste-box { display: grid; gap: 0.7rem; padding: 0.7rem 0.9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.paste-box > summary { cursor: pointer; font-weight: 650; }
.paste-box textarea { min-height: 6rem; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.85rem; }
.plain-list { display: grid; gap: 0.7rem; margin: 0; padding: 0; list-style: none; }
.plain-list li { color: var(--ink-2); font-size: 0.95rem; }
.plain-list strong { color: var(--ink); }
.info-list { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.25rem 1rem; margin: 0; font-size: 0.93rem; }
.info-list dt { color: var(--muted); font-weight: 600; }
.info-list dd { margin: 0; overflow-wrap: anywhere; }
.video-info { padding: 0.75rem 0.9rem; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--line); }
.field--inline { display: flex; align-items: center; gap: 0.6rem; }
.field--inline select { min-width: 10rem; max-width: 16rem; }
.workspace--meta .stage { position: static; }
.workspace--meta .table-card { order: 2; }
.workspace--meta .controls { order: 1; }
@media (min-width: 960px) { .workspace--meta .table-card, .workspace--meta .controls { order: 0; } }

/* ---------- content pages and guide sections (builder D writes the HTML, these classes style it) ---------- */
main > .prose, main > .guide, main > article, main > aside.prose { width: min(100% - 2 * var(--gutter), var(--prose)); margin-inline: auto; }
.prose { padding-block: clamp(1.6rem, 5vw, 3rem); font-size: 1.04rem; }
.prose > * + * { margin-top: 1.05em; }
.prose h1 { margin-bottom: 0.3em; }
.prose h2 { margin-top: 2.1em; padding-top: 0.2em; }
.prose h3 { margin-top: 1.7em; }
.prose h2 + *, .prose h3 + * { margin-top: 0.6em; }
.prose ul, .prose ol { padding-left: 1.35rem; }
.prose li + li { margin-top: 0.4em; }
.prose li > ul, .prose li > ol { margin-top: 0.4em; }
.prose strong { color: var(--ink); }
.prose a { text-decoration-thickness: 1px; }
.prose img, .prose svg { height: auto; }
.prose code, .prose kbd { padding: 0.08em 0.35em; border-radius: 6px; background: var(--tint-2); font-size: 0.9em; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.prose blockquote { margin-inline: 0; padding: 0.2rem 1rem; border-left: 4px solid var(--accent-line); color: var(--ink-2); }
.prose table { display: block; max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.prose .table-wrap table { display: table; border: 0; min-width: 30rem; }
.prose .lead { margin-top: 0.4em; }
.guide { padding-top: clamp(2rem, 5vw, 3.2rem); margin-top: clamp(2rem, 5vw, 3.5rem); border-top: 1px solid var(--line); }
.note, .callout {
  padding: 0.85rem 1.1rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 0.97rem;
}
.note { border-left: 4px solid var(--accent); border-radius: 4px 12px 12px 4px; background: var(--tint); }
.callout { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); }
.callout > * + *, .note > * + * { margin-top: 0.5em; }
.callout a { color: var(--accent-ink); }
.steps { counter-reset: step; list-style: none; padding: 0 !important; display: grid; gap: 0.9rem; }
.steps > li { counter-increment: step; position: relative; margin: 0 !important; padding-left: 3rem; min-height: 2.2rem; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--accent); color: #fff; font: 800 1rem/1 var(--font-head);
}
.prose .faq { margin-top: 2.6rem; }
.faq { display: grid; gap: 0.6rem; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.faq summary { padding: 0.8rem 1rem; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 1.3rem; line-height: 1; color: var(--accent); }
.faq details[open] > summary::after { content: "\2212"; }
.faq details > *:not(summary) { padding: 0 1rem 0.9rem; }
.faq details > p { margin: 0; color: var(--ink-2); }
.faq dl { margin: 0; }
.faq dt { font-weight: 700; margin-top: 1.1rem; color: var(--ink); }
.faq dt:first-child { margin-top: 0; }
.faq dd { margin: 0.3rem 0 0; color: var(--ink-2); }
.faq h3 { font-size: 1.4rem; margin-top: 0; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .spinner { animation: none; border-top-color: var(--accent); }
}
@media print {
  .site-header, .site-footer, .skip-link { display: none; }
  body { background: #fff; }
}
