/*
 * Hartii Explorer: theme tokens and shell. Declared ONCE here; every explorer page links this file last.
 *
 * Two themes, set on <html data-theme="light|dark"> by /explorer/theme-init.js (saved choice, else the system
 * preference). The tokens re-point base.css's own variable names (--ink-*, --fg*, --line*, --red*) so the older
 * explorer.css / lists.css / entity.css rules follow the theme without being rewritten.
 * ONE accent: Hartii red. Green / amber / red-as-error appear only for status. Contrast checked at >= 4.5:1
 * for body text and the accent used as text, in both themes (see test/explorer-theme-nav.test.mjs for the
 * script and the screenshot notes in the PR for the measured pairs).
 * Fonts are the ones already self-hosted: Space Grotesk (display), Inter (body), JetBrains Mono (numbers and ids).
 */

:root[data-theme="light"] {
  color-scheme: light;
  --xp-bg: #f5f5f7;
  --xp-surface: #ffffff;
  --xp-surface-2: #f3f3f6;
  --xp-hover: #f7ecee;
  --xp-text: #17171c;
  --xp-text-2: #4f4f5a;
  --xp-text-3: #666672;
  --xp-line: #e3e3e9;
  --xp-line-strong: #c9c9d2;
  --xp-accent: #c01c32;          /* 5.9:1 on white */
  --xp-accent-fill: #d2233a;     /* button fill, white text 4.9:1 */
  --xp-on-accent: #ffffff;
  --xp-ok: #0b7a42;
  --xp-warn: #8f5400;
  --xp-bad: #b3172b;
  --xp-shadow: 0 1px 2px rgba(20, 20, 30, .05), 0 6px 20px -10px rgba(20, 20, 30, .14);
  --xp-grid: rgba(192, 28, 50, .07);
  --xp-ws-a: #3b6fe0;
  --xp-ws-b: #d9830f;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --xp-bg: #0c0809;
  --xp-surface: #161112;
  --xp-surface-2: #1d1618;
  --xp-hover: #241a1d;
  --xp-text: #f5eff0;
  --xp-text-2: #c4b6b9;
  --xp-text-3: #a39295;
  --xp-line: #2c2225;
  --xp-line-strong: #43353a;
  --xp-accent: #ff5d70;          /* 6.6:1 on the surface */
  --xp-accent-fill: #d2233a;
  --xp-on-accent: #ffffff;
  --xp-ok: #4ade80;
  --xp-warn: #ffb020;
  --xp-bad: #ff6b7a;
  --xp-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .7);
  --xp-grid: rgba(255, 93, 112, .08);
  --xp-ws-a: #6b95f5;
  --xp-ws-b: #f0a13a;
}
:root[data-theme] {
  /* base.css names, re-pointed */
  --ink-950: var(--xp-bg);
  --ink-900: var(--xp-bg);
  --ink-850: var(--xp-surface);
  --ink-800: var(--xp-surface-2);
  --ink-700: var(--xp-line);
  --line: var(--xp-line);
  --line-2: var(--xp-line-strong);
  --red: var(--xp-accent-fill);
  --red-hi: var(--xp-accent);
  --red-dim: var(--xp-accent);
  --fg: var(--xp-text);
  --fg-2: var(--xp-text-2);
  --fg-3: var(--xp-text-3);
  --ok: var(--xp-ok);
  --warn: var(--xp-warn);
  --xp-radius: 12px;
  --xp-max: 1392px;
  --xp-top-h: 60px;
  --xp-ease: cubic-bezier(.22, .8, .24, 1);
}

