/* 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; } }

/* Desk-specific styles. */
.rule-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.rule-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); border-top: 4px solid var(--brand); }
.rule-title { margin: 0; color: var(--muted); font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.rule-value { margin: 6px 0; font-size: 1.6rem; font-weight: 700; font-family: var(--serif); }
.clauses { padding-left: 0; list-style: none; display: grid; gap: 8px; }
.clauses li { padding: 10px 14px; border-left: 3px solid var(--brand); background: var(--wash); border-radius: 0 8px 8px 0; }
.clause-id { font-family: var(--mono); font-weight: 700; color: var(--brand); }
.result-total { font-weight: 700; margin-top: 18px; }
@media (max-width: 800px) { .assistant-panels { grid-template-columns: 1fr !important; } }
