@import url("tokens.css");
@import url("https://fonts.googleapis.com/css2?family=Barlow:wght@300;400;500;600;700&family=Roboto:wght@300;400;500;700&display=swap");

/* ==========================================================
   RESET
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--navy-950);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,h2,h3,h4,h5 { margin: 0; font-family: var(--font-display); font-weight: 500; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--dtv-yellow); color: var(--dtv-navy); }

/* Scrollbars — thin, on-brand */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 100px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.26); background-clip: content-box; }

/* ==========================================================
   ATMOSPHERE — the Insider navy→blue field, plus grain
   ========================================================== */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(1100px 700px at 78% -10%, rgba(0,109,255,.42), transparent 62%),
    radial-gradient(760px 520px at 4% 104%, rgba(48,138,255,.16), transparent 58%),
    linear-gradient(168deg, var(--navy-950) 0%, var(--navy-850) 48%, #01062E 100%);
}
/* film grain — keeps large flat gradients from banding */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================
   SHELL
   ========================================================== */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(0,2,28,.86), rgba(0,4,67,.62));
  border-right: 1px solid var(--hairline-soft);
  backdrop-filter: blur(14px);
}
.brand { padding: 20px 22px 18px; border-bottom: 1px solid var(--hairline-soft); }
.brand-lockup { display: flex; align-items: baseline; gap: 7px; }
.brand-dtv {
  font-family: var(--font-display); font-size: 19px; font-weight: 700;
  letter-spacing: .5px; color: #fff;
}
.brand-sub {
  font-family: var(--font-display); font-size: 19px; font-weight: 400;
  letter-spacing: .5px; color: var(--blue-400); display: flex; align-items: center; gap: 4px;
}
.brand-sub::after {
  content: ""; width: 0; height: 0; border-left: 7px solid var(--dtv-yellow);
  border-top: 5px solid transparent; border-bottom: 5px solid transparent; margin-left: 1px;
}
.brand-meta { margin-top: 7px; font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink-faint); }

.nav { flex: 1; overflow-y: auto; padding: 16px 12px 22px; }
.nav-group + .nav-group { margin-top: 22px; }
.nav-label {
  font-family: var(--font-display); font-size: 10.5px; font-weight: 600;
  letter-spacing: var(--ls-label); text-transform: uppercase;
  color: var(--ink-faint); padding: 0 10px 9px; display: flex; align-items: center; gap: 8px;
}
.nav-label.is-ai { color: var(--dtv-yellow); }
.nav-label .rule { flex: 1; height: 1px; background: var(--hairline-soft); }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8.5px 11px; border-radius: 6px; margin-bottom: 1px;
  color: var(--ink-muted); font-size: 13.5px; letter-spacing: -.1px;
  transition: background .16s ease, color .16s ease;
  position: relative;
}
.nav-item:hover { background: var(--surface-1); color: #fff; }
.nav-item.active { background: var(--surface-2); color: #fff; font-weight: 500; }
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 50%; translate: 0 -50%;
  width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--dtv-yellow);
}
.ico { width: 16px; height: 16px; flex: none; }
.nav-item .ico { opacity: .82; }
.nav-item.legacy { color: var(--ink-faint); font-size: 13px; }
.nav-item.legacy:hover { color: var(--ink-muted); }
.nav-count {
  margin-left: auto; font-size: 10.5px; font-weight: 700; font-family: var(--font-display);
  background: var(--dtv-yellow); color: var(--dtv-navy);
  border-radius: 100px; padding: 1px 7px; letter-spacing: 0;
}

.sidebar-foot { padding: 14px 16px 18px; border-top: 1px solid var(--hairline-soft); }
.legacy-note {
  font-size: 10.5px; line-height: 1.45; color: var(--ink-faint);
  background: var(--surface-1); border: 1px dashed var(--hairline);
  border-radius: 6px; padding: 8px 10px;
}

