/* Supply Hub design layer v2 — loaded last on every page.
   White canvas, one confident blue, hairline structure, compact data density.
   Rolling back = drop this file's <link> (or check out tag ui-before-redesign). */
:root {
  --brand-50: #f0f5ff;
  --brand-100: #e0eaff;
  --brand-200: #c3d5ff;
  --brand-500: #3d74f5;
  --brand-600: #2257e8;
  --brand-700: #1a45c2;
  --brand-900: #0f2a78;
  --brand-ring: rgba(34, 87, 232, .16);

  --ink: #101828;
  --ink-2: #344054;
  --muted: #667085;
  --faint: #98a2b3;

  --bg: #f6f7f9;
  --paper: #fff;
  --soft: #f9fafb;
  --line: #e4e7ec;
  --line-soft: #eef0f3;
  --field: #d5dae2;
  --hover: #f5f8ff;

  --ok: #067647; --ok-bg: #ecfdf3;
  --warn: #b54708; --warn-bg: #fffaeb;
  --bad: #c4320a; --bad-bg: #fef3f2;

  --radius: 10px;
  --radius-sm: 7px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .03);
  --shadow-pop: 0 12px 32px -8px rgba(16, 24, 40, .16), 0 2px 6px rgba(16, 24, 40, .05);
  --shadow-lg: 0 24px 56px -12px rgba(16, 24, 40, .22);
  --sidebar: 236px;
  --topbar: 56px;
  --control: 32px;
  --font: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
}

