/* Tax Strategy Playbooks. Light only: every text color is paired with its background. */
:root {
  --brand: #343f56;
  --on-brand: #ffffff;
  --brand-soft: rgba(52, 63, 86, 0.08);
  --brand-line: rgba(52, 63, 86, 0.22);
  --accent: #dc1d26;
  --accent-soft: rgba(220, 29, 38, 0.09);
  --excerpt-bg: #fbeaec;
  --excerpt-ink: #8e1418;
  --paper: #f6f6f1;
  --card: #ffffff;
  --ink: #1f2430;
  --muted: #5b6270;
  --line: #e2e2da;
  --ok: #1e7a46;
  --ok-bg: #e8f4ec;
  --warn: #8a5300;
  --warn-bg: #fdf3e2;
  --stop: #a3221b;
  --stop-bg: #fbeaea;
  --radius: 10px;
  --head: "League Spartan", "Roboto", system-ui, sans-serif;
  --body: "Roboto", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.55 var(--body);
}
a { color: var(--brand); }
h1, h2, h3, h4 { font-family: var(--head); color: var(--brand); line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: 30px; }
h2 { font-size: 24px; margin-top: 0; }
h3 { font-size: 18px; margin-top: 1.4em; }
p { margin: 0 0 0.9em; text-wrap: pretty; }
.cite { color: var(--accent); font-weight: 600; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20; background: var(--card); color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.top-in { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 10px 20px; }
.top .logo { height: 38px; width: auto; max-width: 190px; object-fit: contain; }
.top .title { font-family: var(--head); font-weight: 700; color: var(--brand); font-size: 19px; line-height: 1.15; min-width: 0; }
.top .title small { display: block; font-family: var(--body); font-weight: 400; font-size: 13px; color: var(--muted); }
.top .spacer { flex: 1; }
.top .home { font-size: 14px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.top .home:hover { color: var(--brand); }

/* Client bar */
.clientbar {
  background: var(--brand); color: var(--on-brand);
}
.clientbar-in { max-width: 1240px; margin: 0 auto; padding: 8px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; }
.clientbar label { font-weight: 600; }
.clientbar select {
  font: inherit; font-size: 16px; padding: 5px 8px; border-radius: 6px; border: 1px solid transparent;
  background: #ffffff; color: #1f2430; max-width: 260px;
}
.clientbar .lnk {
  background: transparent; color: var(--on-brand); border: 1px solid currentColor; opacity: 0.92;
  border-radius: 6px; padding: 5px 10px; font: inherit; font-size: 14px; cursor: pointer;
}
.clientbar .lnk:hover { opacity: 1; background: rgba(255, 255, 255, 0.12); }
.clientbar .note { opacity: 0.85; font-size: 13px; }

/* Layout */
.wrap { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; padding: 24px 20px 80px; }
.nav { position: sticky; top: 76px; align-self: start; display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
  text-decoration: none; color: var(--ink); font-weight: 500; font-size: 15px;
}
.nav a .n { font-family: var(--head); color: var(--muted); font-size: 13px; width: 18px; }
.nav a:hover { background: var(--brand-soft); }
.nav a.on { background: var(--brand); color: var(--on-brand); }
.nav a.on .n { color: var(--on-brand); }
.nav .divider { height: 1px; background: var(--line); margin: 10px 4px; }
main { min-width: 0; }
section.pane { display: none; }
section.pane.on { display: block; }
.pane-head { margin-bottom: 18px; }
.pane-head .eyebrow { font-family: var(--head); font-size: 14px; letter-spacing: 0.06em; color: var(--accent); font-weight: 600; }

.card { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 16px; }
.card > :last-child { margin-bottom: 0; }

/* Overview */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: var(--radius); padding: 14px 16px; }
.tile .big { font-family: var(--head); font-size: 30px; font-weight: 700; color: var(--brand); line-height: 1; }
.tile .lbl { font-size: 14px; color: var(--muted); margin-top: 6px; }
.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 4px 0 0; }
.flow .step { position: relative; padding: 14px 18px 14px 16px; background: var(--brand-soft); color: var(--ink); border: 1px solid var(--brand-line); }
.flow .step:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.flow .step:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.flow .step + .step { border-left: 0; }
.flow .who { font-family: var(--head); font-weight: 700; color: var(--brand); font-size: 15px; }
.flow .txt { font-size: 14px; }
.ab { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ab > div { border-radius: var(--radius); padding: 14px 16px; }
.ab .no { background: #f3f3ef; color: var(--ink); }
.ab .yes { background: var(--ok-bg); color: var(--ink); }
.ab b { display: block; font-family: var(--head); margin-bottom: 4px; }

/* Estimator */
.est { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: #ffffff;
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--brand-line); border-color: var(--brand); }
.est-out { margin-top: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.est-out div { background: var(--brand-soft); color: var(--ink); border-radius: 8px; padding: 10px 12px; }
.est-out b { display: block; font-family: var(--head); font-size: 22px; color: var(--brand); }

/* Qualify */
.q { padding: 16px 0; border-top: 1px solid var(--line); }
.q:first-of-type { border-top: 0; padding-top: 0; }
.q .qt { font-weight: 600; margin-bottom: 4px; }
.q .help { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.opt {
  font: inherit; font-size: 15px; cursor: pointer; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--brand-line); background: #ffffff; color: var(--ink); text-align: left;
}
.opt:hover { border-color: var(--brand); }
.opt.sel { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.verdict { border-radius: var(--radius); padding: 16px 18px; margin-top: 16px; border: 1px solid transparent; }
.verdict h3 { margin: 0 0 6px; color: inherit; }
.verdict ul { margin: 6px 0 0; padding-left: 20px; }
.verdict.pass { background: var(--ok-bg); color: #14532f; border-color: #bfe1cb; }
.verdict.caution { background: var(--warn-bg); color: #5c3700; border-color: #f0d7a8; }
.verdict.stop { background: var(--stop-bg); color: #7a1914; border-color: #f2c4c1; }
.verdict.open { background: #f3f3ef; color: var(--muted); }

/* Implement */
.phase { position: relative; padding-left: 26px; margin-bottom: 18px; }
.phase::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: -18px; width: 2px; background: var(--brand-line); }
.phase:last-child::before { display: none; }
.phase .dot { position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--brand); border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--brand); }
.phase h3 { margin: 0; font-size: 18px; }
.phase .when { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.steps { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); }
.stepline { display: flex; gap: 12px; align-items: flex-start; padding: 11px 14px; border-top: 1px solid var(--line); }
.stepline:first-child { border-top: 0; }
.stepline input[type="checkbox"] { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.stepline .txt { flex: 1; min-width: 0; }
.stepline.done .txt { color: var(--muted); text-decoration: line-through; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; border-radius: 999px; padding: 2px 9px; margin-right: 6px; vertical-align: 1px; }
.pill.firm { background: var(--brand); color: var(--on-brand); }
.pill.client { background: var(--accent-soft); color: var(--excerpt-ink); }
.mini { font: inherit; font-size: 13px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--brand); background: #ffffff; color: var(--brand); cursor: pointer; text-decoration: none; white-space: nowrap; display: inline-block; }
.mini:hover { background: var(--brand-soft); }
.progress { height: 8px; background: #ececE5; border-radius: 99px; overflow: hidden; margin: 6px 0 18px; }
.progress span { display: block; height: 100%; background: var(--brand); width: 0; transition: width 0.3s; }

/* Client file (worksheet) */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.span2 { grid-column: span 2; }
table.t { width: 100%; border-collapse: collapse; font-size: 15px; }
table.t th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.t td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t td input, table.t td select { font: inherit; font-size: 16px; width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: #ffffff; color: var(--ink); }
.counter { display: inline-flex; align-items: baseline; gap: 6px; font-family: var(--head); font-size: 28px; font-weight: 700; color: var(--brand); }
.counter small { font-family: var(--body); font-size: 14px; color: var(--muted); font-weight: 400; }
.counter.over { color: var(--stop); }
.rm { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 20px; line-height: 1; padding: 4px 8px; }
.rm:hover { color: var(--stop); }
.empty { text-align: center; padding: 30px 16px; color: var(--muted); }

/* Documents */
.docs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.doc { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.doc .for { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.doc h4 { margin: 0; font-size: 17px; }
.doc p { font-size: 14px; color: var(--muted); margin: 0; flex: 1; }
.doc .mini { align-self: flex-start; margin-top: 4px; }

/* Lists */
ul.ticks, ul.crosses, ul.plain { list-style: none; padding: 0; margin: 0; }
ul.ticks li, ul.crosses li, ul.plain li { position: relative; padding: 6px 0 6px 28px; border-top: 1px solid var(--line); }
ul.ticks li:first-child, ul.crosses li:first-child, ul.plain li:first-child { border-top: 0; }
ul.ticks li::before { content: "✓"; position: absolute; left: 4px; top: 5px; color: var(--ok); font-weight: 700; }
ul.crosses li::before { content: "✕"; position: absolute; left: 4px; top: 5px; color: var(--stop); font-weight: 700; }
ul.plain li::before { content: ""; position: absolute; left: 8px; top: 15px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.flag { border-left: 4px solid var(--warn); background: var(--warn-bg); color: #4d3000; border-radius: 0 var(--radius) var(--radius) 0; padding: 14px 16px; margin-bottom: 16px; }
.flag h3 { margin: 0 0 6px; color: #5c3700; }
.case { border-left: 4px solid var(--brand); }
.case .k { font-family: var(--head); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 10px; }
.case .lesson { background: var(--brand-soft); color: var(--ink); border-radius: 8px; padding: 10px 12px; margin-top: 10px; font-weight: 600; }
.rows { display: grid; grid-template-columns: 220px 1fr; gap: 0; }
.rows > div { padding: 8px 0; border-top: 1px solid var(--line); }
.rows > div:nth-child(-n + 2) { border-top: 0; }
.rows .rk { font-weight: 600; padding-right: 14px; }

/* Source cards (house format: the light box IS the link and highlights exactly its text) */
.src { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.src .head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin-bottom: 8px; }
.src .head a { color: var(--accent); font-weight: 700; text-decoration: none; }
.src .head a:hover { text-decoration: underline; }
.src .head span { color: var(--muted); font-size: 14px; }
a.excerpt {
  display: block; text-decoration: none; background: var(--excerpt-bg); color: var(--excerpt-ink);
  border-left: 4px solid var(--accent); border-radius: 0 6px 6px 0; padding: 10px 14px; font-size: 15px;
}
a.excerpt:hover { filter: brightness(0.98); }
a.excerpt .gap { opacity: 0.7; }
.pdfq { font-size: 15px; color: var(--ink); border-left: 4px solid var(--line); padding: 4px 0 4px 14px; }
.pdfq a { font-size: 13px; }

/* Buttons */
.btn { font: inherit; font-size: 15px; cursor: pointer; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--brand); background: var(--brand); color: var(--on-brand); text-decoration: none; display: inline-block; }
.btn.ghost { background: #ffffff; color: var(--brand); }
.btn:hover { filter: brightness(1.08); }
.btnrow { display: flex; flex-wrap: wrap; gap: 10px; }

/* Firm home */
.home-wrap { max-width: 980px; margin: 0 auto; padding: 28px 20px 80px; }
.lib { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.lib a { display: block; background: var(--card); color: var(--ink); text-decoration: none; border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: var(--radius); padding: 16px 18px; }
.lib a:hover { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06); }
.lib h3 { margin: 0 0 4px; }
.lib p { margin: 0; color: var(--muted); font-size: 14px; }
.brandform { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.swatch { display: flex; gap: 8px; align-items: center; }
.swatch input[type="color"] { width: 46px; height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: #ffffff; flex: none; }
.preview { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px dashed var(--line); border-radius: var(--radius); background: #ffffff; color: var(--ink); }
.preview img { height: 44px; max-width: 220px; object-fit: contain; }

/* Phone and small tablet */
@media (max-width: 900px) {
  .wrap { grid-template-columns: minmax(0, 1fr); padding: 0 0 80px; gap: 0; }
  .nav {
    position: sticky; top: 0; z-index: 15; flex-direction: row; overflow-x: auto; gap: 4px;
    background: var(--card); border-bottom: 1px solid var(--line); padding: 8px 12px; scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; padding: 7px 12px; font-size: 14px; flex: none; }
  .nav a .n { display: none; }
  .nav .divider { display: none; }
  main { padding: 18px 16px 0; }
  .top { position: static; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .docs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  h1 { font-size: 25px; }
  h2 { font-size: 21px; }
  .top-in { padding: 8px 16px; gap: 10px; }
  .top .logo { height: 30px; max-width: 120px; }
  .top .title { font-size: 16px; }
  .top .home { display: none; }
  .clientbar-in { padding: 8px 16px; gap: 6px 6px; }
  .clientbar label { display: none; }
  .clientbar select { max-width: 100%; flex: 1 1 100%; }
  .clientbar .lnk { font-size: 13px; padding: 4px 9px; }
  .card { padding: 16px; }
  .flow, .ab, .est, .est-out, .grid2, .grid3, .cols2, .brandform, .lib { grid-template-columns: minmax(0, 1fr); }
  .span2 { grid-column: auto; }
  .flow .step { border-radius: 0 !important; border-left: 1px solid var(--brand-line) !important; }
  .flow .step + .step { border-top: 0; }
  .flow .step:first-child { border-radius: var(--radius) var(--radius) 0 0 !important; }
  .flow .step:last-child { border-radius: 0 0 var(--radius) var(--radius) !important; }
  .docs { grid-template-columns: minmax(0, 1fr); }
  .rows { grid-template-columns: minmax(0, 1fr); }
  .rows > div:nth-child(-n + 2) { border-top: 1px solid var(--line); }
  .rows > div:first-child { border-top: 0; }
  .rows .rk { padding-bottom: 0; border-top: 1px solid var(--line); }
  .rows .rk + div { border-top: 0; padding-top: 2px; }
  table.t.stack thead { display: none; }
  table.t.stack tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.t.stack td { border: 0; padding: 0; min-width: 0; }
  table.t.stack td input { min-width: 0; }
  table.t.stack td[data-l]::before { content: attr(data-l); display: block; font-size: 12px; color: var(--muted); }
  table.t.stack td.wide { grid-column: span 2; }
}
.flag .mini { white-space: normal; text-align: left; }

/* Dashboard */
.small { font-size: 13px; }
.dash-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; margin-bottom: 14px; }
.dash-head .eyebrow { font-family: var(--head); font-size: 14px; color: var(--accent); font-weight: 600; }
.dash-head h1 { margin: 2px 0 8px; }
.dh-r { text-align: center; }
.ring { width: 112px; height: 112px; display: block; margin: 0 auto 2px; }
.ring text { font-family: var(--head); font-size: 24px; font-weight: 700; fill: var(--ink); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.spill { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.spill.ok { background: var(--ok-bg); color: #14532f; }
.spill.warn { background: var(--warn-bg); color: #5c3700; }
.spill.stop { background: var(--stop-bg); color: #7a1914; }
.spill.open { background: #ececE6; color: var(--muted); }
.nextcard { display: flex; align-items: center; gap: 14px; background: var(--card); color: var(--ink); border: 2px solid var(--brand); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; flex-wrap: wrap; }
.nextcard.done { border-color: var(--ok); }
.nextcard .nx-i { color: var(--brand); display: flex; }
.nextcard.done .nx-i { color: var(--ok); }
.nextcard .nx-t { flex: 1 1 260px; min-width: 0; }
.nextcard .nx-l { font-size: 17px; font-weight: 600; margin-top: 2px; }
.nextcard .nx-b { display: flex; gap: 8px; flex-wrap: wrap; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.metrics div { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.metrics span { display: block; font-size: 13px; color: var(--muted); }
.metrics b { font-family: var(--head); font-size: 24px; color: var(--brand); }
.cardhead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.strip { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 5px; margin: 6px 0 8px; }
.cell { height: 44px; border-radius: 7px; display: flex; align-items: flex-end; justify-content: center; text-decoration: none; font-size: 11px; font-weight: 600; padding-bottom: 3px; border: 0; font-family: inherit; }
.cell.full { background: var(--ok); color: #ffffff; }
.cell.part { background: #e9a23b; color: #3d2600; }
.cell.empty { background: transparent; border: 1.5px dashed #c9c9c0; cursor: pointer; }
.cell.empty:hover { border-color: var(--brand); background: var(--brand-soft); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; }
.lg.lg-full { background: var(--ok); } .lg.lg-part { background: #e9a23b; } .lg.lg-empty { border: 1.5px dashed #c9c9c0; }
.addday { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 12px; background: var(--brand-soft); border-radius: var(--radius); margin-bottom: 12px; }
.addday .field { flex: 0 1 170px; }
.addday .field.grow { flex: 1 1 240px; }
.formerr { color: var(--stop); font-size: 13px; margin: -6px 0 10px; }
.formerr.ok { color: var(--ok); margin: 10px 0 0; }
.daycards { display: grid; gap: 10px; }
.daycard { border: 1px solid var(--line); border-left: 4px solid #e9a23b; border-radius: 0 8px 8px 0; padding: 10px 12px; background: var(--card); color: var(--ink); scroll-margin-top: 90px; }
.daycard.full { border-left-color: var(--ok); }
.daycard .dh { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; margin-bottom: 8px; }
.daycard .dh span { color: var(--muted); font-size: 14px; }
.daycard .dh .amt { margin-left: auto; color: var(--ink); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: 13px; font-weight: 500; padding: 5px 10px; border-radius: 999px; cursor: pointer; border: 1px solid transparent; }
.chip.ok { background: var(--ok-bg); color: #14532f; border-color: #bfe1cb; }
.chip.miss { background: #ffffff; color: #6b4300; border-color: #e9a23b; border-style: dashed; }
.fmvchart { width: 100%; height: auto; display: block; }
.fmvchart .lbl { font-size: 13px; fill: var(--muted); font-family: var(--body); }
.fmvchart .strong { font-weight: 700; }
.warnline { display: flex; gap: 6px; align-items: center; color: var(--stop); font-size: 14px; margin: 6px 0 0; }
.steps .stepline .mini { flex: none; }
@media (max-width: 640px) {
  .dash-head { grid-template-columns: minmax(0, 1fr); }
  .dh-r { display: flex; align-items: center; gap: 12px; text-align: left; }
  .ring { width: 84px; height: 84px; margin: 0; }
  .metrics { grid-template-columns: minmax(0, 1fr); }
  .strip { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .nextcard .nx-b { width: 100%; }
}

/* Qualification flowchart */
.qflow { position: relative; }
.qnode { position: relative; display: flex; gap: 14px; padding-bottom: 14px; }
.qnode::before { content: ""; position: absolute; left: 17px; top: 36px; bottom: 0; width: 3px; background: #dcdcd4; }
.qnode.end::before { display: none; }
.qnode.pass::before, .qnode.caution::before { background: var(--ok); }
.qn { flex: none; width: 37px; height: 37px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 700; font-size: 16px; background: #ececE6; color: var(--muted); position: relative; z-index: 1; }
.qn svg { width: 18px; height: 18px; }
.qbody { flex: 1; min-width: 0; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.qq { font-weight: 600; }
.qnode .help { font-size: 14px; color: var(--muted); margin-top: 4px; }
.qnode.current .qn { background: var(--brand); color: var(--on-brand); box-shadow: 0 0 0 5px var(--brand-soft); }
.qnode.current .qbody { border: 2px solid var(--brand); }
.qnode.current .opts .opt { font-size: 16px; padding: 10px 18px; }
.qnode.pass .qn { background: var(--ok); color: #ffffff; }
.qnode.caution .qn { background: #e9a23b; color: #3d2600; }
.qnode.stop .qn { background: var(--stop); color: #ffffff; }
.qnode.future .qbody, .qnode.skip .qbody { background: transparent; color: var(--muted); border-style: dashed; }
.qnode.future .qq, .qnode.skip .qq { font-weight: 500; }
.qnode.future .cite, .qnode.skip .cite { color: var(--muted); }
.qans { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.ans { display: inline-block; font-size: 14px; font-weight: 600; padding: 3px 12px; border-radius: 999px; background: var(--ok-bg); color: #14532f; }
.qnode.caution .ans { background: var(--warn-bg); color: #5c3700; }
.qnode.stop .ans { background: var(--stop-bg); color: #7a1914; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--brand); text-decoration: underline; cursor: pointer; }
.qwhy { font-size: 14px; margin-top: 6px; color: var(--ink); }
.qnode.end .qbody { padding: 0; border: 0; background: transparent; }
.qresult { border-radius: var(--radius); padding: 16px 18px; border: 1px solid transparent; }
.qresult h3 { margin: 0 0 6px; display: flex; align-items: center; gap: 8px; color: inherit; font-size: 20px; }
.qresult p { margin: 0 0 10px; }
.qresult.pass { background: var(--ok-bg); color: #14532f; border-color: #bfe1cb; }
.qresult.caution { background: var(--warn-bg); color: #5c3700; border-color: #f0d7a8; }
.qresult.stop { background: var(--stop-bg); color: #7a1914; border-color: #f2c4c1; }
.qresult.open { background: #f3f3ef; color: var(--muted); }
.qnode.end.pass .qn, .qnode.end.caution .qn { background: var(--ok); color: #ffffff; }
.qnode.end.stop .qn { background: var(--stop); color: #ffffff; }
@media (max-width: 640px) {
  .fmvchart .lbl { font-size: 27px; }
  .fmvchart circle { r: 11px; }
}

.savestat { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: 13px; opacity: .95; }
.savestat .lnk { margin: 0; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot.ok { background: #5fd38d; } .dot.warn { background: #f2b24c; }
@media (max-width: 640px) { .savestat { margin-left: 0; width: 100%; } }

.piinote { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; max-width: min(560px, calc(100% - 32px)); background: #7a1914; color: #ffffff; border-radius: 10px; padding: 12px 16px; font-size: 15px; box-shadow: 0 6px 24px rgba(0,0,0,.2); }

/* Sign-in gate: nothing shows until the gate has checked sign-in and loaded the content. */
html.gating body { visibility: hidden; }
.gate-stop { max-width: 520px; margin: 12vh auto; padding: 0 20px; text-align: center; }
.gate-stop p { color: var(--muted); }

/* Login page */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 34px 30px; text-align: center; }
.login-card .logo { height: 46px; width: auto; margin: 0 auto 18px; display: block; }
.login-card h1 { font-size: 26px; margin-bottom: 6px; }
.login-card .sub { color: var(--muted); font-size: 15px; margin: 0 0 22px; }
.login-card form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.login-card input { font: inherit; font-size: 16px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; width: 100%; box-sizing: border-box; }
.login-card input:focus { outline: 2px solid var(--brand-line); border-color: var(--brand); }
.login-card input.code { font-family: "Courier New", monospace; font-size: 26px; letter-spacing: 8px; text-align: center; }
.login-card .btn { width: 100%; padding: 12px 16px; }
.login-card .btn[disabled] { opacity: 0.6; cursor: default; }
.login-msg { font-size: 14px; min-height: 0; text-align: left; margin: 0; }
.login-msg.err { color: #9b1c1c; background: #fdecec; border-radius: 8px; padding: 10px 12px; }
.login-msg.ok { color: #1f5f3a; background: #e8f5ee; border-radius: 8px; padding: 10px 12px; }
.login-card .linkbtn { background: none; border: 0; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; margin-top: 4px; }
.login-foot { margin-top: 22px; font-size: 13px; color: var(--muted); }
.login-foot a { color: var(--muted); }
.top .home.linkish { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; cursor: pointer; }

/* Requirement trackers (general playbooks) */
.tracker { margin: 0 0 14px; }
.tracker:last-child { margin-bottom: 0; }
.tr-h { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 15px; margin-bottom: 6px; }
.tr-h span { color: var(--muted); font-variant-numeric: tabular-nums; }
.tr-h span.good { color: var(--ok); font-weight: 600; }
.tr-h span.bad { color: #9b1c1c; font-weight: 600; }
.tr-bar { height: 10px; background: #ecece5; border-radius: 6px; overflow: hidden; }
.tr-bar span { display: block; height: 100%; background: var(--brand); border-radius: 6px; }
.tr-bar span.good { background: var(--ok); }
.tr-bar span.bad { background: #c0392b; }
.field textarea { font: inherit; font-size: 16px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; resize: vertical; }
