/* =============================================================
   HEADQUARTERS FINANCE SYSTEM — interface stylesheet
   futuristic OS · financial command center · terminal aesthetic
   ============================================================= */

:root {
  --bg: #06080B;
  --bg-2: #0B0F14;
  --panel: #0F141C;
  --panel-2: #141B25;
  --line: #1B2330;
  --line-2: #243042;
  --grid: rgba(60, 80, 110, 0.08);
  --text: #D8DFEA;
  --text-dim: #8590A6;
  --text-mute: #56627A;
  --cyan: #5CE0FF;
  --cyan-soft: #6BC9FF;
  --cyan-deep: #2E96D6;
  --blue: #6B8DFF;
  --green: #6CE3A9;
  --amber: #E6BE6E;
  --red: #FF7A8C;
  --magenta: #C18BFF;

  --font-ui: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;

  --side-w: 240px;
  --top-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* animated background grid */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
  animation: gridShift 30s linear infinite;
}
body::after {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(800px 600px at 20% 0%, rgba(45,150,214,0.07), transparent 60%),
    radial-gradient(700px 500px at 80% 100%, rgba(92,224,255,0.06), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
@keyframes gridShift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 48px 48px, 48px 48px; }
}

img, svg, iframe { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }

/* ============================================================
   LOADER
   ============================================================ */
.loader {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
  transition: opacity .6s ease, visibility .6s ease;
}
.loader.hide { opacity: 0; visibility: hidden; }
.loader__brand {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--cyan);
  text-transform: uppercase;
}
.loader__brand::before { content: "▍ "; }
.loader__big {
  font-family: var(--font-display);
  font-size: clamp(46px, 8vw, 92px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}
.loader__big span { color: var(--cyan); }
.loader__bar {
  width: 280px;
  height: 2px;
  background: rgba(255,255,255,.06);
  overflow: hidden;
  position: relative;
}
.loader__bar::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--cyan);
  animation: loadbar 1.4s ease-out forwards;
  transform-origin: left;
}
@keyframes loadbar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.loader__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ============================================================
   SCROLL PROGRESS
   ============================================================ */
.scroll-progress {
  position: fixed;
  top: 0; left: var(--side-w); right: 0;
  height: 2px;
  background: transparent;
  z-index: 50;
  pointer-events: none;
}
.scroll-progress__b {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan-deep), var(--cyan));
  width: 0;
  box-shadow: 0 0 12px var(--cyan);
  transition: width .1s linear;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--side-w);
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  z-index: 200;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  overflow-y: auto;
}
.sidebar__brand {
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.sidebar__brand .dot {
  width: 10px; height: 10px;
  background: var(--cyan);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(92,224,255,.6);
}
.sidebar__brand .dot::after {
  content: "";
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--cyan);
  opacity: .6;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: .6; }
  50% { transform: scale(1.4); opacity: 0; }
}
.sidebar__sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: 0.2em;
  margin-top: 4px;
  text-transform: uppercase;
  font-weight: 400;
}

.side-nav {
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.side-nav__label {
  padding: 14px 12px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--text-mute);
  text-transform: uppercase;
}
.side-nav a {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text-dim);
  font-size: 13.5px;
  position: relative;
  transition: background .2s ease, color .2s ease;
  border-radius: 4px;
}
.side-nav a:hover { background: var(--panel); color: var(--text); }
.side-nav a.is-active {
  background: rgba(92,224,255,.08);
  color: var(--cyan);
  border-left: 2px solid var(--cyan);
  padding-left: 10px;
}
.side-nav a .num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-mute);
  letter-spacing: 0.06em;
}
.side-nav a.is-active .num { color: var(--cyan); }
.side-nav a .tag {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 2px 6px;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  color: var(--text-mute);
  letter-spacing: 0.08em;
}

.sidebar__sys {
  margin-top: auto;
  padding: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-mute);
  letter-spacing: 0.06em;
}
.sidebar__sys .row { display: flex; justify-content: space-between; padding: 4px 0; }
.sidebar__sys b { color: var(--text); font-weight: 500; }
.sidebar__sys .ok { color: var(--green); }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  position: fixed;
  top: 0; left: var(--side-w); right: 0;
  height: var(--top-h);
  background: rgba(11, 15, 20, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 11.5px;
}
.topbar__crumbs {
  color: var(--text-mute);
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar__crumbs a:hover { color: var(--cyan); }
.topbar__crumbs b { color: var(--text); font-weight: 500; }
.topbar__crumbs .sep { opacity: .4; }
.topbar__search {
  flex: 1;
  max-width: 380px;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text-mute);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}