html { scroll-padding-top: calc(var(--xp-top-h) + 12px); }
body.xp { background: var(--xp-bg); color: var(--xp-text); font-variant-numeric: tabular-nums; min-height: 100vh; display: flex; flex-direction: column; }
body.xp::before { display: none; }
body.xp > main { flex: 1 0 auto; }
body.xp .mono, body.xp td, body.xp .xp-kv-v { font-variant-numeric: tabular-nums; }
.xp-wrap { width: 100%; max-width: var(--xp-max); margin-inline: auto; padding-inline: clamp(16px, 2.4vw, 32px); }
body.xp .wrap { max-width: var(--xp-max); padding-inline: clamp(16px, 2.4vw, 32px); }

/* ---------------------------------------------------------------- focus + skip link */
body.xp :focus-visible { outline: 2px solid var(--xp-accent); outline-offset: 2px; border-radius: 6px; }
body.xp input:focus-visible, body.xp select:focus-visible { outline-offset: 0; }
.xp-skip { position: absolute; left: 12px; top: -64px; z-index: 100; display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 8px; background: var(--xp-accent-fill); color: var(--xp-on-accent); font: 600 14px/1 var(--body); text-decoration: none; transition: top .15s; }
.xp-skip:focus { top: 10px; outline-color: var(--xp-text); }
.xp-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------------------------------------------------------------- top bar */
.xp-top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--xp-surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--xp-line); }
.xp-top-in { display: flex; align-items: center; gap: 18px; min-height: var(--xp-top-h); max-width: none; padding-inline: clamp(14px, 2vw, 28px); }
.xp-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--xp-text); flex: none; }
.xp-brand-word { font: 700 17px/1 var(--display); letter-spacing: .14em; }
.xp-brand-sub { font: 500 11px/1 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--xp-text-3); padding-left: 10px; border-left: 1px solid var(--xp-line-strong); }
.xp-beat { width: 9px; height: 9px; border-radius: 50%; background: var(--xp-accent-fill); box-shadow: 0 0 0 0 color-mix(in srgb, var(--xp-accent-fill) 50%, transparent); animation: xpBeat 3.4s ease-out infinite; }
@keyframes xpBeat { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--xp-accent-fill) 55%, transparent); } 60%, 100% { box-shadow: 0 0 0 9px transparent; } }

.xp-top-search { position: relative; flex: 0 1 360px; min-width: 0; margin: 0; }
.xp-top-search .xp-field { margin: 0; }
.xp-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.xp-nav-item { position: relative; }
.xp-nav-link, .xp-nav-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 0; background: none; cursor: pointer; border-radius: 8px;
  font: 600 12px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--xp-text-2); text-decoration: none; position: relative; white-space: nowrap;
}
.xp-nav-link:hover, .xp-nav-btn:hover, .xp-nav-btn[aria-expanded="true"] { color: var(--xp-text); background: var(--xp-surface-2); }
.xp-nav-link[aria-current="page"], .xp-nav-btn[data-active="true"] { color: var(--xp-accent); }
.xp-nav-link[aria-current="page"]::after, .xp-nav-btn[data-active="true"]::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--xp-accent); }
.xp-caret { width: 8px; height: 8px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .18s; }
.xp-nav-btn[aria-expanded="true"] .xp-caret { transform: translateY(1px) rotate(225deg); }
.xp-menu { position: absolute; left: 0; top: calc(100% + 6px); min-width: 280px; padding: 6px; margin: 0; list-style: none; background: var(--xp-surface); border: 1px solid var(--xp-line); border-radius: var(--xp-radius); box-shadow: var(--xp-shadow), 0 18px 40px -16px rgba(0, 0, 0, .35); z-index: 60; }
.xp-menu[hidden] { display: none; }
.xp-menu a { display: block; min-height: 44px; padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--xp-text); }
.xp-menu a:hover, .xp-menu a:focus-visible { background: var(--xp-hover); }
.xp-menu a[aria-current="page"] .xp-menu-label { color: var(--xp-accent); }
.xp-menu-label { display: block; font: 600 14px/1.25 var(--body); }
.xp-menu-desc { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.35; color: var(--xp-text-3); }

