@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

/* ============================================================
   AegisLoader — "blueprint" design language
   mono-led · sharp · hairline rules · graph grid · accent = status only
   ============================================================ */
:root {
  --bg: #070a0f;
  --panel: #0c111b;
  --panel-2: #111a29;
  --panel-3: #182236;
  --line: rgba(255,255,255,.07);
  --line-2: rgba(255,255,255,.13);
  --grid: rgba(255,255,255,.02);
  --text: #eef2f8;
  --muted: #98a3b4;
  --faint: #5f6a7b;

  --accent: #38bdf8;
  --accent-2: #2f7bff;
  --accent-ink: #04121f;
  --good: #38bdf8;
  --sky: #b39cff;
  --teal: #5fd18a;
  --amber: #e0a53a;
  --red: #ef5f6b;

  --r: 9px;
  --sidebar-w: 236px;
  --topbar-h: 56px;

  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--text); font-family: var(--sans); font-size: 14.5px; line-height: 1.55;
  background-color: var(--bg);
  background-image: radial-gradient(820px 460px at 88% -8%, rgba(47,123,255,.12), transparent 60%), radial-gradient(680px 400px at 2% 0%, rgba(56,189,248,.07), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4 { font-weight: 600; letter-spacing: -0.01em; margin: 0; }
a { color: inherit; }
code, .mono { font-family: var(--mono); }
::selection { background: rgba(56,189,248,.28); }
[hidden] { display: none !important; }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:where(a,button,input,select,textarea,[tabindex]):focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 200; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; font-weight: 600; text-decoration: none; font-family: var(--mono); transition: top .15s; }
.skip-link:focus { top: 12px; }

/* mono micro-label used all over */
.mlabel { font-family: var(--mono); text-transform: uppercase; letter-spacing: .16em; font-size: 0.7rem; color: var(--faint); font-weight: 500; }
.sec-label { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.sec-label .n { font-family: var(--mono); color: var(--accent); font-size: 0.75rem; letter-spacing: .1em; }
.sec-label .t { font-family: var(--mono); text-transform: uppercase; letter-spacing: .18em; font-size: 0.75rem; color: var(--muted); }
.sec-label .bar { flex: 1; height: 1px; background: var(--line); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border: 1px solid var(--line-2); border-radius: var(--r); background: transparent; color: var(--text); font-family: var(--mono); font-weight: 500; font-size: 0.82rem; letter-spacing: .02em; cursor: pointer; text-decoration: none; transition: border-color .12s, background .12s, color .12s; white-space: nowrap; }
.btn:hover { border-color: var(--faint); background: var(--panel-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: linear-gradient(180deg, #63cbff, var(--accent-2)); color: var(--accent-ink); border-color: transparent; font-weight: 600; box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.07); background: linear-gradient(180deg, #74d2ff, #3b86ff); border-color: transparent; }
.btn-subtle { background: var(--panel-2); }
.btn-danger { color: var(--red); border-color: rgba(239,95,107,.4); }
.btn-danger:hover { background: rgba(239,95,107,.09); border-color: var(--red); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover:not(:disabled) { background: var(--panel-2); border-color: var(--line); color: var(--text); }
.btn-sm { padding: 6px 11px; font-size: 0.76rem; }
.btn-block { width: 100%; justify-content: center; }
.btn .spin { width: 14px; height: 14px; border-radius: 999px; border: 2px solid rgba(0,0,0,.3); border-top-color: currentColor; animation: spin .7s linear infinite; display: none; }
.btn.is-loading .spin { display: inline-block; }
.btn.is-loading .btn-label { opacity: .7; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- pills (mono tags) ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border: 1px solid var(--line-2); border-radius: var(--r); font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--panel-2); white-space: nowrap; }
.pill .dot { width: 5px; height: 5px; border-radius: 999px; background: currentColor; }
.pill-free, .pill-ok { color: var(--good); border-color: rgba(56,189,248,.34); }
.pill-ad, .pill-warn { color: var(--amber); border-color: rgba(224,165,58,.32); }
.pill-paid { color: var(--sky); border-color: rgba(179,156,255,.32); }
.pill-ks { color: var(--teal); border-color: rgba(95,209,138,.34); }
.pill-bad { color: var(--red); border-color: rgba(239,95,107,.32); }

/* ---------- panels / cards ---------- */
.card, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 1px 2px rgba(0,0,0,.28); }
.card-pad { padding: 20px; }
.ticked { position: relative; }
.ticked::before, .ticked::after { content: ""; position: absolute; width: 7px; height: 7px; border-color: var(--faint); pointer-events: none; }
.ticked::before { top: -1px; left: -1px; border-top: 1px solid; border-left: 1px solid; }
.ticked::after { bottom: -1px; right: -1px; border-bottom: 1px solid; border-right: 1px solid; }

/* ============================================================
   APP SHELL
   ============================================================ */
.app-shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--panel); border-right: 1px solid var(--line); padding: 14px 10px; }
.sb-brand { display: flex; align-items: center; gap: 9px; padding: 6px 10px 16px; text-decoration: none; }
.brand-mark { width: 26px; height: 26px; flex: none; border-radius: 6px; object-fit: cover; display: block; }
.brand-name { font-family: var(--mono); font-weight: 600; font-size: 1rem; letter-spacing: .02em; }
.sb-group { margin-top: 16px; }
.sb-group-label { font-family: var(--mono); font-size: 0.64rem; text-transform: uppercase; letter-spacing: .18em; color: var(--faint); padding: 4px 12px 8px; }
.sb-link { display: flex; align-items: center; gap: 11px; padding: 8px 11px; color: var(--muted); text-decoration: none; font-size: 0.86rem; margin-bottom: 1px; border-left: 2px solid transparent; transition: background .1s, color .1s; }
.sb-link svg { width: 17px; height: 17px; flex: none; }
.sb-link:hover { background: var(--panel-2); color: var(--text); }
.sb-link.active { background: rgba(56,189,248,.12); color: var(--text); border-left-color: var(--accent); }
.sb-link.active svg { color: var(--accent); }
.sb-spacer { flex: 1; }
.sb-foot { border-top: 1px solid var(--line); padding-top: 10px; }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; text-decoration: none; color: var(--text); }
.sb-user:hover { background: var(--panel-2); }
.avatar { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--accent); font-family: var(--mono); font-weight: 600; font-size: 0.85rem; }
.sb-user .who b { display: block; font-size: 0.84rem; font-weight: 600; }
.sb-user .who span { font-family: var(--mono); font-size: 0.68rem; color: var(--faint); text-transform: uppercase; letter-spacing: .1em; }