.topbar__search:hover { border-color: var(--line-2); color: var(--text-dim); }
.topbar__search kbd {
  margin-left: auto;
  padding: 1px 6px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-mute);
}
.topbar__live {
  display: flex;
  gap: 12px;
  align-items: center;
}
.topbar__live .pulse {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--green);
}
.topbar__live .pulse::before {
  content: ""; width: 6px; height: 6px;
  background: var(--green); border-radius: 50%;
  box-shadow: 0 0 8px var(--green);
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.topbar__time { color: var(--text-dim); }

.burger {
  display: none;
  background: var(--panel);
  border: 1px solid var(--line);
  width: 38px; height: 38px;
  position: relative;
  margin-right: 10px;
}
.burger span {
  position: absolute;
  left: 10px; right: 10px; height: 1px;
  background: var(--text);
  transition: transform .3s ease, opacity .3s ease;
}
.burger span:nth-child(1) { top: 13px; }
.burger span:nth-child(2) { top: 18px; }
.burger span:nth-child(3) { top: 23px; }
.burger.is-on span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.burger.is-on span:nth-child(2) { opacity: 0; }
.burger.is-on span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.app {
  position: relative;
  z-index: 1;
  padding-left: var(--side-w);
  padding-top: var(--top-h);
}
.main {
  padding: 28px 28px 80px;
  max-width: 1500px;
}

/* ============================================================
   PANELS
   ============================================================ */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.panel__head .ttl {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 500;
}
.panel__head .ttl::before {
  content: ""; width: 6px; height: 6px;
  background: var(--cyan); box-shadow: 0 0 8px var(--cyan);
  border-radius: 50%;
}
.panel__head .actions {
  display: flex;
  gap: 8px;
  color: var(--text-mute);
}
.panel__body { padding: 22px 20px; }
.panel__body--flush { padding: 0; }

/* ============================================================
   PAGE HEAD (each page has its own module header)
   ============================================================ */
.module-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.module-head__kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--cyan);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.module-head__kicker::before { content: "◢"; }
.module-head h1 {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 700;
}
.module-head h1 .acc { color: var(--cyan); }
.module-head p {
  margin: 18px 0 0;
  max-width: 65ch;
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.55;
}
.module-head__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  border-left: 1px solid var(--line);
  padding: 4px 0 4px 18px;
  display: grid;
  gap: 8px;
  min-width: 220px;
}
.module-head__meta b { color: var(--text); font-weight: 500; display: block; }
.module-head__meta .ok { color: var(--green); }

/* ============================================================
   GRID
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.c-12 { grid-column: span 12; }
.c-9  { grid-column: span 9; }
.c-8  { grid-column: span 8; }
.c-7  { grid-column: span 7; }
.c-6  { grid-column: span 6; }
.c-5  { grid-column: span 5; }
.c-4  { grid-column: span 4; }
.c-3  { grid-column: span 3; }

/* ============================================================
   METRIC TILES
   ============================================================ */
.metric {
  padding: 22px;
  border-right: 1px solid var(--line);
}
.metric:last-child { border-right: none; }
.metric__lbl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-mute);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.metric__val {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 10px 0 6px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.metric__val .small { font-size: .45em; color: var(--text-mute); font-weight: 500; }
.metric__val .cy { color: var(--cyan); }
.metric__delta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--green);
  letter-spacing: 0.04em;
}
.metric__delta.down { color: var(--red); }
.metric__delta.amb { color: var(--amber); }
.metric__delta.mute { color: var(--text-mute); }

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

/* ============================================================
   STATUS / BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.badge.live { color: var(--cyan); border-color: rgba(92,224,255,.4); }
.badge.ok { color: var(--green); border-color: rgba(108,227,169,.4); }
.badge.amb { color: var(--amber); border-color: rgba(230,190,110,.4); }

.dot-st {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.dot-st.cy { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.dot-st.gn { background: var(--green); box-shadow: 0 0 8px var(--green); }
.dot-st.am { background: var(--amber); }
.dot-st.rd { background: var(--red); }
.dot-st.mu { background: var(--text-mute); }

/* ============================================================
   LIST ROWS
   ============================================================ */