.xp-iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: none; color: var(--xp-text-2); cursor: pointer; flex: none; }
.xp-iconbtn:hover { background: var(--xp-surface-2); color: var(--xp-text); }
.xp-iconbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.xp-menu-btn { display: none; }
.xp-theme-btn .xp-sun { display: none; }
:root[data-theme="dark"] .xp-theme-btn .xp-sun { display: block; }
:root[data-theme="dark"] .xp-theme-btn .xp-moon { display: none; }

@media (max-width: 1320px) { .xp-top-search { flex-basis: 230px; } .xp-nav-link, .xp-nav-btn { padding: 0 10px; } }
@media (max-width: 1100px) {
  .xp-brand-sub { display: none; }
  .xp-nav-link, .xp-nav-btn { padding: 0 10px; letter-spacing: .08em; }
}
@media (max-width: 900px) {
  .xp-menu-btn { display: inline-flex; }
  .xp-theme-btn { margin-left: auto; }
  .xp-top-search { display: none; }
  .xp-nav { position: absolute; left: 0; right: 0; top: 100%; margin: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 12px 14px; background: var(--xp-surface); border-bottom: 1px solid var(--xp-line); box-shadow: var(--xp-shadow); max-height: calc(100vh - var(--xp-top-h)); overflow-y: auto; }
  .xp-nav[hidden] { display: none; }
  .xp-nav-link, .xp-nav-btn { width: 100%; justify-content: space-between; min-height: 48px; padding: 0 8px; }
  .xp-nav-link[aria-current="page"]::after, .xp-nav-btn[data-active="true"]::after { display: none; }
  .xp-menu { position: static; box-shadow: none; border: 0; border-left: 2px solid var(--xp-line); border-radius: 0; margin: 0 0 6px 10px; padding: 0 0 0 6px; background: none; min-width: 0; }
  .xp-mobile-search { display: block; }
}
.xp-mobile-search { display: none; padding: 6px 4px 10px; }

/* The wallet chip (shared wallet.css owns behaviour and states; here it takes the explorer's one accent and shape). */
body.xp .biome-wallet-button { margin-left: 8px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 8px; background: var(--xp-accent-fill); color: var(--xp-on-accent); font: 600 13px/1 var(--body); letter-spacing: .02em; }
body.xp .biome-wallet-button:hover { background: var(--xp-accent-fill); filter: brightness(1.1); }
body.xp .biome-wallet-button[data-wallet-state="unverified"], body.xp .biome-wallet-button[data-wallet-state="wrong-network"] { background: var(--xp-surface-2); color: var(--xp-text); border: 1px dashed var(--xp-warn); }
body.xp .biome-wallet-button:focus-visible { outline: 2px solid var(--xp-text); outline-offset: 2px; }
/* Before the shell script runs: the static header is just brand + links. */
.xp-top > .xp-top-in > .xp-nav > .xp-nav-link:not([aria-current]) { white-space: nowrap; }
@media (max-width: 900px) { body.xp .biome-wallet-button { margin: 8px 0 0; justify-content: center; width: 100%; } }

