/* PLAYBOOK design tokens — Insight Platform template. Deep teal + navy, green accents, white content. */
:root {
  --navy-900: #071A2E; --navy-800: #0B2540; --navy-700: #12324F; --navy-600: #1B4365;
  --teal-700: #0A5961; --teal-600: #0E6F7A; --teal-500: #12838F; --teal-100: #E3F2F3; --teal-50: #F1F8F9;
  --green-600: #2F8F3F; --green-500: #3FA34D; --green-400: #6CC04A; --green-100: #E6F4E3;
  --amber-600: #B7791F; --amber-100: #FDF3DC; --red-600: #B42318; --red-100: #FDECEA;
  --ink: #0F1F2E; --ink-2: #3B4A59; --ink-3: #6B7A89; --line: #E3E8ED; --bg: #F4F7F9; --white: #FFFFFF;
  --radius: 10px; --shadow: 0 1px 2px rgba(11,37,64,.06), 0 4px 16px rgba(11,37,64,.05);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--teal-600); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 700; } h2 { font-size: 15px; font-weight: 650; } h3 { font-size: 13px; }
.muted { color: var(--ink-3); } .small { font-size: 12px; } .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; }

/* ---------- components */
.grid { display: grid; gap: 16px; }
.g-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } .g-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g-2 { grid-template-columns: 2fr 1fr; }
@media (max-width: 1280px) { .g-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 980px) { .g-2, .g-3 { grid-template-columns: 1fr; } .shell { grid-template-columns: 220px 1fr; } }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 0; }
.card-b { padding: 14px 18px 18px; }
.kpi { padding: 16px 18px; position: relative; overflow: hidden; }
.kpi .label { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.kpi .value { font-size: 28px; font-weight: 750; letter-spacing: -.02em; margin-top: 4px; color: var(--navy-800); }
.kpi .sub { font-size: 11.5px; color: var(--ink-3); }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--teal-500); }
.kpi.accent::before { background: var(--green-500); }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 2px 8px;
  border-radius: 999px; }
