/* =========================================================================
   Inside the Terminal — interactive educational tool
   Dark TechTools house style, shifted to a green "phosphor terminal" accent.
   Mobile-first. No framework. Shares the how-ai-works/rag-vectors shell
   (hero · section-nav · .sec · .widget · callouts · recap) + adds widgets:
   w-decoder, pty-pair, cat-device sim, snoop input-split, perm-bits, kill-demo.
   ========================================================================= */

:root {
    /* Seed the shared navbar height (published live by tt-navbar.js) */
    --tt-topnav-h: 64px;

    --bg:        #06070a;
    --bg-2:      #0c0f13;
    --panel:     #11151b;
    --panel-2:   #171c24;
    --inset:     #0c0f14;
    --border:    rgba(255, 255, 255, 0.09);
    --border-2:  rgba(255, 255, 255, 0.15);

    --text:      #eef3f1;
    --text-2:    rgba(238, 243, 241, 0.72);
    --text-3:    rgba(238, 243, 241, 0.46);

    --green:     #22c55e;
    --green-2:   #4ade80;
    --cyan:      #22d3ee;
    --sky:       #38bdf8;
    --amber:     #f59e0b;
    --violet:    #8b5cf6;
    --indigo:    #6366f1;
    --red:       #f87171;
    --pink:      #e879f9;

    --grad:      linear-gradient(135deg, #4ade80 0%, #22d3ee 60%, #38bdf8 100%);
    --grad-acc:  linear-gradient(135deg, var(--green) 0%, var(--cyan) 100%);

    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 26px;

    --sp: 1rem;
    --maxw: 1080px;

    --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.75);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--tt-topnav-h) + 64px); }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background:
        radial-gradient(1100px 620px at 82% -8%, rgba(34, 211, 238, 0.10), transparent 60%),
        radial-gradient(900px 560px at 5% 0%, rgba(74, 222, 128, 0.12), transparent 58%),
        radial-gradient(1000px 700px at 50% 120%, rgba(56, 189, 248, 0.08), transparent 60%),
        var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: clip; /* never break position:sticky (navbar-v2 lesson) */
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }
code { font-family: var(--mono); font-size: 0.88em; }
.grad {
    background: var(--grad);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.nowrap { white-space: nowrap; }

/* ===================== HERO ===================== */
.hero {
    position: relative;
    padding: clamp(2.6rem, 7vw, 5rem) 1.1rem clamp(1.4rem, 4vw, 2.4rem);
    text-align: center;
    overflow: hidden;
}
.hero-inner { max-width: 900px; margin: 0 auto; position: relative; z-index: 1; }
.hero-scan {
    position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background:
        repeating-linear-gradient(0deg, rgba(74,222,128,0.05) 0, rgba(74,222,128,0.05) 1px, transparent 1px, transparent 4px);
    -webkit-mask-image: radial-gradient(closest-side at 50% 30%, #000 35%, transparent 80%);
    mask-image: radial-gradient(closest-side at 50% 30%, #000 35%, transparent 80%);
    opacity: 0.7;
}
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
    color: #86efac;
    padding: 0.4rem 0.9rem; border-radius: 999px;
    background: rgba(74, 222, 128, 0.10);
    border: 1px solid rgba(74, 222, 128, 0.30);
}
.hero-title {
    font-size: clamp(2.05rem, 7.4vw, 3.9rem);
    font-weight: 900; margin: 1.1rem 0 0.9rem;
}
.hero-title .caret {
    display: inline-block; width: 0.6ch; height: 1em; margin-left: 4px;
    background: var(--green-2); vertical-align: -0.12em; border-radius: 1px;
    animation: caretblink 1.1s steps(2) infinite;
}
@keyframes caretblink { 50% { opacity: 0; } }
.hero-sub {
    font-size: clamp(1rem, 2.6vw, 1.18rem);
    color: var(--text-2); max-width: 760px; margin: 0 auto;
}
.hero-sub code, .hero-chips code, .hero-hint code { color: #86efac; }
.hero-chips {
    list-style: none; padding: 0; margin: 1.6rem 0 0;
    display: flex; flex-wrap: wrap; gap: 0.55rem; justify-content: center;
}
.hero-chips li {
    display: inline-flex; align-items: center; gap: 0.45rem;
    font-size: 0.86rem; font-weight: 600; color: var(--text-2);
    padding: 0.45rem 0.85rem; border-radius: 999px;
    background: var(--panel); border: 1px solid var(--border);
}
.hero-chips i { color: var(--green-2); }
.hero-hint {
    margin-top: 1.6rem; font-size: 0.92rem; color: var(--text-3);
    display: inline-flex; align-items: center; gap: 0.5rem; max-width: 640px;
}
.hero-hint i { color: var(--amber); }

/* ===================== SECTION NAV ===================== */
.section-nav {
    position: sticky; top: var(--tt-topnav-h); z-index: 90;
    background: rgba(6, 7, 10, 0.86);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.section-nav-inner {
    max-width: var(--maxw); margin: 0 auto;
    display: flex; gap: 0.4rem; padding: 0.6rem 0.8rem;
    overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
    scroll-snap-type: x proximity;
}
.section-nav-inner::-webkit-scrollbar { display: none; }
.sec-chip {
    flex: 0 0 auto; scroll-snap-align: start;
    text-decoration: none; white-space: nowrap;
    font-size: 0.85rem; font-weight: 600; color: var(--text-2);
    padding: 0.45rem 0.85rem; border-radius: 999px;
    border: 1px solid transparent;
    transition: color 0.18s, background 0.18s, border-color 0.18s;
}
.sec-chip code { font-size: 0.92em; color: inherit; }
.sec-chip:hover { color: var(--text); background: var(--panel); }
.sec-chip.active {
    color: #fff; background: rgba(74, 222, 128, 0.14);
    border-color: rgba(74, 222, 128, 0.45);
}

/* ===================== DOC LAYOUT ===================== */
.doc { max-width: var(--maxw); margin: 0 auto; padding: 1rem 1.1rem 4rem; }
.sec { padding: clamp(2.2rem, 6vw, 3.6rem) 0; border-bottom: 1px solid var(--border); }
.sec:last-of-type { border-bottom: none; }
.sec-head { margin-bottom: 1.4rem; }
.sec-kicker {
    display: inline-block; font-size: 0.74rem; font-weight: 700;
    letter-spacing: 0.12em; text-transform: uppercase; color: var(--green-2);
    margin-bottom: 0.5rem;
}
.sec-head h2 { font-size: clamp(1.5rem, 4.4vw, 2.15rem); font-weight: 800; }
.sec-head h2 code, .prose code, .prose-note code, .mini-card code, .info-card code,
.recap-list code, .block-sub code, .callout code {
    font-size: 0.9em;
}

.prose { font-size: 1.04rem; color: var(--text-2); max-width: 740px; }
.prose p + p { margin-top: 0.9rem; }
.prose strong, .prose-note strong, .mini-card strong, .recap-list strong, .callout strong { color: var(--text); font-weight: 700; }
.prose code, .prose-note code, .mini-card code, .info-card code, .recap-list code,
.block-sub code, .callout code, .sec-head h2 code {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    padding: 0.08em 0.4em; border-radius: 6px; color: #a7f3d0;
}
.prose em, .callout em, .prose-note em, .mini-card em { color: #7dd3fc; font-style: italic; }
.prose-note {
    margin-top: 1.3rem; font-size: 0.96rem; color: var(--text-2);
    padding: 0.9rem 1.1rem; border-left: 3px solid var(--green);
    background: rgba(34, 197, 94, 0.06); border-radius: 0 var(--r-sm) var(--r-sm) 0;
    max-width: 780px;
}
.block-sub { font-size: 0.98rem; color: var(--text-2); margin-bottom: 1.1rem; max-width: 760px; }

/* ===================== BIG IDEA ROW ===================== */
.bigidea { display: grid; grid-template-columns: 1fr; gap: 0.8rem; margin: 1.6rem 0 0; }
.bigidea-arrow { display: none; color: var(--text-3); text-align: center; font-size: 1.2rem; }
.bigidea-step { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-md); padding: 1.2rem; }
.bi-ico {
    width: 46px; height: 46px; border-radius: 12px;
    display: grid; place-items: center; font-size: 1.2rem;
    background: color-mix(in srgb, var(--c) 22%, transparent);
    border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
    margin-bottom: 0.8rem;
}
.bi-ico i { color: var(--c); }
.bigidea-step h3 { font-size: 1.02rem; margin-bottom: 0.3rem; }
.bigidea-step p { font-size: 0.92rem; color: var(--text-2); }

/* ===================== TWO COLUMN / MINI CARDS ===================== */
.two-col { display: grid; grid-template-columns: 1fr; gap: 0.9rem; margin-top: 1.4rem; }
.mini-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-md); padding: 1.15rem 1.2rem; }
.mini-card h4 { font-size: 1rem; margin-bottom: 0.45rem; display: flex; align-items: center; gap: 0.5rem; }
.mini-card h4 i { color: var(--green-2); }
.mini-card p { font-size: 0.94rem; color: var(--text-2); }

/* ===================== CALLOUT ===================== */
.callout {
    display: flex; gap: 1rem; align-items: flex-start;
    margin-top: 1.6rem; padding: 1.2rem 1.3rem;
    background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-md);
}
.callout.warn { background: rgba(245, 158, 11, 0.07); border-color: rgba(245, 158, 11, 0.32); }
.callout.tip  { background: rgba(34, 211, 238, 0.07); border-color: rgba(34, 211, 238, 0.30); }
.callout-ico { font-size: 1.3rem; color: var(--green-2); flex: 0 0 auto; margin-top: 0.15rem; }
.callout.warn .callout-ico { color: var(--amber); }
.callout.tip .callout-ico { color: var(--cyan); }
.callout h4 { font-size: 1.02rem; margin-bottom: 0.3rem; }
.callout p { font-size: 0.95rem; color: var(--text-2); }

/* ===================== CODE BLOCK ===================== */
.code-block { margin: 1.4rem 0; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border); background: #080a0d; }
.code-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.6rem 0.95rem; background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
    font-family: var(--mono); font-size: 0.8rem; color: var(--text-2);
}
.code-head i { color: var(--green-2); }
.code-copy {
    background: transparent; border: 1px solid var(--border); color: var(--text-2);
    border-radius: 7px; padding: 0.3rem 0.6rem; cursor: pointer; font-size: 0.78rem; font-family: inherit;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.code-copy:hover { color: #fff; border-color: var(--border-2); background: rgba(255,255,255,0.05); }
.code-copy.copied { color: var(--green-2); border-color: rgba(74,222,128,0.45); }
.code-block pre { margin: 0; padding: 1.1rem 1.2rem; overflow-x: auto; }
.code-block code { font-family: var(--mono); font-size: 0.85rem; color: #d3ead9; line-height: 1.75; white-space: pre; }

/* ===================== WIDGET SHELL ===================== */
.widget {
    margin: 1.3rem 0 0.4rem;
    background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
    border: 1px solid var(--border-2); border-radius: var(--r-lg);
    padding: 1.1rem; box-shadow: var(--shadow);
}
.widget-toolbar { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.seg {
    display: inline-flex; align-items: center; gap: 0.45rem;
    font-family: inherit; font-size: 0.86rem; font-weight: 600;
    color: var(--text-2); cursor: pointer;
    background: var(--inset); border: 1px solid var(--border);
    border-radius: 999px; padding: 0.5rem 0.95rem;
    transition: all 0.18s var(--ease); min-height: 44px;
}
.seg:hover { color: var(--text); border-color: var(--border-2); }
.seg.active { color: #04130a; background: var(--grad-acc); border-color: transparent; box-shadow: 0 6px 18px -8px var(--green); }
.seg small { font-weight: 500; opacity: 0.75; font-size: 0.72rem; }
.btn-mini {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    font-family: inherit; font-weight: 600; cursor: pointer;
    border-radius: 999px; min-height: 44px;
    font-size: 0.84rem; color: var(--text-2);
    background: var(--inset); border: 1px solid var(--border); padding: 0.5rem 0.95rem;
    transition: transform 0.15s, box-shadow 0.2s, border-color 0.15s, background 0.15s, color 0.15s;
}
.btn-mini:hover { color: #fff; border-color: var(--border-2); }
.btn-mini.primary { color: #04130a; background: var(--grad-acc); border-color: transparent; box-shadow: 0 6px 18px -10px var(--green); }
.btn-mini.primary:hover { transform: translateY(-2px); }
.btn-mini.danger { color: #fecaca; border-color: rgba(248,113,113,0.4); background: rgba(248,113,113,0.08); }
.btn-mini.danger:hover { color: #fff; border-color: rgba(248,113,113,0.7); }
.btn-mini[disabled] { opacity: 0.5; cursor: default; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.widget-cap { font-size: 0.84rem; color: var(--text-3); margin: 0.2rem 0 1rem; display: flex; align-items: center; gap: 0.45rem; }
.widget-cap i { color: var(--amber); }

/* ===================== TERMINAL SURFACE (shared by several widgets) ===================== */
.term {
    background: #05070a; border: 1px solid var(--border); border-radius: var(--r-md);
    font-family: var(--mono); font-size: 0.84rem; line-height: 1.6; color: #cfe9d8;
    overflow: hidden;
}
.term-bar {
    display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.8rem;
    background: rgba(255,255,255,0.04); border-bottom: 1px solid var(--border);
    font-size: 0.74rem; color: var(--text-3);
}
.term-dots { display: inline-flex; gap: 5px; }
.term-dots i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.term-dots i:nth-child(1) { background: #ff5f56; }
.term-dots i:nth-child(2) { background: #ffbd2e; }
.term-dots i:nth-child(3) { background: #27c93f; }
.term-title { font-family: var(--mono); }
.term-body { padding: 0.85rem 0.9rem; min-height: 7.5em; white-space: pre-wrap; word-break: break-word; overflow-y: auto; max-height: 16em; }
.term-body .prompt { color: #4ade80; }
.term-body .muted  { color: var(--text-3); }
.term-body .warn   { color: var(--amber); }
.term-body .out    { color: #cfe9d8; }
.term-body .keystroke { color: #fff; }
.blink { display: inline-block; width: 0.6ch; height: 1.05em; background: #4ade80; vertical-align: -0.15em; animation: caretblink 1.1s steps(2) infinite; }

/* ===================== W DECODER ===================== */
.wd-table {
    overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--border);
    background: #05070a; -webkit-overflow-scrolling: touch;
}
.wd-grid { font-family: var(--mono); font-size: 0.8rem; min-width: 660px; }
.wd-status { padding: 0.7rem 0.9rem; color: var(--text-3); border-bottom: 1px dashed var(--border); white-space: pre; }
.wd-head { padding: 0.2rem 0.9rem 0; white-space: nowrap; }
.wd-col-btn {
    display: inline-block; vertical-align: bottom;
    font-family: var(--mono); font-weight: 700; font-size: 0.78rem; color: #7dd3fc;
    background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer;
    padding: 0.45rem 0.3rem; text-align: left; transition: color 0.15s, border-color 0.15s, background 0.15s;
    border-radius: 5px 5px 0 0; white-space: nowrap; overflow: hidden;
}
.wd-col-btn:hover { color: #fff; background: rgba(255,255,255,0.05); }
.wd-col-btn.active { color: #04130a; background: var(--cyan); border-bottom-color: var(--cyan); }
.wd-rows { padding: 0.2rem 0 0.7rem; }
.wd-row { padding: 0.18rem 0.9rem; border-radius: 5px; white-space: nowrap; }
.wd-row:hover { background: rgba(255,255,255,0.035); cursor: pointer; }
.wd-cell { display: inline-block; vertical-align: bottom; padding: 0 0.3rem; white-space: pre; overflow: hidden; color: #cfe9d8; }
.wd-cell.you { color: #4ade80; }
.wd-cell.hl { background: rgba(34,211,238,0.22); border-radius: 4px; color: #fff; }
.wd-detail {
    margin-top: 0.9rem; padding: 1.1rem 1.2rem; border-radius: var(--r-md);
    background: var(--inset); border: 1px solid var(--border); border-left: 4px solid var(--cyan);
    min-height: 5.4em;
}
.wd-detail .lbl { font-family: var(--mono); font-weight: 700; color: #7dd3fc; font-size: 0.95rem; }
.wd-detail p { font-size: 0.94rem; color: var(--text-2); margin-top: 0.4rem; }
.wd-detail .hint { color: var(--text-3); font-size: 0.9rem; }

/* ===================== PTY PAIR ===================== */
.pp-stage { background: var(--inset); border: 1px solid var(--border); border-radius: var(--r-md); padding: 0.6rem; }
.pp-svg { width: 100%; height: auto; display: block; }
.pp-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 1rem; }
.pp-status { font-family: var(--mono); font-size: 0.82rem; color: var(--text-2); margin-top: 0.8rem; min-height: 1.5em; }
.pp-status b { color: #4ade80; }

/* ===================== CAT DEVICE SIM ===================== */
.cd-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.cd-choices { display: flex; flex-direction: column; gap: 0.5rem; }
.cd-choice {
    display: flex; align-items: center; gap: 0.7rem; text-align: left; width: 100%;
    font-family: var(--mono); font-size: 0.82rem; font-weight: 600; cursor: pointer;
    color: var(--text-2); background: var(--inset); border: 1px solid var(--border);
    border-radius: var(--r-sm); padding: 0.6rem 0.8rem; min-height: 44px; transition: all 0.15s;
}
.cd-choice:hover { color: #fff; border-color: var(--border-2); transform: translateX(2px); }
.cd-choice.active { border-color: rgba(74,222,128,0.5); background: rgba(34,197,94,0.08); color: #fff; }
.cd-choice i { color: var(--green-2); width: 1.1em; text-align: center; }
.cd-choice .tag { margin-left: auto; font-size: 0.68rem; font-weight: 600; color: var(--text-3); }

/* ===================== SNOOP / INPUT SPLIT ===================== */
.sn-typed { font-family: var(--mono); font-size: 0.86rem; color: var(--text-2); margin-bottom: 0.9rem; }
.sn-typed b { color: #fff; }
.sn-panes { display: grid; grid-template-columns: 1fr; gap: 0.8rem; }
.sn-pane .term-body { min-height: 6em; }
.sn-pane.victim .term-title i { color: var(--sky); }
.sn-pane.snoop .term-title i { color: var(--red); }
.sn-legend { font-size: 0.84rem; color: var(--text-3); margin-top: 0.9rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; }
.sn-legend .k { display: inline-flex; align-items: center; gap: 0.4rem; }
.sn-legend .sw { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.sn-verdict { font-size: 0.94rem; color: var(--text-2); margin-top: 0.9rem; padding: 0.8rem 1rem; border-radius: var(--r-sm); background: rgba(255,255,255,0.03); border: 1px solid var(--border); min-height: 1.6em; }
.sn-verdict b { color: var(--text); }

/* ===================== PERMISSION BITS ===================== */
.pb-node { font-family: var(--mono); font-size: 0.84rem; color: var(--text-3); margin-bottom: 1rem; word-break: break-all; }
.pb-node b { color: #cfe9d8; }
.pb-mode { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.2rem; }
.pb-class { background: var(--inset); border: 1px solid var(--border); border-radius: var(--r-md); padding: 0.7rem 0.85rem; flex: 1 1 130px; }
.pb-class > .cl { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 0.5rem; }
.pb-bits { display: flex; gap: 0.4rem; }
.pb-bit {
    font-family: var(--mono); font-weight: 700; font-size: 0.95rem; width: 2.3em; min-height: 40px;
    cursor: pointer; color: var(--text-3); background: #05070a; border: 1px solid var(--border);
    border-radius: 7px; transition: all 0.15s;
}
.pb-bit.on { color: #04130a; background: var(--green-2); border-color: transparent; }
.pb-bit.fixed { cursor: not-allowed; opacity: 0.65; }
.pb-bit:not(.fixed):hover { border-color: var(--border-2); }
.pb-string { font-family: var(--mono); font-size: 1.5rem; font-weight: 700; color: #4ade80; letter-spacing: 0.12em; text-align: center; margin: 0.4rem 0 1rem; }
.pb-who { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.pb-verdict {
    display: flex; align-items: flex-start; gap: 0.8rem; padding: 1rem 1.1rem; border-radius: var(--r-md);
    border: 1px solid var(--border); background: var(--inset); font-size: 0.95rem; color: var(--text-2);
}
.pb-verdict.warn { background: rgba(245,158,11,0.09); border-color: rgba(245,158,11,0.4); }
.pb-verdict.safe { background: rgba(34,197,94,0.10); border-color: rgba(34,197,94,0.4); }
.pb-verdict .vi { font-size: 1.4rem; flex: 0 0 auto; margin-top: 0.05rem; }
.pb-verdict.warn .vi { color: var(--amber); }
.pb-verdict.safe .vi { color: var(--green-2); }
.pb-verdict b { color: var(--text); }

/* ===================== KILL DEMO ===================== */
.kd-target { font-family: var(--mono); font-size: 0.84rem; color: var(--text-2); margin-bottom: 1rem; }
.kd-target b { color: #fff; }
.kd-result {
    margin-top: 1rem; padding: 1rem 1.1rem; border-radius: var(--r-md); border: 1px solid var(--border);
    background: var(--inset); font-size: 0.94rem; color: var(--text-2); min-height: 2.4em;
}
.kd-result.bad  { border-color: rgba(248,113,113,0.4); background: rgba(248,113,113,0.08); }
.kd-result.good { border-color: rgba(34,197,94,0.4); background: rgba(34,197,94,0.09); }
.kd-result .cmd { font-family: var(--mono); color: #cfe9d8; display: block; margin-bottom: 0.45rem; }
.kd-result b { color: var(--text); }

/* ===================== RECAP ===================== */
.recap-list { counter-reset: r; list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.recap-list li {
    counter-increment: r; position: relative; padding: 0.85rem 1rem 0.85rem 3.2rem;
    background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-md);
    font-size: 0.98rem; color: var(--text-2);
}
.recap-list li::before {
    content: counter(r); position: absolute; left: 0.85rem; top: 0.78rem;
    width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
    font-family: var(--mono); font-weight: 700; font-size: 0.85rem; color: #04130a;
    background: var(--grad-acc);
}
.recap-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.6rem; }
.btn-primary, .btn-ghost {
    display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none;
    font-size: 0.92rem; font-weight: 600; padding: 0.65rem 1.2rem; border-radius: 999px;
    min-height: 44px; transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.btn-primary { color: #04130a; background: var(--grad-acc); box-shadow: 0 8px 22px -10px var(--green); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { color: var(--text-2); border: 1px solid var(--border); }
.btn-ghost:hover { color: #fff; border-color: var(--border-2); }

.doc-foot { margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--border); }
.doc-foot p { font-size: 0.85rem; color: var(--text-3); max-width: 760px; }
.doc-foot code { color: #a7f3d0; }

/* ===================== RESPONSIVE ===================== */
@media (min-width: 720px) {
    .bigidea { grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; }
    .bigidea-arrow { display: grid; place-items: center; }
    .two-col { grid-template-columns: 1fr 1fr; }
    .cd-grid { grid-template-columns: 0.85fr 1.15fr; align-items: start; }
    .sn-panes { grid-template-columns: 1fr 1fr; }
}

/* Reduced motion / mobile perf */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
