:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --ink: #16181d;
  --ink-2: #4b5160;
  --ink-3: #7c8293;
  --line: #e3e5ea;
  --accent: #d9480f;
  --accent-ink: #ffffff;
  --accent-soft: #fff1e8;
  --chip: #f0f1f4;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
  --radius: 10px;
  font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); }
body { display: flex; flex-direction: column; font-size: 14px; }
button, input, select { font: inherit; color: inherit; }

/* Top bar */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px; background: var(--ink); color: #fff; }
.brand { display: flex; gap: 10px; align-items: center; }
.logo { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--accent); }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.brand-sub { font-size: 11px; opacity: .65; letter-spacing: .04em; text-transform: uppercase; }
.topbar-right { display: flex; gap: 10px; align-items: center; }
.badge { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .12); }
.topbar .ghost { color: #fff; border-color: rgba(255, 255, 255, .3); }
.jump { display: none; text-decoration: none; font-size: 13px; }

/* Layout */
.layout { flex: 1; display: grid; grid-template-columns: 340px 1fr 360px; gap: 12px; padding: 12px; min-height: 0; }
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: auto; }
.filters { padding: 16px; display: flex; flex-direction: column; gap: 18px; }
h2 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin: 0 0 8px; }
.hint { color: var(--ink-3); font-size: 12px; margin: 6px 0 0; line-height: 1.45; }
select, input[type=number], #keyInput { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
select:focus, input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1px solid var(--line); background: var(--chip); padding: 6px 10px; border-radius: 99px; cursor: pointer; font-size: 12.5px; }
.chips button:hover { border-color: var(--ink-3); }
.chips button[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chips button:disabled { opacity: .4; cursor: not-allowed; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--chip); border-radius: 8px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: transparent; padding: 7px 4px; border-radius: 6px; cursor: pointer; font-size: 12.5px; color: var(--ink-2); }
.seg button[aria-checked=true] { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }

.adv summary { cursor: pointer; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-bottom: 10px; }
.field { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 12px; }
.field input { margin-top: 5px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 12.5px; font-weight: 500; color: var(--ink); margin-bottom: 6px; cursor: pointer; }
.gq { padding-left: 24px; margin-bottom: 12px; }
.gq .hint { margin: 0 0 6px; }
.gq-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; }
.gq-row span { display: flex; align-items: center; gap: 4px; }
.gq-row input { width: 64px; padding: 5px 8px; }
.pop td.warn[colspan] { color: #c92a2a; font-weight: 600; text-align: left; padding-top: 4px; }
.pair { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.pair input { margin: 0; }
.source { font-size: 11px; color: var(--ink-3); line-height: 1.5; margin: auto 0 0; }

.primary { background: var(--accent); color: var(--accent-ink); border: 0; padding: 8px 14px; border-radius: 8px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.primary:hover { filter: brightness(.95); }
.ghost { background: transparent; border: 1px solid var(--line); padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font-weight: 500; }

/* Map */
.mapwrap { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-height: 420px; background: #dfe3e8; }
#map { position: absolute; inset: 0; }
.kpis { position: absolute; z-index: 500; top: 12px; left: 56px; right: 12px; display: flex; gap: 8px; flex-wrap: wrap; pointer-events: none; }
.kpi { background: rgba(255, 255, 255, .96); border-radius: 8px; padding: 8px 12px; box-shadow: var(--shadow); min-width: 120px; }
.kpi b { display: block; font-size: 18px; letter-spacing: -.02em; }
.kpi span { font-size: 11px; color: var(--ink-3); }
.map-tools { position: absolute; z-index: 500; bottom: 16px; right: 12px; background: rgba(255, 255, 255, .96); border-radius: 8px; padding: 8px 12px; box-shadow: var(--shadow); display: flex; gap: 14px; font-size: 12.5px; }
.map-tools[hidden] { display: none; }
.map-tools label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.legend { position: absolute; z-index: 500; bottom: 16px; left: 12px; background: rgba(255, 255, 255, .96); border-radius: 8px; padding: 10px 12px; box-shadow: var(--shadow); font-size: 11.5px; max-width: 260px; }
.legend .title { font-weight: 600; margin-bottom: 6px; font-size: 12px; }
.legend .row { display: flex; align-items: center; gap: 6px; margin: 2px 0; }
.legend .sw { width: 16px; height: 12px; border-radius: 2px; }
.legend .ramp { height: 10px; border-radius: 3px; width: 200px; }
.legend .ends { display: flex; justify-content: space-between; color: var(--ink-3); margin-top: 3px; }
.loading { position: absolute; inset: 0; z-index: 900; display: flex; gap: 10px; align-items: center; justify-content: center; background: rgba(244, 245, 247, .72); font-weight: 500; }
.loading[hidden] { display: none; }
.spinner { width: 20px; height: 20px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pin { background: var(--ink); color: #fff; border: 2px solid #fff; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.pin.top { background: var(--accent); }
.leaflet-popup-content { font-family: Inter, system-ui, sans-serif; font-size: 13px; margin: 12px 14px; }
.pop h3 { margin: 0 0 6px; font-size: 14px; }
.pop table { border-collapse: collapse; }
.pop td { padding: 2px 10px 2px 0; }
.pop td:last-child { text-align: right; font-weight: 600; }

/* Results */
.results { display: flex; flex-direction: column; }
.results-head { display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 10px; border-bottom: 1px solid var(--line); }
.results-head h2 { color: var(--ink); font-size: 14px; text-transform: none; letter-spacing: 0; margin: 0; }
.table-wrap { overflow: auto; flex: 1; }
table { width: 100%; border-collapse: collapse; }
th { position: sticky; top: 0; background: #fafbfc; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); padding: 8px 12px; border-bottom: 1px solid var(--line); }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--accent-soft); }
.num { text-align: right; white-space: nowrap; }
td.rank { color: var(--ink-3); width: 28px; }
.loc { font-weight: 500; }
.sub { color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.up { color: #2b8a3e; font-weight: 500; }
.down { color: #c92a2a; font-weight: 500; }
.flat { color: var(--ink-3); }
.bar { height: 4px; background: var(--chip); border-radius: 2px; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.empty { padding: 30px 16px; text-align: center; color: var(--ink-3); }

/* Saved audiences, criteria, exports */
.saved-row { display: flex; gap: 6px; }
.saved-row select { flex: 1; min-width: 0; }
.small { padding: 6px 10px; font-size: 12.5px; }
.danger { color: #c92a2a; }
.extra { display: grid; grid-template-columns: 1fr 78px 28px; gap: 6px; margin-bottom: 6px; }
.extra select { padding: 7px 8px; font-size: 12.5px; }
.extra .remove { border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; font-size: 16px; color: var(--ink-3); }
.extra .remove:hover { color: #c92a2a; border-color: #c92a2a; }
.add { width: 100%; border-style: dashed; color: var(--ink-2); font-size: 12.5px; }
.add[hidden], #extraHint[hidden] { display: none; }
.seg button:disabled { opacity: .35; cursor: not-allowed; }
#level, #rank { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); }
.ta-add { display: grid; grid-template-columns: 1fr 70px auto; gap: 6px; }
.ta-add input, .ta-add select { padding: 8px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 12.5px; min-width: 0; }
.small-link { font-size: 12px; margin-top: 6px; }
.small-link.active { color: #1c64d9; font-weight: 600; }
.ta { border: 1px solid var(--line); border-left: 3px solid #1c64d9; border-radius: 8px; padding: 9px 10px; margin-top: 8px; font-size: 12.5px; }
.ta-head { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; }
.ta-head b { font-size: 13px; }
.ta-head .remove { border: 0; background: none; color: var(--ink-3); cursor: pointer; font-size: 16px; line-height: 1; }
.ta dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 6px 0; }
.ta dt { color: var(--ink-3); }
.ta dd { margin: 0; text-align: right; font-weight: 500; }
.ta .idx { color: #1c64d9; }
.ta-actions { display: flex; gap: 12px; }
.ta-label { background: #1c64d9; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 99px; white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.map-picking { cursor: crosshair !important; }
.head-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.head-actions .primary { grid-column: 1 / -1; }
.lang { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; max-width: 280px; }
.lang b { display: block; margin-bottom: 2px; }
.lang span { color: var(--ink-2); }
.pop .irs { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; max-width: 280px; }
.pop .irs b { display: block; margin-bottom: 2px; }
.pop .irs > span, .pop .irs small { color: var(--ink-2); display: block; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field input:not([type=number]), .field select, .field textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; margin-top: 5px; font: inherit; }
.field textarea { resize: vertical; }
.export-list { display: grid; gap: 8px; margin: 6px 0 14px; }
.export-item { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 12px; cursor: pointer; display: grid; gap: 3px; }
.export-item:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.export-item:disabled { opacity: .55; cursor: not-allowed; }
.export-item span { color: var(--ink-3); font-size: 12px; line-height: 1.4; }

/* Customer list */
:root { --cust: #1c64d9; --cust-soft: #e8f0fd; }
.drop { display: grid; gap: 3px; border: 1.5px dashed #b9c6dc; border-radius: 10px; padding: 12px; cursor: pointer; background: #fafcff; }
.drop:hover, .drop.over { border-color: var(--cust); background: var(--cust-soft); }
.drop[hidden] { display: none; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop b { color: var(--cust); font-size: 13px; }
.drop span { color: var(--ink-3); font-size: 12px; line-height: 1.4; }
.cust-section .error:empty { display: none; }
.cust-info { background: var(--cust-soft); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; line-height: 1.45; }
.cust-info[hidden], .lk[hidden], .map-tools label[hidden] { display: none; }
.cust-info p { margin: 0 0 6px; }
.cust-info .muted { color: var(--ink-3); font-size: 11.5px; }
.cust-info .link { color: var(--cust); font-size: 12px; }
#custProfile h3 { font-size: 13px; margin: 14px 0 0; }
.traits { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.traits li { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 12.5px; }
.traits small { display: block; color: var(--ink-3); font-size: 11.5px; }
.traits b { background: var(--cust-soft); color: var(--cust); border-radius: 99px; padding: 2px 8px; font-size: 12px; white-space: nowrap; }
.lk { margin-top: 12px; }
.lk .field { margin-bottom: 8px; }
.lk .primary { width: 100%; background: var(--cust); }
.lk .primary[hidden] { display: none; }
.sub .cust { color: var(--cust); font-weight: 500; }
.legend .cust-key { margin-top: 8px; }
.legend .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--cust); opacity: .7; border: 1px solid #fff; }
#rank { grid-template-columns: repeat(3, 1fr); grid-auto-flow: row; }

/* Sign-in, team, AI summary */
.login-page { display: grid; place-items: center; min-height: 100%; padding: 16px; }
.login-card { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 28px; width: 100%; max-width: 380px; }
.login-card .brand { color: var(--ink); margin-bottom: 18px; }
.login-card .logo { color: #fff; }
.login-card h1 { font-size: 20px; margin: 0 0 14px; }
.login-card input { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px; margin-top: 5px; font: inherit; }
.wide { width: 100%; }
.who { font-size: 12px; opacity: .8; }
.topbar .ghost[hidden], .who[hidden] { display: none; }
dialog hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
dialog h3 { font-size: 13px; margin: 14px 0 8px; }
dialog.wide { max-width: 720px; }
.ai-out { max-height: 55vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px 16px; line-height: 1.55; }
.ai-out h3 { font-size: 14px; margin: 14px 0 4px; }
.ai-out ul { margin: 4px 0; padding-left: 18px; }
.ai-out .muted { color: var(--ink-3); padding: 14px 0; }
.team { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 10px; }
.team li { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.team li:last-child { border-bottom: 0; }
.team .tag { font-size: 11px; color: var(--accent); font-weight: 600; margin-left: 6px; }

/* Dialog */
dialog { border: 0; border-radius: 14px; padding: 0; max-width: 520px; width: calc(100% - 32px); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
dialog::backdrop { background: rgba(16, 24, 40, .5); }
dialog form { padding: 22px 24px; }
dialog h2 { font-size: 18px; color: var(--ink); text-transform: none; letter-spacing: -.01em; }
dialog ol { padding-left: 20px; line-height: 1.6; color: var(--ink-2); }
dialog a { color: var(--accent); }
.error { color: #c92a2a; font-size: 12.5px; min-height: 1em; }
.actions { display: flex; justify-content: flex-end; gap: 8px; }

/* Responsive */
@media (max-width: 1180px) {
  .layout { grid-template-columns: 300px 1fr; }
  .results { grid-column: 1 / -1; max-height: 520px; }
}
@media (max-width: 760px) {
  /* Phones: let the page scroll naturally instead of squeezing three panels into one screen. */
  html, body { height: auto; }
  .layout { display: flex; flex-direction: column; padding: 8px 16px; }
  /* Map and results first on phones; filters follow (the header's Filters link jumps there). */
  .mapwrap { order: 1; } .results { order: 2; } .filters { order: 3; scroll-margin-top: 8px; }
  .jump { display: inline-block; }
  .panel { overflow: visible; }
  .results { max-height: none; }
  .table-wrap { max-height: 70vh; }
  .kpis { left: 52px; right: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .kpis .kpi:nth-child(n+5) { display: none; }
  .legend { max-width: 46%; padding: 8px; font-size: 10.5px; }
  .legend .ramp { width: 100%; }
  .map-tools { top: auto; bottom: 16px; flex-direction: column; gap: 4px; padding: 6px 8px; }
  .head-actions { grid-template-columns: 1fr 1fr; }
  .head-actions .primary { grid-column: 1 / -1; }
  .mapwrap { min-height: 460px; }
  .kpis { left: 52px; }
  .kpi { min-width: 0; padding: 6px 9px; }
  .kpi b { font-size: 15px; }
  .badge { display: none; }
  .topbar { flex-wrap: wrap; gap: 8px; padding: 10px 16px; }
  .topbar-right { flex-wrap: wrap; }
  .kpi b { font-size: 14px; }
}
.ta .muted { color: var(--ink-3); font-size: 11.5px; }

/* Regulated ad category (housing, employment, credit) */
.reg-notice { margin-top: 8px; border: 1px solid #f5c26b; background: #fff8e6; border-radius: 8px; padding: 10px 12px; font-size: 12px; line-height: 1.45; color: var(--ink); }
.reg-notice p { margin: 6px 0 0; }
.reg-notice .reg-why { color: #8a5a00; font-weight: 500; }
.reg-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: #fff1cc; color: #8a5a00; font-size: 10.5px; font-weight: 600; }

/* Campaign results */
:root { --res: #2b8a3e; --res-soft: #ebfbee; --next: #7048e8; }
.res-section .drop b { color: var(--res); }
.res-section .drop:hover, .res-section .drop.over { border-color: var(--res); background: var(--res-soft); }
.res-section .error:empty { display: none; }
.res-info { background: var(--res-soft); }
.res-info .link { color: var(--res); }
#resSummary .field { margin-top: 12px; }
#resSummary h3 { font-size: 13px; margin: 14px 0 0; }
.res-cmp { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px; }
.res-cmp th { text-align: right; font-weight: 600; color: var(--ink-3); font-size: 11px; padding: 3px 4px; }
.res-cmp td { text-align: right; padding: 3px 4px; border-top: 1px solid var(--line); white-space: nowrap; }
.res-cmp td:first-child { text-align: left; color: var(--ink-2); white-space: normal; }
.res-lines { margin: 10px 0 0; padding-left: 16px; font-size: 12.5px; line-height: 1.45; display: grid; gap: 5px; }
.res-next { list-style: decimal; margin: 8px 0 6px; padding-left: 20px; display: grid; gap: 5px; font-size: 12.5px; }
.res-next li { cursor: pointer; }
.res-next li:hover span { color: var(--next); }
.res-next li span { display: inline-flex; flex-direction: column; width: calc(100% - 40px); vertical-align: top; }
.res-next li small { color: var(--ink-3); font-size: 11.5px; }
.res-next li b { float: right; color: var(--next); }
#resNextExport { color: var(--next); font-size: 12px; }
.sub.res { color: var(--ink-2); }
.tag.thin, .tag.next { display: inline-block; font-size: 10.5px; font-weight: 600; border-radius: 99px; padding: 0 6px; margin-left: 4px; }
.tag.thin { background: #f1f3f5; color: #5c636e; }
.tag.next { background: #f3f0ff; color: var(--next); }
.legend .res-key { margin-top: 8px; }
.legend .ring { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 2.5px solid; box-sizing: border-box; }
.legend .ring.dashed { border-style: dashed; border-width: 2px; }

/* Industry playbooks and the "Start a new client" flow */
.pb-banner { display: grid; gap: 2px; border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; }
.pb-banner span { color: var(--ink-2); font-size: 12px; line-height: 1.4; }
.pb-links { display: flex; gap: 14px; margin-top: 6px; font-size: 12px; }
.wiz-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.wiz-count { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.wiz-step[hidden], .wiz-step .field[hidden] { display: none; }
.wiz-step > .hint:first-child { margin-bottom: 12px; }
.wiz-step .grid2 { grid-template-columns: 2fr 1fr; }
.pb-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 12.5px; line-height: 1.5; background: #fafbfc; max-height: 40vh; overflow: auto; }
.pb-card dl { display: grid; grid-template-columns: 120px 1fr; gap: 4px 12px; margin: 6px 0; }
.pb-card dt { color: var(--ink-3); }
.pb-card dd { margin: 0; }
.pb-card ul { margin: 4px 0 4px; padding-left: 18px; color: var(--ink-2); }
.pb-reg { display: inline-block; padding: 1px 7px; border-radius: 4px; background: #fff1cc; color: #8a5a00; font-size: 11px; font-weight: 600; margin-left: 6px; }
.goals { display: grid; gap: 8px; margin: 10px 0 12px; }
.goals label { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; font-size: 13px; font-weight: 600; }
.goals label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.goals input { margin-top: 3px; grid-row: span 2; }
.goals span { grid-column: 2; color: var(--ink-3); font-weight: 400; font-size: 12px; line-height: 1.4; }
.next-steps { display: grid; gap: 8px; margin: 12px 0 4px; }
.wiz-done h3 { margin-top: 4px; }
.wiz-done ul { margin: 6px 0; padding-left: 18px; color: var(--ink-2); font-size: 12.5px; line-height: 1.5; }
@media (max-width: 760px) {
  .wiz-step .grid2, .pb-card dl { grid-template-columns: 1fr; }
  #wizBtn { order: -1; }
}
.error.status { color: var(--ink-3); }
.pb-list { color: var(--ink-2); font-weight: 500; }

/* AI client advisor */
.advise-row { display: flex; gap: 10px; align-items: center; margin: -4px 0 12px; flex-wrap: wrap; }
.advise-row .hint { margin: 0; flex: 1; min-width: 200px; }
.advice-card { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; padding: 10px 14px; font-size: 12.5px; line-height: 1.5; background: #fafbfc; max-height: 46vh; overflow: auto; margin-bottom: 12px; }
.advice-card[hidden] { display: none; }
.advice-card h3 { margin: 2px 0 4px; font-size: 14px; }
.advice-card h4 { margin: 10px 0 2px; font-size: 12.5px; }
.advice-card p { margin: 4px 0; }
.advice-card ul, .advice-card ol { margin: 2px 0; padding-left: 18px; }
.advice-card dl { display: grid; grid-template-columns: 120px 1fr; gap: 4px 12px; margin: 4px 0; }
.advice-card dt { color: var(--ink-3); }
.advice-card dd { margin: 0; }
.advice-card summary { cursor: pointer; font-weight: 600; }
.src { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: 10.5px; font-weight: 600; margin-left: 4px; }
.src.client { background: #e6f4ea; color: #1e6b34; }
.src.ai { background: #eef1f6; color: #4b5160; }
.sub.why { color: var(--ink-2); }
.pop p.why { margin: 0 0 6px; font-size: 12px; max-width: 280px; }
@media (max-width: 760px) { .advice-card dl { grid-template-columns: 1fr; } }

/* Feeder markets (IRS migration) */
.mig-section .field select[multiple] { padding: 4px; }
.mig-sum { margin-top: 10px; font-size: 12.5px; }
.mig-sum table { width: 100%; border-collapse: collapse; margin: 6px 0; }
.mig-sum td, .mig-sum th { padding: 3px 4px; border-bottom: 1px solid var(--line); text-align: right; font-weight: normal; }
.mig-sum td:first-child, .mig-sum th:first-child { text-align: left; }
.mig-sum th { color: var(--ink-3); font-size: 11.5px; }
.mig-sum h3 { font-size: 12.5px; margin: 10px 0 2px; }