.b-ok { background: var(--green-100); color: var(--green-600); } .b-warn { background: var(--amber-100); color: var(--amber-600); }
.b-bad { background: var(--red-100); color: var(--red-600); } .b-info { background: var(--teal-100); color: var(--teal-700); }
.b-muted { background: #EEF2F5; color: var(--ink-3); }
.bar-row { display: grid; grid-template-columns: 220px 1fr 48px; align-items: center; gap: 12px; margin: 9px 0; }
.bar { height: 10px; background: #EEF3F6; border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal-600), var(--teal-500)); border-radius: 999px; }
.bar > span.green { background: linear-gradient(90deg, var(--green-500), var(--green-400)); }
.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3);
  font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.t td { padding: 9px 10px; border-bottom: 1px solid #EEF2F5; vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 12px; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; font-weight: 550; }
.empty { padding: 26px; text-align: center; color: var(--ink-3); background: var(--teal-50); border: 1px dashed #BFDDE0;
  border-radius: 8px; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid #EEF2F5; align-items: flex-start; }
.steps li:last-child { border: 0; }
.dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: none; }
.dot.done { background: var(--green-500); color: #fff; } .dot.now { background: var(--teal-600); color: #fff; }
.dot.next { background: #EEF2F5; color: var(--ink-3); }
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--teal-600); color: #fff; border: 0;
  border-radius: 8px; padding: 9px 16px; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--teal-700); text-decoration: none; }
.btn.secondary { background: #fff; color: var(--navy-800); border: 1px solid var(--line); }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-weight: 550; }
.flash.error { background: var(--red-100); color: var(--red-600); } .flash.ok { background: var(--green-100); color: var(--green-600); }
.rule { background: linear-gradient(135deg, var(--navy-800), var(--teal-700)); color: #E6F1F3; border: 0; }
.rule h2 { color: #fff; } .rule .muted { color: #A9C6CC; }
.rule .big { font-size: 34px; font-weight: 800; color: #fff; }

/* ---------- auth */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: radial-gradient(1200px 600px at -10% -20%, #12838F 0%, transparent 60%),
  linear-gradient(160deg, var(--navy-800), var(--navy-900)); color: #DCE8F0; padding: 56px; display: flex;
  flex-direction: column; justify-content: space-between; }
.auth-art img { width: 300px; }
.auth-art h2 { font-size: 26px; color: #fff; max-width: 460px; line-height: 1.25; }
.auth-art p { max-width: 460px; color: #A9C1D3; }
.auth-form { display: grid; place-items: center; background: #fff; }
.auth-form form { width: 340px; }
label { display: block; font-size: 12px; font-weight: 650; color: var(--ink-2); margin: 12px 0 5px; }
input[type=text], input[type=password], input[type=email], textarea, select { width: 100%; padding: 10px 12px;
  border: 1px solid #D3DCE4; border-radius: 8px; font: inherit; background: #fff; }
input:focus, textarea:focus { outline: 2px solid rgba(18,131,143,.35); border-color: var(--teal-500); }


/* ---------- header (approved design: navy bar, logo, Reader/Workbench switch, search, profile) */
.hdr { position: sticky; top: 0; z-index: 40; height: 68px; display: flex; align-items: center; gap: 20px; padding: 0 22px;
  background: linear-gradient(90deg, var(--navy-900), var(--navy-800)); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.hdr-logo img { height: 46px; display: block; }
.hdr-logo { padding-right: 20px; border-right: 1px solid rgba(255,255,255,.12); }
.hdr-menu { display: none; background: none; border: 0; color: #fff; padding: 6px; cursor: pointer; }
.ic { width: 20px; height: 20px; flex: none; }
.ic.big { width: 34px; height: 34px; color: var(--teal-600); }
.switch { display: flex; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 3px; }
.switch a { display: flex; align-items: center; gap: 8px; color: #D4E0EA; padding: 7px 18px; border-radius: 8px; font-weight: 650; text-decoration: none; }
.switch a.on { background: linear-gradient(180deg, var(--teal-500), var(--teal-600)); color: #fff; }
.switch a:hover { text-decoration: none; color: #fff; }
.hdr-search { margin-left: auto; display: flex; align-items: center; gap: 10px; width: min(460px, 34vw); background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: 8px 16px; color: #AFC2D3; }
.hdr-search input { background: none; border: 0; color: #fff; width: 100%; font: inherit; padding: 0; outline: none; }
.hdr-search input::placeholder { color: #9FB3C5; }
.hdr-icon { color: #DDE7EF; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; }
.hdr-icon:hover { background: rgba(255,255,255,.08); }
.hdr-user { position: relative; }
.hdr-user summary { list-style: none; display: flex; align-items: center; gap: 4px; cursor: pointer; color: #DDE7EF; padding: 6px; border-radius: 8px; }
.hdr-user summary::-webkit-details-marker { display: none; }
.hdr-user .caret { font-size: 11px; }
.hdr-user .menu { position: absolute; right: 0; top: 46px; width: 230px; background: #fff; color: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 12px 32px rgba(11,37,64,.18); padding: 8px; }
.hdr-user .menu a, .hdr-user .menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 6px; color: var(--ink);
  background: none; border: 0; font: inherit; cursor: pointer; }
.hdr-user .menu a:hover, .hdr-user .menu button:hover { background: var(--teal-50); text-decoration: none; }
.menu-who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: flex; flex-direction: column; }
.menu-who span { color: var(--ink-3); font-size: 12px; }

/* ---------- frame and sidebar */
.frame { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 68px);
  background: linear-gradient(90deg, var(--navy-900) 250px, var(--bg) 250px); }
.side { background: linear-gradient(180deg, var(--navy-800), var(--navy-900)); padding: 18px 12px; display: flex; flex-direction: column;
  position: sticky; top: 68px; height: calc(100vh - 68px); overflow-y: auto; }
.side-h { color: #C1D0DD; font-size: 12px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; padding: 8px 12px 8px; }
.side-h span { display: block; letter-spacing: .04em; font-weight: 600; text-transform: none; color: #8EA6BA; }
.side-a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; color: #E3EBF2; font-weight: 550;
  margin: 2px 0; text-decoration: none; }
.side-a .ic { width: 19px; height: 19px; opacity: .9; }
.side-a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.side-a.on { background: linear-gradient(90deg, var(--teal-600), rgba(14,111,122,.55)); color: #fff; box-shadow: inset 3px 0 0 var(--green-400); }
.side-sep { height: 1px; background: rgba(255,255,255,.1); margin: 14px 10px; }
.side-foot { margin-top: auto; padding: 14px 10px 4px; display: flex; flex-direction: column; gap: 8px; }
.side-signin { color: #BFE3E7; font-weight: 600; }
.ver { font-size: 11px; color: #6F889E; }
.realm-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11px;
  font-weight: 700; letter-spacing: .03em; width: fit-content; }
.realm-synthetic { background: rgba(242,183,57,.15); color: #F6D58A; border: 1px solid rgba(242,183,57,.38); }
.realm-digest { background: rgba(108,192,74,.15); color: #A7E08A; border: 1px solid rgba(108,192,74,.35); }
.scrim { display: none; }

.main { min-width: 0; background: var(--bg); }
.demo-banner { background: #FFF7E2; color: #7A4E00; border-bottom: 1px solid #F1D99A; padding: 0 24px; font-size: 12px; line-height: 1.4; }
.demo-banner summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.demo-banner summary::-webkit-details-marker { display: none; }
.demo-banner .dot { width: 7px; height: 7px; border-radius: 50%; background: #E0A100; flex: none; }
.demo-banner .more { margin-left: auto; text-decoration: underline; opacity: .8; white-space: nowrap; }
.demo-banner[open] .more { visibility: hidden; }
.demo-banner p { margin: 0 0 6px 15px; }
.page { padding: 20px 24px 40px; max-width: 1500px; }
.crumbs { font-size: 12.5px; color: var(--ink-3); margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs i { font-style: normal; color: #B5C1CC; }
.ph { font-size: 24px; font-weight: 750; margin: 0 0 12px; color: var(--navy-800); display: flex; align-items: center; gap: 10px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .row.between { justify-content: space-between; }
.nowrap { white-space: nowrap; } .note { color: var(--ink-3); font-size: 12px; margin: -4px 0 16px; }
.narrow { max-width: 760px; } .prose p, .prose li { max-width: 68ch; }
.pad { padding: 18px 20px; } .card + .card { margin-top: 0; }
.sec-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
.sec-h h2 { display: flex; align-items: center; gap: 8px; font-size: 19px; color: var(--navy-800); }
.sec-h a { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; }
.sec-h a .ic { width: 16px; height: 16px; }

/* ---------- workbench bar */
.wbbar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; background: #fff; border-bottom: 1px solid var(--line); padding: 10px 24px; }
.modsel { display: flex; align-items: center; gap: 8px; } .modsel label { margin: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.modsel select { width: auto; min-width: 260px; padding: 7px 10px; font-weight: 650; }
.flow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.flow a { padding: 6px 12px; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: 13px; border: 1px solid var(--line); background: #fff; }
.flow a.on, .flow a:hover { background: var(--teal-600); color: #fff; border-color: var(--teal-600); text-decoration: none; }
.flow i { color: #B5C1CC; font-style: normal; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tabs a { padding: 7px 14px; border-radius: 8px; font-weight: 600; color: var(--ink-2); background: #fff; border: 1px solid var(--line); }
.tabs a.on { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }

/* ---------- library home */
.rail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.rail-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rail { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 88px; }
.hero2 { position: relative; border-radius: 14px; overflow: hidden; min-height: 270px; color: #fff; box-shadow: var(--shadow); }
.hero2-art, .hero2-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero2::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,26,46,.92) 0%, rgba(7,26,46,.78) 45%, rgba(7,26,46,.15) 78%, rgba(7,26,46,0) 100%); }
.hero2-txt { position: relative; z-index: 1; padding: 36px 40px; max-width: 600px; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #E6EEF4; }
.eyebrow.dark { color: var(--green-600); }
.hero2 h1 { font-size: 54px; font-weight: 850; letter-spacing: -.02em; margin: 6px 0 8px; color: #fff; }
.hero2 p { font-size: 18px; color: #DCE7EF; margin: 0 0 18px; max-width: 520px; }
.hero-search { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 10px; padding: 10px 14px; max-width: 470px; color: var(--ink-3);
  box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.hero-search input { border: 0; padding: 4px 0; outline: none; background: none; font-size: 15px; }
.hero-search button { background: none; border: 0; color: var(--navy-800); cursor: pointer; display: grid; place-items: center; }
.hero-search.light { box-shadow: none; border: 1px solid var(--line); max-width: 640px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 16px 18px; display: flex; gap: 14px; align-items: center; }
.stat .ic { width: 40px; height: 40px; color: var(--teal-600); stroke-width: 1.6; }
.stat b { display: block; font-size: 26px; line-height: 1.1; color: var(--navy-800); }
.stat div > span { color: var(--ink-2); font-size: 15px; }
.demo-tag { display: inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: .08em; color: #8A5B00; background: #FFF0C7;
  border: 1px solid #F0D58E; border-radius: 4px; padding: 0 4px; vertical-align: middle; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.mcard { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; color: var(--ink);
  transition: box-shadow .15s, transform .15s; text-decoration: none; }
.mcard:hover { box-shadow: 0 10px 24px rgba(11,37,64,.12); transform: translateY(-1px); text-decoration: none; }
.mcard-art { height: 118px; } .mcard-art svg { width: 100%; height: 100%; display: block; }
.mcard-b { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.mcard-b h3 { font-size: 17px; color: var(--navy-800); } .mcard-b p { margin: 0; color: var(--ink-2); font-size: 13px; flex: 1; }
.mcard-f { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.go { color: var(--navy-800); }
.pill { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 650; }
.pill-published { background: var(--green-100); color: var(--green-600); }
.pill-in_development { background: #E4EEFB; color: #24518F; }
.pill-upcoming { background: #EEF1F4; color: var(--ink-2); }
.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.topic { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; background: var(--teal-50); border: 1px solid #DCEBEE;
  border-radius: 10px; color: var(--navy-800); font-weight: 550; text-decoration: none; }
.topic .ic { width: 28px; height: 28px; color: var(--navy-700); }
.topic:hover { background: var(--teal-100); text-decoration: none; }
.rail-feature { display: flex; gap: 14px; margin-bottom: 14px; } .rail-feature h2 { font-size: 20px; color: var(--navy-800); }
.rail-feature p { margin: 4px 0 0; color: var(--ink-2); }
.list { list-style: none; margin: 0; padding: 0; } .list li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid #EEF2F5; }
.list li span { flex: 1; } .list time { color: var(--ink-3); font-size: 12px; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tcard { padding: 18px; display: flex; flex-direction: column; gap: 8px; color: var(--ink); text-decoration: none; }
.tcard:hover { text-decoration: none; box-shadow: 0 10px 24px rgba(11,37,64,.12); } .tcard p { margin: 0; color: var(--ink-2); }
.mhero { display: grid; grid-template-columns: 360px 1fr; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.mhero-art svg { width: 100%; height: 100%; display: block; min-height: 220px; } .mhero-b { padding: 22px 26px; }
.mhero-b h1 { font-size: 32px; color: var(--navy-800); margin: 4px 0 8px; } .mhero-b p { color: var(--ink-2); max-width: 70ch; }
.ticks { margin: 8px 0 0; padding-left: 18px; } .ticks li { margin: 4px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; } .chip { padding: 4px 10px; border-radius: 999px; background: var(--teal-50); border: 1px solid #DCEBEE; color: var(--navy-800); font-size: 12.5px; }
.btn.block { width: 100%; justify-content: center; } .btn.sm { padding: 6px 12px; font-size: 12.5px; }
.btn .ic { width: 16px; height: 16px; }
.btn { background: linear-gradient(180deg, var(--teal-600), var(--teal-700)); }
.flash.warn { background: var(--amber-100); color: #7A4E00; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; color: var(--ink-2); }
.check input { margin-top: 3px; }
form.inline { display: flex; gap: 10px; } form.inline input { max-width: 360px; }
.rule { background: linear-gradient(135deg, var(--navy-800), var(--teal-700)); color: #E6F1F3; border: 0; }
.rule h2 { color: #fff; } .rule .big { font-size: 34px; font-weight: 800; color: #fff; }

/* ---------- responsive */
@media (max-width: 1280px) { .rail-grid { grid-template-columns: 1fr; } .rail { position: static; display: grid; grid-template-columns: repeat(3, 1fr); }
  .hdr-search { width: 28vw; } }
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, 1fr); } .rail { grid-template-columns: 1fr; } .mhero { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .frame { background: var(--bg); }
  .hdr { gap: 10px; padding: 0 12px; } .hdr-menu { display: block; } .hdr-logo { border: 0; padding: 0; } .hdr-logo img { height: 38px; }
  .switch span { display: none; } .switch a { padding: 7px 10px; } .hdr-search { display: none; }
  .frame { grid-template-columns: 1fr; }
  .side { position: fixed; top: 68px; left: 0; bottom: 0; width: 270px; height: auto; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .side { transform: none; } body.nav-open .scrim { display: block; position: fixed; inset: 68px 0 0 0; background: rgba(7,26,46,.45); z-index: 45; }
  .page { padding: 16px 14px 32px; } .hero2 h1 { font-size: 38px; } .hero2-txt { padding: 26px 22px; }
  .g-2, .g-3 { grid-template-columns: 1fr; } .g-6 { grid-template-columns: repeat(2, 1fr); }
  .auth-wrap { grid-template-columns: 1fr; } .auth-art { display: none; }
  table.t { display: block; overflow-x: auto; }
}
@media (max-width: 520px) { .stats { grid-template-columns: 1fr 1fr; } .stat .ic { width: 30px; height: 30px; } .stat b { font-size: 21px; }
  .hdr-logo img { height: 32px; } .hero2 h1 { font-size: 32px; } }

/* M1.1: staff management + M2 shared form/list helpers (no visual redesign) */
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form input, .inline-form select { width: auto; flex: 1 1 160px; padding: 7px 10px; }
.inline-form .btn { flex: none; }
td.right, th.right { text-align: right; }
td form { display: inline; }

/* M2 evidence workflow — built from the existing tokens and components (no new visual language) */
details.formbox { margin-bottom: 14px; }
details.formbox > summary { cursor: pointer; font-weight: 650; color: var(--teal-700); list-style: none; display: flex; align-items: center; gap: 8px; }
details.formbox > summary::-webkit-details-marker { display: none; }
details.formbox > summary::before { content: "+"; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--teal-100); color: var(--teal-700); font-weight: 800; }
details.formbox[open] > summary::before { content: "–"; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 14px; margin-top: 12px; }
.fgrid label { display: block; font-size: 12px; font-weight: 650; color: var(--ink-2); margin-bottom: 4px; }
.fgrid .wide { grid-column: 1 / -1; }
.fgrid textarea { min-height: 110px; font: inherit; }
.factions { margin-top: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hint { font-size: 12px; color: var(--ink-3); }
.ph-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ph-sub { color: var(--ink-3); margin: -6px 0 14px; }
.tabs a .n { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: #EEF2F5; color: var(--ink-2); font-size: 11px; text-align: center; }
.tabs a.on .n { background: rgba(255,255,255,.18); color: #fff; }
.qhelp { margin: -4px 0 12px; color: var(--ink-3); font-size: 12.5px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 128px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline .when { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.timeline .ended { color: var(--ink-3); }
.quote { border-left: 3px solid var(--teal-500); background: var(--teal-50); padding: 8px 12px; border-radius: 0 8px 8px 0; font-size: 13px; }
.quote.bad { border-left-color: var(--red-600); background: var(--red-100); }
.gate { display: flex; align-items: center; gap: 14px; }
.gate .meter { display: flex; gap: 6px; }
.gate .meter span { width: 30px; height: 10px; border-radius: 4px; background: #E3E8ED; }
.gate .meter span.on { background: var(--green-500); }
.gate b { font-size: 22px; color: var(--navy-800); }
.vhist { border-left: 2px solid var(--line); margin-left: 6px; padding-left: 16px; }
.vhist .ver { margin-bottom: 16px; }
.vhist .ver.old { opacity: .78; }
.decision { font-size: 12.5px; margin-top: 4px; }
.sourcebody { white-space: pre-wrap; background: #FBFCFD; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; font-size: 13px; line-height: 1.6; }
.sourcebody mark { background: #DDF1D9; padding: 0 2px; border-radius: 3px; }
.cluster { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.cluster-h { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; background: var(--teal-50); border-bottom: 1px solid var(--line); }
.cluster .t { margin: 0; }
.actionbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.actionbar form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn.danger { background: linear-gradient(180deg, #C8372B, var(--red-600)); }
.btn[disabled], .btn.disabled { opacity: .45; cursor: not-allowed; }
.why { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.kv-inline { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.kv-inline b { color: var(--navy-800); }
@media (max-width: 520px) {
  .wbbar { padding: 10px 14px; }
  .modsel { width: 100%; } .modsel select { min-width: 0; flex: 1 1 auto; width: 100%; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .t { display: block; overflow-x: auto; }
}

/* Milestone 3: publishing */
.vreport { border-left: 3px solid var(--line, #DDE3E8); padding: 8px 12px; border-radius: 4px; }
.vreport.ok { border-left-color: var(--green-600); } .vreport.bad { border-left-color: var(--red-600, #B42318); }
fieldset.cites { border: 1px solid var(--line, #DDE3E8); border-radius: 8px; padding: 8px 12px; margin: 10px 0; max-height: 220px; overflow: auto; }
fieldset.cites label { display: block; font-weight: 400; margin: 3px 0; }
fieldset.cites legend { font-size: 12px; font-weight: 650; padding: 0 4px; }
label.confirm { display: block; font-weight: 400; margin-bottom: 6px; text-align: left; max-width: 240px; }
tr.subrow td { border-top: 0; padding-top: 0; }

/* ---------- Government Data (unverified research records) */
.govnote { background: var(--amber-100); color: #6B4A12; border: 1px solid #F1D9A6; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin: 8px 0 12px; }
.fgrid.f4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fgrid.f4 .wide { grid-column: span 2; }
@media (max-width: 1100px) { .fgrid.f4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.filters { margin-bottom: 14px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin-right: 10px; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 12px; }
table.kvt { width: 100%; border-collapse: collapse; }
table.kvt th { text-align: left; vertical-align: top; width: 34%; color: var(--ink-3); font-weight: 600; padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
table.kvt td { padding: 6px 0; border-bottom: 1px solid var(--line); word-break: break-word; }
.p-facility { background: #E4EEFB; color: #24518F; } .p-permit { background: var(--teal-100); color: var(--teal-700); }
.p-award { background: var(--green-100); color: var(--green-600); } .p-subaward { background: #EEF6E9; color: #3D7A2A; }
.p-company { background: #F0ECF8; color: #5B3F99; }
table.t.gov td { vertical-align: top; }
.filters input[type=search], .filters input[type=text], .filters input[type=date] { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.pill-gov { background: #E7F0EA; color: #1F5F3A; font-size: 11px; }
.pill-review { background: #FFF2D9; color: #8A5A00; font-size: 11px; }
