/* Kairo: obsidian and warm ivory, hairlines, square corners, restrained ember. Geist for text, Space Grotesk for headlines. */
:root {
  --paper: #F8F3EC;
  --surface: #FCF9F4;
  --sunken: #EFE8DE;
  --ink: #0D0D0F;
  --ink-2: #3B3631;
  --muted: #7A726A;
  --line: #E2D9CD;
  --line-soft: #ECE4D9;
  --brand: #C45123;
  --brand-ink: #FFF8F1;
  --mark: var(--ink);
  --mark-ink: var(--paper);
  --up: #0a7a45;
  --down: #c5361f;
  --up-soft: rgba(10, 122, 69, 0.08);
  --down-soft: rgba(197, 54, 31, 0.08);
  --shadow: 0 12px 32px -16px rgba(13, 13, 15, 0.2);
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Space Grotesk", "Geist", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: var(--sans);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
html[data-theme="dark"] {
  --paper: #0D0D0F;
  --surface: #121214;
  --sunken: #1C1C20;
  --ink: #F5EFE8;
  --ink-2: #CFC8BF;
  --muted: #8C857D;
  --line: #2A2A2F;
  --line-soft: #1E1E22;
  --brand: #F47732;
  --brand-ink: #0D0D0F;
  --up: #4ccf8c;
  --down: #ff7a62;
  --up-soft: rgba(76, 207, 140, 0.1);
  --down-soft: rgba(255, 122, 98, 0.1);
  --shadow: 0 16px 36px -16px rgba(0, 0, 0, 0.8);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--mark); color: var(--mark-ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.up { color: var(--up); }
.down { color: var(--down); }
.muted { color: var(--muted); }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { max-width: 1600px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 18px; }
.brand { font-family: var(--serif); font-style: italic; font-size: 27px; line-height: 1; letter-spacing: -0.01em; display: inline-flex; align-items: baseline; }
.brand i { width: 7px; height: 7px; background: var(--mark); margin-left: 2px; box-shadow: 0 0 0 1px rgba(23, 20, 15, 0.15); transition: transform 0.4s var(--ease); }
.brand:hover i { transform: scale(1.5); }

.market { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; background: var(--sunken); padding: 3px; }
.market button { position: relative; z-index: 1; padding: 6px 18px; font-weight: 600; font-size: 13px; color: var(--muted); transition: color 0.2s; }
.market button[aria-selected="true"] { color: var(--mark-ink); }
.market-thumb { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); background: var(--mark); transition: transform 0.35s var(--ease); }
.market[data-active="nse"] .market-thumb { transform: translateX(100%); }

.search { position: relative; flex: 1; max-width: 340px; display: flex; align-items: center; gap: 8px; padding: 0 10px; height: 36px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); transition: border-color 0.15s, box-shadow 0.15s; }
.search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mark) 55%, transparent); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; }
.search input::placeholder { color: var(--muted); }
kbd { font: 11px var(--mono); padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; color: var(--muted); }
.search:focus-within kbd { display: none; }
#results { position: absolute; left: -1px; right: -1px; top: calc(100% + 6px); margin: 0; padding: 5px; list-style: none; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); animation: pop 0.14s var(--ease); }
#results li { display: flex; align-items: baseline; gap: 10px; padding: 7px 9px; cursor: pointer; color: var(--ink); }
#results li[aria-selected="true"] { background: var(--sunken); }
#results .s { font: 600 12.5px var(--mono); min-width: 74px; }
#results .n { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#results .none { color: var(--muted); cursor: default; }

