/* Nazar: chalk paper, kohl ink, nazar-cobalt accent. Green/amber/red carry meaning only. */
:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --line: #e6e3dc;
  --line-strong: #d6d2c8;
  --ink: #12141a;
  --ink-2: #3d4250;
  --muted: #737a87;
  --accent: #1f3db8;        /* Nazar Cobalt */
  --accent-hover: #142a86;  /* Deep Cobalt */
  --accent-soft: #e8ecfb;
  --accent-ink: #ffffff;
  --glass: #8fd3e8;         /* Amulet Glass */
  --good: #0c7a56;          /* in stock, discount, done */
  --good-soft: #e3f2eb;
  --red: #c2372c;
  --red-soft: #fdeceb;
  --amber: #a85a06;
  --amber-soft: #fdf1df;
  --glass-soft: #eaf6fa;    /* Amulet Glass, tinted: what changed */
  --glass-ink: #0e5a72;
  --tint: rgba(31, 61, 184, 0.07); /* cobalt wash for tracks */
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 22, 28, 0.04), 0 6px 20px rgba(20, 22, 28, 0.05);
  --focus: 0 0 0 3px rgba(31, 61, 184, 0.18);
  --display: 'Bricolage Grotesque', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color-scheme: light;
  font: 15px/1.5 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: 'cv11', 'ss01', 'tnum';
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
a { color: var(--accent); }
h1 { font-family: var(--display); font-size: 21px; font-weight: 750; letter-spacing: -0.03em; margin: 0; }
h2 { font-family: var(--display); font-size: 17px; font-weight: 700; margin: 0; letter-spacing: -0.015em; }
p { margin: 0; }
code { font: 13px/1.4 ui-monospace, 'SF Mono', Menlo, monospace; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 16px; }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 36px; height: 36px; flex: none; display: block; border-radius: 9px; box-shadow: 0 2px 8px rgba(31, 61, 184, 0.28); }
.brand-mark img { width: 100%; height: 100%; display: block; }
.wordmark { font-family: var(--display); font-weight: 800; letter-spacing: -0.045em; font-size: 24px; line-height: 1; color: var(--ink); }
.brand-sub { font-size: 13px; color: var(--muted); margin-top: 1px; }