.rows { display: flex; flex-direction: column; }
.row {
  display: grid;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.row:last-child { border-bottom: none; }
.row .lbl { color: var(--text-dim); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; }
.row .val { color: var(--text); font-family: var(--font-mono); font-weight: 500; }
.row--cat { grid-template-columns: 28px 1fr 90px 80px; }
.row__bar {
  height: 4px;
  background: rgba(255,255,255,.05);
  position: relative;
  overflow: hidden;
}
.row__bar::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--cyan-deep), var(--cyan));
  width: var(--w, 50%);
}

/* ============================================================
   TABLE
   ============================================================ */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.tbl th, .tbl td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.tbl th {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
  background: var(--bg-2);
  font-weight: 500;
}
.tbl td:first-child { color: var(--text); font-weight: 500; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: rgba(92,224,255,.03); }

/* ============================================================
   CHART
   ============================================================ */
.chart { position: relative; height: 280px; width: 100%; }
.chart svg { width: 100%; height: 100%; }

/* ============================================================
   FEED / TIMELINE
   ============================================================ */
.feed { display: flex; flex-direction: column; }
.feed__i {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: start;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.feed__i:last-child { border-bottom: none; }
.feed__t { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); padding-top: 3px; }
.feed__msg { color: var(--text-dim); line-height: 1.5; }
.feed__msg b { color: var(--text); font-weight: 500; }
.feed__tag {
  font-family: var(--font-mono); font-size: 10px;
  padding: 3px 8px; letter-spacing: 0.08em;
  border: 1px solid var(--line-2);
  color: var(--text-mute);
}
.feed__tag.cy { color: var(--cyan); border-color: rgba(92,224,255,.3); }
.feed__tag.gn { color: var(--green); border-color: rgba(108,227,169,.3); }
.feed__tag.am { color: var(--amber); border-color: rgba(230,190,110,.3); }
.feed__tag.mg { color: var(--magenta); border-color: rgba(193,139,255,.3); }
.feed__tag.bl { color: var(--blue); border-color: rgba(107,141,255,.3); }

/* ============================================================
   AI RECOMMENDATION
   ============================================================ */
.ai-rec {
  background:
    linear-gradient(135deg, rgba(92,224,255,.05), rgba(107,141,255,.04)),
    var(--panel);
  border: 1px solid rgba(92,224,255,.2);
  padding: 22px;
  position: relative;
}
.ai-rec::before {
  content: "AI · RECOMMENDATION";
  position: absolute; top: -1px; left: 16px;
  transform: translateY(-50%);
  padding: 0 8px;
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--cyan);
}
.ai-rec p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
}
.ai-rec p + p { margin-top: 12px; color: var(--text-dim); }

/* ============================================================
   COMMAND PALETTE
   ============================================================ */
.cmd {
  position: fixed; inset: 0;
  background: rgba(6, 8, 11, 0.7);
  backdrop-filter: blur(8px);
  z-index: 9000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
}
.cmd.is-on { display: flex; }
.cmd__box {
  width: min(560px, 92vw);
  background: var(--panel);
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.7), 0 0 0 1px rgba(92,224,255,.08);
}
.cmd__inp {
  width: 100%;
  background: transparent;
  border: none;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14.5px;
  outline: none;
}
.cmd__inp::placeholder { color: var(--text-mute); }
.cmd__list { max-height: 50vh; overflow-y: auto; padding: 6px 0; }
.cmd__row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 22px;
  color: var(--text-dim);
  font-size: 13.5px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.cmd__row:hover, .cmd__row.is-focus { background: rgba(92,224,255,.07); color: var(--text); }
.cmd__row .ic {
  font-family: var(--font-mono);
  color: var(--cyan);
}
.cmd__row .k {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-mute);
  border: 1px solid var(--line-2);
  padding: 1px 6px;
}
.cmd__foot {
  padding: 10px 22px;
  border-top: 1px solid var(--line);
  display: flex; gap: 16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--text);
  transition: border-color .2s ease, color .2s ease, background .2s ease, transform .2s ease;
}
.btn:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-1px); }
.btn--primary {
  background: linear-gradient(180deg, rgba(92,224,255,.18), rgba(92,224,255,.05));
  border-color: rgba(92,224,255,.5);
  color: var(--cyan);
}
.btn--primary:hover { background: rgba(92,224,255,.15); }
.btn .arr { font-size: 14px; }
.btn--ghost { background: transparent; }