.tools { margin-left: auto; display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
#updated { margin-right: 6px; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; color: var(--ink-2); transition: background 0.15s; }
.icon-btn:hover { background: var(--sunken); }
.icon-btn.spin svg { animation: spin 0.9s linear infinite; }
html[data-theme="dark"] .sun, html[data-theme="light"] .moon { display: none; }

.shell { max-width: 1600px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: minmax(0, 1fr) 332px; gap: 32px; align-items: start; }
main { min-width: 0; padding: 0 0 48px; min-height: 70vh; container-type: inline-size; container-name: main; }
.footer { max-width: 1600px; margin: 0 auto; padding: 18px 24px 32px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }

/* ---------- motion ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes shimmer { to { background-position: -200% 0; } }
.reveal > * { animation: rise 0.5s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.reveal > *:nth-child(2) { --i: 1; } .reveal > *:nth-child(3) { --i: 2; } .reveal > *:nth-child(4) { --i: 3; }
.reveal > *:nth-child(5) { --i: 4; } .reveal > *:nth-child(6) { --i: 5; } .reveal > *:nth-child(7) { --i: 6; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-delay: 0s !important; transition-duration: 0.001ms !important; }
}

/* ---------- sparkline ---------- */
.spark { display: block; overflow: visible; }
.spark path { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; animation: draw 0.9s var(--ease) both; }
.spark .area { stroke: none; fill: currentColor; opacity: 0.09; animation: rise 0.9s var(--ease) both; }
.spark.up { color: var(--up); }
.spark.down { color: var(--down); }

/* ---------- shared pieces ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); }
.section { margin-top: 36px; }
.section-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.section-head h2 { font: 400 28px/1.1 var(--serif); letter-spacing: -0.01em; }
.section-head .sub { color: var(--muted); font-size: 13px; }
.section-head .right { margin-left: auto; display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.src { display: inline-flex; align-items: center; gap: 5px; }
.src::before { content: ""; width: 6px; height: 6px; background: var(--up); }
.src.off::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.src.off { opacity: 0.8; }

.chg { display: inline-block; font: 500 12.5px var(--mono); letter-spacing: -0.02em; padding: 2px 7px; }
.chg.up { background: var(--up-soft); }
.chg.down { background: var(--down-soft); }
.chg.muted { background: var(--sunken); }

.star { width: 26px; height: 26px; display: inline-grid; place-items: center; color: var(--line); transition: color 0.15s, transform 0.2s var(--ease), background 0.15s; flex: none; }
.star svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.star:hover { color: var(--ink); background: var(--sunken); }
.star[aria-pressed="true"] { color: #e0a800; }
.star[aria-pressed="true"] svg { fill: var(--mark); }
.star:active { transform: scale(0.8); }
.star.pop { animation: starpop 0.4s var(--ease); }
@keyframes starpop { 40% { transform: scale(1.45) rotate(-12deg); } }

.meter { height: 4px; background: var(--sunken); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ink); transform-origin: left; animation: grow 0.8s var(--ease) both; }
.sent { display: flex; height: 4px; overflow: hidden; background: var(--sunken); gap: 2px; }
.sent .b { background: var(--up); }
.sent .s { background: var(--down); }
.link { color: var(--ink); font-weight: 600; border-bottom: 1.5px solid var(--mark); transition: background 0.15s; }
.link:hover { background: var(--mark); color: var(--mark-ink); }
.notice { margin-top: 18px; padding: 10px 14px; background: color-mix(in srgb, var(--mark) 30%, var(--surface)); font-size: 13px; }

/* ---------- brief ---------- */
.brief { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: 40px; padding: 40px 0 26px; align-items: end; }
.brief h1 { font: 400 clamp(38px, 5.4vw, 64px)/1.02 var(--serif); letter-spacing: -0.02em; margin: 12px 0 16px; text-wrap: balance; }
.brief mark { background: linear-gradient(transparent 12%, var(--mark) 12%, var(--mark) 88%, transparent 88%); color: var(--mark-ink); padding: 0 0.12em; margin: 0 -0.04em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.brief .lede { font-size: 16.5px; line-height: 1.55; color: var(--ink-2); max-width: 58ch; text-wrap: pretty; }
.indices { border-top: 1px solid var(--ink); }
.indices > div { display: grid; grid-template-columns: 1fr 72px auto 64px; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.indices .l { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.indices .p { text-align: right; }
.indices .c { text-align: right; font-size: 12.5px; }

.breadth { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; font-size: 12.5px; color: var(--muted); }
.breadth b { font: 600 13px var(--mono); }
.breadth .bar { display: flex; gap: 3px; height: 8px; }
.breadth .bar i { display: block; transform-origin: left; animation: grow 0.9s var(--ease) both; }
.breadth .bar .u { background: var(--up); }
.breadth .bar .d { background: var(--down); transform-origin: right; }
.breadth-sub { margin-top: 8px; display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }

/* ---------- watchlist ---------- */
.watch { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.chip { flex: none; display: grid; grid-template-columns: auto 64px; gap: 4px 14px; align-items: center; padding: 10px 14px; border: 1px solid var(--line); background: var(--surface); transition: border-color 0.15s, transform 0.2s var(--ease); }
.chip:hover { border-color: var(--ink); transform: translateY(-2px); }
.chip .s { font: 600 13px var(--mono); }
.chip .p { font-size: 12.5px; color: var(--muted); }
.chip .spark { grid-row: span 2; }
.chip.hint { display: flex; gap: 8px; border-style: dashed; color: var(--muted); background: none; font-size: 13px; }
.chip.hint:hover { transform: none; border-color: var(--line); }
.chip.hint svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }

/* ---------- social ---------- */
.talk { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(260px, 1fr); gap: 28px; align-items: start; }
.buzz { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); overflow: hidden; }
.lead { position: relative; padding: 22px 24px 20px; background: var(--ink); color: var(--paper); display: flex; flex-direction: column; gap: 10px; min-height: 330px; transition: filter 0.2s; }
.lead:hover { filter: brightness(1.12); }
html[data-theme="dark"] .lead { background: var(--mark); color: var(--mark-ink); }
html[data-theme="dark"] .lead:hover { filter: brightness(1.05); }
.lead .rank { position: absolute; right: 18px; top: 2px; font: italic 400 120px/1 var(--serif); opacity: 0.16; pointer-events: none; }
.lead .tagline { font-size: 11.5px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; opacity: 0.7; }
.lead .sym { font: 400 54px/0.95 var(--serif); letter-spacing: -0.02em; }
.lead .name { opacity: 0.7; font-size: 13px; margin-top: -4px; }
.lead .px { display: flex; align-items: baseline; gap: 10px; font: 500 19px var(--mono); letter-spacing: -0.03em; }
.lead .px .c { font-size: 13px; padding: 2px 7px; background: rgba(255, 255, 255, 0.14); }
html[data-theme="dark"] .lead .px .c { background: rgba(0, 0, 0, 0.12); }
.lead .px .c.up { color: #6fe0a6; } .lead .px .c.down { color: #ff9c88; }
html[data-theme="dark"] .lead .px .c.up { color: #0b6b3d; } html[data-theme="dark"] .lead .px .c.down { color: #a82a14; }
.lead .spark { width: 100%; height: 54px; margin: 2px 0; color: currentColor; opacity: 0.9; }
.lead .lfacts { font-size: 12.5px; opacity: 0.8; line-height: 1.5; }
.lead .quote { margin-top: auto; padding-top: 10px; font: italic 400 19px/1.25 var(--serif); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lead .quote small { font: 400 11.5px var(--sans); opacity: 0.65; display: block; margin-top: 4px; }

.ranks { display: flex; flex-direction: column; }
.rankrow { flex: 1; display: grid; grid-template-columns: 30px minmax(0, 1fr) 68px auto; grid-template-rows: auto auto; gap: 3px 12px; align-items: center; align-content: center; padding: 12px 18px 12px 14px; border-bottom: 1px solid var(--line-soft); transition: background 0.15s; }
.rankrow:last-child { border-bottom: 0; }
.rankrow:hover { background: var(--sunken); }
.rankrow .n { grid-row: span 2; font: italic 400 28px/1 var(--serif); color: var(--muted); text-align: center; }
.rankrow .s { font: 600 14px var(--mono); display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.rankrow .s .nm { font: 400 12px var(--sans); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rankrow .why { grid-column: 2 / -1; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rankrow .r { text-align: right; white-space: nowrap; }
.rankrow .r .p { font-size: 13px; margin-right: 4px; }
.rising { font: 600 10px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 6px; background: var(--mark); color: var(--mark-ink); }
.more { margin-top: 12px; }
.more-list { margin-top: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); overflow: hidden; }
.more-list .rankrow { border-bottom: 1px solid var(--line-soft); }
.textbtn { font-weight: 600; font-size: 13px; border-bottom: 1.5px solid var(--mark); padding-bottom: 1px; }
.textbtn:hover { background: var(--mark); color: var(--mark-ink); }

/* ---------- sectors ---------- */
.sectors { padding: 4px 0; }
.sector { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 96px 52px; gap: 10px; align-items: center; padding: 7px 6px; margin: 0 -6px; width: calc(100% + 12px); font-size: 13px; text-align: left; transition: background 0.15s; }
.sector:hover, .sector[aria-expanded="true"] { background: var(--surface); }
.sector .l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 7px; }
.sector .v { text-align: right; font-size: 12px; }
.caret { flex: none; width: 0; height: 0; border: 4px solid transparent; border-left-color: var(--muted); border-right-width: 0; transition: transform 0.2s var(--ease); }
.sector[aria-expanded="true"] .caret { transform: rotate(90deg); }
.sector[aria-expanded="true"] .l { font-weight: 600; }
.sector-body { margin: 4px 0 12px; padding: 12px 14px 14px; border: 1px solid var(--line); background: var(--surface); animation: pop 0.2s var(--ease); }
.sector-body .sum { font-size: 13px; color: var(--ink-2); }
.sector-body h3 { margin: 14px 0 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.mover { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px; align-items: baseline; padding: 5px 6px; margin: 0 -6px; font-size: 12.5px; }
.mover:hover { background: var(--sunken); }
.mover .s { font: 600 12.5px var(--mono); }
.mover .nm { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snews { display: block; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; font-weight: 500; line-height: 1.35; }
.snews:last-child { border-bottom: 0; }
.snews:hover { text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.snews .m { display: block; color: var(--muted); font-size: 11.5px; font-weight: 400; margin-top: 2px; }
.dbar { position: relative; height: 8px; }
.dbar::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line); }
.dbar i { position: absolute; top: 0; bottom: 0; animation: grow 0.8s var(--ease) both; }
.dbar .u { left: 50%; background: var(--up); transform-origin: left; }
.dbar .d { right: 50%; background: var(--down); transform-origin: right; }

/* ---------- lists ---------- */
.tabs { display: flex; gap: 22px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs button { padding: 0 0 10px; font: 400 21px/1.2 var(--serif); color: var(--muted); white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; transition: color 0.15s; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--mark); }
.tab-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap; padding: 12px 0 4px; }
.tab-note { color: var(--muted); font-size: 13px; }
.period { display: inline-flex; align-items: center; background: var(--sunken); padding: 2px; flex: none; }
.period span { font-size: 12px; color: var(--muted); padding: 0 8px 0 9px; }
.period button { padding: 4px 10px; color: var(--muted); font: 600 12px var(--mono); }
.period button:hover { color: var(--ink); }
.period button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: right; white-space: nowrap; }
th { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); padding-top: 12px; }
th button { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; display: inline-flex; align-items: center; gap: 4px; }
th button:hover { color: var(--ink); }
th button::after { content: ""; width: 0; height: 0; border: 3.5px solid transparent; border-top-color: currentColor; margin-top: 4px; opacity: 0.3; transition: opacity 0.15s; }
th button:hover::after { opacity: 0.7; }
th[aria-sort] button { color: var(--ink); }
th[aria-sort] button::after { opacity: 1; }
th[aria-sort="ascending"] button::after { transform: rotate(180deg); margin-top: -4px; }
th:nth-child(1), td:nth-child(1) { width: 34px; padding: 0 0 0 4px; }
th:nth-child(2), td:nth-child(2) { text-align: left; padding-left: 6px; }
tbody tr { border-bottom: 1px solid var(--line-soft); cursor: pointer; transition: background 0.12s; animation: rise 0.4s var(--ease) both; animation-delay: calc(min(var(--r, 0), 14) * 18ms); }
tbody tr:last-child { border-bottom: 0; }
tbody tr:hover { background: var(--surface); }
tbody tr:hover .star { color: var(--muted); }
tbody tr:hover .star[aria-pressed="true"] { color: #e0a800; }
td .s { font: 600 13.5px var(--mono); }
td .nm { color: var(--muted); font-size: 12px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
td.sp { width: 96px; }
td.sp .spark { margin-left: auto; }
.range { display: inline-block; width: 84px; height: 4px; background: var(--sunken); position: relative; vertical-align: middle; }
.range i { position: absolute; top: -4px; width: 2px; height: 12px; background: var(--ink); }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }

/* ---------- loading ---------- */
.sk { background: linear-gradient(90deg, var(--sunken) 25%, var(--line-soft) 37%, var(--sunken) 63%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.loading-msg { text-align: center; color: var(--muted); padding: 18px 0 0; font-size: 13px; }
.errorbox { padding: 90px 20px; text-align: center; }
.errorbox h2 { font: 400 30px var(--serif); margin-bottom: 8px; }
.errorbox p { color: var(--muted); margin-bottom: 18px; }
.btn { display: inline-block; padding: 8px 16px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 13px; }
.btn:hover { opacity: 0.88; }

/* ---------- stock page ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; font-size: 13px; margin: 22px 0 18px; transition: color 0.15s, gap 0.2s var(--ease); }
.back:hover { color: var(--ink); gap: 10px; }
.d-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 32px; align-items: end; }
.d-head .tick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.d-head .tick b { font: 600 12.5px var(--mono); color: var(--ink); padding: 2px 8px; border: 1px solid var(--ink); }
.d-head h1 { font: 400 clamp(34px, 4.6vw, 56px)/1.02 var(--serif); letter-spacing: -0.02em; margin-top: 10px; text-wrap: balance; }
.d-price { text-align: right; }
.d-price .p { font: 500 clamp(30px, 3.6vw, 42px)/1 var(--mono); letter-spacing: -0.04em; }
.d-price .c { margin-top: 8px; font: 500 14px var(--mono); }
.d-price .t { font-size: 12px; color: var(--muted); margin-top: 2px; }
.watchbtn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 8px; border: 1px solid var(--line); font-weight: 600; font-size: 12.5px; color: var(--ink); transition: border-color 0.15s, background 0.15s; }
.watchbtn:hover { border-color: var(--ink); }
.watchbtn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.watchbtn[aria-pressed="true"] { background: var(--mark); border-color: var(--mark); color: var(--mark-ink); }
.watchbtn[aria-pressed="true"] svg { fill: currentColor; }

.rails { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 40px; margin-top: 26px; padding: 18px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.rail .k { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 9px; }
.rail .track { position: relative; height: 4px; background: var(--sunken); }
.rail .track i { position: absolute; top: -5px; width: 10px; height: 14px; margin-left: -5px; background: var(--mark); border: 1.5px solid var(--ink); transition: left 0.8s var(--ease); }
.rail .ends { display: flex; justify-content: space-between; font: 500 12px var(--mono); margin-top: 8px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.stats .k { font-size: 12px; color: var(--muted); }
.stats .v { font: 500 14px var(--mono); letter-spacing: -0.02em; margin-top: 1px; }

.glance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.g { padding: 16px 18px; }
.g .big { font: 400 30px/1.1 var(--serif); margin: 6px 0 10px; }
.g .foot { font-size: 12.5px; color: var(--muted); margin-top: 9px; }
.seg { display: flex; gap: 3px; height: 6px; }
.seg i { display: block; min-width: 4px; transform-origin: left; animation: grow 0.8s var(--ease) both; }

.chart-panel { margin-top: 14px; padding: 14px 14px 8px; }
.chart-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 6px; }
.ranges { display: inline-flex; background: var(--sunken); padding: 2px; }
.ranges button { padding: 4px 11px; color: var(--muted); font: 600 12px var(--mono); }
.ranges button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-left: auto; flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 2px; margin-right: 5px; vertical-align: middle; }
#chart { height: 400px; }
#rsi { height: 120px; border-top: 1px solid var(--line-soft); }
.chart-label { font-size: 11.5px; color: var(--muted); padding: 8px 4px 0; }
#chart a[href*="tradingview"], #rsi a[href*="tradingview"] { opacity: 0.35; }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; align-items: start; }
.box { padding: 20px 22px; }
.box > h2 { font: 400 25px/1.1 var(--serif); margin-bottom: 14px; }
.box h3 { margin: 18px 0 8px; font-size: 11px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.box h3:first-of-type { margin-top: 0; }
.signals > div { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.signals > div:last-child { border-bottom: 0; }
.signals .tk { align-self: stretch; background: var(--line); }
.signals .tk.bull { background: var(--up); }
.signals .tk.bear { background: var(--down); }
.signals small { display: block; color: var(--muted); font-size: 12px; }
.signals .v { font: 500 13px var(--mono); }
.returns { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 16px; border: 1px solid var(--line-soft); overflow: hidden; }
.returns div { padding: 9px 4px; text-align: center; border-right: 1px solid var(--line-soft); }
.returns div:last-child { border-right: 0; }
.returns .k { font-size: 11px; color: var(--muted); }
.returns .v { font: 500 13px var(--mono); margin-top: 1px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.facts > div { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.facts .k { color: var(--ink-2); font-size: 13px; }
.facts .k[title] { text-decoration: underline dotted var(--line); text-underline-offset: 3px; cursor: help; }
.facts .v { font: 500 13px var(--mono); white-space: nowrap; }

.rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.rows > div:last-child { border-bottom: 0; }
.rows .k { color: var(--ink-2); }
.rows .v { font: 500 13px var(--mono); text-align: right; white-space: nowrap; }
.target { position: relative; height: 4px; background: var(--sunken); margin: 34px 0 30px; }
.target .mark { position: absolute; top: -5px; width: 10px; height: 14px; margin-left: -5px; background: var(--surface); border: 1.5px solid var(--ink); }
.target .mark.mean { background: var(--mark); }
.target .mark span { position: absolute; left: 50%; transform: translateX(-50%); font-size: 11.5px; white-space: nowrap; color: var(--muted); }
.target .mark.now span { top: -22px; }
.target .mark.mean span { top: 18px; color: var(--ink); font-weight: 600; }
.recbar { display: flex; gap: 3px; height: 6px; margin: 4px 0 8px; }
.recbar i { display: block; min-width: 4px; }
.news a { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.news a:last-child { border-bottom: 0; }
.news .w { font: 400 11.5px var(--mono); color: var(--muted); padding-top: 2px; }
.news .t { font-weight: 500; line-height: 1.4; transition: color 0.15s; }
.news a:hover .t { text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.news .m { color: var(--muted); font-size: 12px; margin-top: 2px; }
.msg { padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; overflow-wrap: anywhere; }
.msg:last-child { border-bottom: 0; }
.msg .m { color: var(--muted); font-size: 12px; margin-top: 2px; }
.about { color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.about.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }

@container main (max-width: 720px) {
  .brief { grid-template-columns: 1fr; gap: 24px; padding-top: 28px; }
  .talk { grid-template-columns: 1fr; }
  .buzz { grid-template-columns: 1fr; }
  .lead { min-height: 0; }
  .grid2, .glance { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
}
@media (max-width: 640px) {
  .topbar-in { flex-wrap: wrap; padding: 10px 16px; gap: 10px; }
  .search { order: 5; max-width: none; flex-basis: 100%; }
  #updated { display: none; }
  .shell { padding: 0 16px; }
  .d-head { grid-template-columns: 1fr; }
  .d-price { text-align: left; }
  .rails { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  #chart { height: 300px; }
  .hide-xs { display: none; }
}
@container main (max-width: 900px) {
  .rankrow .s .nm { display: none; }
}

/* ---------- sources and cross-checks ---------- */
.srcline { margin: -6px 0 14px; font-size: 12.5px; color: var(--muted); }
.checks { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.checks-head { font-size: 12.5px; color: var(--ink-2); margin-bottom: 8px; }
.checks-list { display: flex; flex-wrap: wrap; gap: 6px; }
.check { font-size: 12px; padding: 3px 9px; cursor: help; }
.check.ok { background: var(--up-soft); color: var(--up); }
.check.bad { background: var(--down-soft); color: var(--down); }
.srcs > div { display: grid; grid-template-columns: 150px 220px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); align-items: baseline; }
.srcs > div:last-child { border-bottom: 0; }
.srcs .w { font-weight: 600; }
.srcs .n { color: var(--muted); font-size: 13px; }
@container main (max-width: 760px) {
  .srcs > div { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- top bar link ---------- */
.navlink { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px; color: var(--ink-2); font-weight: 600; font-size: 12.5px; transition: background 0.15s; }
.navlink:hover { background: var(--sunken); }
.navlink span { font-variant-numeric: tabular-nums; }

/* ---------- trade plan ---------- */
.plan { margin-top: 14px; padding: 0; overflow: hidden; }
.plan-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
.verdict { padding: 22px 24px; background: var(--sunken); }
.verdict .v-label { font: 400 46px/1 var(--serif); letter-spacing: -0.02em; margin: 8px 0 6px; }
.verdict .v-line { font-size: 15px; color: var(--ink-2); }
.verdict.r-buy .v-label, .verdict.r-overweight .v-label { color: var(--up); }
.verdict.r-sell .v-label, .verdict.r-underweight .v-label { color: var(--down); }
.gauge { margin: 18px 0 10px; }
.gauge .track { position: relative; height: 6px; background: linear-gradient(90deg, var(--down) 0%, var(--line) 45%, var(--line) 55%, var(--up) 100%); }
.gauge .track i { position: absolute; top: -5px; width: 12px; height: 16px; margin-left: -6px; background: var(--mark); border: 1.5px solid var(--ink); }
.gauge .ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 7px; }
.verdict .conf { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.verdict .conf b { color: var(--ink); font-weight: 600; }
.plan-levels { padding: 20px 24px; }
.lv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.levels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); overflow: hidden; }
.lv { padding: 12px 14px; border-right: 1px solid var(--line); min-width: 0; }
.lv:last-child { border-right: 0; }
.lv .k { font-size: 12px; color: var(--muted); }
.lv .v { font-size: 21px; font-weight: 500; margin: 3px 0 2px; letter-spacing: -0.03em; white-space: nowrap; }
.lv .s { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.lv-entry { background: color-mix(in srgb, var(--mark) 22%, transparent); }
.lv-stop .v { color: var(--down); }
.lv-target .v { color: var(--up); }
.plan-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.plan-actions .size { font-size: 13px; color: var(--ink-2); flex: 1; min-width: 220px; }
.btn.big { padding: 10px 20px; font-size: 14px; }
.btn.sellbtn { background: var(--down); color: #fff; }
.btn[disabled] { opacity: 0.4; cursor: default; }
.desk { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.analyst { padding: 16px 18px; border-right: 1px solid var(--line-soft); min-width: 0; }
.analyst:last-child { border-right: 0; }
.a-head b { display: block; font: 400 20px/1.1 var(--serif); }
.a-head span { font-size: 11.5px; color: var(--muted); }
.sbar { display: flex; align-items: center; gap: 10px; margin: 10px 0 8px; font-size: 13px; }
.sbar .track { position: relative; flex: 1; height: 4px; background: var(--sunken); }
.sbar .track i { position: absolute; top: -4px; width: 4px; height: 12px; margin-left: -2px; background: var(--muted); }
.sbar .track i.up { background: var(--up); }
.sbar .track i.down { background: var(--down); }
.sbar .na { color: var(--muted); font-size: 12px; }
.plan ul { list-style: none; margin: 0; padding: 0; }
.analyst li, .cases li { display: grid; grid-template-columns: 3px minmax(0, 1fr); gap: 9px; padding: 4px 0; font-size: 12.5px; line-height: 1.4; }
.plan .tk { background: var(--line); }
.plan .tk.bull { background: var(--up); }
.plan .tk.bear { background: var(--down); }
.more-count { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.cases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.cases > div { padding: 18px 24px; }
.cases > div:first-child { border-right: 1px solid var(--line-soft); }
.cases li { font-size: 13.5px; padding: 5px 0; }
.cases em { font-style: normal; color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.plan h3 { font-size: 11px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.whys { padding: 18px 24px; border-top: 1px solid var(--line); }
.whys li { position: relative; padding: 4px 0 4px 16px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); max-width: 86ch; }
.whys li::before { content: ""; position: absolute; left: 0; top: 13px; width: 6px; height: 1.5px; background: var(--ink); }
.whys li.note { color: var(--muted); }
.odds { margin-top: 12px; padding: 12px 14px; background: var(--sunken); font-size: 13px; line-height: 1.5; color: var(--ink-2); max-width: 86ch; }
.odds:empty { display: none; }
.odds b { color: var(--ink); }
.fair { position: relative; height: 6px; background: var(--sunken); margin: 34px 0 34px; }
.fair .band { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--mark) 70%, transparent); }
.fair .mark { position: absolute; top: -5px; width: 10px; height: 16px; margin-left: -5px; background: var(--surface); border: 1.5px solid var(--ink); }
.fair .mark.mean { background: var(--ink); }
.fair .mark span { position: absolute; left: 50%; transform: translateX(-50%); font-size: 11.5px; white-space: nowrap; color: var(--muted); }
.fair .mark.now span { top: -22px; }
.fair .mark.mean span { top: 20px; color: var(--ink); font-weight: 600; }
.methods > div { display: grid; grid-template-columns: 150px 110px minmax(0, 1fr); gap: 14px; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 13px; align-items: baseline; }
.methods .k { font-weight: 600; }
.methods .n { color: var(--muted); }
.plan-foot { padding: 14px 24px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); line-height: 1.5; max-width: none; }
.box .plan-foot, main > .plan-foot { padding: 14px 0 0; border-top: 1px solid var(--line-soft); margin-top: 14px; }

/* ---------- position strip ---------- */
.position { margin-top: 18px; padding: 4px 18px; border-color: var(--ink); }
.pos-main { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.pos-main:last-of-type { border-bottom: 0; }
.pos-main .btn, .pos-main .textbtn { margin-left: auto; }
.pos-note { padding: 8px 0 10px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line-soft); }

/* ---------- backtest ---------- */
.bt-table tbody tr[aria-selected="true"] { background: color-mix(in srgb, var(--mark) 20%, transparent); }
.bt-table tbody tr.hold { cursor: default; color: var(--muted); }
.bt-table tbody tr.hold:hover { background: none; }
.bt-table th:nth-child(1), .bt-table td:nth-child(1), .pf th:nth-child(1), .pf td:nth-child(1), .bt-trades th:nth-child(1), .bt-trades td:nth-child(1) { width: auto; text-align: left; padding: 10px 12px 10px 6px; }
.bt-table th:nth-child(2), .bt-table td:nth-child(2), .bt-trades th:nth-child(2), .bt-trades td:nth-child(2) { text-align: right; padding-left: 12px; }
.pf th:nth-child(2), .pf td:nth-child(2) { text-align: right; }
.pf td, .bt-table td, .bt-trades td { animation: none; }
.beat { font: 600 10px var(--sans); letter-spacing: 0.05em; text-transform: uppercase; padding: 2px 6px; background: var(--up-soft); color: var(--up); margin-left: 6px; white-space: nowrap; }
.bt-rule { margin-top: 14px; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; max-width: 90ch; }
#bt-chart { height: 260px; }
.bt-facts { margin-top: 12px; }
.bt-trades { margin-top: 14px; }
.bt-trades summary { cursor: pointer; font-weight: 600; font-size: 13px; padding: 6px 0; }
.bt-trades tbody tr { cursor: default; }
.bt-trades th:nth-child(5), .bt-trades td:nth-child(5), .bt-trades th:nth-child(3), .bt-trades td:nth-child(3) { text-align: left; }

/* ---------- order ticket ---------- */
dialog#ticket { border: 1px solid var(--line); padding: 0; background: var(--surface); color: var(--ink); width: min(440px, calc(100vw - 32px)); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5); }
dialog#ticket::backdrop { background: rgba(15, 13, 10, 0.5); backdrop-filter: blur(3px); }
dialog#ticket[open] { animation: pop 0.2s var(--ease); }
.ticket { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 12px; }
.t-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.t-head h2 { font: 400 30px/1.1 var(--serif); margin-top: 4px; }
.t-head h2 span { font: 400 13px var(--sans); color: var(--muted); }
.seg2 { display: grid; grid-template-columns: 1fr 1fr; background: var(--sunken); padding: 3px; }
.seg2 button { padding: 8px; font-weight: 600; color: var(--muted); }
.seg2 button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14); }
.seg2 button[disabled] { opacity: 0.4; cursor: default; }
.fld { display: flex; align-items: center; gap: 10px; }
.fld > span { width: 92px; flex: none; font-size: 13px; color: var(--ink-2); }
.fld em { display: block; font-style: normal; font-size: 11px; color: var(--muted); }
.fld input, .fld select { flex: 1; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 500 14px var(--mono); }
.fld select { font-family: var(--sans); }
.fld input:focus, .fld select:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fld-row .fld { flex-direction: column; align-items: stretch; gap: 4px; min-width: 0; }
.fld-row .fld input { width: 100%; flex: none; }
.fld-row .fld > span { width: auto; display: flex; justify-content: space-between; align-items: baseline; }
.t-hint { font-size: 12px; color: var(--muted); margin-top: -4px; }
.t-sum { border-top: 1px solid var(--line-soft); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.t-sum > div { display: flex; justify-content: space-between; color: var(--ink-2); }
.t-sum b { color: var(--ink); font-weight: 500; }
.t-error { padding: 9px 12px; background: var(--down-soft); color: var(--down); font-size: 13px; }
.ticket .btn.big { width: 100%; margin-top: 4px; }

@container main (max-width: 720px) {
  .plan-top, .cases { grid-template-columns: 1fr; }
  .desk { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analyst:nth-child(2) { border-right: 0; }
  .analyst:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
  .cases > div:first-child { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lv:nth-child(2) { border-right: 0; }
  .lv:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .methods > div { grid-template-columns: 1fr auto; }
  .methods .n { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .navlink span { display: none; }
  .desk { grid-template-columns: 1fr; }
  .analyst { border-right: 0; border-bottom: 1px solid var(--line-soft); }
}

.conflict { padding: 16px 24px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--mark) 16%, transparent); }
.conflict h3 { margin-bottom: 6px; }
.conflict p { font-size: 13.5px; line-height: 1.55; color: var(--ink-2); max-width: 92ch; margin-top: 6px; }
.how { padding: 12px 24px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.how + .desk { border-top: 1px solid var(--line-soft); }

/* ---------- dashboard shell: content on the left, your account on the right ---------- */
#side { position: sticky; top: 58px; max-height: calc(100vh - 58px); overflow-y: auto; padding: 22px 2px 28px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; }
.side-card { background: var(--surface); border: 1px solid var(--line); padding: 14px 16px; }
.side-card > .eyebrow { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.side-card > .eyebrow a { letter-spacing: 0; text-transform: none; font-weight: 600; font-size: 12px; color: var(--ink); border-bottom: 1.5px solid var(--mark); }
.side-card > .eyebrow a:hover { background: var(--mark); color: var(--mark-ink); }
.side-total { font: 400 34px/1.05 var(--serif); letter-spacing: -0.01em; }
.side-pnl { font: 500 12.5px var(--mono); margin: 4px 0 10px; }
.side-rows > div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--ink-2); }
.side-rows b { font: 500 13px var(--mono); color: var(--ink); }
.hrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 6px; margin: 0 -6px; border-top: 1px solid var(--line-soft); font-size: 13px; }
.hrow:first-of-type { border-top: 0; }
.hrow:hover { background: var(--sunken); }
.hrow .s { font: 600 13px var(--mono); }
.hrow .m { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hrow .r { text-align: right; font: 500 12.5px var(--mono); }
.side-empty { font-size: 13px; color: var(--muted); line-height: 1.45; }
.cta { border-color: var(--ink); }
.cta-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cta-top b { font: 400 30px/1 var(--serif); }
.cta-top .num { font-size: 15px; font-weight: 500; }
.cta-rating { display: flex; align-items: center; gap: 8px; margin: 8px 0 10px; font-size: 13px; color: var(--ink-2); }
.pill-r { font: 600 11px var(--sans); letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 8px; background: var(--sunken); color: var(--ink); }
.pill-r.r-buy, .pill-r.r-overweight { background: var(--up-soft); color: var(--up); }
.pill-r.r-sell, .pill-r.r-underweight { background: var(--down-soft); color: var(--down); }
.cta-btns { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-top: 12px; }
.cta-btns .btn { text-align: center; padding: 10px 12px; font-size: 14px; }
.btn.ghost { background: none; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.cta-hold { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); font-size: 12.5px; color: var(--ink-2); }
#side .watch { flex-direction: column; gap: 0; overflow: visible; padding: 0; }
.wrow { display: flex; align-items: center; border-top: 1px solid var(--line-soft); }
.wrow:first-child { border-top: 0; }
.wrow a { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 60px auto; gap: 10px; align-items: center; padding: 8px 6px; margin-left: -6px; }
.wrow a:hover { background: var(--sunken); }
.wrow .s { font: 600 13px var(--mono); }
.wrow .p { text-align: right; font-size: 12px; line-height: 1.35; }
.unwatch { width: 24px; height: 24px; color: var(--line); font-size: 13px; flex: none; }
.wrow:hover .unwatch { color: var(--muted); }
.unwatch:hover { background: var(--sunken); color: var(--ink) !important; }

@container main (max-width: 980px) {
  .talk { grid-template-columns: 1fr; }
}
@container main (max-width: 860px) {
  .hide-sm { display: none; }
  .desk { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analyst:nth-child(2) { border-right: 0; }
  .analyst:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
  .plan-top { grid-template-columns: 1fr; }
}
@media (max-width: 1080px) {
  .shell { grid-template-columns: 1fr; gap: 0; }
  #side { position: static; max-height: none; overflow: visible; padding-top: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
}

/* ---------- follow the money ---------- */
.power-body { padding-top: 6px; }
.p-note { margin: 12px 0 14px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); max-width: 96ch; }
.power-body h3, .box > h3 { font-size: 11px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.p-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 32px; }
.prow { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; gap: 10px; align-items: baseline; padding: 8px 8px; margin: 0 -8px; border-top: 1px solid var(--line-soft); font-size: 13px; }
.prow:first-of-type { border-top: 0; }
.prow:hover { background: var(--surface); }
.prow .s { font: 600 13px var(--mono); }
.prow .nm { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .who { color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.prow .num { font-size: 12.5px; color: var(--muted); }
.ptable th:nth-child(1), .ptable td:nth-child(1) { width: auto; text-align: left; padding: 10px 12px 10px 6px; }
.ptable th:nth-child(2), .ptable td:nth-child(2) { text-align: left; padding-left: 12px; }
.ptable td:not(.num), .ptable th { text-align: left; }
.ptable td.num, .ptable th:has(+ th) { }
.ptable td.num { text-align: right; }
.ptable tbody tr { animation: none; }
.ptable tbody tr.plain { cursor: default; }
.ptable tbody tr.plain:hover { background: none; }
.unread { margin-top: 14px; }
.unread-list { columns: 2 320px; column-gap: 32px; }
.unread-list a { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; break-inside: avoid; }
.unread-list a:hover { text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 2px; }
.themes { max-width: 980px; }
.sector.theme { grid-template-columns: minmax(0, 1fr) 140px 60px 76px; }
.theme-body { padding: 14px 16px 16px; }
.theme-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 32px; margin-top: 4px; }
.theme-line { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); margin-top: 6px; max-width: 90ch; }
.theme-line b { color: var(--ink); }
@container main (max-width: 720px) {
  .p-two, .theme-cols { grid-template-columns: 1fr; }
  .sector.theme { grid-template-columns: minmax(0, 1fr) 70px 56px; }
  .sector.theme .v:last-child { display: none; }
}
.box .table-wrap + h3, .box .p-note + h3 { margin-top: 18px; }

/* ---------- home page: stacked sections, compact sector grid, one tabbed area ---------- */
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 14px 0 2px; }
.subtabs button { padding: 5px 12px; font-weight: 600; font-size: 12.5px; color: var(--muted); border: 1px solid var(--line); transition: color 0.15s, border-color 0.15s, background 0.15s; }
.subtabs button:hover { color: var(--ink); border-color: var(--ink); }
.subtabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
#hub .tabs button { font-size: 26px; }
.sector-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; max-width: none; }
.sector-grid .sector { width: auto; margin: 0; padding: 8px 8px; grid-template-columns: minmax(0, 1fr) 84px 50px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.sector-grid .sector:hover { background: var(--surface); border-bottom-color: transparent; }
.sector-grid .sector .l { display: block; }
.sector-grid .sector.theme { grid-template-columns: minmax(0, 1fr) 84px 50px; }
.stable th:nth-child(1), .stable td:nth-child(1) { width: auto; text-align: left; padding: 10px 12px 10px 6px; }
.stable th:nth-child(2), .stable td:nth-child(2) { text-align: right; padding-left: 12px; }
.stable tbody tr { animation: none; }
@container main (max-width: 900px) { .sector-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container main (max-width: 560px) { .sector-grid { grid-template-columns: 1fr; } }

/* ---------- right side as one pane, not floating cards ---------- */
.shell { gap: 0; }
main { padding-right: 32px; }
#side { top: 57px; height: calc(100vh - 57px); max-height: none; padding: 0; gap: 0; border-left: 1px solid var(--line); background: var(--surface); }
.shell { padding-right: 0; }
#side .side-card { background: none; border: 0; border-bottom: 1px solid var(--line); padding: 18px 20px; }
#side .side-card:last-child { border-bottom: 0; }
#side .side-card.cta { background: color-mix(in srgb, var(--mark) 14%, transparent); border-bottom: 1px solid var(--line); }
#side .hrow, #side .wrow a { }
@media (max-width: 1080px) {
  main { padding-right: 0; }
  .shell { padding-right: 24px; }
  #side { height: auto; border-left: 0; border-top: 1px solid var(--line); background: none; margin-top: 12px; }
  #side .side-card { border-bottom: 0; padding: 18px 12px; }
}
@media (max-width: 640px) { .shell { padding-right: 16px; } }

/* Full-width layout: the right pane sits flush against the edge of the window. */
.shell, .topbar-in, .footer { max-width: none; }
.shell { margin: 0; padding-left: 32px; grid-template-columns: minmax(0, 1fr) 360px; }
.topbar-in { padding-left: 32px; padding-right: 20px; }
.footer { padding-left: 32px; }
@media (max-width: 1080px) { .shell { grid-template-columns: 1fr; padding-left: 24px; } .topbar-in, .footer { padding-left: 24px; } }
@media (max-width: 640px) { .shell, .topbar-in, .footer { padding-left: 16px; } }

/* ================= refresh: Inter, square corners, more air ================= */
body { font-size: 14px; line-height: 1.55; font-feature-settings: "tnum", "cv11"; letter-spacing: -0.005em; }
input, select, button, dialog { border-radius: 0; }
:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 2px; }
.num { letter-spacing: -0.01em; }

/* small labels: sentence case, no letter-spacing */
.eyebrow, th, .box h3, .plan h3, .power-body h3, .box > h3, .sector-body h3, .lead .tagline { font-size: 12.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); }
.rising, .beat, .pill-r { font-size: 11.5px; font-weight: 500; letter-spacing: 0; text-transform: none; padding: 2px 7px; }
.rising { background: var(--sunken); color: var(--ink-2); }

/* top bar */
.topbar { background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.topbar-in { padding: 14px 24px 14px 48px; gap: 24px; }
.brand { font: 600 16px/1 var(--sans); font-style: normal; letter-spacing: -0.02em; }
.brand i { display: none; }
.market { background: none; border: 1px solid var(--line); padding: 2px; }
.market button { padding: 6px 16px; font-weight: 500; }
.market-thumb { top: 2px; bottom: 2px; left: 2px; width: calc(50% - 2px); }
.search { height: 36px; background: none; padding: 0 12px; }
.search:focus-within { box-shadow: none; }
kbd { border-bottom-width: 1px; font-size: 11px; }
#results { padding: 4px; }
.icon-btn, .navlink { font-weight: 500; }

/* shell */
.shell { padding-left: 48px; grid-template-columns: minmax(0, 1fr) 380px; }
main { padding: 0 48px 96px 0; }
.footer { padding: 24px 48px 40px; }
.section { margin-top: 80px; }
.section-head { margin-bottom: 28px; gap: 14px; }
.section-head h2 { font: 600 19px/1.2 var(--sans); letter-spacing: -0.02em; }
.panel { background: none; }
.notice { margin-top: 28px; padding: 12px 16px; background: var(--sunken); color: var(--ink-2); }
.link, .textbtn { font-weight: 500; border-bottom: 1px solid var(--ink); }
.link:hover, .textbtn:hover { background: none; color: var(--muted); border-bottom-color: var(--muted); }
.chg { padding: 0; background: none !important; font-weight: 500; font-size: 13px; }
.star[aria-pressed="true"], tbody tr:hover .star[aria-pressed="true"] { color: var(--ink); }
.btn { padding: 10px 18px; font-weight: 500; }
.btn.big { padding: 12px 22px; }
.btn.ghost { box-shadow: inset 0 0 0 1px var(--ink); }
.meter, .sent, .rail .track, .sbar .track, .target, .range { height: 2px; }
.sk { background: var(--sunken); animation: none; }

/* brief */
.brief { gap: 72px; padding: 72px 0 40px; align-items: start; }
.brief h1 { font: 600 clamp(28px, 3vw, 40px)/1.12 var(--sans); letter-spacing: -0.035em; margin: 16px 0 20px; }
.brief mark { background: none; color: inherit; padding: 0; margin: 0; }
.brief .lede { font-size: 15.5px; line-height: 1.65; color: var(--ink-2); max-width: 60ch; }
.indices { border-top: 1px solid var(--line); }
.indices > div { padding: 13px 0; }
.breadth { gap: 18px; font-size: 13px; }
.breadth b { font: 600 13px var(--sans); }
.breadth .bar { height: 2px; gap: 2px; }
.breadth-sub { margin-top: 14px; gap: 24px; }

/* what people are talking about */
.buzz { border: 1px solid var(--line); }
.lead, html[data-theme="dark"] .lead { background: none; color: var(--ink); padding: 36px 36px 32px; gap: 12px; min-height: 340px; border-right: 1px solid var(--line); }
.lead:hover, html[data-theme="dark"] .lead:hover { filter: none; background: var(--sunken); }
.lead .rank { display: none; }
.lead .tagline { opacity: 1; }
.lead .sym { font: 600 34px/1.05 var(--sans); letter-spacing: -0.035em; margin-top: 6px; }
.lead .name { opacity: 1; color: var(--muted); margin-top: 0; }
.lead .px { font: 500 17px var(--sans); letter-spacing: -0.01em; margin-top: 8px; }
.lead .px .c, html[data-theme="dark"] .lead .px .c { background: none; padding: 0; font-size: 13.5px; }
.lead .px .c.up, html[data-theme="dark"] .lead .px .c.up { color: var(--up); }
.lead .px .c.down, html[data-theme="dark"] .lead .px .c.down { color: var(--down); }
.lead .lfacts { opacity: 1; color: var(--muted); }
.lead .quote { font: 400 15px/1.5 var(--sans); color: var(--ink-2); padding-top: 20px; }
.lead .quote small { opacity: 1; color: var(--muted); font-size: 12.5px; margin-top: 8px; }
.rankrow { padding: 20px 28px 20px 24px; gap: 4px 16px; }
.rankrow .n { font: 500 13px/1 var(--sans); font-style: normal; }
.rankrow .s { font: 600 14px var(--sans); }
.rankrow .s .nm, .rankrow .why { font-size: 12.5px; }
.more { margin-top: 20px; }
.more-list { margin-top: 20px; border: 1px solid var(--line); }

/* sectors */
.sector-grid { gap: 0 56px; }
.sector-grid .sector, .sector-grid .sector.theme { padding: 14px 0; font-size: 13.5px; }
.sector-grid .sector:hover { background: none; border-bottom-color: var(--ink); }
.dbar { height: 2px; }
.dbar::before { top: -4px; bottom: -4px; }

/* tabs and tables */
.tabs { gap: 32px; }
.tabs button, #hub .tabs button { font: 500 15px/1.2 var(--sans); padding: 0 0 14px; border-bottom-width: 1px; letter-spacing: -0.01em; }
.tabs button[aria-selected="true"] { border-bottom-color: var(--ink); }
.subtabs { gap: 8px; padding: 24px 0 4px; }
.subtabs button { padding: 6px 14px; font-weight: 500; border-color: var(--line); }
.subtabs button:hover { border-color: var(--muted); }
.subtabs button[aria-selected="true"] { background: var(--sunken); color: var(--ink); border-color: var(--line); }
.tab-bar { padding: 20px 0 8px; }
.period, .ranges, .seg2 { background: none; border: 1px solid var(--line); padding: 2px; }
.period button, .ranges button { font: 500 12.5px var(--sans); padding: 5px 11px; }
.period button[aria-pressed="true"], .ranges button[aria-pressed="true"], .seg2 button[aria-pressed="true"] { background: var(--sunken); box-shadow: none; }
th, td { padding: 15px 14px; }
th { padding-top: 16px; padding-bottom: 12px; }
tbody tr:hover { background: var(--sunken); }
td .s { font: 600 13.5px var(--sans); }
td .nm { font-size: 12.5px; }
.bt-table th:nth-child(1), .bt-table td:nth-child(1), .pf th:nth-child(1), .pf td:nth-child(1), .bt-trades th:nth-child(1), .bt-trades td:nth-child(1), .ptable th:nth-child(1), .ptable td:nth-child(1), .stable th:nth-child(1), .stable td:nth-child(1) { padding: 15px 14px 15px 0; }
.prow { padding: 13px 0; margin: 0; }
.prow:hover { background: var(--sunken); }
.p-note { margin: 20px 0 24px; line-height: 1.65; }
.p-two { gap: 24px 64px; }
.unread-list a { padding: 10px 0; }

/* stock page */
.back { margin: 40px 0 28px; }
.d-head h1 { font: 600 clamp(26px, 2.8vw, 36px)/1.12 var(--sans); letter-spacing: -0.035em; margin-top: 14px; }
.d-head .tick b { font: 500 12.5px var(--sans); border-color: var(--line); padding: 2px 8px; }
.d-price .p { font: 600 clamp(26px, 2.8vw, 36px)/1 var(--sans); letter-spacing: -0.03em; }
.d-price .c { font: 500 14px var(--sans); margin-top: 10px; }
.watchbtn { font-weight: 500; padding: 6px 12px 6px 9px; }
.rails { gap: 24px 64px; margin-top: 40px; padding: 28px 0; border-top-color: var(--line); }
.rail .track i, .gauge .track i, .target .mark, .fair .mark { width: 2px; margin-left: -1px; border: 0; background: var(--ink); }
.rail .ends { font: 500 12.5px var(--sans); }
.stats { gap: 22px 32px; padding: 28px 0; }
.stats .v, .facts .v, .rows .v, .signals .v, .returns .v { font: 500 13.5px var(--sans); }
.glance { gap: 0; margin-top: 40px; border: 1px solid var(--line); }
.g { padding: 26px 28px; border: 0; border-right: 1px solid var(--line); }
.g:last-child { border-right: 0; }
.g .big { font: 600 22px/1.2 var(--sans); letter-spacing: -0.025em; margin: 10px 0 14px; }
.seg, .recbar { height: 3px; gap: 2px; }
.chart-panel { margin-top: 32px; padding: 24px 24px 12px; }
.chart-tools { margin-bottom: 14px; }
.grid2 { gap: 32px; margin-top: 32px; }
.box { padding: 32px 34px; }
.box > h2 { font: 600 18px/1.2 var(--sans); letter-spacing: -0.02em; margin-bottom: 22px; }
.box h3 { margin: 28px 0 10px; }
.signals > div { padding: 13px 0; gap: 14px; }
.signals .tk, .plan .tk { width: 2px; }
.returns { margin-top: 24px; }
.returns div { padding: 13px 4px; }
.facts { gap: 0 40px; }
.facts > div, .rows > div { padding: 11px 0; }
.news a { padding: 16px 0; gap: 20px; }
.news .w { font: 400 12.5px var(--sans); }
.news a:hover .t, .snews:hover, .unread-list a:hover { text-decoration-thickness: 1px; text-decoration-color: var(--ink); }
.msg { padding: 14px 0; }
.about { line-height: 1.7; }
.srcline { margin: -10px 0 22px; }
.checks { margin-top: 24px; padding-top: 20px; }
.check { padding: 3px 9px; }
.srcs > div { padding: 14px 0; }
.snews { padding: 12px 0; }
.mover { padding: 9px 0; margin: 0; font-size: 13px; }
.mover .s { font: 600 13px var(--sans); }

/* rule-based view */
.plan { margin-top: 32px; }
.verdict { padding: 36px 36px; }
.verdict .v-label { font: 600 30px/1.1 var(--sans); letter-spacing: -0.035em; margin: 12px 0 8px; }
.gauge { margin: 26px 0 12px; }
.gauge .track { height: 2px; }
.gauge .track i { top: -6px; height: 14px; }
.plan-levels { padding: 36px 36px; }
.lv-head { margin-bottom: 18px; }
.lv { padding: 18px 20px; }
.lv .v { font-size: 20px; font-weight: 600; letter-spacing: -0.025em; margin: 6px 0 4px; }
.lv-entry { background: var(--sunken); }
.plan-actions { margin-top: 22px; }
.how { padding: 18px 36px; }
.analyst { padding: 26px 28px; }
.a-head b { font: 600 15px/1.3 var(--sans); letter-spacing: -0.01em; }
.analyst li, .cases li { padding: 6px 0; font-size: 13px; line-height: 1.5; }
.cases > div, .whys { padding: 30px 36px; }
.conflict { padding: 26px 36px; background: var(--sunken); }
.plan h3 { margin-bottom: 14px; }
.whys li { padding: 6px 0 6px 18px; }
.whys li::before { top: 16px; height: 1px; }
.odds { margin-top: 18px; padding: 16px 18px; }
.fair .band { background: color-mix(in srgb, var(--ink) 16%, transparent); }
.fair, .target { margin: 40px 0 40px; }
.target .mark, .fair .mark { top: -6px; height: 14px; }
.methods > div { padding: 12px 0; }
.plan-foot { padding: 20px 36px 24px; }
.position { margin-top: 28px; padding: 8px 24px; border-color: var(--line); }
.pos-main { padding: 14px 0; }

/* order ticket */
.ticket { padding: 32px 32px 32px; gap: 18px; }
.t-head h2 { font: 600 22px/1.2 var(--sans); letter-spacing: -0.025em; margin-top: 6px; }
.fld input, .fld select { height: 42px; padding: 0 12px; background: none; font: 500 14px var(--sans); }
.fld input:focus, .fld select:focus { outline: 0; border-color: var(--ink); }
.t-sum { padding-top: 16px; gap: 9px; }
.t-error { padding: 11px 14px; }
dialog#ticket { box-shadow: var(--shadow); }
dialog#ticket::backdrop { background: rgba(0, 0, 0, 0.35); backdrop-filter: none; }

/* right pane */
#side { top: 65px; height: calc(100vh - 65px); background: var(--paper); }
#side .side-card { padding: 32px 32px; }
#side .side-card.cta { background: none; }
.side-card > .eyebrow { margin-bottom: 16px; }
.side-card > .eyebrow a { font-weight: 500; font-size: 12.5px; border-bottom: 1px solid var(--ink); }
.side-card > .eyebrow a:hover { background: none; color: var(--muted); }
.side-total { font: 600 28px/1.1 var(--sans); letter-spacing: -0.035em; }
.side-pnl { font: 500 13px var(--sans); margin: 8px 0 20px; }
.side-rows > div { padding: 11px 0; }
.side-rows b, .hrow .r { font: 500 13px var(--sans); }
.hrow, .wrow a { padding: 12px 0; margin: 0; }
.hrow:hover, .wrow a:hover { background: none; }
.hrow:hover .s, .wrow a:hover .s { text-decoration: underline; text-underline-offset: 3px; }
.hrow .s, .wrow .s, .prow .s { font: 600 13px var(--sans); }
.side-empty { line-height: 1.6; }
.cta-top b { font: 600 22px/1.1 var(--sans); letter-spacing: -0.03em; }
.cta-rating { margin: 12px 0 14px; }
.cta-btns { margin-top: 18px; gap: 10px; }
.cta-btns .btn { padding: 12px 12px; }
.cta-hold { margin-top: 16px; padding-top: 16px; }
.errorbox h2 { font: 600 22px var(--sans); letter-spacing: -0.025em; }

@container main (max-width: 720px) {
  .brief { gap: 40px; padding-top: 48px; }
  .lead, html[data-theme="dark"] .lead { border-right: 0; border-bottom: 1px solid var(--line); min-height: 0; }
  .glance { grid-template-columns: 1fr; }
  .g { border-right: 0; border-bottom: 1px solid var(--line); }
  .g:last-child { border-bottom: 0; }
}
@media (max-width: 1080px) {
  .shell { padding-left: 24px; padding-right: 24px; grid-template-columns: 1fr; }
  main { padding-right: 0; }
  .topbar-in { padding-left: 24px; }
  .footer { padding-left: 24px; }
  #side { height: auto; }
  #side .side-card { padding: 28px 0; }
}
@media (max-width: 640px) {
  .shell { padding-left: 16px; padding-right: 16px; }
  .topbar-in { padding: 10px 16px; gap: 10px; }
  .section { margin-top: 56px; }
  .box, .verdict, .plan-levels, .cases > div, .whys, .conflict { padding: 24px 20px; }
}

/* ===== holding time under the entry and exit levels ===== */
.timing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-top: 0; }
.timing .lv { border-bottom: 0; border-right: 1px solid var(--line); }
.timing .lv:last-child { border-right: 0; }
.timing .lv .v { font-size: 17px; white-space: normal; }
.timing .lv .v.small { color: var(--muted); font-weight: 500; }
.timing-note { margin: 14px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--muted); max-width: 78ch; }
@media (max-width: 640px) {
  .timing { grid-template-columns: 1fr; }
  .timing .lv { border-right: 0; border-bottom: 1px solid var(--line); }
  .timing .lv:last-child { border-bottom: 0; }
}

/* ===== live price marker ===== */
.live-dot { display: inline-block; width: 6px; height: 6px; margin-right: 6px; background: var(--up); vertical-align: middle; animation: live-pulse 2s ease-in-out infinite; }
@keyframes live-pulse { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ===== sign-in, account menu and user management ===== */
body.signed-out > .topbar, body.signed-out > .shell, body.signed-out > .footer { display: none; }
.signin { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background: var(--paper); }
.signin-card { width: min(380px, 100%); display: flex; flex-direction: column; gap: 18px; padding: 40px 36px; border: 1px solid var(--line); background: var(--surface); }
.signin-card .brand { font-weight: 600; font-size: 16px; }
.signin-card h1 { font: 600 26px var(--sans); letter-spacing: -0.03em; margin-top: 12px; }
.signin-note { color: var(--muted); font-size: 13.5px; line-height: 1.5; margin-top: -8px; }
.signin-card label, .users-form label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--ink-2); }
.signin-card input, .users-form input[type="text"], .users-form input[type="password"] { height: 44px; padding: 0 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; }
.signin-card input:focus, .users-form input:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.signin-error { color: var(--down); font-size: 13px; min-height: 18px; margin: -6px 0; }
.signin-error:empty, .users-done:empty { display: none; }
.signin-card .btn.big { width: 100%; text-align: center; }

.acct { position: relative; }
.acct summary { list-style: none; cursor: pointer; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct summary::-webkit-details-marker { display: none; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 250px; padding: 8px; display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.35); }
.acct-who { padding: 10px 12px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.acct-who b { color: var(--ink); font-weight: 600; }
.acct-who #save-state { display: block; color: var(--down); }
.acct-menu button { text-align: left; padding: 10px 12px; font-size: 13.5px; color: var(--ink); }
.acct-menu button:hover { background: var(--sunken); }

dialog.sheet { border: 1px solid var(--line); padding: 0; background: var(--surface); color: var(--ink); width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; }
dialog.sheet::backdrop { background: rgba(0, 0, 0, 0.35); }
.sheet-in { padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.sheet-in h2 { font: 600 19px var(--sans); letter-spacing: -0.02em; }
.sheet-in p { font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.sheet-in p.muted { color: var(--muted); font-size: 13px; }
.sheet-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.users-body { display: flex; flex-direction: column; gap: 16px; }
.users-warn { padding: 12px 14px; background: var(--sunken); color: var(--down) !important; }
.users-list { border-top: 1px solid var(--line); }
.users-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.users-row i { font-style: normal; font-size: 11.5px; color: var(--muted); margin-left: 8px; padding: 2px 6px; background: var(--sunken); }
.users-row .link { font-size: 12.5px; color: var(--ink-2); margin-left: 14px; }
.users-row .link.danger { color: var(--down); }
.users-form { display: flex; flex-direction: column; gap: 14px; padding-top: 8px; }
.users-form h3 { font: 600 15px var(--sans); }
.users-form label.check { flex-direction: row; align-items: center; gap: 8px; }
.users-done { color: var(--up); font-size: 13px; }

/* ===== charges, tax and goal on the portfolio page ===== */
.costs-set { display: flex; flex-wrap: wrap; gap: 20px 28px; align-items: flex-end; margin: 4px 0 24px; }
.costs-set label { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--muted); }
.costs-set label.check { flex-direction: row; align-items: center; gap: 8px; height: 40px; color: var(--ink-2); font-size: 13.5px; }
.costs-set select, .costs-goal input { height: 40px; padding: 0 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
.costs-goal { display: inline-flex; align-items: center; border: 1px solid var(--line); }
.costs-goal input { width: 78px; border: 0; }
.costs-goal i { font-style: normal; padding: 0 12px 0 0; color: var(--muted); }
.costs .plan-foot { margin-top: 18px; max-width: 110ch; }
@media (max-width: 900px) { .costs .glance { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 560px) { .costs .glance { grid-template-columns: 1fr !important; } }
.costs .plan-foot { padding: 0; border-top: 0; }

/* ===== daily shortlist ===== */
.picks { display: flex; flex-direction: column; gap: 24px; margin-top: 28px; }
.pick { padding: 32px 36px; display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.pick-head { display: flex; align-items: baseline; gap: 18px; width: 100%; }
.pick-rank { font-size: 15px; color: var(--muted); width: 22px; }
.pick-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pick-name b { font-size: 24px; font-weight: 600; letter-spacing: -0.03em; }
.pick-name span { color: var(--muted); font-size: 13.5px; }
.pick-px { font-size: 17px; font-weight: 500; white-space: nowrap; }
.pick-px span { font-size: 13.5px; margin-left: 6px; }
.pick-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 13px; color: var(--ink-2); }
.pick-held { padding: 2px 8px; background: var(--sunken); }
.pick-levels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; border: 1px solid var(--line); }
.pick-levels > div { padding: 18px 20px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pick-levels > div:last-child { border-right: 0; }
.pick-levels span { font-size: 12px; color: var(--muted); }
.pick-levels b { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.pick-levels b.up { color: var(--up); }
.pick-levels b.down { color: var(--down); }
.pick-levels i { font-style: normal; font-size: 12px; color: var(--muted); line-height: 1.4; }
.pick-why { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; width: 100%; }
.pick-why h4 { font: 600 13px var(--sans); margin-bottom: 8px; }
.pick-why ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13.5px; line-height: 1.6; }
@media (max-width: 900px) {
  .pick { padding: 24px 20px; }
  .pick-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pick-levels > div:nth-child(2) { border-right: 0; }
  .pick-levels > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .pick-why { grid-template-columns: 1fr; gap: 18px; }
  .pick-head { flex-wrap: wrap; }
}

/* ===== intraday ===== */
#intraday-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 28px 48px 0 0; padding: 18px 22px; border: 1px solid var(--ink); background: var(--surface); grid-column: 1; }
#intraday-banner div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#intraday-banner b { font-weight: 600; font-size: 15px; }
#intraday-banner span { color: var(--ink-2); font-size: 13.5px; }
.sheet-in.warn ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.sheet-in.warn b { color: var(--ink); font-weight: 600; }
.iday-how { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 28px; }
.iday-how > div { padding: 22px 24px; border-right: 1px solid var(--line); }
.iday-how > div:last-child { border-right: 0; }
.iday-how h4 { font: 600 13px var(--sans); margin-bottom: 8px; }
.iday-how p { font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.iday-live { width: 100%; padding: 12px 16px; background: var(--sunken); font-size: 13.5px; }
.iday-live i { display: inline-block; width: 8px; height: 8px; margin-right: 10px; background: var(--muted); }
.iday-live span { color: var(--muted); }
.iday-live.s-go i, .iday-live.s-done i { background: var(--up); }
.iday-live.s-weak i, .iday-live.s-failed i { background: var(--down); }
.big.down { color: var(--down); }
.big.up { color: var(--up); }
@media (max-width: 1080px) { #intraday-banner { margin-right: 0; } }
@media (max-width: 900px) {
  .iday-how { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iday-how > div:nth-child(2) { border-right: 0; }
  .iday-how > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* ===== stop-loss automation on the portfolio page ===== */
.prog { position: relative; width: 84px; height: 4px; background: var(--line); margin: 8px 0 6px auto; }
.prog span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--muted); }
.prog.half span { background: var(--up); }
.prog i { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1px; background: var(--ink); }
.small { font-size: 11.5px; }
.auto-sel { height: 34px; width: 122px; padding: 0 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 12.5px; }
table.pf td .textbtn { font-size: 11.5px; }
.auto-note { margin-top: 22px; font-size: 13px; color: var(--ink-2); max-width: 100ch; }
.auto-note summary { cursor: pointer; font-weight: 500; color: var(--ink); }
.auto-note ul { margin: 14px 0 12px; padding-left: 18px; line-height: 1.6; }
.auto-note p { line-height: 1.6; color: var(--muted); }

table.pf th, table.pf td { padding-left: 10px; padding-right: 10px; }

/* The intraday banner sits above the main column; the side pane keeps its own column. */
@media (min-width: 1081px) {
  .shell:has(> #intraday-banner) > #intraday-banner { grid-column: 1; grid-row: 1; }
  .shell:has(> #intraday-banner) > main { grid-column: 1; grid-row: 2; }
  .shell:has(> #intraday-banner) > #side { grid-column: 2; grid-row: 1 / span 2; }
}

/* ===== intraday holdings: exit strip and tags ===== */
.iday-strip { display: flex; align-items: center; gap: 18px 28px; flex-wrap: wrap; margin-top: 28px; padding: 18px 22px; border: 1px solid var(--ink); background: var(--surface); }
.iday-strip > div:first-child { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 240px; }
.iday-strip b { font-weight: 600; font-size: 15px; }
.iday-strip span { color: var(--ink-2); font-size: 13.5px; }
.iday-clock { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.iday-strip.late { border-color: var(--down); }
.iday-strip.late .iday-clock { color: var(--down); }
.tag-i { display: inline-block; margin-left: 8px; padding: 2px 6px; font-size: 10.5px; font-weight: 600; background: var(--sunken); color: var(--ink-2); vertical-align: middle; }
.tag-i.late { color: var(--down); }
.fld.check-fld { flex-direction: row; align-items: center; gap: 10px; }
.fld.check-fld span { font-size: 13.5px; color: var(--ink); }
.iday > .btn { align-self: flex-start; }
.fld.check-fld input[type="checkbox"] { width: 18px; height: 18px; flex: none; margin: 0; padding: 0; }

/* ===== intraday: mood line, side tabs, proof tables ===== */
.iday-mood { margin-top: 28px; padding: 16px 20px; border-left: 3px solid var(--muted); background: var(--sunken); font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.iday-mood b { color: var(--ink); font-weight: 600; }
.iday-mood.m-weak { border-left-color: var(--down); }
.iday-mood.m-strong { border-left-color: var(--up); }
.iday-tabs { display: inline-flex; margin-top: 4px; }
.iday-tabs button { padding: 9px 16px; font-size: 13.5px; }
table.proof td.up { color: var(--up); }
table.proof td.down { color: var(--down); }
.pick-warn { padding: 2px 8px; background: var(--sunken); color: var(--down); font-weight: 500; }
.costs .panel.g .big:not(.num) { font-size: 20px; letter-spacing: -0.02em; }
.costs .foot b { color: var(--ink); font-weight: 600; }

/* ===== history and learning ===== */
.hist-bar { display: flex; align-items: center; gap: 16px 24px; flex-wrap: wrap; margin-top: 28px; }
.hist-bar label { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.hist-bar select { height: 38px; padding: 0 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
.hist-bar .btn { margin-left: auto; }
.hist-bar .period button { padding: 8px 16px; font-size: 13.5px; }
.hist-sub { font: 600 15px var(--sans); margin: 34px 0 14px; }
table.hist tr.why-row td { padding-top: 0; border-top: 0; white-space: normal; text-align: left; }
table.hist tr.why-row summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
table.hist tr:has(+ tr.why-row:not([hidden])) td { border-bottom: 0; }
table.hist tr.why-row[hidden] { display: none; }
.why-btn { font: inherit; color: inherit; padding: 2px 6px; margin: -2px -6px; border-bottom: 1px dashed var(--muted); }
.why-btn:hover, .why-btn[aria-expanded="true"] { background: var(--sunken); }
.why-btn span { color: var(--muted); font-size: 12px; }
.why-rank { font-size: 13px; line-height: 1.55; color: var(--ink-2); padding: 10px 0 0; max-width: 90ch; }
.pick-rankwhy { font-size: 12.5px; line-height: 1.5; color: var(--muted); margin: 8px 0 0; }
.pick-rankwhy b { color: var(--ink-2); font-weight: 600; }
.why-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: 14px 0 6px; font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.why-grid h4 { font: 600 12.5px var(--sans); margin-bottom: 6px; color: var(--ink); }
.why-grid ul { margin: 0; padding-left: 16px; }
table.proof tr.gap td { font-size: 12px; color: var(--muted); padding-top: 22px; }
table.pf td.up { color: var(--up); }
table.pf td.down { color: var(--down); }
@media (max-width: 900px) { .why-grid { grid-template-columns: 1fr; gap: 12px; } .hist-bar .btn { margin-left: 0; } }
.users-body b.ok { color: var(--up); font-weight: 600; }
.users-body b.bad { color: var(--down); font-weight: 600; }

/* ---------- Tezi: one section for the app's own picks ---------- */
.tz-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 22px 0 14px; border-bottom: 1px solid var(--line); }
.tz-crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.tz-crumb a:hover { color: var(--ink); }
.tz-crumb b { color: var(--ink); font-weight: 600; }
.tz-crumb .tz-switch { margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--line); }
.tz-tabs { display: inline-flex; background: var(--sunken); padding: 3px; }
.tz-tabs a { padding: 7px 16px; font-size: 13px; font-weight: 600; color: var(--muted); }
.tz-tabs a:hover { color: var(--ink); }
.tz-tabs a[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.brief.tz-brief { padding: 26px 0 8px; }
.brief.tz-brief h1 { font-size: clamp(28px, 3.6vw, 42px); margin: 8px 0 12px; }
.tz-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 18px; }
.tz-card { display: flex; flex-direction: column; gap: 10px; padding: 28px; transition: border-color 0.15s, transform 0.2s var(--ease); }
.tz-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.tz-card.off { opacity: 0.55; pointer-events: none; }
.tz-card h2 { font: 400 40px/1 var(--serif); letter-spacing: -0.02em; margin: 2px 0 0; }
.tz-card p { color: var(--ink-2); font-size: 15px; line-height: 1.5; margin: 0; max-width: 46ch; }
.tz-stat { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13.5px; }
.tz-stat span { color: var(--muted); }
.tz-go { margin-top: auto; padding-top: 10px; font-weight: 600; font-size: 14px; }
.tz-listbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-top: 22px; }
@media (max-width: 760px) {
  .tz-cards { grid-template-columns: 1fr; }
  .tz-crumb .tz-switch { display: none; }
  .tz-tabs { width: 100%; }
  .tz-tabs a { flex: 1; text-align: center; padding: 8px 6px; }
}

.pick-quality { margin: 12px 0 0; padding: 12px 14px; background: var(--sunken); font-size: 13px; }
.pick-quality b { font-weight: 600; }
.pick-quality ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.pick-quality li { display: flex; gap: 8px; align-items: baseline; color: var(--ink-2); line-height: 1.45; flex-wrap: wrap; }
.pick-quality li > span[aria-hidden] { width: 12px; flex: none; font-weight: 700; }
.pick-quality li.ok > span[aria-hidden] { color: var(--up); }
.pick-quality li.no { color: var(--muted); }
.pick-quality li i { font-style: normal; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

table.miss th:last-child, table.miss td:last-child { white-space: normal; text-align: left; min-width: 260px; color: var(--ink-2); }

/* ---------- app frame: left navigation, content on the right ---------- */
.frame { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.page { min-width: 0; display: flex; flex-direction: column; }
.page .shell { flex: 1; width: 100%; }
.nav { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 20px 14px 14px; border-right: 1px solid var(--line); background: var(--surface); overflow-y: auto; scrollbar-width: thin; z-index: 40; }
.nav-top { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; }
#nav-toggle { display: none; }
.brand { font: italic 400 25px/1 var(--serif); letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: 9px; }
.brand .mark { flex: none; transition: transform 0.35s var(--ease); }
.brand:hover .mark { transform: translateY(-2px); }
.nav .search { flex: none; max-width: none; width: 100%; }
.nav #results { right: auto; width: min(340px, calc(100vw - 32px)); z-index: 70; }
.nav-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 22px; }
.nav-section { display: flex; flex-direction: column; gap: 2px; }
.nav-label { display: block; padding: 0 10px 7px; font-size: 11px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.nav-label-link { margin-top: 16px; }
.nav-label-link:hover, .nav-label-link[aria-current="page"] { color: var(--ink); }
.nav .market { display: grid; width: 100%; }
.nav .market button { padding: 7px 0; text-align: center; }
.market[data-active="nse"] .market-thumb { transform: none; }
.market[data-active="nasdaq"] .market-thumb { transform: translateX(100%); }
.nav-item { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); transition: background 0.15s, color 0.15s; }
.nav-item svg { flex: none; }
.nav-item > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item small { margin-left: auto; padding-left: 8px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.nav-item:hover { background: var(--sunken); color: var(--ink); }
.nav-item[aria-current="page"] { background: var(--ink); color: var(--paper); }
.nav-item[aria-current="page"] small { color: inherit; opacity: 0.7; }
.nav-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 12px; border-top: 1px solid var(--line); }
.nav-foot .tools { margin: 0; padding: 2px 2px 2px 10px; gap: 2px; justify-content: flex-end; font-size: 12px; }
.nav-foot #updated { margin: 0 auto 0 0; display: inline; overflow: hidden; text-overflow: ellipsis; }
.nav .acct summary { max-width: none; width: 100%; }
.nav .acct-menu { top: auto; bottom: calc(100% + 8px); left: 0; right: auto; min-width: 100%; width: 260px; }
#side { top: 0; height: 100vh; }
.signin .brand { justify-content: center; }
.tz-head { padding-top: 26px; }
@media (max-width: 1080px) { #side { height: auto; } }
@media (max-width: 900px) {
  .frame { display: block; }
  .nav { height: auto; gap: 10px; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .nav-top { padding: 0; }
  #nav-toggle { display: grid; }
  .nav-body { display: none; gap: 16px; padding: 6px 0 8px; }
  .nav.open .nav-body { display: flex; }
  .nav-foot { margin-top: 0; }
  .nav .acct-menu { bottom: auto; top: calc(100% + 8px); }
  .nav .search { order: 0; }
  .nav-top { order: -1; }
}
body.signed-out > .frame { display: none; }

/* bottom of the left navigation: account on the left, refresh and theme on the right, then when the data was last updated */
.nav-row { display: flex; align-items: center; gap: 2px; }
.nav-row #nav-account { flex: 1; min-width: 0; }
.nav-row .acct summary.nav-item { width: 100%; }
.nav-row .tools { flex: none; margin: 0; padding: 0; gap: 0; }
.nav-updated { margin-top: 8px; padding: 10px 10px 2px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.nav-updated:has(#updated:empty) { display: none; }
.nav-foot #updated { margin: 0; display: block; white-space: nowrap; }

/* ---------- Kairo brand ---------- */
.kairo-logo { display: block; flex: none; }
.kairo-logo .k-a { fill: var(--ink); }
.kairo-logo .k-b { fill: var(--brand); }
.brand { font-style: normal; }
::selection { background: var(--brand); color: var(--brand-ink); }
:focus-visible { outline-color: var(--brand); }
.btn { background: var(--brand); color: var(--brand-ink); }
.btn.ghost { background: none; color: var(--ink); }
.nav-item[aria-current="page"] { background: var(--sunken); color: var(--ink); box-shadow: inset 3px 0 0 var(--brand); }
.nav-item[aria-current="page"] small { color: var(--muted); opacity: 1; }
.eyebrow { color: var(--brand); }
.side-card > .eyebrow, #side .eyebrow { color: var(--muted); }
.brief h1, .d-head h1, .section-head h2, .tz-card h2 { font-weight: 500; letter-spacing: -0.03em; }

/* ---------- announcement ticker ---------- */
html { --ticker-h: 36px; }
html.no-ticker { --ticker-h: 0px; }
.ticker { position: sticky; top: 0; z-index: 60; height: var(--ticker-h); display: flex; align-items: center; overflow: hidden; background: #F47732; color: #0D0D0F; font: 600 12.5px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; }
html.no-ticker .ticker { display: none; }
.ticker-track { display: flex; flex: none; width: max-content; animation: ticker 48s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-run { display: flex; align-items: center; flex: none; }
.ticker-run span { padding: 0 22px; white-space: nowrap; }
.ticker-run i { font-style: normal; font-size: 8px; opacity: 0.55; }
.ticker-close { position: absolute; right: 0; top: 0; width: 44px; height: 100%; display: grid; place-items: center; color: #0D0D0F; background: linear-gradient(90deg, rgba(244, 119, 50, 0), #F47732 38%); }
.ticker-close:hover { background: #0D0D0F; color: #F47732; }
.ticker-close:focus-visible { outline: 2px solid #0D0D0F; outline-offset: -4px; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }
.frame { min-height: calc(100vh - var(--ticker-h)); }
.nav { top: var(--ticker-h); height: calc(100vh - var(--ticker-h)); }
#side { top: var(--ticker-h); height: calc(100vh - var(--ticker-h)); }
@media (max-width: 1080px) { #side { height: auto; } }
@media (max-width: 900px) { .nav { height: auto; } }

/* ---------- Kairo atmosphere: ember glows, convergence lines, the K as a watermark ---------- */
html { --glow: rgba(196, 81, 35, 0.10); --glow-strong: rgba(196, 81, 35, 0.16); --ember-grad: linear-gradient(135deg, #D85C26, #C45123); }
html[data-theme="dark"] { --glow: rgba(244, 119, 50, 0.14); --glow-strong: rgba(244, 119, 50, 0.24); --ember-grad: linear-gradient(135deg, #F47732, #D85C26); }
body { background: radial-gradient(1100px 620px at 100% 0%, var(--glow), transparent 62%), var(--paper); background-attachment: fixed; }
.nav { background: radial-gradient(360px 240px at 0% 0%, var(--glow-strong), transparent 70%), var(--surface); }
.brief { position: relative; }
.brief::before { content: ""; position: absolute; inset: 0 -32px 0 30%; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 900 600' preserveAspectRatio='xMaxYMin slice'%3E%3Cg fill='none' stroke='%23F47732' stroke-opacity='.22' stroke-width='1.2'%3E%3Cpath d='M900 20C700 130 610 260 560 600'/%3E%3Cpath d='M900 90C730 180 660 300 620 600'/%3E%3Cpath d='M900 160C760 240 710 340 680 600'/%3E%3Cpath d='M900 230C790 300 760 390 740 600'/%3E%3Cpath d='M900 300C820 360 810 430 800 600'/%3E%3C/g%3E%3C/svg%3E") right top / cover no-repeat; pointer-events: none; }
.brief > * { position: relative; }
.btn { background: var(--ember-grad); color: var(--brand-ink); transition: filter 0.15s; }
.btn:hover { opacity: 1; filter: brightness(1.08); }
.btn.ghost { background: none; box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--brand); filter: none; }
.section-head h2 { position: relative; padding-left: 14px; }
.section-head h2::before { content: ""; position: absolute; left: 0; top: 0.18em; bottom: 0.18em; width: 3px; background: var(--ember-grad); }
.tz-card { position: relative; overflow: hidden; background: radial-gradient(420px 260px at 100% 0%, var(--glow-strong), transparent 70%), var(--surface); }
.tz-card::after { content: ""; position: absolute; right: -28px; bottom: -34px; width: 210px; height: 186px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 332 294'%3E%3Cg fill='%23F47732' fill-opacity='.1'%3E%3Cpath d='M11 0H85Q95 0 95 11V80C95 109 108 121 124 133Q142 147 124 162C108 174 95 188 95 216V283Q95 294 85 294H11Q0 294 0 283C0 251 40 209 76 183C94 171 110 160 123 150Q129 147 123 144C110 134 94 123 76 111C40 85 0 43 0 11Q0 0 11 0Z'/%3E%3Cpath d='M122 119Q114 103 132 83L210 7Q217 0 229 0H326Q332 0 327 6L218 116Q194 140 157 140Q129 140 122 119Z'/%3E%3Cpath d='M122 175Q129 154 157 154Q194 154 218 178L327 288Q332 294 326 294H229Q217 294 210 287L132 211Q114 191 122 175Z'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; pointer-events: none; }
.tz-card > * { position: relative; }
.tz-card:hover { border-color: var(--brand); }
.tz-go { color: var(--brand); }
.pick.panel { border-top: 2px solid var(--brand); background: linear-gradient(180deg, var(--glow), transparent 140px), var(--surface); }
.tz-tabs a[aria-selected="true"] { box-shadow: inset 0 -2px 0 var(--brand), 0 1px 2px rgba(0, 0, 0, 0.12); }
.signin { position: relative; overflow: hidden; min-height: calc(100vh - var(--ticker-h)); background: radial-gradient(900px 560px at 85% 10%, var(--glow-strong), transparent 62%), radial-gradient(700px 480px at 0% 100%, var(--glow), transparent 65%), var(--paper); }
.signin::before { content: ""; position: absolute; right: -6vw; top: 50%; width: min(46vw, 620px); aspect-ratio: 332 / 294; transform: translateY(-50%); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 332 294'%3E%3Cg fill='%23F47732' fill-opacity='.1'%3E%3Cpath d='M11 0H85Q95 0 95 11V80C95 109 108 121 124 133Q142 147 124 162C108 174 95 188 95 216V283Q95 294 85 294H11Q0 294 0 283C0 251 40 209 76 183C94 171 110 160 123 150Q129 147 123 144C110 134 94 123 76 111C40 85 0 43 0 11Q0 0 11 0Z'/%3E%3Cpath d='M122 119Q114 103 132 83L210 7Q217 0 229 0H326Q332 0 327 6L218 116Q194 140 157 140Q129 140 122 119Z'/%3E%3Cpath d='M122 175Q129 154 157 154Q194 154 218 178L327 288Q332 294 326 294H229Q217 294 210 287L132 211Q114 191 122 175Z'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; pointer-events: none; }
.signin-card { position: relative; box-shadow: var(--shadow); }
.notice { border-left: 2px solid var(--brand); }
#side .side-card.cta { background: linear-gradient(180deg, var(--glow), transparent); }
.footer { background: linear-gradient(180deg, transparent, var(--glow)); }
@media (max-width: 900px) { .brief::before { inset: 0 -16px 40% 20%; opacity: 0.55; } }

/* ---------- standalone pages: legal and the public track record ---------- */
body.plain { display: flex; flex-direction: column; min-height: 100vh; }
.plain-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 32px; border-bottom: 1px solid var(--line); }
.plain-top nav { display: flex; align-items: center; gap: 22px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.plain-top nav a:hover { color: var(--ink); }
.plain-top nav .btn { color: var(--brand-ink); }
.plain-main { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 56px 32px 72px; min-height: 0; }
.plain-main h1 { font: 500 clamp(34px, 5vw, 56px)/1.04 var(--serif); letter-spacing: -0.03em; margin: 12px 0 18px; }
.plain-main .lede { font-size: 17px; line-height: 1.55; color: var(--ink-2); max-width: 70ch; }
.plain .footer { max-width: none; margin: 0; padding: 20px 32px 32px; text-align: center; }
.plain .footer a, .footer a { text-decoration: underline; text-underline-offset: 3px; }
.prose { max-width: 760px; }
.prose h2 { font: 500 30px/1.15 var(--serif); letter-spacing: -0.02em; margin: 56px 0 14px; padding-top: 28px; border-top: 1px solid var(--line); }
.prose h3 { font: 600 16px/1.3 var(--sans); margin: 26px 0 8px; }
.prose p, .prose li { font-size: 15.5px; line-height: 1.65; color: var(--ink-2); }
.prose p { margin: 0 0 12px; }
.prose ul { margin: 0 0 14px; padding-left: 20px; }
.prose li { margin-bottom: 8px; }
.prose b { color: var(--ink); }
.prose-nav { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 22px 0 0; font-size: 14px; font-weight: 600; }
.prose-nav a { border-bottom: 1.5px solid var(--brand); padding-bottom: 2px; }
.stats-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin-top: 32px; border: 1px solid var(--line); background: var(--surface); }
.stats-row > div { padding: 20px 22px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.stats-row > div:last-child { border-right: 0; }
.stats-row span { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.stats-row b { font: 500 26px/1.1 var(--serif); letter-spacing: -0.02em; }
@media (max-width: 760px) {
  .plain-top { padding: 14px 16px; }
  .plain-top nav a:not(.btn) { display: none; }
  .plain-main { padding: 36px 16px 56px; }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-row > div { border-bottom: 1px solid var(--line); }
}

/* ---------- sign-in small print, account links ---------- */
.signin-legal { font-size: 12px; line-height: 1.55; color: var(--muted); margin: 0; }
.signin-legal a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.acct-link { padding: 10px 12px; font-size: 13.5px; color: var(--ink); }
.acct-link:hover { background: var(--sunken); }

/* ---------- alerts: cards in the corner of the page ---------- */
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100vw - 32px)); }
.toast { position: relative; padding: 14px 40px 14px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--brand); box-shadow: var(--shadow); cursor: pointer; animation: rise 0.3s var(--ease) both; }
.toast b { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.toast p { font-size: 13px; line-height: 1.45; color: var(--ink-2); margin: 0; }
.toast button { position: absolute; right: 6px; top: 6px; width: 28px; height: 28px; font-size: 18px; line-height: 1; color: var(--muted); }
.toast button:hover { color: var(--ink); background: var(--sunken); }

/* ---------- walkthrough ---------- */
.tour { max-width: 460px; }
.tour h2 { font: 500 28px/1.12 var(--serif); letter-spacing: -0.02em; margin: 8px 0 12px; }
.tour p { font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.tour-dots { display: flex; gap: 6px; margin: 18px 0 4px; }
.tour-dots i { width: 22px; height: 3px; background: var(--line); }
.tour-dots i.on { background: var(--brand); }
.tour-focus { position: relative; z-index: 1; background: var(--sunken); box-shadow: 0 0 0 2px var(--brand), 0 0 0 6px var(--glow-strong); }

.tag-i.short { background: none; box-shadow: inset 0 0 0 1px var(--down); color: var(--down); }
/* ---------- opening screen: the mark fills with ember while the first page loads ---------- */
#splash { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; overflow: hidden; background: #0D0D0F; color: #F5EFE8; transition: opacity 0.55s ease, visibility 0.55s; }
#splash.out { opacity: 0; visibility: hidden; pointer-events: none; }
#splash.out .splash-core { transform: scale(1.06); }
html.splashing { overflow: hidden; }
.splash-lines { position: absolute; left: 0; top: -60px; width: 100%; height: calc(100% + 120px); transform: translateY(-54px); }
.splash-lines path { stroke-dasharray: 1; stroke-dashoffset: 1; stroke-opacity: 0.2; animation: splash-draw 3.6s cubic-bezier(0.6, 0, 0.2, 1) infinite; }
.splash-lines path:nth-child(3n + 2) { animation-delay: 0.35s; }
.splash-lines path:nth-child(3n) { animation-delay: 0.7s; }
.splash-glow { position: absolute; left: 50%; top: 50%; width: min(120vw, 1100px); aspect-ratio: 1; transform: translate(-50%, -54%); background: radial-gradient(closest-side, rgba(244, 119, 50, 0.42), rgba(112, 39, 15, 0.22) 45%, rgba(13, 13, 15, 0) 72%); animation: splash-breathe 3.6s ease-in-out infinite; }
.splash-core { position: relative; display: grid; justify-items: center; transition: transform 0.55s ease; }
.splash-mark { width: clamp(92px, 16vw, 132px); filter: drop-shadow(0 0 34px rgba(244, 119, 50, 0.45)); }
.splash-fill { animation: splash-rise 3.6s cubic-bezier(0.45, 0, 0.2, 1) infinite; }
.splash-fill path { animation: splash-wave 1.5s linear infinite; }
.splash-name { margin: 26px 0 0; font: 500 34px/1 "Space Grotesk", var(--sans); letter-spacing: -0.01em; }
.splash-line { margin: 10px 0 0; font: 400 14px/1.3 var(--sans); color: rgba(245, 239, 232, 0.62); }
.splash-status { margin: 34px 0 0; font: 600 11px/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: #F47732; }
.splash-status::after { content: ""; display: inline-block; width: 1.4em; text-align: left; animation: splash-dots 1.4s steps(4, end) infinite; }
@keyframes splash-rise { 0% { transform: translateY(300px); } 55%, 82% { transform: translateY(-20px); opacity: 1; } 100% { transform: translateY(-20px); opacity: 0; } }
@keyframes splash-wave { to { transform: translateX(-166px); } }
@keyframes splash-breathe { 0%, 100% { opacity: 0.45; scale: 0.9; } 60% { opacity: 1; scale: 1.05; } }
@keyframes splash-draw { 0% { stroke-dashoffset: 1; stroke-opacity: 0; } 20% { stroke-opacity: 0.42; } 62% { stroke-dashoffset: 0; stroke-opacity: 0.42; } 100% { stroke-dashoffset: 0; stroke-opacity: 0; } }
@keyframes splash-dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
@media (prefers-reduced-motion: reduce) {
  .splash-lines path { animation: none; stroke-dashoffset: 0; }
  .splash-glow, .splash-fill path, .splash-status::after { animation: none; }
  .splash-fill { animation: none; transform: translateY(-20px); }
}

/* Phones stop at the opening screen. */
.splash-block { margin: 36px 0 0; font: 500 20px/1.25 "Space Grotesk", var(--sans); color: #F5EFE8; text-align: center; }
.splash-block-sub { margin: 10px 0 0; max-width: 28ch; padding: 0 24px; font: 400 14.5px/1.5 var(--sans); color: rgba(245, 239, 232, 0.66); text-align: center; }
html.mobile-block .ticker, html.mobile-block .frame { display: none; }
