/* Heikal: Your Public Policy Analyst. Palette and type follow Serag's 24 November decision (Ufuq look, Montserrat). */
:root {
  --wine: #80143b;        /* headings, links, primary */
  --plum: #451229;        /* dark panels */
  --plum-deep: #30101e;   /* header */
  --gold: #de9426;        /* main buttons, accents */
  --gold-light: #f3bf75;
  --paper: #fdfbf8;       /* page background */
  --tint: #f5efea;        /* panels */
  --ink: #272126;         /* body text */
  --muted: #635b60;
  --line: #ded5d1;
  --soft: #ead9e0;
  --white: #ffffff;
  --wine-tint: rgba(128, 20, 59, 0.08);
  --gold-tint: rgba(222, 148, 38, 0.18);
  --radius: 12px;
  --font: "Montserrat", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-weight: 400; font-size: 16px; line-height: 26px;
}
.page { min-height: calc(100vh - 80px); display: flex; flex-direction: column; }
main { flex: 1; padding: 40px 0 72px; outline: none; }
main.has-sticky { padding-bottom: 136px; }
img { max-width: 100%; }
a { color: var(--wine); text-decoration: underline; text-underline-offset: 3px; }
strong, b { font-weight: 600; }
:focus-visible { outline: 3px solid var(--wine); outline-offset: 2px; border-radius: 4px; }
.topbar :focus-visible, dialog.dark :focus-visible { outline-color: var(--gold-light); }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--ink); padding: 8px 16px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
[hidden] { display: none !important; }

h1, h2, h3, h4, h5 { font-family: var(--font); font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; margin: 0; color: var(--wine); }
h1 { font-size: 38px; }
h2 { font-size: 27px; }
h3 { font-size: 21px; }
h4 { font-size: 18px; }
h5 { font-size: 17px; }
p { margin: 0 0 16px; }
.kicker { font-family: var(--font); font-weight: 600; font-size: 12px; line-height: 16px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--wine); margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; line-height: 21px; }

.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.read { max-width: 680px; }
.center { text-align: center; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }

/* header and footer */
.topbar { background: var(--plum-deep); border-bottom: 4px solid var(--gold); }
.topbar-in { max-width: 1100px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
@media (min-width: 640px) { .topbar-in { padding: 14px 24px; } }
.brand { display: inline-flex; flex-direction: column; text-decoration: none; color: var(--white); line-height: 1; }
.brand .wordmark { font-family: var(--font); font-weight: 700; font-size: 28px; letter-spacing: 0.01em; color: var(--white); line-height: 32px; }
.brand .tagline { font-family: var(--font); font-weight: 500; font-size: 11px; line-height: 14px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-light); margin-top: 2px; }
.pill-link { color: var(--gold-light); border: 1.5px solid var(--gold-light); border-radius: 999px; padding: 8px 20px; text-decoration: none; white-space: nowrap; font-weight: 500; }
.pill-link:hover { background: rgba(243, 191, 117, 0.14); }
.who { display: flex; align-items: center; gap: 16px; margin-left: auto; color: var(--paper); font-size: 14px; white-space: nowrap; }
.who a { color: var(--gold-light); }
@media (max-width: 600px) {
  .topbar-in { flex-wrap: wrap; row-gap: 8px; }
  .who { order: 3; width: 100%; margin-left: 0; justify-content: flex-end; }
}
.foot { border-top: 1px solid var(--line); padding: 24px 0; font-size: 14px; color: var(--muted); background: var(--tint); }
.foot-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--wine); }

/* motifs */
.signal-bar { display: flex; gap: 4px; margin: 16px 0 24px; }
.center .signal-bar { justify-content: center; }
.signal-bar i { display: block; width: 32px; height: 5px; border-radius: 2px; }
.signal-bar i:nth-child(1) { background: var(--wine); }
.signal-bar i:nth-child(2) { background: var(--gold); }
.signal-bar i:nth-child(3) { background: var(--gold-light); }
.sq { display: inline-block; width: 10px; height: 10px; background: var(--wine); flex: none; }
.sqlist { list-style: none; margin: 0 0 16px; padding: 0; }
.sqlist li { position: relative; padding-left: 24px; margin-bottom: 8px; }
.sqlist li::before { content: ""; position: absolute; left: 0; top: 8px; width: 10px; height: 10px; background: var(--wine); }
.sqlist li:nth-child(3n+2)::before { background: var(--gold); }
.sqlist li:nth-child(3n)::before { background: var(--gold-light); }

