/* ========================================
   HELM PAGE STYLES
   Extracted from helm-product-temp-landing-page.html
   Uses Helm's warm-paper design system, scoped to .helm-page
   ======================================== */

/* Helm CSS vars — scoped so they don't override the main site */
.helm-page {
    --bg: #f5efe2;
    --bg-elev: #ffffff;
    --bg-sunk: #ece5d2;
    --ink: #1a1814;
    --ink-dim: #5c554a;
    --ink-muted: #8a8273;
    --line: #dcd3bd;
    --line-bright: #c3b89d;
    --amber: #b86524;
    --amber-bright: #d97f3a;
    --crimson: #a8392b;
    --sage: #5d7a53;
    --gold: #a8862f;
    --blue: #5170a8;
    --grid: rgba(184,101,36,0.06);

    background: var(--bg);
    color: var(--ink);
    font-family: 'Inter Tight', 'Inter', -apple-system, sans-serif;
    line-height: 1.5;
}

/* Load Helm fonts if not already loaded */
.helm-page h1,
.helm-page h2,
.helm-page h3,
.helm-page .serif { font-family: 'Playfair Display', Georgia, serif; }

.helm-page .mono { font-family: 'JetBrains Mono', 'Courier New', monospace; }

/* ───── SHARED ───── */
.helm-page section { padding: 8rem 2rem; position: relative; }
.helm-page .container { max-width: 1200px; margin: 0 auto; }

.helm-eyebrow {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .25em;
    color: var(--amber);
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: 1.5rem;
}

.helm-eyebrow::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--amber);
}

.helm-page h2 {
    font-size: clamp(2rem, 4.5vw, 3.6rem);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: var(--ink);
}

.helm-page h2 em {
    font-style: italic;
    color: var(--amber-bright);
}

.helm-lead {
    font-size: 1.15rem;
    color: var(--ink-dim);
    max-width: 62ch;
    line-height: 1.55;
}

/* ───── HELM HERO ───── */
.helm-hero {
    padding-top: 9rem;
    padding-bottom: 5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(184,101,36,0.10), transparent 60%),
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 100% 100%, 80px 80px, 80px 80px;
}

.helm-hero-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 4.5rem;
    align-items: center;
}

.helm-hero-copy { max-width: 60ch; }

.helm-hero h1 {
    font-size: clamp(2.6rem, 5.2vw, 5rem);
    letter-spacing: -0.035em;
    margin-bottom: 1.8rem;
    color: var(--ink);
}

.helm-hero h1 .line {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    animation: helmRise .9s cubic-bezier(.2,.7,.2,1) forwards;
}

.helm-hero h1 .line:nth-child(1) { animation-delay: .15s; }
.helm-hero h1 .line:nth-child(2) { animation-delay: .3s; color: var(--ink-dim); }
.helm-hero h1 .line:nth-child(3) { animation-delay: .45s; font-style: italic; color: var(--amber-bright); }

@keyframes helmRise { to { opacity: 1; transform: none; } }

.helm-hero-sub {
    max-width: 52ch;
    font-size: 1.18rem;
    color: var(--ink-dim);
    line-height: 1.55;
    margin-bottom: 2.3rem;
    opacity: 0;
    animation: helmRise .9s ease .7s forwards;
}

.helm-hero-sub em {
    font-style: italic;
    color: var(--ink);
    font-family: 'Playfair Display', Georgia, serif;
}

.helm-hero-ctas {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: helmRise .9s ease .85s forwards;
}

.helm-btn {
    padding: 1rem 1.8rem;
    border-radius: 8px;
    font-size: .95rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    transition: all .25s ease;
    text-decoration: none;
    font-family: 'Inter', -apple-system, sans-serif;
    cursor: pointer;
    border: none;
}

.helm-btn-primary {
    background: var(--amber);
    color: #fff;
}

.helm-btn-primary:hover {
    background: var(--amber-bright);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px -10px rgba(184,101,36,0.5);
    color: #fff;
}

.helm-btn-ghost {
    border: 1px solid var(--line-bright);
    color: var(--ink);
    background: transparent;
}

.helm-btn-ghost:hover {
    border-color: var(--amber);
    color: var(--amber-bright);
}

.helm-btn .arrow { transition: transform .25s; }
.helm-btn:hover .arrow { transform: translateX(4px); }

/* Hero mechanism row */
.helm-hero-mech {
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    opacity: 0;
    animation: helmRise .9s ease 1s forwards;
}

.helm-hero-mech .chip {
    font-family: 'JetBrains Mono', monospace;
    font-size: .72rem;
    color: var(--ink-dim);
    background: var(--bg-elev);
    border: 1px solid var(--line-bright);
    padding: .42rem .72rem;
    border-radius: 7px;
    white-space: nowrap;
}

.helm-hero-mech .chip b { color: var(--amber); font-weight: 500; }
.helm-hero-mech .flow { color: var(--ink-muted); font-family: monospace; font-size: .9rem; }
.helm-hero-mech .tags {
    font-family: 'Inter', sans-serif;
    font-size: .62rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--sage);
    margin-left: .25rem;
}

/* Hero Decision Card */
.helm-dc-wrap {
    position: relative;
    opacity: 0;
    animation: helmRise 1s ease 1s forwards;
}

.helm-dc-wrap::before {
    content: '';
    position: absolute;
    inset: -44px;
    border-radius: 32px;
    background: radial-gradient(ellipse at 62% 38%, rgba(184,101,36,0.16), transparent 70%);
    z-index: 0;
}

.helm-decision-card {
    background: linear-gradient(180deg, #ffffff, #faf3e1);
    border: 1px solid var(--amber);
    border-radius: 18px;
    padding: 1.7rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow:
        0 0 0 1px rgba(184,101,36,0.12),
        0 40px 80px -30px rgba(184,101,36,0.42),
        inset 0 1px 0 rgba(255,255,255,0.7);
}

.helm-dc-head {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding-bottom: 1rem;
    margin-bottom: 1.15rem;
    border-bottom: 1px solid var(--line);
}

.helm-brand-mark {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--amber), var(--gold), var(--amber-bright), var(--amber));
    position: relative;
    box-shadow: 0 2px 8px rgba(184,101,36,0.25);
    flex-shrink: 0;
}

.helm-brand-mark::before {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: #f5efe2;
}

.helm-brand-mark::after {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: var(--amber);
}