.app-main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 15; height: var(--topbar-h); display: flex; align-items: center; gap: 14px; padding: 0 22px; background: rgba(7,10,15,.82); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar h1 { font-family: var(--mono); font-size: 0.9rem; font-weight: 500; letter-spacing: .02em; display: flex; align-items: center; gap: 8px; }
.topbar h1::before { content: "▸"; color: var(--accent); }
.topbar-search { margin-left: auto; display: flex; align-items: center; gap: 8px; width: min(300px, 32vw); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 12px; color: var(--faint); }
.topbar-search svg { width: 14px; height: 14px; flex: none; }
.topbar-search input { border: 0; background: transparent; color: var(--text); font-family: var(--mono); font-size: 0.8rem; width: 100%; outline: none; }
.sb-toggle { display: none; background: transparent; border: 1px solid var(--line-2); color: var(--text); border-radius: var(--r); padding: 6px; cursor: pointer; }
.sb-toggle svg { width: 18px; height: 18px; display: block; }

.page { padding: 24px 22px 60px; max-width: 1180px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-title { font-size: 1.35rem; }
.page-head .lede { color: var(--muted); font-size: 0.9rem; margin: 6px 0 0; }

/* ---------- stat cells ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-bottom: 22px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.stat { padding: 16px 18px; border-right: 1px solid var(--line); background: var(--panel); }
.stat:last-child { border-right: 0; }
.stat .k { font-family: var(--mono); text-transform: uppercase; letter-spacing: .12em; font-size: 0.66rem; color: var(--faint); }
.stat .v { font-family: var(--mono); font-size: 1.6rem; font-weight: 600; margin-top: 10px; letter-spacing: -0.01em; }
.stat .delta { font-family: var(--mono); font-size: 0.72rem; margin-top: 5px; color: var(--muted); }
.delta.up { color: var(--accent); } .delta.down { color: var(--red); }

/* ---------- panel head + grid ---------- */
.panel { overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.panel-head h3 { font-family: var(--mono); text-transform: uppercase; letter-spacing: .12em; font-size: 0.76rem; font-weight: 600; color: var(--text); }
.panel-head .sub { font-family: var(--mono); color: var(--faint); font-size: 0.7rem; text-transform: uppercase; letter-spacing: .08em; }
.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
table.data th { text-align: left; padding: 10px 16px; font-family: var(--mono); color: var(--faint); font-weight: 500; font-size: 0.66rem; text-transform: uppercase; letter-spacing: .1em; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
/* keys / HWIDs / device ids are single identifiers — keep them on one line (the table-wrap scrolls x) instead of wrapping and thickening the row */
table.data td.mono, table.data td .mono { white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--panel-2); }
.cell-mono { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.cell-strong { font-weight: 600; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.icon-btn { display: grid; place-items: center; width: 29px; height: 29px; border-radius: var(--r); background: transparent; border: 1px solid var(--line); color: var(--muted); cursor: pointer; transition: .1s; }
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); background: var(--panel-2); }
.icon-btn.danger:hover { color: var(--red); border-color: rgba(239,95,107,.4); }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.search-input, .select { background: var(--bg); border: 1px solid var(--line); color: var(--text); font-family: var(--mono); font-size: 0.8rem; padding: 8px 12px; border-radius: var(--r); outline: none; }
.search-input { min-width: 240px; }
.search-input:focus, .select:focus { border-color: var(--line-2); }
.toolbar .spacer { flex: 1; }
.empty { padding: 40px; text-align: center; color: var(--faint); font-family: var(--mono); font-size: 0.82rem; }

/* ---------- forms ---------- */
.field { margin-bottom: 15px; }
.field label { display: block; font-family: var(--mono); text-transform: uppercase; letter-spacing: .1em; font-size: 0.68rem; margin-bottom: 7px; color: var(--muted); }
.input { width: 100%; background: var(--bg); border: 1px solid var(--line-2); color: var(--text); font-family: var(--sans); font-size: 0.9rem; padding: 10px 12px; border-radius: var(--r); outline: none; transition: border-color .12s; }
.input:focus { border-color: var(--accent); }
select.input { font-family: var(--mono); font-size: 0.82rem; }
.hint { font-family: var(--mono); font-size: 0.72rem; color: var(--faint); margin: 6px 0 0; }
.field-error { color: var(--red); font-family: var(--mono); font-size: 0.76rem; margin: 6px 0 0; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.86rem; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 38px; height: 21px; border-radius: var(--r); background: var(--panel-3); border: 1px solid var(--line-2); transition: .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; background: var(--faint); transition: .15s; }
.switch input:checked + .track { background: rgba(56,189,248,.22); border-color: var(--accent); }
.switch input:checked + .track::after { transform: translateX(17px); background: var(--accent); }

/* ---------- code block ---------- */
.code-block { position: relative; }
.code-block pre { margin: 0; padding: 13px 84px 13px 14px; overflow-x: auto; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); }
.code-block code { font-family: var(--mono); font-size: 0.8rem; color: var(--text); white-space: pre; }
.btn-copy { position: absolute; top: 8px; right: 8px; }
.btn-copy.copied { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(4,4,6,.72); opacity: 0; pointer-events: none; transition: opacity .13s; }
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal { width: 100%; max-width: 470px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: 0 24px 70px -24px rgba(0,0,0,.75); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-family: var(--mono); text-transform: uppercase; letter-spacing: .1em; font-size: 0.82rem; }
.modal-body { padding: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); }
.modal-x { background: transparent; border: 0; color: var(--muted); cursor: pointer; font-size: 1.2rem; line-height: 1; padding: 4px; }
.modal-x:hover { color: var(--text); }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-height: 120px; justify-content: center; padding: 18px; cursor: pointer; border: 1px dashed var(--line-2); border-radius: var(--r); background: var(--bg); color: var(--muted); font-family: var(--mono); font-size: 0.8rem; transition: .12s; }
.dropzone:hover, .dropzone.is-drag { border-color: var(--accent); color: var(--text); }
.dropzone svg { width: 26px; height: 26px; color: var(--accent); }
.file-picked { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); }
.file-picked .fn { font-family: var(--mono); font-size: 0.82rem; }
.file-picked .fs { font-family: var(--mono); font-size: 0.72rem; color: var(--faint); }