/* cards, buttons, forms */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card + .card { margin-top: 24px; }
.stack > * + * { margin-top: 24px; }
.btn { font: inherit; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 8px 24px; border-radius: 999px; border: 1.5px solid var(--wine); background: transparent; color: var(--wine); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--wine-tint); }
.btn-primary { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn-primary:hover { background: var(--gold); box-shadow: inset 0 0 0 1.5px var(--plum-deep); border-color: var(--plum-deep); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-big { min-height: 56px; padding: 8px 40px; font-size: 17px; }
.btn-small { min-height: 36px; padding: 4px 16px; font-size: 14px; }
.btn-text { font: inherit; background: none; border: 0; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--wine); }
.btn-text.quiet { color: var(--muted); }
label, .label { display: block; font-weight: 600; margin-bottom: 8px; }
.hint { color: var(--muted); font-size: 14px; line-height: 21px; margin: 0 0 8px; }
input[type=text], input[type=url], input[type=date], textarea, select {
  font: inherit; color: var(--ink); background: var(--white); width: 100%;
  border: 1.5px solid var(--line); border-radius: 8px; padding: 12px 16px; min-height: 48px;
}
input[type=color] { width: 56px; height: 48px; padding: 4px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--white); }
textarea { resize: vertical; }
input:hover, textarea:hover, select:hover { border-color: var(--muted); }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--wine); outline-offset: 1px; }
.field { margin-bottom: 24px; }
.field-error { color: var(--ink); background: var(--wine-tint); border-left: 4px solid var(--wine); padding: 8px 16px; margin-top: 8px; font-size: 14px; border-radius: 4px; }
.row2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 560px) { .row2 { grid-template-columns: 1fr 1fr; } }
.inline-add { display: flex; gap: 8px; }
.inline-add input { flex: 1; min-width: 0; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 12px 0 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--tint); border: 1px solid var(--line); border-radius: 999px; padding: 4px 4px 4px 16px; max-width: 100%; }
.chip span { overflow-wrap: anywhere; }
.chip button { font: inherit; border: 0; background: transparent; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; line-height: 1; font-size: 18px; color: var(--ink); }
.chip button:hover { background: var(--line); }
.chip.plain { padding: 4px 16px; }

