/* ===========================================================================
   Hackerman — components  (v0.5)
   v0.5: squares and surfaces. No hairline containers. Cards are white fills on
   the warm page; tags and secondary buttons sunk; primary actions black;
   thumbnails on plates; the footer black. No shadows, no outlines.
   =========================================================================== */

/* ---- The frame (v0.5): no rails, no dividers, no hairline cells -----------
   The first review called the lines "jail": they caged content and read as
   2021 architecture. The page is now held by space and by surfaces.
   .rails, .x and [data-reg] are kept as no-ops so old markup degrades quietly. */
.rails, .hk-reg { display: none; }
.x { height: 0; background: none; }
.x::before, .x::after { display: none; }

.frame { max-width: min(var(--frame-max), 100% - 2 * var(--out)); margin: 0 auto; padding-inline: var(--pad); position: relative; }
.frame--flush { padding-inline: var(--pad); }

/* Cards: the v0.5 container. White on the warm page, soft radius, no stroke, no shadow. */
.card { background: var(--raised); border-radius: var(--r-l); padding: var(--card-pad); position: relative; min-width: 0; }
.card--sunk { background: var(--sunk); }
.card--field { background: var(--field); }
.card--ink { background: var(--plate); color: #FAFAF8; }

/* Cells: a gap grid of cards (report cards, stats, features). */
.cells { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); position: relative; }
.cells > * { background: var(--raised); border-radius: var(--r-l); padding: var(--card-pad); position: relative; min-width: 0; }
.cells--bare > * { background: none; padding: 0; border-radius: 0; }
.cells > .card--sunk { background: var(--sunk); } .cells > .card--field { background: var(--field); }
@media (min-width: 768px) {
  .cells--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cells--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cells--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) { .cells--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---- Icons ---------------------------------------------------------------- */
.hk-i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.hk-i--fill { fill: currentColor; stroke: none; }
.hk-i--o { color: var(--orange); }

/* ---- Eyebrow: the orange square + label ----------------------------------- */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: var(--w-regular) var(--fs-meta)/1.2 var(--font); color: var(--fg-2); }
.eyebrow::before { content: ""; width: 8px; height: 8px; background: var(--orange); flex: none; }
.eyebrow--plain::before { display: none; }
.eyebrow b { font-weight: var(--w-regular); color: var(--fg-3); font-variant-numeric: tabular-nums; }

/* ---- Buttons -------------------------------------------------------------- */
.btn { --h: clamp(40px, 2.5vw, 48px); display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: var(--h);
       padding: 0 clamp(16px, 1.25vw, 24px); border: 0; border-radius: var(--r-s); cursor: pointer; text-decoration: none; white-space: nowrap;
       font: var(--w-regular) clamp(15px, .95vw, 18px)/1 var(--font); position: relative; overflow: hidden;
       transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1), transform var(--dur-1); -webkit-tap-highlight-color: transparent; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn--s { --h: 36px; padding: 0 14px; font-size: 14px; gap: 8px; }
/* Primary: the black action. Carries the orange spark when it leads to the chat. */
.btn--primary { background: var(--action); color: var(--raised); }
.btn--primary:hover, .btn--primary.is-hover { background: var(--action-hover); }
/* The sparkle (v0.4.2): a four-point star made of squares. It twinkles —
   tips, then arms — when its button is hovered. */