/* ---------- toast ---------- */
.toast-wrap { position: fixed; bottom: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 15px; min-width: 220px; background: var(--panel-2); border: 1px solid var(--line-2); border-left: 2px solid var(--accent); border-radius: var(--r); font-family: var(--mono); font-size: 0.8rem; box-shadow: 0 10px 30px -12px rgba(0,0,0,.7); animation: toast-in .18s ease; }
.toast.err { border-left-color: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateX(10px); } }

/* ---------- chart ---------- */
.chart { width: 100%; height: 190px; display: block; }
.chart .area { fill: url(#g-accent); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.chart .grid { stroke: var(--line); stroke-width: 1; }

/* ---------- tabs ---------- */
.tabs { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.tab { padding: 8px 16px; border: 0; background: transparent; color: var(--muted); font-family: var(--mono); font-weight: 500; font-size: 0.78rem; text-transform: uppercase; letter-spacing: .08em; cursor: pointer; border-right: 1px solid var(--line); }
.tab:last-child { border-right: 0; }
.tab.active { background: var(--panel-2); color: var(--accent); }

/* ============================================================
   LANDING (blueprint)
   ============================================================ */
.wrap { width: 100%; max-width: 1060px; margin-inline: auto; padding-inline: 22px; }
.specbar { border-bottom: 1px solid var(--line); background: rgba(10,11,13,.8); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 30; }
.specbar-inner { display: flex; align-items: center; gap: 20px; height: 52px; }
.specbar .brand-name { font-size: 0.95rem; }
.specbar .tag { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--faint); }
.mh-nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.mh-nav a { font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-decoration: none; }
.mh-nav a:hover { color: var(--text); }

.hero { padding: 70px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; }
.hero .kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.hero .kicker .n { font-family: var(--mono); color: var(--accent); font-size: 0.72rem; letter-spacing: .1em; }
.hero .kicker .t { font-family: var(--mono); text-transform: uppercase; letter-spacing: .16em; font-size: 0.72rem; color: var(--muted); }
.hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.06; letter-spacing: -0.02em; }
.hero h1 .em { color: var(--accent); }
.hero p { color: var(--muted); font-size: 1.02rem; max-width: 460px; margin: 20px 0 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-panel { padding: 0; }
.hero-panel .hp-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.hero-panel .hp-body { padding: 16px 14px; }
.hp-row { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.hp-row:last-child { border-bottom: 0; }
.hp-row .k { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.hp-row .v { font-family: var(--mono); font-size: 1.05rem; color: var(--text); }
.hp-row .v.ok { color: var(--accent); }

.section { padding: 52px 0; border-top: 1px solid var(--line); }
.spec-list { border: 1px solid var(--line); border-radius: var(--r); }
.spec-row { display: grid; grid-template-columns: 190px 1fr; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.spec-row:last-child { border-bottom: 0; }
.spec-row .term { font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; font-size: 0.78rem; color: var(--text); }
.spec-row .desc { color: var(--muted); font-size: 0.92rem; }
.spec-row:hover { background: var(--panel); }

.pipeline { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--r); }
.pipe-cell { padding: 22px 20px; border-right: 1px solid var(--line); }
.pipe-cell:last-child { border-right: 0; }
.pipe-cell .n { font-family: var(--mono); font-size: 1.6rem; color: var(--panel-3); -webkit-text-stroke: 1px var(--line-2); }
.pipe-cell h3 { font-family: var(--mono); text-transform: uppercase; letter-spacing: .1em; font-size: 0.82rem; margin: 12px 0 8px; }
.pipe-cell p { color: var(--muted); font-size: 0.9rem; margin: 0; }

.modes-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.mode-col { padding: 22px 20px; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.mode-col:last-child { border-right: 0; }
.mode-col.featured { background: var(--panel); }
.mode-col .mtag { font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); min-height: 14px; }
.mode-col h3 { font-family: var(--mono); font-size: 1.05rem; margin: 10px 0 4px; letter-spacing: .02em; }
.mode-col .mp { color: var(--faint); font-family: var(--mono); font-size: 0.72rem; margin-bottom: 16px; }
.mode-col ul { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 9px; }
.mode-col li { display: flex; gap: 9px; color: var(--muted); font-size: 0.88rem; }
.mode-col li::before { content: "+"; color: var(--accent); font-family: var(--mono); }
.mode-col .btn { margin-top: auto; }

.cta { border: 1px solid var(--line); border-radius: var(--r); padding: 48px 24px; text-align: center; }
.cta h2 { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: 10px; }
.cta p { color: var(--muted); margin: 0 0 22px; }

.marketing-footer { border-top: 1px solid var(--line); }
.mf-inner { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; padding-block: 24px; }
.mf-links { display: flex; gap: 20px; }
.mf-links a { font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-decoration: none; }
.mf-links a:hover { color: var(--text); }
.mf-note { margin-left: auto; font-family: var(--mono); font-size: 0.7rem; color: var(--faint); }

/* ============================================================
   AUTH
   ============================================================ */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 380px; padding: 28px; }
.auth-brand { display: flex; align-items: center; gap: 9px; justify-content: center; margin-bottom: 18px; }
.auth-card h1 { text-align: center; font-family: var(--mono); font-size: 1.1rem; letter-spacing: .02em; margin-bottom: 4px; }
.auth-card .sub { text-align: center; color: var(--muted); font-size: 0.86rem; margin: 0 0 22px; }
.auth-tabs { width: 100%; margin-bottom: 20px; }
.auth-tabs .tab { flex: 1; text-align: center; }
.auth-alt { text-align: center; font-family: var(--mono); color: var(--faint); font-size: 0.76rem; margin-top: 18px; }
.auth-alt a { color: var(--accent); text-decoration: none; }

/* ---------- legal ---------- */
.legal { max-width: 720px; margin-inline: auto; padding: 52px 22px 80px; }
.legal h1 { font-size: 1.6rem; margin-bottom: 6px; }
.legal .updated { font-family: var(--mono); color: var(--faint); font-size: 0.76rem; margin: 0 0 26px; }
.legal h2 { font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; font-size: 0.86rem; margin: 26px 0 8px; }
.legal p { color: var(--muted); }
.back-link { display: inline-block; margin-bottom: 22px; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--text); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .grid-2, .hero-grid { grid-template-columns: 1fr; }
  .pipeline, .modes-row { grid-template-columns: 1fr; }
  .pipe-cell, .mode-col { border-right: 0; border-bottom: 1px solid var(--line); }
  .pipe-cell:last-child, .mode-col:last-child { border-bottom: 0; }
  .spec-row { grid-template-columns: 1fr; gap: 6px; }
  .mf-note { margin-left: 0; width: 100%; }
}
@media (max-width: 760px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; width: 250px; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .sb-toggle { display: inline-grid; place-items: center; }
  .scrim { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: .2s; }
  .scrim.show { opacity: 1; pointer-events: auto; }
  .topbar-search { display: none; }
}
/* ============================================================
   MOTION
   ============================================================ */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(56,189,248,.45); } 70% { box-shadow: 0 0 0 6px rgba(56,189,248,0); } 100% { box-shadow: 0 0 0 0 rgba(56,189,248,0); } }
