/* ConvertICO — sky-blue icon studio. Vanilla CSS, self-hosted Dosis headings.
   App-shell: left deck (wide) / off-canvas (narrow). Light + dark via OS. */

/* ---------- Self-hosted heading font (no external requests) ---------- */
@font-face {
  font-family: 'Dosis';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/dosis.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  --accent: #2e95cb;
  --accent-strong: #1f7fb4;
  --accent-ink: #14607f;
  --accent-soft: #eaf6fc;
  --accent-line: #cfe8f6;
  --grad-a: #61bae4;
  --grad-b: #2b93ca;

  --ink: #16232b;
  --muted: #566771;
  --faint: #8895a0;

  --bg: #f5f9fb;
  --surface: #ffffff;
  --surface-2: #eef4f8;
  --line: #e2e9ee;

  --ok: #1a9e6a;
  --err: #d1483a;
  --warn: #b9791a;

  --radius: 16px;
  --radius-s: 10px;
  --shadow: 0 1px 2px rgba(16,35,45,.05), 0 10px 34px rgba(16,35,45,.07);
  --shadow-lg: 0 24px 60px rgba(16,35,45,.16);
  --maxw: 1060px;
  --deck-w: 264px;

  --font-head: 'Dosis', 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', 'Cascadia Code', Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #4db2e6;
    --accent-strong: #6cc2ef;
    --accent-ink: #bfe3f6;
    --accent-soft: #12303f;
    --accent-line: #1f4c64;
    --grad-a: #3aa0d6;
    --grad-b: #2b7fb0;

    --ink: #e8eff3;
    --muted: #9fb0ba;
    --faint: #6f818b;

    --bg: #0f1a20;
    --surface: #152430;
    --surface-2: #1a2c39;
    --line: #23394a;

    --ok: #34c98b;
    --err: #ff6f61;
    --warn: #e0a53a;

    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 34px rgba(0,0,0,.35);
    --shadow-lg: 0 26px 64px rgba(0,0,0,.55);
  }
}
/* Explicit dark toggle wins over OS preference */
:root[data-theme="dark"] {
  --accent: #4db2e6;
  --accent-strong: #6cc2ef;
  --accent-ink: #bfe3f6;
  --accent-soft: #12303f;
  --accent-line: #1f4c64;
  --grad-a: #3aa0d6;
  --grad-b: #2b7fb0;
  --ink: #e8eff3;
  --muted: #9fb0ba;
  --faint: #6f818b;
  --bg: #0f1a20;
  --surface: #152430;
  --surface-2: #1a2c39;
  --line: #23394a;
  --ok: #34c98b;
  --err: #ff6f61;
  --warn: #e0a53a;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 34px rgba(0,0,0,.35);
  --shadow-lg: 0 26px 64px rgba(0,0,0,.55);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg, canvas { max-width: 100%; }
.ic { display: inline-block; vertical-align: middle; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: .5rem .8rem; border-radius: 8px; z-index: 3000; box-shadow: var(--shadow); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- App shell ---------- */
.cico { display: grid; grid-template-columns: var(--deck-w) 1fr; min-height: 100vh; }

.deck {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 1.1rem .8rem; z-index: 60;
}
.deck-brand { display: flex; align-items: center; gap: .6rem; padding: .3rem .5rem .9rem; color: var(--ink); font-weight: 700; }
.deck-brand:hover { text-decoration: none; }
.deck-badge { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(160deg, var(--grad-a), var(--grad-b)); color: #fff; box-shadow: 0 4px 12px rgba(43,147,202,.35); }
.deck-badge .ic { stroke-width: 1.9; }
.deck-word { font-family: var(--font-head); font-size: 1.25rem; letter-spacing: .01em; }
.deck-word b { color: var(--accent); font-weight: 700; }
.tld { color: var(--faint); font-weight: 600; }

.deck-nav { flex: 1; }
.deck-group { text-transform: uppercase; letter-spacing: .12em; font-size: .64rem; color: var(--faint); font-weight: 700; margin: 1.1rem .55rem .3rem; }
.deck-nav > .deck-group:first-child { margin-top: .2rem; }
.deck-link { display: flex; align-items: center; gap: .6rem; color: var(--muted); padding: .5rem .55rem; border-radius: var(--radius-s); font-size: .92rem; font-weight: 600; }
.deck-link:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.deck-link.is-active { background: var(--accent-soft); color: var(--accent-ink); }
.deck-ic { display: inline-flex; color: currentColor; }
.deck-foot { border-top: 1px solid var(--line); padding-top: .6rem; margin-top: .8rem; display: flex; flex-direction: column; gap: .1rem; }
.deck-sec { color: var(--muted); font-size: .85rem; font-weight: 600; padding: .35rem .55rem; border-radius: var(--radius-s); }
.deck-sec:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.deck-theme { display: flex; align-items: center; gap: .5rem; width: 100%; border: none; background: none; font: inherit; cursor: pointer; text-align: left; }
.deck-theme .ic { color: var(--accent); }

.board { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; align-items: center; gap: .8rem; padding: .6rem .9rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); z-index: 50; }
.decktoggle { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: .4rem; color: var(--ink); cursor: pointer; display: inline-flex; }
.topbar-brand { display: inline-flex; align-items: center; gap: .45rem; color: var(--ink); font-weight: 700; font-family: var(--font-head); font-size: 1.1rem; }
.topbar-brand b { color: var(--accent); }
.topbar-cta { margin-left: auto; font-size: .88rem; font-weight: 600; }

.canvas { flex: 1; padding: clamp(1.4rem, 3.4vw, 3rem); max-width: var(--maxw); width: 100%; }

.trail { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; font-size: .82rem; color: var(--muted); margin-bottom: 1.3rem; }
.trail a { color: var(--muted); font-weight: 600; }
.trail a:hover { color: var(--accent-ink); }
.trail-sep { color: var(--faint); }
.trail [aria-current] { color: var(--ink); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .5rem; font: inherit; font-weight: 600; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: .62rem 1.05rem; border-radius: var(--radius-s); transition: transform .05s ease, background .15s ease, border-color .15s ease; }
.btn:hover { text-decoration: none; border-color: var(--accent-line); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-accent { background: linear-gradient(160deg, var(--grad-a), var(--grad-b)); color: #fff; border-color: transparent; box-shadow: 0 6px 18px rgba(43,147,202,.28); }
.btn-accent:hover { border-color: transparent; filter: brightness(1.04); }
.btn-ghost { background: transparent; }
.btn-go { background: linear-gradient(160deg, #3ad29a, #17a76a); color: #fff; border-color: transparent; box-shadow: 0 6px 18px rgba(23,167,106,.26); }
.btn-go:hover { border-color: transparent; filter: brightness(1.05); }
.btn-s { padding: .45rem .8rem; font-size: .88rem; }
.btn-lg { padding: .8rem 1.4rem; font-size: 1.02rem; }
.linky { background: none; border: 0; color: var(--accent-ink); font: inherit; font-weight: 600; cursor: pointer; padding: 0; text-decoration: underline; }

/* ---------- Tool head + body ---------- */
.tool-head { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.5rem; }
.tool-head-badge { flex: none; display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent-line); }
.tool-head h1 { margin-bottom: .3rem; }
.tool-head-lead { color: var(--muted); margin: 0; max-width: 52rem; }
.tool-body { display: grid; gap: 1.3rem; }
.priv-line { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .84rem; margin: 0; }
.priv-line .ic { color: var(--accent); }

/* ---------- Panels / tools ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1rem, 2.4vw, 1.6rem); box-shadow: var(--shadow); }
.panel.is-locked { position: relative; }
.panel.is-locked .rig { opacity: .5; }
.panel :disabled { cursor: not-allowed; }

.drop { border: 2px dashed var(--accent-line); border-radius: var(--radius-s); background: var(--surface-2); padding: 1.8rem 1.2rem; text-align: center; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop-ic { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--surface); color: var(--accent); border: 1px solid var(--accent-line); margin-bottom: .5rem; }
.drop-lead { margin: 0 0 .25rem; font-weight: 600; }
.drop-hint { margin: 0; color: var(--faint); font-size: .82rem; }
.drop-thumb { display: block; max-height: 120px; max-width: 180px; margin: 0 auto .6rem; border-radius: 10px; border: 1px solid var(--line); background: conic-gradient(#0000 90deg, rgba(120,140,150,.14) 0 180deg, #0000 0 270deg, rgba(120,140,150,.14) 0) 0 0/16px 16px; }

.rig { margin-top: 1.2rem; display: grid; gap: 1.1rem; }
.field { display: grid; gap: .35rem; }
.field > label, .field-label { font-weight: 600; font-size: .88rem; }
.field .hint { color: var(--faint); font-size: .78rem; }
.row { display: flex; flex-wrap: wrap; gap: .8rem; align-items: end; }
.row > .field { flex: 1; min-width: 9rem; }

input[type=text], input[type=number], input[type=url], select, textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-s); padding: .55rem .7rem; width: 100%;
}
textarea { resize: vertical; min-height: 6rem; font-family: var(--font-mono); font-size: .85rem; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23566771' stroke-width='2' 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 .6rem center; padding-right: 2rem; }
input[type=range] { accent-color: var(--accent); width: 100%; }
input[type=color] { width: 3rem; height: 2.4rem; padding: 2px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 1.05rem; height: 1.05rem; }

/* size chips */
.sizeset { display: flex; flex-wrap: wrap; gap: .5rem; }
.size-opt { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .7rem; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; font-weight: 600; cursor: pointer; user-select: none; background: var(--surface); }
.size-opt:hover { border-color: var(--accent-line); }
.size-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.size-opt:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.size-opt:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--accent-soft); }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.seg label { padding: .45rem .8rem; font-size: .85rem; font-weight: 600; cursor: pointer; color: var(--muted); background: var(--surface); }
.seg label:has(input:checked) { background: var(--accent-soft); color: var(--accent-ink); }
.seg input { position: absolute; opacity: 0; width: 0; height: 0; }

.preset-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .55rem; }
.chip { font: inherit; font-size: .82rem; font-weight: 600; padding: .35rem .75rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.chip.is-active { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }

.emoji-pick { display: flex; flex-wrap: wrap; gap: .35rem; }
.emoji-opt { font-size: 1.35rem; line-height: 1; padding: .3rem .45rem; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); cursor: pointer; }
.emoji-opt:hover { border-color: var(--accent); background: var(--accent-soft); }

.controls { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.stat { font-size: .86rem; color: var(--muted); font-weight: 600; }
.stat.ok { color: var(--ok); }
.stat.err { color: var(--err); }

/* output grid (sizes / files) */
/* Previews show icons at their true pixel size; the strip wraps and scrolls if an icon is very large. */
.out-grid { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem 1.2rem; overflow-x: auto; padding-bottom: .3rem; }
.out-cell { flex: 0 0 auto; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface-2); padding: .7rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.out-thumb { display: flex; align-items: flex-end; justify-content: center; }
.out-cell img { display: block; image-rendering: -webkit-optimize-contrast; background: conic-gradient(#0000 90deg, rgba(120,140,150,.14) 0 180deg, #0000 0 270deg, rgba(120,140,150,.14) 0) 0 0/14px 14px; border-radius: 4px; }
.out-size { font-size: .74rem; color: var(--muted); font-weight: 600; }
.out-bytes { font-size: .68rem; color: var(--faint); }
.out-dl { font-size: .76rem; font-weight: 700; color: var(--accent-ink); }

.preview-row { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
/* No container rounding — the drawn badge shows its own shape (square / rounded / circle) honestly. */
.preview-chip { width: 64px; height: 64px; border-radius: 2px; border: 1px solid var(--line); background: conic-gradient(#0000 90deg, rgba(120,140,150,.12) 0 180deg, #0000 0 270deg, rgba(120,140,150,.12) 0) 0 0/16px 16px, var(--surface-2); object-fit: contain; }
.preview-lg { width: auto; height: auto; max-width: 100%; max-height: 480px; }

.snip { position: relative; }
.snip textarea { padding-right: 3rem; }
.snip .btn { position: absolute; top: .5rem; right: .5rem; }
.copied::after { content: 'Copied'; }

.howto { border-top: 1px solid var(--line); padding-top: 1.2rem; color: var(--muted); }
.howto h2 { color: var(--ink); font-size: 1.15rem; }
.howto p { margin: 0; max-width: 54rem; }

/* checker list */
.checklist { display: grid; gap: .5rem; }
.check-row { display: flex; gap: .7rem; align-items: baseline; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface-2); font-size: .88rem; }
.check-row.miss { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.check-tag { font-family: var(--font-mono); font-size: .78rem; color: var(--accent-ink); font-weight: 700; flex: none; }
.check-row code { font-family: var(--font-mono); font-size: .8rem; word-break: break-all; }

/* ---------- Home ---------- */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(1.5rem, 3vw, 3rem); align-items: center; margin-bottom: clamp(2rem, 4vw, 3.4rem); scroll-margin-top: 72px; }
/* When reached via the "Windows .ico" shortcut (#tool), flash the converter so it's clearly the destination. */
#tool:target .hero-tool .panel { animation: cico-flash 1.3s ease 1; }
@keyframes cico-flash { 0%, 100% { box-shadow: var(--shadow-lg); } 25% { box-shadow: 0 0 0 3px var(--accent), var(--shadow-lg); } }
.hero-eyebrow { display: inline-flex; align-items: center; gap: .45rem; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent-soft); border: 1px solid var(--accent-line); padding: .3rem .7rem; border-radius: 999px; margin-bottom: 1rem; }
.hero h1 { margin-bottom: .7rem; }
.hero-lead { color: var(--muted); font-size: 1.08rem; max-width: 34rem; margin-bottom: 1.3rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.hero-tool { }
.hero-tool .howto { display: none; }
.hero-tool .panel { box-shadow: var(--shadow-lg); }
/* Once an image is loaded, the pitch steps aside and the converter spans the full width, like the sections below. */
.hero.is-loaded { grid-template-columns: 1fr; }
.hero.is-loaded .hero-copy { display: none; }

.trust { display: flex; flex-wrap: wrap; gap: 1.2rem 1.6rem; margin: 0 0 clamp(2rem, 4vw, 3rem); padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.trust-item { display: flex; align-items: center; gap: .55rem; font-size: .9rem; font-weight: 600; color: var(--muted); }
.trust-item .ic { color: var(--accent); }

.section-head { margin-bottom: 1.3rem; }
.section-head h2 { margin-bottom: .3rem; }
.section-head p { color: var(--muted); margin: 0; }

.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .8rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.preset-tile { display: flex; flex-direction: column; gap: .35rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--ink); }
.preset-tile:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); transition: transform .12s ease; }
.preset-tile .ic { color: var(--accent); }
.preset-tile b { font-family: var(--font-head); font-size: 1.05rem; }
.preset-tile span { color: var(--muted); font-size: .82rem; }

.toolwall { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.tool-card { display: block; padding: 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.tool-card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); transition: transform .12s ease; }
.tool-card-ic { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent-line); margin-bottom: .7rem; }
.tool-card b { font-family: var(--font-head); font-size: 1.12rem; display: block; margin-bottom: .2rem; }
.tool-card span { color: var(--muted); font-size: .88rem; }

.why { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.1rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.why-item { padding: 1.1rem; border-left: 3px solid var(--accent-line); }
.why-item .ic { color: var(--accent); margin-bottom: .5rem; }
.why-item b { font-family: var(--font-head); font-size: 1.1rem; display: block; margin-bottom: .25rem; }
.why-item p { color: var(--muted); font-size: .9rem; margin: 0; }

.craft-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.craft-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.craft-card:hover { text-decoration: none; border-color: var(--accent); }
.craft-card img { width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; display: block; background: var(--surface-2); }
.craft-card .cc-body { padding: 1rem; }
.craft-card b { font-family: var(--font-head); font-size: 1.06rem; color: var(--ink); display: block; margin-bottom: .3rem; }
.craft-card span { color: var(--muted); font-size: .86rem; }
.craft-card .cc-meta { color: var(--faint); font-size: .74rem; margin-top: .5rem; }

.faq { display: grid; gap: .6rem; margin-bottom: clamp(2rem, 4vw, 3rem); max-width: 52rem; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); padding: .3rem .2rem; }
.faq summary { cursor: pointer; font-weight: 600; padding: .7rem .9rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; width: 16px; height: 16px; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232e95cb' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat; transition: transform .18s ease; }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details p { padding: 0 .9rem .8rem; margin: 0; color: var(--muted); }

.cta { text-align: center; padding: clamp(2rem, 5vw, 3.4rem); border-radius: var(--radius); background: linear-gradient(160deg, var(--grad-a), var(--grad-b)); color: #fff; box-shadow: var(--shadow-lg); }
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.9); max-width: 34rem; margin: 0 auto 1.3rem; }
.cta .btn { background: #fff; color: #14607f; border-color: #fff; }

/* ---------- Prose (pages + posts) ---------- */
.page-head { max-width: 46rem; margin: 0 0 1.6rem; }
.page-eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: .74rem; font-weight: 700; color: var(--accent-ink); margin-bottom: .5rem; }
.page-lead { color: var(--muted); font-size: 1.05rem; }
.prose { max-width: 46rem; }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.5rem; }
.prose p, .prose li { color: var(--ink); }
.prose a { color: var(--accent-ink); text-decoration: underline; }
.prose code { font-family: var(--font-mono); font-size: .85em; background: var(--surface-2); padding: .1em .4em; border-radius: 5px; }
.prose pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 1rem; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { border-left: 3px solid var(--accent-line); margin: 1rem 0; padding: .2rem 0 .2rem 1rem; color: var(--muted); }
.prose img { display: block; width: 100%; height: auto; border-radius: var(--radius-s); border: 1px solid var(--line); margin: 1.4rem 0; background: var(--surface-2); }
.prose-date { color: var(--faint); font-size: .82rem; }
.post-hero { width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 1.6rem; background: var(--surface-2); }
.tagrow { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.4rem; }
.tag { font-size: .74rem; font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); padding: .2rem .6rem; border-radius: 999px; }

.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; }
.pager a { font-weight: 600; }
.pager .is-off { opacity: .4; pointer-events: none; }

/* ---------- Consent ---------- */
.cookie-veil { position: fixed; inset: 0; z-index: 2000; background: rgba(9,22,30,.42); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.cookie-bar { position: absolute; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 2px solid var(--accent); box-shadow: 0 -16px 46px rgba(9,22,30,.28); padding: 1.4rem 1.25rem; }
.cookie-in { max-width: 62rem; margin: 0 auto; padding-right: 2rem; display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.cookie-in p { margin: 0; flex: 1; min-width: 16rem; color: var(--muted); font-size: .93rem; line-height: 1.55; }
.cookie-in p strong { color: var(--ink); }
.cookie-in a { color: var(--accent-ink); }
.cookie-x { position: absolute; top: .5rem; right: .7rem; width: 2rem; height: 2rem; display: grid; place-items: center; background: none; border: none; color: var(--faint); font-size: 1.6rem; line-height: 1; cursor: pointer; border-radius: 8px; }
.cookie-x:hover { color: var(--ink); }
.cookie-veil.cookie-clear { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; pointer-events: none; }
.cookie-veil.cookie-clear .cookie-bar { pointer-events: auto; }

/* ---------- Footer ---------- */
.ground { border-top: 1px solid var(--line); padding: 2.5rem clamp(1.4rem, 3.4vw, 3rem) 1.6rem; background: var(--surface); }
.ground-cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 1.6rem; max-width: var(--maxw); }
.ground-cols nav { display: flex; flex-direction: column; gap: .35rem; }
.ground-cols nav a { color: var(--muted); font-size: .88rem; }
.ground-cols nav a:hover { color: var(--accent-ink); }
.ground-h { font-family: var(--font-head); font-size: .95rem; margin: 0 0 .6rem; color: var(--ink); }
.ground-blurb { color: var(--muted); font-size: .88rem; max-width: 24rem; margin: .6rem 0 0; }
.deck-brand-sm .deck-badge { width: 28px; height: 28px; }
.deck-brand-sm .deck-word { font-size: 1.1rem; }
.ground-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--faint); font-size: .82rem; max-width: var(--maxw); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .cico { grid-template-columns: 1fr; }
  .deck { position: fixed; left: 0; top: 0; width: min(82vw, 300px); transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  .deck.open { transform: translateX(0); }
  .topbar { display: flex; }
  .hero { grid-template-columns: 1fr; }
  .ground-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .ground-cols { grid-template-columns: 1fr; }
  .row > .field { min-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto; }
}
