/* alau.dev v2 — one stylesheet, two themes, no build step. */

:root {
    --shell: 1180px;
    --radius: 14px;
    --radius-sm: 8px;
    --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-display: "Inter Tight", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
    --mono: "JetBrains Mono", "Cascadia Code", "Cascadia Mono", ui-monospace, Consolas, monospace;
    --ease: cubic-bezier(.2, .8, .2, 1);
}
[data-theme="dark"] {
    --bg: #0c0f0d; --bg-2: #101411; --surface: #131815; --surface-2: #19201b;
    --line: #232b26; --line-2: #333d37;
    --text: #e9efe9; --muted: #95a199; --dim: #616d65;
    --green: #7de3a6; --green-bg: rgba(125, 227, 166, .1);
    --orange: #ff9469; --orange-bg: rgba(255, 148, 105, .1);
    --blue: #8fb6ff; --danger: #ff8080;
    --glow: rgba(125, 227, 166, .09);
    --grid: rgba(255, 255, 255, .025);
    --shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
    color-scheme: dark;
}
[data-theme="light"] {
    --bg: #f6f4ee; --bg-2: #efece4; --surface: #fffdf8; --surface-2: #f4f1e9;
    --line: #e2ded3; --line-2: #cdc8bb;
    --text: #1a201c; --muted: #58615a; --dim: #8b918c;
    --green: #22744a; --green-bg: rgba(34, 116, 74, .09);
    --orange: #ad4c2c; --orange-bg: rgba(173, 76, 44, .08);
    --blue: #2f55ad; --danger: #b3261e;
    --glow: rgba(173, 76, 44, .07);
    --grid: rgba(0, 0, 0, .035);
    --shadow: 0 30px 60px -35px rgba(40, 30, 10, .35);
    color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
    margin: 0; min-height: 100vh; padding-bottom: 30px;
    background:
        radial-gradient(1200px 500px at 75% -10%, var(--glow), transparent 70%),
        linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 100% 48px,
        linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 48px 100%,
        var(--bg);
    background-attachment: fixed;
    color: var(--text); font: 16px/1.65 var(--font);
    -webkit-font-smoothing: antialiased;
    transition: background-color .3s, color .3s;
}
::selection { background: var(--green); color: var(--bg); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }
kbd {
    display: inline-block; min-width: 1.6em; padding: 0 .4em; border: 1px solid var(--line-2); border-bottom-width: 2px;
    border-radius: 5px; font: 600 .72em/1.6 var(--mono); color: var(--muted); text-align: center; background: var(--surface);
}
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 8px; background: var(--green); color: var(--bg); font-weight: 600; }
.skip-link:focus { top: 12px; }
.noscript { margin: 0; padding: 10px; text-align: center; background: var(--orange-bg); color: var(--orange); font-size: 14px; }
.shell { width: min(100% - 48px, var(--shell)); margin-inline: auto; }

