/* SOVEREIGN Command Center — midnight navy, warm ivory, charcoal, restrained champagne gold.
   Green / amber / red are used only for real operational states. Text colours meet WCAG AA on their backgrounds. */
:root {
  --navy: #0f1b2d; --navy-2: #172640; --navy-3: #22365a; --on-navy: #f3ede0; --on-navy-mut: #b9b3a6;
  --bg: #f6f2e9; --paper: #fffdf8; --raised: #ffffff; --ink: #1f2229; --mut: #585d68; --line: #e6dfd0; --line-2: #d8cfbc;
  --gold: #c9a961; --gold-deep: #7a5c22; --gold-soft: #f4ead3;
  --ok: #1d7343; --ok-bg: #e6f3ea; --warn: #8f5400; --warn-bg: #fbefd9; --bad: #ad2318; --bad-bg: #fbe7e4;
  --info: #2a5490; --info-bg: #e8eef8;
  --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 6px 20px rgba(15, 27, 45, .06);
  --shadow-lg: 0 2px 6px rgba(15, 27, 45, .08), 0 18px 40px rgba(15, 27, 45, .12);
  --r: 14px; --r-sm: 10px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --side-w: 248px;
}
:root[data-theme="dark"] {
  --bg: #0d1626; --paper: #132036; --raised: #172640; --ink: #f1ece1; --mut: #b4ad9f; --line: #26375a; --line-2: #33476e;
  --gold-deep: #e0c48a; --gold-soft: #2a3247; --ok: #6fd39a; --ok-bg: #12301f; --warn: #f0b45c; --warn-bg: #352812;
  --bad: #ff8a7e; --bad-bg: #3a1714; --info: #9cc0f3; --info-bg: #182a47;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25); --shadow-lg: 0 18px 40px rgba(0, 0, 0, .4);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1626; --paper: #132036; --raised: #172640; --ink: #f1ece1; --mut: #b4ad9f; --line: #26375a; --line-2: #33476e;
    --gold-deep: #e0c48a; --gold-soft: #2a3247; --ok: #6fd39a; --ok-bg: #12301f; --warn: #f0b45c; --warn-bg: #352812;
    --bad: #ff8a7e; --bad-bg: #3a1714; --info: #9cc0f3; --info-bg: #182a47;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25); --shadow-lg: 0 18px 40px rgba(0, 0, 0, .4);
  }
}

/* ------------------------------------------------------------------ base */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--sans); }
body { min-height: 100vh; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--ink); letter-spacing: .005em; margin: 0; }
h2 { font-size: 1.32rem; } h3 { font-size: 1.08rem; }
p { margin: .4em 0; }
a { color: var(--info); text-underline-offset: 2px; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--navy); color: var(--on-navy); padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }
.mut { color: var(--mut); } .small { font-size: .86rem; } .mono { font-family: var(--mono); font-size: .82rem; }
.nowrap { white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) {
  .btn, .card, .nav-a, .help, .metric, .tcard { transition: background-color .15s, border-color .15s, box-shadow .15s, color .15s; }
}

/* ------------------------------------------------------------------ shell */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--navy); color: var(--on-navy); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
  background-image: linear-gradient(180deg, rgba(15, 27, 45, .92) 0%, rgba(15, 27, 45, .97) 55%, rgba(15, 27, 45, .72) 100%), url(/static/hero.svg);
  background-size: cover; background-position: 70% 100%; }
.side-brand { text-align: center; padding: 30px 16px 22px; border-bottom: 1px solid rgba(201, 169, 97, .22); }
.side-word { font-family: var(--serif); font-size: 1.7rem; letter-spacing: .08em; margin-top: 6px; color: #f6efdf; }
.side-sub { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--on-navy-mut); }
.side-nav { padding: 16px 12px; display: grid; gap: 4px; }
.nav-a { display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: 10px; color: #e7e1d3; text-decoration: none; font-size: 1rem; }
.nav-a svg { width: 21px; height: 21px; flex: none; }
.nav-a:hover { background: rgba(255, 255, 255, .06); }
.nav-a[aria-current="page"] { background: rgba(201, 169, 97, .14); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.nav-sep { margin: 10px 14px 4px; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-navy-mut); }
.count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--gold); color: var(--navy);
  font-size: .78rem; font-weight: 700; display: inline-grid; place-items: center; }
.count.zero { background: rgba(255, 255, 255, .12); color: var(--on-navy-mut); }
.side-foot { margin-top: auto; padding: 22px 20px 26px; text-align: center; }
.side-quote { font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: #f3ead6; margin: 0; }
.side-sign { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-navy-mut); margin-top: 6px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 18px; padding: 18px 32px 14px; }
.top-brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.top-crown { display: none; align-self: center; }
.wordmark { font-family: var(--serif); font-size: 1.9rem; letter-spacing: .06em; }
.top-div { width: 1px; height: 22px; background: var(--line-2); align-self: center; }
.tagline { font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--mut); white-space: nowrap; }
.top-status { flex: 1; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.top-right { display: flex; align-items: center; gap: 12px; }
.icon-btn { width: 40px; height: 40px; border-radius: 20px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink);
  display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 19px; height: 19px; }