.spark { width: 18px; height: 18px; flex: none; fill: var(--orange); overflow: visible; }
.spark rect { transform-box: fill-box; transform-origin: center; }
@keyframes hk-twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 45% { opacity: .15; transform: scale(.3); } }
.btn--primary:hover .spark__tip rect, .btn--primary.is-hover .spark__tip rect, .hk-btn--primary:hover .spark__tip rect { animation: hk-twinkle 900ms var(--ease-in-out) infinite; }
.btn--primary:hover .spark__arm rect, .btn--primary.is-hover .spark__arm rect, .hk-btn--primary:hover .spark__arm rect { animation: hk-twinkle 900ms var(--ease-in-out) 150ms infinite; }
.btn__logo { width: 18px; height: 18px; flex: none; display: block; }
/* Secondary: sunk fill. Icon in orange. */
.btn--secondary { background: var(--sunk); color: var(--ink); }
.btn--secondary:hover, .btn--secondary.is-hover { background: var(--sunk-hover); }
.btn--secondary .hk-i { color: var(--orange); }
/* Ghost: text weight, for toolbars */
.btn--ghost { background: transparent; color: var(--fg-2); padding: 0 10px; }
.btn--ghost:hover, .btn--ghost.is-hover { background: var(--sunk); color: var(--ink); }
.btn--icon { width: var(--h); padding: 0; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--sunk); color: var(--ink-4); cursor: not-allowed; }
.btn--ghost:disabled { background: transparent; }
.btn.is-focus { outline: 2px solid var(--focus); outline-offset: 2px; }
.btn.is-press { transform: translateY(1px); }
.btn.is-loading { pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 30%; background: var(--orange); animation: hk-scan 1.1s var(--ease-in-out) infinite; }
@keyframes hk-scan { from { transform: translateX(-100%); } to { transform: translateX(340%); } }

/* Links */
.link { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: var(--line-strong); transition: text-decoration-color var(--dur-1); }
.link:hover { text-decoration-color: currentColor; }
.link-go { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-size: var(--fs-small);
           background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; padding-bottom: 3px; transition: background-size var(--dur-3) var(--ease-out); }
.link-go:hover, .link-go.is-hover { background-size: 100% 1px; }
.link-go .hk-i { transition: transform var(--dur-2) var(--ease-out); }
.link-go:hover .hk-i, .link-go.is-hover .hk-i { transform: translateX(3px); }

/* ---- Nav pill (segmented track) ------------------------------------------- */
.pill { display: inline-flex; padding: 4px; gap: 2px; background: var(--sunk); border-radius: var(--r-s); }
.pill a, .pill button { display: inline-flex; align-items: center; gap: 6px; height: clamp(32px, 2.1vw, 40px); padding: 0 clamp(12px, 1.2vw, 22px); border: 0; border-radius: 6px;
  background: transparent; color: var(--ink); font: var(--w-regular) clamp(14px, .95vw, 18px)/1 var(--font); text-decoration: none; cursor: pointer; transition: background-color var(--dur-2); }
.pill a:hover, .pill button:hover { background: var(--sunk-hover); }
.pill [aria-current="page"], .pill [aria-pressed="true"] { background: var(--raised); }
.pill--s a, .pill--s button { height: 30px; padding: 0 12px; font-size: 14px; }

/* ---- Ask bar --------------------------------------------------------------- */
.ask { display: flex; align-items: center; gap: 12px; background: var(--raised); border-radius: var(--r-s); padding: 8px 8px 8px 20px; min-height: clamp(56px, 3.8vw, 72px);
       box-shadow: inset 0 0 0 1px transparent; transition: box-shadow var(--dur-2); }
.ask:focus-within { box-shadow: inset 0 0 0 1px var(--ink); }
.ask .spark { width: 22px; height: 22px; }
/* Idle: the empty, unfocused ask field breathes so it draws the eye. */
.ask:not(:focus-within):has(.ask__input:placeholder-shown) .spark__tip rect { animation: hk-twinkle 2.6s var(--ease-in-out) infinite; }
.ask:not(:focus-within):has(.ask__input:placeholder-shown) .spark__arm rect { animation: hk-twinkle 2.6s var(--ease-in-out) .25s infinite; }
@media (prefers-reduced-motion: reduce) { .spark rect { animation: none !important; } }
.ask__input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--ink); font: var(--w-regular) clamp(16px, 1.05vw, 20px)/1.3 var(--font); resize: none; padding: 6px 0; }
.ask__input::placeholder { color: var(--ink-2); }
.ask__send { width: clamp(40px, 2.5vw, 48px); height: clamp(40px, 2.5vw, 48px); flex: none; border: 0; border-radius: var(--r-s); background: var(--action); color: var(--raised); display: grid; place-items: center; cursor: pointer; transition: background-color var(--dur-1); }
.ask__send:hover { background: var(--action-hover); }
/* Mode chip: Auto (Quick) / Quick / Deep */
.mode { position: relative; flex: none; }
.mode > button { display: inline-flex; align-items: center; gap: 8px; height: clamp(40px, 2.5vw, 48px); padding: 0 14px 0 16px; border: 0; border-radius: var(--r-s);
  background: var(--orange-wash); color: var(--orange-ink); font: var(--w-regular) clamp(14px, .95vw, 18px)/1 var(--font); cursor: pointer; }
