/* Check My Assessment — styles
 * Editorial, document-like, deliberately un-flashy. This tool asks people to
 * trust numbers about their house; it should read like a well-set public
 * document, not a product landing page.
 */

:root {
  --ink:        #16171a;
  --ink-2:      #3d4048;
  --ink-3:      #6b6f7a;
  --ink-4:      #9096a1;
  --rule:       #e0ddd6;
  --rule-2:     #efece6;
  --bg:         #faf8f4;
  --surface:    #ffffff;
  --surface-2:  #f5f2ec;

  --accent:     #16506b;   /* deep civic blue */
  --accent-ink: #0e3b50;
  --accent-bg:  #e7f0f5;

  --warn:       #8a5a12;
  --warn-bg:    #fdf3e0;
  --danger:     #8f2f2a;
  --danger-bg:  #fbeceb;
  --good:       #2b6141;
  --good-bg:    #e8f2ec;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --r: 10px;
  --shadow: 0 1px 2px rgba(20,20,25,.05), 0 4px 16px rgba(20,20,25,.05);
  --shadow-lg: 0 2px 6px rgba(20,20,25,.06), 0 12px 40px rgba(20,20,25,.09);
  --maxw: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eceaf0; --ink-2: #c3c1ca; --ink-3: #93919c; --ink-4: #6e6c78;
    --rule: #33313a; --rule-2: #262530;
    --bg: #131218; --surface: #1c1b22; --surface-2: #232229;
    --accent: #7ebada; --accent-ink: #a9d3ea; --accent-bg: #16303e;
    --warn: #e0b168; --warn-bg: #35291441;
    --danger: #e59a95; --danger-bg: #3a201e;
    --good: #86c7a2; --good-bg: #1a3227;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
    --shadow-lg: 0 2px 6px rgba(0,0,0,.35), 0 12px 40px rgba(0,0,0,.4);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--accent);
  color: #fff; padding: 10px 16px; z-index: 100; border-radius: 0 0 var(--r) 0;
}
.skip:focus { left: 0; }

a { color: var(--accent); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; line-height: 1.2; margin: 0; }
cite { font-style: normal; font-family: var(--mono); font-size: .87em; color: var(--accent); }

/* ---------------------------------- head --------------------------------- */

.site-head {
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(10px);
  position: sticky; top: 0; z-index: 40;
}
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 66px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 7px; flex: none;
  background:
    linear-gradient(135deg, var(--accent) 0%, var(--accent-ink) 100%);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 8px 7px 7px;
  border: 2px solid rgba(255,255,255,.92); border-bottom-width: 3px;
  border-radius: 1px 1px 0 0;
  clip-path: polygon(0 38%, 50% 0, 100% 38%, 100% 100%, 0 100%);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.brand-text small { font-size: 11.5px; color: var(--ink-3); letter-spacing: .02em; }
.head-nav { display: flex; gap: 22px; font-size: 14.5px; }
.head-nav a { color: var(--ink-2); text-decoration: none; }
.head-nav a:hover { color: var(--accent); text-decoration: underline; }
@media (max-width: 760px) { .head-nav { display: none; } }

/* ---------------------------------- hero --------------------------------- */

.hero { padding: 60px 0 40px; border-bottom: 1px solid var(--rule); }
.eyebrow {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-3); margin: 0 0 20px;
}
.eyebrow span { color: var(--accent); }
.hero h1 { font-size: clamp(31px, 5vw, 50px); max-width: 19ch; margin-bottom: 22px; }
.lede { font-size: 18.5px; color: var(--ink-2); max-width: 62ch; margin: 0 0 38px; }

