/* Jadu — PC Refresh trading desk. Palette from a circuit board: solder-mask green, gold pads, silkscreen ink, LED cyan. */
:root {
  --bg: #0f2a26; --bg-2: #13332e; --bg-3: #184039; --bg-4: #1e4b43;
  --line: #24534b; --line-2: #2f645b;
  --ink: #e8ede4; --ink-2: #b2c5bb; --ink-3: #7f9a90;
  --gold: #d9b44a; --gold-2: #f0cd6a; --gold-ink: #1b1606; --gold-wash: rgba(217, 180, 74, .12);
  --cyan: #62c9d6; --cyan-wash: rgba(98, 201, 214, .12);
  --red: #e5615a; --red-wash: rgba(229, 97, 90, .13);
  --wts: #62c9d6; --wtb: #e9a85b;
  --r-s: 5px; --r-m: 9px; --r-l: 14px;
  --rail: 236px; --top: 60px;
  --shadow: 0 18px 48px rgba(3, 14, 12, .45);
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #eef2ea; --bg-2: #ffffff; --bg-3: #f5f8f2; --bg-4: #e7ede3;
  --line: #d3ddd1; --line-2: #bfcdbd;
  --ink: #12352f; --ink-2: #44655b; --ink-3: #6f8a80;
  --gold: #a57f0f; --gold-2: #8a6908; --gold-ink: #fffaf0; --gold-wash: rgba(165, 127, 15, .1);
  --cyan: #12808e; --cyan-wash: rgba(18, 128, 142, .09);
  --red: #c2413a; --red-wash: rgba(194, 65, 58, .08);
  --wts: #12808e; --wtb: #b8641a;
  --shadow: 0 18px 48px rgba(18, 53, 47, .14);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--font); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 3px; }
::selection { background: var(--gold); color: var(--gold-ink); }
h1, h2, h3, h4 { margin: 0; font-weight: 650; font-stretch: 82%; letter-spacing: .005em; }
h1 { font-size: 30px; line-height: 1.15; }
h2 { font-size: 21px; line-height: 1.25; }
h3 { font-size: 16.5px; line-height: 1.3; }
p { margin: 0 0 .75em; max-width: 72ch; }
.num, .fig { font-stretch: 75%; font-weight: 650; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.nowrap { white-space: nowrap; }
.hide { display: none !important; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.gap-s { gap: 6px; } .gap-l { gap: 18px; }
.mt { margin-top: 14px; } .mt-l { margin-top: 26px; } .mb { margin-bottom: 14px; }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: var(--rail) 1fr; grid-template-rows: var(--top) 1fr; min-height: 100vh; }
.rail { grid-row: 1 / 3; background: var(--bg-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { height: var(--top); display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.brand-name { font-size: 22px; font-weight: 750; font-stretch: 70%; letter-spacing: .02em; }
.brand-sub { font-size: 12px; color: var(--ink-3); line-height: 1.1; }
.nav { padding: 10px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: var(--r-s); color: var(--ink-2); font-weight: 500; text-decoration: none; position: relative; }
.nav a:hover { background: var(--bg-3); color: var(--ink); }
.nav a.on { background: var(--gold-wash); color: var(--ink); }
.nav a.on::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.nav a svg { width: 19px; height: 19px; flex: none; }
.nav .badge { margin-left: auto; }
.nav-sep { height: 1px; background: var(--line); margin: 10px 8px; }
.rail-foot { padding: 12px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }
.usage-jobs .bar-col { width: 22%; min-width: 60px; }
ul.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
table.breakdown { width: 100%; }
table.breakdown td, table.breakdown th { padding: 8px 10px; }
table.breakdown tr.total td { border-top: 1px solid var(--line-2, var(--line)); font-size: 14px; }
table.breakdown tr.hot td { background: var(--gold-wash); }
table.breakdown td.n, table.breakdown th.n { text-align: right; white-space: nowrap; }
table.breakdown .good { color: var(--cyan); }
table.breakdown .why-link { font-size: 12px; }
.contact-box { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--bg-3); }
.usage-bar { display: block; height: 8px; border-radius: 4px; background: var(--gold); opacity: .75; }
@media (max-width: 600px) { .usage-jobs .bar-col { display: none; } }
.rail-ver { margin-top: 4px; font-size: 11px; color: var(--ink-3); opacity: .8; }
.rail-ver .btn { margin-top: 2px; opacity: 1; }

.top { grid-column: 2; display: flex; align-items: center; gap: 14px; padding: 0 24px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 20; }
.menu-btn { display: none; }
.search { position: relative; flex: 1; max-width: 560px; }
.search input { width: 100%; padding-left: 38px; background: var(--bg-2); }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--ink-3); }
.search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 500 11px var(--font); color: var(--ink-3); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.search-pop { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-m); box-shadow: var(--shadow); max-height: 70vh; overflow: auto; padding: 6px; z-index: 40; }
.search-pop .grp { padding: 8px 10px 4px; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.search-pop a { display: block; padding: 8px 10px; border-radius: var(--r-s); color: var(--ink); text-decoration: none; }
.search-pop a:hover, .search-pop a.sel { background: var(--bg-3); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.leds { display: flex; gap: 6px; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 99px; cursor: pointer; color: var(--ink-2); font-size: 12.5px; }
.led { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.led.ok { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.led.warn { background: var(--gold); }
.led.bad { background: var(--red); }
.user-btn { display: flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 4px; border-radius: 99px; font: inherit; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-4); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--gold); border: 1px solid var(--line-2); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-m); box-shadow: var(--shadow); padding: 6px; z-index: 50; }
.menu button, .menu a { display: flex; width: 100%; gap: 10px; align-items: center; text-align: left; background: none; border: 0; color: var(--ink); font: inherit; padding: 9px 10px; border-radius: var(--r-s); cursor: pointer; text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--bg-3); }

.main { grid-column: 2; padding: 26px 28px 60px; min-width: 0; }
.page { max-width: 1320px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .lede { color: var(--ink-2); margin: 4px 0 0; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Jadu orb (gold pad with traces) ---------- */
.orb { width: 36px; height: 36px; flex: none; color: var(--gold); display: block; }
.orb .trace { stroke: currentColor; stroke-width: 1.4; fill: none; opacity: .75; stroke-dasharray: 3 3; }
.orb .pad { fill: currentColor; }
.orb .core { fill: var(--bg); stroke: currentColor; stroke-width: 2; }
.orb .eye { fill: currentColor; }
.thinking .orb .trace { animation: flow 1.1s linear infinite; opacity: 1; }
.thinking .orb .core { animation: glow 1.6s ease-in-out infinite; }
@keyframes flow { to { stroke-dashoffset: -12; } }
@keyframes glow { 50% { filter: drop-shadow(0 0 6px var(--gold)); } }
.orb-lg { width: 120px; height: 120px; }

/* ---------- surfaces ---------- */
.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-l); padding: 18px 20px; min-width: 0; }
.panel.flush { padding: 0; overflow: hidden; }
.panel.quiet { background: transparent; }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.panel-head h2, .panel-head h3 { margin-right: auto; }
.flush .panel-head { padding: 16px 20px 0; }
.grid { display: grid; gap: 18px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-main { grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr); }
.divider { height: 1px; background: var(--line); margin: 16px 0; }

/* ticker strip: today's figures as one instrument line */
.ticker { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; background: var(--bg-2); }
.ticker a { padding: 14px 16px; color: var(--ink); text-decoration: none; border-right: 1px solid var(--line); display: block; }
.ticker a:last-child { border-right: 0; }
.ticker a:hover { background: var(--bg-3); }
.ticker .fig { font-size: 30px; line-height: 1; display: block; }
.ticker .lbl { font-size: 12.5px; color: var(--ink-2); margin-top: 6px; display: block; }
.ticker .hot .fig { color: var(--gold); }