.mode > button .hk-i { transition: transform var(--dur-2); }
.mode.is-open > button .hk-i { transform: rotate(180deg); }
.mode__menu { position: absolute; right: 0; bottom: calc(100% + 8px); min-width: 260px; background: var(--raised); border-radius: var(--r-s); padding: 6px; display: none; z-index: 10; box-shadow: inset 0 0 0 1px var(--line); }
.mode.is-open .mode__menu { display: grid; }
.mode__menu button { display: grid; grid-template-columns: 14px 1fr; gap: 10px; text-align: left; padding: 10px; border: 0; background: none; border-radius: 3px; cursor: pointer; font: var(--w-regular) 14px/1.35 var(--font); color: var(--ink); }
.mode__menu button:hover { background: var(--paper); }
.mode__menu button small { display: block; color: var(--ink-3); font-size: 14px; }
.mode__menu button::before { content: ""; width: 8px; height: 8px; margin-top: 5px; background: var(--line-strong); }
.mode__menu button[aria-checked="true"]::before { background: var(--orange); }

/* ---- Tags, labels, status ---------------------------------------------------- */
.tag { display: inline-flex; align-items: center; height: clamp(26px, 1.6vw, 30px); padding: 0 clamp(8px, .65vw, 12px); border-radius: var(--r-s); background: var(--sunk);
       color: var(--ink-2); font: var(--w-regular) clamp(14px, .78vw, 15px)/1 var(--font); white-space: nowrap; }
.tag--plate { background: var(--plate-tag); color: #FBFBFB; }
.tag--raised { background: var(--raised); }
.tag--you { background: var(--lime); color: #141414; }
.tag--orange { background: var(--orange-wash); color: var(--orange-ink); }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-meta); color: var(--ink-2); }
.status::before { content: ""; width: 8px; height: 8px; background: var(--c); }
.status--active { --c: var(--st-active); } .status--acquired { --c: var(--st-acquired); } .status--public { --c: var(--st-public); } .status--inactive { --c: var(--st-inactive); }
.conf { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-meta); color: var(--ink-2); }
.conf i { width: 6px; height: 6px; background: var(--line-strong); }
.conf[data-level="1"] i:nth-of-type(-n+1), .conf[data-level="2"] i:nth-of-type(-n+2), .conf[data-level="3"] i:nth-of-type(-n+3) { background: var(--ink); }
.conf span { display: inline-flex; gap: 2px; }
.prov { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--ink-3); }
.prov::before { content: ""; width: 8px; height: 8px; background: repeating-linear-gradient(135deg, var(--ink-3) 0 1px, transparent 1px 3px); }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-meta); }
.live::before { content: ""; width: 8px; height: 8px; background: var(--lime); box-shadow: inset 0 0 0 1px rgba(20,20,20,.14); animation: hk-blink 1.4s var(--ease-in-out) infinite; }
@keyframes hk-blink { 50% { opacity: .3; } }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-s); background: var(--sunk); color: var(--ink-2); font-size: 14px; font-variant-numeric: tabular-nums; }

/* Square bullets */
.sq-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sq-list li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 6px; }
.sq-list li::before { content: ""; width: 6px; height: 6px; background: var(--orange); margin-top: .6em; }

/* ---- Inputs ------------------------------------------------------------------- */
.field-l { display: grid; gap: 8px; }
.field-l > span:first-child { font-size: var(--fs-meta); color: var(--ink-2); }
.input { height: 44px; width: 100%; padding: 0 14px; border: 0; border-radius: var(--r-s); background: var(--raised); color: var(--ink);
         font: var(--w-regular) 15px/1 var(--font); box-shadow: inset 0 0 0 1px transparent; transition: box-shadow var(--dur-1); }