@keyframes scan { 0% { top: -8%; opacity: 0; } 12% { opacity: .7; } 88% { opacity: .7; } 100% { top: 108%; opacity: 0; } }

/* landing scroll-reveal — gated by .js-reveal so no-JS / reduced-motion always shows content */
.js-reveal :is(.hero-grid > *, .section) { opacity: 0; transform: translateY(16px); transition: opacity .6s cubic-bezier(.2,.65,.2,1), transform .6s cubic-bezier(.2,.65,.2,1); }
.js-reveal :is(.hero-grid > *, .section).in { opacity: 1; transform: none; }
.js-reveal .hero-grid > *:nth-child(2) { transition-delay: .12s; }
.js-reveal .section :is(.spec-row, .pipe-cell, .mode-col) { opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .5s; }
.js-reveal .section.in :is(.spec-row, .pipe-cell, .mode-col) { opacity: 1; transform: none; }
.js-reveal .section.in :is(.spec-row, .pipe-cell, .mode-col):nth-child(2) { transition-delay: .06s; }
.js-reveal .section.in :is(.spec-row, .pipe-cell, .mode-col):nth-child(3) { transition-delay: .12s; }
.js-reveal .section.in :is(.spec-row, .pipe-cell, .mode-col):nth-child(4) { transition-delay: .18s; }
.js-reveal .section.in :is(.spec-row, .pipe-cell, .mode-col):nth-child(5) { transition-delay: .24s; }
.js-reveal .section.in :is(.spec-row, .pipe-cell, .mode-col):nth-child(6) { transition-delay: .30s; }

