/* EvergreenQR: design system + components. No external fonts, no trackers. */
:root {
  --bg: #F3F5EF;
  --surface: #FFFFFF;
  --surface-2: #F7F9F5;
  --surface-3: #ECF0E8;
  --ink: #0E1C17;
  --ink-2: #2B3B35;
  --muted: #5E6E67;
  --faint: #8C9A94;
  --line: #E0E6DD;
  --line-2: #CCD5CA;
  --brand: #0B6E4F;
  --brand-hover: #085A40;
  --brand-ink: #FFFFFF;
  --brand-soft: #E2F2EA;
  --brand-soft-ink: #0A5A40;
  --accent: #C9F26B;
  --accent-ink: #1B2B0A;
  --good: #0E8A5E;
  --good-soft: #E0F4EA;
  --warn: #A3640B;
  --warn-soft: #FBF0D9;
  --bad: #B93A0C;
  --bad-soft: #FCE7DC;
  --focus: 0 0 0 3px rgba(11, 110, 79, .3);
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  --shadow-sm: 0 1px 2px rgba(14, 28, 23, .06);
  --shadow: 0 1px 2px rgba(14, 28, 23, .05), 0 8px 24px rgba(14, 28, 23, .06);
  --shadow-lg: 0 2px 6px rgba(14, 28, 23, .05), 0 28px 70px rgba(14, 28, 23, .13);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1200px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A110E; --surface: #111B17; --surface-2: #15211C; --surface-3: #1B2924;
    --ink: #E8F1EC; --ink-2: #C8D6CF; --muted: #93A49C; --faint: #6D7E76; --line: #21302A; --line-2: #2D3F37;
    --brand: #34C08A; --brand-hover: #4BD39C; --brand-ink: #03140D; --brand-soft: #123327; --brand-soft-ink: #7FE0B6;
    --accent: #C9F26B; --accent-ink: #1B2B0A;
    --good: #45CF93; --good-soft: #10291F; --warn: #E9B04F; --warn-soft: #2B2210; --bad: #F2865C; --bad-soft: #2E1810;
    --focus: 0 0 0 3px rgba(52, 192, 138, .35);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 28px 70px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A110E; --surface: #111B17; --surface-2: #15211C; --surface-3: #1B2924;
  --ink: #E8F1EC; --ink-2: #C8D6CF; --muted: #93A49C; --faint: #6D7E76; --line: #21302A; --line-2: #2D3F37;
  --brand: #34C08A; --brand-hover: #4BD39C; --brand-ink: #03140D; --brand-soft: #123327; --brand-soft-ink: #7FE0B6;
  --accent: #C9F26B; --accent-ink: #1B2B0A;
  --good: #45CF93; --good-soft: #10291F; --warn: #E9B04F; --warn-soft: #2B2210; --bad: #F2865C; --bad-soft: #2E1810;
  --focus: 0 0 0 3px rgba(52, 192, 138, .35);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 28px 70px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--ink);
  background: var(--bg);
  background-image: radial-gradient(1200px 520px at 50% -180px, color-mix(in srgb, var(--brand) 13%, transparent), transparent 70%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--brand); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--brand-hover); }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; color: var(--ink); }
h1 { font-size: clamp(2rem, 1.2rem + 3.2vw, 3.35rem); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.3vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 16px; height: 16px; }
.icon.lg { width: 24px; height: 24px; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------- header */
.site-header { position: relative; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; }
.brand:hover { color: var(--ink); }
.brand svg { width: 32px; height: 32px; }
.brand b { color: var(--brand); font-weight: 850; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 560; font-size: .95rem; padding: 8px 12px; border-radius: 10px; }
.nav a:hover { background: var(--surface-3); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--brand); }
.nav .btn { margin-left: 6px; }
.nav a.btn-dark, .nav a.btn-dark:hover { color: var(--bg); background: var(--ink); }
.theme-btn { border: 0; background: transparent; width: 38px; height: 38px; border-radius: 10px; display: inline-grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.theme-btn:hover { background: var(--surface-3); }
.menu-btn { display: none; }
@media (max-width: 860px) {
  .nav .hide-sm { display: none; }
}
@media (max-width: 520px) {
  .site-header .wrap { gap: 8px; }
  .nav { gap: 0; }
  .nav .hide-xs { display: none; }
  .brand { font-size: 1.04rem; }
  .brand svg { width: 28px; height: 28px; }
}

/* ---------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 650; font-size: .95rem; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .08s, box-shadow .15s; white-space: nowrap; }
.btn:hover { background: var(--surface-3); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 1px 0 rgba(255, 255, 255, .15) inset, 0 6px 16px color-mix(in srgb, var(--brand) 28%, transparent); }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: var(--brand-ink); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-dark:hover { background: var(--ink-2); color: var(--bg); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-3); }
.btn-lg { height: 52px; padding: 0 22px; font-size: 1.02rem; border-radius: 14px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: .86rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.pro-badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }

/* ---------------------------------------------------------- hero */
.hero { padding: 22px 0 22px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: .85rem; font-weight: 600; color: var(--ink-2); margin-bottom: 18px; }
.eyebrow .dot { width: 22px; height: 22px; border-radius: 99px; background: var(--accent); display: inline-grid; place-items: center; color: var(--accent-ink); }
.hero h1 { max-width: 920px; margin: 0 auto 14px; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, color-mix(in srgb, var(--accent) 75%, transparent) 62%); padding: 0 .06em; }
.lede { font-size: clamp(1.02rem, .95rem + .4vw, 1.18rem); color: var(--muted); max-width: 700px; margin: 0 auto 18px; }
.trust { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; padding: 0; margin: 0; color: var(--ink-2); font-weight: 600; font-size: .93rem; }
.trust li { display: inline-flex; align-items: center; gap: 7px; }
.trust .icon { color: var(--good); width: 18px; height: 18px; }

