:root {
  --navy: #1a3d6d; --ink: #1d2733; --muted: #5c6b7a; --bg: #f7f9fb; --card: #ffffff;
  --line: #dde4ea; --accent: #0f6f4a; --warn-bg: #fff4e5;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; }
main { max-width: 1000px; margin: 0 auto; padding: 24px 20px 64px; }
a { color: var(--navy); }
.version-banner { background: var(--navy); color: #fff; font-size: 13px; text-align: center; padding: 7px 12px; }
.version-banner a { color: #cfe0ff; }
.site-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; background: var(--card); border-bottom: 1px solid var(--line); padding: 14px 24px; }
.brand { font-weight: 800; font-size: 20px; text-decoration: none; }
.brand span { color: var(--accent); font-weight: 500; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 14px; font-size: 14px; }
.site-header nav a { text-decoration: none; }
.site-header nav a:hover { text-decoration: underline; }
h1 { font-size: 30px; line-height: 1.2; }
.lead { color: var(--muted); font-size: 17px; max-width: 62ch; }
.hero { text-align: left; padding: 28px 0 8px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.btn { display: inline-block; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); text-decoration: none; color: var(--ink); cursor: pointer; font-size: 15px; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 26px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; text-decoration: none; }
.card h2 { font-size: 16px; margin: 0 0 6px; }
.card p { font-size: 14px; margin: 0; color: var(--muted); }
.card:hover { border-color: var(--navy); }
.email-capture { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-top: 10px; }
.search-form { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.search-form input[type="text"], .search-form input:not([type]), .search-form input[type="email"] { flex: 1 1 320px; }
input, select { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; background: #fff; }
.results { display: grid; gap: 12px; }
.result-card { background: var(--card); border: 1px solid var(--line); border-left-width: 5px; border-radius: 10px; padding: 14px 16px; }
.result-card .refs { font-size: 17px; font-weight: 600; }
.result-card .arrow { color: var(--muted); }
.result-card .new { color: var(--accent); }
.result-card .new.none { color: #b3261e; }
.diff { margin: 8px 0 4px; }
.dropped-note { background: #fdecea; border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 20px; background: #e8f0fe; color: var(--navy); }
.badge-dropped { background: #fdecea; color: #b3261e; }
.badge-split { background: #fde9d9; color: #8a4a00; }
.badge-amended { background: #fef7e0; color: #7a6000; }
.badge-merged, .badge-moved { background: #e8f0fe; color: var(--navy); }
.badge-unchanged, .badge-new { background: #e6f4ea; color: var(--accent); }
.status-dropped { border-left-color: #b3261e; } .status-split { border-left-color: #e8710a; }
.status-amended { border-left-color: #f2c211; } .status-merged, .status-moved { border-left-color: var(--navy); }
.status-unchanged, .status-new { border-left-color: var(--accent); }
.quota-chip { font-size: 13px; color: var(--muted); }
.notice { background: var(--card); border: 1px dashed var(--line); padding: 14px; border-radius: 10px; margin-top: 16px; }
.notice.warn { background: var(--warn-bg); border-style: solid; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 32px; }
.byline, .meta { color: var(--muted); font-size: 13px; }
.tag.draft { background: var(--warn-bg); padding: 2px 8px; border-radius: 12px; }
.toc a { text-decoration: none; }
.summary-box { background: #eef4fb; border-radius: 10px; padding: 14px 16px; }
.mistake-callout { background: #fdecea; border-radius: 10px; padding: 12px 16px; margin: 22px 0; }
.checklist ul { list-style: none; padding-left: 0; }
.chips .chip { display: inline-block; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 3px 12px; text-decoration: none; font-size: 13px; margin-right: 6px; }
.cta-box { background: var(--card); border: 1px solid var(--navy); border-radius: 10px; padding: 14px 16px; }
.timeline { list-style: none; padding-left: 18px; border-left: 3px solid var(--line); }
.timeline li { margin: 0 0 22px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -26px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--navy); }
.timeline li.event-low::before { background: #b3261e; }
.timeline time { font-weight: 700; font-size: 13px; color: var(--muted); margin-right: 8px; }
.timeline h2 { font-size: 17px; margin: 6px 0 4px; }
.timeline .impact { font-size: 14px; }
.assistant-form label { display: block; margin: 12px 0 16px; font-weight: 600; font-size: 14px; }
.assistant-form input, .assistant-form select { width: 100%; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.assistant-result { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin-top: 24px; }
.transition-box { background: var(--warn-bg); border-radius: 8px; padding: 10px 12px; font-size: 14px; margin: 14px 0; }
.partner-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.partner-view { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin-top: 20px; }
.site-footer { border-top: 1px solid var(--line); padding: 22px 24px 40px; max-width: 1000px; margin: 0 auto; }
.disclaimer { font-size: 13px; color: var(--muted); }
.subscribe-inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 26px; }
.consent { font-size: 13px; display: inline-flex; gap: 6px; align-items: center; font-weight: 400; }
.guidance-index li { margin-bottom: 12px; }
.cookie-note { position: fixed; bottom: 14px; left: 14px; right: 14px; max-width: 560px; margin: auto; background: var(--ink); color: #fff; padding: 12px 14px; border-radius: 10px; font-size: 14px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.cookie-note button { background: #fff; border: 0; border-radius: 6px; padding: 6px 12px; cursor: pointer; }

/* Counselor chat */
.chat-box { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-top: 18px; max-width: 760px; }
.chat-messages { display: flex; flex-direction: column; gap: 10px; max-height: 480px; overflow-y: auto; padding: 4px 2px 12px; }
.chat-bubble { max-width: 85%; border-radius: 10px; padding: 10px 14px; font-size: 15px; }
.chat-bubble .chat-body { white-space: pre-line; }
.chat-bubble.user { align-self: flex-end; background: var(--navy); color: #fff; }
.chat-bubble.assistant { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); }
.chat-citations { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.chat-citation { font-size: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 2px 10px; text-decoration: none; }
.chat-citation:hover { border-color: var(--navy); }
.chat-refusal { align-self: flex-start; background: var(--warn-bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; font-size: 15px; }
.chat-cta { margin: 4px 0 0; }
.chat-loading { color: var(--muted); font-size: 14px; padding: 6px 2px; }
.chat-form { display: flex; gap: 10px; align-items: flex-end; border-top: 1px solid var(--line); padding-top: 12px; }
.chat-form textarea { flex: 1; resize: vertical; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; font-family: inherit; background: #fff; }
.nav-logout-btn { margin-left: 8px; padding: 6px 12px; font-size: 14px; }