.input::placeholder { color: var(--ink-4); }
.input:hover { box-shadow: inset 0 0 0 1px var(--line); }
.input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--ink); }
.input.is-error { box-shadow: inset 0 0 0 1px var(--error); }
.switch { position: relative; width: 36px; height: 20px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 2px; background: var(--sunk-hover); pointer-events: none; transition: background-color var(--dur-2); }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; background: var(--raised); transition: transform var(--dur-2) var(--ease-out); }
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::after { transform: translateX(16px); }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; }
.check input { appearance: none; width: 16px; height: 16px; margin: 0; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-strong); display: grid; place-items: center; cursor: pointer; }
.check input:checked { background: var(--ink); box-shadow: none; }
.check input:checked::after { content: ""; width: 6px; height: 6px; background: var(--raised); }

/* ---- Thumbnails & report cards ------------------------------------------------- */
.thumb { aspect-ratio: 16/10; border-radius: var(--r-m); background: var(--plate); position: relative; overflow: hidden; display: grid; place-items: center; }
.thumb svg.dither { width: 46%; height: auto; max-height: 72%; transition: transform 700ms var(--ease-out); }
.thumb .tag { position: absolute; left: 12px; top: 12px; }
.thumb--light { background: var(--raised); }
.thumb--field { background: var(--field); }
a:hover .thumb svg.dither { transform: scale(1.04); }
.rcard { display: grid; gap: clamp(14px, 1.3vw, 24px); color: inherit; text-decoration: none; align-content: start; }
.rcard__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.rcard h3 { margin: 0; font: var(--w-head) var(--fs-h3)/var(--lh-h3) var(--font); letter-spacing: var(--tr-h3); }
.rcard p { margin: 0; font-size: clamp(15px, .85vw, 16px); line-height: 1.35; color: var(--ink); }
.rcard .meta { font-size: clamp(14px, .85vw, 16px); color: var(--ink-2); margin-top: -6px; }
.rcard__body { display: grid; gap: 10px; }

/* ---- Callouts (v0.5): tinted boxes, not rules -------------------------------- */
.note-l { display: grid; gap: 8px; padding: 18px 20px; border-radius: var(--r-m); background: var(--raised); }
.note-l h4 { margin: 0; display: flex; align-items: center; gap: 10px; font: var(--w-medium) 15px/1.3 var(--font); }
.note-l h4::before { content: ""; width: 8px; height: 8px; background: var(--ink); }
.note-l p { margin: 0; font-size: 15px; color: var(--ink-2); line-height: 1.55; }
.note-l--limit { background: var(--orange-wash); }
.note-l--limit h4::before { background: var(--orange); }
.note-l--def { background: var(--sunk); }
.note-l--def h4::before { background: var(--orange); }
.quote { margin: 0; display: grid; gap: 14px; }
.quote blockquote { margin: 0; font: var(--w-head) var(--fs-h3)/1.25 var(--font); letter-spacing: var(--tr-h3); }
.quote figcaption { font-size: var(--fs-meta); color: var(--ink-3); }

/* ---- Tables: hairlines; stack on phones ----------------------------------------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.tbl { border-collapse: separate; border-spacing: 0 4px; }
.tbl th { font: var(--w-regular) 14px/1.3 var(--font); color: var(--ink-3); text-align: left; padding: 0 14px 6px; }
.tbl td { padding: 13px 14px; background: var(--paper); vertical-align: middle; }
.tbl td:first-child { border-radius: var(--r-s) 0 0 var(--r-s); } .tbl td:last-child { border-radius: 0 var(--r-s) var(--r-s) 0; }
.tbl .num { text-align: right; }
.tbl tr.is-you td { background: linear-gradient(90deg, var(--lime-wash), var(--lime-wash)); }
.tbl .bar { display: block; height: 8px; background: var(--orange); min-width: 2px; }
.tbl tr.is-you .bar { background: var(--lime); box-shadow: inset 0 0 0 1px rgba(20,20,20,.14); }
@media (max-width: 640px) {
  .tbl--stack thead { display: none; }
  .tbl--stack, .tbl--stack tbody, .tbl--stack tr, .tbl--stack td { display: block; width: 100%; }
  .tbl--stack tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px; margin-bottom: 4px; background: var(--paper); border-radius: var(--r-s); }
  .tbl--stack td { border: 0; padding: 0; background: none; }
  .tbl--stack td[data-k]::before { content: attr(data-k) " "; color: var(--ink-3); font-size: 14px; }
  .tbl--stack td.full { grid-column: 1 / -1; }
  .tbl--stack .num { text-align: left; }
}

/* ---- Tooltip -------------------------------------------------------------------- */
.hk-tip { position: fixed; z-index: 90; pointer-events: none; background: var(--action); color: #FAFAF8; border-radius: var(--r-s); padding: 9px 11px;
          font: var(--w-regular) 14px/1.4 var(--font); font-variant-numeric: tabular-nums; max-width: 240px; opacity: 0; transform: translateY(4px); transition: opacity var(--dur-1), transform var(--dur-1) var(--ease-out); }