/* ---------- Topbar ---------- */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--topbar-h);
  display: flex; align-items: center; gap: 18px; padding: 0 var(--gutter);
  background: rgba(0,3,40,.72); backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--hairline-soft);
}
.crumb { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-faint); }
.crumb b { color: #fff; font-weight: 500; }
.crumb .sep { opacity: .4; }
.topbar-spacer { flex: 1; }

.searchbox {
  display: flex; align-items: center; gap: 8px; width: 268px;
  background: var(--surface-1); border: 1px solid var(--hairline-soft);
  border-radius: var(--r-pill); padding: 7px 14px;
  transition: border-color .18s, background .18s;
}
.searchbox:focus-within { border-color: var(--blue-400); background: var(--surface-2); }
.searchbox input { background: none; border: 0; outline: 0; width: 100%; font-size: 13px; }
.searchbox input::placeholder { color: var(--ink-faint); }

.role-switch {
  display: flex; align-items: center; gap: 2px; padding: 3px;
  background: var(--surface-1); border: 1px solid var(--hairline-soft); border-radius: var(--r-pill);
}
.role-switch button {
  background: none; border: 0; cursor: pointer; border-radius: var(--r-pill);
  padding: 5px 13px; font-size: 11.5px; font-weight: 500; color: var(--ink-muted);
  font-family: var(--font-display); letter-spacing: .3px; transition: all .18s ease;
}
.role-switch button:hover { color: #fff; }
.role-switch button.on { background: var(--dtv-yellow); color: var(--dtv-navy); font-weight: 700; }

.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--blue-400), var(--dtv-blue));
  display: grid; place-items: center; font-family: var(--font-display);
  font-size: 12px; font-weight: 700; letter-spacing: .4px;
  box-shadow: 0 0 0 2px rgba(255,255,255,.14);
}

/* ---------- Page canvas ---------- */
.page { padding: 30px var(--gutter) 64px; max-width: 1560px; width: 100%; }
.page-head { margin-bottom: 26px; display: flex; align-items: flex-end; gap: 26px; flex-wrap: wrap; }
.page-head .grow { flex: 1; min-width: 320px; }
.eyebrow {
  font-family: var(--font-display); font-size: 11px; font-weight: 600;
  letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--dtv-yellow);
  margin-bottom: 9px; display: flex; align-items: center; gap: 8px;
}
.page-title {
  font-size: 44px; font-weight: 300; line-height: 1.02; letter-spacing: var(--ls-h1);
  text-transform: uppercase;
}
.page-title em { font-style: normal; font-weight: 700; color: var(--dtv-yellow); }
.page-sub { margin-top: 11px; color: var(--ink-muted); font-size: 14px; max-width: 74ch; }

/* Signature Insider arc — used as a section divider flourish */
.arc {
  position: relative; height: 3px; margin: 34px 0 26px;
  background: linear-gradient(90deg, var(--dtv-yellow), rgba(0,109,255,.5) 34%, transparent 72%);
  border-radius: 3px;
}

/* ==========================================================
   COMPONENTS
   ========================================================== */