/* app-page entrance — pure CSS, ends visible (safe with no JS) */
.page-head { animation: rise .5s both; }
.stat-grid { animation: rise .5s both .04s; }
.grid-2 > * { animation: rise .55s both .10s; }
.page > .panel, .page > .toolbar { animation: rise .55s both .14s; }

/* hover polish */
.sb-link { transition: background .1s, color .1s, border-color .1s, transform .12s; }
.sb-link:hover { transform: translateX(2px); }
.mh-nav a { transition: color .14s; }
.stat { transition: background .12s; }
.stat:hover { background: var(--panel-2); }
.mode-col { transition: background .14s; }
.mode-col:hover { background: var(--panel); }
.spec-row { transition: background .12s; }
.btn-primary { transition: background .12s, border-color .12s, box-shadow .16s, transform .05s; }
.btn-primary:hover:not(:disabled) { box-shadow: 0 8px 22px -10px rgba(47,123,255,.6); }
.icon-btn, .pill { transition: color .12s, border-color .12s, background .12s; }
table.data tbody tr { transition: background .1s; }
.modal { transition: transform .14s, opacity .14s; transform: translateY(8px); opacity: .6; }
.modal-backdrop.open .modal { transform: none; opacity: 1; }

/* live dots */
.pill-ok .dot { animation: pulse 2s infinite; }
.hp-row .v.ok { display: inline-flex; align-items: center; gap: 7px; }
.hp-row .v.ok::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: var(--accent); animation: pulse 2s infinite; }