.search-card {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden;
  max-width: 660px;
}
.tabs { display: flex; border-bottom: 1px solid var(--rule); background: var(--surface-2); }
.tab {
  flex: 1; padding: 14px 18px; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 14.5px; color: var(--ink-3);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab.active { color: var(--accent); border-bottom-color: var(--accent); background: var(--surface); font-weight: 600; }
.tab:hover:not(.active) { color: var(--ink); }
.tab-panel { padding: 24px; }
.tab-panel.hidden { display: none; }
.tab-panel form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.tab-panel .field { flex: 1 1 300px; }

#form-search { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; padding: 24px; }
#form-search .field { flex: 1 1 320px; }
#form-search .btn { flex: 0 0 auto; padding-block: 12px; }
.search-foot {
  margin: 0; padding: 15px 24px; background: var(--surface-2);
  border-top: 1px solid var(--rule); font-size: 13.5px; color: var(--ink-3);
}

/* --------------------------------- forms --------------------------------- */

.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); display: flex; gap: 7px; align-items: baseline; }
.req { font-style: normal; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em;
       color: var(--danger); font-weight: 700; }
.hint { font-size: 12.5px; color: var(--ink-4); }

input[type=text], input[type=number], input[type=date], select {
  font: inherit; font-size: 15.5px; padding: 11px 13px; width: 100%;
  border: 1px solid var(--rule); border-radius: 8px;
  background: var(--surface); color: var(--ink);
}
input:focus-visible, select:focus-visible, button:focus-visible, .linklike:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
input::placeholder { color: var(--ink-4); }

.input-money { position: relative; display: flex; align-items: center; }
.input-money > span {
  position: absolute; left: 12px; color: var(--ink-4); font-size: 15px; pointer-events: none;
}
.input-money input { padding-left: 26px; }