/* ---------------------------------------------------------- tool layout */
.tool { padding: 14px 0 56px; }
.tool-grid { display: grid; grid-template-columns: minmax(0, 1fr) 410px; grid-template-areas: "content preview" "design preview"; gap: 18px 22px; align-items: start; }
#p-content { grid-area: content; }
#p-design { grid-area: design; }
.tool-right { grid-area: preview; position: sticky; top: calc(14px + env(safe-area-inset-top, 0px)); }
@media (max-width: 980px) {
  .tool-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "content" "preview" "design"; }
  .tool-right { position: static; }
}
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 20px; }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.panel-head h2 { font-size: 1.12rem; margin: 0; letter-spacing: -.01em; }
.panel-head .aside { margin-left: auto; }
.step { width: 26px; height: 26px; border-radius: 9px; background: var(--ink); color: var(--bg); display: inline-grid; place-items: center; font-size: .82rem; font-weight: 800; }

/* type tabs */
.type-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.type-tab { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px 0 11px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font-weight: 600; font-size: .9rem; cursor: pointer; transition: all .15s; }
.type-tab .icon { width: 17px; height: 17px; }
.type-tab:hover { border-color: var(--line-2); background: var(--surface-3); }
.type-tab[aria-selected="true"] { background: var(--brand-soft); color: var(--brand-soft-ink); border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
@media (max-width: 560px) {
  .type-tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px 16px; padding: 2px 20px 6px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent); }
  .type-tabs::-webkit-scrollbar { display: none; }
  .type-tab { flex: none; }
  .panel { padding: 18px; }
  .wrap { padding: 0 16px; }
  body { padding-bottom: 84px; }
}

/* forms */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.fields .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .fields { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .lbl { font-size: .84rem; font-weight: 650; color: var(--ink-2); }
.field .hint { font-size: .8rem; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; height: 44px; padding: 0 13px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; min-height: 96px; padding: 11px 13px; resize: vertical; line-height: 1.45; }
.input:hover { border-color: var(--faint); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
.input.big { height: 52px; font-size: 1.05rem; padding: 0 16px; border-radius: 13px; }
.input-row { display: flex; gap: 8px; align-items: center; }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: .9rem; font-weight: 560; color: var(--ink-2); cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.field-error { color: var(--bad); font-size: .84rem; font-weight: 600; min-height: 0; }
.meter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: .82rem; color: var(--muted); }
.meter b { color: var(--ink-2); font-weight: 650; }
.meter .bar { flex: 1 1 120px; height: 6px; border-radius: 9px; background: var(--surface-3); overflow: hidden; max-width: 200px; }
.meter .bar i { display: block; height: 100%; width: 10%; background: var(--brand); border-radius: 9px; transition: width .3s; }

/* segmented */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; height: 32px; padding: 0 12px; border-radius: 9px; font-weight: 650; font-size: .86rem; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg.full { display: flex; }
.seg.full button { flex: 1; justify-content: center; }

/* presets */
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; margin-bottom: 8px; }
.preset { border: 1px solid var(--line); background: var(--surface-2); border-radius: 14px; padding: 8px 8px 7px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 5px; transition: transform .12s, border-color .15s, box-shadow .15s; }
.preset:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.preset .thumb { width: 100%; aspect-ratio: 1; border-radius: 9px; overflow: hidden; background: #fff; display: grid; place-items: center; }
.preset .thumb svg { width: 100%; height: 100%; display: block; }
.preset span { font-size: .76rem; font-weight: 650; color: var(--ink-2); }
.preset[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand) inset; }