/* ---------------------------------------------------------------- search field (top bar, hero, mobile menu) */
.xp-field { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 3px 3px 3px 12px; background: var(--xp-surface); border: 1px solid var(--xp-line-strong); border-radius: 10px; }
.xp-field:focus-within { border-color: var(--xp-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--xp-accent) 22%, transparent); }
.xp-field > svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--xp-text-3); stroke-width: 1.9; stroke-linecap: round; }
.xp-field input { flex: 1; min-width: 0; min-height: 44px; border: 0; background: none; color: var(--xp-text); font: 400 14px/1.2 var(--mono); padding: 0; outline: none !important; }
.xp-field input::placeholder { color: var(--xp-text-3); opacity: 1; }
.xp-kbd { flex: none; min-width: 24px; padding: 3px 7px; border: 1px solid var(--xp-line-strong); border-radius: 6px; font: 500 12px/1.2 var(--mono); color: var(--xp-text-3); text-align: center; background: var(--xp-surface-2); }
.xp-go { flex: none; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: var(--xp-accent-fill); color: var(--xp-on-accent); cursor: pointer; }
.xp-go:hover { filter: brightness(1.08); }
.xp-go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
body.xp .xp-suggest { background: var(--xp-surface); border-color: var(--xp-line); box-shadow: var(--xp-shadow), 0 18px 40px -16px rgba(0, 0, 0, .4); }
body.xp .xp-suggest-item[aria-selected="true"] .xp-suggest-link, body.xp .xp-suggest-link:hover { background: var(--xp-hover); }
body.xp .xp-suggest-type-token { color: var(--xp-accent); }
body.xp .xp-search-status { color: var(--xp-warn); }
.xp-top-search .xp-search-status { position: absolute; top: 100%; left: 0; margin: 4px 0 0; font-size: 12px; background: var(--xp-surface); padding: 2px 6px; border-radius: 6px; }
.xp-top-search .xp-search-status:empty { display: none; }

/* ---------------------------------------------------------------- page head: compact, like the reference's list pages */
body.xp .page-head { padding-block: 28px 4px; }
body.xp .page-head .eyebrow { margin: 0 0 6px; font: 600 11px/1 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--xp-text-3); }
body.xp .page-head h1 { font: 700 clamp(1.5rem, 3vw, 2.1rem)/1.15 var(--display); letter-spacing: -.01em; color: var(--xp-text); margin: 0; }
body.xp .page-head p { color: var(--xp-text-2); }
body.xp .page-head .xp-search-inline, body.xp .page-head .xp-subnav { display: none; }
body.xp .section { padding-block: 16px 8px; }
body.xp .xp-status { color: var(--xp-text-2); }