/* ---------- controls ---------- */
input, select, textarea { font: inherit; color: var(--ink); background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 9px 11px; min-height: 40px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-wash); }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; min-height: 0; accent-color: var(--gold); padding: 0; }
input[type=file] { padding: 7px; }
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--ink-2); font-weight: 500; }
label.field .hint { font-weight: 400; color: var(--ink-3); font-size: 12.5px; }
.fields { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check span { line-height: 1.35; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 14.5px var(--font); padding: 9px 16px; min-height: 40px; border-radius: var(--r-s); border: 1px solid var(--line-2); background: var(--bg-3); color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); text-decoration: none; }
/* any icon without its own size is text-sized (zero specificity: every rule above or below wins) */
:where(svg[viewBox="0 0 24 24"]) { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: none; }
.btn svg { width: 17px; height: 17px; }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.btn.primary:hover { background: var(--gold-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { color: var(--ink); background: var(--bg-3); }
.btn.danger { color: var(--red); }
.btn.danger:hover { border-color: var(--red); }
.btn.sm { padding: 5px 11px; min-height: 32px; font-size: 13.5px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.busy { pointer-events: none; opacity: .75; }
.btn.busy::after { content: ''; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-s); overflow: hidden; }
.seg button { font: 500 13.5px var(--font); background: transparent; color: var(--ink-2); border: 0; padding: 7px 13px; cursor: pointer; border-right: 1px solid var(--line-2); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--gold-wash); color: var(--ink); }

/* ---------- tags & status ---------- */
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font-size: 11.5px; font-weight: 700; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: var(--bg-4); color: var(--ink-2); white-space: nowrap; }
.tag.WTS { background: var(--cyan-wash); color: var(--wts); }
.tag.WTB { background: rgba(233, 168, 91, .14); color: var(--wtb); }
.tag.ok { background: var(--cyan-wash); color: var(--cyan); }
.tag.warn { background: var(--gold-wash); color: var(--gold); }
.tag.bad { background: var(--red-wash); color: var(--red); }
.conf-high, .conf-medium-high { color: var(--cyan); }
.conf-medium { color: var(--gold); }
.conf-medium-low, .conf-low, .conf-none { color: var(--red); }
.note { padding: 11px 14px; border-radius: var(--r-m); background: var(--bg-3); border: 1px solid var(--line); color: var(--ink-2); font-size: 14px; }
.note.warn { background: var(--gold-wash); border-color: transparent; color: var(--ink); }
.note.bad { background: var(--red-wash); border-color: transparent; color: var(--ink); }
.note.ok { background: var(--cyan-wash); border-color: transparent; color: var(--ink); }

/* ---------- tables & lists ---------- */
.table-wrap { overflow: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 12.5px; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--bg-2); z-index: 1; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; white-space: nowrap; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--bg-3); }
.list > * { padding: 12px 0; border-bottom: 1px solid var(--line); }
.list > *:last-child { border-bottom: 0; }
.empty { padding: 30px 18px; text-align: center; color: var(--ink-2); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }

/* feed: live market lines */
.feed-item { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: start; padding: 11px 20px; border-bottom: 1px solid var(--line); }
.feed-item:last-child { border-bottom: 0; }
.feed-item.fresh { animation: fresh 2.4s ease-out; }
@keyframes fresh { from { background: var(--gold-wash); } to { background: transparent; } }
.feed-item .price { font-stretch: 75%; font-weight: 650; font-size: 17px; text-align: right; }