/* ---------- controls ---------- */
button, .btn {
  font: inherit; font-size: 14px; font-weight: 550;
  height: 38px; padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
button:hover { background: var(--surface-2); border-color: rgba(31, 61, 184, 0.35); color: var(--accent-hover); }
button:active { transform: translateY(1px); }
button:focus-visible { outline: none; box-shadow: var(--focus); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 2px rgba(31, 61, 184, 0.25); }
button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button.danger { color: var(--red); }
button.danger:hover { background: var(--red-soft); border-color: #efc2bd; }
button.ghost { border-color: transparent; background: transparent; }
button.ghost:hover { background: var(--surface-2); border-color: var(--line); }
button.sm { height: 32px; padding: 0 12px; font-size: 13px; }
button:disabled { opacity: .55; cursor: default; transform: none; }

input, select, textarea {
  font: inherit; font-size: 14px; font-weight: 400; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 0 12px; height: 40px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 10px 12px; line-height: 1.45; resize: vertical; font: 13px/1.5 ui-monospace, 'SF Mono', Menlo, monospace; }
select { width: auto; padding-right: 32px; appearance: none; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23737a87' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center; }
input::placeholder, textarea::placeholder { color: #a3a8b1; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; padding: 0; accent-color: var(--accent); cursor: pointer; flex: none; }

label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 550; color: var(--ink-2); }
label.check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.hint { font-size: 13px; color: var(--muted); }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.card-head .hint { flex: 1; }
.empty { padding: 40px 24px; text-align: center; color: var(--muted); font-size: 14px; }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--amber-soft); color: #6b3a05; font-size: 14px; border: 1px solid #f3dcb8; }
.banner a { color: inherit; font-weight: 600; }
.msg { font-size: 13px; color: var(--muted); min-height: 18px; }

/* ---------- tables ---------- */
table { border-collapse: separate; border-spacing: 0; width: 100%; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
tr:last-child td { border-bottom: none; }
.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }

/* ---------- platform identity ---------- */
.pf { display: inline-flex; align-items: center; gap: 8px; font-weight: 550; }
.pf-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }

/* ---------- thumbnails ---------- */
.thumb { flex: none; border-radius: 10px; background: #f1efe9; border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center; }
.thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.thumb span { font-size: 13px; font-weight: 650; color: var(--muted); letter-spacing: .02em; }
.with-thumb { display: flex; align-items: center; gap: 12px; }

/* ---------- prices ---------- */
.price { font-family: var(--display); font-size: 18px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.price:hover { text-decoration: underline; text-underline-offset: 3px; }
.mrp { color: var(--muted); text-decoration: line-through; font-size: 13px; margin-left: 6px; }
.meta { display: flex; align-items: center; gap: 6px; margin-top: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }

.pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.off { background: var(--good-soft); color: var(--good); }
.pill.oos { background: var(--red-soft); color: var(--red); }
.pill.map { background: var(--amber-soft); color: var(--amber); }
.pill.neutral { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.pill.ok { background: var(--good-soft); color: var(--good); }

.state { font-size: 13px; color: var(--muted); }
.state.err { color: var(--red); font-weight: 550; }
.state small { display: block; color: var(--muted); font-weight: 400; margin-top: 2px; }

.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--good); display: inline-block; box-shadow: 0 0 0 3px var(--good-soft); }
.dot-live.running { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(12,122,86,.08); } }

pre { white-space: pre-wrap; word-break: break-all; font: 12.5px/1.55 ui-monospace, 'SF Mono', Menlo, monospace; max-height: 320px; overflow: auto; background: #fbfaf7; color: var(--ink-2); padding: 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); margin: 0; }
details summary { cursor: pointer; font-size: 13px; color: var(--muted); font-weight: 550; }
details[open] summary { margin-bottom: 10px; }

/* Recent changes */
.chg { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.chg.down { background: var(--accent-soft); color: var(--accent); }
.chg.up { background: var(--amber-soft); color: var(--amber); }
.chg.out { background: var(--red); color: #fff; }
.chg.back { background: var(--good); color: #fff; }
.was { font-size: 12px; color: var(--muted); }
.was s { text-decoration: line-through; }
td.cell.changed { background: var(--glass-soft) !important; box-shadow: inset 3px 0 0 var(--accent); }
td.cell.changed.fresh { animation: flash 1.6s ease-out 2; }
@keyframes flash { 0%, 100% { background: var(--glass-soft); } 40% { background: #c6eaf5; } }
.chip.changed { background: var(--glass-soft); border-color: var(--glass); box-shadow: inset 3px 0 0 var(--accent); }
.changes-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 12px; border-radius: 12px; background: var(--glass-soft); border: 1px solid #bfe5f1; font-size: 13px; color: var(--glass-ink); }
.changes-bar b { color: var(--accent-hover); }
.changes-bar button { height: 30px; font-size: 12px; }
.pill.varies { background: var(--surface); color: var(--glass-ink); border: 1px dashed var(--glass); }
td.cell.varies { background: #f5fbfd !important; }
.chip .val .pill { margin-left: 6px; }

/* ---- First-load animation ---- */
@keyframes shimmer { 0% { background-position: -160px 0; } 100% { background-position: 160px 0; } }
.skeleton { display: inline-block; height: 12px; width: 52px; border-radius: 6px; vertical-align: middle;
  background: linear-gradient(90deg, #ebe8e1 0px, #f8f6f1 40px, #ebe8e1 80px) #ebe8e1; background-size: 320px 100%;
  animation: shimmer 1.2s linear infinite; }
.chip.loading { border-style: dashed; }
.chip.loading .icon-btn { animation: spin 1s linear infinite; pointer-events: none; opacity: .6; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes popin { 0% { transform: scale(.9); opacity: .2; box-shadow: 0 0 0 0 rgba(12,122,86,.45); }
  60% { transform: scale(1.04); opacity: 1; box-shadow: 0 0 0 6px rgba(12,122,86,0); } 100% { transform: scale(1); } }
.chip.just-in, td.cell.just-in > * { animation: popin .55s cubic-bezier(.2,.9,.3,1.2); }

.run-progress { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(20,22,28,.04); }
.run-progress .label { font-size: 14px; font-weight: 600; white-space: nowrap; }
.run-progress .label small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 2px; }
.run-progress .bar { flex: 1; height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.run-progress .fill { height: 100%; border-radius: 999px; transition: width .5s ease;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 10px, #2f52d6 10px 20px); background-size: 28px 100%;
  animation: stripes .8s linear infinite; }
@keyframes stripes { to { background-position: 28px 0; } }
.run-progress .pct { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); min-width: 42px; text-align: right; }
.radar { width: 26px; height: 26px; border-radius: 50%; position: relative; flex: none; background: var(--accent-soft); }
.radar::before, .radar::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); animation: ping 1.6s ease-out infinite; }
.radar::after { animation-delay: .8s; }
@keyframes ping { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton, .chip.loading .icon-btn, .run-progress .fill, .radar::before, .radar::after, .chip.just-in, td.cell.just-in > * { animation: none; } }
.size-tag { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; margin-left: 6px; border-radius: 5px; font-size: 11px; font-weight: 700; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); }
.meta .size-tag { margin-left: 0; }
.size-tag.mismatch { background: var(--red-soft); color: var(--red); border-color: #f1b8b0; }
.size-tag.mismatch::before { content: '⚠︎ '; }

/* ---- First-load overlay: blur the page until every new price is in ---- */
.load-overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  background: rgba(245, 244, 240, .55); backdrop-filter: blur(14px) saturate(1.05); -webkit-backdrop-filter: blur(14px) saturate(1.05);
  animation: ov-in .45s ease both; }
.load-overlay[hidden] { display: none; }
.load-overlay.closing { animation: ov-out .55s ease forwards; }
@keyframes ov-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ov-out { to { opacity: 0; visibility: hidden; } }
.load-card { width: 400px; max-width: calc(100vw - 40px); background: #fff; border: 1px solid rgba(20,22,28,.07); border-radius: 22px;
  padding: 40px 36px 34px; text-align: center; box-shadow: 0 1px 1px rgba(20,22,28,.03), 0 24px 60px -12px rgba(20,22,28,.16);
  animation: card-in .6s cubic-bezier(.16,1,.3,1) both; }
@keyframes card-in { from { transform: translateY(8px); opacity: 0; } }
.seeker-scene { width: 250px; margin: -4px auto 0; }
.seeker-scene svg { display: block; width: 100%; height: auto; }
.seeker-scene .cards { animation: cards 2.8s linear infinite; }
@keyframes cards { to { transform: translateX(-32px); } }
.seeker-scene .person { animation: breathe 2.8s ease-in-out infinite; }
@keyframes breathe { 50% { transform: translateY(-1.2px); } }
.seeker-scene .arm { transform-box: view-box; transform-origin: 83px 60px; animation: scan 2.8s cubic-bezier(.45,0,.55,1) infinite alternate; }
@keyframes scan { from { transform: rotate(-5deg); } to { transform: rotate(6deg); } }
.seeker-scene .head { transform-box: view-box; transform-origin: 76px 50px; animation: follow 2.8s cubic-bezier(.45,0,.55,1) infinite alternate; }
@keyframes follow { from { transform: rotate(-3deg); } to { transform: rotate(3.5deg); } }
.seeker-scene .eye { transform-box: fill-box; transform-origin: center; animation: blink 4.6s infinite; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.12); } }
/* One calm tick per card passing under the glass, in step with the shelf (same 2.8s loop). */
.seeker-scene .tick { opacity: 0; transform-box: fill-box; transform-origin: center; animation: tick 2.8s ease-in-out infinite; }
@keyframes tick {
  0%, 30% { opacity: 0; transform: translateY(3px) scale(.92); }
  46%, 68% { opacity: 1; transform: none; }
  86%, 100% { opacity: 0; transform: translateY(-3px); }
}
.seeker-scene .mouth { animation: smile 2.8s ease-in-out infinite; }
@keyframes smile { 0%, 34%, 84%, 100% { d: path("M85.2 44 q2 1 3.8 -0.2"); } 48%, 68% { d: path("M84.6 43.4 q2.4 2.4 4.8 -0.2"); } }
.ov-total { display: grid; grid-template-columns: 1fr 40px; align-items: center; gap: 12px; margin-top: 20px; }
.ov-total .mini { height: 3px; border-radius: 3px; background: #ecebe6; overflow: hidden; }
.ov-total .mini span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .8s cubic-bezier(.16,1,.3,1); }
.ov-total b { font-size: 13px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.load-card h3 { margin: 14px 0 6px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.load-card .sub { color: var(--muted); font-size: 13px; min-height: 18px; font-variant-numeric: tabular-nums; }
.pf-progress { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); display: grid; gap: 14px; text-align: left; }
.pf-row { display: grid; grid-template-columns: 104px 1fr 44px; align-items: center; gap: 16px; font-size: 13px; }
.pf-row .name { color: var(--ink-2); font-weight: 500; }
.pf-row .mini { height: 2px; border-radius: 2px; background: #ecebe6; overflow: hidden; }
.pf-row .mini span { display: block; height: 100%; background: var(--accent); transition: width .8s cubic-bezier(.16,1,.3,1); }
.pf-row .cnt { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.pf-row.done .name { color: var(--muted); }
.pf-row.done .mini span { background: var(--good); }
.pf-row.done .cnt { color: var(--good); font-weight: 600; }
/* the list reveals row by row when loading finishes */
tr.reveal { animation: row-in .5s cubic-bezier(.2,.9,.3,1.1) both; }
@keyframes row-in { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } }
@media (prefers-reduced-motion: reduce) { .seeker-scene *, .load-card, tr.reveal { animation: none !important; } }
.pf-row .name small.note { display: block; font-size: 11px; color: var(--accent); font-weight: 500; margin-top: 1px; }
.pill.stale { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--line-strong); font-weight: 600; }
.btn-file { cursor: pointer; }

/* ---------- price history ---------- */
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--tint); border-radius: 10px; }
.seg button { height: 30px; border: none; background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 550; padding: 0 12px; border-radius: 8px; }
.seg button:hover { background: rgba(255,255,255,.6); }
.seg button.active { background: var(--surface); color: var(--accent); box-shadow: 0 1px 3px rgba(20,42,134,.16); }
.hx-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hx-top .hint { flex: 1; margin: 0; }
.hx-loc { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 550; }
.hx-loc[hidden] { display: none; }
.hx-head { align-items: center; }
.hx-head .hint { flex: 1; }
.hx-head select { max-width: 360px; height: 34px; font-weight: 600; }
.hx-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.hx-key { height: 30px; gap: 8px; padding: 0 10px; font-size: 13px; font-weight: 550; border-radius: 999px; background: var(--surface-2); border-color: var(--line); }
.hx-key i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.hx-key b { font-weight: 700; font-variant-numeric: tabular-nums; }
.hx-key b.oos { color: var(--red); }
.hx-key b.none { color: var(--muted); font-weight: 500; }
.hx-key.off { opacity: .45; }
.hx-key.off i { background: transparent !important; box-shadow: inset 0 0 0 1.5px var(--muted); }
.hx-chart { position: relative; min-height: 300px; }
.hx-chart svg { display: block; overflow: visible; }
.hx-grid { stroke: var(--line); stroke-width: 1; }
.hx-grid.v { stroke-dasharray: 2 4; opacity: .7; }
.hx-axis { font: 500 11.5px var(--font, Inter, sans-serif); fill: var(--muted); font-variant-numeric: tabular-nums; }
.hx-line { fill: none; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.hx-line.oos { stroke-dasharray: 3 5; stroke-width: 2; opacity: .55; }
.hx-bench line { stroke: var(--amber); stroke-width: 1.5; stroke-dasharray: 6 5; }
.hx-bench text { font: 600 11.5px var(--font, Inter, sans-serif); fill: var(--amber); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.hx-cross { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.hx-dot { stroke: #fff; stroke-width: 2; pointer-events: none; }
.hx-hit { cursor: pointer; }
.hx-tip { position: absolute; pointer-events: none; min-width: 210px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(20,22,28,.14); padding: 10px 12px; font-size: 13px; display: grid; gap: 6px; z-index: 2; }
.hx-tip[hidden] { display: none; }
.hx-tip-head { font-weight: 650; color: var(--ink); }
.hx-tip-row { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; }
.hx-tip-row i { width: 10px; height: 10px; border-radius: 50%; }
.hx-tip-row b { font-variant-numeric: tabular-nums; }
.hx-tip-row b.oos { color: var(--red); }
.hx-tip-row b.none { color: var(--muted); font-weight: 500; }
.hx-tip-foot { font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 6px; }
.hx-foot { margin: 0; }
.hx-date { display: inline-flex; align-items: center; gap: 4px; }
.hx-date input { width: 160px; height: 34px; }
.hx-date .icon-btn { width: 32px; height: 32px; font-size: 18px; }
.hx-date .icon-btn:disabled { opacity: .3; pointer-events: none; }
.hx-date button[hidden] { display: none; }
.hx-table-wrap { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: auto; }
.hx-table td { padding: 12px 14px; vertical-align: top; }
.hx-table tbody tr { cursor: pointer; transition: background .12s; }
.hx-table tbody tr:hover { background: var(--surface-2); }
.hx-table tbody tr.sel { background: var(--accent-soft); }
.hx-table tbody tr:last-child td { border-bottom: none; }
.hx-cell { white-space: nowrap; }
.hx-cell.none, .hx-cell.na { color: var(--muted); }
.hx-price { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.hx-cell.below .hx-price { color: var(--amber); }
.hx-sub { display: flex; flex-direction: column; gap: 1px; margin-top: 3px; font-size: 12px; color: var(--muted); }
.hx-sub.map { color: var(--amber); font-weight: 600; }
.hx-sub .oos { color: var(--red); font-weight: 600; }
.pill.sm { height: 18px; padding: 0 6px; font-size: 11px; }

/* ---------- brand surfaces: cobalt where the brand sheet puts it ---------- */
.masthead { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--accent) 0%, #1a35a3 60%, var(--accent-hover) 100%); color: #fff; border-radius: 18px; padding: 20px 24px; box-shadow: 0 14px 34px -16px rgba(20, 42, 134, 0.6); }
/* Jaali: a lattice of overlapping circles, like a carved screen you look through. Fades in from the right. */
.masthead::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 45% 120% at 92% 0%, rgba(143, 211, 232, 0.32), transparent 70%); }
.masthead::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .2;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cg fill='none' stroke='white' stroke-width='1'%3E%3Ccircle cx='0' cy='0' r='22'/%3E%3Ccircle cx='44' cy='0' r='22'/%3E%3Ccircle cx='0' cy='44' r='22'/%3E%3Ccircle cx='44' cy='44' r='22'/%3E%3Ccircle cx='22' cy='22' r='22'/%3E%3Ccircle cx='22' cy='22' r='3'/%3E%3Ccircle cx='0' cy='0' r='3'/%3E%3Ccircle cx='44' cy='0' r='3'/%3E%3Ccircle cx='0' cy='44' r='3'/%3E%3Ccircle cx='44' cy='44' r='3'/%3E%3C/g%3E%3C/svg%3E") repeat right center / 44px 44px;
  -webkit-mask-image: linear-gradient(to left, #000 0%, rgba(0,0,0,.55) 30%, transparent 62%);
          mask-image: linear-gradient(to left, #000 0%, rgba(0,0,0,.55) 30%, transparent 62%); }
.masthead > * { position: relative; z-index: 1; }
.masthead .wordmark { color: #fff; }
.masthead .brand-sub { color: #cfd7ff; }
.masthead .brand-mark { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.35), 0 4px 14px rgba(8, 18, 70, 0.35); }
.masthead button { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.28); color: #fff; }
.masthead button:hover { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.masthead button.primary { background: #fff; border-color: #fff; color: var(--accent); box-shadow: 0 1px 2px rgba(8, 18, 70, 0.25); }
.masthead button.primary:hover { background: #eef1fc; color: var(--accent-hover); }
.masthead select { border-color: transparent; }

/* Product search */
.search { position: relative; display: flex; align-items: center; gap: 12px; }
.search .field { position: relative; flex: 1; max-width: 420px; }
.search .field svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search input[type=search] { width: 100%; padding-left: 36px; padding-right: 34px; background: var(--surface); }
.search input[type=search]::-webkit-search-cancel-button { cursor: pointer; }
.search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 11px; font-weight: 600; line-height: 1; font-family: inherit; color: var(--muted); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 3px 6px; background: var(--surface-2); pointer-events: none; }
.search input:focus ~ kbd, .search input:not(:placeholder-shown) ~ kbd { display: none; }
.search .count { font-size: 13px; color: var(--muted); white-space: nowrap; }
.search .count b { color: var(--ink-2); font-weight: 600; }
mark.hit { background: var(--glass-soft); color: inherit; border-radius: 3px; box-shadow: 0 0 0 1px rgba(143,211,232,.7); }

/* Team sync */
.t-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.t-role { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface); }
.t-role:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.t-role input { margin-top: 2px; }
.t-role b { display: block; font-size: 14px; }
.t-role small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.4; }
.t-new summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 13.5px; }
.t-conn { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; background: var(--glass-soft); border: 1px solid rgba(143,211,232,.8); }
.t-conn.bad { background: var(--red-soft); border-color: #f3c4bf; }
.t-conn .ico { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 800; font-size: 15px; }
.t-conn .what { flex: 1; min-width: 0; }
.t-conn .what b { display: block; font-size: 14.5px; }
.t-conn .what small { display: block; color: var(--ink-2); font-size: 12.5px; margin-top: 2px; }
.t-conn .what .err { color: var(--red); }
.t-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: var(--surface); border: 1px dashed var(--accent); border-radius: 8px; padding: 8px 10px; user-select: all; word-break: break-all; }
@media (max-width: 720px) { .t-roles { grid-template-columns: 1fr; } }
.banner.info { background: var(--glass-soft); color: var(--glass-ink); border-color: rgba(143,211,232,.8); }
.banner.info b { color: var(--accent-hover); }

/* Recent changes: each one opens the product on that app */
a.ev-link { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }
a.ev-link:hover { color: var(--accent); border-bottom-color: currentColor; }
a.ev-link .ev-go { color: var(--muted); font-size: 12px; }
a.ev-link:hover .ev-go { color: var(--accent); }
