/* ==========================================================================
   Homepage. Sections: nav, hero + mini editor, stats, bento tiles, how,
   import table, numbering lab, CTA, footer.
   ========================================================================== */
:root { --sel: #3b6fd6; --guide: #e0405f; --page-paper: #fffdf4; }
:root[data-theme="dark"] { --sel: #7fa6ff; --guide: #ff7a93; --page-paper: #f7f2e1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --sel: #7fa6ff; --guide: #ff7a93; --page-paper: #f7f2e1; } }

body.home { overflow-x: clip; }
/* paper grain over everything, very quiet */
body.home::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .16 0 0 0 0 .16 0 0 0 0 .2 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] body.home::before { opacity: 0.35; }
body.home > header, body.home > footer, main { position: relative; z-index: 1; }
body.home > header { position: sticky; }

/* ---------- reveal ------------------------------------------------------- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease-out), transform 0.9s var(--ease-out); transition-delay: var(--rd, 0ms); }
[data-reveal].is-in { opacity: 1; transform: none; }
.bento > [data-reveal]:nth-child(2n) { --rd: 70ms; }
.how > [data-reveal]:nth-child(2) { --rd: 90ms; } .how > [data-reveal]:nth-child(3) { --rd: 180ms; }
.stats > [data-reveal]:nth-child(2) { --rd: 60ms; } .stats > [data-reveal]:nth-child(3) { --rd: 120ms; } .stats > [data-reveal]:nth-child(4) { --rd: 180ms; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* ---------- nav ----------------------------------------------------------- */
.nav { position: sticky; top: 0; z-index: var(--z-sticky); height: var(--header-h); transition: background var(--dur-3), box-shadow var(--dur-3), backdrop-filter var(--dur-3); }
.nav.is-stuck { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px) saturate(1.4); box-shadow: 0 1px 0 var(--line); }
.nav-in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; text-decoration: none; }
:root[data-theme="dark"] .brand img { filter: none; }
.nav-links { display: flex; gap: var(--space-1); margin-inline: auto var(--space-2); }
.nav-links a { padding: 6px 12px; border-radius: var(--radius-pill); text-decoration: none; font-size: var(--text-md); color: var(--muted); transition: color var(--dur-2), background var(--dur-2); }
.nav-links a:hover { color: var(--ink); background: var(--accent-soft); }
.nav-end { display: flex; align-items: center; gap: var(--space-2); }
@media (max-width: 720px) { .nav-links { display: none; } }

/* ---------- hero ----------------------------------------------------------- */
.hero { padding-top: clamp(32px, 6vw, 72px); }
.hero-copy { display: grid; justify-items: center; text-align: center; gap: var(--space-5); }
.hero-pill { display: inline-flex; align-items: center; gap: 10px; padding: 5px 14px 5px 6px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface); font-size: var(--text-sm); font-weight: 520; color: var(--muted); }
.hero-pill .ui-slotnum { font-size: 12px; min-width: 1.6em; border-width: 1.5px; }
.hero-h { font-size: var(--text-hero); max-width: 14ch; font-variation-settings: "opsz" 144, "SOFT" 40, "WONK" 1; }
.hero-num { display: inline-block; vertical-align: baseline; transform: rotate(-3deg) translateY(-0.04em); margin-inline: 0.04em; }
.hero-num .ui-slotnum { font-size: 0.74em; padding: 0.02em 0.22em 0.08em; border-width: 0.07em; border-radius: 0.08em; box-shadow: 0 0.05em 0 var(--navy), var(--shadow-3); }
:root[data-theme="dark"] .hero-num .ui-slotnum { box-shadow: 0 0.05em 0 #000, var(--shadow-3); }
.hero-p { max-width: 56ch; font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.3125rem); color: var(--muted); line-height: 1.5; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); margin-top: var(--space-2); }

.hero-demo { margin-top: clamp(36px, 6vw, 72px); }
.hero-stagebox { position: relative; aspect-ratio: 1000 / 600; max-width: 1120px; margin-inline: auto; perspective: 1800px; }
.hero-tilt {
  position: absolute; inset: 0; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-4), 0 0 0 8px color-mix(in srgb, var(--surface) 40%, transparent);
  transform: translateY(var(--py, 0)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s var(--ease-out);
  will-change: transform;
}
@media (max-width: 720px) { .hero-stagebox { aspect-ratio: 4 / 5; } .hero-tilt { box-shadow: var(--shadow-3); } }

/* stage scaling shared by mini editor and tiles */
.me-stage, .vz-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; transform: translate(var(--ox, 0), var(--oy, 0)) scale(var(--s, 1)); font-family: var(--font-ui); line-height: 1.3; color: var(--ink); }
.hero-stagebox:not(.is-fit) .me-stage, .viz:not(.is-fit) .vz-stage { opacity: 0; }
.me-stage { width: 1000px; height: 600px; background: var(--surface-2); }

