/* PEAS Funder-Fit Assessor — "editorial decision-brief" theme.
   Spectral (serif display) · Hanken Grotesk (sans body) · Space Mono (data). */

:root {
  --green-950: #0e2415;
  --green-900: #11301c;
  --green-800: #163a22;
  --green-700: #1d4a2b;
  --green-600: #2a6b3c;
  --leaf: #8bbf3c;
  --leaf-dk: #6f9f2c;

  --paper: #f2eee2;        /* warm canvas */
  --paper-card: #fbf9f1;   /* card surface */
  --paper-line: #e4ddca;

  --ink: #1b231b;
  --muted: #6a7563;
  --muted-2: #8b9483;

  --orange: #df6b1b;       /* PEAS orange */
  --clay: #b9522a;         /* deeper accent */

  --good: #2f7a3e;
  --good-bg: #e9f3e3;
  --warn: #b9821a;
  --warn-bg: #f7eed6;
  --bad: #b23a26;
  --bad-bg: #f6e3dc;

  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, "SFMono-Regular", monospace;

  --shadow-sm: 0 1px 2px rgba(14,36,21,.07), 0 4px 14px rgba(14,36,21,.06);
  --shadow-lg: 0 10px 40px rgba(14,36,21,.16);
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
/* faint paper grain */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }

/* ---------- Header ---------- */
.topbar {
  position: relative; overflow: hidden; color: #f4f1e6;
  background:
    repeating-radial-gradient(circle at 88% -30%, transparent 0 44px, rgba(255,255,255,.045) 44px 45px),
    repeating-radial-gradient(circle at 6% 130%, transparent 0 60px, rgba(139,191,60,.10) 60px 61px),
    linear-gradient(135deg, var(--green-950), var(--green-800) 70%, var(--green-700));
}
.topbar .wrap { padding-top: 26px; padding-bottom: 26px; }
.header-center { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.peas-brand { display: inline-block; line-height: 0; transition: opacity .15s ease; }
.peas-brand:hover { opacity: .85; }
.peas-logo { height: 50px; width: auto; display: block; }
.app-name {
  font-family: var(--serif); font-weight: 600; font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -.3px; line-height: 1; margin: 0; color: #f4f1e6;
}
.rule-orange { height: 3px; width: 56px; background: var(--orange); border-radius: 2px; margin: 0; }
.app-tagline { max-width: 56ch; font-size: 14.5px; line-height: 1.5; color: #d8e0cf; margin: 0; }
@media (max-width: 560px) { .peas-logo { height: 40px; } }

/* ---------- Layout ---------- */
main { padding: 34px 0 70px; }
.step-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--clay); display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.step-label::before { content: ""; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--clay);
  display: inline-grid; place-items: center; }
.step-label[data-n]::before { content: attr(data-n); font-size: 11px; color: var(--clay); }