.hk-tip.is-on { opacity: 1; transform: none; }
.hk-tip b { font-weight: var(--w-medium); display: block; margin-bottom: 2px; }
.hk-tip .row { display: flex; gap: 8px; justify-content: space-between; align-items: center; }
.hk-tip .sw { width: 8px; height: 8px; display: inline-block; margin-right: 6px; }

/* ---- Texture: grain -------------------------------------------------------
   One noise tile, blended with overlay so it darkens light grounds and lifts
   dark ones. Used on thumbnail plates, the field band and the footer. Never
   on text, inputs, buttons or the page ground. */
.grain { position: relative; isolation: isolate; }
.grain::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; border-radius: inherit;
  background-image: var(--grain); background-size: 220px 220px; mix-blend-mode: overlay; opacity: var(--grain-strength); }
.grain--soft::after { opacity: var(--grain-soft); mix-blend-mode: multiply; }
.grain > *:not(.hk-reg) { position: relative; z-index: 1; }
.thumb { isolation: isolate; }
.thumb::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background-image: var(--grain); background-size: 220px 220px; mix-blend-mode: overlay; opacity: var(--grain-strength); }
.thumb--field::after { mix-blend-mode: multiply; opacity: var(--grain-soft); }
.thumb > *:not(.hk-reg):not(.tag) { position: relative; z-index: 1; }
.thumb > .tag { z-index: 2; }

/* ---- Letter roll (Primora), every button: hk-roll.js ---------------------- */
.roll { display: inline; line-height: 1.3; }
.roll__w { display: inline-flex; overflow: hidden; vertical-align: top; }
.roll__w > span { display: inline-block; text-shadow: 0 1.3em currentColor; transform: translateY(0); transition: transform 600ms cubic-bezier(.625, .05, 0, 1); }
:is(a, button, [role="button"], label):hover .roll__w > span { transform: translateY(-1.3em); }
@media (prefers-reduced-motion: reduce) { .roll__w > span { transition: none; } :is(a, button, [role="button"], label):hover .roll__w > span { transform: none; } }

/* 20 Nov: the mode colours carry into the mode selector everywhere (home ask bars and
   chat): Auto and Deep orange (the Deep chip), Quick grey (the Quick chip) */
.mode[data-mode="quick"] > button { background: var(--sunk); color: var(--ink); }
.mode__menu button[aria-checked="true"] { background: var(--orange-wash); }
.mode__menu button[data-mode="quick"][aria-checked="true"] { background: var(--sunk); }
.mode__menu button[data-mode="quick"][aria-checked="true"]::before { background: var(--ink); }

/* ---- 20 Nov: report-style charts, shared (hk-sqcharts.js draws them on the report
   and in the chat). Same rules as report.css, which keeps its own copy. */