/* hero panel scan sweep + typed caret */
.hp-body { position: relative; overflow: hidden; }
.hp-scan { position: absolute; left: 0; right: 0; top: -8%; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0; pointer-events: none; animation: scan 5s ease-in-out infinite; }
.caret::after { content: "▋"; color: var(--accent); margin-left: 1px; animation: blink 1.05s steps(1) infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js-reveal :is(.hero-grid > *, .section),
  .js-reveal .section :is(.spec-row, .pipe-cell, .mode-col) { opacity: 1 !important; transform: none !important; }
}

/* ===================== landing v2 (AegisLoader) ===================== */
body.lp { background:
  radial-gradient(1100px 500px at 50% -200px, rgba(56,189,248,.08), transparent 70%),
  var(--bg); }

/* hero */
.lp-hero { position: relative; overflow: hidden; padding: 76px 0 44px; }
.lp-hero-glow { position: absolute; top: -160px; left: 50%; transform: translateX(-50%);
  width: 1000px; height: 560px; pointer-events: none; z-index: 0;
  background: radial-gradient(50% 50% at 50% 50%, rgba(56,189,248,.12), transparent 70%); }
.lp-hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.lp-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: .72rem;
  text-transform: uppercase; letter-spacing: .14em; color: var(--muted); border: 1px solid var(--line-2);
  background: var(--panel-2); border-radius: 999px; padding: 5px 12px; }
.lp-eyebrow .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.lp-hero h1 { font-size: clamp(2.2rem, 5.2vw, 3.5rem); line-height: 1.05; letter-spacing: -.02em; margin: 20px 0 0; }
.lp-hero h1 .em { color: var(--accent); }
.lp-hero-copy > p { color: var(--muted); font-size: 1.05rem; line-height: 1.6; max-width: 520px; margin: 18px 0 26px; }
.lp-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.lp-hero-cta .btn { padding: 12px 20px; font-size: .9rem; }
.lp-trust { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 26px; color: var(--faint); font-family: var(--mono); font-size: .76rem; }

/* hero showcase */
.lp-show { display: flex; flex-direction: column; gap: 0; }
.lp-show-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 24px 60px -30px rgba(0,0,0,.8); }
.lp-show-head { display: flex; align-items: center; gap: 10px; padding: 9px 13px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: .7rem; color: var(--faint); letter-spacing: .04em; }
.lp-dots { display: inline-flex; gap: 5px; }
.lp-dots i { width: 8px; height: 8px; border-radius: 999px; background: var(--line-2); }
.lp-code { margin: 0; padding: 15px 16px; font-family: var(--mono); font-size: .76rem; line-height: 1.65;
  color: var(--text); overflow-x: auto; white-space: pre; }