.user { position: relative; }
.user-btn { display: flex; align-items: center; gap: 10px; background: transparent; border: 0; color: var(--ink); cursor: pointer; padding: 4px 6px; border-radius: 22px; font: inherit; }
.avatar { width: 38px; height: 38px; border-radius: 19px; background: var(--navy); color: var(--gold); display: grid; place-items: center;
  font-family: var(--serif); font-size: 1.05rem; flex: none; }
.user-meta { text-align: left; line-height: 1.2; } .user-meta b { font-weight: 600; display: block; } .user-meta span { font-size: .8rem; color: var(--mut); }
.menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--raised); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 6px; min-width: 220px; z-index: 40; }
.menu button, .menu a { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--gold-soft); }
.menu .menu-note { padding: 8px 12px; font-size: .82rem; color: var(--mut); border-bottom: 1px solid var(--line); margin-bottom: 4px; }

main#view { padding: 6px 32px 32px; outline: none; }
.foot { padding: 14px 32px 28px; color: var(--mut); font-size: .84rem; display: flex; gap: 14px; flex-wrap: wrap; justify-content: space-between; border-top: 1px solid var(--line); margin: 0 32px; }
.loading { padding: 60px 0; text-align: center; color: var(--mut); font-family: var(--serif); font-size: 1.2rem; }

/* ------------------------------------------------------------------ status pills */
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; font-size: .84rem; font-weight: 600;
  background: var(--paper); border: 1px solid var(--line); color: var(--ink); white-space: nowrap; }
.pill .dot { width: 8px; height: 8px; border-radius: 4px; background: var(--mut); flex: none; }
.pill.ok { color: var(--ok); background: var(--ok-bg); border-color: transparent; } .pill.ok .dot { background: var(--ok); }
.pill.warn { color: var(--warn); background: var(--warn-bg); border-color: transparent; } .pill.warn .dot { background: var(--warn); }
.pill.bad { color: var(--bad); background: var(--bad-bg); border-color: transparent; } .pill.bad .dot { background: var(--bad); }
.pill.info { color: var(--info); background: var(--info-bg); border-color: transparent; } .pill.info .dot { background: var(--info); }
.pill.off { color: var(--mut); } .pill.off .dot { background: var(--line-2); }