/* ---------------------------------------------------------------- panels, key/value cards, tables, tabs */
body.xp .xp-panel-box, body.xp .panel { background: var(--xp-surface); border: 1px solid var(--xp-line); border-radius: var(--xp-radius); box-shadow: var(--xp-shadow); margin-bottom: 16px; overflow: hidden; }
body.xp .xp-panel-box-head { padding: 14px 20px; border-bottom: 1px solid var(--xp-line); }
body.xp .xp-panel-box-head h2 { font: 600 12px/1 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--xp-text-2); }
body.xp .xp-panel-link, body.xp .xp-all-link { color: var(--xp-accent); font: 600 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
body.xp .xp-panel-link:hover { text-decoration: underline; text-underline-offset: 3px; }
body.xp .xp-kv { padding: 12px 20px; border-bottom: 1px solid var(--xp-line); }
body.xp .xp-kv-k { color: var(--xp-text-3); font-size: 13px; }
body.xp .xp-kv-v { color: var(--xp-text); }
body.xp .xp-kv-v a, body.xp .xp-table td a { color: var(--xp-accent); border-bottom: 0; text-decoration: none; }
body.xp .xp-kv-v a:hover, body.xp .xp-table td a:hover { text-decoration: underline; text-underline-offset: 3px; }
body.xp .xp-kv-v:has(.xp-copy) { justify-content: flex-start; }
body.xp .xp-copy { background: var(--xp-surface-2); border: 1px solid var(--xp-line); color: var(--xp-text-2); border-radius: 8px; }
body.xp .xp-copy:hover { color: var(--xp-text); border-color: var(--xp-accent); }
body.xp .xp-code { color: var(--xp-text-2); background: var(--xp-surface-2); padding: 12px 14px; border-radius: 8px; }
body.xp .xp-log-head { color: var(--xp-accent); }
body.xp .xp-table th { font: 600 11px/1 var(--body); letter-spacing: .12em; color: var(--xp-text-3); background: var(--xp-surface); border-bottom: 1px solid var(--xp-line); padding: 14px 18px; position: sticky; top: 0; }
body.xp .xp-table td { padding: 14px 18px; border-bottom: 1px solid var(--xp-line); color: var(--xp-text-2); }
body.xp .xp-table tbody tr { transition: background .12s; }
body.xp .xp-table tbody tr:hover { background: var(--xp-hover); }
body.xp .xp-table td.xp-method { color: var(--xp-text); }
body.xp .xp-table td.xp-st-failed { color: var(--xp-bad); }
body.xp .xp-list-meta { color: var(--xp-text-3); border-bottom: 1px solid var(--xp-line); padding: 14px 20px; }
body.xp .xp-pager { border-top: 1px solid var(--xp-line); }
body.xp .xp-pager a, body.xp .xp-pager button { background: var(--xp-surface); border: 1px solid var(--xp-line-strong); color: var(--xp-text); border-radius: 8px; }
body.xp .xp-pager a:hover, body.xp .xp-pager button:hover:not(:disabled) { border-color: var(--xp-accent); color: var(--xp-accent); }
body.xp .xp-note { color: var(--xp-text-2); border-bottom: 1px solid var(--xp-line); }
body.xp .xp-note-etx { color: var(--xp-text); background: color-mix(in srgb, var(--xp-accent) 7%, var(--xp-surface)); }
body.xp .xp-pill-ok { background: color-mix(in srgb, var(--xp-ok) 14%, transparent); color: var(--xp-ok); }
body.xp .xp-pill-bad { background: color-mix(in srgb, var(--xp-bad) 14%, transparent); color: var(--xp-bad); }
body.xp .xp-pill-pending { background: var(--xp-surface-2); color: var(--xp-text-3); }
body.xp .sw-empty { color: var(--xp-text-3); }
body.xp .xp-stat { background: var(--xp-surface); border-color: var(--xp-line); }
body.xp .xp-stat .k { color: var(--xp-text-3); }
body.xp .btn { background: var(--xp-surface); border: 1px solid var(--xp-line-strong); color: var(--xp-text); border-radius: 8px; min-height: 44px; font-weight: 600; }
body.xp .btn:hover { border-color: var(--xp-accent); color: var(--xp-accent); transform: none; }
body.xp .btn-primary { background: var(--xp-accent-fill); border-color: var(--xp-accent-fill); color: var(--xp-on-accent); }
body.xp .btn-primary:hover { filter: brightness(1.08); color: var(--xp-on-accent); }
body.xp a { text-underline-offset: 3px; }

body.xp .xp-fig { background: var(--xp-surface); border: 1px solid var(--xp-line); border-radius: var(--xp-radius); box-shadow: var(--xp-shadow); }
body.xp .xp-fig-k { letter-spacing: .14em; }
body.xp .xp-fig-v { font-family: var(--mono); letter-spacing: -.01em; }
body.xp .xp-fig-m.is-missing { color: var(--xp-warn); }
body.xp .xp-tx-method { background: var(--xp-surface-2); border-color: var(--xp-line); }
body.xp .xp-chart-area { fill: color-mix(in srgb, var(--xp-accent) 12%, transparent); }
body.xp .xp-table-caption { color: var(--xp-text-3); }

/* tabs: underlined, like the reference */
body.xp .xp-tabs, body.xp [role="tablist"] { display: flex; gap: 4px; flex-wrap: wrap; margin: 0; border-bottom: 1px solid var(--xp-line); }
body.xp .xp-tabs a, body.xp .xp-tabs button, body.xp [role="tab"] {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border: 0; border-radius: 0; background: none; cursor: pointer; position: relative; text-decoration: none;
  font: 600 12px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--xp-text-3);
}
body.xp .xp-tabs a:hover, body.xp .xp-tabs button:hover, body.xp [role="tab"]:hover { color: var(--xp-text); background: none; border-color: transparent; }
body.xp .xp-tabs [aria-current="page"], body.xp .xp-tabs [aria-selected="true"], body.xp [role="tab"][aria-selected="true"] { color: var(--xp-accent); background: none; border: 0; }
body.xp .xp-tabs [aria-current="page"]::after, body.xp .xp-tabs [aria-selected="true"]::after, body.xp [role="tab"][aria-selected="true"]::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--xp-accent); }