/* accordions */
.acc { border-top: 1px solid var(--line); }
.acc:last-child { border-bottom: 0; }
.acc > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 15px 2px; cursor: pointer; font-weight: 700; font-size: .98rem; }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary .icon { color: var(--muted); }
.acc > summary .val { margin-left: auto; font-weight: 550; font-size: .84rem; color: var(--muted); }
.acc > summary .chev { transition: transform .2s; }
.acc[open] > summary .chev { transform: rotate(180deg); }
.acc-body { padding: 2px 2px 18px; display: grid; gap: 16px; }
.subhead { font-size: .78rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }

/* style tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 8px; }
.tile { border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 9px 4px 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink); transition: border-color .15s, background .15s; }
.tile svg { width: 38px; height: 38px; }
.tile span { font-size: .72rem; font-weight: 600; color: var(--muted); }
.tile:hover { border-color: var(--line-2); background: var(--surface-3); }
.tile[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-soft-ink); box-shadow: 0 0 0 1px var(--brand) inset; }
.tile[aria-pressed="true"] span { color: var(--brand-soft-ink); }

/* colors */
.colors { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .colors { grid-template-columns: 1fr; } }
.color-field { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 6px 0 6px; border: 1px solid var(--line-2); border-radius: 11px; background: var(--surface); }
.color-field:focus-within { border-color: var(--brand); box-shadow: var(--focus); }
.color-field input[type="color"] { -webkit-appearance: none; appearance: none; width: 32px; height: 32px; border: 0; padding: 0; border-radius: 8px; background: none; cursor: pointer; flex: none; }
.color-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-field input[type="color"]::-webkit-color-swatch { border: 1px solid rgba(0, 0, 0, .12); border-radius: 8px; }
.color-field input[type="color"]::-moz-color-swatch { border: 1px solid rgba(0, 0, 0, .12); border-radius: 8px; }
.color-field input[type="text"] { border: 0; outline: none; background: transparent; width: 100%; font-family: var(--mono); font-size: .9rem; text-transform: uppercase; }
.swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.swatch { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; }
.swatch:hover { transform: scale(1.08); }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type="range"] { flex: 1; accent-color: var(--brand); height: 24px; }
.range-row output { min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; font-size: .86rem; color: var(--muted); font-weight: 600; }
.inline-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }

/* logo */
.drop { border: 1.5px dashed var(--line-2); border-radius: 14px; padding: 16px; display: flex; align-items: center; gap: 14px; cursor: pointer; background: var(--surface-2); transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop .thumb { width: 52px; height: 52px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; flex: none; }
.drop .thumb img { max-width: 100%; max-height: 100%; }
.drop strong { display: block; font-size: .95rem; }
.icons-row { display: flex; flex-wrap: wrap; gap: 7px; }
.icon-pick { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2); padding: 4px; cursor: pointer; }
.icon-pick img { width: 100%; height: 100%; display: block; }
.icon-pick[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; background: var(--brand-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface-2); border-radius: 99px; padding: 5px 11px; font-size: .78rem; font-weight: 650; color: var(--ink-2); cursor: pointer; }
.chip:hover { border-color: var(--line-2); background: var(--surface-3); }

/* ---------------------------------------------------------- preview card */
.preview-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: 18px; }
.mode-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.mode-row .seg { flex: 1; }
.stage { position: relative; border-radius: 18px; padding: 22px; background: var(--surface-2); display: grid; place-items: center; min-height: 300px; overflow: hidden; }
.stage.checker { background-color: #fff; background-image: linear-gradient(45deg, #E9ECE7 25%, transparent 25%), linear-gradient(-45deg, #E9ECE7 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #E9ECE7 75%), linear-gradient(-45deg, transparent 75%, #E9ECE7 75%); background-size: 18px 18px; background-position: 0 0, 0 9px, 9px -9px, -9px 0; }
.stage .qr { width: 100%; max-width: 330px; transition: opacity .2s, filter .2s; }
.stage .qr svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 10px 24px rgba(14, 28, 23, .12)); }
.stage.stale .qr { opacity: .35; filter: grayscale(1); }
.stage { grid-template-rows: auto auto; }
.stage .stage-msg { margin-top: 12px; text-align: center; font-size: .82rem; font-weight: 650; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; }
.dyn-badge { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; background: var(--ink); color: var(--bg); font-size: .75rem; font-weight: 700; }