/* ---------- Buttons (recipes measured off directv.com) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; white-space: nowrap;
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  letter-spacing: var(--ls-btn); border-radius: var(--r-pill);
  padding: 11px 22px; transition: transform .14s ease, box-shadow .2s ease, background .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--dtv-blue); color: #fff; }
.btn-primary:hover { background: var(--blue-400); box-shadow: var(--glow-blue); }
.btn-accent { background: var(--dtv-yellow); color: var(--dtv-navy); font-weight: 700; }
.btn-accent:hover { background: #FFE070; box-shadow: var(--glow-yellow); }
.btn-dark {
  background: var(--dtv-navy); color: #fff; border-radius: var(--r-btn-dark);
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: var(--ls-btn);
  border: 1px solid var(--hairline);
}
.btn-dark:hover { background: var(--navy-700); }
.btn-ghost { background: var(--surface-1); color: #fff; border: 1px solid var(--hairline); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--blue-400); }
.btn-sm { padding: 7px 15px; font-size: 12.5px; }
.btn-lg { padding: 15px 30px; font-size: 15px; }
.btn:disabled { opacity: .38; cursor: not-allowed; }
.btn-danger { background: rgba(255,92,110,.14); color: var(--danger); border: 1px solid rgba(255,92,110,.34); }
.btn-danger:hover { background: rgba(255,92,110,.24); }

/* ---------- Chips (the Insider outlined category pills) ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border: 1px solid var(--hairline); background: transparent; color: var(--ink-muted);
  border-radius: var(--r-chip); padding: 5px 13px;
  font-family: var(--font-display); font-size: 11.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .7px;
  transition: all .16s ease;
}
.chip:hover { border-color: var(--blue-400); color: #fff; }
.chip.on { background: #fff; color: var(--dtv-navy); border-color: #fff; font-weight: 700; }
.chip.on-y { background: var(--dtv-yellow); color: var(--dtv-navy); border-color: var(--dtv-yellow); font-weight: 700; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface-1); border: 1px solid var(--hairline-soft);
  border-radius: var(--r-card); padding: 20px;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.card-hover:hover { border-color: var(--hairline); background: var(--surface-2); transform: translateY(-2px); }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-title {
  font-family: var(--font-display); font-size: 12.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: var(--ls-label); color: var(--ink-muted);
}
.card-head .btn { margin-left: auto; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 1240px) { .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 820px)  { .g4, .g3, .g2 { grid-template-columns: 1fr; } }

/* ---------- Stat tiles ---------- */
.stat { position: relative; overflow: hidden; }
.stat .k {
  font-family: var(--font-display); font-size: 40px; font-weight: 300;
  line-height: 1; letter-spacing: -1.4px; margin: 6px 0 4px;
}
.stat .k.y { color: var(--dtv-yellow); }
.stat .k.b { color: var(--blue-300); }
.stat .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: var(--ls-label); color: var(--ink-faint); font-family: var(--font-display); font-weight: 600; }
.stat .delta { font-size: 12px; color: var(--ok); margin-top: 6px; }
.stat .delta.down { color: var(--danger); }
.stat::after {
  content: ""; position: absolute; right: -34px; bottom: -34px; width: 108px; height: 108px;
  border-radius: 50%; background: radial-gradient(circle, rgba(0,109,255,.20), transparent 68%);
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-display); font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .7px;
  padding: 3px 9px; border-radius: 100px; white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-draft    { background: rgba(255,255,255,.09); color: var(--ink-muted); }
.badge-review   { background: rgba(253,215,70,.15); color: var(--dtv-yellow); }
.badge-approved { background: rgba(56,211,159,.15); color: var(--ok); }
.badge-rejected { background: rgba(255,92,110,.15); color: var(--danger); }
.badge-published{ background: rgba(48,138,255,.18); color: var(--blue-300); }
.badge-plain    { background: var(--surface-2); color: var(--ink-muted); }
.badge-plain::before { display: none; }

