/* CreditBridge design system: shared by the planner and every desk. */
:root {
  --ink: #14181f; --ink-2: #3d4654; --muted: #5b6472; --line: #dfe3ea; --paper: #ffffff; --wash: #f5f6f8;
  --brand: #1d4ed8; --brand-2: #0f766e;
  --ok: #166534; --ok-bg: #e8f5ec; --warn: #8a4b00; --warn-bg: #fdf3e2; --bad: #9f1d1d; --bad-bg: #fbeaea; --info: #1e40af; --info-bg: #e8eefc;
  --radius: 12px; --shadow: 0 1px 2px rgba(20,24,31,.06), 0 4px 16px rgba(20,24,31,.06);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.55; font-size: 16px; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-family: var(--serif); font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; margin: .2em 0 .3em; }
h2 { font-size: 1.35rem; margin: 0 0 .6em; }
a { color: var(--brand); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; }
code, .mono { font-family: var(--mono); font-size: .9em; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.demo-banner { background: #111827; color: #f9fafb; font-size: .82rem; text-align: center; padding: 6px 12px; }
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 5; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.crest { width: 32px; height: 32px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; font-family: var(--serif); }
.site-header nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-header nav a { color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.site-header nav a:hover { color: var(--brand); }
.hero { padding: 48px 0 24px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--brand-2); margin: 0; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 68ch; }
main > section { margin-block: 40px; }
.panel { background: var(--wash); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.btn { appearance: none; border: 0; border-radius: 10px; background: var(--brand); color: #fff; font: inherit; font-weight: 600; padding: 11px 18px; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--brand); border: 1px solid currentColor; }
label { display: block; font-weight: 600; margin: 12px 0 6px; }
textarea, input[type=text] { width: 100%; font: inherit; font-family: var(--mono); font-size: .92rem; padding: 10px 12px; border: 1px solid #b9c0cc; border-radius: 10px; background: #fff; color: var(--ink); }
form .btn { margin-top: 12px; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--wash); }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.tag { font-weight: 600; }
.tag-direct { color: var(--ok); } .tag-elective { color: var(--info); } .tag-not_recognised, .tag-none { color: var(--bad); } .tag-uncertain { color: var(--warn); }
.error { color: var(--bad); background: var(--bad-bg); padding: 10px 12px; border-radius: 10px; }
.site-footer { border-top: 1px solid var(--line); background: var(--wash); padding: 28px 0; margin-top: 56px; font-size: .92rem; }
@media (max-width: 640px) { .wrap { width: calc(100% - 28px); } .hero { padding-top: 28px; } .site-header { position: static; } }

/* Planner-specific styles. */
.step { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.step-num { margin: 0; color: var(--brand); font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.file-btn { display: inline-flex; align-items: center; margin: 0; font-weight: 600; }
.btn-lg { font-size: 1.05rem; padding: 14px 22px; margin-top: 16px; }
.empty { padding: 12px 0; }
.transcript { margin-top: 16px; }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); }
.desk-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.desk-card { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; cursor: pointer; border-top: 4px solid var(--desk, var(--brand)); margin: 0; font-weight: 400; }
.desk-card:has(input:checked) { background: var(--wash); box-shadow: inset 0 0 0 2px var(--desk); }
.desk-card input { margin-right: 8px; }
.desk-card .name { font-weight: 700; }
.desk-card .host { font-family: var(--mono); font-size: .8rem; color: var(--muted); display: block; margin-top: 6px; overflow-wrap: anywhere; }
.share-preview { white-space: pre-wrap; overflow-wrap: anywhere; background: #0f172a; color: #e2e8f0; padding: 14px 16px; border-radius: 10px; font-size: .88rem; }
.status-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.status-list li { display: flex; gap: 10px; align-items: baseline; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: #9ca3af; flex: none; }
.dot.asking { background: #f59e0b; } .dot.done { background: var(--ok); } .dot.declined { background: #6b7280; } .dot.error { background: var(--bad); }
.summary-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 16px 0; }
.summary-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; border-top: 4px solid var(--desk); }
.summary-card .big { font-family: var(--serif); font-size: 2.2rem; font-weight: 700; margin: 0; }
.verify { font-size: .85rem; font-weight: 600; margin: 8px 0 0; }
.verify.verified { color: var(--ok); } .verify.mismatch { color: var(--bad); } .verify.unverified { color: var(--muted); }
.matrix td.cell { font-weight: 600; }
.cell.direct { color: var(--ok); background: var(--ok-bg); } .cell.elective { color: var(--info); background: var(--info-bg); }
.cell.not_recognised { color: var(--bad); background: var(--bad-bg); } .cell.uncertain { color: var(--warn); background: var(--warn-bg); }
.cell .clause { display: block; font-family: var(--mono); font-weight: 400; font-size: .75rem; opacity: .85; }
tr.disagree th[scope=row] { box-shadow: inset 4px 0 0 #f59e0b; }
.disagreements { display: grid; gap: 10px; }
.disagreements details { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.how { display: grid; gap: 10px; }
@media (max-width: 800px) { .assistant-panels { grid-template-columns: 1fr !important; } }

.pathways { padding-left: 1.4rem; display: grid; gap: .4rem; }
.pathways li.best strong::after { content: " · most credit"; color: var(--ok, #15803d); font-weight: 600; font-size: .85em; }
.link-btn { background: none; border: 0; padding: .4rem 0; color: var(--primary, #1d4ed8); text-decoration: underline; cursor: pointer; font: inherit; }
.cell-btn { all: unset; cursor: pointer; display: block; width: 100%; border-radius: 4px; }
.cell-btn:focus-visible { outline: 2px solid var(--primary, #1d4ed8); outline-offset: 2px; }
.cell-btn:hover { text-decoration: underline; }
#evidence { max-width: min(560px, 92vw); border: 1px solid #d4d4d8; border-radius: 12px; padding: 1.2rem 1.4rem; }
#evidence::backdrop { background: rgb(15 23 42 / .45); }
#evidence .dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
#evidence blockquote { margin: .6rem 0; padding: .6rem .8rem; border-left: 3px solid var(--primary, #1d4ed8); background: #f8fafc; }
#evidence .pill { display: inline-block; padding: .15rem .6rem; border-radius: 999px; }
.small { font-size: .85rem; }