.helm-dc-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    color: var(--ink);
}

.helm-dc-live {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: .45rem;
    font-family: monospace;
    font-size: .6rem;
    text-transform: uppercase;
    letter-spacing: .18em;
    color: var(--ink-muted);
}

.helm-dc-led {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sage);
    box-shadow: 0 0 10px var(--sage);
    animation: helmLedPulse 1.4s infinite;
}

@keyframes helmLedPulse { 50% { opacity: .4; } }

.helm-dc-label {
    font-family: monospace;
    font-size: .6rem;
    text-transform: uppercase;
    letter-spacing: .2em;
    color: var(--ink-muted);
    margin-bottom: .55rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.helm-dc-tag {
    margin-left: auto;
    padding: .16rem .55rem;
    border-radius: 5px;
    font-size: .58rem;
    border: 1px solid var(--line-bright);
}

.helm-dc-tag.in  { color: var(--blue);   border-color: rgba(81,112,168,.45); }
.helm-dc-tag.out { color: var(--amber);  border-color: rgba(184,101,36,.45); }

.helm-dc-proposal {
    background: var(--bg-sunk);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: .9rem 1.05rem;
    margin-bottom: 1.3rem;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.helm-dc-act {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.helm-dc-amt {
    font-family: monospace;
    font-size: .9rem;
    color: var(--ink-dim);
    white-space: nowrap;
}

.helm-dc-target {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-family: monospace;
    font-size: .7rem;
    color: var(--ink-dim);
    margin-bottom: 1.25rem;
    padding: .55rem .75rem;
    background: var(--bg-sunk);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.helm-dc-tt {
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: .15em;
    font-size: .56rem;
}

.helm-dc-ep {
    color: var(--blue);
    margin-left: auto;
    white-space: nowrap;
}

.helm-dc-rules {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    margin-bottom: 1.35rem;
    min-height: 108px;
}

.helm-dc-rule {
    display: flex;
    align-items: center;
    gap: .7rem;
    font-family: monospace;
    font-size: .78rem;
    color: var(--ink-dim);
    opacity: 0;
    transform: translateX(-6px);
    animation: helmRuleIn .42s ease forwards;
}

.helm-dc-rule.fail { color: var(--crimson); }

.helm-dc-mark {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .66rem;
    flex-shrink: 0;
    color: #fff;
}

.helm-dc-rule.pass .helm-dc-mark { background: var(--sage); }
.helm-dc-rule.fail .helm-dc-mark { background: var(--crimson); }
@keyframes helmRuleIn { to { opacity: 1; transform: none; } }

.helm-dc-verdict {
    border-radius: 12px;
    padding: 1rem 1.15rem;
    display: flex;
    align-items: center;
    gap: .9rem;
    border: 1px solid;
    opacity: 0;
    transform: scale(.96);
}

.helm-dc-verdict.run {
    animation: helmStampIn .5s cubic-bezier(.2,.8,.2,1) forwards;
}

@keyframes helmStampIn { to { opacity: 1; transform: none; } }

.helm-dc-verdict.ok  { background: rgba(93,122,83,.13);  border-color: var(--sage);    color: #3d5536; }
.helm-dc-verdict.bad { background: rgba(168,57,43,.11);  border-color: var(--crimson); color: #7a2820; }

.helm-dc-stamp {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-size: 1.5rem;
    letter-spacing: -0.01em;
    line-height: 1;
}

.helm-dc-vsub {
    font-family: monospace;
    font-size: .64rem;
    text-transform: uppercase;
    letter-spacing: .13em;
    opacity: .85;
    margin-top: .35rem;
}

.helm-dc-vicon {
    margin-left: auto;
    font-size: 1.35rem;
    line-height: 1;
}

/* ───── PROBLEM SECTION ───── */
.helm-problem { padding-top: 6rem; }

.helm-problem-toggle {
    display: flex;
    background: var(--bg-elev);
    border: 1px solid var(--line-bright);
    border-radius: 999px;
    padding: .35rem;
    width: fit-content;
    margin: 2rem 0 3rem;
    position: relative;
}

.helm-problem-toggle button {
    padding: .7rem 1.4rem;
    border-radius: 999px;
    font-size: .85rem;
    color: var(--ink-dim);
    font-family: monospace;
    letter-spacing: .05em;
    position: relative;
    z-index: 2;
    transition: color .3s ease;
    background: none;
    border: none;
    cursor: pointer;
}

.helm-problem-toggle button.active { color: #fff; }

.helm-toggle-pill {
    position: absolute;
    top: .35rem;
    bottom: .35rem;
    background: var(--amber);
    border-radius: 999px;
    transition: all .4s cubic-bezier(.2,.8,.2,1);
    z-index: 1;
}

.helm-problem-stage {
    position: relative;
    min-height: 420px;
    border: 1px solid var(--line-bright);
    border-radius: 18px;
    background: var(--bg-elev);
    overflow: hidden;
}

.helm-problem-scene {
    position: absolute;
    inset: 0;
    padding: 2.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all .5s ease;
    pointer-events: none;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 2rem;
    align-items: center;
}

.helm-problem-scene.active {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.helm-scene-copy h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.helm-scene-copy h3 em { color: var(--crimson); font-style: italic; }
.helm-scene-copy p { color: var(--ink-dim); font-size: 1rem; margin-bottom: 1.2rem; }

.helm-scene-stat { display: flex; gap: 1.5rem; margin-top: 1.5rem; }
.helm-scene-stat .s { font-family: monospace; }
.helm-scene-stat .s b {
    display: block;
    color: var(--crimson);
    font-size: 1.8rem;
    font-weight: 500;
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
}
.helm-scene-stat .s small {
    color: var(--ink-muted);
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .15em;
}

/* Chaos viz */
.helm-chaos-viz { position: relative; height: 340px; }

.helm-chaos-center {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 90px; height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle, #2a3550, #1a2238);
    border: 1px solid #4a6db8;
    box-shadow: 0 0 30px rgba(74,109,184,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    font-size: .7rem;
    color: #a8c4ff;
    z-index: 3;
}

.helm-chaos-center::after {
    content: 'AI';
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-size: 1.3rem;
}

.helm-chaos-node {
    position: absolute;
    padding: .55rem .9rem;
    background: var(--bg-elev);
    border: 1px solid var(--line-bright);
    border-radius: 6px;
    font-family: monospace;
    font-size: .72rem;
    color: var(--ink-dim);
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.helm-chaos-node[data-bad] {
    animation: helmShake 4s infinite;
    border-color: var(--crimson);
    color: var(--crimson);
}

.helm-chaos-node[data-bad]::after {
    content: '⚠';
    position: absolute;
    top: -8px; right: -8px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--crimson);
    color: #fff;
    font-size: .65rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes helmShake {
    0%,90%,100% { transform: none; }
    92% { transform: translateX(-2px); }
    94% { transform: translateX(2px); }
    96% { transform: translateX(-2px); }
    98% { transform: translateX(1px); }
}

.helm-chaos-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--crimson), transparent);
    transform-origin: left;
    opacity: .5;
    z-index: 1;
}

.helm-chaos-line.bad { animation: helmFlicker 1.2s infinite; }
@keyframes helmFlicker { 0%,100% { opacity: .2; } 50% { opacity: .8; } }

/* Rigid viz */
.helm-rigid-viz {
    position: relative;
    height: 340px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 6px;
}

.helm-rigid-block {
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.helm-rigid-block.locked {
    background: linear-gradient(135deg, #efd9c8, #e6c8b0);
    border-color: #c69677;
}

.helm-rigid-block.locked::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(45deg, transparent 0 5px, rgba(168,57,43,0.18) 5px 6px);
}

.helm-rigid-block.ticket { background: #f5e7c0; border-color: #d4b269; }
.helm-rigid-block.ticket::before {
    content: 'TKT-' attr(data-id);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    font-size: .55rem;
    color: #8a6f25;
    opacity: .8;
}

/* ───── PLAYGROUND ───── */
.helm-solution { padding-top: 8rem; }

.helm-playground {
    margin-top: 3rem;
    border: 1px solid var(--line-bright);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff, #f9f2dd);
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px -30px rgba(26,24,20,0.15);
}

.helm-play-header {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: .8rem;
    background: rgba(0,0,0,0.025);
}

.helm-play-dots { display: flex; gap: .4rem; }
.helm-play-dots span { width: 10px; height: 10px; border-radius: 50%; }
.helm-play-dots span:nth-child(1) { background: #c4493a; }
.helm-play-dots span:nth-child(2) { background: #d4b269; }
.helm-play-dots span:nth-child(3) { background: #7a9670; }

.helm-play-title { font-family: monospace; font-size: .75rem; color: var(--ink-muted); margin-left: .5rem; }
.helm-play-tag { margin-left: auto; font-family: monospace; font-size: .65rem; color: var(--amber); letter-spacing: .15em; text-transform: uppercase; }

.helm-play-body {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    min-height: 560px;
}

.helm-play-controls {
    padding: 1.8rem;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: .7rem;
}

.helm-group-label {
    font-family: monospace;
    font-size: .62rem;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: .2em;
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .4rem;
}

.helm-group-label .gl-dot { width: 7px; height: 7px; border-radius: 50%; }
.helm-group-label.in .gl-dot { background: var(--blue); }
.helm-group-label.out .gl-dot { background: var(--amber); }
.helm-group-label .gl-line { flex: 1; height: 1px; background: var(--line); }

.helm-scenario-btn {
    text-align: left;
    padding: .85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    transition: all .25s ease;
    cursor: pointer;
}

.helm-scenario-btn:hover { border-color: var(--line-bright); transform: translateX(2px); }

.helm-scenario-btn.active {
    border-color: var(--amber);
    background: rgba(184,101,36,0.08);
    box-shadow: 0 0 0 1px rgba(184,101,36,0.25);
}

.helm-scenario-btn.active.in {
    border-color: var(--blue);
    background: rgba(81,112,168,0.08);
    box-shadow: 0 0 0 1px rgba(81,112,168,0.25);
}

.helm-sc-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .25rem; }

.helm-sc-icon {
    width: 24px; height: 24px;
    border-radius: 6px;
    background: var(--bg-elev);
    border: 1px solid var(--line-bright);
    display: flex; align-items: center; justify-content: center;
    font-family: monospace; font-size: .7rem; color: var(--ink-dim);
    flex-shrink: 0;
}

.helm-scenario-btn.active .helm-sc-icon { background: var(--amber); color: #fff; border-color: var(--amber); }
.helm-scenario-btn.active.in .helm-sc-icon { background: var(--blue); color: #fff; border-color: var(--blue); }

.helm-sc-title { font-family: 'Playfair Display', Georgia, serif; font-size: 1rem; color: var(--ink); }
.helm-sc-desc { font-size: .76rem; color: var(--ink-muted); line-height: 1.4; font-family: monospace; }

.helm-run-btn {
    margin-top: .6rem;
    padding: 1rem 1.3rem;
    background: var(--amber);
    color: #fff;
    border-radius: 10px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all .25s ease;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.helm-run-btn:hover { background: var(--amber-bright); transform: translateY(-1px); }
.helm-run-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.helm-run-btn .key { font-family: monospace; font-size: .7rem; background: rgba(255,255,255,0.25); padding: .2rem .5rem; border-radius: 4px; color: #fff; }

.helm-play-pipeline { padding: 2rem; display: flex; flex-direction: column; gap: 1rem; }

.helm-step {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1rem 1.2rem;
    background: var(--bg);
    opacity: .35;
    transition: all .4s ease;
    position: relative;
}

.helm-step.live  { opacity: 1; border-color: var(--line-bright); }
.helm-step.done  { opacity: 1; border-color: var(--sage);    background: rgba(93,122,83,0.06); }
.helm-step.failed { opacity: 1; border-color: var(--crimson); background: rgba(168,57,43,0.06); }

.helm-step-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .5rem; }

.helm-step-num {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--bg-elev);
    border: 1px solid var(--line-bright);
    display: flex; align-items: center; justify-content: center;
    font-family: monospace; font-size: .7rem; color: var(--ink-dim);
}

.helm-step.live .helm-step-num   { background: var(--amber);   border-color: var(--amber);   color: #fff; animation: helmLivePulse 1.2s infinite; }
.helm-step.done .helm-step-num   { background: var(--sage);    border-color: var(--sage);    color: #fff; }
.helm-step.done .helm-step-num::before  { content: '✓'; }
.helm-step.done .helm-step-num span { display: none; }
.helm-step.failed .helm-step-num { background: var(--crimson); border-color: var(--crimson); color: #fff; }
.helm-step.failed .helm-step-num::before { content: '✕'; }
.helm-step.failed .helm-step-num span { display: none; }

@keyframes helmLivePulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(184,101,36,.55); }
    50% { box-shadow: 0 0 0 8px rgba(184,101,36,0); }
}

.helm-step-title { font-family: 'Playfair Display', Georgia, serif; font-size: 1rem; color: var(--ink); }

.helm-step-status {
    margin-left: auto;
    font-family: monospace;
    font-size: .65rem;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: .15em;
}

.helm-step.live .helm-step-status   { color: var(--amber); }
.helm-step.done .helm-step-status   { color: var(--sage); }
.helm-step.failed .helm-step-status { color: var(--crimson); }

.helm-step-body {
    font-family: monospace;
    font-size: .75rem;
    color: var(--ink-dim);
    line-height: 1.6;
    padding-left: 30px;
}

.helm-step-body code { color: var(--gold); }

.helm-step-body .row {
    display: flex;
    justify-content: space-between;
    padding: .15rem 0;
    border-bottom: 1px dashed var(--line);
    gap: 1rem;
}

.helm-step-body .row:last-child { border-bottom: none; }
.helm-step-body .row .key { color: var(--ink-muted); }
.helm-step-body .row .val { color: var(--ink); text-align: right; }
.helm-step-body .row .val.bad { color: var(--crimson); }
.helm-step-body .row .val.ok  { color: var(--sage); }

.helm-final-output {
    margin-top: .5rem;
    padding: 1rem;
    border-radius: 8px;
    font-family: monospace;
    font-size: .78rem;
    display: none;
    align-items: center;
    gap: .8rem;
}

.helm-final-output.show { display: flex; }
.helm-final-output.ok  { background: rgba(93,122,83,0.12);  border: 1px solid var(--sage);    color: #3d5536; }
.helm-final-output.bad { background: rgba(168,57,43,0.10);  border: 1px solid var(--crimson); color: #7a2820; }
.helm-final-output .big { font-family: 'Playfair Display', Georgia, serif; font-size: 1.4rem; font-style: italic; }

/* ───── FEATURES ───── */
.helm-features { padding-top: 8rem; }

.helm-feat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.helm-feat {
    padding: 2rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(180deg, var(--bg-elev), transparent);
    position: relative;
    overflow: hidden;
    transition: all .35s ease;
    box-shadow: 0 2px 12px rgba(26,24,20,0.04);
}

.helm-feat:hover { border-color: var(--amber); transform: translateY(-3px); }
.helm-feat:hover .helm-feat-glyph { transform: rotate(8deg) scale(1.1); color: var(--amber-bright); }

.helm-feat-glyph {
    width: 50px; height: 50px;
    border: 1px solid var(--line-bright);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--amber);
    margin-bottom: 1.2rem;
    transition: all .35s ease;
    background: var(--bg);
}

.helm-feat h3 { font-size: 1.4rem; margin-bottom: .6rem; letter-spacing: -0.01em; color: var(--ink); }
.helm-feat p  { color: var(--ink-dim); font-size: .95rem; line-height: 1.6; }

.helm-feat-num {
    position: absolute;
    top: 1.5rem; right: 1.5rem;
    font-family: monospace;
    font-size: .65rem;
    color: var(--ink-muted);
    letter-spacing: .15em;
}

/* ───── VS ───── */
.helm-vs { padding-top: 8rem; padding-bottom: 8rem; }

.helm-vs-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.5rem; margin-top: 3rem; }

.helm-vs-card {
    padding: 2.2rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--bg-elev);
}

.helm-vs-head {
    display: flex; align-items: flex-start; gap: 1rem;
    margin-bottom: 1.5rem; padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
}

.helm-vs-vs { font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-size: 1rem; color: var(--ink-muted); padding-top: .3rem; }
.helm-vs-name { font-family: 'Playfair Display', Georgia, serif; font-size: 1.5rem; color: var(--ink); }
.helm-vs-sub { font-family: monospace; font-size: .7rem; color: var(--ink-muted); margin-top: .2rem; text-transform: uppercase; letter-spacing: .15em; }
.helm-vs-body { color: var(--ink-dim); font-size: 1rem; line-height: 1.65; }
.helm-vs-body strong { color: var(--amber-bright); font-weight: 500; font-family: 'Playfair Display', Georgia, serif; font-style: italic; }

/* ───── ATLAS BRIDGE ───── */
.helm-atlas-bridge {
    margin: 2rem auto;
    padding: 3rem;
    border: 1px solid var(--line-bright);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(93,122,83,0.07), rgba(184,101,36,0.05));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    max-width: 1200px;
}

.helm-atlas-bridge-copy h3 { font-size: 1.5rem; margin-bottom: .6rem; color: var(--ink); }
.helm-atlas-bridge-copy p  { color: var(--ink-dim); font-size: .95rem; max-width: 52ch; line-height: 1.6; margin: 0; }

/* ───── FINAL CTA ───── */
.helm-final {
    padding: 8rem 2rem;
    text-align: center;
    border-top: 1px solid var(--line);
    position: relative;
    overflow: hidden;
}

.helm-final::before {
    content: '';
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%,-50%);
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(184,101,36,0.12), transparent 60%);
    z-index: 0;
}

.helm-final .container { position: relative; z-index: 1; }
.helm-final h2 { font-size: clamp(2.4rem,5.5vw,4.5rem); max-width: 18ch; margin: 0 auto 1.5rem; }
.helm-final p { color: var(--ink-dim); font-size: 1.2rem; max-width: 55ch; margin: 0 auto 2.5rem; }
.helm-final-motto { font-family: monospace; font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--amber); margin-top: 3rem; }

/* ───── RESPONSIVE ───── */
@media (max-width: 900px) {
    .helm-hero-grid { grid-template-columns: 1fr; gap: 3rem; }
    .helm-dc-wrap { max-width: 480px; }
    .helm-problem-scene { grid-template-columns: 1fr; padding: 1.5rem; }
    .helm-chaos-viz, .helm-rigid-viz { height: 280px; }
    .helm-feat-grid { grid-template-columns: 1fr; }
    .helm-vs-grid { grid-template-columns: 1fr; }
}

@media (max-width: 880px) {
    .helm-play-body { grid-template-columns: 1fr; }
    .helm-play-controls { border-right: none; border-bottom: 1px solid var(--line); }
}

@media (max-width: 560px) {
    .helm-hero-mech .flow { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   CONSOLE SECTION
═══════════════════════════════════════════════════════════════ */
.helm-page .console { padding: 5rem 2rem; position: relative; }

.cs-window{margin-top:3rem;border:1px solid var(--line-bright);border-radius:20px;background:linear-gradient(180deg,#ffffff,#f9f2dd);overflow:hidden;position:relative;box-shadow:0 20px 60px -30px rgba(26,24,20,0.15);opacity:0;transform:translateY(24px);transition:opacity .7s ease,transform .7s cubic-bezier(.2,.8,.2,1)}
.cs-window.in{opacity:1;transform:none}
.cs-window::before{content:'';position:absolute;inset:-1px;border-radius:20px;background:radial-gradient(ellipse 60% 40% at 70% 0%,rgba(184,101,36,0.10),transparent 70%);pointer-events:none;z-index:5}
.cs-chrome{padding:1.05rem 1.5rem;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:.8rem;background:rgba(0,0,0,0.025);position:relative;z-index:6}
.cs-dots{display:flex;gap:.4rem}
.cs-dots span{width:10px;height:10px;border-radius:50%}
.cs-dots span:nth-child(1){background:#c4493a}.cs-dots span:nth-child(2){background:#d4b269}.cs-dots span:nth-child(3){background:#7a9670}
.cs-chrome-title{font-family:'JetBrains Mono',monospace;font-size:.75rem;color:var(--ink-muted);margin-left:.5rem}
.cs-chrome-title b{color:var(--ink-dim);font-weight:500}
.cs-hint{margin-left:auto;font-family:'JetBrains Mono',monospace;font-size:.6rem;text-transform:uppercase;letter-spacing:.16em;color:var(--amber);display:flex;align-items:center;gap:.4rem}
.cs-chrome-tag{display:flex;align-items:center;gap:.45rem;font-family:'JetBrains Mono',monospace;font-size:.62rem;text-transform:uppercase;letter-spacing:.16em;color:var(--ink-muted);padding-left:1rem;margin-left:1rem;border-left:1px solid var(--line)}
.cs-chrome-tag .cs-led{width:7px;height:7px;border-radius:50%;background:var(--sage);box-shadow:0 0 10px var(--sage);animation:csPulse 1.6s infinite}
@keyframes csPulse{50%{opacity:.4}}
@media (max-width:620px){ .cs-hint{display:none} }

.cs-app{display:grid;grid-template-columns:210px 1fr}

.cs-rail{border-right:1px solid var(--line);background:rgba(255,255,255,0.45);display:flex;flex-direction:column;padding:1.1rem 0}
.cs-brand{display:flex;align-items:center;gap:.55rem;padding:0 1.2rem 1rem;font-family:'Fraunces',serif;font-weight:500;font-size:1.12rem;border-bottom:1px solid var(--line)}
.brand-mark{width:22px;height:22px;border-radius:50%;background:conic-gradient(from 0deg, var(--amber), var(--gold), var(--amber-bright), var(--amber));position:relative;box-shadow:0 2px 12px rgba(184,101,36,0.25);flex-shrink:0}
.brand-mark::before,.brand-mark::after{content:'';position:absolute;background:var(--bg)}
.brand-mark::before{inset:4px;border-radius:50%}
.brand-mark::after{inset:8px;border-radius:50%;background:var(--amber)}
.cs-env{margin:1rem .9rem .5rem;padding:.55rem .7rem;border:1px solid var(--line-bright);border-radius:9px;display:flex;align-items:center;gap:.55rem;font-family:'JetBrains Mono',monospace;font-size:.68rem;background:var(--bg-elev);cursor:pointer}
.cs-env .cs-led{width:7px;height:7px;border-radius:50%;background:var(--sage);box-shadow:0 0 8px var(--sage)}
.cs-env .cs-chev{margin-left:auto;color:var(--ink-muted)}
.cs-navlabel{padding:.7rem 1.2rem .25rem;font-family:'JetBrains Mono',monospace;font-size:.55rem;text-transform:uppercase;letter-spacing:.2em;color:var(--ink-muted)}
.cs-nav{display:flex;flex-direction:column;gap:2px;padding:0 .6rem}
.cs-nav-item{display:flex;align-items:center;gap:.7rem;padding:.55rem .75rem;border-radius:9px;font-size:.86rem;color:var(--ink-dim);transition:all .18s ease;cursor:pointer;-webkit-tap-highlight-color:transparent}
.cs-nav-item svg{width:16px;height:16px;flex-shrink:0;opacity:.8}
.cs-nav-item:hover{background:var(--bg-sunk);color:var(--ink)}
.cs-nav-item.active{background:var(--amber);color:#fff;box-shadow:0 6px 16px -8px rgba(184,101,36,0.6)}
.cs-nav-item.active svg{opacity:1}
.cs-nav-item .cs-count{margin-left:auto;font-family:'JetBrains Mono',monospace;font-size:.62rem;background:var(--bg-sunk);color:var(--ink-dim);padding:.05rem .4rem;border-radius:20px;transition:background .18s}
.cs-nav-item.active .cs-count{background:rgba(255,255,255,0.25);color:#fff}
.cs-user{margin-top:auto;border-top:1px solid var(--line);padding:.95rem 1.2rem 0;display:flex;align-items:center;gap:.65rem}
.cs-avatar{width:30px;height:30px;border-radius:8px;background:linear-gradient(135deg,var(--amber),var(--crimson));color:#fff;display:flex;align-items:center;justify-content:center;font-family:'Fraunces',serif;font-size:.85rem;flex-shrink:0}
.cs-user .cs-uname{font-size:.8rem;font-weight:500}
.cs-user .cs-urole{font-family:'JetBrains Mono',monospace;font-size:.58rem;color:var(--ink-muted)}

.cs-content{height:560px;overflow-y:auto;padding:1.5rem}
.cs-content::-webkit-scrollbar{width:9px}
.cs-content::-webkit-scrollbar-thumb{background:var(--line-bright);border-radius:9px;border:3px solid transparent;background-clip:content-box}
.cs-content::-webkit-scrollbar-track{background:transparent}

.cs-viewhead{display:flex;align-items:flex-end;gap:.9rem;margin-bottom:1.2rem;flex-wrap:wrap}
.cs-viewhead .cs-vh-t{font-family:'Fraunces',serif;font-weight:400;font-size:1.4rem;letter-spacing:-0.02em;line-height:1}
.cs-viewhead .cs-vh-s{font-family:'JetBrains Mono',monospace;font-size:.58rem;text-transform:uppercase;letter-spacing:.15em;color:var(--ink-muted);margin-top:.35rem}
.cs-viewhead .cs-vh-r{margin-left:auto;display:flex;align-items:center;gap:.5rem}

.cs-view{display:none}
.cs-view.active{display:block;animation:csFade .35s ease}
@keyframes csFade{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

.cs-search{display:flex;align-items:center;gap:.45rem;padding:.45rem .75rem;border:1px solid var(--line-bright);border-radius:9px;background:var(--bg-elev);width:220px;color:var(--ink-muted);font-size:.78rem;max-width:48vw}
.cs-search input{border:none;background:none;outline:none;font-family:inherit;font-size:.78rem;color:var(--ink);width:100%}
.cs-act-btn{font-family:'JetBrains Mono',monospace;font-size:.66rem;padding:.5rem .8rem;border-radius:8px;border:1px solid var(--amber);color:var(--amber);transition:.18s}
.cs-act-btn:hover{background:var(--amber);color:#fff}

.cs-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:.85rem;margin-bottom:1.1rem}
.cs-stat{background:var(--bg-elev);border:1px solid var(--line);border-radius:12px;padding:1rem 1.05rem;position:relative;overflow:hidden}
.cs-stat::after{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--csc,var(--amber))}
.cs-stat .cs-slabel{font-family:'JetBrains Mono',monospace;font-size:.56rem;text-transform:uppercase;letter-spacing:.13em;color:var(--ink-muted);margin-bottom:.5rem}
.cs-stat .cs-sval{font-family:'Fraunces',serif;font-size:1.85rem;line-height:1;letter-spacing:-0.02em}
.cs-stat .cs-sdelta{font-family:'JetBrains Mono',monospace;font-size:.64rem;margin-top:.45rem;color:var(--ink-muted)}
.cs-stat .cs-sdelta b{color:var(--sage)}
.cs-stat .cs-sdelta.down b{color:var(--crimson)}

.cs-row2{display:grid;grid-template-columns:1.5fr 1fr;gap:1rem;margin-bottom:1.1rem;align-items:start}
.cs-panel{background:var(--bg-elev);border:1px solid var(--line);border-radius:14px;overflow:hidden}
.cs-phead{padding:.85rem 1.1rem;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:.6rem}
.cs-phead h4{font-family:'Fraunces',serif;font-weight:400;font-size:1rem;letter-spacing:-0.01em}
.cs-phead .cs-psub{font-family:'JetBrains Mono',monospace;font-size:.58rem;color:var(--ink-muted);text-transform:uppercase;letter-spacing:.13em}
.cs-phead .cs-plink{margin-left:auto;font-family:'JetBrains Mono',monospace;font-size:.64rem;color:var(--amber);cursor:pointer}
.cs-phead .cs-plink:hover{color:var(--amber-bright)}

.cs-chart{display:flex;align-items:flex-end;gap:.7rem;height:150px;padding:1.2rem 1.1rem .35rem}
.cs-barcol{flex:1;display:flex;flex-direction:column;align-items:center;gap:.45rem;height:100%}
.cs-bartrack{width:100%;display:flex;align-items:flex-end;justify-content:center;height:100%}
.cs-bar{width:100%;max-width:30px;border-radius:5px 5px 0 0;display:flex;flex-direction:column;justify-content:flex-end;overflow:hidden;transform:scaleY(0);transform-origin:bottom;transition:transform .8s cubic-bezier(.2,.8,.2,1)}
.cs-window.in .cs-bar{transform:scaleY(1)}
.cs-bar .cs-seg{width:100%}
.cs-bar .cs-seg.ok{background:var(--sage)}
.cs-bar .cs-seg.rev{background:var(--gold)}
.cs-bar .cs-seg.bad{background:var(--crimson)}
.cs-barcol .cs-blbl{font-family:'JetBrains Mono',monospace;font-size:.56rem;color:var(--ink-muted)}
.cs-legend{display:flex;gap:1rem;padding:0 1.1rem 1rem;font-family:'JetBrains Mono',monospace;font-size:.6rem;color:var(--ink-dim)}
.cs-legend i{display:inline-block;width:8px;height:8px;border-radius:2px;margin-right:.35rem;vertical-align:middle}

.cs-sys{padding:.35rem}
.cs-sysrow{display:flex;align-items:center;gap:.6rem;padding:.6rem .7rem;font-family:'JetBrains Mono',monospace;font-size:.72rem}
.cs-sysrow + .cs-sysrow{border-top:1px solid var(--line)}
.cs-sysrow .cs-led{width:7px;height:7px;border-radius:50%;background:var(--sage);box-shadow:0 0 8px var(--sage);flex-shrink:0}
.cs-sysrow .cs-led.warn{background:var(--gold);box-shadow:0 0 8px var(--gold)}
.cs-sysrow .cs-st{margin-left:auto;color:var(--ink-muted);font-size:.58rem;text-transform:uppercase;letter-spacing:.1em}

.cs-appr{padding:.3rem}
.cs-apprrow{display:flex;align-items:center;gap:.8rem;padding:.75rem .8rem;border-radius:10px;transition:background .18s}
.cs-apprrow:hover{background:var(--bg-sunk)}
.cs-apprrow + .cs-apprrow{border-top:1px solid var(--line)}
.cs-apprico{width:32px;height:32px;border-radius:9px;background:rgba(168,134,47,0.13);border:1px solid rgba(168,134,47,.4);color:var(--gold);display:flex;align-items:center;justify-content:center;font-family:'JetBrains Mono',monospace;font-size:.85rem;flex-shrink:0}
.cs-apprmain{min-width:0;flex:1}
.cs-apprmain .cs-t{font-size:.86rem;font-weight:500}
.cs-apprmain .cs-m{font-family:'JetBrains Mono',monospace;font-size:.64rem;color:var(--ink-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cs-appracts{display:flex;gap:.4rem;flex-shrink:0}
.cs-minibtn{font-family:'JetBrains Mono',monospace;font-size:.62rem;padding:.36rem .65rem;border-radius:7px;border:1px solid var(--line-bright);transition:all .18s;cursor:pointer}
.cs-minibtn.ok{color:var(--sage);border-color:rgba(93,122,83,.45)}
.cs-minibtn.ok:hover{background:var(--sage);color:#fff;border-color:var(--sage)}
.cs-minibtn.no{color:var(--crimson);border-color:rgba(168,57,43,.4)}
.cs-minibtn.no:hover{background:var(--crimson);color:#fff;border-color:var(--crimson)}
.cs-apprdone{font-family:'JetBrains Mono',monospace;font-size:.64rem;flex-shrink:0;padding-right:.4rem}
.cs-apprdone.ok{color:var(--sage)} .cs-apprdone.no{color:var(--crimson)}

.cs-toolbar{display:flex;align-items:center;gap:.5rem;margin-bottom:1rem;flex-wrap:wrap}
.cs-chip{font-family:'JetBrains Mono',monospace;font-size:.7rem;padding:.45rem .8rem;border:1px solid var(--line-bright);border-radius:8px;background:var(--bg-elev);color:var(--ink-dim);transition:.18s;cursor:pointer}
.cs-chip:hover{border-color:var(--amber);color:var(--ink)}
.cs-chip.active{background:var(--ink);color:var(--bg);border-color:var(--ink)}
.cs-chip .n{opacity:.55;margin-left:.3rem}
.cs-tblwrap{border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--bg-elev)}
.cs-tbl{width:100%;border-collapse:collapse;font-size:.82rem}
.cs-tbl th{text-align:left;font-family:'JetBrains Mono',monospace;font-size:.55rem;text-transform:uppercase;letter-spacing:.13em;color:var(--ink-muted);padding:.6rem .9rem;border-bottom:1px solid var(--line);font-weight:500;background:rgba(0,0,0,0.015)}
.cs-tbl td{padding:.7rem .9rem;border-bottom:1px solid var(--line);vertical-align:middle}
.cs-tbl tbody tr:last-child td{border-bottom:none}
.cs-tbl tbody tr{transition:background .15s}
.cs-tbl tbody tr:hover{background:var(--bg-sunk)}
.cs-ttime{font-family:'JetBrains Mono',monospace;font-size:.66rem;color:var(--ink-muted);white-space:nowrap}
.cs-tact{font-weight:500}
.cs-tagent{display:inline-flex;align-items:center;gap:.4rem;font-family:'JetBrains Mono',monospace;font-size:.65rem;color:var(--ink-dim)}
.cs-tagent .d{width:6px;height:6px;border-radius:50%;flex-shrink:0}
.cs-ttarget{font-family:'JetBrains Mono',monospace;font-size:.66rem;color:var(--blue);white-space:nowrap}
.cs-badge{font-family:'JetBrains Mono',monospace;font-size:.58rem;text-transform:uppercase;letter-spacing:.08em;padding:.24rem .55rem;border-radius:20px;border:1px solid;white-space:nowrap;display:inline-flex;align-items:center;gap:.3rem}
.cs-badge::before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor}
.cs-badge.ok{color:#3d5536;border-color:var(--sage);background:rgba(93,122,83,.12)}
.cs-badge.bad{color:#7a2820;border-color:var(--crimson);background:rgba(168,57,43,.1)}
.cs-badge.rev{color:#7a5e15;border-color:var(--gold);background:rgba(168,134,47,.12)}
@keyframes csNewRow{0%{background:rgba(184,101,36,.22)}100%{background:transparent}}
.cs-tbl tbody tr.cs-fresh{animation:csNewRow 1.8s ease}
@media (max-width:760px){ .cs-col-agent,.cs-col-detail{display:none} }

.cs-rules{display:grid;grid-template-columns:250px 1fr;gap:1.1rem;align-items:start}
.cs-rulelist{display:flex;flex-direction:column;gap:.5rem}
.cs-rulecard{padding:.85rem .95rem;border:1px solid var(--line);border-radius:11px;background:var(--bg-elev);transition:.18s;cursor:pointer}
.cs-rulecard:hover{border-color:var(--line-bright);transform:translateX(2px)}
.cs-rulecard.active{border-color:var(--amber);background:rgba(184,101,36,.06);box-shadow:0 0 0 1px rgba(184,101,36,.2)}
.cs-rctop{display:flex;align-items:center;gap:.5rem;margin-bottom:.35rem}
.cs-rcname{font-family:'Fraunces',serif;font-size:.95rem}
.cs-rcstate{margin-left:auto;font-family:'JetBrains Mono',monospace;font-size:.52rem;text-transform:uppercase;letter-spacing:.1em;padding:.12rem .4rem;border-radius:5px;border:1px solid var(--sage);color:var(--sage);white-space:nowrap}
.cs-rcstate.off{border-color:var(--ink-muted);color:var(--ink-muted)}
.cs-rcdesc{font-family:'JetBrains Mono',monospace;font-size:.62rem;color:var(--ink-muted);line-height:1.5}
.cs-addrule{padding:.8rem;border:1px dashed var(--line-bright);border-radius:11px;text-align:center;font-family:'JetBrains Mono',monospace;font-size:.7rem;color:var(--ink-muted);cursor:pointer}
.cs-addrule:hover{border-color:var(--amber);color:var(--amber)}
.cs-editor{background:var(--bg-elev);border:1px solid var(--line);border-radius:14px;overflow:hidden}
.cs-edhead{padding:1rem 1.2rem;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:.7rem}
.cs-edhead h4{font-family:'Fraunces',serif;font-weight:400;font-size:1.15rem}
.cs-edver{font-family:'JetBrains Mono',monospace;font-size:.56rem;color:var(--ink-muted);padding:.18rem .45rem;border:1px solid var(--line);border-radius:5px}
.cs-toggle{margin-left:auto;width:42px;height:23px;border-radius:20px;background:var(--sage);position:relative;transition:background .2s;cursor:pointer;flex-shrink:0}
.cs-toggle::after{content:'';position:absolute;top:2px;left:21px;width:19px;height:19px;border-radius:50%;background:#fff;transition:left .2s}
.cs-toggle.off{background:var(--ink-muted)}
.cs-toggle.off::after{left:2px}
.cs-edbody{padding:1.2rem}
.cs-nl{background:var(--bg-sunk);border:1px solid var(--line);border-radius:11px;padding:1rem 1.1rem;margin-bottom:1.3rem;position:relative}
.cs-nltag{font-family:'JetBrains Mono',monospace;font-size:.54rem;text-transform:uppercase;letter-spacing:.16em;color:var(--amber);margin-bottom:.45rem}
.cs-nledit{position:absolute;top:1rem;right:1rem;font-family:'JetBrains Mono',monospace;font-size:.6rem;color:var(--blue);cursor:pointer}
.cs-nledit:hover{color:var(--amber)}
.cs-nl p{font-size:.98rem;line-height:1.6;max-width:52ch}
.cs-nl p b{color:var(--amber);font-weight:600}
.cs-seclabel{font-family:'JetBrains Mono',monospace;font-size:.55rem;text-transform:uppercase;letter-spacing:.18em;color:var(--ink-muted);margin-bottom:.9rem}
.cs-flow{display:flex;flex-direction:column}
.cs-fnode{display:flex;gap:.9rem;align-items:flex-start}
.cs-fcol{display:flex;flex-direction:column;align-items:center;flex-shrink:0}
.cs-fdot{width:30px;height:30px;border-radius:8px;border:1px solid var(--line-bright);background:var(--bg);display:flex;align-items:center;justify-content:center;font-family:'JetBrains Mono',monospace;font-size:.68rem;color:var(--ink-dim);z-index:2}
.cs-fnode.trigger .cs-fdot{background:var(--blue);border-color:var(--blue);color:#fff}
.cs-fnode.action .cs-fdot{background:var(--amber);border-color:var(--amber);color:#fff}
.cs-fline{width:1px;flex:1;min-height:16px;background:var(--line-bright)}
.cs-fbody{flex:1;padding-bottom:1rem;min-width:0}
.cs-ft{font-family:'JetBrains Mono',monospace;font-size:.54rem;text-transform:uppercase;letter-spacing:.16em;color:var(--ink-muted);margin-bottom:.28rem}
.cs-fc{background:var(--bg);border:1px solid var(--line);border-radius:9px;padding:.65rem .8rem;font-family:'JetBrains Mono',monospace;font-size:.74rem;color:var(--ink)}
.cs-fc .op{color:var(--amber)}
.cs-fc.allow{border-color:var(--sage);color:#3d5536}
.cs-fc.review{border-color:var(--gold);color:#7a5e15}
.cs-fc.block{border-color:var(--crimson);color:#7a2820}
.cs-history{margin-top:1.4rem;border-top:1px solid var(--line);padding-top:1.1rem}
.cs-histrow{display:flex;align-items:center;gap:.8rem;font-family:'JetBrains Mono',monospace;font-size:.66rem;color:var(--ink-dim);padding:.4rem 0}
.cs-histrow .hv{color:var(--amber);width:38px}
.cs-histrow .hwho{color:var(--ink);min-width:100px}
.cs-histrow .ht{margin-left:auto;color:var(--ink-muted)}

.cs-conns{display:grid;grid-template-columns:repeat(2,1fr);gap:.9rem}
.cs-conn{border:1px solid var(--line);border-radius:13px;background:var(--bg-elev);padding:1.1rem;display:flex;flex-direction:column;gap:.85rem;transition:.2s}
.cs-conn:hover{border-color:var(--line-bright)}
.cs-conn.isoff{opacity:.78}
.cs-conntop{display:flex;align-items:center;gap:.7rem}
.cs-connico{width:34px;height:34px;border-radius:9px;background:var(--bg-sunk);border:1px solid var(--line-bright);display:flex;align-items:center;justify-content:center;font-family:'Fraunces',serif;font-size:1.05rem;color:var(--ink);flex-shrink:0}
.cs-connname{font-family:'Fraunces',serif;font-size:1.02rem;line-height:1}
.cs-connkind{font-family:'JetBrains Mono',monospace;font-size:.56rem;text-transform:uppercase;letter-spacing:.1em;color:var(--ink-muted);margin-top:.25rem}
.cs-connstat{margin-left:auto;font-family:'JetBrains Mono',monospace;font-size:.55rem;text-transform:uppercase;letter-spacing:.08em;display:flex;align-items:center;gap:.35rem;color:var(--sage)}
.cs-connstat .d{width:7px;height:7px;border-radius:50%;background:var(--sage);box-shadow:0 0 8px var(--sage)}
.cs-connstat.degraded{color:var(--gold)} .cs-connstat.degraded .d{background:var(--gold);box-shadow:0 0 8px var(--gold)}
.cs-connstat.isoff{color:var(--ink-muted)} .cs-connstat.isoff .d{background:var(--ink-muted);box-shadow:none}
.cs-connmeta{display:flex;gap:1.4rem;font-family:'JetBrains Mono',monospace;font-size:.64rem;color:var(--ink-muted)}
.cs-connmeta b{color:var(--ink);font-weight:500;display:block;font-size:.8rem;font-family:'Fraunces',serif}
.cs-connbtn{align-self:flex-start;font-family:'JetBrains Mono',monospace;font-size:.62rem;padding:.42rem .75rem;border-radius:7px;border:1px solid var(--line-bright);color:var(--ink-dim);cursor:pointer;transition:.18s}
.cs-connbtn:hover{border-color:var(--amber);color:var(--amber)}
.cs-connbtn.primary{border-color:var(--amber);color:var(--amber)}
.cs-connbtn.primary:hover{background:var(--amber);color:#fff}

.cs-caption{margin-top:1.5rem;display:flex;align-items:center;gap:.8rem;flex-wrap:wrap;font-family:'JetBrains Mono',monospace;font-size:.74rem;color:var(--ink-muted)}
.cs-caption .cs-cdot{width:6px;height:6px;border-radius:50%;background:var(--amber);flex-shrink:0}

@media (max-width:880px){
    .cs-app{grid-template-columns:1fr}
    .cs-rail{flex-direction:row;align-items:center;flex-wrap:wrap;border-right:none;border-bottom:1px solid var(--line);padding:.7rem .6rem;gap:.4rem}
    .cs-brand{border-bottom:none;padding:0 .6rem 0 .4rem}
    .cs-env{margin:0}
    .cs-navlabel{display:none}
    .cs-nav{flex-direction:row;flex-wrap:wrap;padding:0}
    .cs-nav-item{padding:.45rem .7rem;font-size:.8rem}
    .cs-user{display:none}
    .cs-content{height:auto;max-height:none}
    .cs-stats{grid-template-columns:repeat(2,1fr)}
    .cs-row2{grid-template-columns:1fr}
    .cs-rules{grid-template-columns:1fr}
    .cs-conns{grid-template-columns:1fr}
}