/* score */
.score { display: flex; align-items: center; gap: 14px; margin: 14px 2px 4px; }
.ring { position: relative; width: 58px; height: 58px; flex: none; }
.ring svg { width: 58px; height: 58px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring .track { stroke: var(--surface-3); }
.ring .val { stroke: var(--good); stroke-linecap: round; transition: stroke-dashoffset .5s cubic-bezier(.2, .8, .2, 1), stroke .3s; }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.score[data-tone="warn"] .ring .val { stroke: var(--warn); }
.score[data-tone="bad"] .ring .val { stroke: var(--bad); }
.score-text { min-width: 0; flex: 1; }
.score-text .cap { display: block; font-size: .72rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.score-text strong { display: block; font-size: 1.05rem; line-height: 1.25; }
.score-text span { font-size: .82rem; color: var(--muted); }
.score .btn-sm { margin-left: auto; }
.checks { list-style: none; padding: 10px 12px; margin: 8px 0 0; display: grid; gap: 7px; font-size: .84rem; background: var(--surface-2); border-radius: 12px; }
.checks li { display: flex; gap: 8px; align-items: flex-start; color: var(--ink-2); }
.checks .icon { width: 16px; height: 16px; margin-top: 2px; }
.checks .ok .icon { color: var(--good); }
.checks .warn .icon { color: var(--warn); }
.checks .bad .icon { color: var(--bad); }
.fix-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; }

/* downloads */
.dl { margin-top: 14px; display: grid; gap: 10px; }
.dl-row { display: flex; gap: 8px; align-items: center; }
.dl-row .seg { flex: 1; }
.dl-row select.input { width: 128px; height: 40px; }
.print-opts { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: .86rem; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.dl-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.note { font-size: .78rem; color: var(--muted); text-align: center; margin: 2px 0 0; }

/* dynamic panel */
.dyn { margin-top: 12px; border-radius: 14px; padding: 14px; background: linear-gradient(135deg, var(--brand-soft), var(--surface-2)); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); font-size: .9rem; }
.dyn h3 { font-size: .98rem; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.dyn p { margin-bottom: 10px; color: var(--ink-2); }
.dyn .row { display: flex; gap: 8px; flex-wrap: wrap; }
.dyn code { font-family: var(--mono); font-size: .85rem; background: var(--surface); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); }

/* ---------------------------------------------------------- content sections */
.section { padding: 56px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 30px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .cards3 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.card .ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-soft-ink); margin-bottom: 14px; }
.card p { color: var(--muted); margin: 0; }
.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); font-size: .95rem; }
.compare th, .compare td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.compare tr:last-child td { border-bottom: 0; }
.compare th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); }
.compare td:nth-child(2) { background: color-mix(in srgb, var(--brand-soft) 55%, transparent); font-weight: 650; }
.compare .yes { color: var(--good); font-weight: 700; }
.compare .no { color: var(--bad); font-weight: 700; }
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); }
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin-top: 1.4em; }
.prose p, .prose li { color: var(--ink-2); }
.steps { list-style: none; counter-reset: s; padding: 0; display: grid; gap: 12px; margin: 0 0 1.2em; }
.steps li { counter-increment: s; position: relative; padding: 14px 16px 14px 56px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 13px; width: 28px; height: 28px; border-radius: 9px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 600; color: var(--muted); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-2); padding-bottom: 6px; }
.directory { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.directory a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 13px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 620; font-size: .93rem; transition: border-color .15s, transform .12s; }
.directory a:hover { border-color: var(--brand); transform: translateY(-1px); color: var(--ink); }
.directory a .icon { color: var(--brand); }

/* promise banner */
.promise { background: var(--ink); color: var(--bg); border-radius: var(--r-xl); padding: 40px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; align-items: center; }
.promise h2 { color: var(--bg); }
.promise p { color: color-mix(in srgb, var(--bg) 78%, transparent); }
.promise ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.promise li { display: flex; gap: 10px; align-items: flex-start; }
.promise li .icon { color: var(--accent); margin-top: 3px; }
@media (max-width: 860px) { .promise { grid-template-columns: 1fr; padding: 28px; } }

