/* MomentumLab HQ — engineering-ledger design system (command center edition, v2 "lit") */
@import url("https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800;900&family=IBM+Plex+Mono:wght@400;500;600&family=Instrument+Serif:ital@0;1&display=swap");

:root {
  --paper: #f5f2ea;
  --paper-raised: #fbf9f4;
  --ink: #16150f;
  --ink-soft: #55523f;
  --line: #16150f;
  --line-faint: rgba(22, 21, 15, 0.14);
  --grid: rgba(22, 21, 15, 0.05);
  --accent: #e8480c;
  --accent-hot: #ff6a2b;
  --green: #0f6e56;
  --amber: #a06a00;
  --red: #9c2b0e;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: "Archivo", ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --shadow: 4px 4px 0 rgba(22, 21, 15, 0.09);
  --shadow-deep: 7px 7px 0 rgba(22, 21, 15, 0.13);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
::selection { background: var(--accent); color: #fff; }
body {
  font-family: var(--sans); color: var(--ink); line-height: 1.55;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px, 28px 28px, auto;
}
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
header.hq {
  position: sticky; top: 0; z-index: 10;
  background: var(--paper);
  border-bottom: 2px solid var(--line);
  box-shadow: 0 4px 0 -2px var(--accent);
}
header.hq .wrap { display: flex; align-items: center; justify-content: space-between; height: 58px; gap: 12px; }
.logo { font-weight: 900; font-size: 1.12rem; letter-spacing: -0.02em; display: flex; align-items: center; white-space: nowrap; color: var(--ink); text-decoration: none; }
.logo:hover::before { background: var(--ink); }
.logo::before {
  content: ""; width: 13px; height: 13px; background: var(--accent);
  border: 1.5px solid var(--line); margin-right: 9px; flex-shrink: 0;
}
.logo span { color: var(--accent); }
.logo em { font-style: normal; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.16em; color: var(--ink-soft); margin-left: 10px; padding-left: 10px; border-left: 1.5px solid var(--line-faint); }
nav.modules { display: flex; gap: 6px; overflow-x: auto; }
nav.modules a {
  font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--ink-soft); text-decoration: none; padding: 5px 9px; border: 1.5px solid transparent;
  white-space: nowrap; transition: color 0.12s, border-color 0.12s;
}
nav.modules a:hover { color: var(--ink); border-color: var(--line-faint); }
nav.modules a.active { color: #fff; background: var(--ink); border-color: var(--line); box-shadow: 2px 2px 0 rgba(22, 21, 15, 0.18); }

/* ---------- section furniture ---------- */
.kicker { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent); }
section.block { padding: 30px 0 6px; }
.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.section-head .num {
  font-family: var(--mono); font-size: 0.68rem; font-weight: 600;
  background: var(--ink); color: var(--paper); padding: 3px 8px; letter-spacing: 0.06em;
}
.section-head h2 { font-size: 1.02rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.section-head::after { content: ""; flex: 1; border-top: 1.5px solid var(--line-faint); }

/* ---------- gauges ---------- */
.gauges { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-top: 22px; }
.gauge {
  border: 2px solid var(--line); background: var(--paper-raised);
  padding: 18px 20px; box-shadow: var(--shadow); position: relative;
}
.gauge .row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; gap: 10px; flex-wrap: wrap; }
.gauge .big { font-size: 1.9rem; font-weight: 900; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.gauge .big b { color: var(--accent); }
.bar { height: 14px; border: 1.5px solid var(--line); background: var(--paper); position: relative; }
.bar i {
  display: block; height: 100%;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 6px, var(--accent-hot) 6px 12px);
  box-shadow: inset -2px 0 0 var(--ink);
  transition: width 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.bar::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(90deg,
    transparent 0, transparent calc(12.5% - 1px),
    rgba(22, 21, 15, 0.22) calc(12.5% - 1px), rgba(22, 21, 15, 0.22) 12.5%);
}
.gauge .sub { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.05em; color: var(--ink-soft); margin-top: 9px; }

/* click-to-reveal goal values (password-field style) */
.gauge.maskable { cursor: pointer; }
.gauge .secret { transition: filter 0.18s; }
.gauge.masked .secret { filter: blur(10px); user-select: none; }
.gauge .peek { position: absolute; right: 12px; bottom: 8px; font-size: 0.78rem; opacity: 0.35; }
.gauge.masked .peek { opacity: 0.85; }

.gauges.hero { padding-top: 16px; }
.gauges.hero .gauge { border-width: 2.5px; box-shadow: var(--shadow-deep); }
.gauges.hero .gauge::before {
  content: "GOAL"; position: absolute; top: -1px; right: -1px;
  font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.18em;
  background: var(--ink); color: var(--paper); padding: 2px 8px 2px 9px;
}
.gauges.hero .big { font-size: 2.2rem; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.card {
  border: 2px solid var(--line); background: var(--paper-raised); padding: 14px 16px;
  box-shadow: var(--shadow); transition: transform 0.14s, box-shadow 0.14s;
}
.card:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 rgba(22, 21, 15, 0.13); }
.card .label { font-family: var(--mono); font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.11em; color: var(--ink-soft); }
.card .value { font-size: 1.65rem; font-weight: 900; letter-spacing: -0.03em; margin-top: 3px; font-variant-numeric: tabular-nums; }
.card .value.pos { color: var(--green); }
.card .value.neg { color: var(--red); }
.card .note { font-family: var(--serif); font-style: italic; font-size: 0.94rem; color: var(--ink-soft); margin-top: 1px; }

/* ---------- figure boxes / charts ---------- */
.figbox { border: 2px solid var(--line); background: var(--paper-raised); padding: 16px 18px; box-shadow: var(--shadow); }
.figbox .figlabel { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; color: var(--ink-soft); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.figbox .figlabel::before { content: ""; width: 9px; height: 9px; background: var(--accent); border: 1px solid var(--line); flex-shrink: 0; }
.legend { display: flex; gap: 16px; font-family: var(--mono); font-size: 0.68rem; margin-top: 10px; color: var(--ink-soft); flex-wrap: wrap; }
.legend .g::before, .legend .o::before { content: "■ "; }
.legend .g::before { color: var(--green); }
.legend .o::before { color: var(--accent); }

/* ---------- status lights grid ---------- */
.lights { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0; border: 2px solid var(--line); background: var(--paper-raised); box-shadow: var(--shadow); }
.light { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-bottom: 1.5px solid var(--line-faint); border-right: 1.5px solid var(--line-faint); }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; border: 1.5px solid var(--line); }
.dot.green { background: #23a06d; box-shadow: 0 0 0 3px rgba(35, 160, 109, 0.18); }
.dot.amber { background: #eec643; box-shadow: 0 0 0 3px rgba(238, 198, 67, 0.22); }
.dot.gray { background: #c9c4b4; }
.light h3 { font-size: 0.95rem; font-weight: 700; }
.light h3 span { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin-left: 8px; }
.light p { font-size: 0.8rem; color: var(--ink-soft); }

/* ---------- alert / row lists ---------- */
.alerts { border: 2px solid var(--line); background: var(--paper-raised); box-shadow: var(--shadow); }
.alert { display: flex; gap: 14px; align-items: baseline; padding: 11px 16px; border-bottom: 1.5px solid var(--line-faint); }
.alert:last-child { border-bottom: none; }
.alert .when { font-family: var(--mono); font-size: 0.76rem; color: var(--accent); min-width: 96px; }
.alert .days { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-soft); min-width: 68px; }
.alert .days.soon { color: var(--amber); font-weight: 600; }
.alert .days.overdue { color: var(--red); font-weight: 700; }
.alert .what { font-size: 0.92rem; }

/* ---------- ledger tables ---------- */
table.ledger { width: 100%; border-collapse: collapse; background: var(--paper-raised); border: 2px solid var(--line); font-size: 0.86rem; box-shadow: var(--shadow); }
table.ledger th { font-family: var(--mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.11em; color: var(--paper); background: var(--ink); text-align: left; padding: 8px 12px; }
table.ledger td { padding: 8px 12px; border-bottom: 1px solid var(--line-faint); }
table.ledger tr:nth-child(even) td { background: rgba(22, 21, 15, 0.025); }
table.ledger td.r, table.ledger th.r { text-align: right; font-variant-numeric: tabular-nums; }

.state { font-family: var(--mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.1em; padding: 3px 8px; border: 1.5px solid currentColor; font-weight: 600; }
.state.live { color: var(--green); background: rgba(15, 110, 86, 0.07); }
.state.watch, .state.review { color: var(--amber); background: rgba(160, 106, 0, 0.08); }
.state.killed, .state.dying, .state.dead { color: var(--red); text-decoration: line-through; }

footer.hq {
  margin-top: 40px; border-top: 2px solid var(--line); padding: 15px 0 32px;
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.09em; color: var(--ink-soft);
  display: flex; align-items: center; gap: 10px;
}
footer.hq::before { content: ""; width: 10px; height: 10px; background: var(--accent); border: 1.5px solid var(--line); flex-shrink: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 860px) {
  .gauges, .grid2 { grid-template-columns: 1fr; }
  .gauges.hero .big { font-size: 1.8rem; }
}

/* ---------- ops buttons (operations room, both doors) ---------- */
.op {
  background: var(--paper-raised); color: inherit; border: 2px solid var(--line);
  padding: 10px 15px; font: inherit; font-family: var(--mono); font-size: 0.78rem;
  cursor: pointer; box-shadow: 3px 3px 0 var(--ink); transition: transform 0.08s, box-shadow 0.08s;
}
.op:hover { background: #fff; }
.op:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.op[disabled] { opacity: 0.5; cursor: wait; }
#opOut {
  border: 2px solid var(--line); background: #fffdf7;
  padding: 12px 14px; margin-top: 14px; font-family: var(--mono);
  font-size: 0.72rem; line-height: 1.55; white-space: pre-wrap; word-break: break-word;
  max-height: 340px; overflow: auto; box-shadow: var(--shadow);
}

/* ---------- Bridge v2 (hub of doors) ---------- */
.mast {
  margin-top: 18px; padding: 12px 18px;
  background: var(--ink); color: #b6b09a;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 18px;
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  box-shadow: var(--shadow);
}
.mast b { color: var(--paper); font-weight: 700; }
.mast .live { color: #4cc98f; }
.mast .off { color: #e5b34a; }
@keyframes blip { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.mast .blip { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #4cc98f; margin-left: 7px; animation: blip 2s infinite; vertical-align: 1px; }
.mast .off .blip { background: #e5b34a; animation: none; }

.ribbon {
  margin-top: 16px; padding: 10px 16px 10px 24px;
  border: 2px solid var(--line); background: var(--paper-raised);
  font-size: 0.96rem; color: var(--ink); position: relative;
  box-shadow: var(--shadow); transition: transform 0.12s;
}
a:hover > .ribbon { transform: translate(-1px, -1px); }
.ribbon::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 11px; }
.ribbon.warn::before { background: repeating-linear-gradient(-45deg, var(--ink) 0 6px, #eec643 6px 12px); }
.ribbon.calm::before { background: var(--green); }
.ribbon.warn { background: #fdf3d8; }
.ribbon.calm { color: var(--green); }
.ribbon .more { font-family: var(--mono); font-size: 0.66rem; color: var(--ink-soft); margin-left: 10px; }
.ribbon b { font-family: var(--mono); font-size: 0.74rem; color: var(--amber); margin-right: 6px; }
.ribbon.calm b { color: var(--green); }

.strip {
  margin-top: 14px; padding: 14px 18px;
  border: 2px solid var(--line); background: var(--paper-raised);
  display: flex; gap: 24px; flex-wrap: wrap; align-items: baseline;
  font-size: 1.08rem; color: var(--ink); font-variant-numeric: tabular-nums;
  box-shadow: var(--shadow); transition: transform 0.12s;
}
a:hover > .strip { transform: translate(-1px, -1px); }
.strip b { font-weight: 900; font-size: 1.18rem; }
.strip .mono { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.strip .dim, .mono.dim { color: var(--ink-soft); }
.strip .right, .prow .right { margin-left: auto; }
.pos { color: var(--green); } .neg { color: var(--red); }

.prow {
  text-decoration: none; color: var(--ink); align-items: center; gap: 13px; display: flex;
  border-left: 4px solid transparent; transition: background 0.12s, border-color 0.12s;
}
.prow:hover { background: #efe9db; border-left-color: var(--accent); }
.prow .pidx { font-family: var(--mono); font-size: 0.66rem; color: var(--accent); font-weight: 600; }
.prow .pname { font-size: 0.97rem; font-weight: 800; letter-spacing: -0.01em; }
.prow .pstats { font-size: 0.84rem; color: var(--ink-soft); }
.prow .pstats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.prow .right { transition: transform 0.12s; }
.prow:hover .right { transform: translateX(3px); color: var(--accent); }
.minibar {
  display: inline-block; width: 64px; height: 8px; vertical-align: middle;
  border: 1px solid var(--line); background: var(--paper); margin: 0 4px;
}
.minibar i { display: block; height: 100%; background: repeating-linear-gradient(-45deg, var(--accent) 0 4px, var(--accent-hot) 4px 8px); }
.dimrow { color: var(--ink-soft); }
.sleeplink { color: var(--ink-soft); text-decoration: none; font-size: 0.85rem; }
.sleeplink:hover { color: var(--accent); }

/* ---------- growth ladder (app files) ---------- */
.ladder { display: grid; grid-template-columns: repeat(6, 1fr); border: 2px solid var(--line); background: var(--paper-raised); box-shadow: var(--shadow); }
.rung { padding: 12px 10px 10px; border-right: 1.5px solid var(--line-faint); display: flex; flex-direction: column; gap: 2px; }
.rung:last-child { border-right: none; }
.rung .rmark { font-family: var(--mono); font-size: 1rem; color: var(--ink-soft); line-height: 1; }
.rung .rlabel { font-size: 0.8rem; font-weight: 700; }
.rung .rstate { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.14em; color: var(--ink-soft); }
.rung.done { background: rgba(15, 110, 86, 0.07); }
.rung.done .rmark, .rung.done .rstate { color: var(--green); }
.rung.next { background: #fdf3d8; box-shadow: inset 0 3px 0 var(--accent); }
.rung.next .rmark, .rung.next .rstate { color: var(--accent); }
@media (max-width: 860px) { .ladder { grid-template-columns: repeat(3, 1fr); } .rung { border-bottom: 1.5px solid var(--line-faint); } }

/* app sub-rows on the pulse board */
.subrow { padding-left: 42px; background: rgba(22, 21, 15, 0.018); }
.subrow .pname { font-size: 0.87rem; font-weight: 600; }
.subrow .dot { width: 7px; height: 7px; margin-top: 0; }

/* ---------- venture panels (pulse board v3) ---------- */
.vpanel { border: 2px solid var(--line); background: var(--paper-raised); box-shadow: var(--shadow); margin-bottom: 16px; }
.vpanel:last-child { margin-bottom: 0; }
#cards .vpanel { margin-bottom: 0; }
.vphead {
  display: flex; align-items: center; gap: 13px; padding: 13px 18px;
  border-bottom: 1.5px solid var(--line-faint); text-decoration: none; color: var(--ink);
  border-left: 4px solid transparent; transition: background 0.12s, border-color 0.12s;
}
.vphead:hover { background: #efe9db; border-left-color: var(--accent); }
.vphead .pname { font-size: 1.12rem; font-weight: 800; letter-spacing: -0.01em; }
.vphead .phrase { font-family: var(--serif); font-style: italic; font-size: 1rem; color: var(--ink-soft); }
.vphead:hover .right { color: var(--accent); }
.vpanel .vphead:last-child { border-bottom: none; }
.vpgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.kcell {
  padding: 14px 18px 12px; border-right: 1.5px solid var(--line-faint);
  display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink);
}
.kcell:last-child { border-right: none; }
a.kcell:hover { background: #efe9db; }
.klabel { font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-soft); font-weight: 500; }
.kval { font-size: 1.6rem; font-weight: 900; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.25; }
.kval.pos { color: var(--green); } .kval.neg { color: var(--red); } .kval.warn { color: var(--amber); }
.kval .ksub { font-style: normal; font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
.knote { font-size: 0.8rem; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; line-height: 1.4; }
.knote b { color: var(--ink); font-weight: 700; }
.knote .minibar { width: 64px; height: 7px; margin: 0; }
.vpapps { display: flex; flex-wrap: wrap; border-top: 1.5px solid var(--line-faint); background: rgba(22, 21, 15, 0.018); }
.chip {
  display: flex; align-items: center; gap: 7px; padding: 8px 14px;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.03em;
  color: var(--ink); text-decoration: none; border-right: 1.5px solid var(--line-faint);
  transition: background 0.12s, color 0.12s;
}
.chip:hover { background: var(--ink); color: var(--paper); }
.chip .dot { width: 7px; height: 7px; margin-top: 0; }
@media (max-width: 640px) { .vpgrid { grid-template-columns: 1fr 1fr; } .kcell { border-bottom: 1.5px solid var(--line-faint); } }

/* ---------- venture cockpit masthead ---------- */
.vfile { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.18em; color: var(--accent); text-transform: uppercase; margin-bottom: 6px; }
.vtitle { font-size: 2.5rem; font-weight: 900; letter-spacing: -0.04em; line-height: 1.05; }
.vmission { font-family: var(--serif); font-style: italic; font-size: 1.18rem; color: var(--ink-soft); max-width: 780px; margin-top: 8px; line-height: 1.45; }
@media (max-width: 640px) { .vtitle { font-size: 1.9rem; } }
