/* Layout: green app bar, step tabs, parchment work surface; report = printable letter pages. Single light theme by design (brand + print). */
:root {
  --green: #102916; --green-deep: #0A1B0E; --gold: #CCB120; --gold-deep: #A38E1A; --parchment: #F8F7EF; --paper: #FFFDF6;
  --ink: #10190F; --ink-2: #4A5547; --line: #DEDBC9; --sage: #98A08D; --tint: #EEEBDD; --hi: #E8F0E6; --warn: #8A3B12;
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --body: "Jost", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { background: var(--parchment); color: var(--ink); }
body { font: 15px/1.5 var(--body); margin: 0; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; color: var(--green); margin: 0; }
h2 { font-size: 1.35rem; font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; margin-top: 1rem; }
h4 { margin: 0 0 .25rem; font-size: .95rem; }
button, select, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 2px; }

.app-bar { background: var(--green); color: var(--parchment); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding-block: 12px; padding-inline: 16px; }
.brand { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.wm { font-family: var(--display); font-size: 1.25rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.app-name { font-size: .9rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sage); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
button, .file-btn { cursor: pointer; border-radius: 6px; padding: 8px 14px; border: 1px solid transparent; background: none; font-weight: 500; }
.ghost { border-color: rgba(248, 247, 239, .35); color: var(--parchment); }
.ghost:hover { border-color: var(--gold); }
.ghost.dark { border-color: var(--green); color: var(--green); }
.gold { background: var(--gold); color: var(--green-deep); }
.gold:hover { background: #d9bf34; }
.link { padding: 2px 4px; color: var(--green); text-decoration: underline; }
.link.danger { color: var(--warn); }

.tabs { display: flex; gap: 4px; overflow-x: auto; background: var(--green-deep); padding-inline: 16px; }
.tab { color: var(--sage); border-radius: 0; border-bottom: 3px solid transparent; padding: 12px 14px; white-space: nowrap; }
.tab span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid currentColor; font-size: .75rem; margin-right: 4px; }
.tab[aria-selected="true"] { color: var(--parchment); border-bottom-color: var(--gold); }

main { max-width: 1100px; margin: 0 auto; padding-block: 20px 60px; padding-inline: 16px; }
.intro { color: var(--ink-2); margin: 0 0 16px; max-width: 70ch; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin-bottom: 16px; }
.form-sec header p { margin: 4px 0 12px; color: var(--ink-2); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px 16px; }
.grid.sub { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.per-cols { display: grid; gap: 16px; margin-bottom: 12px; }
.per-cols.cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.per { display: grid; gap: 12px; align-content: start; min-width: 0; }
.per h3 { margin: 0; padding-bottom: 6px; border-bottom: 2px solid var(--gold); }
.field { display: grid; gap: 4px; min-width: 0; }
.field.inline { display: inline-grid; }
.lab { font-size: .82rem; font-weight: 500; color: var(--ink-2); }
.help { font-size: .75rem; color: var(--ink-2); }
input, select, textarea { width: 100%; border: 1px solid #C9C5B0; border-radius: 6px; padding: 8px 10px; background: #fff; }
textarea { resize: vertical; }
.inp { position: relative; }
.inp.money input { padding-left: 22px; }
.inp.money::before { content: "$"; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-2); }
.inp.pct input { padding-right: 24px; }
.inp.pct::after { content: "%"; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-2); }
input, .num, td { font-variant-numeric: tabular-nums; }

.drop { border: 2px dashed var(--sage); border-radius: 10px; padding: 28px 16px; display: grid; gap: 6px; text-align: center; cursor: pointer; margin-top: 12px; background: var(--parchment); }
.drop span { color: var(--ink-2); font-size: .9rem; }
.drop.over { border-color: var(--gold-deep); background: var(--tint); }
.import-msg { margin: 10px 0 0; font-size: .9rem; }
#openMsg { max-width: 1100px; margin: 8px auto 0; padding-inline: 16px; color: var(--warn); }
#openMsg:empty { display: none; }
.import-msg .ok { color: #1F5A2F; } .import-msg .err { color: var(--warn); }
.manual { display: flex; gap: 10px; align-items: end; margin-top: 14px; flex-wrap: wrap; }
.pol-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.pol-top .link { margin-left: auto; }
.pol-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.pol-meta { font-size: .8rem; color: var(--ink-2); margin: 10px 0 0; }
.chk { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.chk input { width: auto; }
.chip { font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; background: var(--tint); color: var(--green); font-weight: 600; }
.chip.estate { background: #DCE9DF; } .chip.ci { background: #F2EAC6; } .chip.di { background: #DCE5F0; } .chip.family { background: #E9E4F0; }
.empty { color: var(--ink-2); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--green); color: var(--parchment); border-radius: 10px; padding: 14px 16px; display: grid; gap: 2px; }
.kpi span { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--sage); }
.kpi b { font-family: var(--display); font-size: 1.55rem; color: var(--gold); font-weight: 600; }
.kpi small { color: #C9CDBF; }
.tbl { overflow-x: auto; margin: 10px 0; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); font-weight: 600; }
.num { text-align: right; white-space: nowrap; }
tr.strong td { font-weight: 600; border-top: 2px solid var(--green); }
tr.hi td { background: var(--hi); }
.note, .small { font-size: .85rem; color: var(--ink-2); }
.warn { color: var(--warn); font-weight: 500; }
.recs { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.recs li { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.recs p { margin: 4px 0 0 26px; color: var(--ink-2); font-size: .9rem; }

/* charts */
.chart { margin: 12px 0; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .85rem; margin-bottom: 6px; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.svgwrap { position: relative; overflow-x: auto; }
.svgwrap svg { width: 100%; min-width: 520px; height: auto; display: block; }
svg .grid { stroke: var(--line); stroke-width: 1; }
svg .mark { stroke: var(--sage); stroke-dasharray: 4 4; }
svg .xh { stroke: var(--ink-2); stroke-width: 1; }
svg .ax { fill: var(--ink-2); font-size: 11px; font-family: var(--body); }
svg .lbl { fill: var(--ink); font-size: 12px; font-family: var(--body); }
svg .val { fill: var(--ink); font-size: 12px; font-weight: 600; font-family: var(--body); }
.tip { position: absolute; top: 8px; background: var(--green-deep); color: var(--parchment); border-radius: 6px; padding: 8px 10px; font-size: .8rem; pointer-events: none; min-width: 180px; }
.tip div { display: flex; align-items: center; gap: 6px; } .tip span { margin-left: auto; font-variant-numeric: tabular-nums; }
.tip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* report */
.report-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.preview-note { display: none; font-size: .85rem; color: var(--ink-2); }
.in-preview .preview-note { display: inline; }
.in-preview #btnPrint, .in-preview #btnPrintFF { display: none; }
.report { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.card, .r-page { min-width: 0; }
.r-foot { display: none; }
.r-page { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 40px 44px; max-width: 8.5in; margin: 0 auto; width: 100%; }
.r-page h2 { font-size: 1.8rem; margin-bottom: 12px; }
.r-page p { max-width: 68ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; color: var(--gold-deep); font-weight: 600; margin: 0 0 6px; }
.r-cover { background: var(--green); color: var(--parchment); display: grid; grid-template-rows: auto 1fr auto; gap: 40px; min-height: 9.5in; border: none; }
.r-cover h1 { color: var(--parchment); font-size: 2.8rem; line-height: 1.1; font-weight: 600; max-width: 14ch; }
.r-cover .eyebrow { color: var(--gold); }
.r-cover .lede { font-size: 1.15rem; color: #DDE0D4; max-width: 44ch; }
.cover-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid rgba(204, 177, 32, .5); padding-bottom: 18px; }
.cover-mid { align-self: center; }
.wordmark { font-family: var(--display); font-size: 1.6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.logo-img { max-height: 90px; max-width: 320px; }
.tag { color: var(--gold); letter-spacing: .2em; text-transform: uppercase; font-size: .78rem; margin: 0; }
.cover-bot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: #DDE0D4; font-size: .95rem; }
.cover-bot b { color: var(--parchment); }
blockquote { margin: 0 0 18px; padding: 12px 18px; border-left: 3px solid var(--gold); background: var(--tint); font-family: var(--display); font-style: italic; font-size: 1.05rem; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0 20px; }
.tile { border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: grid; gap: 4px; align-content: start; }
.tile span { font-size: .82rem; color: var(--ink-2); }
.tile b { font-family: var(--display); font-size: 1.7rem; color: var(--green); font-weight: 600; }
.tile small { color: var(--ink-2); font-size: .78rem; }
.tile.hi { background: var(--green); border-color: var(--green); }
.tile.hi span, .tile.hi small { color: #C9CDBF; } .tile.hi b { color: var(--gold); }
.explain { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 14px 0; }
.explain.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.explain > div { background: var(--parchment); border-radius: 8px; padding: 12px 14px; min-width: 0; }
.explain h4 { color: var(--green); font-family: var(--display); font-size: 1rem; }
.explain p { margin: 0; font-size: .9rem; }
.r-recs { padding-left: 1.3rem; display: grid; gap: 12px; }
.r-recs li::marker { color: var(--gold-deep); font-family: var(--display); font-weight: 700; }
.r-recs p { margin: 2px 0 0; font-size: .92rem; }
.cta { margin-top: 24px; background: var(--green); color: var(--parchment); border-radius: 8px; padding: 16px 18px; }
.cta b { color: var(--gold); }
.r-fine li { font-size: .85rem; margin-bottom: 6px; }

/* fact-find sheet */
.ff { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 28px; display: grid; gap: 22px; }
.ff-t td { height: 40px; }
.ff-t td:first-child { width: 50%; }
.ff-t th:nth-child(2), .ff-t th:nth-child(3) { width: 25%; }
.ff-t td.blank { border-left: 1px solid var(--line); }

@media (max-width: 600px) {
  .tiles { grid-template-columns: 1fr; }
  .r-page { padding: 24px 18px; }
  .r-cover h1 { font-size: 2rem; }
  .r-cover { min-height: auto; }
}

@media print {
  @page { size: letter; margin: 0.5in 0.55in 0.6in; }
  html, body { background: #fff; }
  .app-bar, .tabs, .report-tools, #openMsg, .view[hidden] { display: none !important; }
  main { padding: 0; max-width: none; }
  .r-page { border: none; border-radius: 0; padding: 0; max-width: none; break-after: page; }
  .r-cover { padding: 0.6in; min-height: 9.6in; -webkit-print-color-adjust: exact; print-color-adjust: exact; margin: -0.5in -0.55in 0; width: calc(100% + 1.1in); }
  .tile.hi, .cta, .kpi, tr.hi td, .explain > div, blockquote, .chip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tbl, .chart, .explain > div, .tile, tr { break-inside: avoid; }
  h2, h3 { break-after: avoid; }
  .svgwrap svg { min-width: 0; }
  .tip { display: none; }
  .ff { border: none; padding: 0; }
}

/* comparisons */
.pol-more { margin-top: 10px; }
.pol-more summary { cursor: pointer; font-size: .85rem; color: var(--green); font-weight: 500; }
.pol-more .grid { margin-top: 10px; }
.cmp-ed { border-top: 1px dashed var(--line); padding-top: 14px; margin-top: 14px; display: grid; gap: 12px; }
.cmp-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.cmp-cols > div { display: grid; gap: 6px; align-content: start; min-width: 0; }
.cmp-cols h3 { margin: 0; font-size: .95rem; }
.cmp-opts { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.lede-sm { font-size: 1.02rem; max-width: 70ch; }
.duel { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin: 14px 0 6px; }
.duel > div { padding: 10px 12px; border-bottom: 1px solid var(--line); min-width: 0; }
.duel-h { font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; background: var(--tint); }
.duel-h.oA { color: #2D5A8A; border-top: 4px solid #3F72A8; }
.duel-h.oB { color: #17603A; border-top: 4px solid #1F7A45; }
.duel-h.oC { color: #6E5F0F; border-top: 4px solid #A38E1A; }
.duel.cols-3 { grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr)); }
.duel.cols-3 .duel-v { font-size: 1.1rem; }
.matrix.cols-3 td { font-size: .8rem; }
.duel-l { font-size: .88rem; color: var(--ink-2); }
.duel-v { font-family: var(--display); font-size: 1.3rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.duel-v small { display: block; font-family: var(--body); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: #17603A; font-weight: 600; }
.duel-v.win { background: var(--hi); }
.matrix th[scope="row"] { font-size: .85rem; text-transform: none; letter-spacing: 0; color: var(--ink); width: 24%; }
.matrix td { font-size: .86rem; }
.matrix .mk { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: .75rem; font-weight: 700; margin-right: 4px; }
.matrix td.yes .mk { background: #1F7A45; color: #fff; }
.matrix td.no .mk { background: #E9DFD6; color: var(--warn); }
.matrix td.no { color: var(--ink-2); }
.events { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 12px 0; }
.event { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; min-width: 0; display: grid; gap: 8px; align-content: start; }
.event h4 { font-family: var(--display); color: var(--green); font-size: 1.02rem; margin: 0; }
.event .sub { margin: 0; font-size: .78rem; color: var(--ink-2); }
.ev-row { display: grid; gap: 2px; }
.ev-row p { margin: 0; font-size: .86rem; }
.tagA, .tagB { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.tagA { color: #2D5A8A; } .tagB { color: #17603A; } .tagC { color: #6E5F0F; }
@media print {
  .duel, .matrix tr, .event { break-inside: avoid; }
  .duel-h, .duel-v.win, .matrix .mk { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pol-more { display: none; }
}

/* fact-find v2 */
.ff-head { display: grid; gap: 4px; border-bottom: 2px solid var(--green); padding-bottom: 10px; }
.ff-head h1 { font-size: 1.6rem; }
.ff-head p { margin: 0; color: var(--ink-2); }
.wm-dark { font-family: var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); font-size: .85rem; }
.ff-t { table-layout: fixed; border: 1px solid #8F8C78; }
.ff-t th, .ff-t td { border: 1px solid #A9A691; }
.ff-t.three th:first-child { width: 46%; } .ff-t.three th:nth-child(2), .ff-t.three th:nth-child(3) { width: 27%; }
.ff-t.two th:first-child { width: 46%; }
.ff-t td.shared { background: var(--tint); color: var(--ink-2); font-size: .75rem; font-style: italic; vertical-align: middle; text-align: center; }
.ff-load { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.ff-load p { margin: 4px 0 0; color: var(--ink-2); max-width: 60ch; }
.todo ul { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 10px; }
.todo li { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: start; }
.todo li p { margin: 2px 0 0; font-size: .88rem; color: var(--ink-2); }
.todo .mk { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--sage); display: grid; place-items: center; font-size: .75rem; font-weight: 700; }
.todo li.ok .mk { background: #1F7A45; border-color: #1F7A45; color: #fff; }
.todo li small { color: #17603A; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: .68rem; }
.todo-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
@media print { .ff-t th, .ff-t td, .ff-t td.shared { -webkit-print-color-adjust: exact; print-color-adjust: exact; } .ff section { break-inside: auto; } .ff tr { break-inside: avoid; } .ff h2 { break-after: avoid; } }

/* advisor disclosure */
#factHost { display: grid; gap: 20px; }
.ad-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; background: var(--green); color: var(--parchment); margin: -28px -28px 0; padding: 22px 28px; border-radius: 6px 6px 0 0; }
.ad-head h1 { color: var(--parchment); font-size: 1.7rem; }
.ad-head .wm-dark { color: var(--gold); }
.ad-head p { margin: 0; text-align: right; color: #DDE0D4; font-size: .9rem; }
.ad-head b { color: var(--gold); letter-spacing: .05em; }
.ad-t { border: 1px solid #8F8C78; table-layout: fixed; }
.ad-t th, .ad-t td { border: 1px solid #A9A691; font-size: .82rem; padding: 6px 8px; }
.ad-t th.c, .ad-t td.c { width: 66px; text-align: center; }
.ad-t th.r { width: 30%; }
.ad-t.two-col th:nth-child(3), .ad-t.two-col th:nth-child(6) { width: 16%; }
.ad-txt, .ad-legal p { font-size: .8rem; line-height: 1.45; max-width: none; }
.ad-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
@media print { .ad-grid { grid-template-columns: 1fr 1fr; } .ff, #factHost { display: block; } .ff > * + *, #factHost > * + * { margin-top: 14px; } .ad-t th, .ad-t td { padding: 4px 6px; } .ff-t td { height: 30px; padding: 4px 8px; } }
.ad-svc h4 { font-size: .85rem; color: var(--green); margin: 0 0 4px; }
.cb { display: inline-block; width: 14px; height: 14px; border: 1.5px solid var(--ink); border-radius: 2px; vertical-align: middle; }
.ad-oba { display: flex; gap: 8px; align-items: flex-start; }
.ad-lines { font-size: .8rem; color: var(--ink-2); line-height: 2; margin: 0; }
.sig { display: grid; gap: 4px; justify-items: start; margin-top: 26px; font-size: .8rem; }
.sig span { display: block; width: 260px; max-width: 100%; border-bottom: 1px solid var(--ink); height: 26px; }
.sigs { display: flex; flex-wrap: wrap; gap: 24px; }
.sig.short span { width: 140px; }
@media print {
  .ad-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; margin: 0 0 6px; border-radius: 0; }
  .ff.ad { break-after: page; }
  .ad-legal { break-before: page; }
  .ad-svc { break-inside: avoid; }
}

/* hidden until the portal confirms an advisor is signed in */
html.gate-wait body { visibility: hidden; }

/* saved clients */
.save-status { font-size: .8rem; color: var(--sage); align-self: center; }
.save-status.ok { color: #C9E3CF; }
.save-status.warn { color: var(--gold); }
.clients-panel { max-width: 1100px; margin: 12px auto 0; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 18px; display: grid; gap: 12px; width: calc(100% - 32px); }
.cp-head { display: flex; justify-content: space-between; align-items: center; }
.cp-folder { background: var(--parchment); border-radius: 8px; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.cp-folder p { margin: 0; max-width: 70ch; font-size: .9rem; }
.cp-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; max-height: 50vh; overflow: auto; }
.cp-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cp-list li small { display: block; color: var(--ink-2); font-size: .78rem; }
.cp-list li.empty { color: var(--ink-2); border: none; }
.cp-acts { display: flex; gap: 8px; align-items: center; }
.cp-foot { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
@media print { .clients-panel, .save-status { display: none !important; } }

.cp-folder .warn, .cp-folder .ok-note { flex-basis: 100%; font-size: .85rem; }
.cp-folder .ok-note { color: #17603A; }
.cp-hist { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .85rem; }

.alive { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.alive b { color: var(--green); }
ol.method { padding-left: 20px; } ol.method li { margin: 0 0 8px; }
table.tl td, table.tl th { font-size: 13px; }
table.tl td small, table.tl th small { font-weight: 400; color: var(--ink-2); text-transform: none; letter-spacing: 0; }
table.tl td:last-child { min-width: 170px; }
table.tl { table-layout: fixed; width: 100%; }
table.tl th { white-space: normal; vertical-align: bottom; }
table.tl th:nth-child(1) { width: 11%; } table.tl th:nth-child(2) { width: 9%; }
table.tl td:last-child { min-width: 0; width: 27%; }
@media (max-width: 640px) { table.tl { table-layout: auto; min-width: 640px; } }

.wi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 12px 0; }
.wi-opts { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.wi-verdict li { margin-bottom: 6px; }
.wi-actions { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
i.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.warn-inline { color: var(--warn); }

.attach-warn { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; background: #FBEFE6; border: 1px solid #E8C9B3; color: var(--warn); border-radius: 8px; padding: 10px 12px; margin-top: 10px; font-size: 14px; }

.attach-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 10px; }
.attach-warn-inline { color: var(--warn); font-size: 14px; }

.wi-report { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.wi-report input { flex: 1; min-width: 220px; }
.wi-optlist { list-style: none; padding: 0; margin: 8px 0 0; } .wi-optlist li { padding: 4px 0; }
table.opts th { white-space: normal; vertical-align: bottom; }

/* concise report additions */
ul.rules { list-style: none; padding: 0; margin: 10px 0 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 18px; }
ul.rules li { font-size: 14px; padding-left: 12px; border-left: 3px solid var(--gold); }
.callout { background: var(--hi); border-left: 4px solid #1F7A45; padding: 10px 14px; border-radius: 6px; }
.split { margin: 6px 0 14px; } .split-row { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 12px; align-items: center; margin: 8px 0; }
.split-lab { font-size: 14px; font-weight: 500; } .split-lab small { display: block; font-weight: 400; color: var(--ink-2); font-size: 12px; }
.split-bar { display: flex; height: 34px; gap: 2px; }
.split-bar i { display: flex; align-items: center; justify-content: center; color: #fff; font-style: normal; font-size: 12px; font-weight: 600; min-width: 2px; }
.split-bar i:first-child { border-radius: 4px 0 0 4px; } .split-bar i:last-child { border-radius: 0 4px 4px 0; }
.explain.three { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.r-page.r-cont { break-before: avoid; page-break-before: avoid; padding-top: 0; border-top: 0; margin-top: -24px; }
@media (max-width: 600px) { .split-row { grid-template-columns: 1fr; } }