/* ------------------------------------------------------------------ buttons */
.btn { font: inherit; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 9px 18px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); cursor: pointer; text-decoration: none; }
.btn svg { width: 18px; height: 18px; }
.btn:hover { border-color: var(--gold); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-gold { background: linear-gradient(180deg, #d9bd7e, #c2a05a); border-color: #b8964f; color: #1b1608; box-shadow: 0 2px 8px rgba(176, 141, 74, .35); }
.btn-gold:hover { background: linear-gradient(180deg, #e2c88c, #c9a961); border-color: #a9874a; }
.btn-navy { background: var(--navy); color: #f6efdf; border-color: var(--navy); }
.btn-navy:hover { background: var(--navy-3); border-color: var(--navy-3); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
:root[data-theme="dark"] .btn-danger { color: #1b0b09; }
.btn-ghost { background: transparent; }
.btn-link { background: none; border: 0; color: var(--info); padding: 6px 2px; min-height: 0; font-weight: 600; }
.btn-lg { min-height: 52px; padding: 12px 26px; font-size: 1.05rem; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }

/* ------------------------------------------------------------------ help (?) */
.help-wrap { position: relative; display: inline-flex; vertical-align: middle; margin-left: 6px; }
.help { width: 24px; height: 24px; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; color: var(--mut);
  font: 600 .78rem/1 var(--sans); cursor: pointer; display: grid; place-items: center; padding: 0; position: relative; }
.help::before { content: ""; position: absolute; inset: -10px; }          /* 44 px touch target */
.help:hover, .help[aria-expanded="true"] { border-color: var(--gold); color: var(--gold-deep); background: var(--gold-soft); }
.hero .help { color: #e6dfcf; border-color: rgba(255, 255, 255, .45); }
.hero .help:hover, .hero .help[aria-expanded="true"] { color: var(--navy); background: var(--gold); }
.hero .composer .help { color: var(--mut); border-color: var(--line-2); }
.hero .composer .help:hover, .hero .composer .help[aria-expanded="true"] { color: var(--gold-deep); background: var(--gold-soft); border-color: var(--gold); }
.pop { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: min(320px, 86vw); z-index: 60;
  background: var(--navy); color: #f3ede0; border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow-lg); font-size: .9rem; line-height: 1.5;
  text-align: left; font-weight: 400; letter-spacing: 0; text-transform: none; font-family: var(--sans); }
.pop.align-left { left: -8px; transform: none; } .pop.align-right { left: auto; right: -8px; transform: none; }
.pop b { display: block; font-family: var(--serif); font-size: 1.05rem; font-weight: 500; margin: 0 28px 4px 0; color: #fff; }
.pop dl { margin: 0; display: grid; gap: 6px; } .pop dt { color: var(--gold); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; }
.pop dd { margin: 0; }
.pop .pop-x { position: absolute; top: 6px; right: 6px; background: none; border: 0; color: #cfc8b8; font-size: 1.2rem; cursor: pointer; width: 34px; height: 34px; border-radius: 17px; }

/* ------------------------------------------------------------------ layout */
.home { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-areas: "hero rail" "metrics rail" "ops rail" "nw rail" "work rail" "done rail" "mon rail" "stream rail" "feed rail"; align-items: start; }
.home > .hero { grid-area: hero; } .home > .metrics-area { grid-area: metrics; } .home > .work-dec { grid-area: work; } .home > .nw-card { grid-area: nw; } .home > .ops-area { grid-area: ops; } .home > .ops-monitors { grid-area: mon; } .home > .ops-stream { grid-area: stream; }
.home > .done { grid-area: done; } .home > .feed { grid-area: feed; } .home > .rail { grid-area: rail; display: grid; gap: 22px; position: sticky; top: 16px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.card { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px 22px; min-width: 0; }
.card-h { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.card-h h2, .card-h h3 { display: flex; align-items: center; }
.card-h .more { font-size: .9rem; font-weight: 600; text-decoration: none; color: var(--info); white-space: nowrap; margin-left: auto; }
.page-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 18px; }
.page-h h1 { font-size: 2rem; display: flex; align-items: center; }
.page-h p { flex-basis: 100%; color: var(--mut); margin: 0; }
.stack { display: grid; gap: 14px; }
.card-gap { height: 18px; }
.stack > .tcard + .tcard { margin-top: 0; }
.grid-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.back { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 10px; font-weight: 600; text-decoration: none; min-height: 40px; white-space: nowrap; }
.back svg { width: 18px; height: 18px; }

/* ------------------------------------------------------------------ hero composer */
.hero { position: relative; border-radius: 18px; box-shadow: var(--shadow-lg); color: #fff;
  background: linear-gradient(90deg, rgba(10, 18, 32, .86) 0%, rgba(10, 18, 32, .55) 46%, rgba(10, 18, 32, .05) 100%), url(/static/hero.svg) right center / cover;
  padding: 34px 36px 30px; }
.hero h1 { color: #fff; font-size: 2.4rem; line-height: 1.15; max-width: 26ch; }
.hero h1 .help-wrap { margin-left: 10px; top: -4px; }
.hero .hero-sub { color: #ece5d5; font-size: 1.04rem; margin: 10px 0 18px; max-width: 60ch; }
.composer { background: var(--raised); color: var(--ink); border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); padding: 14px; max-width: 640px; }
.composer textarea { width: 100%; min-height: 108px; resize: vertical; border: 1px solid var(--line-2); border-radius: 10px; padding: 14px 16px;
  font: 1.04rem/1.5 var(--sans); color: var(--ink); background: var(--paper); }
.composer textarea:focus { outline: 3px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.composer textarea::placeholder { color: #666a74; }
.composer-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.composer-bar label { display: flex; align-items: center; gap: 8px; font-size: .92rem; color: var(--mut); }
.composer select { font: inherit; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper); color: var(--ink); max-width: 280px; }
.composer .hint { font-size: .86rem; color: var(--mut); margin: 8px 2px 0; }
.composer .err { color: var(--bad); font-weight: 600; }
.sent { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--ok-bg); color: var(--ink); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sent.wait { background: var(--info-bg); } .sent.bad { background: var(--bad-bg); }

/* ------------------------------------------------------------------ metrics */
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, .85fr); gap: 16px; }
.metric { color: var(--ink); background: var(--raised); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); position: relative; min-width: 0; }
.metric .m-link { display: block; padding: 16px 40px 16px 16px; color: inherit; text-decoration: none; border-radius: var(--r); height: 100%; }
.metric .m-top span:last-child { min-width: 0; }
.metric .m-note { display: block; margin-top: 6px; font-size: .84rem; color: var(--warn); font-weight: 600; }
.metric .m-help { position: absolute; top: 14px; right: 12px; }
.metric .m-help .help-wrap { margin: 0; }
.metric:hover { border-color: var(--gold); box-shadow: var(--shadow-lg); }
.metric .m-top { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-weight: 600; font-size: .98rem; line-height: 1.25; }
.metric .m-ico { width: 34px; height: 34px; border-radius: 17px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-deep); flex: none; }
.metric .m-ico svg { width: 20px; height: 20px; }
.metric .m-val { font-family: var(--serif); font-size: 2.3rem; line-height: 1; margin-top: 12px; }
.metric .m-sub { color: var(--mut); font-size: .9rem; margin-left: 6px; font-family: var(--sans); }
.metric.attn { border-color: var(--warn); } .metric.attn .m-ico { background: var(--warn-bg); color: var(--warn); }
.metric.good .m-ico { background: var(--ok-bg); color: var(--ok); } .metric.bad .m-ico { background: var(--bad-bg); color: var(--bad); }

/* ------------------------------------------------------------------ task cards */
.tcard { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--paper); color: var(--ink); text-decoration: none; }
.tcard:hover { border-color: var(--gold); }
.tcard + .tcard { margin-top: 10px; }
.tcard .t-title { font-weight: 600; font-size: 1.02rem; display: block; margin-bottom: 4px; overflow-wrap: anywhere; }
.tcard .t-meta { display: flex; gap: 8px 14px; flex-wrap: wrap; font-size: .88rem; color: var(--mut); align-items: center; }
.tcard .t-now { margin-top: 8px; font-size: .93rem; }
.tcard .t-next { margin-top: 6px; font-size: .9rem; font-weight: 600; color: var(--gold-deep); }
.tcard.attn { border-left: 4px solid var(--warn); } .tcard.bad { border-left: 4px solid var(--bad); } .tcard.good { border-left: 4px solid var(--ok); }

/* decision cards */
.dcard { display: block; text-decoration: none; color: var(--ink); border: 1px solid var(--warn); background: var(--warn-bg); border-radius: 12px; padding: 14px 16px; }
.dcard + .dcard { margin-top: 10px; }
.dcard .d-act { font-weight: 700; display: block; } .dcard .d-tgt { font-family: var(--mono); font-size: .84rem; overflow-wrap: anywhere; }
.dcard .t-next { margin-top: 6px; font-weight: 600; color: var(--gold-deep); }
.repeat { border: 1px solid var(--bad); background: var(--bad-bg); color: var(--ink); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.repeat b { color: var(--bad); }

/* empty states */
.empty { text-align: center; padding: 18px 10px 8px; color: var(--mut); }
.empty .e-ico { width: 56px; height: 56px; border-radius: 28px; background: var(--gold-soft); color: var(--gold-deep); display: grid; place-items: center; margin: 0 auto 10px; }
.empty .e-ico svg { width: 26px; height: 26px; }
.empty b { display: block; color: var(--ink); font-family: var(--serif); font-size: 1.12rem; font-weight: 500; }
.empty .btn { margin-top: 12px; }

/* status list (system health) */
.slist { list-style: none; margin: 0; padding: 0; }
.slist li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.slist .help-wrap { margin-left: 4px; } .slist .pill { font-size: .78rem; padding: 3px 9px; }
.slist li:first-child { border-top: 0; }
.slist .s-ico { width: 30px; height: 30px; display: grid; place-items: center; color: var(--ink); }
.slist .s-ico svg { width: 22px; height: 22px; }
.slist .s-txt { flex: 1; min-width: 0; line-height: 1.3; } .slist .s-txt b { font-weight: 600; display: inline; } .slist .s-txt span.s-sub { display: block; font-size: .84rem; color: var(--mut); }

/* emergency stop */
.estop { border: 1px solid #e8b3ac; background: linear-gradient(180deg, #fdf1ef, #fbe6e2); }
:root[data-theme="dark"] .estop { border-color: #6b2a24; background: #2a1312; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .estop { border-color: #6b2a24; background: #2a1312; }
  :root:not([data-theme="light"]) .btn-danger { color: #1b0b09; } }
.estop h2 { color: var(--bad); display: flex; align-items: center; gap: 8px; }
.estop h2 svg { width: 22px; height: 22px; }
.estop .btn-danger, .estop .btn-navy { width: 100%; min-height: 50px; font-size: 1.02rem; margin-top: 8px; }
.estop.stopped { border-color: var(--bad); }

/* feed */
.feed-list { list-style: none; margin: 0; padding: 0; }
.feed-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.feed-list li:first-child { border-top: 0; }
.feed-list .f-dot { width: 26px; height: 26px; border-radius: 13px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-deep); }
.feed-list .f-dot svg { width: 14px; height: 14px; } .feed-list .f-dot.ok { background: var(--ok-bg); color: var(--ok); }
.feed-list .f-dot.warn { background: var(--warn-bg); color: var(--warn); } .feed-list .f-dot.bad { background: var(--bad-bg); color: var(--bad); }
.feed-list .f-what { overflow-wrap: anywhere; } .feed-list .f-when { font-size: .8rem; color: var(--mut); }

/* key/value + details */
.kv { display: grid; grid-template-columns: minmax(120px, 200px) minmax(0, 1fr); gap: 8px 16px; margin: 6px 0; }
.kv > div:nth-child(odd) { color: var(--mut); font-size: .92rem; } .kv > div { min-width: 0; overflow-wrap: anywhere; }
details.adv { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); margin-top: 12px; }
details.adv > summary { cursor: pointer; padding: 12px 16px; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; }
details.adv > summary::-webkit-details-marker { display: none; }
details.adv > summary::before { content: "›"; font-size: 1.25rem; color: var(--gold-deep); width: 12px; display: inline-block; }
details.adv[open] > summary::before { transform: rotate(90deg); }
details.adv > .adv-body { padding: 0 16px 14px; overflow-x: auto; }
pre { white-space: pre-wrap; word-break: break-word; background: var(--bg); border: 1px solid var(--line); padding: 10px 12px; border-radius: 10px;
  font: .82rem/1.45 var(--mono); max-height: 460px; overflow: auto; margin: 8px 0; color: var(--ink); }
.result { font-size: 1rem; line-height: 1.6; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.diff-add { color: var(--ok); } .diff-del { color: var(--bad); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 4px 0 10px 18px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 10px; width: 12px; height: 12px; border-radius: 6px; background: var(--gold); border: 2px solid var(--raised); }
.timeline .tl-when { font-size: .8rem; color: var(--mut); }

/* records (tables become cards on phones) */
.records { width: 100%; border-collapse: collapse; font-size: .92rem; }
.records th { text-align: left; font-weight: 600; color: var(--mut); padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
.records td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.records tr.click { cursor: pointer; } .records tr.click:hover td { background: var(--gold-soft); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.fchip { font: inherit; font-size: .9rem; padding: 7px 14px; min-height: 40px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); cursor: pointer; }
.fchip[aria-pressed="true"] { background: var(--navy); color: #f6efdf; border-color: var(--navy); }

.banner { margin: 0 32px 12px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--paper); font-weight: 500; }
.banner.ok { border-color: transparent; background: var(--ok-bg); } .banner.bad { border-color: transparent; background: var(--bad-bg); color: var(--ink); }
.banner.warn { border-color: transparent; background: var(--warn-bg); }
.notice { border-left: 4px solid var(--gold); background: var(--gold-soft); border-radius: 8px; padding: 10px 14px; margin: 10px 0; }
.notice.bad { border-color: var(--bad); background: var(--bad-bg); } .notice.warn { border-color: var(--warn); background: var(--warn-bg); }
.notice.ok { border-color: var(--ok); background: var(--ok-bg); }

/* dialog */
.dlg { border: 0; border-radius: 16px; padding: 0; width: min(560px, 94vw); background: var(--raised); color: var(--ink); box-shadow: var(--shadow-lg); }
.dlg::backdrop { background: rgba(10, 18, 32, .55); }
.dlg form { padding: 24px; display: grid; gap: 12px; }
.dlg h2 { font-size: 1.4rem; }
.dlg label { display: grid; gap: 6px; font-weight: 600; }
.dlg textarea, .dlg input, .dlg select { font: inherit; font-weight: 400; width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper); color: var(--ink); }
.dlg .row { justify-content: flex-end; margin-top: 6px; }

/* login */
html:has(body.login) { background: #0b1424; }
body.login { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: 20px; background-color: #0b1424;
  background-image: linear-gradient(180deg, rgba(10, 18, 32, .55), rgba(10, 18, 32, .85)), url(/static/hero.svg); background-size: cover; background-position: 80% center; }
.login-card { background: rgba(255, 253, 248, .97); color: #1f2229; border-radius: 20px; padding: 40px 36px; max-width: 440px; text-align: center; box-shadow: 0 30px 60px rgba(0, 0, 0, .35); }
.login-word { font-size: 2.2rem; letter-spacing: .1em; margin-top: 10px; color: #1f2229; }
.login-sub { letter-spacing: .22em; text-transform: uppercase; font-size: .76rem; color: #585d68; margin: 2px 0 18px; }
.login-text { color: #343843; } .login-card .btn { margin: 20px 0 12px; } .login-fine { font-size: .84rem; color: #585d68; }

/* mobile tab bar */
.tabbar { display: none; }
.mobile-only { display: none; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1280px) {
  .home { grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "metrics" "ops" "nw" "work" "done" "mon" "stream" "rail" "feed"; }
  .home > .rail { position: static; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}
@media (max-width: 1080px) {
  :root { --side-w: 84px; }
  .side-word, .side-sub, .side-foot, .nav-a span.lbl, .nav-sep { display: none; }
  .side-brand { padding: 22px 8px; } .nav-a { justify-content: center; padding: 12px; position: relative; }
  .nav-a .count { position: absolute; top: 2px; right: 4px; margin: 0; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .shell { display: block; }
  .side { display: none; }
  .top { padding: 10px 14px 8px; gap: 10px; position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
  .top-crown { display: block; } .wordmark { font-size: 1.3rem; } .top-div, .tagline, .user-meta, .user-btn .chev { display: none; }
  .top-status { flex: 0 0 auto; margin-left: auto; }
  .top-status .pill { font-size: 0; gap: 0; padding: 7px; }            /* phones: status as a dot; the label stays for screen readers */
  .top-status .pill .dot { width: 10px; height: 10px; border-radius: 5px; }
  .top-status a.pill.warn { display: none; }                            /* the Approvals tab shows the count */
  .top-status .pill.bad { font-size: .76rem; padding: 3px 9px; gap: 6px; } /* stopped / disconnected stay spelled out */
  .icon-btn { width: 44px; height: 44px; border-radius: 22px; }
  main#view { padding: 12px 14px 110px; }
  .banner { margin: 10px 14px 0; }
  .foot { margin: 0 14px; padding-bottom: 100px; }
  .home { grid-template-areas: "hero" "decisions" "metrics" "ops" "nw" "work" "done" "mon" "stream" "rail" "feed"; gap: 16px; }
  .home > .decisions { grid-area: decisions; }
  .home > .rail { grid-template-columns: 1fr; }
  .two { gap: 16px; }
  .hero { padding: 22px 16px 16px; border-radius: 16px; background-position: 70% 78%; }
  .hero h1 { font-size: 1.6rem; }
  .composer { padding: 10px; } .composer textarea { min-height: 96px; font-size: 1rem; }
  .composer-bar .btn-gold { flex: 1 1 100%; }
  .composer-bar label { flex: 1 1 100%; } .composer select { max-width: none; flex: 1; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .metric { padding: 14px; } .metric .m-val { font-size: 1.9rem; }
  .card { padding: 16px; border-radius: 14px; }
  .page-h h1 { font-size: 1.6rem; }
  .kv { grid-template-columns: 1fr; gap: 2px; } .kv > div:nth-child(even) { margin-bottom: 8px; }
  .records thead { display: none; }
  .records, .records tbody, .records tr, .records td { display: block; width: 100%; }
  .records tr { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; background: var(--paper); }
  .records td { border: 0; padding: 4px 0; display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 8px; }
  .records td::before { content: attr(data-label); color: var(--mut); font-size: .84rem; }
  .pop { position: fixed; left: 12px !important; right: 12px !important; top: auto !important; bottom: calc(84px + env(safe-area-inset-bottom)); width: auto; transform: none !important; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--navy);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(201, 169, 97, .3); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; color: #d9d2c2; text-decoration: none; font: 600 .72rem/1.2 var(--sans);
    padding: 6px 2px; min-height: 52px; border-radius: 10px; position: relative; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar [aria-current="page"] { color: #fff; background: rgba(201, 169, 97, .16); }
  .tabbar .count { position: absolute; top: 2px; left: calc(50% + 6px); margin: 0; }
  .mobile-only { display: block; } .desktop-only { display: none !important; }
}
@media (min-width: 821px) { .home > .decisions { display: none; } }
@media (max-width: 380px) { .metric .m-top { font-size: .88rem; gap: 8px; } .metric .m-ico { width: 32px; height: 32px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* decisions: Decline is the prominent, safe action; Approve is distinct and second; repeats are red */
.decision-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.btn-decline { background: var(--navy); color: #f6efdf; border-color: var(--navy); min-width: 220px; }
.btn-decline:hover { background: var(--navy-3); border-color: var(--navy-3); }
:root[data-theme="dark"] .btn-decline { background: #e9e2d2; color: #0f1b2d; border-color: #e9e2d2; }
:root[data-theme="dark"] .btn-decline:hover { background: #fff8e8; border-color: #fff8e8; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-decline { background: #e9e2d2; color: #0f1b2d; border-color: #e9e2d2; }
  :root:not([data-theme="light"]) .btn-decline:hover { background: #fff8e8; border-color: #fff8e8; }
}
.btn-approve { background: var(--paper); color: var(--ink); border: 2px solid var(--gold-deep); }
.btn-approve.is-repeat, .btn-approve.is-repeat:hover { border-color: var(--bad); color: var(--bad); }
.btn-approve:disabled { opacity: .45; }
.approve-summary { border: 1px solid var(--line-2); border-left: 5px solid var(--gold); background: var(--gold-soft); border-radius: 12px; padding: 14px 16px; margin-top: 16px; }
.approve-summary.is-repeat { border-left-color: var(--bad); }
.approve-summary h3 { margin-bottom: 8px; }
.approve-summary ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.approve-summary .repeat-line { color: var(--bad); font-weight: 600; }
.checks { border: 0; padding: 0; margin: 4px 0 0; display: grid; gap: 10px; }
.check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; }
.check input { width: 22px; height: 22px; flex: none; margin-top: 1px; accent-color: var(--gold-deep); }
.repeat-check { border-color: var(--bad); background: var(--bad-bg); }
.repeat-check input { accent-color: var(--bad); }
@media (max-width: 820px) {
  .decision-bar { flex-direction: column; align-items: stretch; }
  .decision-bar .btn { width: 100%; }
}
.approve-summary .money-line { font-size: 1.08em; }
.decline-note { margin: 10px 2px 0; }
#confirm-hint { margin: 2px 0 0; }
@media (max-width: 820px) {
  /* stacked, full width, 12px apart; Cancel stays first in the DOM (Enter cancels) but sits at the bottom, as iOS does */
  .dlg .row { flex-direction: column-reverse; align-items: stretch; gap: 12px; }
  .dlg .row .btn { width: 100%; }
}
.approve-summary .probe-line { color: var(--info, #2b5d9b); font-weight: 600; }
.paused-note { color: var(--warn, #8a5a00); font-weight: 600; flex-basis: 100%; }
.paused-banner { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
.dlg-paused { color: var(--warn); font-weight: 600; border: 1px solid var(--warn); border-radius: 10px; padding: 10px 12px; }
.approve-summary .unverified-line { color: var(--warn); font-weight: 600; }
.notice-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--paper, #f6efdf); }
.notice-card { max-width: 520px; width: 100%; background: var(--card, #fffdf8); border: 1px solid var(--line-2, #ddd); border-radius: 16px; padding: 24px; }
.notice-card h1 { margin: 0 0 12px; font-size: 1.6rem; }
.notice-card .btn { display: block; text-align: center; width: 100%; }

/* ---------------------------------------------------------------------------------------- cancellation window */
.hold-panel { border: 2px solid var(--gold-deep); background: var(--paper); border-radius: 14px; padding: 18px 20px; margin: 12px 0 16px; box-shadow: var(--shadow); }
.hold-panel h2 { margin: 0 0 6px; font-size: 1.15rem; }
.hold-count { font-size: 1.35rem; font-weight: 700; margin: 6px 0 10px; font-variant-numeric: tabular-nums; }
.hold-bar { width: 100%; height: 10px; margin: 0 0 14px; accent-color: var(--gold-deep); }
.stop-bar { display: flex; }
.btn-stop { background: var(--navy); color: #f6efdf; border-color: var(--navy); min-width: 260px; min-height: 48px; font-size: 1.05rem; }
.btn-stop:hover { background: var(--navy-3); border-color: var(--navy-3); }
.btn-stop:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 3px; }
.btn-stop:disabled { opacity: .7; cursor: progress; }
:root[data-theme="dark"] .btn-stop { background: #e9e2d2; color: #0f1b2d; border-color: #e9e2d2; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-stop { background: #e9e2d2; color: #0f1b2d; border-color: #e9e2d2; } }
@media (max-width: 820px) {
  /* iPhone: Stop stays on screen (above the tab bar and the home indicator) wherever the page is scrolled */
  .hold-panel { padding-bottom: 84px; }
  .stop-bar { position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 60; }
  .btn-stop { width: 100%; min-height: 54px; box-shadow: var(--shadow-lg); }
}
.hold-banner { border: 2px solid var(--gold-deep); background: var(--paper); border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; display: grid; gap: 8px; }
.hold-banner-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.stop-left { display: none; margin-left: 12px; font-weight: 700; font-variant-numeric: tabular-nums; align-self: center; }
.hold-banner .stop-left, .hold-banner [data-left] { display: inline; }
@media (max-width: 820px) {
  body.has-hold #view { padding-bottom: 160px; }       /* the sticky Stop bar never covers the end of the page */
  .stop-bar { flex-direction: column; align-items: stretch; gap: 6px; }       /* time left above a full-width Stop */
  .stop-left { display: inline-block; margin-left: 0; align-self: center; background: var(--paper); border-radius: 8px; padding: 4px 10px; box-shadow: var(--shadow); }
}

/* ------------------------------------------------------------------ NIGHTWATCH (read-only division view) */
.nw-card { margin: 18px 0 22px; padding: 22px 24px; border-color: var(--line-2); position: relative; overflow: hidden; }
.nw-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--gold); opacity: .85; }
.nw-card.nw-stopped::before { background: var(--bad); } .nw-card.nw-degraded::before, .nw-card.nw-stale::before { background: var(--warn); }
.nw-card.nw-unavailable::before, .nw-card.nw-unconfigured::before, .nw-card.nw-waiting::before { background: var(--line-2); }
.nw-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.nw-id { min-width: 0; }
.nw-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-deep); font-weight: 600; }
.nw-eyebrow svg { width: 16px; height: 16px; }
.nw-card h2 { font-size: 1.36rem; margin-top: 6px; }
.nw-state { display: flex; align-items: center; gap: 6px; flex: none; }
.nw-line { color: var(--mut); margin: 10px 0 14px; max-width: 70ch; }
.nw-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 22px; margin: 0 0 4px; }
.nw-facts.compact { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 18px; }
.nw-fact { min-width: 0; border-top: 1px solid var(--line); padding-top: 10px; }
.nw-fact dt { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--mut); margin-bottom: 4px; }
.nw-fact dd { margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.nw-val { font-weight: 600; color: var(--ink); }
.nw-note { display: block; font-size: .82rem; color: var(--mut); line-height: 1.4; }
.nw-open { display: inline-flex; align-items: center; gap: 4px; }
.nw-overview { padding: 24px 26px; }
.nw-big { font-family: var(--serif); font-size: 1.9rem; line-height: 1.2; margin: 8px 0 18px; color: var(--ink); }
.nw-big-sub { display: block; font-family: var(--sans); font-size: 1rem; color: var(--mut); margin-top: 6px; max-width: 70ch; }
.nw-two { margin: 22px 0; }
.nw-sum { margin: 0 0 12px; }
.nw-reqs { list-style: none; margin: 0; padding: 0; }
.nw-reqs > li { border-top: 1px solid var(--line); } .nw-reqs > li:first-child { border-top: 0; }
.nw-req summary { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 11px 2px;
  cursor: pointer; list-style: none; border-radius: 8px; }
.nw-req summary::-webkit-details-marker { display: none; }
.nw-req summary:hover { background: var(--gold-soft); }
.nw-req-t { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nw-tag { font-size: .72rem; font-weight: 600; letter-spacing: .04em; color: var(--gold-deep); border: 1px solid var(--gold);
  border-radius: 999px; padding: 1px 8px; }
.nw-req-id { color: var(--mut); max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-req-b { padding: 4px 2px 14px; }
.nw-req-b .kv { grid-template-columns: minmax(90px, 130px) minmax(0, 1fr); }
.nw-req-b dt, .nw-audit dt { color: var(--mut); font-size: .92rem; } .nw-req-b dd, .nw-audit dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.nw-foot { margin-top: 14px; }
.nw-tl time { color: inherit; }
.nw-audit { margin-bottom: 22px; }
@media (max-width: 700px) {
  .nw-card, .nw-overview { padding: 18px; }
  .nw-big { font-size: 1.5rem; }
  .nw-req summary { grid-template-columns: minmax(0, 1fr) auto; }
  .nw-req-id { display: none; }
  .nw-facts, .nw-facts.compact { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 360px) { .nw-facts, .nw-facts.compact { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: no-preference) { .nw-req summary { transition: background-color .15s; } }

/* ---- operational reality (live operations, work queue, monitors, event stream) */
.ops-area { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
.ops-card .card-h { flex-wrap: wrap; } .ops-state { margin-left: auto; }
.ops-verdict { margin: 4px 0 14px; padding: 10px 14px; border-radius: 10px; border-left: 3px solid var(--line-2); background: var(--paper); color: var(--ink); line-height: 1.5; }
.ops-verdict.ops-productive { border-left-color: var(--ok); } .ops-verdict.ops-quiet { border-left-color: var(--warn); }
.ops-verdict.ops-none { border-left-color: var(--bad); }
.ops-kv dd { display: grid; gap: 2px; } .ops-line { display: grid; gap: 1px; margin-bottom: 4px; } .ops-sum { color: var(--ink); }
.ops-qgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 10px; margin-bottom: 10px; }
.ops-q { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); text-decoration: none; }
.ops-q:hover { background: var(--gold-soft); } .ops-q-n { font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; }
.ops-q-l { font-size: .82rem; color: var(--mut); } .ops-q.warn .ops-q-n { color: var(--warn); } .ops-q.info .ops-q-n { color: var(--navy); }
.ops-mtable td .nw-note { display: block; } .ops-mtable td b { font-weight: 600; }
.ops-mtable td { overflow-wrap: break-word; word-break: normal; } .ops-mtable th:first-child, .ops-mtable td:first-child { width: 30%; min-width: 180px; }
.ops-mtable th:nth-child(2), .ops-mtable td:nth-child(2) { width: 22%; } .ops-mtable th:nth-child(3), .ops-mtable td:nth-child(3) { width: 12%; white-space: nowrap; }
.ops-mtable td:nth-child(3) .nw-note { white-space: normal; } .ops-mtable th:last-child, .ops-mtable td:last-child { white-space: nowrap; }
.nw-content { margin: 14px 0 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.nw-content h3 { font-size: .95rem; margin: 0 0 6px; display: flex; align-items: center; gap: 6px; }
.nw-zero { margin: 0 0 8px; } .nw-zero b { letter-spacing: .02em; }
.nw-cgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px 14px; margin: 0 0 6px; }
.nw-cgrid dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--mut); } .nw-cgrid dd { margin: 0; font-weight: 600; }
.table-wrap { overflow-x: auto; }
.ops-kv dd, .ops-mgrid dd { margin: 0; }
.ops-mlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ops-mon { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--paper); }
.ops-mon-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; } .ops-mon-h b { font-weight: 600; }
.ops-mon-h .nw-note { display: block; } .ops-why { margin: 6px 0 0; overflow-wrap: anywhere; }
.ops-mgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 16px; margin: 10px 0 0; }
.ops-mgrid dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--mut); }
.ops-mgrid dd { display: grid; gap: 2px; } .ops-wrap { overflow-wrap: anywhere; }
@media (max-width: 900px) { .ops-mgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .ops-mgrid { grid-template-columns: minmax(0, 1fr); } .ops-mon-h { flex-direction: column; } }
.nw-sub { font-size: .95rem; margin: 14px 0 4px; }
.ops-kv dt { color: var(--mut); font-size: .88rem; }
@media (max-width: 760px) { .ops-kv dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; margin-top: 6px; } }
@media (min-width: 1100px) { .ops-qgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.nw-req summary { position: relative; padding-left: 22px; }
.nw-req summary::before { content: ""; position: absolute; left: 4px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--mut);
  border-bottom: 2px solid var(--mut); transform: translateY(-50%) rotate(-45deg); transition: transform .15s; }
.nw-req[open] summary::before { transform: translateY(-75%) rotate(45deg); }
@media (prefers-reduced-motion: reduce) { .nw-req summary::before { transition: none; } }
.nw-latest { margin: 0 0 6px; font-size: .92rem; }