/* ---------- type ---------- */
.eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font: 500 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.display { font: 650 clamp(42px, 6.4vw, 84px)/1.02 var(--font-display); letter-spacing: -.045em; }
.display em, .display .rotator { font-style: normal; color: var(--green); }
.lead { max-width: 58ch; font-size: clamp(16px, 1.4vw, 18px); color: var(--muted); }
h2 { font: 620 clamp(24px, 2.6vw, 34px)/1.15 var(--font-display); letter-spacing: -.03em; }
h3 { font: 600 18px/1.3 var(--font-display); letter-spacing: -.01em; }
.pulse { position: relative; display: inline-block; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--green); }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--green); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3.2); opacity: 0; } }
.link { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; font-size: 14px; color: var(--green); border-bottom: 1px solid transparent; transition: border-color .2s; }
.link:hover { border-color: currentColor; }
.link-btn { padding: 0; border: 0; background: none; color: var(--green); font-size: 13px; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 20px;
    border: 1px solid transparent; border-radius: 10px; font-size: 14px; font-weight: 600; white-space: nowrap;
    transition: transform .15s var(--ease), background-color .2s, border-color .2s, color .2s;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover:not(:disabled) { background: var(--green); }
.btn-ghost { border-color: var(--line-2); background: var(--surface); }
.btn-ghost:hover:not(:disabled) { border-color: var(--green); color: var(--green); }
.btn kbd { margin-left: 2px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); }
.topbar-inner { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 19px var(--font-display); letter-spacing: -.03em; }
.brand-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 1px solid #2c3530; border-radius: 9px; background: #0c0f0d; color: #e9efe9; font: 700 17px var(--mono); }
.brand-mark span { color: #7de3a6; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.brand-name span { color: var(--dim); font-weight: 500; }
.nav { display: flex; gap: 4px; margin-right: auto; }
.nav a { position: relative; padding: 8px 12px; border-radius: 8px; font-size: 14px; color: var(--muted); transition: color .2s, background-color .2s; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -15px; height: 2px; border-radius: 2px; background: var(--green); view-transition-name: nav-indicator; }
.nav-num { margin-right: 6px; font: 11px var(--mono); color: var(--dim); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.site-switch { padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; font: 12px var(--mono); color: var(--muted); }
.site-switch:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn { display: inline-grid; place-items: center; grid-auto-flow: column; gap: 4px; height: 36px; min-width: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--muted); }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.icon-btn kbd { border: 0; background: none; padding: 0; min-width: 0; font-size: 12px; }
[data-theme="dark"] .icon-moon, [data-theme="light"] .icon-sun { display: none; }
.menu-btn { display: none; }
.menu-btn span { display: block; width: 16px; height: 1.5px; background: currentColor; transition: transform .2s; }
.menu-btn span + span { margin-top: 5px; }
.menu-btn { grid-auto-flow: row; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* ---------- views ---------- */
main { display: block; outline: none; }
.js .view:not(.is-active) { display: none; }
.view { padding-bottom: 96px; }
html:not(.js) .view + .view { border-top: 1px solid var(--line); padding-top: 40px; }
.page-head { padding: 88px 0 56px; }
.page-head .lead { margin-top: 26px; }
.section-head { margin: 96px 0 28px; }
.section-head .eyebrow { margin-bottom: 10px; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.view.is-active .page-head, .view.is-active .hero { animation: rise .6s var(--ease) both; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; padding: 88px 0 72px; }
.hero .display { font-size: clamp(42px, 5.6vw, 76px); }
.rotator { display: inline-block; white-space: nowrap; }
.rotator.is-out { animation: word-out .35s var(--ease) forwards; }
.rotator.is-in { animation: word-in .45s var(--ease); }
@keyframes word-out { to { opacity: 0; transform: translateY(-.25em); filter: blur(6px); } }
@keyframes word-in { from { opacity: 0; transform: translateY(.3em); filter: blur(6px); } }
.hero .lead { margin-top: 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-facts { display: grid; grid-template-columns: repeat(3, auto); gap: 32px; justify-content: start; margin: 48px 0 0; padding-top: 24px; border-top: 1px dashed var(--line-2); }
.hero-facts dt { font: 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--dim); }
.hero-facts dd { margin: 4px 0 0; font-size: 14px; font-weight: 600; }

/* ---------- terminal ---------- */
.term { overflow: hidden; border: 1px solid var(--line-2); border-radius: var(--radius); background: #0a0d0b; color: #d6e2d9; box-shadow: var(--shadow); font: 13.5px/1.6 var(--mono); }
[data-theme="light"] .term { border-color: #20262280; }
.term-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid #1d2420; background: #0f1311; }
.dots { display: flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #2c3530; }
.dots i:nth-child(1) { background: #ff6b5f; } .dots i:nth-child(2) { background: #febc2e; } .dots i:nth-child(3) { background: #28c840; }
.term-title { flex: 1; color: #7d8a82; font-size: 12px; text-align: center; }
.term-hint { color: #5d6a62; font-size: 11px; } .term-hint b { color: #7de3a6; font-weight: 500; }
.term-body { height: 420px; overflow-y: auto; padding: 18px 18px 22px; scrollbar-width: thin; scrollbar-color: #2c3530 transparent; cursor: text; }
.term-out > * { min-height: 1.6em; margin: 0; white-space: pre-wrap; word-break: break-word; }
.term-line { display: flex; gap: 10px; align-items: baseline; }
.term-line label { flex: none; white-space: nowrap; }
.term-line input { flex: 1; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: #eef5ef; caret-color: #7de3a6; font: inherit; }
.p-user { color: #7de3a6; } .p-sep { color: #5d6a62; } .p-path { color: #8fb6ff; } .p-sign { margin: 0 .5ch 0 .2ch; color: #5d6a62; }
.t-dim { color: #6e7b73; } .t-err { color: #ff8080; } .t-ok { color: #7de3a6; } .t-acc { color: #ff9469; } .t-blue { color: #8fb6ff; }
.t-cmd a, .term-out a { color: #8fb6ff; text-decoration: underline; text-underline-offset: 3px; }
.t-art { color: #7de3a6; line-height: 1.25; }

/* ---------- home cards ---------- */
.now-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.now-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .25s, transform .25s var(--ease); }
.now-card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.now-card p { color: var(--muted); font-size: 14px; }
.now-card strong { font: 600 19px/1.3 var(--font-display); }
.now-label { display: flex; align-items: center; gap: 10px; font: 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--green); }
.now-go { position: absolute; top: 22px; right: 24px; color: var(--dim); transition: transform .25s var(--ease), color .25s; }
.now-card:hover .now-go { transform: translateX(4px); color: var(--green); }

.toolchain { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); counter-reset: tc; }
.toolchain > li { position: relative; padding: 24px 22px 26px; counter-increment: tc; }
.toolchain > li + li { border-left: 1px solid var(--line); }
.toolchain > li + li::before { content: "›"; position: absolute; left: -9px; top: 22px; display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); color: var(--dim); font-size: 12px; line-height: 1; }
.tc-stage { display: block; margin-bottom: 14px; font: 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.tc-stage::before { content: "0" counter(tc) " "; color: var(--green); }
.toolchain ul li { font-weight: 550; font-size: 15px; padding: 3px 0; }

/* ---------- panels & case study ---------- */
.panel { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.panel-head h2, .panel-head h3 { font: 620 clamp(20px, 2vw, 26px)/1.2 var(--font-display); letter-spacing: -.02em; }
.panel-index { display: block; margin-bottom: 6px; font: 12px var(--mono); color: var(--green); letter-spacing: .04em; }
.panel-caption { margin-top: 18px; color: var(--muted); font-size: 13.5px; }
.case { display: grid; gap: 16px; }
.case-head { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; padding: 36px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(135deg, var(--surface-2), var(--surface)); }
.case-head h2 { margin-bottom: 14px; }
.case-head p { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 22px 0 24px; }
.chips li { padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 99px; font: 12px var(--mono); color: var(--muted); }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); align-self: start; }
.metrics > div { padding: 18px 20px; background: var(--surface); }
.metrics dt { font: 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--dim); }
.metrics dd { margin: 6px 0 2px; font: 650 28px/1.1 var(--font-display); letter-spacing: -.03em; }
.metrics span { font-size: 12.5px; color: var(--muted); }

.session-toggle { display: inline-flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--bg-2); font-size: 14px; }
.st-track { position: relative; width: 42px; height: 24px; border-radius: 99px; background: var(--line-2); transition: background-color .3s; }
.st-thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text); transition: transform .35s var(--ease); }
.session-toggle[aria-checked="true"] .st-track { background: var(--green); }
.session-toggle[aria-checked="true"] .st-thumb { transform: translateX(18px); background: var(--bg); }
.st-label b { font-family: var(--mono); color: var(--dim); }
.session-toggle[aria-checked="true"] .st-label b { color: var(--green); }

.arch { display: grid; grid-template-columns: 1fr 40px 1fr 40px 1fr; align-items: stretch; }
.layer { position: relative; padding: 22px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg-2); transition: opacity .5s, border-color .5s, filter .5s, box-shadow .5s; }
.layer strong { display: block; margin: 8px 0 12px; font: 600 19px var(--font-display); }
.layer li { padding: 3px 0; color: var(--muted); font-size: 14px; }
.layer li::before { content: "— "; color: var(--dim); }
.layer-tag { font: 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--dim); }
.layer-link { align-self: center; height: 2px; background: repeating-linear-gradient(90deg, var(--line-2) 0 6px, transparent 6px 10px); }
.layer-found { border-color: color-mix(in srgb, var(--blue) 40%, var(--line-2)); }
.layer-found .layer-tag { color: var(--blue); }
.layer-ghost { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; border-radius: 12px; background: color-mix(in srgb, var(--bg-2) 70%, transparent); font: 12px var(--mono); color: var(--dim); text-align: center; transition: opacity .5s; }
.arch[data-session="off"] .layer-session { border-style: dashed; }
.arch[data-session="off"] .layer-session > :not(.layer-ghost) { opacity: .35; filter: grayscale(1); }
.arch[data-session="on"] .layer-ghost { opacity: 0; pointer-events: none; }
.arch[data-session="on"] .layer-session { border-color: var(--green); box-shadow: 0 0 0 4px var(--green-bg), 0 0 40px -10px var(--green); }
.arch[data-session="on"] .layer-session .layer-tag { color: var(--green); }
.arch[data-session="on"] .layer-link-session { background: repeating-linear-gradient(90deg, var(--green) 0 6px, transparent 6px 10px) 0 0 / 20px 2px; animation: flow 0.6s linear infinite; }
@keyframes flow { to { background-position: 20px 0; } }

.step-tabs { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.step-tabs button { display: flex; align-items: baseline; gap: 10px; padding: 12px 4px 16px; border: 0; background: none; color: var(--muted); font-weight: 600; text-align: left; }
.step-tabs button span { font: 12px var(--mono); color: var(--dim); }
.step-tabs button[aria-selected="true"] { color: var(--text); }
.step-tabs button[aria-selected="true"] span { color: var(--green); }
.step-progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 25%; background: var(--green); transition: transform .45s var(--ease); }
.step-panel { padding-top: 24px; animation: rise .4s var(--ease); }
.step-panel h4 { margin-bottom: 8px; font: 600 20px var(--font-display); }
.step-panel p { max-width: 70ch; color: var(--muted); }
.cmd { display: inline-block; margin-top: 18px; padding: 8px 14px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); font: 13px var(--mono); color: var(--green); }

.flow { display: flex; flex-wrap: wrap; gap: 10px 0; align-items: stretch; }
.flow li { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 12px 16px; margin-right: 30px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); font-size: 14px; font-weight: 600; }
.flow li small { font: 400 11.5px var(--mono); color: var(--dim); }
.flow li:not(:last-child)::after { content: "→"; position: absolute; right: -23px; top: 50%; transform: translateY(-50%); color: var(--green); font-weight: 400; }
.flow li:last-child { margin-right: 0; }
.flow-loop { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; padding: 10px 14px; border: 1px dashed var(--orange); border-radius: 10px; color: var(--orange); background: var(--orange-bg); font-size: 14px; }
.flow-clock { font: 600 12px var(--mono); }
.caution { padding: 18px 22px; border-left: 3px solid var(--orange); border-radius: 0 10px 10px 0; background: var(--orange-bg); color: var(--muted); font-size: 14.5px; }
.caution strong { color: var(--text); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .25s, transform .25s var(--ease); }
.card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.card p:not(.card-meta) { flex: 1; color: var(--muted); font-size: 14.5px; }
.card-meta { font: 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin-top: 8px; }
.card-art { display: flex; align-items: center; justify-content: center; gap: 14px; height: 150px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.art-web span { font: 700 34px var(--mono); color: var(--dim); }
.art-web span:last-child { color: var(--green); }
.art-audio { gap: 5px; }
.art-audio i { width: 6px; border-radius: 3px; background: var(--orange); animation: eq 1.2s ease-in-out infinite alternate; }
.art-audio i:nth-child(odd) { background: var(--green); }
.art-audio i:nth-child(1) { animation-delay: -.2s; } .art-audio i:nth-child(2) { animation-delay: -.5s; } .art-audio i:nth-child(3) { animation-delay: -.9s; }
.art-audio i:nth-child(4) { animation-delay: -.1s; } .art-audio i:nth-child(5) { animation-delay: -.7s; } .art-audio i:nth-child(6) { animation-delay: -.3s; }
.art-audio i:nth-child(7) { animation-delay: -1s; } .art-audio i:nth-child(8) { animation-delay: -.4s; } .art-audio i:nth-child(9) { animation-delay: -.8s; }
.art-audio i:nth-child(10) { animation-delay: -.6s; } .art-audio i:nth-child(11) { animation-delay: -.15s; } .art-audio i:nth-child(12) { animation-delay: -.95s; }
@keyframes eq { from { height: 12px; } to { height: 84px; } }
.art-vinyl span { width: 112px; height: 112px; border-radius: 50%; background: radial-gradient(circle, var(--orange) 0 16%, #111 17% 19%, #1c1c1c 20%, #111 24%, #1c1c1c 28%, #111 36%, #1c1c1c 44%, #111 60%, #1a1a1a 70%); animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }

/* ---------- homelab ---------- */
.hops-wrap { position: relative; }
.hops { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.hops li { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 44px 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); transition: border-color .3s, background-color .3s; }
.hops strong { font-size: 15px; }
.hops small { font: 12px var(--mono); color: var(--dim); word-break: break-word; }
.hop-dot { position: absolute; top: 16px; left: 14px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-2); transition: all .3s; }
.hops li.is-hit { border-color: var(--green); background: var(--green-bg); }
.hops li.is-hit .hop-dot { border-color: var(--green); background: var(--green); box-shadow: 0 0 0 5px var(--green-bg); }
.hops li.is-hit small { color: var(--text); }
.hops li.is-skip { border-style: dashed; border-color: var(--line-2); background: none; opacity: .6; }
.hops li.is-skip .hop-dot { border-color: var(--dim); background: none; box-shadow: none; }
.packet { position: absolute; top: 18px; left: 16px; z-index: 1; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 14px 2px var(--orange); opacity: 0; pointer-events: none; }
.trace-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 20px 0 0; }
.trace-stats div { padding: 14px 16px; border-radius: 10px; border: 1px dashed var(--line-2); }
.trace-stats dt { font: 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--dim); }
.trace-stats dd { margin: 4px 0 0; font: 600 22px var(--mono); letter-spacing: -.02em; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.split .panel + .panel { margin-top: 0; }
.pipeline { margin-bottom: 20px; }
.pipeline li { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.pipeline li:first-child { border-top: 0; padding-top: 0; }
.pipeline h3 { font-size: 16px; } .pipeline p { color: var(--muted); font-size: 14px; }
.pl-n { font: 13px var(--mono); color: var(--green); }
.pl-tag { padding: 3px 9px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); font: 11px var(--mono); color: var(--muted); }
.services li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); }
.services li:first-child { border-top: 0; padding-top: 0; }
.services strong { font: 600 15px var(--mono); }
.services p { color: var(--muted); font-size: 13.5px; }
.svc-state { flex: none; margin-top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-bg); }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.about-copy { display: flex; flex-direction: column; gap: 20px; }
.about-copy .lead { color: var(--text); font-size: 20px; }
.about-copy p { color: var(--muted); }
.principles { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.principles li { display: grid; grid-template-columns: 44px 1fr; column-gap: 8px; padding: 22px 24px; background: var(--surface); }
.principles span { grid-row: span 2; font: 13px var(--mono); color: var(--green); padding-top: 2px; }
.principles p { color: var(--muted); font-size: 14.5px; }

/* ---------- music ---------- */
.deck { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.deck-player { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.screen { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: #000; }
.screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.screen-poster { position: absolute; inset: 0; padding: 0; border: 0; background: #000; }
.screen-poster img { width: 100%; height: 100%; object-fit: cover; opacity: .75; transition: opacity .3s, transform .6s var(--ease); }
.screen-poster:hover img { opacity: .9; transform: scale(1.02); }
.poster-play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 76px; height: 76px; margin: -38px 0 0 -38px; padding-left: 5px; border-radius: 50%; background: var(--green); color: #0c0f0d; font-size: 26px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); transition: transform .25s var(--ease); }
.screen-poster:hover .poster-play { transform: scale(1.08); }
.deck-controls { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.now-playing { display: inline-flex; align-items: center; gap: 12px; font: 13px var(--mono); color: var(--muted); }
.vinyl { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle, var(--orange) 0 18%, #111 19% 24%, #262626 25%, #111 40%, #262626 55%, #111 70%); }
.vinyl.is-spinning { animation: spin 2.2s linear infinite; }
.deck-buttons { display: flex; gap: 8px; }
.deck-buttons .btn-ghost { padding: 0 14px; }
.deck-player .panel-caption { margin-top: 12px; }
.queue { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.queue-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.queue-head h2 { font-size: 18px; }
.queue-list { display: grid; gap: 6px; max-height: 520px; overflow-y: auto; scrollbar-width: thin; }
.queue-list button { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; width: 100%; padding: 6px; border: 1px solid transparent; border-radius: 10px; background: none; text-align: left; transition: background-color .2s, border-color .2s; }
.queue-list button:hover { background: var(--surface-2); border-color: var(--line); }
.queue-list button[aria-current="true"] { border-color: var(--green); background: var(--green-bg); }
.queue-list img { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: var(--bg-2); }
.queue-list span { font: 12.5px var(--mono); color: var(--muted); }
.queue-list b { display: block; color: var(--text); font: 600 14px var(--font); }

/* ---------- convert ---------- */
.convert { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.convert .panel + .panel { margin-top: 0; }
.form { display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; }
.field input { width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); font-family: var(--mono); font-size: 14px; transition: border-color .2s, box-shadow .2s; }
.field input:focus { outline: 0; border-color: var(--green); box-shadow: 0 0 0 4px var(--green-bg); }
.hint { color: var(--dim); font-size: 13px; }
.form .btn { justify-self: start; }
.form .panel-caption { margin-top: -6px; min-height: 1.5em; }
.lib-list li { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.lib-list li:first-child { border-top: 0; }
.lib-list strong { display: block; font-size: 15px; }
.lib-list p { font: 12.5px var(--mono); color: var(--muted); }
.lib-list [data-state="failed"] p { color: var(--danger); }
.lib-list [data-state="converting"] p { color: var(--orange); }
.lib-list [data-state="ready"] p { color: var(--green); }

/* ---------- footer & status bar ---------- */
.footer { border-top: 1px solid var(--line); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; padding: 48px 0 40px; }
.footer-inner p { margin-top: 12px; color: var(--muted); font-size: 14px; }
.footer-links { display: flex; gap: 24px; align-items: start; font-size: 14px; }
.footer-links a:hover { color: var(--green); }
.footer-copy { grid-column: 1 / -1; font: 12px var(--mono); color: var(--dim) !important; }
.statusbar { position: fixed; inset: auto 0 0; z-index: 30; display: flex; gap: 2px; height: 28px; padding: 0 10px; align-items: center; border-top: 1px solid var(--line); background: var(--bg-2); font: 11.5px var(--mono); color: var(--muted); }
.sb-item { display: inline-flex; align-items: center; gap: 7px; padding: 0 8px; white-space: nowrap; }
.sb-item .pulse { width: 6px; height: 6px; }
.sb-branch { color: var(--green); }
.sb-spacer { flex: 1; }
.statusbar kbd { font-size: 10px; margin-right: -3px; }

/* ---------- command palette ---------- */
.palette { width: min(640px, calc(100% - 32px)); max-height: min(520px, 80vh); margin: 12vh auto auto; padding: 0; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .7); overflow: hidden; }
.palette[open] { animation: pop .22s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.palette::backdrop { background: rgba(5, 8, 6, .55); backdrop-filter: blur(4px); }
.palette-inner { display: flex; flex-direction: column; max-height: inherit; }
.palette-search { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); font: 18px var(--mono); color: var(--green); }
.palette-search input { flex: 1; border: 0; outline: 0; background: none; font: 16px var(--font); }
.palette-list { overflow-y: auto; padding: 8px; }
.palette-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; cursor: pointer; font-size: 14.5px; }
.palette-list li[aria-selected="true"] { background: var(--green-bg); color: var(--text); box-shadow: inset 2px 0 0 var(--green); }
.palette-list .pi-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--bg-2); border: 1px solid var(--line); font: 12px var(--mono); color: var(--muted); }
.palette-list .pi-group { margin-left: auto; font: 11px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.palette-empty { padding: 20px; color: var(--dim); text-align: center; font-size: 14px; }

/* ---------- 404 ---------- */
.lost-main { display: grid; justify-items: start; gap: 22px; padding: 12vh 0; }
.lost-term { width: min(100%, 620px); }
.lost-term .term-body { height: auto; }
.lost-term p { margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
    .nav-num { display: none; }
    .site-switch { display: none; }
    .toolchain { grid-template-columns: repeat(3, 1fr); }
    .toolchain > li:nth-child(4) { border-left: 0; }
    .toolchain > li:nth-child(n + 4) { border-top: 1px solid var(--line); }
    .toolchain > li:nth-child(4)::before { display: none; }
}
@media (max-width: 920px) {
    .topbar-inner { gap: 12px; justify-content: space-between; }
    .menu-btn { display: inline-grid; }
    .js .nav { position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; padding: 12px 24px 20px; border-bottom: 1px solid var(--line); background: var(--bg); }
    .js .nav.is-open { display: flex; animation: rise .25s var(--ease); }
    html:not(.js) .nav { display: none; }
    .nav a { padding: 12px; font-size: 16px; }
    .nav a[aria-current="page"]::after { left: 0; right: auto; top: 12px; bottom: 12px; width: 2px; height: auto; }
    .hero, .case-head, .about-grid, .deck, .convert, .split { grid-template-columns: 1fr; }
    .hero { gap: 40px; padding-top: 56px; }
    .term-body { height: 360px; }
    .now-grid, .cards { grid-template-columns: 1fr; }
    .arch { grid-template-columns: 1fr; grid-template-rows: auto 28px auto 28px auto; }
    .layer-link { justify-self: center; width: 2px; height: 100%; background: repeating-linear-gradient(180deg, var(--line-2) 0 6px, transparent 6px 10px); }
    .arch[data-session="on"] .layer-link-session { background: repeating-linear-gradient(180deg, var(--green) 0 6px, transparent 6px 10px) 0 0 / 2px 20px; animation: flow-v .6s linear infinite; }
    .hops { grid-template-columns: 1fr; }
    .hops li { padding: 14px 14px 14px 44px; }
    .hop-dot { top: 18px; }
    .trace-stats { grid-template-columns: 1fr 1fr; }
    .page-head { padding: 56px 0 40px; }
}
@keyframes flow-v { to { background-position: 0 20px; } }
@media (max-width: 560px) {
    .shell { width: min(100% - 32px, var(--shell)); }
    .hero-facts { grid-template-columns: 1fr 1fr; gap: 18px; }
    .toolchain { grid-template-columns: 1fr 1fr; }
    .toolchain > li { border-left: 0 !important; border-top: 1px solid var(--line); }
    .toolchain > li:nth-child(-n + 2) { border-top: 0; }
    .toolchain > li:nth-child(even) { border-left: 1px solid var(--line) !important; }
    .toolchain > li::before { display: none; }
    .metrics { grid-template-columns: 1fr; }
    .case-head, .panel { padding: 20px; }
    .step-tabs button { flex-direction: column; gap: 0; font-size: 14px; }
    .palette-btn { display: none; }
    .sb-hide-sm { display: none; }
    .footer-inner { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