/* ============================================================
   NODE DIAGRAM (capital architecture / habits map / etc.)
   ============================================================ */
.nodes {
  position: relative;
  padding: 24px;
  min-height: 480px;
}
.node {
  position: absolute;
  padding: 14px 18px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  min-width: 180px;
  transition: border-color .2s ease, transform .2s ease;
}
.node:hover { border-color: var(--cyan); }
.node b {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text);
  letter-spacing: -0.02em;
  font-weight: 700;
  margin-bottom: 4px;
}
.node .lab {
  display: inline-block;
  padding: 2px 6px;
  background: rgba(92,224,255,.1);
  color: var(--cyan);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  margin-bottom: 8px;
}
.node--accent { border-color: var(--cyan); background: linear-gradient(180deg, rgba(92,224,255,.06), transparent); }

/* ============================================================
   KNOWLEDGE TILES / MODULES
   ============================================================ */
.modtiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.modtile {
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: border-color .25s ease, transform .25s ease, background .25s ease;
  position: relative;
}
.modtile:hover { border-color: var(--cyan); transform: translateY(-3px); background: linear-gradient(180deg, rgba(92,224,255,.04), var(--panel)); }
.modtile__top {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-mute);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.modtile__top .id { color: var(--cyan); }
.modtile h3 {
  margin: 18px 0 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.modtile p { margin: 0; color: var(--text-dim); font-size: 14px; line-height: 1.55; }
.modtile__foot {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-mute);
  letter-spacing: 0.1em;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

/* ============================================================
   ACCORDION (for FAQ / docs)
   ============================================================ */
.acc { border-top: 1px solid var(--line); }
.acc__i { border-bottom: 1px solid var(--line); }
.acc__h {
  width: 100%;
  text-align: left;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 70px 1fr 32px;
  align-items: center;
  gap: 20px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: background .2s ease;
}
.acc__h:hover { background: rgba(92,224,255,.03); }
.acc__n { font-family: var(--font-mono); font-size: 11px; color: var(--cyan); letter-spacing: 0.1em; }
.acc__p {
  width: 28px; height: 28px;
  border: 1px solid var(--line-2);
  justify-self: end;
  position: relative;
  transition: background .2s ease, transform .35s ease;
}
.acc__p::before, .acc__p::after {
  content: ""; position: absolute;
  background: var(--text);
  top: 50%; left: 50%;
  transition: background .2s ease, opacity .25s ease;
}
.acc__p::before { width: 10px; height: 1px; transform: translate(-50%,-50%); }
.acc__p::after { width: 1px; height: 10px; transform: translate(-50%,-50%); }
.acc__i.is-open .acc__p { background: var(--cyan); transform: rotate(45deg); border-color: var(--cyan); }
.acc__i.is-open .acc__p::before, .acc__i.is-open .acc__p::after { background: var(--bg); }
.acc__b { max-height: 0; overflow: hidden; transition: max-height .5s cubic-bezier(.2,.7,.2,1); }
.acc__bi {
  padding: 0 20px 24px 110px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
  max-width: 70ch;
}
.acc__i.is-open .acc__b { max-height: 600px; }

/* ============================================================
   TERMINAL BLOCK
   ============================================================ */
.term {
  background: #04060A;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  padding: 22px;
  color: var(--text-dim);
}
.term__l { display: block; }
.term__l .prompt { color: var(--cyan); }
.term__l .cmd { color: var(--text); }
.term__l .out { color: var(--text-dim); }
.term__l .ok { color: var(--green); }
.term__l .warn { color: var(--amber); }
.term__cursor {
  display: inline-block;
  width: 8px; height: 14px;
  background: var(--cyan);
  vertical-align: -2px;
  animation: caret .9s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* ============================================================
   QUOTE
   ============================================================ */
.quote {
  padding: 36px 32px;
  background: linear-gradient(180deg, rgba(92,224,255,.04), transparent);
  border: 1px solid var(--line);
  position: relative;
}
.quote::before {
  content: "“";
  position: absolute;
  top: -10px; left: 24px;
  font-family: var(--font-display);
  font-size: 80px;
  color: var(--cyan);
  line-height: 1;
}
.quote p {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: clamp(18px, 1.5vw, 24px);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text);
  max-width: 60ch;
}
.quote cite {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-style: normal;
}

/* ============================================================
   FORM
   ============================================================ */
.form { display: grid; gap: 14px; }
.form__row { display: grid; gap: 6px; }
.form label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.form input, .form textarea, .form select {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 12px 14px;
  color: var(--text);
  font: inherit;
  width: 100%;
  font-size: 14px;
  transition: border-color .2s ease;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--cyan); }
