:root {
  --ink: #18202e;
  --ink-2: #4a5568;
  --muted: #6b7484;
  --paper: #faf8f4;
  --card: #ffffff;
  --line: #e4e0d8;
  --accent: #0e6e66;
  --accent-ink: #ffffff;
  --done: #17733a;     --done-bg: #e6f4ea;
  --prog: #1e4fb8;     --prog-bg: #e7eefc;
  --fix: #9a4a06;      --fix-bg: #fdf0dc;
  --pet: #6d32c9;      --pet-bg: #f0e9fc;
  --need: #b0281e;     --need-bg: #fbe7e5;
  --radius: 12px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.55 var(--font); color: var(--ink); background: var(--paper); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
a { color: var(--accent); }
kbd { font: 12px var(--mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; background: #fff; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* Top bar */
.top { border-bottom: 1px solid var(--line); background: rgba(250,248,244,.9); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(6px); }
.top-inner { display: flex; align-items: center; justify-content: space-between; height: 54px; }
.brand { font: 600 19px/1 var(--serif); letter-spacing: .2px; }
.unofficial { font: 600 10px/1 var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 3px 7px; vertical-align: middle; margin-left: 6px; }
.privacy-pill { font-size: 13px; color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; white-space: nowrap; }

/* Intro */
.intro { margin: 28px 0 0; max-width: 760px; }
.intro h1 { font: 600 26px/1.25 var(--serif); margin: 0 0 6px; }
.intro p { margin: 0; font-size: 15px; }

/* Steps */
.steps { display: grid; grid-template-columns: 1fr 1.25fr 0.95fr; gap: 16px; margin: 30px 0 26px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; position: relative; display: flex; flex-direction: column; }
.step h2 { font-size: 16px; margin: 0 0 6px; }
.step-n { position: absolute; top: -11px; left: 16px; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.how { font-size: 13.5px; color: var(--ink-2); margin: 0 0 12px; }
.drop { flex: 1; min-height: 120px; border: 1.5px dashed #c9c3b6; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 14px; cursor: pointer; transition: background .15s, border-color .15s; }
.drop:hover, .drop.over { background: #f3f8f7; border-color: var(--accent); }
.drop.ready { border-style: solid; border-color: var(--done); background: var(--done-bg); }
.drop-main { font-weight: 600; }
.drop-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
textarea { flex: 1; min-height: 150px; width: 100%; resize: vertical; font: 12.5px/1.45 var(--mono); border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fdfcfa; color: var(--ink); }
textarea:focus, select:focus, button:focus-visible, .drop:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.history-status { font-size: 12.5px; min-height: 18px; margin-top: 6px; }
.step-go { justify-content: flex-start; gap: 10px; }
.settings { font-size: 13.5px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fdfcfa; }
.settings summary { cursor: pointer; font-weight: 600; }
.settings label { display: block; margin-top: 8px; font-size: 12.5px; color: var(--ink-2); }
.settings select { display: block; width: 100%; margin-top: 3px; font: inherit; font-size: 13.5px; padding: 6px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
button { font: inherit; cursor: pointer; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 9px 14px; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 650; font-size: 16px; padding: 12px 16px; }
button.primary:hover { filter: brightness(1.08); }
button.primary:disabled { opacity: .6; cursor: progress; }
button.link { background: none; border: none; color: var(--accent); padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; text-align: left; }
.fineprint { font-size: 12px; color: var(--muted); margin: auto 0 0; }
.error { background: var(--need-bg); color: var(--need); border: 1px solid #f1c3be; border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; }
.result-actions { display: flex; gap: 12px; align-items: center; margin: 4px 0 12px; }

/* Report */
.report { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px 30px; margin-bottom: 40px; }
.report h2 { font: 600 28px/1.2 var(--serif); margin: 0 0 6px; }
.report .meta { margin: 2px 0; color: var(--ink-2); font-size: 13.5px; }
.warnings { background: var(--fix-bg); border: 1px solid #f2d7a6; border-radius: 10px; padding: 4px 14px; margin: 16px 0; color: #6b3a07; font-size: 14px; }
.headline { font: 500 19px/1.4 var(--serif); margin: 18px 0 14px; max-width: 820px; }
.cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.card { border-radius: 10px; padding: 12px; border: 1px solid var(--line); background: #fff; }
.card .n { font: 600 30px/1 var(--serif); }
.card .l { margin: 6px 0 4px; }
.card .h { font-size: 12px; color: var(--ink-2); line-height: 1.35; }
.c-need { background: var(--need-bg); border-color: #f1c3be; } .c-need .n { color: var(--need); }
.c-petition { background: var(--pet-bg); border-color: #dccbf6; } .c-petition .n { color: var(--pet); }
.c-fix { background: var(--fix-bg); border-color: #f2d7a6; } .c-fix .n { color: var(--fix); }
.c-in_progress { background: var(--prog-bg); border-color: #c8d6f6; } .c-in_progress .n { color: var(--prog); }
.c-done { background: var(--done-bg); border-color: #c4e3cd; } .c-done .n { color: var(--done); }
.units { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 16px 0 6px; font-size: 14px; color: var(--ink-2); }
.units .big { font: 600 20px var(--serif); color: var(--ink); }
h3.section { font: 600 21px/1.3 var(--serif); margin: 30px 0 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.todo-list { margin: 0; padding-left: 20px; }
.todo-list li { margin: 4px 0; }
.message { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 10px 0; background: #fdfcfa; }
.message .to { font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.message pre { white-space: pre-wrap; font: 13.5px/1.5 var(--font); margin: 0 0 10px; }
.message .copy.copied { background: var(--done-bg); border-color: #c4e3cd; color: var(--done); }

.badge { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; border-radius: 99px; padding: 2px 9px; white-space: nowrap; }
.s-done { background: var(--done-bg); color: var(--done); }
.s-in_progress { background: var(--prog-bg); color: var(--prog); }
.s-fix { background: var(--fix-bg); color: var(--fix); }
.s-petition { background: var(--pet-bg); color: var(--pet); }
.s-need { background: var(--need-bg); color: var(--need); }

.program { margin: 18px 0 26px; }
.program h3 { font-size: 17px; margin: 0 0 6px; }
.program h3 small { font-weight: 500; color: var(--muted); }
.mini-counts { font-size: 13px; color: var(--ink-2); display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid #efece6; vertical-align: top; }
table.reqs td.req { width: 26%; }
table.reqs td.status { width: 13%; }
table.reqs td.applied { width: 28%; }
.req-title { font-weight: 600; }
.progress, .official { font-size: 12px; color: var(--muted); margin-top: 3px; }
.chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 2px 7px; margin: 0 4px 4px 0; font-size: 12.5px; }
.chip small { color: var(--muted); }
.chip.pending { border-style: dashed; }
.tag { font-size: 10.5px; font-weight: 700; border-radius: 5px; padding: 0 5px; }
.tag.petition { background: var(--pet-bg); color: var(--pet); }
.tag.likely { background: var(--fix-bg); color: var(--fix); }
.tag.xfer { background: #eef0f3; color: var(--ink-2); }
.todo div { margin-bottom: 3px; }
.note { color: var(--ink-2); font-size: 12.5px; }
tr.r-need td.req { box-shadow: inset 3px 0 0 var(--need); }
tr.r-petition td.req { box-shadow: inset 3px 0 0 var(--pet); }
tr.r-fix td.req { box-shadow: inset 3px 0 0 var(--fix); }
tr.r-in_progress td.req { box-shadow: inset 3px 0 0 var(--prog); }
tr.r-done td.req { box-shadow: inset 3px 0 0 var(--done); }
table.courses td { padding: 6px 8px; }
table.courses td.num { text-align: right; }
table.courses td.title { color: var(--ink-2); }
table.courses tr.dim td { color: var(--muted); }
.warn { color: var(--need); font-weight: 700; }
.sources, .notes { font-size: 13px; color: var(--ink-2); }
.notes { margin-top: 8px; }
/* Questions */
.faq { margin-top: 44px; margin-bottom: 18px; }
.faq h2 { font: 600 18px/1.3 var(--serif); margin: 0 0 8px; }
.faq details { border-top: 1px solid var(--line); padding: 10px 0; max-width: 820px; }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 8px 0 2px; color: var(--ink-2); }
.foot { font-size: 13px; color: var(--muted); padding-top: 4px; padding-bottom: 40px; }
.sources-box { margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--line); }
.sources-box summary { cursor: pointer; font: 600 16px/1.3 var(--serif); }

@media screen and (max-width: 900px) {
  .top-inner { flex-wrap: wrap; height: auto; min-height: 54px; padding-top: 10px; padding-bottom: 10px; gap: 8px; }
  .privacy-pill { font-size: 12px; padding: 4px 10px; }
  .steps { grid-template-columns: 1fr; }
  .intro h1 { font-size: 22px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  table.reqs thead { display: none; }
  table.reqs tr { display: block; border-bottom: 1px solid var(--line); padding: 6px 0; }
  table.reqs td { display: block; width: auto !important; border: none; padding: 4px 8px; }
  .report { padding: 18px 14px; }
  table.courses { display: block; overflow-x: auto; }
}

@media print {
  @page { margin: 14mm; }
  body { background: #fff; font-size: 11.5px; }
  .top, .intro, .steps, .faq, .result-actions, .foot, .error, button { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .report { border: none; padding: 0; margin: 0; }
  .cards { grid-template-columns: repeat(5, 1fr); }
  tr, .message, .card { break-inside: avoid; }
  h3.section { break-after: avoid; }
  a { color: inherit; text-decoration: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
