/* Equities APN cockpit · FIXTURE PREVIEW · DRY-RUN ONLY
   Section 1 is the preview page shell only. Section 2 is the component and is
   mirrored one-to-one by react-blueprint/EquitiesApnCockpit.module.css. */

/* ===== 1. PREVIEW PAGE SHELL (not part of the component) ===== */
html { background: #0b0f14; color-scheme: dark; --pg-ink: #e6e9ef; --pg-muted: #98a2b5; --pg-line: #232c3b; --pg-chip: #172030; --pg-accent: #f0b429; }
html[data-theme="light"] { background: #f4f6fa; color-scheme: light; --pg-ink: #18202f; --pg-muted: #4c5a73; --pg-line: #cbd2df; --pg-chip: #e9edf5; --pg-accent: #7a5600; }
body { margin: 0; min-height: 100dvh; }
.skip { position: absolute; left: 8px; top: -64px; z-index: 30; padding: 10px 14px; border-radius: 8px; background: var(--pg-chip); color: var(--pg-ink); font: 600 13px/1 system-ui, sans-serif; }
.skip:focus { top: 8px; }
.previewbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; max-width: 1440px; margin: 0 auto; padding: 10px 24px 0; box-sizing: border-box; font: 12px/1.4 system-ui, sans-serif; color: var(--pg-muted); }
.previewTag { color: var(--pg-accent); font: 700 11px/1 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .12em; }
.previewCtl { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.previewCtl select { min-height: 36px; max-width: 100%; padding: 0 10px; border: 1px solid var(--pg-line); border-radius: 8px; background: var(--pg-chip); color: var(--pg-ink); font: 600 12px/1 system-ui, sans-serif; }
.previewCtl select:focus-visible, .skip:focus-visible { outline: 2px solid var(--pg-accent); outline-offset: 2px; }
.noscript { max-width: 1440px; margin: 0 auto; padding: 0 24px 24px; color: var(--pg-ink); font: 13px/1.5 system-ui, sans-serif; }
@media (max-width: 760px) {
  .previewbar { padding: 8px 10px 0; }
  .previewCtl { margin-left: 0; }
}

/* ===== 2. COMPONENT ===== */
.apn {
  --ground: #0b0f14; --panel: #111822; --panel-2: #0e141c; --chip: #172030;
  --line: #232c3b; --line-soft: #1a2230; --ctl: #5f6c82; --track: #232c3b;
  --ink: #e6e9ef; --muted: #98a2b5;
  --accent: #f0b429; --accent-soft: #33290f;
  --good: #3fb950; --good-soft: #10301d;
  --bad: #f47378; --bad-soft: #3a1a1e;
  --warn: #e0aa2e; --warn-soft: #33290f;
  --info: #8eb5ff; --focus: #8eb5ff;
  --m-astra: #9878e8; --m-deepseek: #8fd14f; --m-sonnet: #6f8cff;
  --tip-bg: #1c2636; --tip-ink: #e6e9ef;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 12px 32px rgb(0 0 0 / 38%);
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
  max-width: 1440px; margin: 0 auto; padding: 12px 24px 48px;
  color: var(--ink); font: 13px/1.45 var(--sans);
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-wrap: anywhere;
}
.apn[data-theme="light"] {
  --ground: #f4f6fa; --panel: #ffffff; --panel-2: #f8f9fc; --chip: #e9edf5;
  --line: #cbd2df; --line-soft: #e4e8ef; --ctl: #77839a; --track: #dde2ec;
  --ink: #18202f; --muted: #4c5a73;
  --accent: #7a5600; --accent-soft: #fff1c7;
  --good: #136329; --good-soft: #dcf3e2;
  --bad: #ad1f26; --bad-soft: #fde3e4;
  --warn: #735200; --warn-soft: #fff1c7;
  --info: #1f52b5; --focus: #1f52b5;
  --m-astra: #6b4fc4; --m-deepseek: #3d7a12; --m-sonnet: #3f5fd6;
  --tip-bg: #18202f; --tip-ink: #f4f6fa;
  --shadow: 0 1px 2px rgb(20 30 50 / 8%), 0 12px 32px rgb(20 30 50 / 12%);
}
.apn *, .apn *::before, .apn *::after { box-sizing: border-box; min-width: 0; }
.apn [hidden] { display: none !important; }
.apn :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.apn button { font-family: inherit; touch-action: manipulation; }

/* card + header */
.card { border-radius: 14px; background: var(--panel); box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.head { padding: 20px 24px 16px; }
.headTop { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.eyebrow { margin: 0; color: var(--accent); font: 600 11px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.title { margin: 10px 0 12px; font-size: 24px; font-weight: 650; line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
.titleSub { color: var(--muted); font-weight: 450; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; min-height: 22px; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 5px; background: var(--chip); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font: 600 11px/1 var(--sans); letter-spacing: .02em; white-space: nowrap; }
.badge.isWarn { background: var(--warn-soft); color: var(--warn); }
.badge.isAccent { background: var(--accent-soft); color: var(--accent); }
.badge.isBad { background: var(--bad-soft); color: var(--bad); }
.badge.isGood { background: var(--good-soft); color: var(--good); }
.dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; }
.m0 { background: var(--m-astra); }
.m1 { background: var(--m-deepseek); }
.m2 { background: var(--m-sonnet); }
.short { display: none; }

/* selectors */
.controls { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 12px 24px; padding: 14px 24px; border-top: 1px solid var(--line-soft); }
.ctl { display: flex; align-items: center; gap: 10px; }
.ctlWide { grid-column: 1 / -1; }
.ctlLabel { flex: none; width: 48px; color: var(--muted); font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.seg { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); }
.segBtn, .chip { position: relative; display: inline-flex; flex: none; align-items: center; gap: 7px; border: 0; color: var(--muted); font: 600 12px/1 var(--sans); white-space: nowrap; cursor: pointer; appearance: none; transition-property: background-color, color, box-shadow, scale; transition-duration: .16s; transition-timing-function: cubic-bezier(.2, 0, 0, 1); }
.segBtn { min-height: 34px; padding: 0 12px; border-radius: 6px; background: transparent; }
.chip { height: 30px; padding: 0 11px; border-radius: 7px; background: var(--chip); box-shadow: inset 0 0 0 1px var(--line); }
.segBtn::before, .chip::before { content: ""; position: absolute; inset: -5px 0; } /* 40px+ hit area */
.segBtn:active, .chip:active { scale: .96; }
.segBtn[aria-pressed="true"], .chip[aria-pressed="true"] { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); }
.chips { display: flex; gap: 6px; margin: -5px -3px; padding: 5px 3px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

/* supervisor + scoreboard strip */
.strip { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); border-block: 1px solid var(--line-soft); background: var(--panel-2); }
.stripCol { padding: 14px 24px; }
.stripCol + .stripCol { border-left: 1px solid var(--line-soft); }
.h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--muted); font: 600 11px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.kvs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
.kv { display: flex; flex-direction: column; gap: 3px; }
.kvK { color: var(--muted); font-size: 11px; }
.kvV { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 22px; margin: 0; font: 500 12px/1.3 var(--mono); }
.kvV .meter, .kvV .rbar { flex: none; width: 56px; }
.armRow { display: grid; grid-template-columns: 104px minmax(0, 1fr) 64px 72px; gap: 10px; align-items: center; min-height: 24px; }
.armName { font-size: 12px; }
.armN { color: var(--muted); font-size: 11px; text-align: right; }
.slot { display: inline-flex; align-items: center; min-height: 24px; padding: 0; border: 0; background: none; color: var(--info); font: inherit; text-decoration: underline; text-decoration-color: var(--ctl); text-underline-offset: 3px; cursor: pointer; appearance: none; }
.caption { margin: 0; color: var(--muted); font-size: 12px; text-wrap: pretty; }
.strip .caption { margin-top: 8px; }
.sub { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.num { font: 500 12px/1 var(--mono); white-space: nowrap; }

/* compact encodings */
.meter { display: block; height: 6px; overflow: hidden; border-radius: 3px; background: var(--track); }
.meterFill { display: block; width: var(--w, 0%); height: 100%; border-radius: 3px; background: var(--info); }
.meterFill.isAccent { background: var(--accent); }
.meterFill.isQuiet { background: var(--ctl); }
.meterFill.isHot { background: var(--warn); }
.meterFill.isInfo { background: var(--info); }
.rbar { position: relative; display: block; height: 6px; border-radius: 3px; background: var(--track); }
.rbar::after { content: ""; position: absolute; top: -2px; bottom: -2px; left: 50%; width: 1px; background: var(--ctl); }
.rbarFill { position: absolute; top: 0; bottom: 0; left: var(--l, 50%); width: var(--w, 0%); border-radius: 2px; background: var(--ctl); }
.rbarFill.isPos, .sparkBar.isPos { background: var(--good); }
.rbarFill.isNeg, .sparkBar.isNeg { background: var(--bad); }
.rval { font: 600 12px/1 var(--mono); text-align: right; white-space: nowrap; }
.rval.isPos, .hR.isPos { color: var(--good); }
.rval.isNeg, .hR.isNeg { color: var(--bad); }
.rval.isZero { color: var(--ink); }
.pips { display: inline-flex; gap: 3px; }
.pip { width: 8px; height: 8px; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--ctl); }
.pip.isOn { background: var(--accent); box-shadow: none; }
.spark { display: flex; align-items: center; gap: 2px; height: 22px; }
.sparkBar { width: 3px; height: var(--h, 2px); border-radius: 1px; background: var(--ctl); }
.sparkBar.isPos { translate: 0 -50%; }
.sparkBar.isNeg { translate: 0 50%; }
.act { display: inline-flex; flex: none; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; font: 700 11px/1 var(--mono); letter-spacing: .06em; }
.act.isLong { background: var(--good-soft); color: var(--good); }
.act.isShort { background: var(--bad-soft); color: var(--bad); }
.act.isWatch { background: var(--warn-soft); color: var(--warn); }
.act.isFlat { background: var(--chip); color: var(--muted); }
.act.isBlocked { box-shadow: inset 0 0 0 1px var(--ctl); color: var(--ink); }
.isOff { color: var(--muted); cursor: not-allowed; }

/* watchlist rows */
.body { padding: 16px 24px 8px; }
.bodyHead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 8px; }
.bodyHead .h2 { margin: 0; }
.rows { min-height: 320px; border-radius: 8px; }
.list, .heat { display: block; }
.rowHead, .row { display: grid; grid-template-columns: 104px minmax(0, 2.4fr) 92px minmax(0, 1.1fr) minmax(0, 1.3fr) minmax(0, 1.9fr); gap: 16px; align-items: center; }
.rowHead { padding: 6px 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.row { position: relative; min-height: 52px; padding: 0 12px; border-bottom: 1px solid var(--line-soft); transition: background-color .12s ease; }
.list.isStale { box-shadow: inset 2px 0 0 var(--warn); }
.rowMain { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; appearance: none; }
.rowMain::after { content: ""; position: absolute; inset: 0; border-radius: 6px; } /* whole row is the target */
.apn .rowMain:focus-visible { outline: none; }
.rowMain:focus-visible::after { outline: 2px solid var(--focus); outline-offset: -2px; }
.tk { font: 700 14px/1.2 var(--mono); letter-spacing: .02em; }
.tkSub { color: var(--muted); font-size: 11px; }
.cat { display: flex; flex-direction: column; gap: 2px; }
.catLine { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actCell { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.conv { display: grid; grid-template-columns: 22px minmax(24px, 1fr) 34px; gap: 8px; align-items: center; }
.tape { display: grid; grid-template-columns: minmax(24px, 1fr) 44px 64px; gap: 8px; align-items: center; }
.cycCell { display: grid; grid-template-columns: 44px minmax(0, 1fr) 40px 46px; gap: 8px; align-items: center; }
.cycCell .spark { grid-column: 1; }
.cycCell .cyc { grid-column: 2; }
.cycCell .rbar { grid-column: 3; }
.cycCell .rval { grid-column: 4; }
.cyc { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: 1px; min-height: 40px; padding: 0; border: 0; background: none; color: var(--info); font-size: 11px; text-align: left; text-decoration: none; cursor: pointer; appearance: none; }
.cyc.isOff { color: var(--muted); cursor: not-allowed; }
.cycId { overflow: hidden; font: 500 11px/1.3 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 40px 12px; }
.row.isSkel { grid-template-columns: minmax(0, 1fr); }
.skel { height: 14px; border-radius: 4px; background: linear-gradient(90deg, var(--track), var(--chip), var(--track)); background-size: 200% 100%; animation: apnShimmer 1.4s linear infinite; }
@keyframes apnShimmer { to { background-position: -200% 0; } }

/* compare heatmap */
.heatHead, .heatRow { display: grid; grid-template-columns: 112px repeat(3, minmax(0, 1fr)); gap: 6px; }
.heatHead { align-items: end; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.heatCorner { padding: 0 8px 6px; color: var(--muted); font-size: 11px; }
.heatModel { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 6px 10px; border-radius: 6px; }
.heatModel.isFocus { background: var(--panel-2); box-shadow: inset 0 -2px 0 var(--accent); }
.heatName { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.heatRow { padding-top: 6px; }
.hslot { display: grid; }
.heatTk { display: flex; flex-direction: column; justify-content: center; gap: 3px; min-height: 44px; padding: 0 8px; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; appearance: none; transition: background-color .12s ease; }
.agree { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font: 500 11px/1 var(--mono); }
.agree.isFull { color: var(--good); }
.hcell { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "a . r" "b b b"; gap: 6px 8px; align-items: center; width: 100%; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 6px; background: var(--chip); color: var(--ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; appearance: none; transition: box-shadow .12s ease; }
.hAct { grid-area: a; font: 700 11px/1 var(--mono); letter-spacing: .06em; }
.hR { grid-area: r; color: var(--muted); font: 600 12px/1 var(--mono); white-space: nowrap; }
.hcell .rbar { grid-area: b; height: 4px; }
.hcell.isLong { background: var(--good-soft); }
.hcell.isLong .hAct { color: var(--good); }
.hcell.isShort { background: var(--bad-soft); }
.hcell.isShort .hAct { color: var(--bad); }
.hcell.isWatch { background: var(--warn-soft); }
.hcell.isWatch .hAct { color: var(--warn); }
.hcell.isFlat .hAct { color: var(--muted); }
.hcell.isBlocked { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--line-soft) 6px 7px); box-shadow: inset 0 0 0 1px var(--ctl); }
.hcell.isMuted { display: flex; background: transparent; box-shadow: inset 0 0 0 1px var(--line-soft); cursor: default; }
.hcell.isOff { cursor: not-allowed; }
.hNote { color: var(--muted); font-size: 11px; }

/* footer + definitions */
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding: 12px 24px 18px; border-top: 1px solid var(--line-soft); }
.terms { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--muted); font-size: 12px; }
.term { position: relative; padding: 0; border: 0; border-radius: 3px; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-decoration: underline dotted var(--ctl); text-transform: inherit; text-underline-offset: 3px; cursor: help; appearance: none; transition: color .12s ease; }
.term::before { content: ""; position: absolute; inset: -12px -6px; }
.tip { position: fixed; top: 0; left: 0; z-index: 20; display: flex; flex-direction: column; gap: 3px; width: max-content; max-width: min(300px, calc(100vw - 16px)); padding: 10px 12px; border-radius: 8px; background: var(--tip-bg); box-shadow: 0 0 0 1px var(--ctl), var(--shadow); color: var(--tip-ink); font: 12px/1.45 var(--sans); letter-spacing: 0; text-transform: none; pointer-events: none; animation: apnTip .12s ease-out; }
.tipAnchored { position: absolute; top: calc(100% + 8px); left: 0; }
.tipAnchored.isEnd { right: 0; left: auto; }
.termWrap { position: relative; display: inline-block; }
.tipTitle { font: 700 11px/1.2 var(--mono); letter-spacing: .06em; }
@keyframes apnTip { from { opacity: 0; translate: 0 2px; } }

/* dossier + cycle drawer */
.drawer { position: fixed; inset: 0 0 0 auto; width: min(560px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; overflow: hidden; border: 0; background: var(--panel); box-shadow: -1px 0 0 var(--line), var(--shadow); color: var(--ink); opacity: 0; transform: translateX(24px); transition: opacity .2s ease, transform .24s cubic-bezier(.2, 0, 0, 1), overlay .24s allow-discrete, display .24s allow-discrete; }
.drawer[open] { opacity: 1; transform: none; }
@starting-style { .drawer[open] { opacity: 0; transform: translateX(24px); } }
.drawer::backdrop { background: rgb(4 8 12 / 0%); transition: background-color .24s ease, overlay .24s allow-discrete, display .24s allow-discrete; }
.drawer[open]::backdrop { background: rgb(4 8 12 / 62%); }
@starting-style { .drawer[open]::backdrop { background: rgb(4 8 12 / 0%); } }
.drawerInner { display: flex; flex-direction: column; height: 100%; }
.drawerHead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawerTitle { margin: 0 0 8px; font: 650 18px/1.2 var(--sans); letter-spacing: -.01em; }
.apn .drawerTitle:focus { outline: none; }
.closeBtn { flex: none; min-height: 40px; padding: 0 14px; border: 0; border-radius: 8px; background: var(--chip); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font: 600 12px/1 var(--sans); cursor: pointer; appearance: none; transition-property: box-shadow, scale; transition-duration: .12s; }
.closeBtn:active { scale: .96; }
.drawerBody { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 20px 24px; }
.picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 14px 0; }
.pick { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 8px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font: inherit; text-align: left; cursor: pointer; appearance: none; transition-property: background-color, box-shadow, scale; transition-duration: .16s; }
.pick:active { scale: .96; }
.pick[aria-pressed="true"] { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.pick .badge { height: auto; min-height: 22px; padding: 3px 6px; line-height: 1.2; white-space: normal; }
.pickName { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.dsec { padding: 16px 0; border-top: 1px solid var(--line-soft); }
.decLine { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font: 500 12px/1.4 var(--mono); }
.dsec .caption + .cite, .dsec .cite + .caption, .decLine + .caption { margin-top: 10px; }
.cite { margin: 0; }
.quote { margin: 0 0 8px; padding: 10px 12px; border-radius: 0 6px 6px 0; background: var(--panel-2); box-shadow: inset 2px 0 0 var(--accent); font-size: 13px; line-height: 1.5; white-space: pre-wrap; text-wrap: pretty; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; min-height: 20px; padding: 2px 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font: 500 11px/1.3 var(--mono); }
.pill.isOff { box-shadow: inset 0 0 0 1px var(--line-soft); color: var(--muted); }
.cycItem { border-bottom: 1px solid var(--line-soft); }
.cycItem[open] { padding-bottom: 12px; }
.cycSum { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 40px 46px; gap: 8px; align-items: center; min-height: 44px; padding: 0 4px; border-radius: 6px; list-style: none; cursor: pointer; }
.cycSum::-webkit-details-marker { display: none; }
.cycSum .rbar { grid-column: 4; }
.cycSum .cycR { grid-column: 5; text-align: right; }
.cycItem[open] > .cycSum .cycId { color: var(--accent); }
.cycItem .kvs { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 6px 4px 10px; }
.hash { display: flex; flex-direction: column; gap: 1px; margin: 0 4px 8px; }
.hash code { color: var(--ink); font: 11px/1.4 var(--mono); }
.cycItem > .pill { margin-left: 4px; }

@media (hover: hover) {
  .segBtn:hover, .chip:hover, .term:hover { color: var(--ink); }
  .segBtn[aria-pressed="true"]:hover, .chip[aria-pressed="true"]:hover { color: var(--accent); }
  .row:hover, .heatTk:hover, .cycSum:hover { background: var(--panel-2); }
  a.cyc:hover .cycId, button.cyc:hover .cycId { text-decoration: underline; }
  .slot:hover { text-decoration-color: currentColor; }
  a.hcell:hover, button.hcell:hover, .closeBtn:hover, .pick:hover { box-shadow: inset 0 0 0 1px var(--ctl); }
  .pick[aria-pressed="true"]:hover { box-shadow: inset 0 0 0 1px var(--accent); }
}
@media (pointer: coarse) {
  .segBtn { min-height: 40px; }
  .chip { height: 38px; }
}
@media (max-width: 1180px) {
  .controls { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .apn { padding: 8px 10px 32px; }
  .long { display: none; }
  .short { display: inline; }
  .head { padding: 16px 14px 12px; }
  .title { font-size: 20px; }
  .controls { gap: 10px; padding: 12px 14px; }
  .ctl { flex-direction: column; align-items: stretch; gap: 6px; }
  .ctlLabel { width: auto; }
  .seg { display: flex; }
  .segBtn { flex: 1; justify-content: center; min-height: 40px; padding: 0 8px; }
  .chip { height: 38px; }
  .strip { grid-template-columns: minmax(0, 1fr); }
  .stripCol { padding: 12px 14px; }
  .stripCol + .stripCol { border-top: 1px solid var(--line-soft); border-left: 0; }
  .kvs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .armRow { grid-template-columns: 96px minmax(0, 1fr) 58px; }
  .armN { display: none; }
  .body { padding: 14px 14px 6px; }
  .rowHead { display: none; }
  .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "tk act" "cat cat" "conv tape" "cyc cyc"; gap: 6px 12px; padding: 10px 4px; }
  .rowMain { grid-area: tk; flex-direction: row; align-items: baseline; gap: 8px; padding: 2px 0; }
  .actCell { grid-area: act; flex-direction: row; align-items: center; justify-content: flex-end; gap: 8px; }
  .cat { grid-area: cat; }
  .conv { grid-area: conv; }
  .tape { grid-area: tape; grid-template-columns: minmax(24px, 1fr) 44px; }
  .tapeSub { display: none; }
  .cycCell { grid-area: cyc; }
  .heatHead, .heatRow { grid-template-columns: 62px repeat(3, minmax(0, 1fr)); gap: 4px; }
  .heatCorner { padding: 0 2px 6px; }
  .heatModel { padding: 4px 6px; }
  .heatModel .badge { height: auto; min-height: 22px; padding: 3px 6px; line-height: 1.2; white-space: normal; }
  .heatTk { padding: 0 2px; }
  .agree { gap: 4px; }
  .hcell { grid-template-columns: minmax(0, 1fr); grid-template-areas: "a" "r" "b"; gap: 4px; padding: 7px 6px; }
  .hAct { font-size: 10px; }
  .foot { padding: 12px 14px 16px; }
  .drawer { inset: auto 0 0 0; width: 100vw; height: 88dvh; border-radius: 16px 16px 0 0; box-shadow: 0 -1px 0 var(--line), var(--shadow); transform: translateY(24px); }
  .drawer[open] { transform: none; }
  @starting-style { .drawer[open] { transform: translateY(24px); } }
  .drawerHead { padding: 14px 14px 12px; }
  .drawerBody { padding: 4px 14px 24px; }
  .drawerBody .kvs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cycSum { grid-template-columns: minmax(0, 1fr) auto auto 32px 44px; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .apn *, .apn *::before, .apn *::after, .drawer::backdrop { transition-duration: 0s !important; animation: none !important; }
  .drawer, .drawer[open] { transform: none; }
}