/* ---------- Tables ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; padding: 9px 14px; font-family: var(--font-display);
  font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: var(--ls-label);
  color: var(--ink-faint); border-bottom: 1px solid var(--hairline);
}
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--hairline-soft); vertical-align: middle; }
.tbl tbody tr { transition: background .14s; }
.tbl tbody tr:hover { background: var(--surface-1); }
.tbl .num { font-family: var(--font-mono); font-size: 12.5px; text-align: right; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block; margin-bottom: 7px;
  font-family: var(--font-display); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: var(--ls-label); color: var(--ink-muted);
}
.input, .select, .textarea {
  width: 100%; background: rgba(0,2,28,.5); border: 1px solid var(--hairline);
  border-radius: 6px; padding: 10px 13px; font-size: 13.5px; outline: 0;
  transition: border-color .18s, box-shadow .18s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(0,109,255,.16); }
.textarea { resize: vertical; min-height: 92px; line-height: 1.55; font-family: var(--font-body); }
.select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23ffffff' stroke-opacity='.55' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px; }
.select option { background: var(--navy-850); color: #fff; }
.hint { font-size: 11.5px; color: var(--ink-faint); margin-top: 6px; }
.counter { font-family: var(--font-mono); font-size: 11px; }
.counter.ok { color: var(--ok); } .counter.warn { color: var(--warn); } .counter.bad { color: var(--danger); }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-1); border: 1px solid var(--hairline-soft); border-radius: var(--r-pill); }
.seg button {
  background: none; border: 0; cursor: pointer; border-radius: var(--r-pill); padding: 6px 15px;
  font-family: var(--font-display); font-size: 11.5px; font-weight: 600; letter-spacing: .4px;
  text-transform: uppercase; color: var(--ink-muted); transition: all .16s;
}
.seg button:hover { color: #fff; }
.seg button.on { background: #fff; color: var(--dtv-navy); }

/* ---------- Progress / meters ---------- */
.meter { height: 6px; border-radius: 100px; background: rgba(255,255,255,.1); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 100px; background: linear-gradient(90deg, var(--dtv-blue), var(--blue-300)); transition: width .8s cubic-bezier(.22,1,.36,1); }
.meter > i.y { background: linear-gradient(90deg, var(--dtv-amber), var(--dtv-yellow)); }
.meter > i.g { background: linear-gradient(90deg, #1FA97C, var(--ok)); }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 54px 20px; color: var(--ink-faint); }
.empty .big { font-family: var(--font-display); font-size: 17px; color: var(--ink-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .6px; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 11px; min-width: 280px; max-width: 400px;
  background: rgba(4,10,58,.96); border: 1px solid var(--hairline);
  border-left: 3px solid var(--dtv-yellow); border-radius: 8px; padding: 13px 16px;
  box-shadow: var(--shadow-3); font-size: 13px;
  animation: toastIn .34s cubic-bezier(.22,1,.36,1);
}
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--danger); }
.toast.out { animation: toastOut .28s ease forwards; }
@keyframes toastIn  { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes toastOut { to   { opacity: 0; transform: translateX(24px); } }

/* ---------- Modal / drawer ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 150; background: rgba(0,1,16,.72);
  backdrop-filter: blur(5px); display: grid; place-items: center; padding: 30px;
  animation: fade .22s ease;
}
.scrim[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.modal {
  width: min(760px, 100%); max-height: 86vh; overflow: auto;
  background: linear-gradient(168deg, #060E52, #01062E);
  border: 1px solid var(--hairline); border-radius: 14px; box-shadow: var(--shadow-3);
  animation: pop .3s cubic-bezier(.22,1,.36,1);
}
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.975); } }
.modal-head { display: flex; align-items: center; gap: 14px; padding: 20px 24px; border-bottom: 1px solid var(--hairline-soft); }
.modal-head h3 { font-size: 19px; font-weight: 500; letter-spacing: -.3px; }
.modal-body { padding: 24px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 24px; border-top: 1px solid var(--hairline-soft); }
.x-btn { margin-left: auto; background: none; border: 0; cursor: pointer; color: var(--ink-faint); font-size: 22px; line-height: 1; padding: 2px 6px; border-radius: 5px; }
.x-btn:hover { color: #fff; background: var(--surface-2); }

/* ---------- Utility ---------- */
.row { display: flex; align-items: center; gap: 10px; }
.row-b { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.mt0{margin-top:0}.mt8{margin-top:8px}.mt12{margin-top:12px}.mt16{margin-top:16px}.mt24{margin-top:24px}.mt32{margin-top:32px}
.mb0{margin-bottom:0}.mb8{margin-bottom:8px}.mb12{margin-bottom:12px}.mb16{margin-bottom:16px}.mb24{margin-bottom:24px}
.muted { color: var(--ink-muted); } .faint { color: var(--ink-faint); }
.mono { font-family: var(--font-mono); }
.sm { font-size: 12px; } .xs { font-size: 11px; }
.up { text-transform: uppercase; letter-spacing: var(--ls-label); font-family: var(--font-display); font-weight: 600; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.hide { display: none !important; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 13px; }
.dl dt { color: var(--ink-faint); font-size: 11px; text-transform: uppercase; letter-spacing: .8px; font-family: var(--font-display); font-weight: 600; padding-top: 2px; }
.dl dd { margin: 0; }

/* Reveal-on-load stagger */
.reveal { opacity: 0; animation: rise .6s cubic-bezier(.22,1,.36,1) forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.reveal:nth-child(1){animation-delay:.02s} .reveal:nth-child(2){animation-delay:.07s}
.reveal:nth-child(3){animation-delay:.12s} .reveal:nth-child(4){animation-delay:.17s}
.reveal:nth-child(5){animation-delay:.22s} .reveal:nth-child(6){animation-delay:.27s}
.reveal:nth-child(7){animation-delay:.32s} .reveal:nth-child(8){animation-delay:.37s}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* Persistent reminder that trend figures are illustrative */
.demo-chip {
  font-family: var(--font-display); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .9px;
  color: var(--dtv-yellow); background: rgba(253,215,70,.11);
  border: 1px dashed rgba(253,215,70,.45); border-radius: var(--r-pill);
  padding: 4px 11px; cursor: help; white-space: nowrap;
}

/* ==========================================================
   Wired-app additions (server-backed pages)
   ========================================================== */
.spin {
  display: inline-block; width: 12px; height: 12px; margin-right: 8px;
  border: 2px solid rgba(255,255,255,.3); border-top-color: currentColor;
  border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -1px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* history / articles table */
.t0 { width: 100%; border-collapse: collapse; font-size: 13px; }
.t0 th { text-align: left; padding: 9px 12px; font-family: var(--font-display);
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
  color: var(--ink-faint); border-bottom: 1px solid var(--hairline); }
.t0 td { padding: 11px 12px; border-bottom: 1px solid var(--hairline-soft); }
.t0 tbody tr { cursor: pointer; transition: background .14s; }
.t0 tbody tr:hover { background: var(--surface-1); }
.t0 tbody tr.on { background: rgba(253,215,70,.08); }
.t0 .u { font-family: var(--font-mono); font-size: 11.5px; color: var(--blue-300);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 340px; display: block; }
.pill-n { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 5px;
  border-radius: 100px; font-family: var(--font-mono); font-size: 10.5px;
  background: var(--surface-2); color: var(--ink-muted); }
.pill-n.has { background: rgba(48,138,255,.22); color: var(--blue-300); }

/* version rail */
.vrail { display: flex; flex-direction: column; gap: 6px; }
.vrow { display: flex; align-items: center; gap: 10px; padding: 8px 11px; border-radius: 6px;
  background: var(--surface-1); border: 1px solid transparent; cursor: pointer; font-size: 12.5px; }
.vrow:hover { border-color: var(--hairline); background: var(--surface-2); }
.vrow.on { border-color: var(--dtv-yellow); background: rgba(253,215,70,.07); }
.vrow .vn { font-family: var(--font-mono); font-size: 11px; color: var(--dtv-yellow); }

/* source switch */
.src-panel { display: none; }
.src-panel.on { display: block; }

/* admin editors */
.mono-area { font-family: var(--font-mono); font-size: 12px; line-height: 1.65; min-height: 220px; }
.kv-row { display: grid; grid-template-columns: 150px 1fr auto; gap: 8px; margin-bottom: 7px; align-items: center; }
.rule-edit { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.rule-edit .input { flex: 1; }
.x-mini { background: var(--surface-2); border: 1px solid var(--hairline); color: var(--ink-faint);
  border-radius: 5px; cursor: pointer; padding: 5px 9px; font-size: 12px; line-height: 1; }
.x-mini:hover { color: var(--danger); border-color: rgba(255,92,110,.4); }

/* posting state board */
.board-row { display: grid; grid-template-columns: 96px 1fr 120px 130px; gap: 12px;
  align-items: center; padding: 11px 0; border-bottom: 1px solid var(--hairline-soft); font-size: 12.5px; }
.board-row:last-child { border-bottom: 0; }
@media (max-width: 900px) { .board-row { grid-template-columns: 90px 1fr auto; } .board-row .hidem { display: none; } }

.err-note { background: rgba(255,92,110,.08); border: 1px solid rgba(255,92,110,.3);
  border-radius: 8px; padding: 12px 14px; font-size: 12.5px; color: #FFC9CF; }

.live-chip {
  font-family: var(--font-display); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .9px;
  color: var(--ok); background: rgba(56,211,159,.12);
  border: 1px solid rgba(56,211,159,.4); border-radius: var(--r-pill);
  padding: 4px 11px; cursor: help; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.live-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