.lp-code-protect { color: var(--muted); word-break: break-all; }
.lp-show-arrow { align-self: center; font-family: var(--mono); font-size: .72rem; text-transform: uppercase;
  letter-spacing: .12em; color: var(--accent); padding: 12px 0; }
.c-kw { color: #b39cff; } .c-fn { color: #6ec7ff; } .c-str { color: var(--amber); }
.c-ac { color: var(--accent); } .c-mut { color: var(--faint); }

/* highlight band */
.lp-band-wrap { border-block: 1px solid var(--line); background: var(--panel); }
.lp-band { display: grid; grid-template-columns: repeat(4, 1fr); }
.lp-stat { padding: 22px; border-left: 1px solid var(--line); }
.lp-stat:first-child { border-left: 0; }
.lp-stat b { display: block; font-family: var(--mono); font-size: 1.15rem; color: var(--accent); letter-spacing: -.01em; }
.lp-stat span { display: block; margin-top: 5px; color: var(--muted); font-size: .84rem; }

/* section lede */
.sec-lede { color: var(--muted); font-size: 1rem; max-width: 640px; margin: 16px 0 26px; }

/* feature grid */
.lp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.lp-grid-4 { grid-template-columns: repeat(4, 1fr); }
.lp-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 20px;
  transition: border-color .14s, transform .14s, background .14s; }
.lp-card:hover { border-color: var(--line-2); transform: translateY(-2px); background: var(--panel-2); }
.lp-ico { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 1px solid rgba(56,189,248,.32); border-radius: var(--r); color: var(--accent); background: rgba(56,189,248,.06); margin-bottom: 14px; }
.lp-ico svg { width: 21px; height: 21px; }
.lp-card h3 { font-size: 1.02rem; letter-spacing: -.01em; margin: 0 0 8px; }
.lp-card p { color: var(--muted); font-size: .9rem; line-height: 1.55; margin: 0; }

/* how-it-works steps */
.lp-steps { display: flex; align-items: stretch; gap: 12px; }
.lp-steps .lp-step { flex: 1; position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 20px; }
.lp-step .lp-step-n { position: absolute; top: 16px; right: 18px; font-family: var(--mono); font-size: 1.5rem; color: var(--panel-3); -webkit-text-stroke: 1px var(--line-2); }
.lp-step h3 { font-size: 1rem; margin: 6px 0 8px; }
.lp-step p { color: var(--muted); font-size: .9rem; line-height: 1.55; margin: 0; }
.lp-step-sep { align-self: center; color: var(--faint); font-size: 1.3rem; }

/* delivery control strip */
.lp-control { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 16px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.lp-control > div { padding: 18px 20px; border-left: 1px solid var(--line); }
.lp-control > div:first-child { border-left: 0; }
.lp-control b { display: block; font-size: .92rem; }
.lp-control span { display: block; margin-top: 4px; color: var(--muted); font-size: .82rem; }

/* CTA */
.lp-cta { position: relative; overflow: hidden; text-align: center; border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--panel); padding: 54px 24px; margin: 52px 0; }
.lp-cta-glow { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 120% at 50% 0%, rgba(56,189,248,.12), transparent 60%); }
.lp-cta h2 { position: relative; font-size: clamp(1.5rem, 3.5vw, 2.1rem); letter-spacing: -.02em; margin: 0 0 10px; }
.lp-cta p { position: relative; color: var(--muted); margin: 0 0 22px; }
.lp-cta .btn { position: relative; padding: 12px 22px; }

/* responsive */
@media (max-width: 860px) {
  .lp-hero-inner { grid-template-columns: 1fr; gap: 34px; }
  .lp-band { grid-template-columns: repeat(2, 1fr); }
  .lp-stat:nth-child(-n+2) { border-top: 0; }
  .lp-stat:nth-child(odd) { border-left: 0; }
  .lp-grid, .lp-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .lp-steps { flex-direction: column; }
  .lp-step-sep { transform: rotate(90deg); }
  .lp-control { grid-template-columns: repeat(2, 1fr); }
  .lp-control > div:nth-child(odd) { border-left: 0; }
}
@media (max-width: 520px) {
  .lp-grid, .lp-grid-4, .lp-band, .lp-control { grid-template-columns: 1fr; }
  .lp-stat, .lp-control > div { border-left: 0; border-top: 1px solid var(--line); }
  .lp-stat:first-child, .lp-control > div:first-child { border-top: 0; }
}