/* ---------------------------------------------------------- pricing */
.billing-toggle { display: flex; justify-content: center; margin: 0 0 26px; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
@media (max-width: 920px) { .plans { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; } }
.plan { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 26px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.plan.featured { border: 2px solid var(--brand); box-shadow: var(--shadow-lg); }
.plan .tag { position: absolute; top: -13px; left: 24px; background: var(--brand); color: var(--brand-ink); font-size: .75rem; font-weight: 800; padding: 4px 10px; border-radius: 99px; letter-spacing: .03em; }
.plan h3 { font-size: 1.15rem; margin-bottom: 4px; }
.plan .price { font-size: 2.6rem; font-weight: 850; letter-spacing: -.04em; line-height: 1.1; margin: 12px 0 2px; }
.plan .price small { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.plan .per { color: var(--muted); font-size: .9rem; min-height: 1.4em; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 9px; font-size: .93rem; }
.plan li { display: flex; gap: 9px; align-items: flex-start; color: var(--ink-2); }
.plan li .icon { color: var(--good); width: 18px; height: 18px; margin-top: 2px; }
.plan .btn { margin-top: auto; }
.seats { font-size: .82rem; color: var(--muted); text-align: center; margin-top: 8px; }

/* ---------------------------------------------------------- dashboard */
.dash { padding: 10px 0 60px; }
.signin { max-width: 520px; margin: 30px auto; }
.dash-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.dash-top h1 { font-size: 1.8rem; margin: 0; }
.dash-actions { margin-left: auto; display: flex; gap: 8px; }
.codes { display: grid; gap: 12px; }
.code-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; cursor: pointer; transition: border-color .15s; }
.code-row:hover { border-color: var(--line-2); }
.code-row .mini { width: 64px; height: 64px; border-radius: 10px; background: #fff; padding: 4px; }
.code-row h3 { margin: 0 0 2px; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-row .dest { display: block; font-size: .85rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-row .row-end { display: flex; align-items: center; gap: 16px; }
.code-row .num { text-align: right; font-weight: 800; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.code-row .num small { display: block; font-size: .75rem; color: var(--muted); font-weight: 600; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stats-head { margin-top: 8px; }
.stats-head h2 { margin: 0; font-size: 1.3rem; }
.stats-head .seg { margin-left: auto; }
@media (max-width: 760px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .code-row { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; padding: 12px 14px; }
  .code-row .mini { width: 52px; height: 52px; }
  .code-row .spark { display: none; }
  .dash-actions { margin-left: 0; width: 100%; }
  .stats-head .seg { order: 3; width: 100%; margin-left: 0; }
  .stats-head .seg button { flex: 1; justify-content: center; padding: 0 6px; }
  .stats-head #csv { margin-left: auto; }
}
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.stat b { display: block; font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.bar:focus { outline: none; }
.bar:focus path { stroke: var(--ink); stroke-width: 1.5; }
.stat span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.chart { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.chart svg { width: 100%; height: 200px; display: block; }
.bars-list { display: grid; gap: 8px; font-size: .88rem; }
.bars-list .r { display: grid; grid-template-columns: 110px 1fr 46px; gap: 10px; align-items: center; }
.bars-list .b { height: 8px; border-radius: 9px; background: var(--surface-3); overflow: hidden; }
.bars-list .b i { display: block; height: 100%; background: var(--brand); border-radius: 9px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }

/* ---------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 40px 0 30px; font-size: .92rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 26px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--brand); }
.foot-bottom { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; color: var(--muted); font-size: .85rem; }

/* ---------------------------------------------------------- mobile bar + toast */
.mobile-bar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 40; display: none; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.mobile-bar .mini { width: 46px; height: 46px; border-radius: 10px; background: #fff; overflow: hidden; flex: none; }
.mobile-bar .mini svg { width: 100%; height: 100%; display: block; }
.mobile-bar .txt { flex: 1; min-width: 0; font-size: .85rem; line-height: 1.3; }
.mobile-bar .txt b { display: block; }
@media (max-width: 980px) { .mobile-bar.show { display: flex; } }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 30px); opacity: 0; z-index: 60; background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 12px; font-weight: 600; font-size: .9rem; box-shadow: var(--shadow-lg); transition: opacity .25s, transform .25s; pointer-events: none; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------- misc pages */
.page-head { padding: 28px 0 10px; text-align: center; }
.legal { max-width: 760px; margin: 0 auto; padding: 10px 0 40px; }
.legal h2 { font-size: 1.25rem; margin-top: 1.6em; }
.legal p, .legal li { color: var(--ink-2); }
.notice { border-radius: 14px; padding: 14px 16px; background: var(--warn-soft); color: var(--ink); font-size: .92rem; }
.notice.good { background: var(--brand-soft, var(--surface-3)); }
.kbd { font-family: var(--mono); font-size: .85em; background: var(--surface-3); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.bulk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
@media (max-width: 980px) { .bulk-grid { grid-template-columns: 1fr; } }
.preview-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.preview-table th, .preview-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.preview-table th { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.progress { height: 8px; border-radius: 9px; background: var(--surface-3); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .mobile-bar, .tool-left, .dl, .score { display: none !important; } }