.form textarea { resize: vertical; min-height: 110px; }

/* ============================================================
   MAP
   ============================================================ */
.map-wrap {
  border: 1px solid var(--line);
  min-height: 460px;
  overflow: hidden;
  position: relative;
}
.map-wrap iframe {
  width: 100%; height: 100%; min-height: 460px;
  border: 0;
  filter: invert(0.92) hue-rotate(180deg) contrast(.85) saturate(.7);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--line);
  padding: 50px 28px 30px;
  background: var(--bg-2);
}
.footer__t {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.footer__t h5 {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 500;
}
.footer__t ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer__t a { color: var(--text-dim); font-size: 13.5px; transition: color .2s ease; }
.footer__t a:hover { color: var(--cyan); }
.footer__brand { display: flex; flex-direction: column; gap: 14px; }
.footer__brand .ttl { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; color: var(--text); }
.footer__brand p { margin: 0; color: var(--text-mute); font-size: 13px; max-width: 38ch; }
.footer__b {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.06em;
}
.soc { display: flex; gap: 8px; }
.soc a {
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}
.soc a:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }
.soc svg { width: 14px; height: 14px; fill: currentColor; }

/* ============================================================
   COOKIE
   ============================================================ */
.cookie {
  position: fixed;
  bottom: 20px; right: 20px;
  max-width: 380px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  padding: 16px 18px;
  z-index: 8000;
  font-size: 13px;
  color: var(--text-dim);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  transform: translateY(140%);
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.cookie.is-on { transform: translateY(0); }
.cookie p { margin: 0; line-height: 1.5; }
.cookie p b { color: var(--cyan); }
.cookie__ok {
  padding: 8px 14px;
  background: var(--bg);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
}

/* ============================================================
   REVEAL
   ============================================================ */
.r {
  opacity: 1;
  transform: translateY(28px);
  transition: opacity .55s ease, transform .8s cubic-bezier(.2,.7,.2,1);
}
.r.in { transform: translateY(0); }

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 1024px) {
  :root { --side-w: 0px; }
  .topbar { left: 0; padding: 0 16px; gap: 12px; }
  .topbar__search { display: none; }
  .scroll-progress { left: 0; }
  .app { padding-left: 0; }
  .main { padding: 16px 16px 60px; }
  .sidebar {
    width: 280px;
    transform: translateX(-100%);
    transition: transform .35s cubic-bezier(.7,.1,.2,1);
  }
  .sidebar.is-on { transform: translateX(0); }
  .burger { display: block; }
  .grid { gap: 12px; }
  .c-9, .c-8, .c-7, .c-6, .c-5, .c-4 { grid-column: span 12; }
  .c-3 { grid-column: span 6; }
  .metric-row { grid-template-columns: repeat(2, 1fr); }
  .metric { border-right: none; border-bottom: 1px solid var(--line); }
  .metric:nth-child(odd) { border-right: 1px solid var(--line); }
  .modtiles { grid-template-columns: repeat(2, 1fr); }
  .module-head { grid-template-columns: 1fr; }
  .footer__t { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .metric-row { grid-template-columns: 1fr; }
  .metric { border-right: none !important; border-bottom: 1px solid var(--line); }
  .metric:last-child { border-bottom: none; }
  .modtiles { grid-template-columns: 1fr; }
  .footer__t { grid-template-columns: 1fr; }
  .footer__b { grid-template-columns: 1fr; text-align: center; }
  .soc { justify-self: center; }
  .c-3 { grid-column: span 12; }
  .acc__h { grid-template-columns: 60px 1fr 28px; font-size: 15px; }
  .acc__bi { padding-left: 80px; }
  .cookie { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}