/* ---- mini editor chrome ---- */
.me-top { position: absolute; left: 0; right: 0; top: 0; height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 13px; z-index: 3; }
.me-logo { width: 22px; height: 22px; color: var(--navy); } :root[data-theme="dark"] .me-logo { color: var(--cream); }
.me-title { font-weight: 600; letter-spacing: -0.01em; }
.me-sp { flex: 1; }
.me-ico { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; color: var(--muted); transition: background 0.2s, color 0.2s, transform 0.3s var(--ease-spring); }
.me-ico .ui-icon { width: 16px; height: 16px; } .me-ico.me-dim { opacity: 0.4; }
.me-ico.is-hot { background: var(--accent-soft); color: var(--accent-ink); transform: scale(1.12); }
.me-zoom { font-family: var(--font-mono); font-size: 12px; color: var(--muted); padding: 0 6px; }
.me-btn { height: 28px; padding: 0 12px; display: inline-grid; place-items: center; border-radius: 8px; background: var(--navy); color: var(--cream); font-weight: 560; font-size: 12px; }
:root[data-theme="dark"] .me-btn { background: var(--cream); color: var(--navy); }
.me-status, .hs-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ok); font-weight: 540; min-width: 74px; }
.me-status i, .hs-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.me-status[data-state="saving"], .hs-status[data-state="saving"] { color: var(--warn); }
.me-status[data-state="saving"] i, .hs-status[data-state="saving"] i { animation: pulse 0.7s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: 0.25; transform: scale(0.7); } }