body { font-size: 13.5px; background: var(--bg); color: var(--ink); text-rendering: optimizeLegibility; }
::selection { background: var(--brand-100); }
::-webkit-scrollbar-thumb { background-color: #d0d5dd; }
::-webkit-scrollbar-thumb:hover { background-color: #98a2b3; }
:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 1px; }

/* ---------- shell ---------- */
.sidebar { gap: 2px; padding: 14px 12px 12px; background: #fcfcfd; border-right: 1px solid var(--line); }
.brand { gap: 10px; padding: 4px 6px 18px; }
.brand-logo { width: 28px; height: 28px; filter: none; border-radius: 8px; box-shadow: 0 1px 2px rgba(16, 24, 40, .12), inset 0 0 0 1px rgba(255, 255, 255, .12); }
.brand strong { font-size: 15px; font-weight: 650; letter-spacing: -.015em; }
.sidebar-toggle { width: 26px; height: 26px; border-radius: 7px; }
.sidebar-toggle:hover { background: #f2f4f7; border-color: transparent; }

.side-nav { gap: 1px; }
.nav-label { padding: 0 10px 6px; color: var(--faint); font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.nav-label-gap { margin-top: 18px; }
.nav-item { gap: 10px; padding: 7px 10px; border-radius: 7px; color: var(--ink-2); font-size: 13px; font-weight: 500; }
.nav-item .nav-icon, .nav-item .nav-icon svg { width: 16px; height: 16px; }
.nav-item .nav-icon { color: #8a94a6; }
.nav-item:hover { background: #f2f4f7; color: var(--ink); }
.nav-item.active { background: #fff; color: var(--brand-700); font-weight: 600; box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(16, 24, 40, .05); }
.nav-item.active .nav-icon { color: var(--brand-600); }
.nav-item.active::before { content: none; }

.sidebar-foot { gap: 9px; padding: 8px; border-radius: 9px; background: transparent; border: 1px solid transparent; transition: background-color .15s, border-color .15s; }
.sidebar-foot:hover { background: #fff; border-color: var(--line); }
.admin-avatar { width: 28px; height: 28px; font-size: 12px; background: linear-gradient(140deg, var(--brand-500), var(--brand-900)); }
.icon-button.small { width: 26px; height: 26px; border-color: transparent; background: transparent; color: var(--faint); }
.icon-button.small:hover { background: #f2f4f7; color: var(--ink-2); border-color: transparent; }
.user-menu { padding: 4px; border-radius: 10px; box-shadow: var(--shadow-pop); }
.user-menu button { padding: 7px 10px; border-radius: 6px; }

.topbar { height: var(--topbar); padding: 0 24px; background: rgba(255, 255, 255, .9); border-bottom: 1px solid var(--line); }
.top-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.top-crumb { color: var(--faint); font-size: 13px; font-weight: 500; white-space: nowrap; }
.top-crumb:empty { display: none; }
.top-crumb::after { content: "/"; margin-left: 8px; color: #d0d5dd; }
.topbar h1 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.top-meta { gap: 8px; font-size: 12px; }
.top-meta > span:not(.status-pill), .data-date {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 7px;
  background: var(--soft); border: 1px solid var(--line); color: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums;
}
#batchLabel::before { content: ""; width: 12px; height: 12px; background: currentColor; opacity: .55;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3.5' y='5' width='17' height='15' rx='2.5'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3.5' y='5' width='17' height='15' rx='2.5'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E") center / contain no-repeat; }
.topbar .button { height: 30px; padding: 0 11px; }

.content-shell { max-width: none; padding: 20px 24px 48px; }
.view-panel.active { animation: rise .22s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.notice { padding: 10px 14px; border-radius: var(--radius); font-size: 12.5px; }

/* ---------- surfaces ---------- */
.panel { border-radius: var(--radius); border-color: var(--line); box-shadow: var(--shadow); }
.status-pill { padding: 2px 8px; border-radius: 6px; font-size: 11.5px; }
.status-pill::before { width: 5px; height: 5px; }
.status-beta { color: var(--warn); background: var(--warn-bg); box-shadow: inset 0 0 0 1px #fedf89; }
.status-ok { box-shadow: inset 0 0 0 1px #abefc6; }
.status-pending { box-shadow: inset 0 0 0 1px #fecdca; }

/* ---------- buttons ---------- */
.button { height: var(--control); padding: 0 13px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; gap: 6px; }
.button svg { width: 15px; height: 15px; }
.button-primary { background: var(--brand-600); box-shadow: 0 1px 2px rgba(16, 24, 40, .1), inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 0 1px rgba(16, 24, 40, .06); }
.button-primary:hover { background: var(--brand-700); }
.button-primary:disabled { background: #b2c6f5; box-shadow: none; cursor: not-allowed; }
.button-light { background: #fff; color: var(--ink-2); border-color: var(--field); box-shadow: var(--shadow-sm); }
.button-light:hover { background: var(--soft); color: var(--ink); border-color: #c0c7d2; }
.button:active { transform: translateY(.5px); }
.icon-button { width: 32px; height: 32px; border-radius: var(--radius-sm); border-color: var(--field); }
.icon-button:hover { background: var(--soft); color: var(--ink); border-color: #c0c7d2; }
.link-button { color: var(--brand-600); border-radius: 5px; }
.link-button:hover { background: var(--brand-50); color: var(--brand-700); }

/* ---------- form controls: one height, one border, one focus ring ---------- */
.product-filter-bar select, .product-filter-bar input, .wk-field select, .wk-field input[type=search],
.rp-tools select, .rp-tools input[type=search], .toolbar input, .toolbar select, .md-toolbar input,
.dataset-select, .build-bar input, .user-create input, .user-create .dataset-select, #masterFilters .dataset-select,
.scope-block select, .select {
  height: var(--control); border: 1px solid var(--field); border-radius: var(--radius-sm); background-color: #fff;
  color: var(--ink); font-size: 13px; font-weight: 500; box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.product-filter-bar select:hover, .product-filter-bar input:hover, .wk-field select:hover, .wk-field input[type=search]:hover,
.rp-tools select:hover, .rp-tools input[type=search]:hover, .toolbar select:hover, .toolbar input:hover,
.md-toolbar input:hover, .dataset-select:hover { border-color: #b9c1cd; }
.product-filter-bar select:focus, .product-filter-bar input:focus, .wk-field select:focus, .wk-field input[type=search]:focus,
.rp-tools select:focus, .rp-tools input[type=search]:focus, .toolbar input:focus, .toolbar select:focus, .md-toolbar input:focus,
.build-bar input:focus, .user-create input:focus, .dataset-select:focus {
  outline: 0; border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-ring);
}
input::placeholder { color: var(--faint); font-weight: 400; }
.combo-input { font-size: 13px; }
.combo:focus-within > select { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-ring); }
.combo-list { padding: 4px; border-radius: 9px; border-color: var(--line); box-shadow: var(--shadow-pop); }
.combo-list li { padding: 5px 9px; border-radius: 5px; }
.combo-list li:hover, .combo-list li.is-active { background: var(--brand-50); color: var(--brand-700); }

/* Field labels: quiet, small, consistent. */
.product-filter-bar label, .wk-field, .rp-tools label, .toolbar label, .build-bar label, .user-create label {
  gap: 5px; color: var(--muted); font-size: 11.5px; font-weight: 500;
}

/* ---------- tabs: one segmented control everywhere ---------- */
.rp-tabs, .tabs {
  gap: 2px; padding: 3px; border: 0; border-radius: 9px; background: #eceff3; box-shadow: inset 0 0 0 1px rgba(16, 24, 40, .03);
}
.rp-tabs { margin-bottom: 14px; }
.rp-tabs button, .tabs button {
  padding: 5px 14px; border-radius: 7px; color: var(--muted); font-size: 13px; font-weight: 550; line-height: 1.5;
}
.rp-tabs button:hover, .tabs button:hover { background: rgba(255, 255, 255, .55); color: var(--ink); }
.rp-tabs button[aria-selected=true], .tabs button[aria-selected=true] {
  background: #fff; color: var(--ink); font-weight: 600;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 0 0 1px rgba(16, 24, 40, .05);
}

/* ---------- chips & toggles ---------- */
.product-group-chip, .wk-chip {
  height: 26px; padding: 0 10px; border-radius: 6px; border-color: var(--line); background: #fff;
  color: var(--ink-2); font-size: 12px; font-weight: 500; box-shadow: none;
}
.product-group-chip:hover, .wk-chip:hover { border-color: #c0c7d2; background: var(--soft); }
.product-group-chip.on, .wk-chip.on { border-color: var(--brand-200); background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.wk-chip strong { font-size: 12.5px; }
.product-group-chip.rp-hg-chip { box-shadow: inset 3px 0 0 var(--band-ink); }
.product-group-chip.rp-hg-chip.on { border-color: color-mix(in srgb, var(--band-ink) 35%, transparent); }
.product-groups-label { color: var(--muted); font-weight: 500; font-size: 11.5px; }

/* ---------- toolbars ---------- */
.product-filter-bar { gap: 10px 12px; padding: 12px 16px; }
.product-filter-bar label { min-width: 150px; flex: 0 1 210px; }
.product-filter-bar label:has(input) { flex: 1 1 240px; max-width: 420px; }
.product-filter-bar button { height: var(--control); }
.product-filter-bar input { padding-left: 32px; background-position: 10px center; }
.product-groups { padding: 10px 16px 0; gap: 5px; }
.product-coverage { padding: 8px 16px; font-size: 12px; background: #fff; border-bottom: 1px solid var(--line-soft); }
.product-coverage::before { width: 5px; height: 5px; }
.wk-toolbar { margin-bottom: 12px; }
.wk-toolbar-row { gap: 8px 10px; padding: 10px 14px; }
.wk-toolbar-sub { padding-top: 9px; padding-bottom: 9px; }
.wk-meta { padding: 7px 14px; border-radius: 0 0 var(--radius) var(--radius); font-size: 11.5px; }
.wk-actions .button { height: var(--control); }
.rp-tools { gap: 8px 12px; }
.toolbar { padding: 12px 16px; }
.md-toolbar { padding: 10px 14px; }

/* ---------- data tables ---------- */
.data-table, .rp-table, .wk-matrix, .product-table, .plan-table, .table-scroll table { font-feature-settings: "tnum" 1; }
.data-table thead th, .rp-table thead th, .wk-matrix thead th, .plan-table thead th, .table-scroll thead th {
  background: var(--soft); color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .01em;
}
.data-table th { border-bottom-color: var(--line); }
.data-table td, .rp-table th, .rp-table td, .wk-matrix th, .wk-matrix td, .table-scroll th, .table-scroll td { border-color: var(--line-soft); }
.data-table tbody tr:hover td, .rp-table tbody tr:hover td, .rp-table tbody tr:hover th,
.wk-matrix tbody tr[data-line]:hover td, .wk-matrix tbody tr[data-line]:hover th,
.table-scroll tbody tr:hover td, .product-table tbody tr:hover td:first-child { background: var(--hover); }
.data-table td strong { font-weight: 600; }
.rp-table td.rp-bad, .rp-drawer-table td.rp-bad, .wk-matrix td.wk-bad { background: #fef3f2; color: #b42318; }
.rp-table td.rp-warn, .wk-matrix td.wk-warn { background: #fffaeb; color: #93370d; }
/* RM Coverage: Balance months shaded by Months Covered (rules green / yellow lines); below 0 in red figures */
.rp-table td.rm-g { background: #ecfdf3; color: #067647; }
.rp-table td.rm-y { background: #fffaeb; color: #93370d; }
.rp-table td.rm-r { background: #fef3f2; color: #b42318; }
.rp-table td.rm-neg { color: #b42318; }
.rp-table.rp-summary thead tr:first-child th.rm-wrap { white-space: normal; }
/* RM Coverage colour buttons: the same dot chips as Column groups, in the cells' colours */
.product-group-chip.rm-chip-g { --band-ink: #067647; --band-leaf: #ecfdf3; }
.product-group-chip.rm-chip-y { --band-ink: #b54708; --band-leaf: #fffaeb; }
.product-group-chip.rm-chip-r, .product-group-chip.rm-chip-neg { --band-ink: #b42318; --band-leaf: #fef3f2; }
.wk-key-bad { background: #fef3f2; color: #b42318; }
.wk-key-warn { background: #fffaeb; color: #93370d; }
table.is-resizable thead th.col-pinned, .rp-table thead .rp-sticky, .product-table th.product-key { background: var(--soft); }
.col-resizer:hover, .is-col-resizing .col-resizer:active { background: var(--brand-500); width: 3px; right: -1px; }

/* Column-group bands: calmer tints, each group marked by a fine top rule in its ink. */
.product-table .product-band-0, .rp-hg-0 { --band-top: #eaf1ff; --band-leaf: #f6f9ff; --band-ink: #1a45c2; }
.product-table .product-band-1 { --band-top: #e6f4fb; --band-leaf: #f5fbfe; --band-ink: #0b5f86; }
.product-table .product-band-2, .rp-hg-2 { --band-top: #efecfc; --band-leaf: #f8f7fe; --band-ink: #5235b0; }
.product-table .product-band-3, .rp-hg-1 { --band-top: #e5f5f1; --band-leaf: #f4fbf9; --band-ink: #0f6b5c; }
.product-table .product-band-4 { --band-top: #ebedfd; --band-leaf: #f7f8fe; --band-ink: #3b3fb0; }
.product-table .product-band-5, .rp-hg-4 { --band-top: #eef1f5; --band-leaf: #f8f9fb; --band-ink: #3d4a5c; }
.rp-hg-3 { --band-top: #fdeee9; --band-leaf: #fef8f6; --band-ink: #a23b12; }
.product-table thead tr:first-child th.product-band, .rp-summary thead tr:first-child th.rp-hg { box-shadow: inset 0 2px 0 var(--band-ink); }

.product-sheet h3 { padding: 10px 16px 8px; font-size: 13.5px; font-weight: 650; letter-spacing: -.005em; }
.product-sheet h3::before { width: 3px; height: 13px; background: var(--brand-600); }
.rp-family h3 { font-size: 14px; font-weight: 650; }

/* ---------- loading ---------- */
.loading-block { margin: 16px; padding: 36px 20px; border-radius: var(--radius); font-size: 12.5px; background: linear-gradient(90deg, var(--soft) 0%, #f1f4f9 45%, var(--soft) 90%); background-size: 200% 100%; }
.progress-track { height: 6px; background: var(--brand-100); }
.progress-fill { background: linear-gradient(90deg, var(--brand-500), var(--brand-600)); }

/* ---------- drawer & modal ---------- */
.drawer-backdrop, .modal-backdrop { background: rgba(16, 24, 40, .28); backdrop-filter: blur(2px); }
.drawer { background: var(--bg); box-shadow: var(--shadow-lg); }
.drawer-head { padding: 16px 22px; }
.drawer-head h2 { font-size: 18px; font-weight: 650; }
.drawer-content { padding: 18px 22px; }
.section-kicker { color: var(--brand-600); font-size: 10.5px; letter-spacing: .08em; }
.detail-intro { border-radius: var(--radius); background: radial-gradient(120% 140% at 100% 0%, #3d74f5 0%, #2257e8 40%, #13319a 100%); box-shadow: 0 8px 20px -8px rgba(34, 87, 232, .45); }
.product-detail-section { padding: 16px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.product-detail-metric { border-radius: 8px; }
.modal-card { border-radius: 14px; box-shadow: var(--shadow-lg); }
.modal-card input { height: 38px; border-radius: 8px; border-color: var(--field); background: #fff; }

/* ---------- admin pages ---------- */
.intake-block { margin-bottom: 12px; }
.intake-head { padding: 14px 18px 0; gap: 9px; }
.intake-head h3 { font-size: 14px; font-weight: 650; }
.intake-body { padding: 12px 18px 16px; }
.step { width: 20px; height: 20px; font-size: 11px; background: var(--brand-50); color: var(--brand-700); box-shadow: inset 0 0 0 1px var(--brand-200); }
.area-grid { gap: 8px; }
.area-toggle { padding: 10px 12px 10px 40px; border-width: 1px; border-radius: 9px; }
.area-toggle strong { font-size: 13px; font-weight: 600; }
.area-toggle small { font-size: 11.5px; }
.area-toggle .check { left: 13px; width: 16px; height: 16px; border-radius: 4px; border-width: 1px; border-color: var(--field); }
.area-toggle.on { border-color: var(--brand-500); background: var(--brand-50); box-shadow: 0 0 0 3px var(--brand-ring); }
.drop-zone { padding: 24px 20px; border: 1.5px dashed #c3cbd8; border-radius: 10px; background: var(--soft); }
.drop-zone svg { width: 26px; height: 26px; color: var(--brand-600); }
.drop-zone strong { font-size: 13.5px; font-weight: 600; }
.drop-zone:hover, .drop-zone.over { border-color: var(--brand-500); background: var(--brand-50); }
.plan-row { border-radius: 7px; }
.build-card { border-radius: 10px; }
.md-rule { border-radius: 10px; }
.md-cell { border-color: var(--field); border-radius: 6px; }

/* ---------- item lookup ---------- */
.lk-search { padding: 10px 12px; }
.lk-search input { height: 40px; border-color: var(--field); border-radius: 8px; font-size: 14px; box-shadow: var(--shadow-sm); }
.lk-suggest { border-radius: 10px; box-shadow: var(--shadow-pop); }
.lk-head { padding: 14px 16px 0; }
.lk-head .lk-status-line { margin: 12px -16px 0; padding: 10px 16px; }
.lk-head > .lk-id { padding-bottom: 14px; }
.lk-head:has(.lk-status-line) > .lk-id { padding-bottom: 0; }
.lk-head h2 { font-size: 20px; font-weight: 650; }
.lk-tag { border-radius: 6px; }
.lk-card header { padding: 10px 14px 8px; }
.lk-card h3 { font-size: 13.5px; font-weight: 650; }

.count { padding: 3px 10px; border-radius: 6px; font-size: 12px; }
.tone-0 { background: #eaf1ff !important; color: #1a45c2 !important; }
.tone-1 { background: #e6f4fb !important; color: #0b5f86 !important; }
.tone-2 { background: #efecfc !important; color: #5235b0 !important; }
.tone-3 { background: #e5f5f1 !important; color: #0f6b5c !important; }
.tone-4 { background: #ebedfd !important; color: #3b3fb0 !important; }
.tone-5 { background: #eef1f5 !important; color: #3d4a5c !important; }
.source-card { border-radius: 12px; box-shadow: var(--shadow-pop); }

/* ---------- collapsed sidebar ---------- */
@media (min-width: 761px) {
  html.sidebar-collapsed { --sidebar: 60px; }
  html.sidebar-collapsed .sidebar { padding: 14px 8px 12px; }
  html.sidebar-collapsed .nav-item { padding: 9px 0; }
  html.sidebar-collapsed .nav-label { margin: 10px 8px; }
}
@media (max-width: 760px) {
  .topbar { height: 52px; padding: 0 12px; }
  .top-crumb, #batchLabel { display: none !important; }
  .content-shell { padding: 14px 12px 32px; }
  .product-filter-bar label, .product-filter-bar label:has(input) { flex: 1 1 100%; max-width: none; }
}

/* Column-group toggles carry their band colour as a small swatch. */
.product-group-chip.rp-hg-chip, .product-group-chip.rp-hg-chip.on { box-shadow: none; }
.product-group-chip.rp-hg-chip::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 2px; background: var(--band-ink); vertical-align: 1px; opacity: .85; }
.product-group-chip.rp-hg-chip.on { background: var(--band-leaf); color: var(--band-ink); }

/* Coverage colours keep the workbook's hues, a step softer so long rows stay readable. */
:root { --cov-fg: #c9edd3; --cov-etd: #e8f5cf; --cov-raw: #dde9ff; --cov-short: #fcdfcd; }

/* KPI chips (All BO, Japan WIP): label + figure, flat. */
.rp-chips { gap: 6px; }
.rp-chips .wk-chip { min-width: 0; height: 28px; padding: 0 11px; }

/* Item drawer header card: white, a fine blue rule, tags as quiet chips. */
.detail-intro { background: #fff; color: var(--ink); border: 1px solid var(--line); border-top: 2px solid var(--brand-600); box-shadow: var(--shadow-sm); }
.detail-intro p { font-weight: 600; }
.detail-intro small { color: var(--muted); }
.product-intro-tags span { background: var(--brand-50); color: var(--brand-700); font-weight: 500; border-radius: 6px; }

/* Board header: view tabs on the left, Excel export on the right (ui.exportMenu) */
.rp-headbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rp-head-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.rp-head-tools .xp { margin-left: 0; }
/* board history (ui.versionPicker): the week picker beside Export, and the banner for an older week */
.vp { width: 170px; }
.vp select { width: 100%; height: 34px; }
.vp-note { display: flex; align-items: center; gap: 12px; margin: 10px 0 0; }
.xp { position: relative; flex: none; margin-left: auto; }
.xp-toggle svg { width: 15px; height: 15px; }
.xp-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: min(240px, calc(100vw - 32px)); display: grid; gap: 6px;
  padding: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); }
.xp-pop[hidden] { display: none; }
.xp-head strong { display: block; color: var(--ink); font-size: 14px; }
.xp-head small { display: block; margin: 2px 0 4px; color: var(--faint); font-size: 11.5px; }
.xp-option { display: flex; gap: 9px; align-items: center; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px;
  cursor: pointer; color: var(--ink); font-size: 13px; font-weight: 600; transition: background-color .15s, border-color .15s; }
.xp-option:hover { background: var(--soft); }
.xp-option:has(input:checked) { border-color: var(--brand-200); background: var(--brand-50); }
.xp-option input { margin: 0; accent-color: var(--brand-600); }
.xp-error { margin: 0; color: var(--bad); font-size: 12px; }
.xp-actions { display: flex; justify-content: flex-end; margin-top: 4px; }
/* while exporting the button fills up with the percentage (--xp: 0–100) */
.xp-go.is-running { min-width: 124px; opacity: 1; font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, var(--brand-600) calc(var(--xp, 0) * 1%), var(--brand-200) 0); transition: none; }