.notice { background: var(--white); border: 1px solid var(--line); border-left: 6px solid var(--gold); border-radius: var(--radius); padding: 16px 24px; margin: 16px 0; }
.notice.error { border-left-color: var(--wine); }
.notice p { margin: 0 0 8px; }
.notice .btn { margin-top: 8px; }
.waiting { text-align: center; padding: 56px 24px; }
.waiting .dots { margin: 0 auto 24px; }
.dots { display: flex; gap: 8px; justify-content: center; }
.dots i { width: 12px; height: 12px; background: var(--wine); animation: pulse 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { background: var(--gold); animation-delay: 0.2s; }
.dots i:nth-child(3) { background: var(--gold-light); animation-delay: 0.4s; }
@keyframes pulse { 0%, 80%, 100% { opacity: 0.25; transform: scale(0.85); } 40% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .dots i { animation: none; } * { scroll-behavior: auto !important; transition: none !important; } }

.tag { display: inline-block; font-family: var(--font); font-weight: 600; font-size: 11px; line-height: 14px; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 8px; border-radius: 4px; border: 1px solid var(--ink); background: var(--white); color: var(--ink); vertical-align: middle; white-space: nowrap; }
.tag.gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.tag.soft { background: var(--soft); border-color: var(--soft); color: var(--plum); }
.tag.wine { background: var(--wine); border-color: var(--wine); color: var(--white); }
.tag.plum { background: var(--plum); border-color: var(--plum); color: var(--white); }
.tag.quiet { border-color: var(--line); background: transparent; color: var(--muted); }
button.tag { cursor: pointer; font-family: var(--font); }
.status-chip { display: inline-block; font-size: 13px; line-height: 18px; padding: 2px 12px; border-radius: 999px; border: 1px solid var(--ink); background: var(--white); }

/* ask */
.ask { max-width: 680px; margin: 0 auto; }
.ask h1 { font-size: 42px; }
.ask-lead { color: var(--muted); }
.ask-form { text-align: left; margin-top: 32px; }
.ask-form textarea#prompt { min-height: 160px; font-size: 17px; line-height: 27px; }
.ask-actions { text-align: center; margin-top: 8px; }
.recent { margin-top: 56px; }
.recent h2 { font-size: 20px; }
.recent ul { list-style: none; margin: 16px 0 0; padding: 0; }
.recent li + li { margin-top: 16px; }
.recent { text-align: left; }
.prun-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; padding-left: 8px; }
.examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 24px; text-align: left; }
.examples .hint { margin: 0; }
.recent a.rrow { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; text-decoration: none; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 24px; color: var(--ink); }
.recent a.rrow:hover { border-color: var(--wine); }
.rrow .rt { font-weight: 600; color: var(--wine); text-decoration: underline; text-underline-offset: 3px; }
.rrow .rm { color: var(--muted); font-size: 14px; grid-column: 1 / 2; }
.rrow .tag { grid-row: 1 / 3; grid-column: 2; align-self: center; }