.me-left, .me-right { position: absolute; top: 44px; bottom: 0; background: var(--surface); z-index: 2; padding: 14px; overflow: hidden; }
.me-left { left: 0; width: 132px; border-right: 1px solid var(--line); }
.me-right { right: 0; width: 220px; border-left: 1px solid var(--line); padding: 14px 16px; }
.me-h { display: flex; justify-content: space-between; font: 500 10px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.me-h:not(:first-child) { margin-top: 18px; }
.me-h span { color: var(--faint); }
.me-thumbs { display: grid; gap: 10px; }
.me-thumb { position: relative; aspect-ratio: 0.707; width: 70px; margin-inline: auto; border-radius: 3px; background: var(--page-paper); box-shadow: 0 0 0 1px var(--line-strong), var(--shadow-1); display: grid; align-content: start; gap: 4px; padding: 6px; }
.me-thumb i { display: block; height: 11px; border-radius: 1.5px; background: var(--surface-sunk); border: 1px solid var(--navy); opacity: 0.9; }
:root[data-theme="dark"] .me-thumb i { background: #e6dfc8; }
.me-thumb em { position: absolute; bottom: -14px; left: 0; right: 0; text: center; text-align: center; font: normal 500 9px/1 var(--font-mono); color: var(--muted); }
.me-thumb.is-on { box-shadow: 0 0 0 2px var(--sel), var(--shadow-1); }
.me-thumbs { padding-bottom: 6px; }
.me-assets { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.me-assets span { aspect-ratio: 1; border-radius: 4px; background: var(--img) center/cover; box-shadow: 0 0 0 1px var(--line); }

.me-canvas { position: absolute; left: 132px; right: 220px; top: 44px; bottom: 0; background: radial-gradient(var(--line-strong) 0.8px, transparent 1px) 0 0 / 18px 18px, var(--surface-sunk); }
.me-page { position: absolute; background: var(--page-paper); box-shadow: 0 1px 2px rgb(0 0 0 / 0.12), 0 14px 34px -6px rgb(0 0 0 / 0.25); border-radius: 2px; z-index: 1; }
.me-pn { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; font: 500 11px/1 var(--font-mono); color: #8b8a92; }
.me-text { position: absolute; left: 24px; top: 20px; width: 291px; height: 36px; display: flex; align-items: center; font: 560 italic 26px/1 var(--font-display); letter-spacing: -0.02em; color: #292a35; opacity: 0; transform: translateY(4px); transition: opacity 0.25s, transform 0.4s var(--ease-spring); font-variation-settings: "opsz" 72; padding: 0 6px; margin-left: -6px; }
.me-text.is-on { opacity: 1; transform: none; }
.me-text.is-sel { box-shadow: 0 0 0 1.5px var(--sel); }
.me-caret { width: 2px; height: 26px; background: var(--guide); margin-left: 2px; opacity: 0; }
.me-text.is-sel .me-caret { opacity: 1; animation: blink 0.9s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.me-page .sl { --nfs: 30px; }
.me-guide { position: absolute; background: var(--guide); width: 1px; z-index: 6; }
.me-gv { transform-origin: top; animation: grow 0.25s var(--ease-out); }
@keyframes grow { from { transform: scaleY(0); } }
.me-gap { position: absolute; width: 8px; z-index: 6; border-top: 1px solid var(--guide); border-bottom: 1px solid var(--guide); background: color-mix(in srgb, var(--guide) 18%, transparent); }
.me-gap b { position: absolute; left: -22px; top: 50%; translate: 0 -50%; font: 600 9px/1 var(--font-mono); background: var(--guide); color: #fff; padding: 2px 4px; border-radius: 3px; }
.me-sel { position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none; box-shadow: 0 0 0 1.5px var(--sel); }
.me-sel u { position: absolute; width: 8px; height: 8px; background: #fff; border: 1.5px solid var(--sel); border-radius: 2px; }
.me-sel u:nth-child(1) { left: -4px; top: -4px; } .me-sel u:nth-child(2) { right: -4px; top: -4px; }
.me-sel u:nth-child(3) { left: -4px; bottom: -4px; } .me-sel u:nth-child(4) { right: -4px; bottom: -4px; }
.me-sel u:nth-child(5) { left: calc(50% - 4px); top: -4px; } .me-sel u:nth-child(6) { left: calc(50% - 4px); bottom: -4px; }
.me-sel u:nth-child(7) { left: -4px; top: calc(50% - 4px); } .me-sel u:nth-child(8) { right: -4px; top: calc(50% - 4px); }

.me-ins-title { display: flex; justify-content: space-between; align-items: center; font: 600 15px/1 var(--font-display); margin-bottom: 14px; }
.me-chip { font: 500 11px/1 var(--font-mono); color: var(--accent-ink); background: var(--accent-soft); padding: 4px 7px; border-radius: 99px; } .me-chip:empty { display: none; }
.me-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.me-fields label { display: flex; align-items: center; justify-content: space-between; height: 30px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 7px; font: 500 10px/1 var(--font-mono); color: var(--muted); background: var(--surface-raised); }
:root[data-theme="dark"] .me-fields label { background: var(--surface-sunk); }
.me-fields b { font-weight: 500; font-size: 12px; color: var(--ink); font-variant-numeric: tabular-nums; }
.me-segs, .vz-seg { display: flex; gap: 2px; padding: 3px; background: var(--surface-sunk); border: 1px solid var(--line); border-radius: 9px; }
.me-segs span, .vz-seg span { flex: 1; text-align: center; padding: 5px 4px; font-size: 12px; font-weight: 520; color: var(--muted); border-radius: 6px; white-space: nowrap; transition: background 0.3s, color 0.3s, box-shadow 0.3s; }
.me-segs .is-on, .vz-seg .is-on { background: var(--surface-raised); color: var(--ink); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.me-range, .vz-range { height: 4px; border-radius: 2px; background: var(--line-strong); position: relative; margin-top: 12px; }
.me-range i, .vz-range i { position: absolute; left: 0; top: 0; bottom: 0; width: 34%; background: var(--accent-strong); border-radius: 2px; transition: width 0.5s var(--ease-out); }
.me-range i::after, .vz-range i::after { content: ""; position: absolute; right: -6px; top: -4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface-raised); border: 2px solid var(--accent-strong); }
.me-layers { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.me-layers li { display: flex; align-items: center; gap: 8px; height: 26px; padding: 0 8px; border-radius: 6px; font-size: 12px; color: var(--muted); animation: li-in 0.4s var(--ease-spring); }
.me-layers li .ui-icon { width: 13px; height: 13px; }
.me-layers li.is-on { background: color-mix(in srgb, var(--sel) 16%, transparent); color: var(--ink); }
@keyframes li-in { from { opacity: 0; transform: translateX(-8px); } }

.me-cursor { position: absolute; left: 0; top: 0; width: 20px; height: 24px; z-index: 20; pointer-events: none; filter: drop-shadow(0 2px 3px rgb(0 0 0 / 0.35)); transition: opacity 0.3s, scale 0.15s; transform-origin: 2px 2px; }
.me-cursor.is-down { scale: 0.88; }
.me-ripple { position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--sel); opacity: 0; z-index: 19; pointer-events: none; }
.me-ripple.go { animation: ripple 0.55s var(--ease-out); }
@keyframes ripple { from { opacity: 0.9; scale: 0.3; } to { opacity: 0; scale: 1.6; } }
.me-fly { position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 5px; background: var(--img) center/cover; border: 2px solid #fff; box-shadow: var(--shadow-3); z-index: 15; pointer-events: none; }
.me-kbd { position: absolute; left: 50%; bottom: 22px; translate: -50% 16px; z-index: 22; display: flex; gap: 6px; opacity: 0; transition: opacity 0.25s, translate 0.45s var(--ease-spring); }
.me-kbd.is-on { opacity: 1; translate: -50% 0; }
.me-kbd b { font: 500 13px/1 var(--font-mono); padding: 8px 11px; border-radius: 8px; background: var(--navy); color: var(--cream); box-shadow: 0 3px 0 #000, var(--shadow-3); }
:root[data-theme="dark"] .me-kbd b { background: var(--cream); color: var(--navy); box-shadow: 0 3px 0 #b9b39c, var(--shadow-3); }

/* ---------- THE SLOT: the motif, shared by every vignette ------------------ */
.sl { position: absolute; overflow: hidden; background: var(--cream); border: 2px solid var(--navy); border-radius: 3px; box-shadow: var(--shadow-slot); transition: box-shadow 0.35s var(--ease-out), scale 0.35s var(--ease-spring); }
:root[data-theme="dark"] .sl { border-color: #0c0d11; }
.sl.is-empty::after { content: ""; position: absolute; inset: 4px; border: 1px dashed color-mix(in srgb, var(--rose) 50%, transparent); border-radius: 1px; pointer-events: none; }
.sl .n { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 700 var(--nfs, 28px)/1 var(--font-display); font-variation-settings: "opsz" 72, "SOFT" 0; color: var(--rose); font-variant-numeric: lining-nums; transition: left 0.6s var(--ease-spring), top 0.6s var(--ease-spring), transform 0.6s var(--ease-spring), color 0.3s; white-space: nowrap; }
.sl.is-filled { background: var(--img) center / cover; }
.sl.is-filled .n { left: 5px; top: 3px; transform: scale(0.55); transform-origin: 0 0; color: #fff; -webkit-text-stroke: 4px var(--navy); paint-order: stroke fill; }
.sl.is-pop { animation: pop 0.7s var(--ease-spring); }
@keyframes pop { 0% { scale: 0.82; filter: brightness(1.5); } 100% { scale: 1; filter: none; } }
.sl.is-sel { box-shadow: 0 0 0 1.5px var(--sel), var(--shadow-slot); }
.sl.is-drag { z-index: 8; box-shadow: 0 14px 28px -8px rgb(0 0 0 / 0.45), var(--shadow-slot); scale: 1.035; }
.sl.is-settle { animation: settle 0.5s var(--ease-spring); }
@keyframes settle { 0% { scale: 1.04; } 100% { scale: 1; } }
.sl .hd { display: none; }

/* ---------- stats --------------------------------------------------------- */
ul.stats { list-style: none; margin: clamp(48px, 8vw, 96px) 0 0; padding: var(--space-6) 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); border-top: 2px dotted var(--line-strong); }
.stats li { display: grid; gap: 2px; }
.stats b { font: 540 clamp(2rem, 1.5rem + 2vw, 3.25rem)/1 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: lining-nums tabular-nums; font-variation-settings: "opsz" 144; }
.stats li > span { color: var(--muted); font-size: var(--text-sm); max-width: 24ch; }
@media (max-width: 720px) { ul.stats { grid-template-columns: 1fr 1fr; row-gap: var(--space-6); } }

/* ---------- section scaffolding ---------------------------------------------- */
.sec { padding-top: clamp(72px, 12vw, 150px); }
.sec-h { display: grid; gap: var(--space-3); max-width: 720px; margin-bottom: clamp(28px, 4vw, 56px); }
.sec-h h2 { font-size: var(--text-4xl); }
.sec-h > p:last-child { color: var(--muted); font-size: var(--text-lg); max-width: 58ch; }
.sec-h .ui-eyebrow { color: var(--accent-ink); }

/* ---------- bento ------------------------------------------------------------- */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: minmax(400px, auto); gap: var(--space-4); }
.tile {
  position: relative; display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-5) var(--space-5) var(--space-5);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-1); overflow: hidden;
  transition: box-shadow var(--dur-3) var(--ease-out), border-color var(--dur-2), transform 0.9s var(--ease-out), opacity 0.7s var(--ease-out);
}
.tile:hover { box-shadow: var(--shadow-3); border-color: var(--line-strong); }
.tile header { display: grid; gap: 6px; position: relative; z-index: 2; }
.tile-k { font: 500 var(--text-2xs)/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-ink); }
.tile h3 { font-size: var(--text-2xl); letter-spacing: -0.02em; font-variation-settings: "opsz" 48; }
.tile header p { color: var(--muted); font-size: var(--text-md); max-width: 44ch; }
.viz { position: relative; flex: 1; min-height: 200px; overflow: hidden; border-radius: var(--radius-md); border: 1px solid var(--line); background: radial-gradient(var(--line-strong) 0.7px, transparent 1px) 0 0 / 14px 14px, var(--surface-2); }
.t-slots { grid-column: 1 / 8; grid-row: span 2; }
.t-guides { grid-column: 8 / 13; }
.t-fonts { grid-column: 8 / 13; }
.t-book { grid-column: 1 / 6; }
.t-numbers { grid-column: 6 / 10; }
.t-pdf { grid-column: 10 / 13; }
.t-bg { grid-column: 1 / 8; }
.t-history { grid-column: 8 / 13; }
.t-slots .viz { --ar: 640 / 420; }
@media (max-width: 1040px) {
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: auto; }
  .tile { grid-column: auto !important; grid-row: auto !important; }
  .t-slots, .t-bg { grid-column: 1 / -1 !important; }
  .viz { flex: none; aspect-ratio: var(--ar, 4 / 3); min-height: 0; }
  .t-guides .viz, .t-fonts .viz, .t-book .viz { --ar: 440 / 300; } .t-numbers .viz, .t-pdf .viz, .t-history .viz { --ar: 360 / 300; } .t-bg .viz { --ar: 560 / 280; }
}
@media (max-width: 680px) { .bento { grid-template-columns: 1fr; } .t-slots, .t-bg { grid-column: auto !important; } .tile { padding: var(--space-4); } }

/* generic vignette bits */
.vz-cap { font: 500 10px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.vz-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 8px; background: var(--navy); color: var(--cream); font-size: 12px; font-weight: 560; transition: transform 0.25s var(--ease-spring), background 0.3s; white-space: nowrap; }
:root[data-theme="dark"] .vz-btn { background: var(--cream); color: var(--navy); }
.vz-btn .ui-icon { width: 14px; height: 14px; }
.vz-btn.is-press { transform: scale(0.94); background: var(--accent-strong); color: #fff; }
.vz-btn.is-done { background: var(--ok); color: #fff; }
.vz-card { position: absolute; background: var(--page-paper); border-radius: 3px; box-shadow: 0 1px 2px rgb(0 0 0 / 0.1), 0 12px 28px -8px rgb(0 0 0 / 0.25); }
.vz-cursor { position: absolute; left: 0; top: 0; width: 20px; height: 24px; z-index: 20; filter: drop-shadow(0 2px 3px rgb(0 0 0 / 0.35)); will-change: transform; }

/* 1 slots */
.vz-queue { position: absolute; left: 20px; top: 20px; width: 130px; }
.vz-queue .vz-cap { margin-bottom: 10px; height: 14px; }
.vz-file { display: flex; align-items: center; gap: 6px; height: 24px; margin-bottom: 4px; padding: 0 8px; border-radius: 6px; background: var(--surface-raised); border: 1px solid var(--line-strong); font: 500 11px/1 var(--font-mono); color: var(--muted); transition: opacity 0.3s; }
.vz-file .ui-icon { width: 13px; height: 13px; } .vz-file.is-lift { z-index: 9; position: relative; color: var(--ink); box-shadow: var(--shadow-3); } .vz-file.is-gone { opacity: 0; }
.vz-paper { position: absolute; background: var(--page-paper); border-radius: 3px; box-shadow: 0 1px 2px rgb(0 0 0 / 0.1), 0 16px 34px -10px rgb(0 0 0 / 0.28); }
.vz-meter { position: absolute; left: 168px; top: 4px; display: flex; align-items: center; gap: 6px; font: 500 11px/1 var(--font-mono); color: var(--muted); }
.vz-meter b { color: var(--ink); font-weight: 600; min-width: 14px; text-align: right; }
.vz-meter i { width: 120px; height: 4px; border-radius: 2px; background: var(--line-strong); overflow: hidden; margin-left: 6px; }
.vz-meter em { display: block; height: 100%; background: var(--accent-strong); transform-origin: left; transform: scaleX(0); transition: transform 0.4s var(--ease-out); }

/* 2 guides */
.vz-g { position: absolute; background: var(--guide); z-index: 6; }
.vz-gv { width: 1px; } .vz-gh { height: 1px; }
.vz-gap { position: absolute; height: 16px; z-index: 6; border-left: 1px solid var(--guide); border-right: 1px solid var(--guide); }
.vz-gap::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--guide); }
.vz-gap b { position: absolute; left: 50%; top: 50%; translate: -50% -50%; font: 600 10px/1 var(--font-mono); background: var(--guide); color: #fff; padding: 2px 5px; border-radius: 3px; }
.vz-readout { position: absolute; right: 12px; bottom: 10px; font: 500 11px/1 var(--font-mono); color: var(--muted); padding: 5px 8px; border-radius: 6px; background: var(--surface-raised); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }

/* 3 fonts */
.vz-selbox { position: absolute; box-shadow: 0 0 0 1.5px var(--sel); }
.vz-selbox u { position: absolute; width: 8px; height: 8px; background: #fff; border: 1.5px solid var(--sel); border-radius: 2px; }
.vz-selbox u:nth-child(1) { left: -4px; top: -4px; } .vz-selbox u:nth-child(2) { right: -4px; top: -4px; } .vz-selbox u:nth-child(3) { left: -4px; bottom: -4px; } .vz-selbox u:nth-child(4) { right: -4px; bottom: -4px; }
.vz-type { position: absolute; display: grid; place-items: center; text-align: center; color: #292a35; line-height: 1; white-space: nowrap; transition: opacity 0.16s, filter 0.16s, transform 0.4s var(--ease-spring); overflow: visible; }
.vz-type.is-swap { opacity: 0.1; filter: blur(3px); transform: scale(0.96); }
.vz-card .vz-cap { position: absolute; }
.vz-line { position: absolute; height: 5px; border-radius: 3px; background: #d9d2bc; }
.vz-pop { position: absolute; padding: 12px; background: var(--surface-raised); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow-3); }
.vz-pop .vz-cap { margin-bottom: 8px; display: flex; justify-content: space-between; } .vz-pop .vz-cap b { color: var(--ink); font-weight: 600; }
.vz-opt { display: flex; align-items: center; justify-content: space-between; height: 32px; padding: 0 9px; border-radius: 7px; font-size: 15px; transition: background 0.25s, transform 0.4s var(--ease-spring); }
.vz-opt em { font: normal 500 9px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.vz-opt.is-on { background: var(--accent-soft); transform: translateX(3px); } .vz-opt.is-on em { color: var(--accent-ink); }

/* 4 book */
.bk { position: absolute; left: 70px; top: 22px; width: 300px; height: 256px; perspective: 1400px; }
.bk-left, .bk-right { position: absolute; top: 0; width: 150px; height: 256px; background: var(--page-paper); }
.bk-left { left: 0; border-radius: 3px 0 0 3px; box-shadow: -2px 2px 0 -1px var(--surface-sunk), 0 14px 28px -10px rgb(0 0 0 / 0.35); }
.bk-right { right: 0; border-radius: 0 3px 3px 0; box-shadow: 2px 2px 0 -1px var(--surface-sunk), 0 14px 28px -10px rgb(0 0 0 / 0.35); }
.bk-spine { position: absolute; left: 149px; top: 0; width: 2px; height: 256px; background: linear-gradient(90deg, rgb(0 0 0 / 0.18), transparent); z-index: 30; pointer-events: none; }
.bk-leaf { --dur: 1200ms; position: absolute; left: 150px; top: 0; width: 150px; height: 256px; transform-origin: 0 50%; transform-style: preserve-3d; transition: transform var(--dur) cubic-bezier(0.55, 0.02, 0.25, 1); }
.bk-leaf.is-flipped { transform: rotateY(-180deg); }
.bk-front, .bk-back { position: absolute; inset: 0; backface-visibility: hidden; background: var(--page-paper); overflow: hidden; }
.bk-front { border-radius: 0 3px 3px 0; box-shadow: inset 8px 0 14px -8px rgb(0 0 0 / 0.22); }
.bk-back { transform: rotateY(180deg); border-radius: 3px 0 0 3px; box-shadow: inset -8px 0 14px -8px rgb(0 0 0 / 0.22); }
.bk-face { position: absolute; inset: 0; }
.bk-art { position: absolute; left: 14px; top: 16px; right: 14px; height: 96px; background: var(--img) center/cover; border: 2px solid var(--navy); border-radius: 2px; }
.bk-art.s { top: 124px; right: 70px; height: 96px; }
.bk-fol { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; font: 500 10px/1 var(--font-mono); color: #8b8a92; }
.bk-leaf::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 3px; background: linear-gradient(90deg, rgb(0 0 0 / 0.2), transparent 40%); opacity: 0; transition: opacity var(--dur); }

/* 5 numbering */
.nm-bar { position: absolute; left: 16px; right: 16px; top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nm-bar .vz-seg { flex: none; } .nm-bar .vz-seg span { padding: 4px 8px; font-size: 11px; }
.nm-pre { display: flex; align-items: center; gap: 6px; font: 500 10px/1 var(--font-mono); color: var(--muted); text-transform: uppercase; }
.nm-pre b { display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface-raised); font-size: 12px; color: var(--ink); text-transform: none; }
.nm-grid { position: absolute; left: 16px; right: 16px; top: 54px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.nm-c { position: relative; height: 32px; display: grid; place-items: center; overflow: hidden; background: var(--cream); border: 2px solid var(--navy); border-radius: 3px; box-shadow: var(--shadow-slot); font: 700 15px/1 var(--font-display); color: var(--rose); font-variant-numeric: lining-nums tabular-nums; transition: background 0.3s, border-color 0.3s; }
:root[data-theme="dark"] .nm-c { border-color: #0c0d11; }
.nm-p { position: absolute; left: 3px; top: 3px; font: 600 7px/1 var(--font-mono); color: var(--muted); }
.nm-v { grid-area: 1 / 1; }
.nm-v.is-in { animation: roll-in 0.42s var(--ease-spring); } .nm-v.is-out { position: absolute; animation: roll-out 0.3s var(--ease-in) forwards; }
@keyframes roll-in { from { transform: translateY(100%); opacity: 0; } } @keyframes roll-out { to { transform: translateY(-100%); opacity: 0; } }
.nm-c.is-dup { background: var(--warn-soft); border-color: var(--warn); } .nm-c.is-dup .nm-v { color: var(--warn); }
:root[data-theme="dark"] .nm-c.is-dup { background: #3a2f12; border-color: var(--warn); }
.nm-foot { position: absolute; left: 16px; right: 16px; bottom: 14px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.nm-total { display: grid; } .nm-total b { font: 560 38px/0.95 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: lining-nums tabular-nums; min-width: 66px; } .nm-total span { font: 500 10px/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.nm-warn { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 99px; background: var(--warn-soft); color: var(--warn); font-size: 11px; font-weight: 560; transition: background 0.3s, color 0.3s; margin-left: auto; }
.nm-warn .ui-icon { width: 13px; height: 13px; } .nm-warn.is-ok { background: var(--ok-soft); color: var(--ok); }

/* 6 background */
.bg-spread { position: absolute; left: 24px; top: 22px; width: 340px; height: 236px; }
.bg-clip { position: absolute; inset: 0; overflow: hidden; border-radius: 3px; box-shadow: 0 1px 2px rgb(0 0 0 / 0.1), 0 16px 34px -10px rgb(0 0 0 / 0.3); background: var(--page-paper); }
.bg-img { position: absolute; left: -40px; top: 0; width: 420px; height: 236px; background: var(--img) center / cover; will-change: transform; transform-origin: 50% 50%; }
.bg-spine { position: absolute; left: 169px; top: 0; bottom: 0; width: 2px; background: linear-gradient(90deg, rgb(0 0 0 / 0.25), rgb(255 255 255 / 0.2)); z-index: 3; }
.bg-spread .sl { z-index: 4; }
.bg-ctl { position: absolute; left: 388px; top: 22px; width: 156px; display: grid; gap: 8px; align-content: start; }
.bg-ctl .vz-seg span { padding: 4px; font-size: 11px; }
.bg-row { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--muted); } .bg-row b { font: 500 11px/1 var(--font-mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.bg-ctl .vz-range { margin-top: 0; }
.bg-lock { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 11px; color: var(--ok); font-weight: 540; } .bg-lock .ui-icon { width: 14px; height: 14px; }
.t-bg .bg-spread { left: 16px; } /* spread is 340 wide, ctl at 388 */

/* 7 pdf */
.pf-stack i { position: absolute; left: 44px; top: 36px; width: 150px; height: 212px; background: var(--page-paper); border-radius: 2px; box-shadow: 0 1px 2px rgb(0 0 0 / 0.1); }
.pf-stack i:nth-child(1) { translate: 8px 8px; opacity: 0.6; } .pf-stack i:nth-child(2) { translate: 4px 4px; opacity: 0.85; }
.pf-sheet { position: absolute; left: 44px; top: 36px; width: 150px; height: 212px; background: var(--page-paper); border-radius: 2px; box-shadow: 0 1px 2px rgb(0 0 0 / 0.1), 0 16px 30px -10px rgb(0 0 0 / 0.3); transition: transform 0.9s var(--ease-in-out), opacity 0.6s; }
.pf-sheet.is-out { transform: translateX(40px) rotate(3deg); }
.pf-in { position: absolute; inset: 0; } .pf-in .sl { border-width: 1.5px; }
.pf-ln { position: absolute; height: 4px; border-radius: 2px; background: #d9d2bc; }
.pf-fol { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font: 500 9px/1 var(--font-mono); color: #8b8a92; font-variant-numeric: tabular-nums; }
.pf-crop { position: absolute; width: 8px; height: 8px; border: 0 solid #292a35; opacity: 0.7; }
.pf-crop.a { left: -12px; top: -12px; border-right-width: 1px; border-bottom-width: 1px; } .pf-crop.b { right: -12px; top: -12px; border-left-width: 1px; border-bottom-width: 1px; }
.pf-crop.c { left: -12px; bottom: -12px; border-right-width: 1px; border-top-width: 1px; } .pf-crop.d { right: -12px; bottom: -12px; border-left-width: 1px; border-top-width: 1px; }
:root[data-theme="dark"] .pf-crop { border-color: #f2ecda; }
.pf-panel { position: absolute; left: 218px; top: 36px; width: 124px; display: grid; gap: 8px; align-content: start; }
.pf-fmt { display: grid; gap: 2px; } .pf-fmt b { font: 600 22px/1 var(--font-display); } .pf-fmt span { font: 500 9px/1.3 var(--font-mono); color: var(--muted); }
.pf-prog { height: 5px; border-radius: 3px; background: var(--line-strong); overflow: hidden; margin-top: 6px; } .pf-prog i { display: block; height: 100%; background: var(--accent-strong); transform-origin: left; transform: scaleX(0); }
.pf-st { font: 500 11px/1 var(--font-mono); color: var(--muted); font-variant-numeric: tabular-nums; min-height: 12px; }
.pf-panel .vz-btn { justify-content: center; margin-top: 4px; }

/* 8 history */
.hs-head { position: absolute; left: 20px; right: 20px; top: 16px; display: flex; align-items: center; justify-content: space-between; }
.hs-list { position: absolute; left: 20px; right: 20px; top: 46px; display: grid; gap: 4px; }
.hs-row { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border-radius: 9px; background: var(--surface-raised); border: 1px solid var(--line); font-size: 12.5px; opacity: 0; transform: translateY(10px); transition: opacity 0.4s, transform 0.5s var(--ease-spring), background 0.3s, color 0.3s; }
.hs-row.is-in { opacity: 1; transform: none; }
.hs-row b { font-weight: 540; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .hs-row em { font: normal 500 10px/1 var(--font-mono); color: var(--muted); }
.hs-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hs-row.is-snap .hs-dot { border-radius: 2px; background: var(--ok); }
.hs-row.is-in.is-undone { opacity: 0.38; text-decoration: line-through; text-decoration-color: var(--muted); }
.hs-keys { position: absolute; left: 20px; right: 20px; bottom: 14px; display: flex; gap: 14px; flex-wrap: wrap; }
.hs-k { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); transition: transform 0.2s var(--ease-spring); } .hs-k i { font-style: normal; margin-left: 5px; }
.hs-k .ui-kbd { min-width: 18px; height: 18px; font-size: 9px; padding: 0 4px; transition: transform 0.15s, background 0.2s; }
.hs-k.is-hit .ui-kbd { transform: translateY(2px); background: var(--accent-soft); border-bottom-width: 1px; }

/* ---------- how ------------------------------------------------------------ */
.how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); counter-reset: s; }
.how li { display: grid; gap: var(--space-3); align-content: start; padding: var(--space-6); border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--line); position: relative; }
.how h3 { font-size: var(--text-2xl); } .how p { color: var(--muted); } .how code { font-size: 0.86em; padding: 1px 5px; border-radius: 4px; background: var(--surface-sunk); color: var(--ink); white-space: nowrap; }
.how-n { font-size: 2.4rem; margin-bottom: var(--space-3); width: fit-content; transition: transform 0.5s var(--ease-spring); }
.how li:hover .how-n { transform: rotate(-5deg) scale(1.06); }
.how li + li::before { content: ""; position: absolute; left: -17px; top: 56px; width: 18px; border-top: 2px dotted var(--line-strong); }
@media (max-width: 860px) { .how { grid-template-columns: 1fr; } .how li + li::before { display: none; } }

/* ---------- import table ----------------------------------------------------- */
.imp-sec { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 72px); align-items: center; padding-top: clamp(48px, 8vw, 96px); }
.imp-copy { display: grid; gap: var(--space-3); } .imp-copy h2 { font-size: var(--text-3xl); } .imp-copy p:last-child { color: var(--muted); font-size: var(--text-lg); }
.imp-copy .ui-eyebrow { color: var(--accent-ink); }
.imp { padding: var(--space-2); overflow-x: auto; box-shadow: var(--shadow-3); border-radius: var(--radius-xl); }
.imp table { width: 100%; border-collapse: separate; border-spacing: 0 2px; font-size: var(--text-sm); min-width: 480px; }
.imp th { text-align: left; padding: 10px 14px; font: 500 var(--text-2xs)/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.imp td { padding: 12px 14px; background: transparent; transition: background 0.3s, color 0.3s; white-space: nowrap; }
.imp td:first-child { border-radius: 10px 0 0 10px; } .imp td:last-child { border-radius: 0 10px 10px 0; }
.imp td:nth-child(2) { color: var(--muted); }
.imp code { font-weight: 500; padding: 3px 7px; background: var(--surface-sunk); border-radius: 5px; } .imp small { color: var(--muted); margin-left: 4px; }
.imp-row.is-scan td { background: color-mix(in srgb, var(--sel) 12%, transparent); }
.imp-r { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 11px 0 9px; border-radius: 99px; font-weight: 540; opacity: 0.55; transform: translateX(-6px); transition: opacity 0.4s, transform 0.5s var(--ease-spring); }
.imp-r i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.imp-r.ok { background: var(--ok-soft); color: var(--ok); } .imp-r.bg { background: var(--accent-soft); color: var(--accent-ink); } .imp-r.warn { background: var(--warn-soft); color: var(--warn); }
.imp-row.is-done .imp-r { opacity: 1; transform: none; }
@media (max-width: 860px) { .imp-sec { grid-template-columns: 1fr; } }

/* ---------- numbering lab ---------------------------------------------------- */
.num-lab { padding: var(--space-5); display: grid; gap: var(--space-5); border-radius: var(--radius-xl); box-shadow: var(--shadow-3); background: var(--surface); overflow: hidden; }
.num-ctl { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-4); }
.num-ctl fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.num-ctl legend { padding: 0; margin-bottom: 6px; }
.num-ctl .ui-input { width: 92px; }
.num-presets { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.num-out { display: grid; gap: 4px; margin-left: auto; text-align: right; justify-items: end; }
.num-out b { font-size: var(--text-xl); font-weight: 600; }
.tpl-wrap { margin-inline: calc(var(--space-5) * -1); padding: var(--space-5) var(--space-5) var(--space-4); background: radial-gradient(var(--line-strong) 0.8px, transparent 1px) 0 0 / 18px 18px, var(--surface-sunk); border-block: 1px solid var(--line); margin-bottom: calc(var(--space-5) * -1); overflow: hidden; }
.tpl-strip { display: flex; gap: var(--space-5); overflow-x: auto; padding: var(--space-4) var(--space-2) var(--space-5); scroll-snap-type: x proximity; scrollbar-width: thin; }
.tpl-page { flex: none; margin: 0; scroll-snap-align: start; display: grid; gap: 10px; transition: transform 0.5s var(--ease-spring), opacity 0.7s var(--ease-out); }
.tpl-page:hover { transform: translateY(-6px) rotate(-0.6deg); }
.tpl-page figcaption { text-align: center; font: 500 var(--text-2xs)/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tpl-in, .tpl-cv { position: relative; width: 150px; height: 212px; border-radius: 2px; background: var(--page-paper); box-shadow: 0 1px 2px rgb(0 0 0 / 0.12), 0 14px 30px -10px rgb(0 0 0 / 0.3); overflow: hidden; }
.tpl-in.has-bg::before { content: ""; position: absolute; inset: 0; background: var(--bg-img) center / cover; opacity: 0.95; }
.tpl-cv { background: var(--navy); color: var(--cream); display: grid; align-content: space-between; padding: 18px; }
.tpl-cv .ui-eyebrow { color: color-mix(in srgb, var(--cream) 65%, transparent); }
.tpl-cv b { font: 600 30px/0.95 var(--font-display); letter-spacing: -0.03em; font-variation-settings: "opsz" 144, "SOFT" 40; }
.tpl-cv i { width: 36px; height: 3px; background: var(--rose); border-radius: 2px; }
.tpl-slot { position: absolute; display: grid; place-items: center; background: var(--img) center / cover; border: 2px solid var(--navy); border-radius: 2px; overflow: hidden; }
.tpl-slot span { font: 700 var(--fs, 19px)/1 var(--font-display); color: #fff; -webkit-text-stroke: 3px var(--navy); paint-order: stroke fill; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.tpl-slot span.is-tick { animation: tick 0.5s var(--ease-spring) both; animation-delay: var(--d, 0ms); }
@keyframes tick { 0% { transform: translateY(60%) scale(0.7); opacity: 0; } 100% { transform: none; opacity: 1; } }
.tpl-cluster { position: absolute; left: 14px; top: 14px; width: 122px; height: 178px; background: var(--img) center / cover; border: 2px solid var(--navy); border-radius: 2px; z-index: 0; }
.tpl-slot.is-cl { background: none; border: 0; border-right: 1px solid rgb(255 255 255 / 0.55); border-bottom: 1px solid rgb(255 255 255 / 0.55); border-radius: 0; z-index: 1; }
.tpl-slot.is-cl:nth-of-type(2n) { border-right: 0; }
.tpl-fol { position: absolute; bottom: 5px; left: 0; right: 0; text-align: center; font: 500 8px/1 var(--font-mono); color: #8b8a92; z-index: 3; }
.tpl-cluster ~ .tpl-slot.is-cl { margin: 0; }

/* ---------- CTA + footer ------------------------------------------------------ */
.cta { padding-block: clamp(72px, 12vw, 150px) clamp(56px, 8vw, 96px); }
.cta-in { position: relative; display: grid; justify-items: center; text-align: center; gap: var(--space-5); padding: clamp(40px, 8vw, 96px) var(--space-5); border-radius: calc(var(--radius-xl) + 8px); background: var(--navy); color: var(--cream); overflow: hidden; isolation: isolate; box-shadow: var(--shadow-4); }
:root[data-theme="dark"] .cta-in { background: #20212c; box-shadow: var(--shadow-4), 0 0 0 1px var(--line); }
.cta-in::before { content: ""; position: absolute; inset: 14px; border: 2px dashed color-mix(in srgb, var(--cream) 22%, transparent); border-radius: calc(var(--radius-xl) + 2px); z-index: -1; } /* perforation: a sticker sheet edge */
.cta-in h2 { font-size: var(--text-4xl); max-width: 16ch; } .cta-in p { color: color-mix(in srgb, var(--cream) 72%, transparent); max-width: 46ch; font-size: var(--text-lg); }
.cta-sl .ui-slotnum { font-size: clamp(2.2rem, 5vw, 3.4rem); transform: rotate(-4deg); transition: transform 0.7s var(--ease-spring); border-color: #0c0d11; }
.cta-in:hover .cta-sl .ui-slotnum { transform: rotate(3deg) scale(1.06); }
.cta-in .ui-btn--primary { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-strong) 30%, transparent); }
.foot { border-top: 2px dotted var(--line-strong); padding: var(--space-7) 0 var(--space-8); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5) var(--space-7); }
.foot p { color: var(--muted); font-size: var(--text-sm); flex: 1; min-width: 220px; }
.foot nav { display: flex; gap: var(--space-5); } .foot nav a { color: var(--muted); font-size: var(--text-sm); text-decoration: none; } .foot nav a:hover { color: var(--ink); }
.foot .brand { font-size: 1.1rem; }

@media (prefers-reduced-motion: reduce) { .hero-tilt, .tile, .tpl-page { transition: none; } }

/* narrow phones: the language switch needs room, so the (duplicated) header "Log in" link and button arrow give way */
@media (max-width: 520px) {
  .nav-in { gap: var(--space-2); }
  .nav-end { gap: var(--space-1); }
  .nav-end [data-login-link], .nav-end .ui-btn__arrow { display: none; }
}
@media (max-width: 460px) { html[lang="hr"] .nav .brand > span { display: none; } }