/* ---------------------------------------------------------------- footer */
.xp-foot { margin-top: 48px; border-top: 1px solid var(--xp-line); background: var(--xp-surface); }
.xp-foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; padding-block: 40px 28px; }
.xp-foot h2 { font: 600 11px/1 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--xp-text-3); margin: 0 0 12px; }
.xp-foot ul { list-style: none; margin: 0; padding: 0; }
.xp-foot li a { display: inline-flex; align-items: center; min-height: 36px; font-size: 14px; color: var(--xp-text-2); text-decoration: none; }
.xp-foot li a:hover { color: var(--xp-accent); text-decoration: underline; }
.xp-foot-blurb { margin: 12px 0 0; max-width: 34ch; font-size: 14px; line-height: 1.55; color: var(--xp-text-2); }
.xp-foot-base { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 16px 24px; border-top: 1px solid var(--xp-line); font-size: 13px; color: var(--xp-text-3); }
.xp-foot-base .xp-kbd { margin-inline: 4px; }
@media (max-width: 760px) {
  .xp-foot-grid { grid-template-columns: 1fr 1fr; gap: 24px; padding-block: 28px 12px; }
  .xp-foot-grid > :first-child { grid-column: 1 / -1; }
  .xp-foot li a { min-height: 44px; }
  .xp-foot-base .xp-kbd, .xp-foot-keys { display: none; }
}

/* ---------------------------------------------------------------- motion preference */
@media (prefers-reduced-motion: reduce) {
  .xp-beat { animation: none; }
  .xp-caret, body.xp .xp-table tbody tr { transition: none; }
}

/* ---------------------------------------------------------------- phone */
/* Tables turn into two-column label-over-value cards (half the height of one-field-per-line). Home tables have their own two-line rows. */
@media (max-width: 700px) {
  body.xp:not(.xph) .xp-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 14px; padding: 14px 16px; }
  body.xp:not(.xph) .xp-table td { border-bottom: 0; display: flex; flex-direction: column; gap: 3px; padding: 0; text-align: left; white-space: normal; overflow-wrap: anywhere; }
  body.xp:not(.xph) .xp-table td::before { font: 600 10px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--xp-text-3); }
  body.xp:not(.xph) .xp-table td:first-child { grid-column: 1 / -1; font-size: 14px; }
  /* inline links in table cells keep their look but get a 44 px hit area */
  body.xp .xp-table td a, body.xp .xp-kv-v a, body.xp .xp-panel-link { display: inline-block; padding-block: 12px; margin-block: -12px; }
  body.xp .hl-filter, body.xp .xe-chip, body.xp .xp-pager a, body.xp .xp-pager button { min-height: 44px; }
  /* chips and small links outside tables: an invisible 44 px hit area, no layout change */
  body.xp a.hl-chip, body.xp .hl-row-link, body.xp .hl-burn-link, body.xp .xe-sub a, body.xp .xph-detail-n { position: relative; }
  body.xp a.hl-chip::after, body.xp .hl-row-link::after, body.xp .hl-burn-link::after, body.xp .xe-sub a::after, body.xp .xph-detail-n::after { content: ""; position: absolute; inset: -12px -6px; }
  body.xp .xp-table-caption { display: block; width: 100%; padding: 12px 16px 0; }
}
@media (max-width: 560px) {
  body.xp .xp-table th { position: static; }
  body.xp .xp-kv { padding: 12px 16px; }
  body.xp .xp-panel-box-head { padding: 12px 16px; }
  body.xp .xp-tabs a, body.xp .xp-tabs button, body.xp [role="tab"] { padding: 0 12px; }
}