/* connection row */
.conn { display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; align-items: start; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--bg-2); }
.conn-ico { width: 44px; height: 44px; border-radius: 11px; background: var(--bg-4); display: grid; place-items: center; color: var(--gold); }
.conn-ico svg { width: 22px; height: 22px; }
.conn-body { min-width: 0; }
.conn-body > h3 { margin-bottom: 2px; }
.conn-status { display: inline-flex; gap: 7px; align-items: center; font-size: 13.5px; color: var(--ink-2); }
.conn-detail { margin-top: 16px; }
.qr { width: 240px; height: 240px; background: #fff; border-radius: 10px; padding: 10px; }
.steps-help { margin: 8px 0 0; padding-left: 20px; color: var(--ink-2); font-size: 14px; }
.steps-help li { margin-bottom: 4px; }
.groups { max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-m); }
.groups label { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.groups label:last-child { border-bottom: 0; }

/* chat */
.chat { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; padding: 4px 2px; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; line-height: 1.45; font-size: 14.5px; }
.bubble.in { align-self: flex-end; background: var(--gold); color: var(--gold-ink); border-bottom-right-radius: 4px; }
.bubble.out { align-self: flex-start; background: var(--bg-3); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.wait { color: var(--ink-3); font-style: italic; }
.composer { display: flex; gap: 8px; margin-top: 12px; }

/* wizard */
.wizard { max-width: 760px; margin: 0 auto; padding: 36px 20px 80px; }
.wiz-steps { display: flex; gap: 6px; margin: 18px 0 28px; list-style: none; padding: 0; flex-wrap: wrap; }
.wiz-steps li { flex: 1; min-width: 90px; font-size: 12.5px; color: var(--ink-3); }
.wiz-steps li::before { content: ''; display: block; height: 4px; border-radius: 4px; background: var(--line); margin-bottom: 7px; }
.wiz-steps li.done::before { background: var(--cyan); }
.wiz-steps li.on { color: var(--ink); font-weight: 600; }
.wiz-steps li.on::before { background: var(--gold); }
.wiz-foot { display: flex; gap: 10px; margin-top: 26px; align-items: center; }

/* sign in */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background:
  radial-gradient(1200px 600px at 85% -10%, rgba(217, 180, 74, .07), transparent 60%), var(--bg); }
.auth-box { width: 100%; max-width: 400px; }
.auth-box .panel { padding: 28px; }
.auth-mark { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }

/* modal & toast */
.overlay { position: fixed; inset: 0; background: rgba(4, 14, 12, .62); display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; z-index: 100; padding: 20px; }
.modal { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-l); box-shadow: var(--shadow); width: 100%; max-width: 640px; max-height: 88vh; display: flex; flex-direction: column; }
.modal.wide { max-width: 1080px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin-right: auto; font-size: 19px; }
.modal-body { padding: 20px; overflow: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.toasts { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: var(--r-m); box-shadow: var(--shadow); font-weight: 500; max-width: 380px; }
.toast.bad { background: var(--red); color: #fff; }

/* charts */
.spark { width: 100%; height: 170px; display: block; }
.spark .ax { stroke: var(--line); }
.spark text { fill: var(--ink-3); font: 11px var(--font); }

/* responsive */
@media (max-width: 1100px) {
  .cols-main, .cols-3 { grid-template-columns: 1fr; }
  .ticker { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ticker a:nth-child(3) { border-right: 0; }
  .ticker a:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: fixed; left: 0; top: 0; z-index: 60; width: 260px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .rail.open { transform: none; }
  .top, .main { grid-column: 1; }
  .top { padding: 0 14px; gap: 10px; }
  .menu-btn { display: inline-flex; }
  .main { padding: 18px 16px 70px; }
  .cols-2 { grid-template-columns: 1fr; }
  .search kbd { display: none; }
  .conn { grid-template-columns: 1fr; }
  .conn-ico { display: none; }
  h1 { font-size: 25px; }
  .bubble { max-width: 92%; }
}
@media (max-width: 520px) {
  .ticker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ticker a { border-bottom: 1px solid var(--line); }
  .ticker a:nth-child(2n) { border-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ===================== v7 screens ===================== */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot .orb { opacity: .9; }
.boot .orb .trace { animation: flow 1.1s linear infinite; }
.boot { gap: 18px; align-content: center; }
.boot-msg { max-width: 34ch; margin: 0; padding: 0 16px; text-align: center; color: var(--ink-2); font-size: 14px; }
.offline { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px 16px; text-align: center; }
.offline h1 { margin: 8px 0 0; font-size: 26px; font-weight: 700; font-stretch: 112%; }
.offline p { margin: 0; max-width: 46ch; color: var(--ink-2); }
.offline p.muted { color: var(--ink-3); font-size: 13.5px; }
.offline b { color: var(--gold-2); font-weight: 650; }
.loading { padding: 40px 0; color: var(--ink-3); text-align: center; }
.mt-s { margin-top: 8px; }
h4 { font-size: 14.5px; font-weight: 650; margin: 0; }
.lede { color: var(--ink-2); }
.page.narrow { max-width: 920px; }
.err { color: var(--red); font-size: 13.5px; min-height: 1px; }
.err:empty { display: none; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.clamp1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 420px; }
ul.tight { margin: 6px 0 0; padding-left: 18px; }
ul.tight li { margin: 2px 0; }
.quote { border-left: 2px solid var(--line-2); padding-left: 10px; margin: 8px 0 10px; white-space: pre-wrap; word-break: break-word; }

/* shell bits */
.brand { color: var(--ink); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand .orb { width: 30px; height: 30px; }
.scrim { display: none; }
.jadu-btn { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; padding: 4px 12px 4px 6px; border-radius: 99px; border: 1px solid var(--line); font-weight: 600; font-stretch: 85%; }
.jadu-btn:hover { text-decoration: none; border-color: var(--gold); }
.jadu-btn .orb { width: 26px; height: 26px; }
.jadu-btn.thinking { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-wash); }
.menu-who { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.main:focus { outline: none; }
.orb-md { width: 54px; height: 54px; }

/* connections */
.conn-actions { display: flex; gap: 8px; }
.qr-wrap { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.choice { display: flex; gap: 10px; flex-wrap: wrap; }
.choice-item { flex: 1; min-width: 170px; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r-m); cursor: pointer; }
.choice-item span { display: flex; flex-direction: column; gap: 2px; }
.choice-item:has(input:checked) { border-color: var(--gold); background: var(--gold-wash); }
.choice-item.off { opacity: .55; cursor: not-allowed; }
details.howto > summary { cursor: pointer; color: var(--gold); font-size: 14px; font-weight: 500; list-style: none; }
details.howto > summary::-webkit-details-marker { display: none; }
details.howto > summary::before { content: '+ '; }
details.howto[open] > summary::before { content: '– '; }
.sites { border: 1px solid var(--line); border-radius: var(--r-m); }
.site { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.site:last-child { border-bottom: 0; }
.site .conn-status { font-size: 13px; }

/* wizard */
.wiz-bg { place-items: start center; }
.wiz-bg .wizard { width: 100%; }
.wizard h1 { font-size: 34px; font-stretch: 78%; }
.ready-row { display: flex; gap: 14px; align-items: flex-start; }
.tick { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-wash); color: var(--gold); flex: none; }
.tick.ok { background: var(--cyan-wash); color: var(--cyan); }
.tick svg { width: 17px; height: 17px; }

/* home */
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 var(--cyan); animation: pulse 2.4s ease-out infinite; margin-right: auto; margin-left: -4px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(98, 201, 214, .5); } 70% { box-shadow: 0 0 0 9px rgba(98, 201, 214, 0); } 100% { box-shadow: 0 0 0 0 rgba(98, 201, 214, 0); } }
.feed { max-height: 760px; overflow-y: auto; }
a.feed-item { color: var(--ink); text-decoration: none; }
a.feed-item:hover { background: var(--bg-3); text-decoration: none; }
.need { display: block; color: var(--ink); text-decoration: none; }
a.need:hover { text-decoration: none; }
a.need:hover b { color: var(--gold); }
.jadu-card .panel-head .orb { width: 30px; height: 30px; }
.jadu-card .panel-head h2 { margin-right: auto; }
.composer input { flex: 1; min-width: 0; }
.composer .btn { flex: none; }

/* jadu */
.chat-panel { display: flex; flex-direction: column; }
.chat-panel .chat { min-height: 380px; max-height: 62vh; }
.chat .empty { margin: auto; }

/* figures strip (bids, prices) */
.bid-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--line); border-radius: var(--r-l); background: var(--bg-2); overflow: hidden; }
.bid-figs > div { padding: 14px 18px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bid-figs > div:last-child { border-right: 0; }
.bid-figs .lbl { font-size: 12.5px; color: var(--ink-2); }
.bid-figs .fig { font-size: 28px; line-height: 1.1; }
.bid-figs .fig.small-fig { font-size: 17px; line-height: 1.5; }
.bid-figs .fig-s { font-size: 21px; }
.bid-figs .hot { background: var(--gold-wash); }
.bid-figs .hot .fig { color: var(--gold); }
.bid-figs.compact .fig { font-size: 22px; }
.bid-figs.compact > div { padding: 10px 14px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-size: 14px; margin-bottom: 10px; }
.back svg { width: 16px; height: 16px; }
.table-wrap.tall { max-height: 640px; }
tr.flag-row td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
input.cell { width: 92px; min-height: 32px; padding: 4px 8px; text-align: right; font-stretch: 85%; font-weight: 600; }
details.why summary { cursor: pointer; color: var(--ink-3); width: max-content; }
details.why ul { margin: 4px 0 0; padding-left: 16px; }

/* deals */
.deal-head { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.deal-math { display: flex; border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.deal-math > div { padding: 8px 14px; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.deal-math > div:last-child { border-right: 0; }
.deal-math .fig { font-size: 21px; line-height: 1.15; }
.deal-math .win { background: var(--cyan-wash); }
.deal-math .win .fig { color: var(--cyan); }
.deal-side { padding: 14px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--bg-3); min-width: 0; }
.deal-side textarea { background: var(--bg-2); min-height: 88px; }

/* market */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 12px 14px; }
.filters select { width: auto; }
.search-in { position: relative; flex: 1 1 260px; }
.search-in svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-3); }
.search-in input { padding-left: 34px; }

/* prices */
.parts-row { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: start; }
.parts { display: flex; flex-wrap: wrap; gap: 6px; }
.parts > span { display: flex; flex-direction: column; align-items: flex-start; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r-s); min-width: 70px; line-height: 1.25; }
.parts b { font-stretch: 80%; font-size: 16px; }

@media (max-width: 820px) {
  .scrim { position: fixed; inset: 0; background: rgba(4, 14, 12, .55); z-index: 55; }
  .scrim.on { display: block; }
  .jadu-btn span { display: none; }
  .jadu-btn { padding: 4px; }
  .deal-math { width: 100%; }
  .deal-math > div { flex: 1; }
  .parts-row { grid-template-columns: 1fr; gap: 4px; }
  .bid-figs > div { border-bottom: 1px solid var(--line); }
  .wizard h1 { font-size: 27px; }
  .qr { width: 220px; height: 220px; }
}

/* fixes after review */
.top .menu-btn { display: none; }
.fields { align-items: end; }
.panel-head h2:has(+ .live-dot) { margin-right: 0; }
.setup-note { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.wizard .lede { margin-top: 6px; }
@media (max-width: 820px) {
  .top .menu-btn { display: inline-flex; }
  .leds .leds-txt { display: none; }
  .leds span.led { display: block; }
}
.note svg { width: 16px; height: 16px; vertical-align: -3px; flex: none; }
.grid > * { min-width: 0; }
.live-dot { margin-left: 2px; }
.setup-note .grow { flex: 1 1 300px; }

/* ===================== v8: CRM, sourcing, analytics, voice ===================== */
:root { --s1: #00a8b8; --s2: #cb7d34; --s3: #9881d9; --s4: #6ea44e; --s5: #cc6f9d; }
:root[data-theme="light"] { --s1: #00829d; --s2: #a35303; --s3: #6c5cb1; --s4: #3e7d2f; --s5: #a14876; }
.page.wide { max-width: none; }
.ci { width: 14px; height: 14px; vertical-align: -2px; }
.flip { transform: scaleX(-1); }
.late { color: var(--red); }
.pre { white-space: pre-wrap; }
.strike { text-decoration: line-through; color: var(--ink-3); }
select.sm { min-height: 32px; padding: 4px 8px; font-size: 13.5px; width: auto; }
.avatar.xl { width: 56px; height: 56px; font-size: 22px; }
.avatar.sq { border-radius: 14px; color: var(--gold); }
.avatar.sq svg { width: 26px; height: 26px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--ink-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tabs a svg { width: 17px; height: 17px; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--gold); }
.unit-in { display: flex; align-items: center; gap: 8px; }
.unit-in span { color: var(--ink-3); font-size: 13px; min-width: 40px; }

/* pipeline board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-l); padding: 10px; min-height: 240px; transition: border-color .15s, background .15s; }
.col.over { border-color: var(--gold); background: var(--gold-wash); }
.col header { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 6px 10px; }
.cards { display: flex; flex-direction: column; gap: 8px; }
.card { background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--r-m); padding: 10px 12px; cursor: grab; }
.card:hover { border-color: var(--line-2); }
.card.dragging { opacity: .45; }
.card h3 { font-size: 15px; margin: 6px 0 2px; font-stretch: 90%; }
.card .next { margin-top: 6px; color: var(--ink-2); }
.drop-hint { text-align: center; padding: 18px 0; }
.tag.k-itad { background: var(--cyan-wash); color: var(--cyan); }
.tag.k-rfp { background: var(--gold-wash); color: var(--gold); }
.tag.k-bid { background: rgba(233, 168, 91, .14); color: var(--wtb); }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.timeline li:last-child { border-bottom: 0; }
.tl-ico { width: 28px; height: 28px; border-radius: 50%; background: var(--bg-4); display: grid; place-items: center; color: var(--ink-2); }
.tl-ico svg { width: 15px; height: 15px; }
.tl-note .tl-ico, .tl-call .tl-ico { color: var(--gold); }
.tl-unsubscribe .tl-ico { color: var(--red); }
.deal-link { display: flex; flex-direction: column; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-s); color: var(--ink); text-decoration: none; }
.deal-link:hover { border-color: var(--line-2); text-decoration: none; }
.task-row { padding: 4px 0; }

/* tasks */
.add-task { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px; }
.add-task input[name=title] { flex: 1 1 260px; }
.add-task input[type=datetime-local] { flex: 0 1 230px; }
.task-line { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.task-line:last-child { border-bottom: 0; }
.task-line input[type=checkbox] { margin-top: 3px; }
.task-line.late .small { color: var(--red); }

/* drafts & sourcing */
.ci-inline { vertical-align: -3px; }
.choice-item b svg { width: 15px; height: 15px; vertical-align: -2px; }
.script h4 { margin-top: 12px; color: var(--gold); }
.script p, .script ul { margin: 4px 0 0; }
.script ul { padding-left: 18px; }
.call-log { border-top: 1px solid var(--line); padding-top: 12px; }
.lead-list .lead { display: flex; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.lead-list .lead:last-child { border-bottom: 0; }
.watch { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.watch:last-child { border-bottom: 0; }
.hits { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; }
.hits li { margin: 3px 0; }
.pick { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); padding: 10px 4px; cursor: pointer; font: inherit; }
.pick:hover { background: var(--bg-3); }

/* analytics */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.tile { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.tile .lbl { font-size: 13px; color: var(--ink-2); }
.tile .val { font-size: 34px; font-weight: 650; font-stretch: 75%; line-height: 1.1; font-variant-numeric: proportional-nums; }
.viz-body { transition: opacity .2s; }
.viz-body.refetch { opacity: .5; }
.viz { width: 100%; height: auto; display: block; overflow: visible; }
.viz .grid { stroke: var(--line); stroke-width: 1; }
.viz .tick { fill: var(--ink-3); font: 11.5px var(--font); }
.viz .end { fill: var(--ink-2); font: 600 12px var(--font); }
.viz .dot { stroke: var(--bg-2); stroke-width: 2; }
.viz .xhair { stroke: var(--ink-3); stroke-width: 1; }
.viz:focus-visible { outline: 2px solid var(--gold); }
.viz .col:hover, .viz .col:focus { filter: brightness(1.15); outline: none; }
.viz-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.viz-legend span { display: inline-flex; align-items: center; gap: 7px; }
.viz-key { display: inline-block; width: 14px; height: 3px; border-radius: 2px; }
.viz-key.box { width: 10px; height: 10px; border-radius: 3px; }
.viz-key.dash { background: repeating-linear-gradient(90deg, currentColor 0 5px, transparent 5px 8px); }
.trend-up { color: var(--ok, #6fd3a5); } .trend-down { color: var(--bad, #f08b8b); }
.viz-tip { position: fixed; z-index: 300; display: none; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-m); box-shadow: var(--shadow); padding: 8px 10px; font-size: 13px; pointer-events: none; min-width: 140px; }
.viz-tip-h { color: var(--ink-3); font-size: 12px; margin-bottom: 4px; }
.viz-tip-r { display: flex; align-items: center; gap: 8px; }
.viz-tip-r b { font-variant-numeric: tabular-nums; }
.viz-tip-r span:last-child { color: var(--ink-2); }
.viz-table { margin-top: 10px; font-size: 13px; }
.viz-table summary { cursor: pointer; color: var(--ink-3); }
.viz-table table { margin-top: 6px; }
.spk { width: 100%; max-width: 220px; height: 36px; }
.spk .grid { stroke: var(--line); }
.spk .dot { stroke: var(--bg-2); stroke-width: 2; }
.multiples .mult { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 220px); gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.multiples .mult:hover { text-decoration: none; background: var(--bg-3); }
.mult-l { display: flex; flex-direction: column; min-width: 0; }
.mult-l b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.delta.up { color: var(--cyan); }
.delta.down { color: var(--red); }
.hbars { display: flex; flex-direction: column; gap: 8px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 32%) 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; }
.hbar-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-t { height: 14px; }
.hbar-b { display: block; height: 14px; border-radius: 0 4px 4px 0; }
.hbar-v { font-variant-numeric: tabular-nums; white-space: nowrap; }
.fly { display: flex; flex-direction: column; gap: 6px; }
.fly-row { display: grid; grid-template-columns: 48px 1fr minmax(110px, 190px) 1fr 48px; gap: 8px; align-items: center; font-size: 13.5px; padding: 2px 0; border-radius: 4px; }
.fly-row:hover, .fly-row:focus { background: var(--bg-3); outline: none; }
.fly-t { height: 16px; display: flex; }
.fly-t.l { justify-content: flex-end; }
.fly-b { height: 16px; display: block; }
.fly-b.l { border-radius: 4px 0 0 4px; }
.fly-b.r { border-radius: 0 4px 4px 0; }
.fly-m { text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fly-v { font-variant-numeric: tabular-nums; }
.fly-v.l { text-align: right; }
@media (max-width: 820px) {
  .board { grid-auto-columns: 82%; }
  .fly-row { grid-template-columns: 36px 1fr minmax(80px, 110px) 1fr 36px; font-size: 12.5px; }
  .hbar { grid-template-columns: minmax(80px, 38%) 1fr auto; }
}

/* ---------- Jadu live (voice) ---------- */
.live { max-width: 1500px; margin: 0 auto; }
.live-top { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.live-top .actions { margin-left: auto; display: flex; gap: 8px; }
.live-top h1 { font-size: 34px; font-stretch: 70%; letter-spacing: .02em; }
.live[data-mode="command"] #lvState { color: var(--cyan); font-weight: 600; }
.live-grid { display: grid; grid-template-columns: minmax(220px, 270px) minmax(0, 1fr) minmax(240px, 310px); gap: 18px; align-items: start; }
.live-col { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px; min-height: 420px; }
.live-col h2 { font-size: 17px; margin-bottom: 10px; }
.brain-wrap { border: 1px solid var(--line); border-radius: var(--r-l); padding: 14px 14px 18px; background: repeating-linear-gradient(0deg, transparent 0 23px, rgba(98, 201, 214, .05) 23px 24px), repeating-linear-gradient(90deg, transparent 0 23px, rgba(98, 201, 214, .05) 23px 24px), var(--bg); }
.brain { width: 100%; height: auto; display: block; }
.brain .tr { fill: none; stroke: var(--line-2); stroke-width: 2; }
.brain .tr-pulse { fill: none; stroke: var(--gold); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 0 10000; filter: drop-shadow(0 0 4px var(--gold)); }
.brain .node rect { fill: var(--bg-3); stroke: var(--line-2); stroke-width: 1.5; transition: stroke .3s; }
.brain .node.hit rect { stroke: var(--gold); }
.brain .node-led { fill: var(--ink-3); }
.brain .node-led.ok { fill: var(--cyan); filter: drop-shadow(0 0 3px var(--cyan)); }
.brain .node-led.warn { fill: var(--gold); }
.brain .node-led.bad { fill: var(--red); }
.brain .node-l { fill: var(--ink); font: 600 17px var(--font); }
.brain .node-s { fill: var(--ink-3); font: 14px var(--font); }
.brain .core .ring { fill: none; stroke: var(--gold); }
.brain .core .r3 { stroke-width: 1.5; stroke-dasharray: 4 7; opacity: .45; transform-box: fill-box; transform-origin: center; }
.brain .core .r2 { stroke-width: 1.5; opacity: .5; transform-box: fill-box; transform-origin: center; }
.brain .core .r1 { stroke-width: 3; fill: var(--bg-2); }
.brain .core .spokes line { stroke: var(--gold); stroke-width: 3; stroke-linecap: round; opacity: .8; }
.brain .core .eye { fill: var(--gold); transform-box: fill-box; transform-origin: center; }
.brain .core.off { filter: grayscale(1); opacity: .55; }
.live[data-mode="wake"] .core .r2 { animation: breathe 3.2s ease-in-out infinite; }
.live[data-mode="command"] .core .r2 { stroke: var(--cyan); opacity: 1; animation: breathe 1s ease-in-out infinite; }
.live[data-mode="command"] .core .eye { fill: var(--cyan); }
.live.thinking .core .r3 { opacity: 1; animation: spin 2.4s linear infinite; }
.live[data-mode="speaking"] .core .eye { animation: talk .45s ease-in-out infinite alternate; }
@keyframes breathe { 50% { transform: scale(1.06); opacity: .9; } }
@keyframes talk { from { transform: scale(.85); } to { transform: scale(1.15); } }
.live-ctl { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.btn.big { min-height: 52px; padding: 12px 26px; font-size: 17px; border-radius: 99px; }
.mic { width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--gold); color: var(--gold-ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 0 0 6px var(--gold-wash); }
.mic svg { width: 28px; height: 28px; }
.live[data-mode="command"] .mic { background: var(--cyan); box-shadow: 0 0 0 8px var(--cyan-wash); }
.live-type { flex: 1 1 320px; max-width: 460px; margin: 0; }
.alerts { display: flex; flex-direction: column; gap: 8px; max-height: 64vh; overflow-y: auto; }
.alert-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 9px 10px; border-radius: var(--r-m); background: var(--bg-3); font-size: 13.5px; animation: fresh 2.4s ease-out; }
.alert-item .tag { grid-column: 1 / -1; justify-self: start; font-size: 11.5px; }
.convo { max-height: 64vh; min-height: 300px; }
@media (max-width: 1100px) {
  .live-grid { grid-template-columns: 1fr; }
  .brain-wrap { order: -1; }
  .live-col { min-height: 0; }
}

.page-head .actions select, .panel-head select { width: auto; max-width: 60%; }
.fly-m a, .hbar-l a, .multiples .mult { color: var(--ink); }
.fly-m a:hover, .hbar-l a:hover { color: var(--gold); }
.links { display: flex; gap: 14px; flex-wrap: wrap; }
.btn.wrap { white-space: normal; text-align: left; height: auto; }

/* ===================== v9: post detail, inbox, price engine ===================== */
.post { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; }
.post-side { border-left: 1px solid var(--line); padding-left: 20px; }
.post .msg { white-space: pre-wrap; max-height: 260px; overflow: auto; font-size: 14px; color: var(--ink); }
.who { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.who b { font-size: 16px; }
.pending .row { margin-top: 8px; }
.kinds { flex-wrap: wrap; }
@media (max-width: 820px) { .post { grid-template-columns: 1fr; } .post-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 14px; } }

.inbox { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 18px; align-items: start; }
.ib-list { max-height: calc(100vh - 220px); overflow-y: auto; }
.ib-item { display: block; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.ib-item:hover { background: var(--bg-3); text-decoration: none; }
.ib-item.on { background: var(--gold-wash); box-shadow: inset 3px 0 0 var(--gold); }
.mt-xs { margin-top: 4px; }
.ib-read { min-height: 360px; }
.mail-body { white-space: pre-wrap; font-size: 14.5px; line-height: 1.55; max-width: 80ch; color: var(--ink); border-top: 1px solid var(--line); padding-top: 14px; overflow-wrap: anywhere; }
.atts { display: flex; flex-direction: column; gap: 6px; }
.att { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-s); }
.att a { display: inline-flex; gap: 6px; align-items: center; }
.att svg { width: 15px; height: 15px; }
@media (max-width: 900px) { .inbox { grid-template-columns: 1fr; } .ib-list { max-height: 50vh; } }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--gold); }
.pcell { font: inherit; font-weight: 650; font-stretch: 85%; color: var(--ink); background: transparent; border: 1px dashed transparent; border-radius: 4px; padding: 2px 6px; cursor: pointer; min-width: 64px; text-align: right; }
.pcell:hover { border-color: var(--gold); color: var(--gold); }
.pcell input { width: 84px; min-height: 28px; padding: 2px 6px; text-align: right; }
.pcell.saved { background: var(--cyan-wash); color: var(--cyan); }
.pager { padding: 12px 16px; border-top: 1px solid var(--line); }
.rule-lock { display: flex; gap: 8px; align-items: flex-start; }

/* the Jarvis screen lives in jarvis.css */
.ib-att { display: inline-flex; align-items: center; gap: 4px; }
.ib-att svg { width: 14px; height: 14px; }

/* ---------- v9.2 price engine: hand-set prices, AED ⇄ USD ---------- */
.formula { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13.5px; color: var(--ink-2); padding: 9px 14px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--bg-2); }
.formula b { color: var(--gold); font-weight: 650; }
.formula .faint { margin-left: auto; }
.pcell { display: inline-flex; align-items: center; gap: 5px; justify-content: flex-end; border-color: var(--line-2); }
.pcell svg { width: 13px; height: 13px; opacity: .45; }
.pcell:hover svg { opacity: 1; }
.mpair { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mpair label { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--bg); overflow: hidden; }
.mpair label:focus-within { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-wash); }
.mpair label span { font-size: 11.5px; font-weight: 650; letter-spacing: .04em; color: var(--ink-3); padding: 0 8px; border-right: 1px solid var(--line); align-self: stretch; display: flex; align-items: center; background: var(--bg-2); }
.mpair input { border: 0; background: transparent; width: 92px; min-height: 32px; padding: 4px 8px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; box-shadow: none; }
.mpair input:focus { outline: none; box-shadow: none; }
.mpair label:last-child input { color: var(--ink-2); font-weight: 500; }
.mpair-label { width: 100%; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.mpair.big input { width: 140px; min-height: 44px; font-size: 20px; }
.mpair.big label span { font-size: 12.5px; padding: 0 11px; }
.peditor .seg { align-self: flex-start; }
.peditor .when-note { margin: 0; display: flex; gap: 7px; align-items: flex-start; }
.peditor .when-note svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.peditor .cfg { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.calc:empty { display: none; }
.calc { border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px 14px; background: var(--bg-2); }
.calc-eq { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 10px; margin-bottom: 4px; }
.calc-eq i { font-style: normal; color: var(--ink-3); font-size: 18px; padding-bottom: 2px; }
.calc-eq .term { display: flex; flex-direction: column; min-width: 64px; }
.calc-eq .term small { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.calc-eq .term b { font-size: 18px; font-variant-numeric: tabular-nums; }
.calc-eq .term.strong b { color: var(--gold); }
.calc-line { display: flex; gap: 10px; flex-wrap: wrap; font-size: 14px; }
h2.sec { font-size: 15px; font-weight: 650; color: var(--ink-2); margin: 0 0 10px; }
.ptable table { width: 100%; }
.ptable th { position: static; background: transparent; }
.ptable td, .ptable th { padding-left: 8px; padding-right: 8px; }
.ptable td:first-child { width: 1%; white-space: nowrap; padding-right: 14px; }
.ptable .mpair { flex-wrap: nowrap; gap: 6px; }
.parts-ram { grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); }
.parts-drives { grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); }
.ptable td { padding-top: 5px; padding-bottom: 5px; vertical-align: middle; }
.ptable .mpair input { width: 76px; min-height: 30px; }
.ptable tr.dirty td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.ptable tr.dirty .mpair label { border-color: var(--gold); }
.ptable .addrow [data-newkey] { width: 96px; min-height: 30px; padding: 4px 8px; }
.ptable .addrow td { border-top: 1px dashed var(--line-2); }
.savebar { position: sticky; bottom: 14px; z-index: 5; display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 10px 12px 10px 16px; border: 1px solid var(--gold); border-radius: var(--r-m); background: var(--bg-3); box-shadow: var(--shadow); }
@media (max-width: 700px) {
  .formula .faint { margin-left: 0; }
  .mpair.big input { width: 110px; }
  .ptable .mpair input { width: 62px; }
  .ptable .mpair label span { padding: 0 6px; }
  .ptable th:nth-child(3), .ptable td:nth-child(3) { display: none; }
  .ptable .addrow [data-newkey] { width: 74px; padding: 4px 6px; }
  .ptable td:first-child { padding-right: 6px; }
  .ptable .mpair input { width: 66px; padding: 4px 6px; }
  .ptable.panel { padding-left: 12px; padding-right: 12px; }
}

/* ---------- v9.3 brain test steps ---------- */
.tsteps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.tsteps li { display: flex; gap: 10px; align-items: baseline; padding: 5px 0; border-top: 1px solid var(--line); }
.tsteps li svg { width: 13px; height: 13px; vertical-align: -1px; }
.tsteps li.bad > span:first-child { color: var(--ink); }
.bad-text { color: var(--red); }
.conn details .table-wrap table td:last-child { white-space: normal; overflow-wrap: anywhere; min-width: 180px; }
.tsteps li > span:first-child { overflow-wrap: anywhere; }

/* ---------- v9.7 Iron Mountain ---------- */
.ok-text { color: var(--cyan); }
.warn-text { color: var(--gold); }
.im-strip { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--bg-2); }
.im-strip.on { border-color: var(--cyan); box-shadow: inset 3px 0 0 var(--cyan); }
.im-strip .led { margin-top: 2px; }
.im-strip.on .led { animation: imBreath 2.4s ease-in-out infinite; }
@keyframes imBreath { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .im-strip.on .led { animation: none; } }
.im-list { display: flex; flex-direction: column; }
.im-row { display: flex; gap: 18px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); color: var(--ink); flex-wrap: wrap; }
.im-row:hover { background: var(--bg-3); text-decoration: none; }
.im-figs { display: flex; gap: 22px; }
.im-figs > div { display: flex; flex-direction: column; align-items: flex-end; min-width: 76px; }
.im-figs .lbl { font-size: 12px; color: var(--ink-3); }
.im-figs b { font-size: 18px; }
.im-st { min-width: 170px; text-align: right; }
.pips { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 7px; }
.pip { width: 11px; height: 11px; border-radius: 2px; border: 1px solid var(--line-2); background: transparent; }
.pip.priced { background: var(--gold-wash); border-color: var(--gold); }
.pip.go { background: var(--cyan-wash); border-color: var(--cyan); }
.pip.done { background: var(--cyan); border-color: var(--cyan); }
.pip.bad { background: var(--red); border-color: var(--red); }
.pip.off { opacity: .35; border-style: dashed; }
.im-approve .row { align-items: flex-end; gap: 16px; }
.im-approve .im-mval { width: 170px; }
.im-approve .im-mval input { font-size: 20px; font-weight: 650; font-stretch: 85%; }
.im-approve .grow { min-width: 200px; padding-bottom: 8px; }
.im-lots td { vertical-align: top; }
.im-lots td:first-child { width: 34px; }
.im-lots tr.im-lines > td { background: var(--bg-3); padding-top: 4px; padding-bottom: 12px; }
.im-lots tr.im-lines table { width: 100%; }
.im-lots tr.im-lines th { font-size: 12px; }
input.cell.typed { border-color: var(--gold); color: var(--gold); }
.im-log > summary { cursor: pointer; list-style: none; }
.im-log > summary::-webkit-details-marker { display: none; }
.im-loglist { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 2px; font-size: 13.5px; max-height: 420px; overflow: auto; }
.im-loglist li { display: grid; grid-template-columns: 118px 1fr; gap: 12px; padding: 5px 0; border-top: 1px solid var(--line); }
.im-setup { border-color: var(--gold); }
@media (max-width: 700px) {
  .im-row { padding: 12px 14px; gap: 10px; }
  .im-figs { width: 100%; justify-content: space-between; gap: 8px; }
  .im-figs > div { align-items: flex-start; min-width: 0; }
  .im-st { min-width: 0; text-align: left; }
  .im-loglist li { grid-template-columns: 1fr; gap: 0; }
  .im-approve .im-mval { width: 100%; }
}
.empty p { margin-left: auto; margin-right: auto; }
input.cell:disabled { opacity: .75; background: transparent; border-style: dashed; }

.im-live-btn { padding: 0; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--bg); cursor: zoom-in; line-height: 0; overflow: hidden; flex: none; }
.im-live { width: 200px; height: 132px; object-fit: cover; object-position: top left; }
.im-live-big { width: 100%; border: 1px solid var(--line); border-radius: var(--r-s); }
/* you drive: the portal page as a picture you click and type into */
.im-drive-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.im-drive-bar [data-msg] { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.im-drive { position: relative; line-height: 0; border: 1px solid var(--line-2); border-radius: var(--r-s); overflow: hidden; background: var(--bg-3); min-height: 200px; outline: none; text-align: center; }
.im-drive:focus-visible, .im-drive:focus-within { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-wash); }
/* the whole page fits on screen (the cookie box sits at the bottom); width/height auto keep clicks exact */
.im-drive img { display: inline-block; max-width: 100%; max-height: calc(100vh - 400px); min-height: 160px; width: auto; height: auto; cursor: pointer; user-select: none; -webkit-user-drag: none; }
.im-drive .im-tap { position: absolute; }
.im-tap { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border: 2px solid var(--gold); border-radius: 50%; pointer-events: none; animation: imtap .6s ease-out forwards; }
@keyframes imtap { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .im-tap { animation: none; opacity: .8; } }
.im-drive-type { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.im-drive-type input { flex: 1 1 180px; min-width: 0; }
@media (max-width: 700px) { .im-strip { flex-wrap: wrap; } .im-live-btn { width: 100%; } .im-live { width: 100%; height: auto; } }

/* price books: which market's prices you are looking at */
.market-bar { display: flex; width: fit-content; max-width: 100%; overflow-x: auto; }
.market-bar button { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; font-size: 14px; white-space: nowrap; }
.market-bar button.on { font-weight: 650; box-shadow: inset 0 -2px 0 var(--gold); }
.market-bar .badge, .tabs .badge { min-width: 18px; height: 18px; font-size: 11px; }
td.best-cell { background: var(--gold-wash); }
td.best-cell b, td.best-cell { color: var(--ink); }
ol.steps { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); }
ol.steps b { color: var(--ink); font-weight: 600; }
fieldset.radios, fieldset.mk-checks { border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 14px 12px; margin: 0; display: grid; gap: 8px; }
fieldset.radios legend, fieldset.mk-checks legend { padding: 0 6px; color: var(--ink-2); }
fieldset.mk-checks { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.sel { user-select: all; word-break: break-all; }
.shop-note { white-space: normal; line-height: 1.35; }
/* a chat with a seller or buyer: their messages left, ours right, the price check beside */
.chat.thread { max-height: 46vh; min-height: 160px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--bg-2); }
.bubble.them { align-self: flex-start; background: var(--bg-3); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.us { align-self: flex-end; background: var(--gold-wash); border: 1px solid var(--gold); border-bottom-right-radius: 4px; }
.bubble .when { display: block; margin-top: 4px; font-size: 11.5px; color: var(--ink-3); }
.price-check .lbl { display: block; font-size: 12.5px; color: var(--ink-2); }
.price-check .pc-their .fig { display: block; font-size: 26px; line-height: 1.15; }
.price-check .kv { grid-template-columns: max-content 1fr; gap: 5px 12px; }
table.clickable tbody tr { cursor: pointer; }
table.clickable tbody tr:hover td, table.clickable tbody tr:focus-visible td { background: var(--gold-wash); }
.mk-seg { flex-wrap: wrap; }
.price-panel { border: 1px solid var(--line); border-radius: var(--r-l); padding: 14px 16px; background: var(--bg-2); }
.price-panel h4 { margin: 0 0 4px; }
/* stock lists: a list you price and send */
input.title-in { font-size: 26px; font-weight: 650; background: transparent; border-color: transparent; padding: 4px 8px; margin-left: -8px; min-height: 0; }
input.title-in:hover { border-color: var(--line-2); }
input.num-in { width: 84px; min-height: 32px; padding: 4px 8px; text-align: right; font-weight: 600; }
input.num-in.need { border-color: var(--gold); background: var(--gold-wash); }
input.num-in::placeholder { color: var(--ink); opacity: .8; }
input.num-in.need::placeholder { color: var(--gold); }
input.num-in.typed { border-color: var(--gold); color: var(--gold); }
table.stock-lines tr.off td { opacity: .45; }
table.stock-lines tr.off td:first-child { opacity: 1; }
.add-line { flex-wrap: wrap; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.add-line input { flex: 1 1 120px; min-height: 34px; padding: 5px 9px; }
.msg-preview { white-space: pre-wrap; word-break: break-word; font: inherit; font-size: 13.5px; line-height: 1.45; margin: 0; padding: 12px 14px; max-height: 300px; overflow: auto;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--r-m); }
.mb-s { margin-bottom: 8px; }
.stock-title { flex: 1 1 320px; min-width: 0; }
input.title-in { width: 100%; }
table.stock-lines .spec-in { display: none; }
@media (max-width: 700px) {
  input.title-in { font-size: 21px; }
  table.stock-lines .spec-col { display: none; }
  table.stock-lines .spec-in { display: block; }
  table.stock-lines td, table.stock-lines th { padding-left: 8px; padding-right: 8px; }
  input.num-in { width: 64px; }
}
/* AI cost: today, this month, since the start */
.ai-cost-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ai-cost-figs > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ai-cost-figs .lbl { font-size: 12.5px; color: var(--ink-2); }
.ai-cost-figs .fig { font-size: 24px; line-height: 1.15; font-weight: 600; }
.ai-cost .panel-head { justify-content: space-between; }
/* a bid's margin and part prices */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px 24px; }
.pricing-grid h4 { margin: 0 0 6px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.price-rows { display: grid; gap: 4px; }
.price-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.price-row:last-child { border-bottom: 0; }
.price-row input.cell { width: 86px; }
.price-row .warn-text { white-space: nowrap; }
.price-row .units { display: block; font-size: 12px; color: var(--ink-3); }
#pricing .panel-head { flex-wrap: wrap; gap: 8px; }
/* History */
.hist-filters { gap: 10px; }
.hist-filters select { width: auto; }
table.hist-rows tr.repeat td { opacity: .62; }
.tag.us { background: color-mix(in srgb, var(--s3) 16%, transparent); color: var(--s3); }
.link-btn { background: none; border: 0; padding: 0; margin-left: 2px; color: inherit; cursor: pointer; display: inline-flex; }
.link-btn svg { width: 14px; height: 14px; }
button.link-tag { border: 0; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; }
button.link-tag:hover { color: var(--ink); }
.tiles.compact { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.tiles.compact .val { font-size: 26px; }
.tile .val.small-val { font-size: 16px; font-stretch: 100%; padding-top: 8px; }
.empty-state { padding: 26px 22px; }
.hist-pad { padding: 4px 20px 18px; }
@media (max-width: 700px) { .h-wide { display: none; } table.hist-rows { min-width: 600px; } .hist-rows td, .hist-rows th { padding-left: 8px; padding-right: 8px; } }
/* Email: The Broker Site broadcasts */
.ib-bar { gap: 10px; }
.ib-bar .search-in { min-width: 220px; max-width: 420px; }
.bc-item .tag { font-size: 11px; padding: 1px 7px; margin-right: 4px; }
.ib-goods { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.ib-goods::-webkit-scrollbar { display: none; }
.ib-goods button { white-space: nowrap; }
.ib-goods small { margin-left: 5px; font-size: 11.5px; }
.bc-acts .btn svg { width: 15px; height: 15px; }
/* Make an offer: the lines with our price and the price we offer (a row each; stacked on a phone) */
.of-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) 96px 124px 110px; gap: 6px 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.of-hd { font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 0 0 6px; }
.of-row .r { text-align: right; }
.of-row.faint > :not(.of-c) { opacity: .45; }
.of-c { margin: 0; }
.of-i { min-width: 0; overflow-wrap: anywhere; }
.of-in { width: 100%; text-align: right; font-variant-numeric: tabular-nums; }
.of-row [data-l]::before { content: attr(data-l); display: none; font-size: 11.5px; color: var(--ink-3); }
@media (max-width: 700px) {
  .of-hd { display: none; }
  .of-row { grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "c i i" ". p e" ". t t"; align-items: start; }
  .of-row .of-c { grid-area: c; margin-top: 2px; } .of-row .of-i { grid-area: i; } .of-row .of-p { grid-area: p; text-align: left; } .of-row .of-e { grid-area: e; text-align: left; } .of-row .of-t { grid-area: t; text-align: left; }
  .of-row [data-l]::before { display: block; }
}
.draft-att { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--gold-wash); }
.draft-att a { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; word-break: break-word; }
.draft-att svg { width: 15px; height: 15px; flex: none; }
.bc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.bc-card { background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px 18px; min-width: 0; }
.bc-card h3 { margin: 0 0 10px; font-size: 15px; }
.bc-dl { display: grid; grid-template-columns: minmax(96px, max-content) minmax(0, 1fr); gap: 7px 16px; margin: 0; }
.bc-dl dt { font-weight: 650; color: var(--ink); }
.bc-dl dd { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.bc-who { display: flex; flex-direction: column; gap: 2px; }
.bc-who b { font-size: 16px; }
.bid-figs .fig.small-fig { font-size: 16px; }
.contact-prices { max-height: 520px; overflow: auto; }
.bc-others { display: flex; flex-direction: column; }
.bc-others a { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 13.5px; }
.bc-others a:last-child { border-bottom: 0; }
.bc-others a:hover .grow { color: var(--gold); }

/* Price engine: phones and tablets grid, % rules */
.pcell.est { color: var(--ink-3); font-weight: 500; border-style: dashed; }
.pcell.est:hover { color: var(--gold); }
.devgrid td[rowspan] { vertical-align: top; padding-top: 12px; }
.devgrid tr.first td { border-top: 1px solid var(--line-2); }
.devgrid tbody tr:first-child td { border-top: 0; }
.pctin { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--bg); overflow: hidden; }
.pctin input { width: 64px; border: 0; background: transparent; text-align: right; min-height: 30px; padding: 4px 6px; font-weight: 600; font-variant-numeric: tabular-nums; box-shadow: none; }
.pctin input:focus { outline: none; box-shadow: none; }
.pctin span { padding: 0 9px 0 2px; color: var(--ink-3); font-size: 12.5px; font-weight: 600; }
.pctin:focus-within { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-wash); }
.rules-grid { align-items: start; }
.rules-grid > .stack > .panel { margin: 0; }
.rules-grid > .stack { gap: inherit; }

/* Email list: scrolls on its own (a flush panel hides overflow), older emails 100 at a time */
.panel.ib-list { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.ib-more { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; }
@media (max-width: 900px) { .panel.ib-list { max-height: 60vh; } }

/* Broadcast: what it's worth to us, first */
.bc-worth { display: flex; flex-wrap: wrap; gap: 14px 0; margin-top: 14px; padding: 16px 18px 12px; border: 1px solid var(--line-2); border-left: 4px solid var(--line-2); border-radius: var(--r-l); background: var(--bg-3); }
.bc-worth.good { border-left-color: var(--gold); }
.bc-worth.bad { border-left-color: var(--red); }
.bc-verdict { flex: 1 1 230px; display: flex; flex-direction: column; gap: 3px; padding-right: 18px; min-width: 0; }
.bc-verdict .lbl, .bc-figs .lbl { font-size: 12.5px; color: var(--ink-2); }
.bc-big { font-size: 30px; line-height: 1.1; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.bc-worth.good .bc-big { color: var(--gold); }
.bc-worth.bad .bc-big { color: var(--red); }
.bc-worth.none .bc-big { font-size: 22px; color: var(--ink-2); }
.bc-figs { flex: 2 1 300px; display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); align-self: center; }
.bc-figs > div { display: flex; flex-direction: column; gap: 1px; padding: 2px 16px; border-left: 1px solid var(--line); min-width: 0; }
.bc-figs b { font-size: 19px; font-variant-numeric: tabular-nums; }
.bc-figs b .faint { font-size: 12.5px; font-weight: 500; }
.bc-links { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding-top: 10px; border-top: 1px solid var(--line); }
/* a lot of several lines: one priced row per line */
.bc-lines { flex: 1 1 100%; overflow-x: auto; }
.bc-lines table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.bc-lines th { font-size: 12px; font-weight: 600; color: var(--ink-2); text-align: left; padding: 0 10px 6px 0; border-bottom: 1px solid var(--line); }
.bc-lines td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.bc-lines tr:last-child td { border-bottom: 0; }
.bc-lines .num { text-align: right; white-space: nowrap; }
.bc-lines td:nth-child(2) a { display: block; color: var(--ink); font-weight: 600; }
.bc-lines td:nth-child(2) a:hover { color: var(--gold); }
.bc-lines td:nth-child(2) .small { display: block; margin-top: 1px; }
.bc-lines .why-num { font-weight: 650; }
.bc-lines .lt-m { display: none; }
@media (max-width: 640px) {
  .bc-lines .lt { display: none; }
  .bc-lines .lt-m { display: block; }
  .bc-lines td:nth-child(2) { white-space: normal; }
}

@media (max-width: 640px) {
  .bc-verdict { padding-right: 0; }
  .bc-figs > div:first-child { border-left: 0; padding-left: 0; }
}

/* "How this price is made": every price you can click, and the window that shows the parts */
.why-num { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline dotted var(--ink-3); text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.why-num:hover, .why-num:focus-visible { color: var(--gold); text-decoration-color: var(--gold); }
.bc-big.why-num { text-align: left; }
.why-link { display: inline-flex; align-items: center; gap: 5px; }
.why-link svg { width: 14px; height: 14px; }
.pw { display: flex; flex-direction: column; gap: 14px; }
.pw-title { margin: 0; font-size: 15.5px; }
.pw-read { border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px 14px; background: var(--bg-2); }
.pw-read h4, .pw-calc h4 { margin: 0 0 8px; font-size: 13px; color: var(--ink-2); font-weight: 650; }
.pw-read dl { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; }
.pw-read dl > div { display: flex; flex-direction: column; min-width: 0; }
.pw-read dt { font-size: 12px; color: var(--ink-3); }
.pw-read dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.pw-read p { margin: 8px 0 0; }
.pw-calc { border: 1px solid var(--line-2); border-radius: var(--r-l); background: var(--bg-3); overflow: hidden; }
.pw-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 64px; gap: 4px 12px; align-items: start; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.pw-op { font-size: 18px; line-height: 1.2; color: var(--ink-3); font-weight: 700; text-align: center; }
.pw-what { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pw-what b { font-size: 13.5px; }
.pw-what span { color: var(--ink); overflow-wrap: anywhere; }
.pw-what small, .pw-amt small { color: var(--ink-3); font-size: 12px; }
.pw-amt { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.pw-amt b { font-size: 16px; }
.pw-row.minus .pw-amt b, .pw-row.minus .pw-op { color: var(--red); }
.pw-edit { align-self: center; justify-self: end; font-size: 13px; }
.pw-total { border-bottom: 0; background: var(--bg-4); border-top: 2px solid var(--line-2); }
.pw-total .pw-amt b { font-size: 22px; color: var(--gold); }
.pw-total .pw-what b { font-size: 15px; }
.pw-total .pw-what span { color: var(--ink-2); font-size: 12.5px; }
.pw-vs { margin: 0; }
.pw-vs .good { color: var(--gold); font-weight: 650; }
.pw-vs .bad { color: var(--red); font-weight: 650; }
.pw-warn { margin: 0; padding: 10px 14px 10px 30px; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: var(--r-m); background: var(--gold-wash); font-size: 13.5px; }
.pw-warn li + li { margin-top: 4px; }
.pw-working ul { margin: 8px 0 0; padding-left: 20px; }
@media (max-width: 560px) {
  .pw-row { grid-template-columns: 16px minmax(0, 1fr) auto; }
  .pw-edit { grid-column: 2 / -1; justify-self: start; }
}

/* Settings: daily price check */
.pc-markets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.pc-m { border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px 14px; background: var(--bg); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pc-m h3 { margin: 0; font-size: 15px; }
.pc-m textarea { min-height: 70px; }
fieldset.pc-days { grid-template-columns: repeat(auto-fit, minmax(68px, 1fr)); }
.wa-bubble { background: #fff; color: #111; border-radius: 0 10px 10px 10px; padding: 10px 12px; white-space: pre-wrap; font: 13.5px/1.4 system-ui, sans-serif; box-shadow: 0 1px 1px rgba(0,0,0,.15); max-height: 60vh; overflow: auto; }
.pw-ok { display: inline-flex; align-items: center; gap: 4px; color: var(--cyan) !important; }
.pw-ok svg { width: 12px; height: 12px; }

/* Price engine → Price check: every answer */
.pcx-list { display: flex; flex-direction: column; gap: 10px; }
.pcx { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--bg-2); }
.pcx > summary { display: grid; grid-template-columns: minmax(160px, 1.3fr) minmax(80px, .7fr) auto minmax(0, 1.6fr); gap: 6px 14px; align-items: center; padding: 12px 16px; cursor: pointer; list-style: none; }
.pcx > summary::-webkit-details-marker { display: none; }
.pcx[open] > summary { border-bottom: 1px solid var(--line); }
.pcx-day { display: flex; flex-direction: column; }
.pcx-day small { color: var(--ink-3); font-size: 12px; }
.pcx-nums { text-align: right; }
.pcx-body { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.pcx-body h4 { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); }
.pcx-ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.wa-bubble.out { background: #d9fdd3; border-radius: 10px 0 10px 10px; max-height: 280px; }
@media (max-width: 700px) { .pcx > summary { grid-template-columns: 1fr auto; } .pcx-nums { grid-column: 1 / -1; text-align: left; } }
/* the Price engine has many tabs: on a wide screen they wrap to a second line instead of hiding off the edge */
@media (min-width: 760px) { .tabs[aria-label="Price engine"] { flex-wrap: wrap; overflow-x: visible; row-gap: 0; } }
/* Jadu page: tabs, the chat fills the screen instead of a long page */
.jadu-page .tabs a .tab-n:empty { display: none; }
.jadu-page .tabs a .tab-n.faint { color: var(--ink-3); }
.jadu-page .chat-panel .chat { min-height: 320px; height: calc(100vh - 330px); max-height: none; }
@media (max-width: 760px) { .jadu-page .chat-panel .chat { height: calc(100vh - 300px); } }
.wa-app-link { display: block; padding: 0 20px 6px; }