/* plan */
.plan-grid { display: grid; gap: 24px; }
.plan-head { margin-bottom: 8px; }
.understanding { font-size: 18px; line-height: 28px; }
.cols2 { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .cols2 { grid-template-columns: 1fr 1fr; } }
.plan-sections { list-style: none; padding: 0; margin: 0; }
.plan-sections li { padding: 12px 0 12px 24px; border-top: 1px solid var(--line); position: relative; }
.plan-sections li:first-child { border-top: 0; }
.plan-sections li::before { content: ""; position: absolute; left: 0; top: 20px; width: 10px; height: 10px; background: var(--gold-light); }
.plan-sections li:nth-child(3n+1)::before { background: var(--wine); }
.plan-sections li:nth-child(3n+2)::before { background: var(--gold); }
.src-group { margin-top: 24px; }
.src-group h4 { margin-bottom: 8px; }
.src-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; padding: 16px 0; border-top: 1px solid var(--line); align-items: start; }
.src-row.off .src-main { opacity: 0.5; }
.src-name { font-weight: 600; }
.src-url { font-size: 14px; overflow-wrap: anywhere; }
.src-tags { display: inline-flex; gap: 8px; flex-wrap: wrap; margin-left: 8px; }
.changenote { background: var(--tint); border-left: 4px solid var(--gold); padding: 16px 24px; border-radius: 4px; margin-bottom: 24px; }
.stickybar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--white); border-top: 1px solid var(--line); z-index: 20; }
.stickybar-in { max-width: 1100px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
@media (min-width: 640px) { .stickybar-in { padding: 12px 24px; } }
.stickybar .est { font-size: 14px; line-height: 20px; }
.stickybar .est strong { display: block; font-size: 16px; font-weight: 600; }

/* progress */
.steps { list-style: none; padding: 0; margin: 32px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.steps li { border-top: 6px solid var(--line); padding-top: 12px; font-size: 14px; line-height: 20px; color: var(--muted); }
.steps li .sqs { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.steps li.done { border-top-color: var(--wine); color: var(--ink); }
.steps li.active { border-top-color: var(--gold); color: var(--ink); }
.steps li.active .sq { animation: pulse 1.2s infinite; }
.steps li .sq { background: var(--line); }
.steps li.done .sq { background: var(--wine); }
.steps li.active .sq { background: var(--gold); }
.now { font-family: var(--font); font-weight: 700; color: var(--wine); font-size: 24px; line-height: 32px; margin-bottom: 8px; }
.log { list-style: none; padding: 0; margin: 16px 0 0; font-size: 14px; line-height: 21px; color: var(--muted); }
.log li { padding: 4px 0; border-top: 1px solid var(--line); display: flex; gap: 16px; }
.log time { font-size: 12px; flex: none; font-variant-numeric: tabular-nums; }

/* report header and tabs */
.rep-head { display: flex; gap: 24px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.rep-head h1 { font-size: 34px; margin-bottom: 8px; }
.rep-meta { color: var(--muted); margin: 0 0 8px; }
.rep-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.draft-wrap { position: relative; display: inline-block; }
.draft-pop { display: none; position: absolute; left: 0; top: calc(100% + 8px); z-index: 30; width: min(320px, 80vw); background: var(--white); border: 1px solid var(--ink); border-radius: 8px; padding: 12px 16px; font-size: 14px; line-height: 21px; font-weight: 400; letter-spacing: 0; text-transform: none; font-family: var(--font); color: var(--ink); }
.draft-wrap:hover .draft-pop, .draft-wrap.open .draft-pop, .draft-wrap:focus-within .draft-pop { display: block; }
.tabs { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid var(--line); margin: 24px 0 32px; -webkit-overflow-scrolling: touch; }
.tab { font: inherit; font-weight: 600; background: none; border: 0; border-bottom: 4px solid transparent; padding: 12px 16px; cursor: pointer; white-space: nowrap; color: var(--muted); }
.tab[aria-selected=true] { color: var(--wine); border-bottom-color: var(--gold); }
.tab:hover { color: var(--wine); }

/* brief */
.bottom-line { background: var(--plum); color: var(--white); border-radius: var(--radius); padding: 32px; }
.bottom-line .kicker { color: var(--gold-light); }
.bottom-line .headline { color: var(--white); }
.bottom-line .points li { border-top-color: rgba(255, 255, 255, 0.18); }
.bottom-line .link-chip { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.35); color: var(--white); }
.bottom-line .link-chip:hover { border-color: var(--gold-light); }
.bottom-line .compare-note { color: var(--soft); font-size: 14px; line-height: 21px; margin: 16px 0 0; }
.bottom-line .points { margin-bottom: 0; }
.headline { font-family: var(--font); font-weight: 700; font-size: 23px; line-height: 32px; margin: 0 0 24px; max-width: 800px; }
.points { list-style: none; padding: 0; margin: 0 0 24px; max-width: 800px; }
.points li { padding: 16px 0 16px 32px; border-top: 1px solid var(--line); position: relative; }
.points li::before { content: ""; position: absolute; left: 0; top: 24px; width: 12px; height: 12px; background: var(--gold); }
.points li:nth-child(3n+2)::before { background: var(--gold-light); }
.points li:nth-child(3n)::before { background: var(--soft); }
.card .points li::before { background: var(--wine); }
.card .points li:nth-child(3n+2)::before { background: var(--gold); }
.card .points li:nth-child(3n)::before { background: var(--gold-light); }
.links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.link-chip { font: inherit; font-size: 13px; line-height: 18px; background: var(--tint); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; cursor: pointer; color: var(--wine); text-decoration: underline; text-underline-offset: 2px; max-width: 100%; text-align: left; }
.link-chip:hover { border-color: var(--wine); }
a.link-chip { display: inline-block; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 24px; }
.tile b { display: block; font-family: var(--font); font-weight: 700; color: var(--wine); font-size: 38px; line-height: 48px; }
.tile span { color: var(--muted); font-size: 14px; }
.dash2 { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .dash2 { grid-template-columns: 1fr 1fr; } }
.dash2 .card + .card { margin-top: 0; }
.bars { list-style: none; padding: 0; margin: 16px 0 0; }
.bars li + li { margin-top: 8px; }
.bar { font: inherit; width: 100%; display: grid; grid-template-columns: minmax(80px, 38%) 1fr 28px; align-items: center; gap: 12px; text-align: left; background: transparent; border: 1.5px solid transparent; border-radius: 8px; padding: 4px 8px; cursor: pointer; color: var(--ink); }
.bar:hover { border-color: var(--line); }
.bar[aria-pressed=true] { border-color: var(--wine); background: var(--tint); }
.bar .lbl { font-size: 14px; line-height: 18px; overflow-wrap: anywhere; }
.bar .track { height: 16px; background: var(--tint); border-radius: 4px; }
.bar .fill { display: block; height: 16px; border-radius: 4px; background: var(--wine); min-width: 4px; }
.bars.status .fill { background: var(--gold); }
.bar .n { text-align: right; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.filter-note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.item-list { list-style: none; margin: 16px 0 0; padding: 0; }
.item-list li { border-top: 1px solid var(--line); }
.item-list button { font: inherit; display: block; width: 100%; text-align: left; background: none; border: 0; padding: 12px 0; cursor: pointer; color: var(--ink); }
.item-list button:hover .it-title { text-decoration: underline; }
.it-title { font-weight: 600; display: block; color: var(--wine); }
.it-meta { color: var(--muted); font-size: 14px; }
.tl { position: relative; margin: 16px 0 0; padding: 0 12px; }
.tl-track { position: relative; }
.tl-axis { position: absolute; left: 0; right: 0; height: 2px; background: var(--plum); }
.tl-dot { position: absolute; width: 22px; height: 22px; margin-left: -11px; border: 2px solid var(--plum-deep); background: var(--gold); border-radius: 50%; padding: 0; cursor: pointer; }
.tl-dot:hover { background: var(--wine); }
.tl-tick { position: absolute; transform: translateX(-50%); font-size: 12px; line-height: 16px; color: var(--muted); white-space: nowrap; }
.tl-tick.first { transform: none; }
.tl-tick.last { transform: translateX(-100%); }

/* issue watchlist */
.watch { list-style: none; margin: 16px 0 0; padding: 0; }
.watch > li { border-top: 1px solid var(--line); padding: 16px 0; display: grid; grid-template-columns: 96px 1fr; gap: 4px 16px; }
.watch > li > .tag { align-self: start; justify-self: start; margin-top: 3px; }
.watch .w-issue { font-weight: 600; color: var(--ink); }
.watch .w-meta { color: var(--muted); font-size: 14px; line-height: 21px; }
.watch .w-next { font-size: 14px; line-height: 21px; margin-top: 4px; }
.watch .w-body { min-width: 0; }
.watch > li.resolved .w-issue { color: var(--muted); }
@media (max-width: 559px) { .watch > li { grid-template-columns: 1fr; } }

/* market risk */
.expo h3 { margin-bottom: 8px; }
.gauge { margin: 16px 0 8px; }
.gauge-top { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.gauge-num { font-family: var(--font); font-weight: 700; color: var(--wine); font-size: 54px; line-height: 60px; }
.gauge-num small { font-size: 20px; color: var(--muted); font-weight: 500; }
.gauge-bar { position: relative; display: grid; grid-template-columns: 34fr 33fr 33fr; gap: 2px; height: 16px; margin-top: 8px; }
.gauge-bar i { display: block; height: 16px; }
.gauge-bar i:nth-child(1) { background: var(--soft); border-radius: 8px 0 0 8px; }
.gauge-bar i:nth-child(2) { background: var(--gold); }
.gauge-bar i:nth-child(3) { background: var(--wine); border-radius: 0 8px 8px 0; }
.gauge-mark { position: absolute; top: -6px; width: 4px; height: 28px; background: var(--plum-deep); margin-left: -2px; border-radius: 2px; box-shadow: 0 0 0 1px var(--white); }
.gauge-scale { display: grid; grid-template-columns: 34fr 33fr 33fr; font-size: 12px; color: var(--muted); margin-top: 4px; }
.caveat-line { background: var(--tint); border-left: 4px solid var(--plum); padding: 8px 16px; font-size: 14px; line-height: 21px; margin: 16px 0; border-radius: 4px; }
.expo-layout { display: grid; gap: 24px; grid-template-columns: 1fr; margin-top: 24px; }
@media (min-width: 900px) { .expo-layout { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.xgrid { display: grid; grid-template-columns: 64px repeat(3, 1fr); grid-auto-rows: auto; gap: 4px; }
.xcell { min-height: 84px; border: 1px solid var(--line); border-radius: 8px; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 6px; padding: 6px; }
.xcell.hi { background: var(--wine-tint); }
.xcell.mid { background: var(--gold-tint); }
.xcell.lo { background: var(--tint); }
.xlab { font-size: 12px; line-height: 16px; color: var(--muted); display: flex; align-items: center; }
.xlab.col { justify-content: center; text-align: center; align-items: flex-start; }
.xcap { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.xdot { background: var(--white); border: 1.5px solid transparent; border-radius: 8px; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.xdot:hover { border-color: var(--wine); }
.xdot[aria-pressed=true] { border-color: var(--wine); border-width: 3px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; margin-top: 16px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.siglist { list-style: none; padding: 0; margin: 0; }
.siglist li + li { margin-top: 8px; }
.sigrow { font: inherit; width: 100%; text-align: left; display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; background: var(--white); border: 1.5px solid var(--line); border-radius: 8px; padding: 12px 16px; cursor: pointer; color: var(--ink); }
.sigrow:hover { border-color: var(--wine); }
.sigrow[aria-pressed=true] { border-color: var(--wine); background: var(--tint); }
.sigrow .dir { font-weight: 600; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); display: block; }
.sigdetail { border: 1.5px solid var(--wine); border-radius: var(--radius); padding: 24px; margin-top: 24px; background: var(--white); }
.sigdetail dl { margin: 16px 0 0; display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .sigdetail dl { grid-template-columns: 180px 1fr; gap: 16px 24px; } }
.sigdetail dt { font-weight: 600; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.sigdetail dd { margin: 0; }
details.how { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 16px; }
details.how summary, details.verify summary, details.tech summary { cursor: pointer; font-weight: 600; color: var(--wine); }
details.how summary:focus-visible, details.verify summary:focus-visible, details.tech summary:focus-visible { outline: 3px solid var(--wine); outline-offset: 2px; }

/* full report and item cards */
.doc { max-width: 800px; }
.doc h1 { font-size: 34px; }
.doc h2 { margin: 48px 0 8px; }
.doc h3 { margin: 32px 0 8px; font-size: 20px; color: var(--plum); }
.doc h4 { margin: 24px 0 8px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.empty-note { color: var(--muted); font-style: italic; }
.manual { margin: 24px 0; }
.manual h3 { margin: 0 0 8px; }
.manual-add { display: flex; gap: 16px; flex-wrap: wrap; margin: 24px 0; }
.item { background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--wine); border-radius: var(--radius); padding: 24px; margin: 16px 0; scroll-margin-top: 24px; }
.item.imp-medium { border-left-color: var(--gold); }
.item.imp-low, .item.imp-none { border-left-color: var(--line); }
.item.flash, tr.flash td { animation: flash 2.2s ease-out; }
@keyframes flash { 0%, 60% { background: var(--gold-tint); } 100% { background: transparent; } }
.item h5 { margin-bottom: 8px; }
.item-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.item .takeaway { font-weight: 700; font-size: 17px; line-height: 26px; color: var(--ink); margin: 0 0 4px; }
.item .fl { font-weight: 600; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 16px 0 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.item .ftext { margin: 0; }
.item .act-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; line-height: 21px; color: var(--ink); margin-top: 6px; }
.item .act-meta span strong { color: var(--muted); font-weight: 600; }
.ichips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ichip { font: inherit; font-size: 13px; line-height: 18px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--ink); }
button.ichip { cursor: pointer; }
button.ichip::after { content: "+"; font-weight: 700; color: var(--muted); }
button.ichip[aria-expanded=true]::after { content: "\2212"; }
.ichip.c-high { background: var(--wine); border-color: var(--wine); color: var(--white); }
.ichip.c-high::after { color: var(--soft); }
.ichip.c-medium { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.ichip.c-medium::after { color: var(--plum); }
.ichip.c-low { background: var(--soft); border-color: var(--soft); color: var(--plum); }
.ichip.c-new { background: var(--plum); border-color: var(--plum); color: var(--white); }
.ichip.c-new::after, .ichip.c-update::after { color: inherit; }
.ichip.c-update { background: var(--gold-light); border-color: var(--gold-light); color: var(--ink); }
.ichip.c-status { border-color: var(--ink); }
.ichip .k { font-weight: 500; color: inherit; opacity: 0.85; }
.chip-why { background: var(--tint); border-radius: 8px; padding: 10px 14px; margin-top: 8px; font-size: 14px; line-height: 21px; }
.chip-why strong { color: var(--wine); }
.badge-monitor { display: inline-block; font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; background: var(--soft); color: var(--plum); }
.orig { background: var(--tint); border-radius: 8px; padding: 12px 16px; margin-top: 8px; font-size: 14px; line-height: 21px; }
.src-links { margin: 8px 0 0; padding: 0; list-style: none; font-size: 14px; line-height: 21px; }
.src-links li { padding: 4px 0; }
.src-links .sdate { color: var(--muted); }
details.verify, details.tech { margin-top: 16px; }
details.verify ul { margin: 8px 0 0; padding-left: 24px; }
details.tech .tech-body { background: var(--tint); border-radius: 8px; padding: 12px 16px; margin-top: 8px; font-size: 14px; line-height: 22px; }
details.tech .tech-body p:last-child { margin-bottom: 0; }

/* sources tab */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); margin-top: 16px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 21px; min-width: 720px; }
th { text-align: left; font-weight: 600; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--tint); }
td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: top; }
tr:first-child td { border-top: 0; }
.cov { font-size: 17px; line-height: 28px; max-width: 800px; }
.dropped { list-style: none; margin: 16px 0 0; padding: 0; }
.dropped li { border-top: 1px solid var(--line); padding: 12px 0; }
.dropped .d-title { font-weight: 600; }

/* chat */
.chat { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--white); border-left: 1px solid var(--line); box-shadow: -8px 0 24px rgba(48, 16, 30, 0.12); z-index: 40; display: flex; flex-direction: column; transform: translateX(100%); visibility: hidden; transition: transform 0.25s ease, visibility 0s linear 0.25s; }
.chat.open { transform: none; visibility: visible; transition: transform 0.25s ease; }
@media (min-width: 1000px) { body.chat-open .page { margin-right: 440px; } }
@media (max-width: 639px) { .chat { width: 100%; border-left: 0; } }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; border-bottom: 1px solid var(--line); gap: 16px; background: var(--plum-deep); }
.chat-head h2 { font-size: 19px; color: var(--white); }
.chat-head .chat-x { color: var(--white); }
.chat-head .chat-x:hover { background: rgba(255, 255, 255, 0.12); }
.chat-head :focus-visible { outline-color: var(--gold-light); }
.chat-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--tint); }
.chat-filters label { font-size: 12px; line-height: 16px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; color: var(--muted); }
.chat-filters select { min-height: 40px; padding: 6px 10px; font-size: 14px; }
.chat-x { font: inherit; font-size: 28px; line-height: 1; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; color: var(--ink); }
.chat-x:hover { background: var(--line); }
.chat-list { flex: 1; overflow-y: auto; padding: 16px 24px; }
.msg { margin-bottom: 16px; max-width: 92%; }
.msg.user { margin-left: auto; }
.msg .bubble { padding: 12px 16px; border-radius: var(--radius); background: var(--tint); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user .bubble { background: var(--gold-light); border-color: var(--gold-light); }
.msg .who { font-weight: 600; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.msg.user .who { text-align: right; }
.msg .scope { font-size: 12px; color: var(--muted); margin-top: 4px; text-align: right; }
.editcard { border: 1.5px solid var(--wine); border-radius: var(--radius); padding: 16px; margin-top: 8px; background: var(--white); font-size: 14px; line-height: 21px; }
.editcard .newtext { background: var(--tint); padding: 8px 12px; border-radius: 8px; margin: 8px 0; white-space: pre-wrap; }
.editcard .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.starters { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.starter { font: inherit; font-size: 14px; background: var(--white); border: 1.5px solid var(--wine); border-radius: 999px; padding: 8px 16px; cursor: pointer; text-align: left; color: var(--wine); }
.starter:hover { background: var(--tint); }
.chat-form { border-top: 1px solid var(--line); padding: 16px 24px; display: flex; gap: 8px; align-items: flex-end; }
.chat-form textarea { min-height: 48px; max-height: 140px; }
.typing { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; margin-bottom: 16px; }

/* dialog */
dialog { border: 1px solid var(--line); border-radius: var(--radius); padding: 0; width: min(560px, calc(100% - 32px)); max-height: calc(100vh - 32px); color: var(--ink); background: var(--white); font-family: var(--font); }
dialog::backdrop { background: rgba(48, 16, 30, 0.55); }
.dlg-in { padding: 24px; }
dialog.item-dlg { width: min(760px, calc(100% - 32px)); overflow-y: auto; }
dialog.item-dlg .item { border: 0; padding: 0; margin: 0; }
.expo-intro { max-width: 800px; margin: 8px 0 24px; }
.dlg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 16px; }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 24px; }
.radio-cards label { margin: 0; border: 1.5px solid var(--line); border-radius: 8px; padding: 12px 16px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.radio-cards input { width: 18px; height: 18px; accent-color: var(--wine); }
.radio-cards label:has(input:checked) { border-color: var(--wine); background: var(--tint); }
.radio-cards label:has(input:focus-visible) { outline: 3px solid var(--wine); outline-offset: 2px; }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; margin: 0 0 16px; }
.switch input { appearance: none; -webkit-appearance: none; width: 48px; height: 28px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; margin: 0; flex: none; transition: background 0.15s; }
.switch input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--white); border: 1px solid var(--ink); transition: transform 0.15s; }
.switch input:checked { background: var(--wine); }
.switch input:checked::after { transform: translateX(20px); }
.switch input:focus-visible { outline: 3px solid var(--wine); outline-offset: 2px; }
.brand-fields > div { margin-bottom: 16px; }
.colors { display: flex; gap: 24px; flex-wrap: wrap; }
.colors > div { display: flex; align-items: center; gap: 12px; }
.colors label { margin: 0; }
.logo-prev { max-height: 56px; max-width: 160px; display: block; margin-top: 8px; border: 1px solid var(--line); padding: 4px; border-radius: 4px; background: var(--tint); }
.dlg-foot { display: flex; gap: 16px; justify-content: flex-end; align-items: center; flex-wrap: wrap; margin-top: 24px; }

@media (max-width: 559px) {
  h1, .ask h1 { font-size: 30px; }
  .headline { font-size: 20px; line-height: 28px; }
  .rep-head h1 { font-size: 28px; }
  .card { padding: 16px; }
  .bottom-line { padding: 20px 16px; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 16px 8px; }
  .xgrid { grid-template-columns: 44px repeat(3, 1fr); }
  .xcell { min-height: 72px; padding: 4px; }
  .radio-cards { grid-template-columns: 1fr; }
  .src-row { grid-template-columns: 1fr; }
  .bar { grid-template-columns: minmax(70px, 40%) 1fr 24px; }
  .gauge-num { font-size: 44px; }
  .brand .wordmark { font-size: 24px; line-height: 28px; }
  .chat-filters { grid-template-columns: 1fr; }
}
@media print { .topbar, .foot, .stickybar, .chat { display: none; } }

/* Branding dialog: colours from a pasted palette or the logo */
.palette-box textarea { min-height: 72px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.swatch { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 12px 4px 4px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); font-family: var(--font); font-size: 14px; cursor: pointer; }
.swatch i { display: block; width: 32px; height: 32px; border: 1px solid var(--ink); border-radius: 4px; }
.swatch:hover { border-color: var(--muted); }
.swatch[aria-pressed=true] { border-color: var(--wine); background: var(--tint); box-shadow: 0 0 0 2px var(--wine); }
.swatch-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 14px; }
.colour-warn .caveat-line { margin: 8px 0; }