.card {
  background: var(--paper-card); border: 1px solid var(--paper-line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 24px; margin-bottom: 30px;
}

/* ---------- Funder cards ---------- */
.funder-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 18px; }
.funder-card {
  text-align: left; cursor: pointer; background: #fff; border: 1.5px solid var(--paper-line);
  border-radius: 11px; padding: 14px 15px; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
  font: inherit; color: inherit; display: flex; flex-direction: column; gap: 4px;
}
.funder-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--leaf-dk); }
.funder-card.active { border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(42,107,60,.14); background: #fcfdf9; }
.funder-card .fc-name { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 7px; }
.funder-card .fc-tag {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .5px; text-transform: uppercase;
  padding: 2px 6px; border-radius: 5px; background: var(--good-bg); color: var(--good);
}
.funder-card .fc-tag.contrast { background: var(--bad-bg); color: var(--bad); }
.funder-card .fc-tag.custom { background: var(--warn-bg); color: var(--warn); }
.funder-card .fc-sum { font-size: 12.5px; color: var(--muted); }

.field { margin-bottom: 16px; }
label.fl { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px; }
input[type="text"], textarea {
  width: 100%; font-family: var(--sans); font-size: 14.5px; color: var(--ink); background: #fff;
  border: 1.5px solid var(--paper-line); border-radius: 10px; padding: 11px 13px;
}
input:focus, textarea:focus { outline: none; border-color: var(--leaf-dk); box-shadow: 0 0 0 3px rgba(139,191,60,.18); }
textarea { min-height: 142px; resize: vertical; line-height: 1.5; }
.preset-note { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.preset-note a { color: var(--leaf-dk); font-weight: 600; }

.actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.btn {
  font-family: var(--sans); font-weight: 700; font-size: 14.5px; border-radius: 11px; padding: 12px 22px;
  cursor: pointer; border: none; transition: transform .12s ease, background .15s ease;
}
.btn-primary { background: var(--green-700); color: #f3f8ee; }
.btn-primary:hover { background: var(--green-600); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .5; cursor: default; transform: none; }
.btn-ghost { background: transparent; border: 1.5px solid var(--paper-line); color: var(--muted); }
.btn-ghost:hover { background: #f1efe5; color: var(--ink); }
.assess-arrow { display: inline-block; margin-left: 6px; }

/* ---------- States ---------- */
.hidden { display: none !important; }
.empty { text-align: center; color: var(--muted); padding: 40px 12px; font-size: 14.5px; }
.empty .seal { font-family: var(--serif); font-size: 40px; color: var(--paper-line); margin-bottom: 6px; }
.loading { text-align: center; padding: 44px 12px; color: var(--muted); }
.loading .pulse {
  width: 54px; height: 54px; margin: 0 auto 16px; border-radius: 50%;
  border: 2px solid var(--paper-line); border-top-color: var(--leaf); animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.errorbox { color: var(--bad); background: var(--bad-bg); border: 1px solid #e8c3b8; border-radius: 10px;
  padding: 14px 16px; font-size: 14px; }

/* ---------- Decision header (dark panel) ---------- */
.decision {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: linear-gradient(150deg, var(--green-900), var(--green-700));
  color: #eef3e6; padding: 26px 28px; margin-bottom: 6px;
  display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center;
}
.decision::after { /* faint contour */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-radial-gradient(circle at 95% 110%, transparent 0 34px, rgba(255,255,255,.04) 34px 35px);
}
/* Background follows the verdict: green = pursue (default), amber = caveats, red = do not pursue */
.decision.PURSUE_WITH_CAVEATS { background: linear-gradient(150deg, #4f3608, #8a6014); }
.decision.DO_NOT_PURSUE { background: linear-gradient(150deg, #4a1611, #8a2c1d); }
.decision.PURSUE_WITH_CAVEATS .conf, .decision.DO_NOT_PURSUE .conf { color: rgba(255,255,255,.72); }
.scorebox { text-align: center; position: relative; z-index: 1; }
.scorebox .num { font-family: var(--serif); font-weight: 700; font-size: 78px; line-height: .86; letter-spacing: -2px; }
.scorebox .den { font-family: var(--mono); font-size: 12px; opacity: .7; letter-spacing: 1px; }
.scorebox .scorebar { width: 96px; height: 5px; background: rgba(255,255,255,.16); border-radius: 3px; margin: 10px auto 0; overflow: hidden; }
.scorebox .scorebar > span { display: block; height: 100%; border-radius: 3px; transform-origin: left; animation: grow .8s .25s cubic-bezier(.2,.8,.2,1) both; }
@keyframes grow { from { transform: scaleX(0); } }
.decision .dtext { position: relative; z-index: 1; }
.stamp {
  display: inline-block; font-family: var(--mono); font-weight: 700; font-size: 15px; letter-spacing: 2px;
  text-transform: uppercase; padding: 8px 16px; border: 2.5px solid currentColor; border-radius: 8px;
  transform: rotate(-3deg); position: relative; animation: stampin .45s cubic-bezier(.2,1.4,.4,1) both;
}
.stamp::after { content: ""; position: absolute; inset: 3px; border: 1px solid currentColor; border-radius: 5px; opacity: .35; }
@keyframes stampin { 0% { opacity: 0; transform: rotate(9deg) scale(1.5); } 60% { opacity: 1; } 100% { transform: rotate(-3deg) scale(1); } }
.stamp.PURSUE { color: #b6e29a; }
.stamp.PURSUE_WITH_CAVEATS { color: #f1cd7e; }
.stamp.DO_NOT_PURSUE { color: #f0a594; }
.decision .verdict-headline { font-family: var(--serif); font-size: 21px; line-height: 1.25; margin: 14px 0 6px; max-width: 46ch; }
.decision .conf { font-family: var(--mono); font-size: 11.5px; letter-spacing: 1px; color: #c4d0b8; }

/* ---------- Reveal sections ---------- */
.reveal { animation: rise .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 70ms + .15s); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.sec { margin-top: 26px; }
.sec h3 { font-family: var(--mono); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--clay); margin: 0 0 12px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
@media (max-width: 720px) { .cols { grid-template-columns: 1fr; } .decision { grid-template-columns: 1fr; text-align: center; } .scorebox .scorebar { margin-inline: auto; } }
ul.brief { list-style: none; margin: 0; padding: 0; }
ul.brief li { position: relative; padding-left: 20px; margin-bottom: 9px; font-size: 14px; }
ul.brief li::before { content: ""; position: absolute; left: 0; top: 9px; width: 8px; height: 8px; border-radius: 2px; background: var(--leaf); transform: rotate(45deg); }
ul.brief.risk li::before { background: var(--clay); }
.nextaction { background: linear-gradient(90deg, rgba(139,191,60,.14), rgba(139,191,60,.04)); border-left: 4px solid var(--leaf); border-radius: 0 10px 10px 0; padding: 14px 16px; font-size: 14.5px; }
.assumptions { font-size: 12.5px; color: var(--muted); font-style: italic; }

/* ---------- Dimensions ledger ---------- */
.dim { border-top: 1px solid var(--paper-line); padding: 15px 0; }
.dim:first-child { border-top: none; }
.dim-head { display: flex; align-items: center; gap: 14px; }
.dim-name { font-family: var(--serif); font-weight: 600; font-size: 16.5px; flex: 1; }
.dim-meter { flex: 0 0 150px; height: 7px; background: #ece8da; border-radius: 4px; overflow: hidden; }
.dim-meter > span { display: block; height: 100%; background: var(--leaf); border-radius: 4px; transform-origin: left; animation: grow .7s .2s cubic-bezier(.2,.8,.2,1) both; }
.dim-meter.mid > span { background: var(--warn); }
.dim-meter.low > span { background: var(--bad); }
.dim-score { font-family: var(--mono); font-weight: 700; font-size: 15px; width: 30px; text-align: right; }
.dim-assess { font-size: 14px; margin: 9px 0 10px; color: #2c352a; }
.ledger { display: grid; grid-template-columns: 1fr; gap: 6px; background: #f6f3e8; border: 1px solid var(--paper-line); border-radius: 9px; padding: 11px 13px; font-size: 12.8px; }
.ledger .lrow { display: flex; gap: 9px; align-items: baseline; }
.ledger .ltag { font-family: var(--mono); font-size: 9.5px; letter-spacing: .5px; text-transform: uppercase; flex: 0 0 86px; padding-top: 1px; }
.ledger .ltag.evi { color: var(--green-600); }
.ledger .ltag.pri { color: var(--clay); }
.ledger .ltext { color: #333c30; }

.usage { font-family: var(--mono); font-size: 10.5px; color: var(--muted-2); margin-top: 18px; text-align: right; }

/* score explainer / fallback / weight chip / blocker */
.fallback-badge { display: inline-block; font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase;
  background: rgba(255,255,255,.14); color: #f1cd7e; border: 1px solid rgba(241,205,126,.5); border-radius: 6px; padding: 3px 9px; margin-bottom: 10px; }
.wchip { font-family: var(--mono); font-size: 10px; color: var(--muted-2); margin-left: 8px; vertical-align: middle; }
.blocker { font-family: var(--mono); font-size: 9.5px; letter-spacing: .5px; text-transform: uppercase; color: var(--bad);
  background: var(--bad-bg); border-radius: 5px; padding: 2px 7px; margin-left: 8px; vertical-align: middle; }

/* verdict-band legend */
.bandlegend { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; }
.bl { font-family: var(--mono); font-size: 10.5px; letter-spacing: .5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--paper-line); }
.bl.good { color: var(--good); background: var(--good-bg); }
.bl.warn { color: var(--warn); background: var(--warn-bg); }
.bl.bad { color: var(--bad); background: var(--bad-bg); }

/* fundraiser's angle strip */
.angle { margin-top: 16px; border: 1px solid var(--paper-line); border-radius: var(--radius); overflow: hidden; }
.angle-row { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 12px 16px; font-size: 14px; align-items: baseline; }
.angle-row + .angle-row { border-top: 1px solid var(--paper-line); }
.angle-row:nth-child(1) { background: linear-gradient(90deg, rgba(223,107,27,.10), rgba(223,107,27,.02)); }
.angle-row:nth-child(2) { background: linear-gradient(90deg, rgba(139,191,60,.10), rgba(139,191,60,.02)); }
.angle-tag { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--clay); padding-top: 2px; }
.angle-row:nth-child(2) .angle-tag { color: var(--leaf-dk); }
.angle-val { color: var(--ink); }

footer { color: var(--muted); font-size: 12.5px; text-align: center; padding: 26px; position: relative; z-index: 1; }
footer .nokey { color: var(--bad); font-weight: 600; }
footer .credit { margin-top: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .5px; color: var(--muted-2); }
footer .credit strong { color: var(--green-700); }

/* ---------- Knowledge base panel ---------- */
.hint { font-size: 13px; color: var(--muted); margin: -4px 0 14px; }
.kb-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.kb-row { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border: 1px solid var(--paper-line); border-radius: 9px; background: #fff; cursor: pointer; }
.kb-row input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--green-600); flex: 0 0 auto; }
.kb-meta { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.kb-title { font-weight: 600; font-size: 13.5px; }
.kb-sub { font-family: var(--mono); font-size: 10.5px; color: var(--muted-2); }
.kb-scope { font-family: var(--mono); font-size: 9px; letter-spacing: .5px; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; align-self: flex-start; margin-top: 3px; }
.kb-scope.peas { background: var(--good-bg); color: var(--good); }
.kb-scope.funder { background: var(--warn-bg); color: var(--warn); }
.kb-scope.general { background: #ece8da; color: var(--muted); }
.kb-del { border: none; background: none; color: var(--muted-2); cursor: pointer; font-size: 14px; padding: 4px 6px; border-radius: 6px; }
.kb-del:hover { background: var(--bad-bg); color: var(--bad); }
.kb-add { border-top: 1px dashed var(--paper-line); padding-top: 12px; display: flex; flex-direction: column; gap: 9px; }
.kb-add-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kb-add-row input[type=text] { flex: 1; min-width: 150px; }
.kb-note-title { max-width: 220px; }
.kb-msg { font-size: 12.5px; min-height: 16px; }
.kb-msg.ok { color: var(--green-600); } .kb-msg.err { color: var(--bad); }

.fetch-row { display: flex; gap: 8px; }
.fetch-row input { flex: 1; }
.fl-hint { font-family: var(--sans); font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted-2); font-size: 11.5px; }
.fetched-src { font-family: var(--mono); font-size: 10.5px; color: var(--green-600); text-transform: none; letter-spacing: 0; }
#funderFetched { min-height: 110px; background: #fbfaf4; }
.fetched-actions { margin-top: 6px; text-align: right; }

/* ---------- Wizard nav (horizontal; one step at a time) ---------- */
.wizard { display: flex; align-items: flex-start; gap: 0; margin: 20px 0 22px; }
.wizstep { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 9px; background: none; border: none; font: inherit; padding: 0 6px; cursor: default; }
.wizstep.clickable { cursor: pointer; }
.wizstep::before, .wizstep::after { content: ""; position: absolute; top: 15px; height: 2px; background: var(--paper-line); z-index: 0; }
.wizstep::before { left: 0; width: 50%; } .wizstep::after { right: 0; width: 50%; }
.wizstep:first-child::before, .wizstep:last-child::after { display: none; }
.wizstep.active::before, .wizstep.done::before { background: var(--leaf); }
.wizdot { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--paper-line); background: var(--paper); box-sizing: border-box; display: grid; place-items: center; font-family: var(--mono); font-size: 13px; color: var(--muted-2); transition: background .15s, border-color .15s; }
.wizstep.active .wizdot { border-color: var(--green-700); background: var(--green-700); color: #fff; }
.wizstep.done .wizdot { border-color: var(--leaf); background: var(--leaf); color: #14250f; }
.wizstep.done .wizdot .wn { display: none; }
.wizstep.done .wizdot::after { content: "✓"; font-size: 15px; font-weight: 700; }
.wizlabel { font-size: 12.5px; font-weight: 700; color: var(--muted-2); line-height: 1.2; }
.wizstep.active .wizlabel { color: var(--green-800); }
.wizstep.clickable:hover .wizlabel { color: var(--green-700); }
@media (max-width: 560px) { .wizlabel { font-size: 10px; } .wizdot { width: 26px; height: 26px; } }

/* Wizard panel footer actions (Back / Next) */
.wiz-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--paper-line); flex-wrap: wrap; }
.wiz-spacer { flex: 1; }
.wiz-actions .actions { margin: 0; }

/* ---------- Processing pipeline (detailed vertical) ---------- */
.stepflow .steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.step { display: flex; align-items: flex-start; gap: 13px; padding: 12px 6px; }
.step + .step { border-top: 1px solid var(--paper-line); }
.step-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--paper-line); flex: 0 0 auto; margin-top: 1px; box-sizing: border-box; display: grid; place-items: center; background: var(--paper-card); }
.step.running .step-dot { border-color: var(--leaf); border-top-color: transparent; animation: spin .8s linear infinite; }
.step.done .step-dot { background: var(--leaf); border-color: var(--leaf); }
.step.done .step-dot::after { content: "✓"; font-size: 10px; font-weight: 700; color: #14250f; }
.step-name { font-weight: 600; font-size: 14px; color: var(--muted-2); flex: 0 0 220px; }
.step.running .step-name, .step.done .step-name { color: var(--green-700); }
.step-detail { font-family: var(--mono); font-size: 11.5px; color: var(--muted); flex: 1; padding-top: 2px; line-height: 1.4; }
@media (max-width: 560px) { .step { flex-wrap: wrap; } .step-name { flex-basis: auto; } }

/* ---------- Citations + references ---------- */
.cites { margin-left: 5px; white-space: nowrap; }
.cite { font-family: var(--mono); font-size: 10px; color: var(--leaf-dk); text-decoration: none; vertical-align: super; padding: 0 1px; }
.cite:hover { text-decoration: underline; }
.reflist { margin: 0; padding-left: 20px; font-size: 13px; }
.reflist li { margin-bottom: 8px; padding-left: 4px; }
.reflist li:target { background: var(--warn-bg); border-radius: 6px; }
.ref-scope { font-family: var(--mono); font-size: 9px; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; margin-right: 8px; }
.ref-scope.peas { background: var(--good-bg); color: var(--good); }
.ref-scope.funder { background: var(--warn-bg); color: var(--warn); }
.ref-scope.general { background: #ece8da; color: var(--muted); }
.ref-title { font-weight: 600; }
.ref-sec { color: var(--muted); }
.ref-origin { font-family: var(--mono); font-size: 11px; color: var(--muted-2); }

/* ---------- Charts ---------- */
.chart-box { background: #fbf9f1; border: 1px solid var(--paper-line); border-radius: 11px; padding: 14px; }
.chart { width: 100%; height: auto; }
.c-label { font: 12px var(--sans); fill: var(--ink); }
.c-track { fill: #ece8da; }
.c-val { font: 700 12px var(--mono); fill: var(--ink); }
.glance-grid { display: grid; grid-template-columns: 1fr auto; gap: 22px; align-items: center; }
@media (max-width: 640px) { .glance-grid { grid-template-columns: 1fr; } }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.tile { background: linear-gradient(150deg, var(--green-900), var(--green-700)); color: #eef3e6; border-radius: 11px; padding: 14px; }
.tile-n { font-family: var(--serif); font-weight: 700; font-size: 26px; line-height: 1; }
.tile-l { font-size: 11.5px; color: #c4d0b8; margin-top: 4px; }
.glance-chart { text-align: center; }
.chart-cap { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.donut-wrap { display: flex; align-items: center; gap: 14px; }
.donut { width: 130px; height: 130px; }
.donut-center { font: 700 15px var(--serif); fill: var(--green-700); }
.donut-legend { text-align: left; font-size: 12px; }
.dl-row { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.dl-sw { width: 11px; height: 11px; border-radius: 3px; flex: 0 0 auto; }

/* ---------- Export bar ---------- */
.exportbar { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.export-lbl { font-family: var(--mono); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--clay); }
.btn-sm { padding: 7px 13px; font-size: 13px; }

.glance-src { font-size: 11px; color: var(--muted-2); margin-top: 10px; font-style: italic; }
.uncited-tag { font-family: var(--mono); font-size: 9.5px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); background: #ece8da; border-radius: 5px; padding: 2px 7px; margin-left: 8px; }

/* report title (self-titling for exports) */
.report-title { margin-bottom: 14px; }
.report-title .rt-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--clay); }
.report-title .rt-name { font-family: var(--serif); font-size: 26px; font-weight: 700; margin: 2px 0 0; color: var(--green-800); line-height: 1.1; }

/* ---------- Print ---------- */
@media print {
  .noprint { display: none !important; }
  body::before { display: none; }
  body { background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .topbar .app-tagline, .topbar .rule-orange { display: none; }
  .topbar .peas-logo { height: 30px; }
  .topbar { padding: 14px 22px; }
  main { padding: 12px 0; }
  .card { box-shadow: none; border: none; padding: 0; margin: 0 0 8px; }
  .reveal { animation: none !important; }
  .decision, .stamp, .tile, .dim-meter > span, .scorebar > span, .bl, .donut circle, .angle-row { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: var(--ink); text-decoration: none; }
}
