:root {
  --bg: #000;
  --ink: #f4f4f4;
  --dim: #8a8a8a;
  --muted: #595959;
  --line: #242424;
  --line-strong: #4a4a4a;
  --accent: #14F195;
  --accent-ink: #000000;
  --accent-muted: #0FAF70;
  --bad: #b7b7b7;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: var(--mono); font-size: 14px; line-height: 1.65; overflow-x: hidden; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--accent-ink); }

#scroll-progress { position: fixed; inset: 0 auto auto 0; height: 2px; width: calc(var(--scroll-pct, 0) * 1%); background: var(--accent); z-index: 120; pointer-events: none; }
.shell { min-height: 100vh; background: #000; }

.site-header { position: sticky; top: 0; z-index: 100; min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 22px; border-bottom: 1px solid var(--line); background: rgba(0,0,0,.96); }
.brand { white-space: nowrap; color: var(--ink); display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.brand-logo-frame { width: 32px; height: 32px; overflow: hidden; flex: 0 0 auto; background: #000; }
.brand-logo { display: block; width: 100%; height: 100%; object-fit: cover; }
.brand-terminal { display: inline-flex; align-items: baseline; }
.brand .prompt-user { color: #fff; }
.brand .prompt-path { color: var(--dim); }
.brand .prompt-dollar { color: var(--accent); margin-left: 6px; }
.header-nav { display: flex; align-items: center; gap: 18px; color: var(--dim); }
.nav-link { position: relative; padding: 14px 0; }
.nav-link::before { content: "./"; color: var(--muted); }
.nav-link:hover, .nav-link.active { color: var(--accent); }
.top-action { border: 1px solid var(--accent); color: var(--accent); padding: 4px 8px; line-height: 1; }
.top-action::before { content: ""; }
.top-action:hover { background: var(--accent); color: var(--accent-ink); }
.top-action.disabled { border-color: var(--line-strong); color: var(--muted); cursor: default; }
.top-action.disabled:hover { background: transparent; color: var(--muted); }
.x-action { min-width: 30px; text-align: center; font-size: 15px; }
.header-status { color: var(--muted); font-size: 11px; }
.header-status::before { content: "["; }.header-status::after { content: "]"; }

.terminal-main { width: min(1100px, calc(100% - 40px)); margin: 0 auto; }
.hero-cli { min-height: calc(100vh - 52px); display: flex; flex-direction: column; justify-content: center; padding: 70px 0 84px; }
.boot-log { color: var(--dim); margin-bottom: 56px; }
.boot-log > div { opacity: 0; animation: boot-in .28s ease forwards; }
.boot-log > div:nth-child(2) { animation-delay: .12s; }.boot-log > div:nth-child(3) { animation-delay: .24s; }.boot-log > div:nth-child(4) { animation-delay: .36s; }
@keyframes boot-in { to { opacity: 1; } }

.prompt-line { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.prompt-label { color: var(--dim); white-space: nowrap; }
.prompt-label strong { color: var(--ink); font-weight: 400; }
.command-text { min-width: 0; color: var(--ink); word-break: break-word; }
.typed-command { visibility: hidden; }
.typed-command.is-typing, .typed-command.is-done { visibility: visible; }
.cursor { width: 8px; height: 1.1em; background: var(--accent); display: inline-block; margin-left: 4px; vertical-align: -2px; animation: blink .9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-output { margin-top: 32px; max-width: 900px; }
.hero-title { margin: 0; font-weight: 400; font-size: clamp(36px, 7vw, 88px); line-height: .98; letter-spacing: -.07em; text-transform: lowercase; }
.hero-copy { margin: 28px 0 0; max-width: 720px; color: #b5b5b5; font-size: clamp(14px, 1.6vw, 18px); }
.cli-actions { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 36px; }
.cli-link, .button { border: 0; border-bottom: 1px solid var(--line-strong); background: transparent; color: var(--ink); padding: 3px 0; border-radius: 0; }
.cli-link::before { content: "$ "; color: var(--dim); }
.cli-link:hover, .button:hover { border-color: var(--accent); color: var(--accent); }
.button.primary::before { content: "> "; color: var(--ink); }.button.danger { color: #aaa; }.button.small { font-size: 12px; }.button.ghost { color: var(--dim); }

.scroll-hint { margin-top: 70px; color: var(--muted); font-size: 11px; }
.scroll-hint span { display: inline-block; animation: scroll-nudge 1.5s ease-in-out infinite; }
@keyframes scroll-nudge { 50% { transform: translateY(5px); } }

.cli-section { min-height: 78vh; display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 54px; align-content: center; padding: 120px 0; border-top: 1px solid var(--line); }
.cli-section-index { color: var(--muted); font-size: 11px; position: sticky; top: 82px; align-self: start; }
.cli-section-index .section-meter { margin-top: 9px; letter-spacing: -1px; white-space: nowrap; }
.cli-block { min-width: 0; }
.cli-output { margin: 24px 0 0 0; opacity: .12; transform: translateY(12px); transition: opacity .55s ease .12s, transform .55s ease .12s; }
.reveal.is-visible .cli-output { opacity: 1; transform: none; }
.output-comment { color: var(--dim); margin-bottom: 22px; max-width: 760px; }
.output-comment::before { content: "# "; color: var(--muted); }
.kv-list { border-top: 1px solid var(--line); }
.kv-row { display: grid; grid-template-columns: minmax(150px, 240px) minmax(0,1fr); gap: 30px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.kv-key { color: var(--dim); }.kv-value { color: var(--ink); word-break: break-word; }
.kv-value.ok { color: var(--accent); }.kv-value.ok::before { content: "[OK] "; }.kv-value.denied::before { content: "[DENY] "; color: var(--dim); }
.code-line { padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; gap: 18px; justify-content: space-between; align-items: center; overflow: auto; }
.code-line code { white-space: nowrap; }

.footer { width: min(1100px, calc(100% - 40px)); margin: 0 auto; padding: 34px 0 60px; border-top: 1px solid var(--line); color: var(--muted); display: flex; justify-content: space-between; gap: 24px; font-size: 11px; }
.footer .prompt { color: var(--ink); }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 16px; color: var(--muted); }
.footer-nav a::before { content: "./"; color: var(--muted); }
.footer-nav a:hover { color: var(--ink); }

.console-shell { width: min(1280px, 100%); margin: 0 auto; display: grid; grid-template-columns: 310px minmax(0,1fr); min-height: calc(100vh - 52px); }
.sidebar { border-right: 1px solid var(--line); padding: 28px 18px 60px; min-width: 0; }
.side-meta { color: var(--dim); font-size: 11px; padding-bottom: 26px; white-space: pre-line; }
.side-meta::before { content: "$ nexine whoami\A"; white-space: pre; color: var(--ink); }
.side-tabs { display: flex; flex-direction: column; align-items: stretch; gap: 0; border-top: 1px solid var(--line); margin-bottom: 24px; }
.side-tab { text-align: left; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--dim); padding: 9px 0; }
.side-tab::before { content: "  "; }.side-tab.active { color: var(--ink); }.side-tab.active::before { content: "> "; }
.control-list { border-top: 1px solid var(--line); }
.control-card { width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--dim); padding: 13px 0; }
.control-card:hover, .control-card.active { color: var(--ink); }.control-card.active .control-name::before { content: "> "; }.control-card:not(.active) .control-name::before { content: "  "; }
.control-meta { color: var(--muted); font-size: 10px; display: flex; justify-content: space-between; gap: 12px; margin-top: 5px; }
.meter { height: 1px; background: var(--line); margin-top: 9px; }.meter > i { display: block; height: 1px; background: var(--accent); }
.console-main { min-width: 0; padding: 44px 42px 80px; }
.console-topline, .toolbar { display: flex; justify-content: space-between; gap: 28px; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 30px; }
.console-title h1, .toolbar h1 { font-weight: 400; font-size: 28px; margin: 7px 0 0; }.console-title p { margin: 8px 0 0; color: var(--dim); font-size: 11px; }
.eyebrow { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }.eyebrow::before { content: "# "; }
.actions { display: flex; flex-wrap: wrap; gap: 12px 18px; justify-content: flex-end; }
.status-pill { color: var(--dim); font-size: 11px; }.status-pill::before { content: "["; }.status-pill::after { content: "]"; }.status-pill.active { color: var(--accent); }
.status-dot { display: none; }

.stat-block, .panel { border: 0; border-bottom: 1px solid var(--line); padding: 0 0 28px; margin: 0 0 28px; background: transparent; }
.stat-label, .policy-label { color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.big-stat { margin: 10px 0 8px; font-size: 26px; }.big-stat small { color: var(--muted); font-size: 12px; }
.progress { height: 1px; background: var(--line); }.progress span { display: block; height: 1px; background: var(--accent); }
.split { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(260px,.85fr); gap: 48px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 14px; }.panel-head h2 { font-size: 13px; font-weight: 400; margin: 0; }.panel-head h2::before { content: "$ nexine inspect "; color: var(--dim); }.panel-count { color: var(--muted); font-size: 10px; }
.policy-grid { border-top: 1px solid var(--line); }.policy-item { display: grid; grid-template-columns: 160px 1fr; gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--line); }.policy-value { font-size: 12px; }
.address-list { display: flex; flex-direction: column; margin-top: 10px; }.tag { padding: 5px 0; color: var(--dim); font-size: 11px; }.tag::before { content: "- "; }
.authority-line { display: none; }.kv { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 18px; border-top: 1px solid var(--line); padding: 9px 0; font-size: 11px; }.kv span:first-child { color: var(--dim); }

.activity-panel { overflow-x: auto; }.activity-table { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 11px; }.activity-table th, .activity-table td { text-align: left; border-bottom: 1px solid var(--line); padding: 10px 10px 10px 0; font-weight: 400; vertical-align: top; }.activity-table th { color: var(--muted); }.decision-code { color: var(--dim); }.decision-code.good { color: var(--ink); }.decision-code::before { content: "["; }.decision-code::after { content: "]"; }
.filter-row { display: flex; gap: 12px; }

.input, .select, textarea.input { width: 100%; color: var(--ink); background: #000; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; padding: 8px 0; outline: none; }.input:focus, .select:focus, textarea.input:focus { border-color: var(--ink); }.select { appearance: none; }.field label { color: var(--dim); display: block; margin-bottom: 4px; font-size: 10px; text-transform: uppercase; }.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; }.field.wide { grid-column: 1/-1; }
.modal-backdrop { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.86); display: grid; place-items: center; padding: 20px; }.modal { width: min(720px,100%); max-height: 90vh; overflow: auto; background: #000; border: 1px solid var(--line-strong); padding: 24px; box-shadow: 14px 14px 0 #111; animation: terminal-open .18s ease both; }@keyframes terminal-open { from { opacity: 0; transform: translateY(8px); } }
.modal::before { content: "nexine@agent:~/control$ dialog --interactive"; display: block; color: var(--dim); border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 18px; }.modal-head { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 22px; }.modal-head h2 { font-size: 15px; font-weight: 400; margin: 0; }.modal-foot { display: flex; justify-content: flex-end; gap: 20px; padding-top: 24px; }.notice { color: var(--dim); }.notice::before { content: "# "; }.codebox { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; word-break: break-all; }
.toast { position: fixed; z-index: 300; right: 18px; bottom: 18px; border: 1px solid var(--line-strong); background: #000; color: var(--ink); padding: 9px 12px; font-size: 11px; }.toast::before { content: "[ok] "; }
.empty { color: var(--dim); padding: 20px 0; }.empty::before { content: "# "; }

.docs { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 70px 0 100px; }.docs-layout { display: grid; grid-template-columns: 230px minmax(0,1fr); gap: 70px; }.docs-nav { position: sticky; top: 82px; align-self: start; display: flex; flex-direction: column; border-top: 1px solid var(--line); }.docs-nav a { color: var(--dim); padding: 8px 0; border-bottom: 1px solid var(--line); }.docs-nav a::before { content: "./"; }.docs-nav a:hover { color: var(--ink); }.docs article { min-width: 0; }.docs h1 { font-size: clamp(28px,5vw,54px); line-height: 1.05; letter-spacing: -.05em; font-weight: 400; margin: 16px 0 30px; }.docs h2 { scroll-margin-top: 90px; margin: 70px 0 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 400; }.docs h2::before { content: "$ nexine docs "; color: var(--dim); }.docs p { color: #b1b1b1; max-width: 760px; }.docs pre { white-space: pre-wrap; overflow-wrap: anywhere; border-left: 1px solid var(--line-strong); padding: 14px 0 14px 18px; color: var(--ink); }.docs code { color: var(--ink); }.docs table { width: 100%; border-collapse: collapse; font-size: 12px; }.docs th, .docs td { text-align: left; font-weight: 400; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }.docs th { color: var(--muted); }

.reveal { opacity: .55; transition: opacity .5s ease; }.reveal.is-visible { opacity: 1; }
.reveal .prompt-line { transform: translateX(-10px); opacity: .2; transition: transform .35s ease, opacity .35s ease; }.reveal.is-visible .prompt-line { transform: none; opacity: 1; }

@media (max-width: 900px) {
  .cli-section { grid-template-columns: 1fr; gap: 24px; min-height: auto; padding: 90px 0; }.cli-section-index { position: static; }
  .console-shell { grid-template-columns: 1fr; }.sidebar { border-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 24px; }.control-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 18px; }
  .split { grid-template-columns: 1fr; gap: 0; }.docs-layout { grid-template-columns: 1fr; gap: 36px; }.docs-nav { position: static; display: grid; grid-template-columns: repeat(2,1fr); gap: 0 20px; }
}
@media (max-width: 640px) {
  body { font-size: 12px; }.site-header { padding: 0 14px; }.brand-logo-frame { width: 28px; height: 28px; }.header-status { display: none; }.header-nav { gap: 12px; }
  .terminal-main, .footer, .docs { width: min(100% - 28px, 1100px); }.hero-cli { padding-top: 54px; min-height: 88vh; }.boot-log { margin-bottom: 42px; }.hero-title { font-size: 42px; letter-spacing: -.055em; }.cli-actions { flex-direction: column; align-items: flex-start; }
  .kv-row { grid-template-columns: 1fr; gap: 2px; }.console-main { padding: 28px 16px 70px; }.console-topline, .toolbar { flex-direction: column; }.actions { justify-content: flex-start; }.control-list { grid-template-columns: 1fr; }.form-grid { grid-template-columns: 1fr; }.field.wide { grid-column: auto; }.policy-item { grid-template-columns: 1fr; gap: 3px; }.modal { padding: 18px; box-shadow: 8px 8px 0 #111; }
  .footer { flex-direction: column; }.footer-nav { justify-content: flex-start; }.docs-nav { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