.btn {
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  padding: 11px 20px; border-radius: 8px; border: 1px solid transparent;
  transition: background .13s, border-color .13s, color .13s;
  white-space: nowrap;
}
.btn.primary { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.primary { color: #0d1418; } }
.btn.primary:hover { background: var(--accent-ink); }
.btn.ghost { background: transparent; border-color: var(--rule); color: var(--ink-2); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn.lg { padding: 14px 28px; font-size: 16px; }

.linklike {
  background: none; border: 0; padding: 0; font: inherit; color: var(--accent);
  text-decoration: underline; cursor: pointer;
}

.grid-form { display: flex; flex-direction: column; gap: 26px; }
fieldset { border: 1px solid var(--rule); border-radius: 12px; padding: 22px; margin: 0; background: var(--surface); }
legend {
  font-family: var(--serif); font-size: 18px; font-weight: 600; padding: 0 10px;
  display: flex; align-items: baseline; gap: 10px;
}
.legend-note { font-family: var(--sans); font-size: 12px; font-weight: 500; color: var(--accent);
               background: var(--accent-bg); padding: 3px 9px; border-radius: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid-3 + .grid-3, .grid-4 + .grid-4 { margin-top: 18px; }
@media (max-width: 860px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.advanced { margin-top: 18px; border-top: 1px dashed var(--rule); padding-top: 16px; }
.advanced summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--accent); }
.advanced summary::marker { color: var(--ink-4); }
.advanced .grid-4 { margin-top: 18px; }

.form-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }

/* -------------------------------- sections ------------------------------- */

.section { padding: 52px 0; border-bottom: 1px solid var(--rule); }
.section-head { max-width: 66ch; margin-bottom: 30px; }
.section-head h2 { font-size: clamp(23px, 3.2vw, 31px); margin-bottom: 12px; }
.section-head p { color: var(--ink-2); margin: 0; font-size: 16.5px; }
.step {
  display: inline-block; font-family: var(--mono); font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .07em; color: var(--accent);
  background: var(--accent-bg); padding: 4px 10px; border-radius: 5px; margin-bottom: 13px;
}
.micro { font-size: 12.8px; color: var(--ink-4); margin: 0; }

/* -------------------------------- status --------------------------------- */

.status { margin-top: 20px; padding: 14px 18px; border-radius: var(--r); font-size: 14.5px;
          border: 1px solid var(--rule); background: var(--surface); max-width: 660px; }
.status.error { border-color: var(--danger); background: var(--danger-bg); color: var(--danger); }
.status.busy { color: var(--ink-3); }
.status.busy::before {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 9px;
  border: 2px solid var(--ink-4); border-top-color: transparent; border-radius: 50%;
  animation: spin .7s linear infinite; vertical-align: -1px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------- candidates ------------------------------ */

.candidates { margin-top: 20px; max-width: 660px; }
.candidates h3 { font-size: 16px; margin-bottom: 12px; }
.cand-list { display: flex; flex-direction: column; gap: 8px; }
.cand {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  width: 100%; text-align: left; padding: 14px 16px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r);
  font: inherit; color: inherit;
}
.cand:hover { border-color: var(--accent); background: var(--accent-bg); }
.cand-num { font-family: var(--mono); font-size: 14.5px; font-weight: 600; }
.cand-meta { font-size: 13px; color: var(--ink-3); }
.cand-tag { font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
            padding: 3px 8px; border-radius: 20px; background: var(--good-bg); color: var(--good); font-weight: 700; }

/* ------------------------------ property card ---------------------------- */

.prop-card {
  display: flex; justify-content: space-between; gap: 26px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 12px;
  padding: 24px; box-shadow: var(--shadow);
}
.prop-main { flex: 1 1 340px; }
.prop-card h2 { font-size: 22px; margin-bottom: 14px; }
.prop-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px 26px; margin: 0; }
.prop-facts div { display: flex; flex-direction: column; gap: 2px; }
.prop-facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-4); }
.prop-facts dd { margin: 0; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.prop-actions { display: flex; flex-direction: column; gap: 9px; align-items: stretch; }
@media (max-width: 620px) { .prop-actions { flex-direction: row; flex-wrap: wrap; } }

/* -------------------------------- verdict -------------------------------- */

.verdict {
  border-radius: 12px; padding: 26px 28px; margin-bottom: 30px;
  border: 1px solid var(--rule); background: var(--surface); box-shadow: var(--shadow);
  border-left: 4px solid var(--ink-4);
}
.verdict.over  { border-left-color: var(--good);   background: var(--good-bg); }
.verdict.under { border-left-color: var(--warn);   background: var(--warn-bg); }
.verdict.close { border-left-color: var(--accent); background: var(--accent-bg); }
.verdict h3 { font-size: 24px; margin-bottom: 10px; }
.verdict p { margin: 0 0 10px; max-width: 72ch; color: var(--ink-2); }
.verdict p:last-child { margin-bottom: 0; }
.verdict strong { color: var(--ink); }

/* --------------------- verdict: per-method breakdown --------------------- */

.method-list { list-style: none; margin: 18px 0 0; padding: 0; display: flex;
               flex-direction: column; gap: 8px; }
.method-list li { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
                  padding: 11px 15px; background: var(--surface); border: 1px solid var(--rule);
                  border-radius: 8px; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.method-list .vs { color: var(--ink-3); font-size: 13.5px; }
.method-list .conf { margin-left: auto; }

/* ------------------------- accuracy disclosure --------------------------- */

.accuracy { background: var(--surface); border: 1px solid var(--warn);
            border-left: 4px solid var(--warn); border-radius: 10px;
            padding: 16px 20px; margin-bottom: 26px; }
.accuracy > summary { cursor: pointer; list-style: none; display: flex;
                      flex-direction: column; gap: 4px; }
.accuracy > summary::-webkit-details-marker { display: none; }
.accuracy > summary::before { content: "▸ "; color: var(--warn); font-weight: 700; }
.accuracy[open] > summary::before { content: "▾ "; }
.acc-title { font-weight: 700; font-size: 15.5px; }
.acc-note { font-size: 13.5px; color: var(--ink-3); padding-left: 16px; }
.acc-body { margin-top: 16px; }
.errbar { display: inline-block; width: 60px; height: 7px; background: var(--surface-2);
          border-radius: 4px; overflow: hidden; margin-right: 8px; vertical-align: middle; }
.errbar i { display: block; height: 100%; background: var(--warn); }

/* ------------------------- comp filter disclosure ------------------------ */

.filter-list { list-style: none; margin: 12px 0; padding: 0; display: flex;
               flex-direction: column; gap: 6px; font-size: 13.5px; }
.filter-list li { padding-left: 24px; position: relative; color: var(--ink-2); }
.filter-list li::before { position: absolute; left: 0; font-weight: 700; }
.filter-list li.on::before  { content: "✓"; color: var(--good); }
.filter-list li.off::before { content: "○"; color: var(--warn); }
.filter-list li.off { color: var(--ink-3); }
.filter-list em { color: var(--warn); font-style: normal; }

/* --------------------------------- chart --------------------------------- */

.chart {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 12px;
  padding: 26px 28px; margin-bottom: 30px; box-shadow: var(--shadow);
}
.chart h3 { font-size: 17px; margin-bottom: 22px; }
.bar-row { display: grid; grid-template-columns: 190px 1fr 130px; gap: 16px; align-items: center;
           padding: 11px 0; border-bottom: 1px solid var(--rule-2); }
.bar-row:last-child { border-bottom: 0; }
@media (max-width: 700px) {
  .bar-row { grid-template-columns: 1fr; gap: 6px; padding: 14px 0; }
  .bar-amount { text-align: left !important; }
}
.bar-label { font-size: 14px; font-weight: 600; }
.bar-label small { display: block; font-weight: 400; color: var(--ink-4); font-size: 11.5px;
                   font-family: var(--mono); }
.bar-track { position: relative; height: 26px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.bar-fill { position: absolute; inset-block: 0; left: 0; border-radius: 5px;
            background: var(--accent); opacity: .82; }
.bar-fill.is-assessed { background: var(--ink-3); opacity: 1; }
.bar-range { position: absolute; inset-block: 7px; border: 1px dashed var(--ink-4); border-radius: 3px;
             opacity: .65; }
.bar-amount { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 15.5px; }
.bar-amount small { display: block; font-weight: 400; font-size: 11.5px; color: var(--ink-4); }
.bar-row.unusable .bar-track { background: repeating-linear-gradient(
    45deg, var(--surface-2), var(--surface-2) 6px, transparent 6px, transparent 12px); }
.bar-row.unusable .bar-amount { color: var(--ink-4); font-weight: 400; font-size: 13px; }

/* ------------------------------ method cards ----------------------------- */

.method-cards { display: grid; gap: 20px; }
.method {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 12px;
  overflow: hidden; box-shadow: var(--shadow);
}
.method-head { padding: 20px 24px; border-bottom: 1px solid var(--rule); display: flex;
               justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.method-head h3 { font-size: 20px; margin-bottom: 5px; }
.method-value { text-align: right; }
.method-value .amt { font-size: 27px; font-weight: 700; font-variant-numeric: tabular-nums;
                     font-family: var(--serif); }
.method-value .rng { font-size: 12.5px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.conf { display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
        font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.conf.moderate { background: var(--good-bg); color: var(--good); }
.conf.low { background: var(--warn-bg); color: var(--warn); }
.conf.none { background: var(--surface-2); color: var(--ink-4); }

.steps { padding: 6px 24px 18px; }
.step-row { display: grid; grid-template-columns: 1fr auto; gap: 20px; padding: 11px 0;
            border-bottom: 1px solid var(--rule-2); align-items: baseline; }
.step-row:last-child { border-bottom: 0; }
.step-row.emph { font-weight: 700; border-top: 2px solid var(--rule); margin-top: 5px; }
.step-row .sl { font-size: 14.5px; }
.step-row .sd { font-size: 12.5px; color: var(--ink-4); margin-top: 2px; }
.step-row .sa { font-variant-numeric: tabular-nums; font-size: 15.5px; white-space: nowrap; }
.step-row .sa.neg { color: var(--danger); }

.method-notes { padding: 0 24px 20px; display: flex; flex-direction: column; gap: 10px; }
.note {
  font-size: 13.5px; line-height: 1.55; padding: 12px 15px; border-radius: 8px;
  background: var(--surface-2); color: var(--ink-2); border-left: 3px solid var(--ink-4);
}
.note.warn { background: var(--warn-bg); border-left-color: var(--warn); color: var(--warn); }
.method-cite { padding: 12px 24px; background: var(--surface-2); border-top: 1px solid var(--rule);
               font-size: 12.5px; color: var(--ink-3); }
.method.unusable { opacity: .96; }
.method.unusable .method-head { background: var(--surface-2); }
.unusable-msg { padding: 18px 24px; font-size: 14.5px; color: var(--ink-2); }

/* --------------------------------- comps --------------------------------- */

.comps { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px;
         margin-top: 30px; overflow: hidden; box-shadow: var(--shadow); }
.comps-head { padding: 20px 24px; border-bottom: 1px solid var(--rule); }
.comps-head h3 { font-size: 19px; margin-bottom: 6px; }
.comps-head p { margin: 0; font-size: 14px; color: var(--ink-3); }
.table-scroll { overflow-x: auto; }
table.comps-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
.comps-table th { text-align: left; padding: 11px 16px; background: var(--surface-2);
                  font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em;
                  color: var(--ink-3); border-bottom: 1px solid var(--rule); white-space: nowrap; }
.comps-table td { padding: 11px 16px; border-bottom: 1px solid var(--rule-2); font-variant-numeric: tabular-nums; }
.comps-table tr:last-child td { border-bottom: 0; }
.comps-table td.num { text-align: right; }
.comps-table .pnum { font-family: var(--mono); font-size: 13px; }
.flag { font-size: 11px; padding: 2px 7px; border-radius: 20px; background: var(--warn-bg);
        color: var(--warn); font-weight: 700; white-space: nowrap; }

/* -------------------------------- impact --------------------------------- */

.impact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.stat { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px;
        padding: 22px; box-shadow: var(--shadow); }
.stat dt { font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-4); margin-bottom: 7px; }
.stat dd { margin: 0; font-size: 30px; font-weight: 700; font-family: var(--serif);
           font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .sub { font-size: 13px; color: var(--ink-3); margin-top: 7px; font-weight: 400; font-family: var(--sans); }
.stat.hi dd { color: var(--good); }

/* ------------------------------- approaches ------------------------------ */

.approach-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.approach { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px;
            padding: 24px; box-shadow: var(--shadow); }
.approach h3 { font-size: 19px; margin-bottom: 8px; }
.approach .quote { font-size: 14px; color: var(--ink-2); font-style: italic;
                   border-left: 3px solid var(--accent); padding-left: 14px; margin: 14px 0; }
.approach dl { margin: 16px 0 0; display: flex; flex-direction: column; gap: 12px; }
.approach dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em;
               color: var(--ink-4); margin-bottom: 3px; }
.approach dd { margin: 0; font-size: 14px; color: var(--ink-2); }

.callout { background: var(--accent-bg); border: 1px solid transparent; border-left: 4px solid var(--accent);
           border-radius: 10px; padding: 24px 26px; margin-top: 26px; }
.callout h3 { font-size: 20px; margin-bottom: 10px; }
.callout p { margin: 0 0 12px; color: var(--ink-2); max-width: 74ch; }
.callout ul { margin: 12px 0 0; padding-left: 20px; color: var(--ink-2); font-size: 14.5px; }
.callout li { margin-bottom: 6px; }
.callout.strong { background: var(--warn-bg); border-left-color: var(--warn); }

/* ------------------------------- scorecard ------------------------------- */

.scorecard { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px;
             overflow: hidden; box-shadow: var(--shadow); }
.scorecard-head { padding: 22px 24px; border-bottom: 1px solid var(--rule);
                  display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.scorecard-head h3 { font-size: 20px; }
.score-pill { font-family: var(--mono); font-size: 14px; font-weight: 700; padding: 6px 14px;
              border-radius: 20px; background: var(--good-bg); color: var(--good); }
.score-list { list-style: none; margin: 0; padding: 0; }
.score-list li { display: flex; align-items: center; gap: 13px; padding: 13px 24px;
                 border-bottom: 1px solid var(--rule-2); font-size: 14.5px; }
.score-list li:last-child { border-bottom: 0; }
.score-mark { flex: none; width: 21px; height: 21px; border-radius: 50%; display: grid;
              place-items: center; font-size: 12px; font-weight: 700; color: #fff; }
.score-mark.pass { background: var(--good); }
.score-mark.fail { background: var(--danger); }
@media (prefers-color-scheme: dark) { .score-mark { color: #14140f; } }
.score-list li.is-fail { background: var(--danger-bg); }
.scorecard-foot { padding: 20px 24px; background: var(--surface-2); border-top: 1px solid var(--rule);
                  font-size: 14.5px; color: var(--ink-2); }
.scorecard-foot p { margin: 0; max-width: 82ch; }

/* -------------------------------- programs ------------------------------- */

.program-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 20px; }
.program { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px;
           padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.program-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.program h3 { font-size: 18px; }
.mag { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700;
       padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.mag.large { background: var(--good-bg); color: var(--good); }
.mag.medium { background: var(--accent-bg); color: var(--accent); }
.mag.varies { background: var(--surface-2); color: var(--ink-3); }
.program .basis { font-size: 13.5px; color: var(--ink-3); margin: 0 0 12px; font-style: italic; }
.program .plain { font-size: 14.5px; color: var(--ink-2); margin: 0 0 14px; }
.program h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em;
              color: var(--ink-4); margin: 0 0 7px; font-family: var(--sans); font-weight: 700; }
.program ul { margin: 0 0 14px; padding-left: 19px; font-size: 13.5px; color: var(--ink-2); }
.program li { margin-bottom: 5px; }
.program .catch { font-size: 13px; background: var(--warn-bg); color: var(--warn);
                  padding: 11px 14px; border-radius: 8px; margin: auto 0 12px; }
.program .cite-foot { font-size: 12px; color: var(--ink-4); font-family: var(--mono); margin: 0; }

/* --------------------------------- appeal -------------------------------- */

.appeal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 20px; margin-top: 22px; }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px;
         padding: 24px; box-shadow: var(--shadow); }
.panel h3 { font-size: 18px; margin-bottom: 12px; }
.panel ul { margin: 0; padding-left: 19px; font-size: 14.5px; color: var(--ink-2); }
.panel li { margin-bottom: 9px; }
.panel.good { border-top: 3px solid var(--good); }
.panel.bad { border-top: 3px solid var(--danger); }

.deadline-card { background: var(--danger-bg); border: 1px solid var(--danger); border-radius: 12px;
                 padding: 26px; margin-bottom: 22px; }
.deadline-card h3 { font-size: 21px; color: var(--danger); margin-bottom: 9px; }
.deadline-date { font-size: 33px; font-weight: 700; font-family: var(--serif); color: var(--danger);
                 margin: 10px 0 6px; }
.deadline-card p { margin: 0 0 8px; color: var(--ink-2); max-width: 72ch; }
.deadline-card p:last-child { margin-bottom: 0; }

/* ------------------------------- worksheet ------------------------------- */

.worksheet-cta { display: flex; justify-content: space-between; align-items: center; gap: 26px;
                 flex-wrap: wrap; background: var(--surface); border: 1px solid var(--rule);
                 border-radius: 12px; padding: 28px; box-shadow: var(--shadow); }
.worksheet-cta h2 { font-size: 24px; margin-bottom: 7px; }
.worksheet-cta p { margin: 0; color: var(--ink-2); max-width: 56ch; }

/* --------------------------------- footer -------------------------------- */

.site-foot { padding: 48px 0 40px; background: var(--surface-2); border-top: 1px solid var(--rule); }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; }
.foot-grid h3 { font-size: 15px; margin-bottom: 9px; }
.foot-grid p { margin: 0; font-size: 14px; color: var(--ink-3); line-height: 1.6; }
.foot-legal { margin: 34px 0 0; padding-top: 22px; border-top: 1px solid var(--rule);
              font-size: 12.8px; color: var(--ink-4); }

/* ------------------------- candidates (address) -------------------------- */

.cand-addr { font-weight: 600; font-size: 15px; display: block; }
.cand-val { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-3); font-size: 14px; }
.cand { align-items: center; }

/* --------------------------------- alerts -------------------------------- */

#prop-alerts { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.alert { border-radius: 10px; padding: 18px 22px; border: 1px solid var(--rule);
         border-left: 4px solid var(--ink-4); background: var(--surface); }
.alert.warn { border-left-color: var(--warn); background: var(--warn-bg); }
.alert.good { border-left-color: var(--good); background: var(--good-bg); }
.alert h3 { font-size: 17px; margin-bottom: 7px; }
.alert p { margin: 0 0 8px; font-size: 14.5px; color: var(--ink-2); max-width: 82ch; }
.alert cite { font-size: 12px; }

.prop-sub { margin: -6px 0 16px; color: var(--ink-3); font-size: 14.5px; }

/* --------------------------------- refine -------------------------------- */

.refine { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px;
          padding: 20px 24px; box-shadow: var(--shadow); }
.refine > summary { cursor: pointer; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.refine > summary::-webkit-details-marker { display: none; }
.refine > summary::before { content: "▸ "; color: var(--accent); font-weight: 700; }
.refine[open] > summary::before { content: "▾ "; }
.refine-title { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.refine-note { font-size: 13.5px; color: var(--ink-3); padding-left: 16px; }
.refine[open] .grid-form { margin-top: 24px; }

/* --------------------------- stacked levy bars --------------------------- */

.bar-row.stacked .bar-track { height: 30px; }
.seg { position: absolute; inset-block: 0; border-radius: 3px; }
.seg.regular { background: var(--ink-3); }
.seg.state   { background: var(--accent); }
.seg.state.uncapped { background: repeating-linear-gradient(45deg,
                        var(--danger), var(--danger) 5px,
                        var(--warn) 5px, var(--warn) 10px); }
.seg.enrich  { background: var(--warn); }
.seg.bond    { background: var(--accent); opacity: .45; }
.bar-marker { display: none; }
.bar-row.flagged .bar-label { font-weight: 700; }
.bar-row.flagged .bar-label small { color: var(--danger); font-weight: 600; }

.legend { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 18px; font-size: 13px; color: var(--ink-3); }
.legend span { display: flex; align-items: center; gap: 7px; }
.sw { width: 13px; height: 13px; border-radius: 3px; display: inline-block; flex: none; }
.sw.regular { background: var(--ink-3); }
.sw.state   { background: var(--accent); }
.sw.enrich  { background: var(--warn); }
.sw.bond    { background: var(--accent); opacity: .45; }

.bar-amount small.up { color: var(--warn); font-weight: 600; }
.stat dd.warn-num { color: var(--warn); }

/* --------------------------------- print --------------------------------- */

@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #fff; --ink: #000; --ink-2: #222; --ink-3: #444; }
  .site-head, .hero, .head-nav, .prop-actions, .form-actions, #inputs,
  .worksheet-cta button, #search, .advanced, .site-foot .foot-grid { display: none !important; }
  .alert, .legend { break-inside: avoid; }
  body { font-size: 11pt; background: #fff; }
  .section { padding: 14pt 0; border-bottom: 1px solid #ccc; break-inside: avoid; }
  .method, .stat, .panel, .program, .chart, .verdict, .comps, .scorecard {
    box-shadow: none; border: 1px solid #bbb; break-inside: avoid; }
  .method-cards { gap: 12pt; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; }
  .comps-table { font-size: 9pt; }
}
