:root {
  --ink: #13233f;
  --ink-2: #33415c;
  --muted: #5d6a80;
  --line: #dfe3ea;
  --line-2: #eceff4;
  --paper: #f6f4ef;
  --card: #ffffff;
  --brand: #13233f;
  --brand-2: #1f3a68;
  --accent: #b4521b;
  --accent-soft: #fbeee4;
  --ok: #1d6b47;
  --ok-soft: #e4f3ea;
  --warn: #8a5a00;
  --warn-soft: #fdf3dc;
  --danger: #a6262c;
  --danger-soft: #fbe7e7;
  --info-soft: #e8eef9;
  --focus: #2f6fde;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(19, 35, 63, .06), 0 2px 8px rgba(19, 35, 63, .05);
  --shadow-lg: 0 10px 40px rgba(19, 35, 63, .18);
  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-2); text-underline-offset: 2px; }
a:hover { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
code { font-size: .9em; background: rgba(19, 35, 63, .07); padding: 1px 5px; border-radius: 4px; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- top bar ---------- */
.topbar { background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 20; }
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.brand:hover { color: #fff; }
.brand-mark { width: 30px; height: 30px; }
.brand-mark rect { fill: #f2b48a; }
.brand-mark path { stroke: var(--brand); fill: none; }
.brand-mark circle { fill: var(--brand); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { color: rgba(255, 255, 255, .78); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav a.active { color: #fff; background: rgba(255, 255, 255, .14); }
.nav-badge { background: var(--accent); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; font-weight: 700; }
.who { font-size: 13px; color: rgba(255, 255, 255, .7); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- setup banner ---------- */
.setup { background: var(--warn-soft); border-bottom: 1px solid #f1dfb3; color: #4d3800; font-size: 14px; }
.setup-inner { display: flex; gap: 12px; align-items: flex-start; padding-top: 12px; padding-bottom: 12px; }
.setup-icon { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--warn); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 13px; font-style: italic; margin-top: 1px; }
.setup-text { flex: 1; }
.setup-steps summary { cursor: pointer; font-weight: 600; margin-top: 4px; color: var(--warn); }
.setup-steps ol { margin: 6px 0 2px; padding-left: 20px; }
.icon-btn { background: none; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: inherit; padding: 0 4px; opacity: .6; }
.icon-btn:hover { opacity: 1; }

/* ---------- hero ---------- */
.hero { padding: 44px 0 28px; }
.eyebrow { text-transform: uppercase; letter-spacing: .09em; font-size: 12px; font-weight: 700; color: var(--accent); margin: 0 0 10px; }
.hero h1 { font-size: clamp(28px, 4.2vw, 44px); font-weight: 800; max-width: 760px; }
.lede { font-size: 17px; color: var(--ink-2); max-width: 680px; margin: 14px 0 0; }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 28px; align-items: start; padding-bottom: 56px; }
.profile { position: sticky; top: 76px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.panel-head h2 { font-size: 17px; }

.profile-summary { display: none; width: 100%; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; align-items: center; gap: 10px; }
.profile-summary .ps-label { font-weight: 800; font-size: 14px; flex: none; }
.profile-summary .ps-text { flex: 1; min-width: 0; color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-summary .ps-edit { font-weight: 700; color: var(--brand-2); font-size: 14px; text-decoration: underline; text-underline-offset: 2px; }
.panel.collapsed { padding: 14px 16px; }
.panel.collapsed .profile-summary { display: flex; }
.panel.collapsed .profile-fields { display: none; }

/* ---------- form ---------- */
.field { margin: 0 0 18px; border: 0; padding: 0; position: relative; min-width: 0; }
.field > label, .field > legend { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; padding: 0; }
.hint { font-weight: 400; color: var(--muted); font-size: 12.5px; }
input[type=text], input[type=email], select {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: #fff;
  border: 1px solid #c9d0db; border-radius: var(--radius-sm); padding: 9px 11px; min-height: 42px;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
input:focus, select:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(47, 111, 222, .18); }

.chip-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border: 1px solid #c9d0db; border-radius: var(--radius-sm); padding: 5px; background: #fff; min-height: 42px; cursor: text; }
.chip-input:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(47, 111, 222, .18); }
.chip-input input { border: 0; box-shadow: none !important; flex: 1 1 140px; min-width: 120px; padding: 4px 6px; min-height: 30px; }
.chips { display: contents; list-style: none; margin: 0; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--info-soft); color: var(--brand-2); border-radius: 6px; padding: 3px 4px 3px 8px; font-size: 13px; font-weight: 600; max-width: 100%; }
.chip small { font-weight: 400; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.chip button { border: 0; background: none; cursor: pointer; padding: 0 4px; font-size: 16px; line-height: 1; color: var(--muted); border-radius: 4px; }
.chip button:hover { color: var(--danger); background: rgba(0, 0, 0, .05); }

.menu { position: absolute; left: 0; right: 0; z-index: 10; list-style: none; margin: 4px 0 0; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); max-height: 280px; overflow: auto; }
.menu li { padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; display: flex; gap: 10px; }
.menu li b { font-variant-numeric: tabular-nums; flex: none; }
.menu li[aria-selected=true], .menu li:hover { background: var(--info-soft); }
.menu .menu-empty { color: var(--muted); cursor: default; }

.suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.suggest button { border: 1px dashed #b9c2d0; background: transparent; border-radius: 99px; padding: 3px 10px; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.suggest button:hover { border-style: solid; border-color: var(--brand-2); color: var(--brand-2); }

.toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.toggle { position: relative; }
.toggle input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.toggle span { display: inline-block; border: 1px solid #c9d0db; border-radius: 99px; padding: 6px 12px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); background: #fff; transition: all .12s; user-select: none; }
.toggle input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.toggle input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.toggle:hover span { border-color: var(--ink); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: -4px 0 18px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.stage { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.stage .check { margin: 0; font-size: 13.5px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 15px; border-radius: var(--radius-sm); padding: 10px 16px; border: 1px solid transparent; cursor: pointer; text-decoration: none; min-height: 42px; transition: background .12s, transform .05s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--brand-2); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #9a4415; color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: #fff; border-color: #c9d0db; color: var(--ink); }
.btn-small { font-size: 13.5px; padding: 6px 11px; min-height: 34px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: progress; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand-2); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; font-size: inherit; }
.link-btn:hover { color: var(--accent); }

/* ---------- results ---------- */
.results-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.results-head h2 { font-size: 22px; font-weight: 800; }
.results-sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.results-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; background: #e9ecf1; border-radius: 9px; padding: 3px; }
.seg button { border: 0; background: none; padding: 6px 11px; border-radius: 7px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.seg button[aria-checked=true] { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

.notice { border-radius: var(--radius-sm); padding: 11px 14px; font-size: 14px; margin-bottom: 12px; background: var(--warn-soft); color: #4d3800; border: 1px solid #f1dfb3; }
.notice.info { background: var(--info-soft); color: var(--brand-2); border-color: #cfdcf3; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; border-radius: 99px; padding: 3px 9px; background: var(--line-2); color: var(--ink-2); letter-spacing: .01em; white-space: nowrap; }
.pill.type-o, .pill.type-k { background: #e4ecfa; color: #1f4b99; }
.pill.type-p { background: #efe8fb; color: #5b3a99; }
.pill.type-r { background: #e3f3f3; color: #1e6464; }
.pill.setaside { background: var(--ok-soft); color: var(--ok); }
.pill.setaside.mine::before { content: "✓"; }
.pill.open { background: var(--line-2); color: var(--muted); }
.deadline { margin-left: auto; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.deadline.urgent { background: var(--danger-soft); color: var(--danger); }
.deadline.soon { background: var(--accent-soft); color: var(--accent); }
.deadline.none { color: var(--muted); font-weight: 600; }
.card h3 { font-size: 18px; font-weight: 700; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent); text-decoration: underline; }
.meta { font-size: 13.5px; color: var(--muted); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.meta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: none; }
.summary { margin-top: 12px; padding: 12px 14px; background: #f8f9fb; border-left: 3px solid var(--ink); border-radius: 0 8px 8px 0; }
.summary .headline { font-weight: 600; margin: 0; }
.summary .gist { margin: 6px 0 0; color: var(--ink-2); font-size: 14.5px; }
.summary .means { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.facts { list-style: none; margin: 10px 0 0; padding: 0; font-size: 14px; display: grid; gap: 4px; }
.facts li { padding-left: 20px; position: relative; }
.facts li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.signals { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.signals span { font-size: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; color: var(--ink-2); }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.card-actions .spacer { flex: 1; }

.drawer { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 12px; }
.drawer h4 { margin: 0 0 6px; font-size: 14px; }
.drawer .scope { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.bars { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; font-size: 13.5px; }
.bars .bar { grid-column: 1 / -1; height: 6px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.bars .bar i { display: block; height: 100%; background: var(--brand-2); border-radius: 4px; }
.bars a { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars b { font-variant-numeric: tabular-nums; }
.awards { list-style: none; margin: 0; padding: 0; font-size: 13.5px; display: grid; gap: 8px; }
.awards li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; }
.awards .desc { color: var(--muted); grid-column: 1 / -1; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fulltext { white-space: pre-wrap; font-size: 14px; color: var(--ink-2); max-height: 420px; overflow: auto; background: #fafbfc; border: 1px solid var(--line-2); border-radius: 8px; padding: 12px; }
.contacts { font-size: 13.5px; margin: 10px 0 0; padding: 0; list-style: none; }
.contacts li { margin-bottom: 4px; }

.empty { text-align: center; padding: 40px 24px; background: var(--card); border: 1px dashed #c9d0db; border-radius: var(--radius); color: var(--ink-2); }
.empty h3 { font-size: 18px; margin-bottom: 6px; }
.empty.intro { text-align: left; border-style: solid; box-shadow: var(--shadow); }
.intro-steps { display: grid; gap: 18px; }
.intro-steps > div { display: flex; gap: 14px; align-items: flex-start; }
.intro-steps span { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; display: grid; place-items: center; }
.intro-steps p { margin: 3px 0 0; }
.intro-try { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--line-2); font-size: 14.5px; }

.skeleton { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 14px; }
.skeleton i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #eef1f5 25%, #f7f8fa 50%, #eef1f5 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; margin-bottom: 10px; }
.skeleton i:nth-child(1) { width: 30%; }
.skeleton i:nth-child(2) { width: 80%; height: 18px; }
.skeleton i:nth-child(3) { width: 55%; }
.skeleton i:nth-child(4) { width: 95%; height: 48px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* awards fallback table */
.award-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; }
.award-row .amt { font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- alerts page ---------- */
.page-head { padding: 40px 0 24px; }
.page-head h1 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; }
.page-head.center .lede { margin-left: auto; margin-right: auto; }
.signin { max-width: 460px; }
.signin form { display: flex; gap: 8px; margin-top: 12px; }
.signin form input { flex: 1; }
.plan-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.plan-bar .plan-name { font-weight: 800; }
.saved { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 12px; }
.saved li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.saved .row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.saved h3 { font-size: 17px; }
.saved .crit { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.saved .when { font-size: 13px; color: var(--muted); margin-top: 8px; }
.saved .btns { display: flex; gap: 6px; flex-wrap: wrap; }
.section-title { font-size: 18px; font-weight: 800; margin: 0 0 12px; }
.alert-list { list-style: none; padding: 0; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.alert-list li { padding: 12px 16px; border-bottom: 1px solid var(--line-2); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; font-size: 14px; }
.alert-list li:last-child { border-bottom: 0; }
.alert-list a { font-weight: 600; color: var(--ink); }
.alert-list .sub { color: var(--muted); font-size: 12.5px; grid-column: 1 / -1; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 8px 0 20px; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; display: flex; flex-direction: column; box-shadow: var(--shadow); position: relative; }
.plan.featured { border: 2px solid var(--ink); }
.plan .tag { position: absolute; top: -11px; left: 20px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; padding: 3px 9px; border-radius: 99px; }
.plan h3 { font-size: 18px; }
.plan .price { font-size: 36px; font-weight: 800; margin: 10px 0 2px; letter-spacing: -.02em; }
.plan .price small { font-size: 15px; font-weight: 500; color: var(--muted); }
.plan ul { padding: 0; list-style: none; margin: 14px 0 20px; font-size: 14px; display: grid; gap: 8px; flex: 1; }
.plan li { padding-left: 22px; position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.plan .current { text-align: center; font-weight: 700; color: var(--ok); padding: 10px; }
.fine { font-size: 13px; color: var(--muted); }

/* ---------- dialogs, toast, footer ---------- */
.dialog { border: 0; border-radius: 16px; padding: 0; width: min(460px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); color: var(--ink); }
.dialog::backdrop { background: rgba(19, 35, 63, .45); }
.dialog-body { padding: 24px; }
.dialog-body h2 { font-size: 20px; margin-bottom: 6px; }
.dialog-body > p { margin: 0 0 16px; font-size: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.form-error { color: var(--danger); font-size: 14px; margin: 0 0 10px; }
.stub-card { display: flex; justify-content: space-between; gap: 10px; background: #f3f5f8; border: 1px dashed #c9d0db; border-radius: 8px; padding: 10px 12px; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.stub-dots { font-variant-numeric: tabular-nums; letter-spacing: .05em; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); z-index: 50; max-width: calc(100vw - 32px); }
.footer { border-top: 1px solid var(--line); padding: 24px 0 40px; font-size: 13px; color: var(--muted); }
.footer-inner { display: grid; gap: 4px; }
.footer p { margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .plans { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 20px; }
  .profile { position: static; }
  .hero { padding: 28px 0 18px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .topbar-inner { gap: 10px; height: 56px; }
  .brand span { font-size: 16px; }
  .nav a { padding: 7px 9px; font-size: 14px; }
  .who { display: none; }
  .lede { font-size: 16px; }
  .card { padding: 16px; }
  .card h3 { font-size: 17px; }
  .deadline { margin-left: 0; }
  .results-actions { width: 100%; }
  .seg { width: 100%; }
  .seg button { flex: 1; padding: 7px 4px; }
  #saveSearchBtn { width: 100%; }
  .card-actions .btn { flex: 1 1 auto; }
  .card-actions .spacer { display: none; }
  .plans { grid-template-columns: 1fr; }
  .signin form { flex-direction: column; }
  .stage { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .brand span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- AI brief ---------- */
.pill.ai { background: var(--info-soft); color: var(--brand-2); }
.pill.ai.warn { background: var(--warn-soft); color: var(--warn); }
.ai-label { font-size: 12.5px; color: var(--muted); background: var(--info-soft); border-radius: var(--radius-sm); padding: 6px 10px; margin: 0 0 10px; }
.ai-summary { margin: 0 0 10px; }
.fit { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; margin-bottom: 12px; }
.fit-label { margin: 0 0 6px; }
.fit-label.gate { font-weight: 700; color: var(--warn); }
.factors { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.factors li { padding: 2px 0; }
.factors li.r-match b { color: var(--ok); }
.factors li.r-mismatch b { color: var(--danger); }
.factors li.r-unknown b, .factors li.r-partial b { color: var(--warn); }
.small { font-size: 12px; }
dl.brief { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 8px 0 12px; font-size: 14px; }
dl.brief dt { font-weight: 700; color: var(--ink-2); }
dl.brief dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.src { font-size: 12px; color: var(--muted); }
details.src { display: inline-block; }
details.src summary { cursor: pointer; text-decoration: underline dotted; }
details.src q { display: block; font-style: italic; margin-top: 2px; }
.flags { list-style: none; padding: 0; margin: 0 0 10px; font-size: 14px; }
.flags li.warn b { color: var(--warn); }
.reqs { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.ai-notes { font-size: 12.5px; padding-left: 18px; margin: 0 0 10px; }
.inline-quote { display: block; font-size: 12px; font-style: italic; color: var(--muted); margin-top: 2px; }
.fit-basis { margin: 6px 0 0; font-weight: 500; }
.report summary { cursor: pointer; font-size: 13px; color: var(--brand-2); }
.report-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-top: 6px; font-size: 13px; }
.report-form label { display: flex; flex-direction: column; gap: 3px; }
@media (max-width: 600px) { dl.brief { grid-template-columns: 1fr; } }