.rp-sq { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.rp-sq text { font-size: 14px; fill: var(--ink-2); }
.rp-sq .v { font-size: 14px; fill: var(--ink); font-weight: 500; }
.rp-sq .l { font-size: 14px; fill: var(--ink); }
.rp-sq .mk { font-size: 14px; fill: var(--ink-2); paint-order: stroke; stroke: var(--raised); stroke-width: 5px; stroke-linejoin: round; }
.rp-sq .ax { font-size: 14px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.rp-sq .gd { fill: var(--line-strong); opacity: .7; }
.rp-sq rect.s { transition: opacity 400ms var(--ease-out); }
.rp-sq rect.bar { transform-box: fill-box; transform-origin: bottom; transition: transform 900ms var(--ease-out); }
.rp-sq rect.bar.is-low { transform: scaleY(0); }
/* 23 Nov: chart hover (hk-sqcharts.js). The band under the pointer goes sunk, the
   other bars fade back; tooltip = the home field tooltip (.fieldtip) */
.rp-sq .sqg { outline: none; transition: opacity var(--dur-2) var(--ease-out); }
.rp-sq .hit { fill: var(--sunk); opacity: 0; transition: opacity var(--dur-2) var(--ease-out); }
.rp-sq .sqg.is-hot .hit { opacity: .7; }
.rp-sq.is-hover .sqg:not(.is-hot) { opacity: .4; }
.rp-sq .sqg:focus-visible .hit { opacity: .7; stroke: var(--focus, var(--orange)); stroke-width: 2px; }
.sqtip { position: fixed; z-index: 90; pointer-events: none; min-width: 140px; max-width: 280px; padding: 10px 12px; border-radius: var(--r-s); background: var(--action); color: #F2F1EE;
         font: var(--w-regular) 14px/1.45 var(--font); opacity: 0; transform: translateY(4px); transition: opacity var(--dur-1), transform var(--dur-1); }
.sqtip.is-on { opacity: 1; transform: none; }
.sqtip b { display: block; font-weight: var(--w-medium); }
.sqtip span { display: flex; align-items: center; gap: 8px; margin-top: 2px; color: #C9C7C2; }
.sqtip .st { flex: none; width: 8px; height: 8px; background: var(--c); }
@media (prefers-reduced-motion: reduce) { .rp-sq .sqg, .rp-sq .hit, .sqtip { transition: none; } }
.rp-sq rect.bar.is-low.is-up { transform: none; }

/* 23 Nov: Auto takes the colour of the mode it picked (hk-mode.js sets data-auto):
   Auto (Quick) is grey like Quick, Auto (Deep) is orange like Deep. Applies to every
   ask bar (home, report, story, chat). The selected Auto row in the menu follows. */
.mode > button { transition: background-color var(--dur-2), color var(--dur-2); }
.mode[data-mode="auto"]:not([data-auto="deep"]) > button { background: var(--sunk); color: var(--ink); }
.mode:not([data-auto="deep"]) .mode__menu button[data-mode="auto"][aria-checked="true"] { background: var(--sunk); }
.mode:not([data-auto="deep"]) .mode__menu button[data-mode="auto"][aria-checked="true"]::before { background: var(--ink); }

/* ---- 24 Nov: marks for the added chart types (hk-sqcharts.js: lines, areas, radar,
   donut, points). Lines are 2.5px with square joins; areas a faint wash of the line
   colour; radar shapes outline + a faint fill; the last point of a "pulseLast" area
   breathes. Legends drawn by the script use the report legend style. */
.rp-sq .ln { fill: none; stroke-width: 2.5px; stroke-linejoin: miter; stroke-linecap: square; }
.rp-sq .ar { opacity: .12; stroke: none; }
.rp-sq .rd { stroke-width: 2px; fill-opacity: .08; stroke-linejoin: miter; }
.rp-sq .dn { fill: none; }
.rp-sq .dc { font-size: 32px; font-weight: 500; fill: var(--ink); letter-spacing: -.02em; }
.rp-sq .pt { transition: opacity 400ms var(--ease-out); }
.rp-sq .pt.pulse { transform-box: fill-box; transform-origin: center; animation: hk-sq-pulse 1.8s var(--ease-in-out) infinite; }
@keyframes hk-sq-pulse { 50% { transform: scale(1.5); opacity: .55; } }
.rp-sq .sqg.is-hot .rd { fill-opacity: .2; }
.sq-legend { margin: -6px 0 18px; }
@media (prefers-reduced-motion: reduce) { .rp-sq .pt.pulse { animation: none; } }
/* 24 Nov (c): value labels keep a card-coloured halo where they cross a reference line */
.rp-sq .v { paint-order: stroke; stroke: var(--raised); stroke-width: 4px; stroke-linejoin: round; }
