/* AOI Alpha research terminal — follows the client's aoialpha.com design system. */
:root {
  --canvas: #fbfbfc;
  --surface-1: #ffffff;
  --surface-2: #ffffff;
  --surface-3: #f7f8fa;
  --line: #e2e5ea;
  --line-soft: #edf0f5;
  --line-strong: #cfd4dd;
  --text: #14182b;
  --heading: #111827;
  --muted: #5f687d;
  --faint: #667085;
  --interaction: #514ee4;
  --interaction-strong: #3f3dca;
  --signal: #dd4050;
  --signal-strong: #c83342;
  --ink: #0b1020;
  --navy: #121a35;
  --live: #087a62;
  --rise: #c3313b;
  --fall: #2b64b4;
  --warning: #8a4b00;
  --error: #b42318;
  --success: #087a62;
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --font-sans: "Noto Sans KR", Pretendard, system-ui, sans-serif;
  /* Inter tabular figures: open, unambiguous digits (no slashed zero) that stay column-aligned. */
  --font-numeric: "Inter", "Noto Sans KR", system-ui, sans-serif;
  --radius-sm: 7px;
  --radius-md: 12px;
  --radius-lg: 15px;
  --radius-xl: 18px;
  --container: 1360px;
  --gutter: 24px;
  --ease: cubic-bezier(.23, 1, .32, 1);
  --shadow-card: 0 10px 24px rgb(21 29 48 / 4%);
  --shadow-surface: 0 18px 45px rgb(18 26 49 / 7%);
  --shadow-panel: 0 20px 45px rgb(11 16 32 / 16%);
  --header-h: 68px;
}

/* Base */
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); color: var(--text); color-scheme: light; scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--text); font-family: var(--font-sans); font-size: 14px; line-height: 1.6; letter-spacing: -.025em; overflow-x: clip; }
button, input, select { font: inherit; letter-spacing: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--interaction-strong); text-decoration: none; }
a:hover { color: var(--interaction); }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--interaction); outline-offset: 3px; }
main[tabindex="-1"]:focus { outline: 0; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--heading); line-height: 1.2; letter-spacing: -.06em; }
h1 { margin-bottom: 10px; font-size: clamp(30px, 3.4vw, 46px); font-weight: 500; }
h2 { margin-bottom: 10px; font-size: 18px; font-weight: 600; }
h3 { margin-bottom: 8px; font-size: 15px; font-weight: 600; }
h1 em, h2 em, h3 em { color: var(--signal); font-style: normal; }
dl, dd { margin: 0; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: -80px; left: 16px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--interaction); color: #fff; font-weight: 700; }
.skip-link:focus { top: 16px; color: #fff; }

/* Shell */
.research-shell { display: block; min-height: 100dvh; background: var(--canvas); }
.research-shell::before { position: fixed; z-index: 0; inset: 0; background-image: radial-gradient(rgb(23 30 51 / 7%) .55px, transparent .55px); background-size: 8px 8px; content: ""; opacity: .7; pointer-events: none; -webkit-mask-image: linear-gradient(#000, transparent 58%); mask-image: linear-gradient(#000, transparent 58%); }
.app-frame { position: relative; z-index: 1; display: flex; min-width: 0; min-height: 100dvh; flex-direction: column; }
.sidebar[hidden] { display: none !important; }
.layout { display: contents; }
.workspace-command { display: none; }
.role-switcher { display: none !important; }

/* Header */
.topbar { position: sticky; top: 0; z-index: 40; display: flex; min-height: 68px; align-items: center; gap: clamp(16px, 2.4vw, 36px); padding: 0 max(var(--gutter), calc((100vw - var(--container)) / 2)); border-bottom: 1px solid rgb(21 29 50 / 8%); background: rgb(255 255 255 / 94%); backdrop-filter: blur(14px) saturate(140%); }
.topbar-brand { display: inline-flex; flex: none; align-items: center; gap: 11px; color: var(--text); }
.topbar-brand:hover { color: var(--text); }
.aoi-mark { display: flex; width: 28px; height: 24px; align-items: end; gap: 3px; transform: skewX(-12deg); }
.aoi-mark i { display: block; width: 7px; border-radius: 2px 2px 1px 1px; background: linear-gradient(180deg, #f5707c 0%, #dd4050 100%); }
.aoi-mark i:nth-child(1) { height: 11px; opacity: .78; }
.aoi-mark i:nth-child(2) { height: 17px; opacity: .9; }
.aoi-mark i:nth-child(3) { height: 24px; }
.brand-wordmark { display: inline-flex; align-items: baseline; gap: 5px; line-height: 1; }
.brand-wordmark strong { color: #171b30; font-size: 18px; font-weight: 800; letter-spacing: .065em; }
.brand-wordmark small { color: #3f48a9; font-size: 7px; font-weight: 800; letter-spacing: .18em; }
.nav-list, .bottom-nav ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.nav-link { display: flex; min-height: 46px; align-items: center; gap: 10px; padding: 0 12px; border-radius: var(--radius-sm); color: #555d75; font-weight: 700; }
.nav-link:hover { color: var(--text); }
.nav-icon { display: inline-grid; width: 20px; place-items: center; font-size: 16px; }
.topnav { display: flex; align-self: stretch; }
.topnav .nav-list { display: flex; align-items: stretch; gap: 7px; }
.topnav .nav-link { position: relative; min-height: 68px; padding: 0 9px; border-radius: 0; color: #555d75; font-size: 12px; font-weight: 800; letter-spacing: -.04em; white-space: nowrap; }
.topnav .nav-link:hover, .topnav .nav-link[aria-current="page"] { color: var(--text); }
.topnav .nav-link[aria-current="page"]::after { position: absolute; right: 10px; bottom: 0; left: 10px; height: 1px; background: var(--signal); content: ""; }
.topnav .nav-icon { display: none; }
.topbar-context { display: none; }
.global-search { position: relative; display: flex; width: min(250px, 22vw); min-width: 170px; margin-left: auto; }
.global-search input { width: 100%; min-width: 0; height: 36px; padding: 0 40px 0 14px; border: 1px solid #e3e6ee; border-radius: 999px; outline: 0; background: #f6f7fa; color: var(--text); font-size: 12px; transition: border-color .16s, background .16s, box-shadow .16s; }
.global-search input::placeholder { color: var(--faint); }
.global-search input:focus { border-color: var(--interaction); background: #fff; box-shadow: 0 0 0 3px rgb(81 78 228 / 10%); }
.global-search button { position: absolute; top: 2px; right: 2px; display: grid; width: 32px; height: 32px; place-items: center; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--muted); }
.global-search button:hover { background: #eceef6; color: var(--interaction); }
.topbar-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.theme-toggle { display: inline-grid; width: 34px; height: 34px; flex: none; place-items: center; padding: 0; border: 0; border-radius: 999px; background: transparent; color: #697189; }
.theme-toggle:hover { background: #f1f2f8; color: var(--interaction); }
.account-chip { display: inline-flex; align-items: center; gap: 7px; padding: 0 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.account-chip .status-dot { margin-top: 0; }
.topbar-actions .btn-login, .topbar-actions .btn-quiet { min-height: 36px; padding: 0 10px; border: 0; background: transparent; color: #3f465c; font-size: 13px; font-weight: 700; }
.topbar-actions .btn-login:hover, .topbar-actions .btn-quiet:hover { background: transparent; color: var(--interaction); transform: none; }
.topbar-actions .btn-primary { min-height: 36px; padding: 0 15px; border-color: var(--ink); border-radius: 999px; background: var(--ink); box-shadow: none; color: #fff; font-size: 13px; }
.topbar-actions .btn-primary:hover { border-color: #252c42; background: #252c42; color: #fff; }

/* Market ticker */
.market-rail { position: relative; z-index: 2; border-bottom: 1px solid rgb(21 29 50 / 8%); background: #fbfbfc; }
.market-tape { min-width: 0; }
.market-tape-inner { display: flex; min-height: 32px; align-items: stretch; overflow: hidden; }
.tape-lead { display: inline-flex; flex: none; align-items: center; gap: 8px; padding: 0 14px 0 max(22px, calc((100vw - var(--container)) / 2)); border-right: 1px solid rgb(21 29 50 / 10%); color: var(--faint); font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 10px; white-space: nowrap; }
.tape-kicker { color: var(--signal-strong); font-family: var(--font-sans); font-size: 10px; font-weight: 800; }
.tape-track { display: flex; min-width: 0; flex: 1; align-items: center; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent); }
.tape-marquee { display: flex; width: max-content; animation: tape-flow 70s linear infinite; }
.tape-set { display: flex; flex: none; align-items: center; gap: 31px; padding: 0 31px 0 22px; }
.tape-set:empty { display: none; }
.tape-track:hover .tape-marquee, .tape-track:focus-within .tape-marquee, .market-rail.is-paused .tape-marquee { animation-play-state: paused; }
@keyframes tape-flow { to { transform: translateX(-50%); } }
.tape-group { display: contents; }
a.tape-item:hover, a.tape-item:hover strong { color: var(--signal-strong); }
.tape-toggle { display: grid; width: 34px; flex: none; place-items: center; padding: 0; border: 0; border-left: 1px solid rgb(21 29 50 / 10%); background: transparent; color: #697189; font-size: 9px; }
.tape-toggle:hover { color: var(--interaction); }
.tape-item { display: inline-flex; flex: none; align-items: center; gap: 7px; color: var(--faint); font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 11px; white-space: nowrap; }
.tape-item strong { color: #333a52; font-size: 12px; font-weight: 600; }
.tape-item em { font-style: normal; font-weight: 700; }
.tape-item em::after { display: inline-block; width: 4px; height: 4px; margin-left: 7px; border-radius: 50%; background: #4fc6ac; content: ""; vertical-align: middle; }

.session-notice { display: flex; width: min(var(--container), calc(100% - var(--gutter) * 2)); min-height: 48px; align-items: center; justify-content: space-between; gap: 16px; margin: 16px auto 0; padding: 10px 14px; border: 1px solid #eddbb9; border-radius: var(--radius-md); background: #fff9ee; color: #7d4700; font-size: 13px; }
.session-notice.error { border-color: #efc7c3; background: #fff4f3; color: #a1231b; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* Main layout and headings */
.main { flex: 1; min-width: 0; }
.main-inner { width: min(var(--container), calc(100% - var(--gutter) * 2)); margin: 0 auto; padding: 28px 0 88px; }
.main-inner > * + * { margin-top: var(--space-24); }
.main-inner > .aoi-section { margin-top: 92px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding: 26px 0 22px; border-bottom: 1px solid var(--line); }
.page-heading .eyebrow { margin: 0 0 10px; color: var(--faint); font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 10px; font-weight: 500; letter-spacing: .11em; }
.page-heading h1 { margin: 0 0 8px; font-size: clamp(32px, 3.4vw, 46px); letter-spacing: -.085em; line-height: 1.12; }
.lede { max-width: 650px; margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.aoi-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 22px; }
.aoi-section-index { color: var(--faint); font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 10px; letter-spacing: .11em; }
.aoi-section-head h2 { margin: 8px 0 6px; font-size: clamp(29px, 3.1vw, 43px); font-weight: 500; letter-spacing: -.085em; line-height: 1.12; }
.aoi-section-head p { max-width: 650px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.aoi-section-meta { display: grid; justify-items: end; gap: 5px; padding-bottom: 4px; text-align: right; }
.aoi-section-meta > span { color: var(--faint); font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 10px; letter-spacing: .04em; }
.aoi-section-meta b { color: #27314a; font-size: 12px; }
.aoi-section-meta .text-link { margin-top: 2px; }
.eyebrow, .panel-label, .section-kicker, .nav-group-label { margin: 0 0 10px; color: var(--faint); font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 10px; font-weight: 500; letter-spacing: .08em; }
.section-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--interaction); }
.section-kicker span + span { color: var(--faint); }
.text-link { display: inline-flex; align-items: center; gap: 5px; color: var(--interaction-strong); font-size: 11px; font-weight: 800; }
.text-link:hover { color: var(--signal); }
.arrow { display: inline-block; transition: transform .18s var(--ease); }
a:hover .arrow { transform: translateX(3px); }

/* Buttons and badges */
.btn { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 7px; padding: 0 15px; border: 1px solid transparent; border-radius: 9px; font-size: 13px; font-weight: 800; text-decoration: none; transition: background-color .16s, border-color .16s, color .16s, transform .16s var(--ease); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn-primary { border-color: var(--interaction); background: var(--interaction); color: #fff; }
.btn-primary:hover { border-color: #3e3bc9; background: #3e3bc9; color: #fff; }
.btn-secondary { border-color: #d9dceb; background: #fff; color: #38405a; }
.btn-secondary:hover { border-color: var(--interaction); color: var(--interaction); }
.btn-quiet { border-color: var(--line); background: #fff; color: var(--muted); }
.btn-quiet:hover { background: var(--surface-3); color: var(--text); }
.btn-danger { border-color: #f0b9b4; background: #fff5f4; color: var(--error); }
.btn-danger:hover { border-color: var(--error); color: var(--error); }
.badge { display: inline-flex; min-height: 24px; align-items: center; gap: 6px; padding: 2px 8px; border: 1px solid #e0e3ec; border-radius: 6px; background: #f5f6f9; color: var(--muted); font-size: 11px; font-weight: 700; }
.badge-primary { border-color: #dcdaff; background: #f0efff; color: var(--interaction-strong); }
.badge-warning { border-color: #efdab7; background: #fff8eb; color: var(--warning); }
.badge-error { border-color: #f1c3bf; background: #fff3f2; color: var(--error); }

/* Status */
.status-dot, .context-dot { display: inline-block; width: 7px; height: 7px; flex: none; margin-top: .45em; border-radius: 50%; background: #2fbf97; box-shadow: 0 0 0 4px rgb(47 191 151 / 14%); }
.status-strip, .freshness-rail, .connection-banner { display: flex; min-height: 46px; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; color: #596378; font-size: 12px; }
.connection-banner { border-left: 3px solid var(--live); }
.connection-banner.warning { border-left-color: var(--warning); }
.connection-banner.error { border-left-color: var(--error); }
.connection-banner > span { min-width: 0; }
.connection-banner strong { color: var(--text); }
.status-strip-left, .status-strip-right { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.status-strip .status-dot { margin-top: 0; }
.status-label { color: #273049; font-weight: 800; }
.freshness { display: inline-flex; align-items: center; gap: 5px; color: var(--live); font-weight: 700; }
.freshness > span[aria-hidden] { font-size: 8px; }
.freshness.delayed, .freshness.stale { color: var(--warning); }
.freshness.closed { color: var(--muted); }
.freshness.unavailable { color: var(--error); }
.freshness + .muted { margin-left: 6px; }
.muted, .small { color: var(--muted); }
.small { font-size: 11px; }
.numeric, .price, .quote-price, .metric-number, .table-number { font-family: var(--font-numeric); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.up, .rise { color: var(--rise) !important; }
.down, .fall { color: var(--fall) !important; }
.neutral { color: var(--muted) !important; }

/* Cards and tables */
.card, .panel, .state-card, .subscription-card, .evidence-panel { border: 1px solid #e0e4eb; border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-card); }
.card { padding: 22px; }
.card-flat { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.section-heading h2 { margin-bottom: 0; font-size: 18px; letter-spacing: -.05em; }
.content-grid, .grid, .evidence-grid { display: grid; gap: 15px; }
.content-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.evidence-grid { grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr); align-items: start; }
.stack { display: grid; min-width: 0; gap: 15px; }
.evidence-grid > *, .stack > * { min-width: 0; }
.evidence-grid > .stack:last-child .table-wrap table { min-width: 0; }
.table-wrap, .chart-table { width: 100%; min-width: 0; overflow-x: auto; }
.table-wrap table, .chart-table table { width: 100%; min-width: 560px; border-collapse: collapse; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: middle; }
th { background: #f7f8fa; color: var(--faint); font-size: 10px; font-weight: 700; white-space: nowrap; }
th:first-child { border-top-left-radius: 10px; }
th:last-child { border-top-right-radius: 10px; }
td { color: #3d455b; font-size: 13px; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fcfcfd; }
tr[data-row-route] { cursor: pointer; }
tr[data-row-route]:hover td { background: #f7f7ff; }
tr[data-row-route]:hover .table-link { color: var(--interaction); }
.th-sort { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; }
.th-sort:hover { color: var(--interaction); }
.th-sort span { font-size: 10px; }
td.numeric, th.numeric { text-align: right; }
.table-link { display: inline-flex; min-width: 0; flex-wrap: wrap; align-items: baseline; gap: 6px; color: #212a3e; font-weight: 800; }
.table-link:hover { color: var(--interaction); }
.stock-code { color: var(--faint); font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 11px; font-weight: 500; }
.quote-cell { display: grid; gap: 2px; }
.quote-cell-label, .quote-sub, .metric-label, .readout-label { display: block; margin-bottom: 4px; color: var(--faint); font-size: 11px; }
.quote-cell .numeric { color: #2e3449; font-size: 13px; font-weight: 600; }
.rank-cell { color: var(--signal-strong); font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 11px; }
.mover-sector { display: block; margin-top: 3px; color: var(--faint); font-size: 11px; font-weight: 500; }

/* Market hero */
.market-hero { position: relative; isolation: isolate; display: flex; min-height: 580px; align-items: center; overflow: hidden; border: 1px solid rgb(70 86 139 / 45%); border-radius: 24px; background-color: #080d1c; background-image: linear-gradient(90deg, rgb(5 9 21 / 99%) 0%, rgb(6 10 23 / 96%) 34%, rgb(8 12 27 / 72%) 58%, rgb(8 11 24 / 18%) 100%), url("/assets/aoi-alpha-hero.webp"); background-position: center, 60% center; background-size: cover; box-shadow: 0 30px 70px rgb(16 22 43 / 15%); color: #fff; }
.market-hero::before { position: absolute; z-index: -1; inset: 0; background-image: linear-gradient(rgb(151 167 220 / 16%) 1px, transparent 1px), linear-gradient(90deg, rgb(151 167 220 / 16%) 1px, transparent 1px); background-size: 52px 52px; content: ""; opacity: .25; pointer-events: none; -webkit-mask-image: linear-gradient(90deg, #000, transparent 73%); mask-image: linear-gradient(90deg, #000, transparent 73%); }
.market-hero-copy { position: relative; z-index: 1; width: min(57%, 720px); padding: 72px clamp(35px, 5.7vw, 83px); }
.market-hero .eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 0; color: #b6c0dd; font-size: 10px; letter-spacing: .08em; }
.market-hero .eyebrow::before { width: 7px; height: 7px; border-radius: 50%; background: #4ce0bb; box-shadow: 0 0 0 5px rgb(76 224 187 / 12%); content: ""; }
.market-hero .eyebrow i { width: 3px; height: 3px; border-radius: 50%; background: #7d89ad; }
.market-hero .eyebrow b { margin-left: 4px; color: #f4f6fe; font-family: var(--font-sans); font-size: 10px; letter-spacing: -.02em; }
.market-hero h1 { max-width: 640px; margin: 27px 0 20px; color: #fff; font-size: clamp(42px, 4.6vw, 68px); font-weight: 800; letter-spacing: -.09em; line-height: 1.1; }
.market-hero h1 span { color: #b4aeff; }
.market-hero .lede { max-width: 525px; color: #c2cadf; font-size: 15px; letter-spacing: -.035em; line-height: 1.9; }
.market-hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 31px; }
.market-hero-actions .btn { min-height: 49px; padding: 0 18px; border-radius: 7px; }
.market-hero .btn-primary { border-color: #e2505e; background: #d33a4a; box-shadow: 0 10px 25px rgb(219 57 73 / 20%); color: #fff; }
.market-hero .btn-primary:hover { background: #ee5962; transform: translateY(-2px); }
.market-hero .btn-secondary { border-color: rgb(225 232 255 / 24%); background: rgb(255 255 255 / 6%); color: #e8ecfb; }
.market-hero .btn-secondary:hover { border-color: rgb(225 232 255 / 45%); background: rgb(255 255 255 / 12%); color: #fff; transform: translateY(-2px); }
.market-hero-proof { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 34px; color: #aeb8d3; font-size: 10px; }
.market-hero-proof span { display: inline-flex; align-items: center; gap: 5px; }
.market-hero-proof span::before { width: 10px; height: 10px; border: 1.5px solid #a9a8ff; border-radius: 3px; content: ""; }
.market-hero-proof b { color: #f4f5fb; }
.market-hero-meta { position: absolute; z-index: 2; right: clamp(24px, 4.2vw, 58px); bottom: 44px; display: grid; width: min(320px, 29%); padding: 18px; border: 1px solid rgb(231 237 255 / 20%); border-radius: 15px; background: linear-gradient(140deg, rgb(13 20 43 / 84%), rgb(10 15 31 / 60%)); box-shadow: 0 20px 45px rgb(0 0 0 / 28%); color: #c3cbe0; font-size: 11px; backdrop-filter: blur(18px) saturate(130%); }
.hero-panel-kicker { display: flex; justify-content: space-between; gap: 10px; color: #a9b5d3; font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 10px; letter-spacing: .06em; }
.hero-panel-kicker strong { color: #6be0bf; font-size: 8px; font-weight: 500; }
.hero-regime { display: grid; gap: 5px; padding: 22px 0 17px; }
.hero-panel-label { color: #9ba8c8; font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 10px; letter-spacing: .06em; }
.market-hero .hero-session { color: #b4aeff; font-size: 11px; font-weight: 800; }
.hero-panel-title { color: #fff; font-size: 20px; font-weight: 700; letter-spacing: -.06em; }
.market-hero-meta .up { color: #ff8a90 !important; }
.market-hero-meta .down { color: #8fb1ff !important; }
.hero-regime small { color: #c3cbe0; font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 11px; }
.hero-panel-rule { height: 1px; background: rgb(231 237 255 / 15%); }
.hero-panel-metric { display: grid; gap: 3px; padding: 15px 0; }
.hero-panel-metric b { color: #fff; font-size: 27px; letter-spacing: -.02em; line-height: 1.1; }
.hero-panel-metric b small { margin-left: 3px; color: #adb8d3; font-size: 12px; }
.hero-panel-metric em { color: #aebad2; font-size: 10px; font-style: normal; }
.hero-panel-focus { display: grid; gap: 3px; padding: 12px; border-radius: 8px; background: rgb(255 255 255 / 7%); }
.hero-panel-focus b { color: #fff; font-size: 14px; }
.hero-panel-focus b em { margin-left: 5px; font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 12px; font-style: normal; }
.hero-panel-rule + .hero-panel-focus { margin-top: 15px; }
.hero-panel-focus small { color: #b8c2d9; font-size: 10px; }
.hero-panel-link { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgb(231 237 255 / 14%); color: #e4e7ff; font-size: 11px; font-weight: 800; }
.hero-panel-link:hover { color: #b4aeff; }

/* Market brief strip */
.market-brief { display: grid; min-height: 156px; grid-template-columns: 1.45fr repeat(4, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow-card); }
.main-inner > .market-brief { margin-top: 18px; }
.market-brief-intro, .market-brief-cell { min-width: 0; border-right: 1px solid var(--line); }
.market-brief-intro { display: grid; grid-template-columns: 1fr auto; align-content: center; padding: 25px 28px; }
.market-brief-intro > span { grid-column: span 2; color: var(--faint); font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 10px; letter-spacing: .08em; }
.market-brief-intro b { margin-top: 8px; color: #20273a; font-size: 17px; font-weight: 600; letter-spacing: -.06em; line-height: 1.32; }
.market-brief-intro a { align-self: end; color: #59627a; font-size: 18px; }
.market-brief-intro a:hover { color: var(--signal); }
.market-brief-cell { display: flex; flex-direction: column; justify-content: center; padding: 24px 20px; }
.market-brief-cell:last-child { border-right: 0; }
.market-brief-cell span { color: var(--faint); font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 10px; letter-spacing: .04em; }
.market-brief-cell b { margin: 7px 0 4px; color: #1c2438; font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.market-brief-cell b small { color: var(--muted); font-family: var(--font-sans); font-size: 11px; letter-spacing: 0; }
.market-brief-cell em { font-size: 11px; font-style: normal; font-weight: 800; }
.market-brief-cell p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.market-brief-action { background: #f8f9fb; }
.market-brief-action b { color: var(--signal-strong); }

/* Market pulse */
.market-pulse { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .85fr); overflow: hidden; border: 1px solid #dfe3ea; border-radius: var(--radius-xl); background: #fff; box-shadow: var(--shadow-surface); }
.pulse-lead { min-width: 0; padding: 30px; }
.pulse-lead h3 { max-width: 640px; margin: 4px 0 18px; font-size: clamp(22px, 2.4vw, 30px); font-weight: 500; letter-spacing: -.075em; line-height: 1.25; }
.pulse-bias { font-weight: 700; }
.pulse-readings { display: grid; margin: 0; border-top: 1px solid var(--line-soft); }
.pulse-readings > div { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.pulse-readings > div:last-child { border-bottom: 0; padding-bottom: 0; }
.pulse-readings dt { padding-top: 5px; color: var(--faint); font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 10px; letter-spacing: .06em; }
.pulse-readings dd { display: grid; gap: 3px; }
.pulse-readings b { color: #1c2438; font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.pulse-readings span { color: var(--muted); font-size: 12px; }
.pulse-readings em { font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-style: normal; font-weight: 700; }
.pulse-readout { padding: 30px; border-left: 1px solid var(--line-soft); background: #f8f9fb; }
.pulse-readout .readout-label { color: var(--faint); font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 10px; letter-spacing: .08em; }
.breadth-summary { display: flex; justify-content: space-between; gap: 12px; margin: 6px 0 14px; }
.breadth-summary > div { display: grid; }
.breadth-summary > div:last-child { text-align: right; }
.breadth-summary strong { color: #1c2438; font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 30px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.breadth-summary span { color: var(--faint); font-size: 11px; }
.breadth-meter { display: flex; height: 6px; gap: 2px; overflow: hidden; border-radius: 999px; background: #e9ecf2; }
.breadth-up { border-radius: 999px; background: var(--signal); }
.breadth-down { border-radius: 999px; background: #4d73c8; }
.breadth-legend { display: flex; justify-content: space-between; gap: 12px; margin-top: 9px; color: var(--muted); font-size: 11px; }
.legend-dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: currentColor; }

/* Movers desk */
.market-workbench { display: grid; grid-template-columns: 300px minmax(0, 1fr); overflow: hidden; border: 1px solid #dfe3ea; border-radius: var(--radius-xl); background: #fff; box-shadow: var(--shadow-surface); }
.research-note { position: relative; display: flex; min-width: 0; flex-direction: column; padding: 34px 29px; overflow: hidden; background: var(--navy); color: #fff; }
.research-note::after { position: absolute; right: -104px; bottom: -109px; width: 280px; height: 280px; border: 1px solid rgb(224 64 79 / 50%); border-radius: 50%; box-shadow: 0 0 0 35px rgb(224 64 79 / 8%), 0 0 0 70px rgb(224 64 79 / 4%); content: ""; }
.research-note > * { position: relative; z-index: 1; }
.research-note .panel-label { color: #b4c0df; font-size: 9px; }
.research-note h3 { margin: 22px 0 14px; color: #fff; font-size: 27px; font-weight: 400; letter-spacing: -.075em; line-height: 1.23; }
.research-note h3 em { color: #ff7b83; }
.research-note > p { margin: 0; color: #c3cce2; font-size: 11px; line-height: 1.8; }
.evidence-principles { display: grid; gap: 0; margin: 24px 0; padding: 0; list-style: none; border-top: 1px solid rgb(255 255 255 / 17%); }
.evidence-principles li { display: grid; gap: 1px; padding: 11px 0; border-bottom: 1px solid rgb(255 255 255 / 17%); }
.evidence-principles strong { color: #fff; font-size: 11px; }
.evidence-principles span { color: #b4bfd8; font-size: 10px; line-height: 1.5; }
.note-link { display: inline-flex; align-items: center; gap: 5px; margin-top: auto; color: #f0f2ff; font-size: 11px; font-weight: 800; }
.note-link:hover { color: #ff9399; }
.movers-board { display: grid; min-width: 0; align-content: start; gap: 10px; padding: 17px; }
.movers-board > * { min-width: 0; }
.movers-board .table-wrap { overflow-x: auto; border-radius: 10px; }
.movers-board td { padding-top: 15px; padding-bottom: 15px; }
.movers-caption { margin: 2px 4px 0; color: var(--faint); font-size: 11px; }
.board-asof { font-family: var(--font-numeric); font-variant-numeric: tabular-nums; }

/* Research system tool cards */
.tool-grid { display: grid; grid-template-columns: 1.18fr .91fr .91fr; gap: 12px; }
.tool-card { position: relative; display: flex; min-width: 0; min-height: 315px; flex-direction: column; padding: 25px; border: 1px solid #e0e4eb; border-radius: var(--radius-lg); background: #fff; color: var(--text); transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease); }
a.tool-card:hover { border-color: #a6acbb; box-shadow: 0 18px 38px rgb(19 28 52 / 9%); color: var(--text); transform: translateY(-4px); }
.tool-art { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.tool-art::after { position: absolute; right: -100px; bottom: -100px; width: 230px; height: 230px; border: 1px solid rgb(68 75 110 / 12%); border-radius: 50%; content: ""; }
.tool-card > :not(.tool-art, .search-results) { position: relative; z-index: 1; }
.tool-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 10px; background: #f0f1f5; color: #3d4277; }
.tool-icon svg { width: 18px; height: 18px; }
.tool-kicker { margin-top: 22px; color: var(--faint); font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 10px; letter-spacing: .08em; }
.tool-card h3 { margin: 9px 0; color: #1c2538; font-size: 23px; font-weight: 400; letter-spacing: -.07em; line-height: 1.31; }
.tool-card p { max-width: 345px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.75; }
.tool-card > b { display: inline-flex; align-items: center; gap: 5px; margin-top: auto; padding-top: 18px; color: #383bc3; font-size: 11px; }
.tool-card-primary { z-index: 3; border-color: #273260; background: linear-gradient(140deg, #121a36, #202553); color: #fff; }
.tool-card-primary .tool-art::after { border-color: rgb(255 123 131 / 62%); box-shadow: 0 0 0 38px rgb(255 123 131 / 8%), 0 0 0 76px rgb(103 92 255 / 12%); }
.tool-card-primary .tool-icon { background: rgb(255 255 255 / 12%); color: #c8cdff; }
.tool-card-primary .tool-kicker { color: #b9c3e7; }
.tool-card-primary h3 { color: #fff; }
.tool-card-primary p { color: #c2cbe2; }
.search-panel-wrap { position: relative; }
.search-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 18px; }
.search-panel input { width: 100%; min-height: 44px; padding: 0 13px; border: 1px solid #dfe2ec; border-radius: 9px; outline: 0; background: #fff; color: var(--text); font-size: 13px; }
.search-panel input::placeholder { color: var(--faint); }
.search-panel input:focus { border-color: var(--interaction); box-shadow: 0 0 0 3px rgb(81 78 228 / 12%); }
.tool-card-primary .search-panel input { border-color: rgb(225 232 255 / 25%); background: rgb(255 255 255 / 8%); color: #fff; }
.tool-card-primary .search-panel input::placeholder { color: #a9b3cf; }
.tool-card-primary .search-panel input:focus { border-color: #a9a8ff; box-shadow: 0 0 0 3px rgb(169 168 255 / 20%); }
.tool-card-primary .search-panel .btn-primary { min-height: 44px; border-color: #7572f5; background: #6461f0; }
.tool-card-primary .search-panel .btn-primary:hover { background: #5552e3; }
.search-hint { margin: 8px 0 0; color: var(--muted); font-size: 10px; }
.tool-card-primary .search-hint { color: #a9b3cf; }
.tool-card-primary .empty-state, .tool-card-primary .error-state { color: #c2cbe2; }
.tool-card-primary .empty-state h3, .tool-card-primary .error-state h3 { color: #fff; font-size: 14px; }
.tool-card-primary .error-id { color: #a9b3cf; }
.search-results { position: absolute; z-index: 10; top: calc(100% - 18px); margin: 0 25px; right: 0; left: 0; max-height: 320px; overflow: auto; border: 1px solid #dfe2ec; border-radius: var(--radius-md); background: #fff; box-shadow: var(--shadow-panel); }
.search-result { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; border-bottom: 1px solid var(--line-soft); background: #fff; color: #20273a; text-align: left; }
.search-result:last-child { border-bottom: 0; }
.search-result:hover, .search-result[aria-selected="true"] { background: #f2f2ff; color: #20273a; }
.search-result .stock-name { margin-right: 6px; font-size: 14px; font-weight: 800; }
.search-result .stock-sector { color: var(--faint); font-size: 11px; text-align: right; }

/* Research scope wire */
.scope-wire { position: relative; isolation: isolate; padding: 55px; overflow: hidden; border: 1px solid #202943; border-radius: var(--radius-xl); background-color: #0c111d; background-image: linear-gradient(90deg, rgb(7 10 18 / 96%), rgb(8 12 22 / 89%) 54%, rgb(8 12 22 / 62%)), url("/assets/aoi-alpha-hero.webp"); background-position: center, 70% center; background-size: cover; color: #fff; }
.scope-wire-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.scope-wire .aoi-section-index { color: #b4c0df; }
.scope-wire h2 { margin: 10px 0 0; color: #fff; font-size: clamp(29px, 3vw, 42px); font-weight: 400; letter-spacing: -.08em; line-height: 1.14; }
.scope-wire h2 em { color: #ff8a90; }
.scope-wire-aside { display: grid; max-width: 360px; justify-items: end; gap: 16px; }
.scope-wire-aside p { margin: 0; color: #b7c1d8; font-size: 12px; line-height: 1.75; }
.scope-status { display: inline-flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid rgb(234 239 255 / 18%); border-radius: 8px; background: rgb(255 255 255 / 6%); }
.scope-status .status-dot { margin-top: 0; }
.scope-status b, .scope-status small { display: block; }
.scope-status b { color: #fff; font-size: 11px; }
.scope-status small { color: #b6c0d7; font-size: 9px; }
.scope-wire-card { margin-top: 37px; padding: 19px; border: 1px solid rgb(234 239 255 / 16%); border-radius: var(--radius-md); background: rgb(255 255 255 / 6%); backdrop-filter: blur(10px); }
.scope-wire-card h3 { margin: 0 0 13px; color: #fff; font-size: 18px; font-weight: 400; }
.scope-wire-list { margin: 0; padding: 0; overflow: hidden; border: 1px solid rgb(234 239 255 / 13%); border-radius: 10px; background: rgb(10 15 30 / 52%); list-style: none; }
.scope-wire-list li { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 13px 14px; border-bottom: 1px solid rgb(234 239 255 / 12%); }
.scope-wire-list li:last-child { border-bottom: 0; }
.scope-wire-list time { color: #b6c0d7; font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 11px; }
.scope-wire-list strong { color: #eff2ff; font-size: 12px; }
.scope-wire-list span { color: #c9d0e4; font-size: 11px; }

/* Stock detail */
.stock-dossier-head, .stock-header { padding: 18px 0 0; }
.stock-identity { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding-bottom: 20px; }
.stock-identity .eyebrow { margin-bottom: 10px; font-size: 10px; letter-spacing: .11em; }
.stock-identity h1, .stock-title { margin: 0; font-size: clamp(32px, 4vw, 52px); font-weight: 500; letter-spacing: -.085em; }
.stock-meta { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.stock-meta .stock-code { color: var(--signal-strong); font-size: 11px; }
.detail-freshness { margin-top: 0; }
.freshness-rail > span { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.quote-lead { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 20px; margin-top: 14px; padding: 26px; border: 1px solid #dfe3ea; border-radius: var(--radius-xl); background: #fff; box-shadow: var(--shadow-surface); }
.quote-lead-main { min-width: 0; align-self: center; }
.quote-price { display: inline-block; color: #1c2438; font-size: clamp(44px, 6.4vw, 76px); font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.quote-unit { margin-left: 8px; color: var(--muted); font-family: var(--font-sans); font-size: 16px; font-weight: 600; letter-spacing: 0; }
.quote-change { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 15px; font-weight: 700; }
.quote-lead-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-self: stretch; overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius-md); background: #fbfbfd; }
.quote-lead-facts > * { padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.quote-lead-facts > :nth-child(odd):not(:last-child) { border-right: 1px solid var(--line-soft); }
.quote-lead-facts > :last-child { grid-column: 1 / -1; border-bottom: 0; }
.quote-lead-facts dt { color: var(--faint); font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 11px; letter-spacing: .04em; }
.quote-lead-facts dd { margin-top: 5px; color: #1f2947; font-size: 15px; font-weight: 700; }
.quote-status-notice { margin: 14px 0 0; padding: 11px 13px; border-left: 3px solid var(--warning); border-radius: 0 8px 8px 0; background: #fff8eb; color: #7d4700; font-size: 12px; }
.quote-status-notice.error { border-left-color: var(--error); background: #fff3f2; color: #a1231b; }
.detail-tabs { position: sticky; z-index: 20; top: var(--header-h); display: flex; gap: 7px; border-bottom: 1px solid var(--line); background: rgb(251 251 252 / 94%); overflow-x: auto; scrollbar-width: none; backdrop-filter: blur(10px); }
.main-inner > .detail-tabs { margin-top: 18px; }
.detail-tabs a { position: relative; display: inline-flex; min-height: 46px; align-items: center; padding: 0 10px; color: #555d75; font-size: 13px; font-weight: 800; white-space: nowrap; }
.detail-tabs a:hover, .detail-tabs a[aria-current="page"] { color: var(--text); }
.detail-tabs a[aria-current="page"]::after { position: absolute; right: 10px; bottom: -1px; left: 10px; height: 2px; background: var(--signal); content: ""; }
.evidence-card { scroll-margin-top: calc(var(--header-h) + 62px); }
.chart-subtitle { margin: -4px 0 8px; color: var(--muted); font-size: 12px; }
.chart-with-table { min-width: 0; }
.chart-box { position: relative; min-width: 0; padding: 4px 0 0; }
/* 차트 라이브러리가 측정 전 고정 폭을 잡아도 그리드 열이 넓어지지 않게 막는다. */
.price-chart { position: relative; min-width: 0; max-width: 100%; }
.evidence-grid > .stack, .evidence-card { min-width: 0; }
.chart-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 8px; }
.chart-ranges, .chart-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chart-range, .chart-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--muted); font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 11px; font-weight: 500; cursor: pointer; }
.chart-range:hover, .chart-chip:hover { border-color: var(--line-strong); color: var(--text); }
.chart-range:focus-visible, .chart-chip:focus-visible { outline: 2px solid var(--interaction); outline-offset: 2px; }
.chart-range.is-on { border-color: var(--interaction); background: var(--interaction); color: #fff; }
.chart-chip.is-on { border-color: var(--line-strong); color: var(--text); }
.chart-chip:not(.is-on) { opacity: .55; text-decoration: line-through; }
.chart-swatch { width: 10px; height: 3px; border-radius: 2px; background: currentColor; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; min-height: 18px; margin-bottom: 4px; color: var(--muted); font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 11px; }
.chart-legend-date { color: var(--text); font-weight: 600; }
.chart-legend-live { color: var(--interaction); font-weight: 600; }
.chart-legend-ma { font-weight: 500; }
.chart-canvas { position: relative; width: 100%; min-width: 0; height: 480px; overflow: hidden; }
.chart-note { margin: 6px 0 0; color: var(--faint); font-size: 11px; }
.chart-caption { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; color: var(--faint); font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 11px; }
.chart-table { margin-top: 14px; }
.chart-table summary, details summary.btn { width: fit-content; min-height: 34px; list-style: none; font-size: 12px; }
.chart-table summary::-webkit-details-marker, details summary.btn::-webkit-details-marker { display: none; }
.chart-table .table-wrap { margin-top: 12px; }
.flow-list, .news-list, .evidence-list { margin: 0; padding: 0; list-style: none; }
.flow-row { display: grid; min-height: 56px; grid-template-columns: 90px minmax(72px, 1fr) auto; align-items: center; gap: 14px; border-bottom: 1px solid var(--line-soft); }
.flow-row:last-child { border-bottom: 0; }
.flow-row > span:first-child { color: #3d455b; font-weight: 700; }
.flow-row strong { font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 12px; }
.flow-bar { display: block; height: 6px; overflow: hidden; border-radius: 999px; background: #eceef4; }
.flow-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--signal); }
.flow-row:has(.down) .flow-bar > span { background: #4d73c8; }
.news-list li { display: grid; gap: 4px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.news-list li:last-child { border-bottom: 0; }
.news-list a { color: #212a3e; font-size: 13px; font-weight: 700; }
.news-list a:hover { color: var(--interaction); }
.news-meta { color: var(--faint); font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 11px; }
.evidence-item { display: grid; grid-template-columns: minmax(100px, .65fr) minmax(0, 1.35fr); gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.evidence-item:last-child { border-bottom: 0; }
.evidence-item span:first-child { color: var(--faint); font-size: 12px; }
.evidence-item span:last-child { color: #2e3449; font-size: 12px; font-weight: 600; }
.card .footer-note { margin-top: 18px; }

/* Signals and locked states */
.signal-card { padding: 20px; border: 1px solid #dcdaff; border-radius: var(--radius-md); background: #fafaff; }
.signal-card > * + * { margin-top: 16px; }
.signal-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.signal-direction { font-size: 28px; font-weight: 700; letter-spacing: -.06em; }
.signal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.signal-card .grid-2 > div { padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 10px; background: #fff; }
.signal-table-actions { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.signal-table-actions h2 { margin-bottom: 2px; }
.signal-lock { position: relative; display: grid; gap: 14px; padding: 26px; overflow: hidden; border: 1px solid #273260; border-radius: var(--radius-lg); background: linear-gradient(140deg, #121a36, #202553); color: #c2cbe2; }
.signal-lock::after { position: absolute; right: -90px; bottom: -110px; width: 240px; height: 240px; border: 1px solid rgb(255 123 131 / 55%); border-radius: 50%; box-shadow: 0 0 0 36px rgb(255 123 131 / 7%), 0 0 0 72px rgb(103 92 255 / 10%); content: ""; pointer-events: none; }
.signal-lock > * { position: relative; z-index: 1; margin: 0; }
.signal-lock > .btn, .signal-lock > .page-actions { justify-self: start; }
.signal-lock h3 { color: #fff; font-size: 21px; font-weight: 400; letter-spacing: -.07em; }
.signal-lock p { max-width: 560px; color: #c2cbe2; font-size: 12px; line-height: 1.75; }
.signal-lock p strong { color: #fff; }
.signal-lock ul { display: grid; max-width: 420px; gap: 0; padding: 0; list-style: none; border-top: 1px solid rgb(255 255 255 / 15%); }
.signal-lock li { padding: 9px 0 9px 18px; border-bottom: 1px solid rgb(255 255 255 / 15%); color: #dfe4f4; font-size: 12px; }
.signal-lock li::before { position: absolute; margin: 7px 0 0 -18px; width: 6px; height: 6px; border-radius: 50%; background: #ff7b83; content: ""; }
.signal-lock-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 10px; background: rgb(255 255 255 / 12%); color: #c8cdff; font-size: 16px; }
.signal-lock .btn-primary { border-color: #e2505e; background: #d33a4a; box-shadow: 0 10px 25px rgb(219 57 73 / 20%); }
.signal-lock .btn-primary:hover { background: #ee5962; }
.signal-lock .btn-secondary { border-color: rgb(225 232 255 / 28%); background: rgb(255 255 255 / 7%); color: #e8ecfb; }
.signal-lock .btn-secondary:hover { border-color: rgb(225 232 255 / 50%); color: #fff; }
.locked-cell { color: var(--faint); font-style: normal; }
.locked-cell::before { margin-right: 5px; content: "▣"; font-size: 10px; }
.history-revisions { margin-top: 16px; }

/* Screener and forms */
.screener-form { display: grid; gap: 24px; }
.screener-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.screener-group + .screener-group { padding-top: 20px; border-top: 1px solid var(--line-soft); }
.screener-group legend, .screener-presets legend { padding: 0; color: var(--heading); font-size: 13px; font-weight: 800; }
.screener-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 20px; margin-top: 12px; }
.screener-card .field { min-width: 0; }
.screener-card .field label { font-size: 12px; line-height: 1.5; }
.screener-card .field input, .screener-card .field select { width: 100%; min-width: 0; min-height: 44px; }
.screener-card .btn { min-height: 44px; }
.screener-card input, .screener-card select, .screener-card button { scroll-margin-block: 120px 80px; }
.screener-submit { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.screener-submit p { margin: 0; }
.screener-submit .btn { min-width: 144px; }
.screener-presets { min-width: 0; margin: 24px 0 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-3); }
.screener-presets legend { padding-inline: 6px; }
.screener-preset-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; }
.screener-preset-row { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.screener-preset-load { grid-template-columns: minmax(0, 1fr) auto auto; }
.screener-summary { margin-top: 20px; }
.screener-summary h3 { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.screener-summary .condition-summary { margin: 0; }
.screener-card .condition-chip { max-width: 100%; overflow-wrap: anywhere; }
@media (max-width: 1000px) {
  .screener-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screener-preset-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 620px) {
  .screener-fields { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .screener-submit { align-items: stretch; flex-direction: column; }
  .screener-submit .btn { width: 100%; }
  .screener-presets { padding: 14px; }
  .screener-preset-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screener-preset-row > .field { grid-column: 1 / -1; }
  .screener-preset-row > .btn { width: 100%; }
}
.filter-row { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.field { display: grid; min-width: 170px; flex: 1; gap: 6px; }
.field label { color: #4f576d; font-size: 11px; font-weight: 800; }
.field input, .field select, select { min-height: 42px; padding: 0 11px; border: 1px solid #dfe2ec; border-radius: 9px; outline: 0; background: #fff; color: #2f374c; font-size: 13px; }
.field select:focus, .field input:focus { border-color: var(--interaction); box-shadow: 0 0 0 3px rgb(81 78 228 / 10%); }
.screener-form .btn { min-height: 42px; }
.condition-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.condition-chip { display: inline-flex; min-height: 28px; align-items: center; padding: 4px 10px; border: 1px solid #dcdaff; border-radius: 999px; background: #f4f3ff; color: var(--interaction-strong); font-size: 12px; font-weight: 700; }
.empty-state, .error-state { display: grid; justify-items: start; gap: 9px; padding: 28px 8px; color: var(--muted); }
.empty-state h3, .error-state h3 { margin-bottom: 0; color: var(--text); }
.empty-state p, .error-state p { margin: 0; }
.error-id { display: block; color: var(--faint); font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 10px; }
.inline-error { display: grid; gap: 3px; margin-top: 10px; padding: 10px 12px; border-left: 3px solid var(--error); border-radius: 0 8px 8px 0; background: #fff3f2; color: #a1231b; font-size: 12px; }
.skeleton { border-radius: 14px; background: linear-gradient(90deg, #eef0f4, #f8f9fb, #eef0f4); background-size: 200% 100%; animation: pulse 1.4s ease-in-out infinite; }
.skeleton-page { display: grid; gap: 18px; }
.sk-hero { height: 580px; border-radius: 24px; }
.sk-strip { height: 156px; }
.sk-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr); gap: 15px; }
.sk-card { height: 320px; }
.sk-tall { height: 420px; }
.sk-kicker { width: 160px; height: 12px; margin-top: 26px; border-radius: 6px; }
.sk-title { width: min(360px, 70%); height: 44px; }
.sk-quote { height: 180px; border-radius: 18px; }
.sk-panel { display: grid; gap: 10px; padding: 22px; border: 1px solid #e0e4eb; border-radius: 15px; background: #fff; }
.sk-row { height: 44px; border-radius: 9px; }
@keyframes pulse { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* Watchlist empty state */
.watch-empty .empty-state { padding: 4px 0 8px; }
.watch-suggestions { display: grid; margin: 8px 0 18px; padding: 0; border: 1px solid var(--line-soft); border-radius: 12px; list-style: none; }
.watch-suggestions li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 4px 16px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.watch-suggestions li:last-child { border-bottom: 0; }
.watch-suggestions .mover-sector { grid-column: 1; grid-row: 2; margin: 0; }
.watch-suggestions .numeric { grid-row: 1 / span 2; color: #2e3449; font-size: 13px; text-align: right; }
.watch-suggestions .numeric em { display: block; font-size: 11px; font-style: normal; font-weight: 700; }
.watch-suggestions .btn { grid-row: 1 / span 2; min-height: 34px; padding: 0 12px; font-size: 12px; }

/* Subscription */
.subscription-card { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 20px; padding: 0; border: 0; box-shadow: none; }
.subscription-card .eyebrow { color: var(--signal-strong); }
.subscription-card h2 { font-size: 24px; font-weight: 500; letter-spacing: -.07em; }
.subscription-card .price { margin: 18px 0 0; color: #1c2438; font-size: 34px; font-weight: 600; }
.subscription-card .price small { color: var(--muted); font-family: var(--font-sans); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.state-card { padding: 20px; background: #fbfbfd; box-shadow: none; }
.state-card h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.state-card dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 14px 0 18px; font-size: 12px; }
.state-card dt { color: var(--faint); }
.state-card dd { color: #1f2947; font-weight: 700; }
.benefit-list { display: grid; gap: 8px; margin: 16px 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.benefit-list strong { color: var(--text); }
.action-stack { display: flex; flex-wrap: wrap; gap: 9px; }
.risk { margin-top: 16px; padding: 13px 14px; border-left: 3px solid var(--warning); border-radius: 0 8px 8px 0; background: #fff8eb; color: #5d4b34; font-size: 12px; line-height: 1.7; }
.footer-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }

/* Confirm dialog */
.confirm-backdrop { position: fixed; z-index: 70; inset: 0; display: grid; place-items: center; padding: 20px; background: rgb(0 0 0 / 65%); }
.confirm-sheet { width: min(440px, 100%); padding: 24px; border: 1px solid #dfe2ec; border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-panel); color: var(--text); }
.confirm-sheet h2 { font-size: 20px; }
.confirm-sheet p { color: var(--muted); }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* Main promotional popup */
.promo-backdrop { position: fixed; z-index: 70; inset: 0; display: grid; place-items: center; padding: 20px; background: rgb(0 0 0 / 70%); overflow-y: auto; }
.promo-sheet { width: min(640px, 100%); overflow: hidden; border: 1px solid #2a3350; border-radius: var(--radius-lg); background: #101522; box-shadow: 0 24px 60px rgb(0 0 0 / 45%); }
.promo-media { display: block; background: #0b1020; }
.promo-image { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.promo-actions { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #2a3350; }
.promo-action { min-height: 48px; padding: 12px 16px; border: 0; background: transparent; color: #d5dcef; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.promo-action + .promo-action { border-left: 1px solid #2a3350; }
.promo-action:hover { background: #18203a; color: #fff; }
.promo-action:focus-visible, .promo-media:focus-visible { outline: 2px solid #c3c1ff; outline-offset: -3px; }
@media (max-width: 600px) { .promo-backdrop { padding: 16px; } .promo-action { font-size: 13px; } }

/* Footer */
.site-footer { position: relative; z-index: 1; margin-top: 50px; border-top: 1px solid rgb(255 255 255 / 10%); background: #101522; color: #bdc4d3; }
.footer-grid { display: grid; width: min(var(--container), calc(100% - var(--gutter) * 2)); grid-template-columns: 2.1fr repeat(3, .55fr); gap: 25px; margin: 0 auto; padding: 40px 0 28px; }
.footer-brand .topbar-brand { color: #fff; }
.footer-brand .brand-wordmark strong { color: #fff; }
.footer-brand .brand-wordmark small { color: #9eabc9; }
.footer-brand p { max-width: 440px; margin: 14px 0 0; color: #9ca8bd; font-size: 11px; line-height: 1.8; }
.footer-grid nav { display: flex; flex-direction: column; gap: 6px; }
.footer-grid h2 { margin: 3px 0 8px; color: #f0f3fb; font-size: 12px; font-weight: 700; letter-spacing: -.02em; }
.footer-grid nav a { width: fit-content; color: #9ca8bd; font-size: 11px; }
.footer-grid nav a:hover { color: #fff; }
.footer-legal { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px 32px; width: min(var(--container), calc(100% - var(--gutter) * 2)); margin: 0 auto; padding: 17px 0 26px; border-top: 1px solid rgb(255 255 255 / 10%); color: #9ca8bd; font-size: 10px; line-height: 1.75; }
.footer-legal-text { flex: 1 1 520px; }
.footer-legal p { max-width: 1050px; margin: 0 0 6px; }
.footer-legal b { color: #f0f3fb; }
.footer-legal small { color: #7d879c; }
.footer-company { display: flex; flex: 0 0 auto; flex-direction: column; gap: 3px; color: #9ca8bd; font-size: 10px; font-style: normal; line-height: 1.7; text-align: right; }
.footer-company strong { color: #f0f3fb; font-size: 11px; }
.footer-company-reg { font-family: var(--font-numeric); font-variant-numeric: tabular-nums; }

/* Mobile task navigation */
.bottom-nav { display: none; }

/* Dark theme — mirrors the client's dark mode (#0b1020 canvas, navy panels). Hero, research note and footer are already dark. */
:root[data-theme="dark"] { color-scheme: dark; --canvas: #0b1020; --surface-1: #111830; --surface-2: #151d33; --surface-3: #1a233b; --line: #29344f; --line-soft: #222c45; --line-strong: #34405f; --text: #e6ebfb; --heading: #f3f5ff; --muted: #a6b1c8; --faint: #8e9ab4; --interaction: #a9a6ff; --interaction-strong: #c3c1ff; --signal: #ff6b76; --signal-strong: #ff7a86; --live: #45d3a8; --rise: #ff7a86; --fall: #86a8ff; --warning: #f5bf73; --error: #ff8f86; --shadow-card: none; --shadow-surface: 0 18px 45px rgb(0 0 0 / 28%); }
:root[data-theme="dark"] .research-shell::before { background-image: radial-gradient(rgb(200 210 255 / 7%) .55px, transparent .55px); }
:root[data-theme="dark"] .topbar { border-bottom-color: #1e2740; background: rgb(11 16 32 / 88%); }
:root[data-theme="dark"] .brand-wordmark strong { color: #f0f3ff; }
:root[data-theme="dark"] .brand-wordmark small { color: #a9b3cb; }
:root[data-theme="dark"] .nav-link, :root[data-theme="dark"] .topnav .nav-link { color: #b9c3d9; }
:root[data-theme="dark"] .topnav .nav-link:hover, :root[data-theme="dark"] .topnav .nav-link[aria-current="page"] { color: #fff; }
:root[data-theme="dark"] .global-search input { border-color: #29344f; background: #151d33; color: #edf1ff; }
:root[data-theme="dark"] .global-search input::placeholder { color: #8e9ab4; }
:root[data-theme="dark"] .global-search input:focus { background: #111830; }
:root[data-theme="dark"] .global-search button, :root[data-theme="dark"] .theme-toggle { color: #b7c0d5; }
:root[data-theme="dark"] .global-search button:hover, :root[data-theme="dark"] .theme-toggle:hover { background: #202a45; color: #c9c7ff; }
:root[data-theme="dark"] .topbar-actions .btn-login, :root[data-theme="dark"] .topbar-actions .btn-quiet { border-color: transparent; background: transparent; color: #c9d1e4; }
:root[data-theme="dark"] .topbar-actions .btn-primary { border-color: #d33a4a; background: #d33a4a; }
:root[data-theme="dark"] .topbar-actions .btn-primary:hover { border-color: #e44f5d; background: #e44f5d; }
:root[data-theme="dark"] .market-rail { border-bottom-color: #1e2740; background: #0e1427; }
:root[data-theme="dark"] .tape-lead { border-right-color: #222c45; color: #8e9ab4; }
:root[data-theme="dark"] .tape-item { color: #8e9ab4; }
:root[data-theme="dark"] .tape-item strong { color: #d5dcef; }
:root[data-theme="dark"] .tape-toggle { border-left-color: #222c45; color: #a6b1c8; }
:root[data-theme="dark"] .session-notice { border-color: #4a3a1c; background: #2a2113; color: #f5bf73; }
:root[data-theme="dark"] .session-notice.error { border-color: #553034; background: #2c1618; color: #ff9b93; }
:root[data-theme="dark"] .page-heading { border-bottom-color: #29344f; }
:root[data-theme="dark"] .aoi-section-head p, :root[data-theme="dark"] .movers-caption, :root[data-theme="dark"] .market-brief-cell p, :root[data-theme="dark"] .market-brief-cell b small, :root[data-theme="dark"] .breadth-legend, :root[data-theme="dark"] .breadth-summary span { color: #a6b1c8; }
:root[data-theme="dark"] .aoi-section-meta b { color: #d5dcef; }
:root[data-theme="dark"] .card, :root[data-theme="dark"] .panel, :root[data-theme="dark"] .evidence-panel { border-color: #29344f; background: #151d33; }
:root[data-theme="dark"] .state-card { border-color: #29344f; background: #121a2f; }
:root[data-theme="dark"] .subscription-card { background: transparent; }
:root[data-theme="dark"] th { background: #1a233b; color: #aeb8cd; }
:root[data-theme="dark"] td { color: #d5dcef; }
:root[data-theme="dark"] tbody tr:hover td { background: #18203a; }
:root[data-theme="dark"] tr[data-row-route]:hover td { background: #1c2442; }
:root[data-theme="dark"] .table-link, :root[data-theme="dark"] .quote-cell .numeric, :root[data-theme="dark"] .watch-suggestions .numeric { color: #edf1ff; }
:root[data-theme="dark"] .stock-code { color: #9aa5bf; }
:root[data-theme="dark"] .btn-primary { border-color: #6461f0; background: #6461f0; }
:root[data-theme="dark"] .btn-primary:hover { border-color: #5552e3; background: #5552e3; }
:root[data-theme="dark"] .market-hero .btn-primary, :root[data-theme="dark"] .signal-lock .btn-primary { border-color: #e2505e; background: #d33a4a; }
:root[data-theme="dark"] .tool-card-primary .search-panel .btn-primary { border-color: #7572f5; background: #6461f0; }
:root[data-theme="dark"] .btn-secondary { border-color: #34415f; background: #192139; color: #d5dcf0; }
:root[data-theme="dark"] .btn-secondary:hover { border-color: var(--interaction); color: #c6c3ff; }
:root[data-theme="dark"] .btn-quiet { border-color: #29344f; background: transparent; color: #a6b1c8; }
:root[data-theme="dark"] .btn-quiet:hover { background: #1a233b; color: #edf1ff; }
:root[data-theme="dark"] .btn-danger { border-color: #553034; background: #2c1618; color: #ff9b93; }
:root[data-theme="dark"] .badge { border-color: #2c3753; background: #1a233b; color: #b7c1d7; }
:root[data-theme="dark"] .badge-primary { border-color: #3a3680; background: #221f4d; color: #c9c7ff; }
:root[data-theme="dark"] .badge-warning { border-color: #4a3a1c; background: #2a2113; color: #f5bf73; }
:root[data-theme="dark"] .badge-error { border-color: #553034; background: #2c1618; color: #ff9b93; }
:root[data-theme="dark"] .status-strip, :root[data-theme="dark"] .freshness-rail, :root[data-theme="dark"] .connection-banner { border-color: #29344f; background: #151d33; color: #a6b1c8; }
:root[data-theme="dark"] .status-label { color: #e6ebfb; }
:root[data-theme="dark"] .market-brief, :root[data-theme="dark"] .market-pulse, :root[data-theme="dark"] .market-workbench { border-color: #29344f; background: #151d33; }
:root[data-theme="dark"] .market-brief-intro, :root[data-theme="dark"] .market-brief-cell { border-color: #29344f; }
:root[data-theme="dark"] .market-brief-intro b, :root[data-theme="dark"] .market-brief-cell b, :root[data-theme="dark"] .pulse-readings b, :root[data-theme="dark"] .breadth-summary strong { color: #edf1ff; }
:root[data-theme="dark"] .market-brief-intro a { color: #a6b1c8; }
:root[data-theme="dark"] .market-brief-action { background: #18203a; }
:root[data-theme="dark"] .pulse-readout { border-color: #222c45; background: #121a2f; }
:root[data-theme="dark"] .breadth-meter { background: #222c45; }
:root[data-theme="dark"] .tool-card:not(.tool-card-primary) { border-color: #29344f; background: #151d33; color: #e6ebfb; }
:root[data-theme="dark"] a.tool-card:not(.tool-card-primary):hover { border-color: #4a5577; color: #e6ebfb; }
:root[data-theme="dark"] .tool-card:not(.tool-card-primary) h3 { color: #f3f5ff; }
:root[data-theme="dark"] .tool-card:not(.tool-card-primary) p { color: #a6b1c8; }
:root[data-theme="dark"] .tool-card:not(.tool-card-primary) .tool-icon { background: #1f2945; color: #c8cdff; }
:root[data-theme="dark"] .tool-card:not(.tool-card-primary) > b { color: #b4b2ff; }
:root[data-theme="dark"] .tool-card:not(.tool-card-primary) .tool-art::after { border-color: rgb(255 255 255 / 8%); }
:root[data-theme="dark"] .search-results { border-color: #29344f; background: #151d33; }
:root[data-theme="dark"] .search-result { border-bottom-color: #222c45; background: #151d33; color: #e6ebfb; }
:root[data-theme="dark"] .search-result:hover, :root[data-theme="dark"] .search-result[aria-selected="true"] { background: #1f2945; color: #fff; }
:root[data-theme="dark"] .quote-lead { border-color: #29344f; background: #151d33; }
:root[data-theme="dark"] .quote-price, :root[data-theme="dark"] .subscription-card .price { color: #f3f5ff; }
:root[data-theme="dark"] .quote-lead-facts { border-color: #222c45; background: #121a2f; }
:root[data-theme="dark"] .quote-lead-facts > * { border-color: #222c45 !important; }
:root[data-theme="dark"] .quote-lead-facts dd, :root[data-theme="dark"] .state-card dd, :root[data-theme="dark"] .benefit-list strong { color: #edf1ff; }
:root[data-theme="dark"] .detail-tabs { background: rgb(11 16 32 / 90%); }
:root[data-theme="dark"] .detail-tabs a { color: #b9c3d9; }
:root[data-theme="dark"] .detail-tabs a:hover, :root[data-theme="dark"] .detail-tabs a[aria-current="page"] { color: #fff; }
:root[data-theme="dark"] :root[data-theme="dark"] :root[data-theme="dark"] :root[data-theme="dark"] .flow-row > span:first-child { color: #d5dcef; }
:root[data-theme="dark"] .flow-bar { background: #222c45; }
:root[data-theme="dark"] .news-list a, :root[data-theme="dark"] .evidence-item span:last-child { color: #edf1ff; }
:root[data-theme="dark"] .signal-card { border-color: #34306a; background: #18203a; }
:root[data-theme="dark"] .signal-card .grid-2 > div { border-color: #222c45; background: #151d33; }
:root[data-theme="dark"] .field label { color: #b7c1d7; }
:root[data-theme="dark"] .field input, :root[data-theme="dark"] .field select, :root[data-theme="dark"] select { border-color: #34405f; background: #151d33; color: #edf1ff; }
:root[data-theme="dark"] .condition-chip { border-color: #3a3680; background: #221f4d; color: #c9c7ff; }
:root[data-theme="dark"] .risk { background: #2a2113; color: #e9d7b8; }
:root[data-theme="dark"] .quote-status-notice { background: #2a2113; color: #f5bf73; }
:root[data-theme="dark"] .quote-status-notice.error, :root[data-theme="dark"] .inline-error { background: #2c1618; color: #ff9b93; }
:root[data-theme="dark"] .skeleton { background: linear-gradient(90deg, #151d33, #1c2540, #151d33); background-size: 200% 100%; }
:root[data-theme="dark"] .sk-panel { border-color: #29344f; background: #151d33; }
:root[data-theme="dark"] .confirm-sheet { border-color: #29344f; background: #151d33; color: #e6ebfb; }
:root[data-theme="dark"] .bottom-nav { border-top-color: #1e2740; background: rgb(11 16 32 / 96%); }
:root[data-theme="dark"] .bottom-nav .nav-link { color: #b9c3d9; }
:root[data-theme="dark"] .bottom-nav .nav-link[aria-current="page"] { background: #221f4d; color: #c9c7ff; }
:root[data-theme="dark"] .site-footer { background: #080c18; }

@media (max-width: 1100px) {
  :root { --gutter: 20px; }
  .topbar { display: grid; grid-template-columns: auto minmax(150px, 1fr) auto; grid-template-areas: "brand search actions" "nav nav nav"; gap: 0 18px; padding: 0 var(--gutter); }
  .topbar-brand { grid-area: brand; min-height: 60px; }
  .topnav { grid-area: nav; margin: 0 -9px; }
  .global-search { grid-area: search; width: 100%; max-width: 360px; justify-self: end; margin-left: 0; }
  .topbar-actions { grid-area: actions; }
  .topnav .nav-link { min-height: 44px; }
  .market-hero { min-height: 520px; }
  .market-hero-copy { width: 62%; padding: 60px 40px; }
  .market-hero-meta { width: 30%; }
  .market-brief { grid-template-columns: 1.3fr repeat(4, 1fr); }
  .market-pulse, .evidence-grid, .subscription-card { grid-template-columns: 1fr; }
  .pulse-readout { border-top: 1px solid var(--line-soft); border-left: 0; }
  .market-workbench { grid-template-columns: 1fr; }
  .research-note { min-height: 0; }
  .tool-grid { grid-template-columns: 1fr 1fr; }
  .tool-card-primary { grid-column: 1 / -1; min-height: 0; }
  .footer-grid { grid-template-columns: 1.5fr repeat(3, .7fr); gap: 12px; }
}

@media (max-width: 760px) {
  :root { --gutter: 14px; }
  body { font-size: 14px; }
  .topbar { position: sticky; min-height: 0; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand actions" "search search"; gap: 8px 10px; padding: 8px var(--gutter) 10px; }
  .topbar-brand { min-height: 40px; }
  .topnav { display: none; }
  .global-search { max-width: none; min-width: 0; }
  .topbar-actions { gap: 2px; }
  .topbar-actions .account-chip { display: none; }
  .topbar-actions .btn-primary { min-height: 34px; padding-inline: 12px; font-size: 12px; }
  .tape-lead { padding-left: var(--gutter); }
  .tape-set { gap: 20px; padding: 0 20px 0 16px; }
  .sk-hero { height: 460px; }
  .sk-grid { grid-template-columns: 1fr; }
  .tape-note { display: none; }
  .session-notice { align-items: flex-start; flex-direction: column; }
  .main-inner { padding: 16px 0 calc(40px + env(safe-area-inset-bottom)); }
  .main-inner > .aoi-section { margin-top: 64px; }
  .page-heading, .stock-identity, .aoi-section-head, .scope-wire-head { align-items: flex-start; flex-direction: column; }
  .page-heading { gap: 14px; padding-top: 14px; }
  .page-heading .page-actions, .stock-identity .page-actions { width: 100%; }
  .page-heading .btn, .stock-identity .btn { width: 100%; }
  .aoi-section-head { gap: 11px; margin-bottom: 16px; }
  .aoi-section-head h2 { font-size: 30px; }
  .aoi-section-meta { justify-items: start; text-align: left; }
  .market-hero { min-height: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 0 0 8px; border-radius: 18px; background-position: center, 63% center; }
  .market-hero-copy { width: 100%; padding: 30px 22px 22px; }
  .market-hero h1 { margin: 20px 0 14px; font-size: clamp(36px, 10vw, 52px); }
  .market-hero .lede { font-size: 13px; }
  .market-hero-actions { margin-top: 20px; }
  .market-hero-actions .btn { min-height: 44px; flex: 1; padding-inline: 12px; font-size: 12px; }
  .market-hero-proof { gap: 8px 13px; margin-top: 20px; font-size: 9px; }
  .market-hero-meta { display: none; }
  .market-brief { grid-template-columns: 1fr 1fr; min-height: 0; }
  .market-brief-intro { grid-column: 1 / -1; min-height: 110px; padding: 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .market-brief-intro b { font-size: 16px; }
  .market-brief-cell { padding: 18px; border-bottom: 1px solid var(--line); }
  .market-brief-cell:nth-child(odd) { border-right: 0; }
  .market-brief-cell:nth-last-child(-n+2) { border-bottom: 0; }
  .freshness-rail, .status-strip, .connection-banner { align-items: flex-start; flex-direction: column; }
  .pulse-lead, .pulse-readout { padding: 20px; }
  .grid-2 { grid-template-columns: 1fr; }
  .pulse-readings > div { grid-template-columns: 1fr; gap: 4px; }
  .pulse-readings dt { padding-top: 0; }
  .research-note { padding: 26px 22px; }
  .movers-board { padding: 12px 14px; }
  .movers-board .table-wrap { overflow: visible; }
  .movers-board .table-wrap table { display: block; min-width: 100%; }
  .movers-board .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .movers-board .table-wrap tbody { display: grid; }
  .movers-board .table-wrap tr { display: grid; grid-template: "rank stock price" auto "rank stock rate" auto "rank stock status" auto / 24px minmax(0, 1fr) auto; align-items: center; column-gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  .movers-board .table-wrap tr:last-child { border-bottom: 0; }
  .movers-board .table-wrap td { min-width: 0; padding: 0; border-bottom: 0; background: transparent; font-size: 11px; }
  .movers-board .table-wrap td:nth-child(1) { grid-area: rank; }
  .movers-board .table-wrap td:nth-child(2) { grid-area: stock; }
  .movers-board .table-wrap td:nth-child(3) { grid-area: price; text-align: right; }
  .movers-board .table-wrap td:nth-child(4) { grid-area: rate; text-align: right; }
  .movers-board .table-wrap td:nth-child(5) { display: flex; grid-area: status; justify-content: flex-end; white-space: nowrap; }
  .movers-board .table-wrap td:nth-child(5) .muted { display: none; }
  .movers-board .table-wrap .quote-cell { justify-items: end; }
  .movers-board .table-wrap .quote-cell-label { display: none; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 0; }
  .tool-card h3 { font-size: 21px; }
  .search-panel { grid-template-columns: 1fr; }
  .search-panel .btn { width: 100%; }
  .scope-wire { padding: 30px 20px; }
  .scope-wire-aside { justify-items: start; }
  .scope-wire-list li { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
  .scope-wire-list time { grid-column: 1 / -1; }
  .card { padding: 18px; }
  .quote-lead { grid-template-columns: 1fr; padding: 20px; }
  .detail-tabs { margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-margin-top: 68px; }
  .chart-canvas { height: 380px; }
  .chart-toolbar { flex-direction: column; align-items: flex-start; }
  .footer-note { flex-direction: column; gap: 8px; }
  .signal-lock { padding: 22px 18px; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; padding-top: 32px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-company { flex: 1 1 auto; text-align: left; }
  .site-footer { margin-top: 24px; padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .bottom-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 50; display: block; padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgb(255 255 255 / 97%); box-shadow: 0 -5px 20px rgb(11 16 32 / 7%); backdrop-filter: blur(12px); }
  .bottom-nav ul { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; }
  .bottom-nav .nav-link { min-height: 47px; flex-direction: column; justify-content: center; gap: 2px; padding: 3px 4px; border-radius: 9px; color: #5b6377; font-size: 10px; }
  .bottom-nav .nav-icon { height: 18px; color: inherit; font-size: 15px; }
  .bottom-nav .nav-link[aria-current="page"] { background: #f2f1ff; color: var(--interaction-strong); }
}

@media (max-width: 420px) {
  :root { --gutter: 12px; }
  h1 { font-size: 30px; }
  .topbar-actions .btn-login { padding-inline: 6px; }
  .topbar-actions .btn-primary { padding-inline: 10px; }
  .market-hero-proof { display: grid; grid-template-columns: 1fr 1fr; }
  .quote-price { font-size: 46px; }
  .quote-lead-facts { grid-template-columns: 1fr; }
  .quote-lead-facts > :nth-child(odd):not(:last-child) { border-right: 0; }
  .quote-lead-facts > :last-child { grid-column: auto; }
  .flow-row { grid-template-columns: 70px minmax(40px, 1fr) auto; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .tape-marquee { animation: none; }
  .tape-track { overflow-x: auto; scrollbar-width: none; }
  [data-tape-clone], .tape-toggle { display: none; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  .sidebar, .topbar, .market-rail, .bottom-nav, .site-footer, .btn { display: none !important; }
  body, .research-shell, .main { background: #fff; color: #111; }
  .research-shell::before { display: none; }
  .card, .quote-lead, .market-pulse, .market-workbench { border-color: #bbb; background: #fff; box-shadow: none; }
}

/* 매수 추천 */
.rec-list { display: grid; gap: 16px; }
.rec-card { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: var(--surface-2); }
.rec-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.rec-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 16px; }
.rec-since { color: var(--muted); font-size: 12px; }
.rec-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.rec-facts dt { color: var(--muted); font-size: 12px; }
.rec-facts dd { margin: 2px 0 0; font-weight: 600; font-family: var(--font-numeric); font-variant-numeric: tabular-nums; }
.rec-reasons-title { margin: 6px 0 8px; font-size: 13px; color: var(--muted); }
.rec-reasons { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.rec-reasons li strong { display: block; font-size: 13px; }
.rec-reasons li span { color: var(--text); font-size: 14px; line-height: 1.55; }
.rec-stats { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.rec-criteria { margin-top: 16px; font-size: 13px; }
.rec-criteria summary { cursor: pointer; color: var(--interaction); }
.rec-criteria ul { margin: 8px 0 0; padding-left: 20px; color: var(--muted); }
@media (max-width: 720px) {
  .rec-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.rec-group + .rec-group { margin-top: 24px; }
.rec-group-title { margin: 0 0 12px; font-size: 17px; }
.rec-group-title span { margin-left: 6px; color: var(--muted); font-size: 13px; font-weight: 500; }
.badge-horizon { background: var(--interaction); color: #fff; border-color: transparent; }
.badge-tier.tier-buy_point { background: var(--rise); color: #fff; border-color: transparent; }
.badge-tier.tier-favorable { background: var(--surface-3); color: var(--interaction); border-color: var(--interaction); }
.badge-tier.tier-caution { background: var(--surface-3); color: var(--warning); border-color: var(--warning); }

/* Auth screens (login / signup) — docs/planning/22-auth-signup-login.md §6–7 */
.auth-shell { display: grid; min-height: 100dvh; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); background: var(--canvas); }
.auth-hero { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 40px clamp(24px, 4vw, 56px); background: var(--ink); color: #fff; }
.auth-hero .brand-wordmark strong { color: #fff; }
.auth-hero .brand-wordmark small { color: #aab4ff; }
.auth-hero-kicker { color: #aebad2; }
.auth-hero-copy h2 { margin: 12px 0 0; color: #fff; font-size: clamp(26px, 2.8vw, 38px); font-weight: 500; line-height: 1.25; }
.auth-hero-copy h2 em { color: #ff8f99; font-style: normal; }
.auth-hero-note { max-width: 36ch; margin: 0; color: #c3cbe0; font-size: 12px; line-height: 1.7; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px var(--gutter); }
.auth-panel:focus { outline: 0; }
.auth-card { width: min(100%, 420px); }
.auth-card h1 { margin: 6px 0 20px; font-size: 30px; }
.auth-form { display: grid; gap: 16px; }
.auth-field { display: grid; gap: 6px; }
.auth-field label, .auth-consents legend { color: var(--heading); font-size: 14px; font-weight: 600; }
.auth-field input[type="email"], .auth-field input[type="password"], .auth-field input[type="text"] { width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-1); color: var(--text); font-size: 16px; }
.auth-field input:hover { border-color: var(--interaction); }
.auth-field.has-error input { border-color: var(--error); }
.auth-input-row { position: relative; display: flex; }
.auth-input-row input { padding-right: 64px; }
.auth-reveal { position: absolute; top: 50%; right: 6px; min-width: 52px; min-height: 36px; padding: 0 10px; transform: translateY(-50%); border: 0; border-radius: 7px; background: transparent; color: var(--interaction-strong); font-size: 13px; font-weight: 700; }
.auth-reveal:hover { background: var(--surface-3); }
.auth-hint { margin: 0; color: var(--muted); font-size: 12px; }
.auth-error { margin: 0; color: var(--error); font-size: 13px; font-weight: 600; }
.auth-alert { margin-bottom: 16px; padding: 12px 14px; border: 1px solid #efc7c3; border-radius: var(--radius-md); background: #fff4f3; color: #a1231b; font-size: 14px; }
.auth-alert:focus { outline: 3px solid var(--error); outline-offset: 2px; }
.auth-notice { margin: 0 0 16px; padding: 10px 14px; border: 1px solid #eddbb9; border-radius: var(--radius-md); background: #fff9ee; color: #7d4700; font-size: 13px; }
.auth-consents { display: grid; gap: 10px; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-3); }
.auth-consents.has-error { border-color: var(--error); }
.auth-consents legend { padding: 0 6px; }
.auth-consent-list { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.auth-check { display: flex; min-height: 32px; align-items: flex-start; gap: 10px; color: var(--text); font-size: 14px; line-height: 1.5; cursor: pointer; }
.auth-check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--interaction); }
.auth-tag { margin-right: 6px; color: var(--interaction-strong); font-size: 12px; font-style: normal; font-weight: 700; }
.auth-tag.optional { color: var(--muted); }
.auth-submit { min-height: 48px; margin-top: 4px; font-size: 15px; }
.auth-switch { margin: 20px 0 0; color: var(--muted); font-size: 14px; text-align: center; }
.auth-switch a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
:root[data-theme="dark"] .auth-alert { border-color: #7a2f2a; background: #2a1517; color: #ffb3ac; }
:root[data-theme="dark"] .auth-notice { border-color: #5a4521; background: #261e10; color: #f5bf73; }
@media (max-width: 959px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .auth-hero { flex-direction: row; align-items: center; padding: 14px var(--gutter); gap: 16px; }
  .auth-hero-copy, .auth-hero-note { display: none; }
  .auth-panel { align-items: flex-start; padding-top: 28px; padding-bottom: 40px; }
}
@media (prefers-reduced-motion: reduce) { .auth-submit { transition: none; } }
.account-grid { display: grid; max-width: 920px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: start; }
.account-card .auth-form { padding: 4px 0 8px; }
.account-card .auth-notice { margin: 0 0 12px; }
.account-warning { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.account-danger { border-color: #efc7c3; }
:root[data-theme="dark"] .account-danger { border-color: #7a2f2a; }
.legal-page { width: min(100% - var(--gutter) * 2, 720px); margin: 0 auto; padding: 48px 0 64px; }
.legal-page h1 { margin-top: 6px; }
.legal-page code { font-family: var(--font-numeric); }

/* Bitcoin trading */
.bitcoin-trading { display: grid; gap: 22px; min-width: 0; padding-bottom: 28px; }
.trading-heading, .trading-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.trading-heading h1 { margin: 0; font-size: clamp(25px, 4vw, 36px); }
.trading-heading p, .trading-section p { margin: 8px 0 16px; color: var(--muted); }
.trading-exchanges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.trading-exchange { display: grid; gap: 5px; min-width: 0; padding: 18px; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-1); color: var(--text); cursor: pointer; }
.trading-exchange strong { font-size: 19px; }
.trading-exchange span, .trading-exchange small { color: var(--muted); }
.trading-exchange[aria-pressed="true"] { border-color: var(--interaction); box-shadow: inset 0 0 0 1px var(--interaction); }
.trading-section { min-width: 0; padding: 24px; background: var(--surface-1); border: 1px solid var(--line); border-radius: 14px; }
.trading-section h2 { margin: 0 0 14px; font-size: 19px; }
.trading-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.trading-price { font-size: clamp(20px, 3vw, 30px); font-weight: 700; font-variant-numeric: tabular-nums; }
.trading-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.trading-login { max-width: 640px; }
.trading-login .trading-form, .trading-summary .trading-form { grid-template-columns: 1fr; }
.trading-form .field { display: grid; gap: 6px; min-width: 0; }
.trading-form input, .trading-form select { width: 100%; min-width: 0; color: var(--text); background: var(--surface-2); border-color: var(--line-strong); }
.trading-offsets { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.trading-offset-row { display: grid; grid-template-columns: auto repeat(4, minmax(0, 1fr)) auto; align-items: end; gap: 10px; margin-bottom: 16px; }
.trading-form-footer { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.trading-notice { margin: 0; padding: 14px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-3); }
.trading-notice[data-error="true"], .trading-inline-error { color: var(--error); }
.trading-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 16px; }
.trading-section details { margin-top: 14px; }
.trading-section summary { cursor: pointer; color: var(--interaction); }
.bitcoin-trading button:disabled { cursor: not-allowed; opacity: .55; }
.bitcoin-trading td .btn + .btn { margin-left: 6px; }
@media (max-width: 900px) {
  .trading-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trading-offset-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trading-offset-row > span { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .trading-exchanges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trading-summary, .trading-form { grid-template-columns: 1fr; }
  .trading-heading, .trading-form-footer { flex-direction: column; align-items: flex-start; }
  .trading-section { padding: 18px; }
  .trading-exchange { padding: 14px; }
  .bottom-nav .nav-link { font-size: 10px; white-space: normal; text-align: center; }
}

/* BTC 자동매매: 봇 현황 그리드·봇 콘솔(태블릿 우선). 각진 터미널형 레이아웃, 터치 대상 44px 이상, 호버 의존 없음.
   색은 상태(글자·사각 점)와 호가(매도 파랑·매수 빨강), 예정가 마커에만 쓰고 면·테두리는 무채색으로 둔다. */
:root { --btc-bg: #ffffff; --btc-head: #f3f4f6; --btc-sunken: #f8f9fb; --btc-line: #d7dbe2; --btc-line-soft: #e8ebf0; --btc-frame: #b9bfca; --btc-ink: #111827; --btc-on-ink: #ffffff; --btc-label: #6b7280;
  --btc-ok: #0a7f5a; --btc-hold: #b35c00; --btc-off: #8a93a6;
  --btc-marker-entry: #4c4ad8; --btc-marker-average: #4b5563; --btc-marker-take-profit: #0a7f5a; --btc-marker-stop-loss: #c2410c; --btc-marker-hedge: #0e7490; }
:root[data-theme="dark"] { --btc-bg: #0f1527; --btc-head: #151c31; --btc-sunken: #0b1020; --btc-line: #273149; --btc-line-soft: #1c2439; --btc-frame: #36425f; --btc-ink: #e6ebfb; --btc-on-ink: #0b1020; --btc-label: #8e9ab4;
  --btc-ok: #45d3a8; --btc-hold: #f5bf73; --btc-off: #6b7690;
  --btc-marker-entry: #a9a6ff; --btc-marker-average: #c9d1e4; --btc-marker-take-profit: #45d3a8; --btc-marker-stop-loss: #ff922b; --btc-marker-hedge: #66d9e8; }
.btc-app { display: grid; gap: 14px; min-width: 0; padding-bottom: calc(28px + env(safe-area-inset-bottom)); -webkit-tap-highlight-color: transparent; }
.btc-app, .btc-app * { border-radius: 0 !important; }
.btc-app h2 { margin: 0; font-size: 14px; font-weight: 800; letter-spacing: -.01em; }
.btc-app h3 { margin: 16px 0 8px; color: var(--btc-label); font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.btc-app [data-tone="up"] { color: var(--rise); }
.btc-app [data-tone="down"] { color: var(--fall); }
.btc-app .numeric { font-family: var(--font-numeric); font-variant-numeric: tabular-nums; }
.btc-app .eyebrow { margin-bottom: 4px; }
/* 버튼: 무채색 사각. 기본=잉크, 보조=테두리, 위험=빨강 테두리. 다크 테마 전역 버튼 규칙보다 우선하도록 :root를 붙인다. */
:root .btc-app .btn { min-height: 44px; padding: 0 14px; border: 1px solid var(--btc-line); background: var(--btc-bg); color: var(--btc-ink); font-size: 13px; font-weight: 800; touch-action: manipulation; transform: none; }
:root .btc-app .btn.btn-primary, :root .btc-app .btn.btn-primary:hover { border-color: var(--btc-ink); background: var(--btc-ink); color: var(--btc-on-ink); }
:root .btc-app .btn.btn-primary:hover { opacity: .88; }
:root .btc-app .btn.btn-secondary:hover, :root .btc-app .btn.btn-quiet:hover { border-color: var(--btc-ink); background: var(--btc-bg); color: var(--btc-ink); }
:root .btc-app .btn.btn-danger { border-color: color-mix(in srgb, var(--error) 55%, var(--btc-line)); background: transparent; color: var(--error); }
:root .btc-app .btn.btn-danger:hover { border-color: var(--error); color: var(--error); }
.btc-app button:disabled, .btc-app a[aria-disabled="true"] { cursor: not-allowed; opacity: .4; }
.btc-toolbar, .btc-console-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; padding-bottom: 12px; border-bottom: 1px solid var(--btc-line); }
.btc-toolbar h1 { margin: 0; font-size: clamp(22px, 3vw, 28px); }
.btc-toolbar-actions, .btc-form-actions, .btc-connection-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.btc-banner { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--btc-line); background: var(--btc-sunken); }
.btc-banner strong { color: var(--btc-hold); }
.btc-banner span { color: var(--btc-label); }
.btc-app .trading-notice { border: 1px solid var(--btc-line); background: var(--btc-sunken); }
/* 칩: 붙어 있는 사각 세그먼트. 선택=잉크 반전 */
.btc-filters, .btc-chips { display: flex; overflow-x: auto; scrollbar-width: none; }
.btc-chip { flex: none; min-height: 44px; margin-left: -1px; padding: 0 16px; border: 1px solid var(--btc-line); background: var(--btc-bg); color: var(--btc-label); font-size: 13px; font-weight: 800; cursor: pointer; touch-action: manipulation; }
.btc-chip:first-child { margin-left: 0; }
.btc-chip span { margin-left: 6px; font-family: var(--font-numeric); color: var(--btc-label); }
.btc-chip[aria-pressed="true"] { position: relative; z-index: 1; border-color: var(--btc-ink); background: var(--btc-ink); color: var(--btc-on-ink); }
.btc-chip[aria-pressed="true"] span { color: inherit; opacity: .7; }
.btc-chips .btc-chip { min-height: 34px; padding: 0 11px; font-size: 12px; }
/* 요약 지표: 칸이 붙은 한 줄 표 */
.btc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 2px solid var(--btc-frame); background: var(--btc-bg); }
.btc-stat { display: grid; gap: 6px; padding: 12px 14px; border-left: 1px solid var(--btc-line); }
.btc-stat:first-child { border-left: 0; }
.btc-stat > span { color: var(--btc-label); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.btc-stat strong { display: grid; font-family: var(--font-numeric); font-size: 22px; font-variant-numeric: tabular-nums; }
.btc-stat strong small { font-size: 12px; color: var(--btc-label); }
/* 거래소별 실행 상태: 장식 띠 없이 사각 점과 글자 색만 */
.btc-safety-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 2px solid var(--btc-frame); background: var(--btc-bg); }
.btc-safety { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 8px; padding: 10px 12px; border-left: 1px solid var(--btc-line); font-size: 13px; }
.btc-safety:first-child { border-left: 0; }
.btc-safety::before { content: ""; grid-row: 1 / span 2; width: 8px; height: 8px; background: var(--btc-off); }
.btc-safety[data-level="ok"]::before { background: var(--btc-ok); }
.btc-safety[data-level="hold"]::before { background: var(--btc-hold); }
.btc-safety strong { grid-column: 2; }
.btc-safety span { grid-column: 2; font-weight: 700; }
.btc-safety[data-level="ok"] span { color: var(--btc-ok); }
.btc-safety[data-level="hold"] span { color: var(--btc-hold); }
.btc-safety small { grid-column: 2; color: var(--btc-label); }
/* 상태 표시: 사각 점 + 글자 */
.btc-status { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 8px; border: 1px solid var(--btc-line); background: var(--btc-bg); color: var(--btc-off); font-size: 12px; font-weight: 800; }
.btc-status::before { content: ""; width: 7px; height: 7px; background: currentColor; }
.btc-status[data-status="running"] { color: var(--btc-ok); }
.btc-status[data-status="stopping"] { color: var(--btc-hold); }
/* 봇 카드: 제목 줄 + 정보 표 + 버튼 줄 */
.btc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.btc-card { display: grid; align-content: start; border: 2px solid var(--btc-frame); background: var(--btc-bg); cursor: pointer; }
.btc-card[data-status="running"] { border-color: var(--btc-ok); }
.btc-card[data-status="stopping"] { border-color: var(--btc-hold); }
.btc-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--btc-line); background: var(--btc-head); }
.btc-card-title { min-width: 0; }
.btc-card-title h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.btc-card-title p { margin: 2px 0 0; color: var(--btc-label); font-size: 12px; }
.btc-facts, .btc-mini-facts { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.btc-facts { padding: 4px 12px 10px; }
.btc-facts div, .btc-mini-facts div { display: grid; gap: 2px; min-width: 0; padding: 8px 0; border-bottom: 1px solid var(--btc-line-soft); }
.btc-facts div:nth-child(odd):not(.btc-facts-wide), .btc-mini-facts div:nth-child(odd) { padding-right: 10px; }
.btc-facts dt, .btc-mini-facts dt { color: var(--btc-label); font-size: 11px; font-weight: 700; }
.btc-facts dd, .btc-mini-facts dd { margin: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 700; }
.btc-facts-wide { grid-column: 1 / -1; border-bottom: 0 !important; }
.btc-card-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--btc-line); }
:root .btc-card-actions .btn { min-height: 46px; margin: 0; border: 0; border-left: 1px solid var(--btc-line); }
:root .btc-card-actions .btn:first-child { border-left: 0; }
.btc-card-note { margin: 0; padding: 8px 12px; border-top: 1px solid var(--btc-line-soft); color: var(--btc-hold); font-size: 12px; font-weight: 700; }
.btc-empty { display: grid; gap: 10px; justify-items: start; padding: 24px; border: 1px dashed var(--btc-line); background: var(--btc-bg); }
.btc-empty h1, .btc-empty h2, .btc-empty p { margin: 0; }
/* 콘솔 */
.btc-back { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--btc-line); color: var(--btc-ink); font-size: 13px; font-weight: 800; text-decoration: none; }
.btc-console-head { justify-content: flex-start; }
.btc-console-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.btc-console-title h1 { margin: 0; font-size: clamp(19px, 2.4vw, 24px); }
.btc-console-head > .btn { order: 2; margin-left: auto; }
.btc-console-meta { order: 3; flex-basis: 100%; margin: 0; color: var(--btc-label); font-size: 13px; }
.btc-panel { min-width: 0; padding: 12px; border: 2px solid var(--btc-frame); background: var(--btc-bg); }
.btc-panel > h2:first-child, .btc-panel > .btc-panel-head:first-child { margin: -12px -12px 12px; padding: 0 12px; min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--btc-line); background: var(--btc-head); }
.btc-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.btc-panel-head .btc-chips { margin: 5px 0; }
.btc-console-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, 320px) minmax(300px, 340px); grid-template-areas: "main side controller"; gap: 10px; align-items: start; }
.btc-main { grid-area: main; } .btc-side { grid-area: side; } .btc-controller { grid-area: controller; }
/* 탭: 패널 맨 위 제목 줄 자리에 붙는 사각 탭 */
.btc-tabs { display: flex; margin: -12px -12px 12px; border-bottom: 2px solid var(--btc-frame); background: var(--btc-head); overflow-x: auto; scrollbar-width: none; }
.btc-tab { flex: none; min-height: 44px; padding: 0 16px; border: 0; border-right: 1px solid var(--btc-line); background: transparent; color: var(--btc-label); font-size: 13px; font-weight: 800; cursor: pointer; touch-action: manipulation; }
.btc-tab[aria-selected="true"] { background: var(--btc-bg); color: var(--btc-ink); box-shadow: inset 0 3px 0 var(--btc-ink); }
.btc-panel-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.btc-bar-label { color: var(--btc-label); font-size: 12px; font-weight: 800; }
/* 수익 리포트 */
.btc-report-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--btc-line); }
.btc-report-stats div { display: grid; gap: 4px; padding: 10px 12px; border-left: 1px solid var(--btc-line); }
.btc-report-stats div:first-child { border-left: 0; }
.btc-report-stats span { color: var(--btc-label); font-size: 11px; font-weight: 800; }
.btc-report-stats strong { font-size: 18px; }
.btc-report-stats small { color: var(--btc-label); font-size: 12px; }
.btc-pnl-chart { height: clamp(200px, 30vh, 320px); margin: 10px 0; border: 1px solid var(--btc-line-soft); }
.btc-report-table { min-width: 760px; font-size: 13px; }
.btc-report-table td, .btc-report-table th, .btc-plan-table td:nth-child(-n + 4) { white-space: nowrap; }
/* 왼쪽 열 폭이 좁으면(태블릿 3단) 수익 지표를 2×2로 */
.btc-main { container-type: inline-size; }
@container (max-width: 600px) {
  .btc-report-stats { grid-template-columns: 1fr 1fr; }
  .btc-report-stats div:nth-child(3) { border-left: 0; }
  .btc-report-stats div:nth-child(n + 3) { border-top: 1px solid var(--btc-line); }
}
/* 실시간 로그 */
.btc-log { display: grid; max-height: min(70vh, 640px); margin: 0 -12px; padding: 0; overflow-y: auto; list-style: none; font-size: 12px; }
.btc-log li { display: grid; gap: 2px; padding: 7px 12px 7px 15px; border-bottom: 1px solid var(--btc-line-soft); box-shadow: inset 3px 0 0 var(--btc-off); }
.btc-log li[data-kind="open"] { box-shadow: inset 3px 0 0 var(--btc-marker-entry); }
.btc-log li[data-kind="close"] { box-shadow: inset 3px 0 0 var(--btc-marker-take-profit); }
.btc-log li[data-kind="failed"] { box-shadow: inset 3px 0 0 var(--error); }
.btc-log time { color: var(--btc-label); font-size: 11px; }
.btc-log span { overflow-wrap: anywhere; }
/* 봇 컨트롤러: 매매 설정 행 */
.btc-settings { display: grid; gap: 0; margin-top: 4px; }
.btc-settings fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.btc-settings-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 16px -12px 0; padding: 8px 12px; border-block: 1px solid var(--btc-line); background: var(--btc-head); }
.btc-settings-head h3 { margin: 0; color: var(--btc-ink); font-size: 13px; letter-spacing: 0; }
.btc-checks { display: flex; gap: 14px; }
.btc-checks label { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font-size: 13px; font-weight: 800; }
.btc-checks input { width: 20px; height: 20px; accent-color: var(--btc-ink); }
.btc-setting { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: center; gap: 10px; min-height: 48px; border-bottom: 1px solid var(--btc-line-soft); }
.btc-setting > span { color: var(--btc-label); font-size: 12px; font-weight: 800; }
.btc-setting input, .btc-setting select, .btc-offset-grid input { width: 100%; min-width: 0; min-height: 40px; padding: 0 10px; border: 1px solid var(--btc-line); background: var(--btc-sunken); color: var(--btc-ink); font-family: var(--font-numeric); font-size: 16px; text-align: right; }
.btc-setting select { text-align: left; }
.btc-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.btc-offset { padding: 10px 0; border-bottom: 1px solid var(--btc-line-soft); }
.btc-offset h4 { margin: 0 0 8px; font-size: 13px; }
.btc-offset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; }
.btc-offset-grid label { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; }
.btc-offset-grid span { min-width: 52px; color: var(--btc-label); font-size: 11px; font-weight: 800; }
.btc-settings fieldset:disabled input, .btc-settings fieldset:disabled select { opacity: .6; }
.btc-settings-actions { display: grid; grid-template-columns: 1fr 1fr; }
:root .btc-settings-actions .btn { margin: 0 0 -1px -1px; }
:root .btc-settings-actions .btn:nth-child(odd) { margin-left: 0; }
.btc-control-buttons { display: grid; grid-template-columns: 1fr 1fr; }
.btc-control-buttons .btn { margin: 0 0 -1px -1px; }
.btc-control-buttons .btn:nth-child(odd) { margin-left: 0; }
.btc-span-2, .btc-full { grid-column: 1 / -1; width: 100%; }
.btc-position { display: grid; gap: 8px; margin-bottom: 8px; padding: 10px; border: 1px solid var(--btc-line); background: var(--btc-sunken); }
.btc-position-head { display: flex; justify-content: space-between; gap: 8px; }
.btc-position-head strong { display: inline-flex; align-items: center; gap: 6px; }
.btc-position-head strong::before { content: ""; width: 7px; height: 7px; background: var(--rise); }
.btc-position[data-side="SHORT"] .btc-position-head strong::before { background: var(--fall); }
.btc-chart { height: clamp(260px, 38vh, 420px); min-width: 0; border: 1px solid var(--btc-line-soft); }
.btc-plan { margin-top: 12px; }
.btc-plan .btc-panel-head { margin: 0 -12px 0; padding: 8px 12px; border-block: 1px solid var(--btc-line); background: var(--btc-head); }
.btc-plan-table { min-width: 620px; font-size: 13px; }
.btc-app table th { color: var(--btc-label); font-size: 11px; font-weight: 800; background: var(--btc-sunken); }
.btc-app table td, .btc-app table th { padding: 9px 10px; border-bottom: 1px solid var(--btc-line-soft); }
.btc-plan-table tr[data-status="INACTIVE"], .btc-plan-table tr[data-status="BLOCKED"], .btc-plan-table tr[data-status="ENTERED"] { color: var(--btc-label); }
.btc-marker { --marker: var(--btc-marker-entry); display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 0 6px; border: 1px solid color-mix(in srgb, var(--marker) 60%, transparent); color: var(--marker); background: color-mix(in srgb, var(--marker) 10%, transparent); font-size: 11px; font-weight: 800; white-space: nowrap; }
.btc-marker::before { content: ""; width: 6px; height: 6px; background: var(--marker); }
.btc-marker[data-kind="average"] { --marker: var(--btc-marker-average); }
.btc-marker[data-kind="take-profit"] { --marker: var(--btc-marker-take-profit); }
.btc-marker[data-kind="stop-loss"] { --marker: var(--btc-marker-stop-loss); }
.btc-marker[data-kind="hedge"] { --marker: var(--btc-marker-hedge); }
.btc-marker[data-status="INACTIVE"], .btc-marker[data-status="BLOCKED"], .btc-marker[data-status="ENTERED"] { border-style: dashed; opacity: .65; }
/* 호가 사다리 */
.btc-ladder { display: grid; margin: 0 -12px; font-size: 13px; }
.btc-ladder-head, .btc-ladder-row { display: grid; grid-template-columns: 1.15fr 1fr 1fr; align-items: center; gap: 6px; }
.btc-ladder-head { padding: 6px 12px; border-bottom: 1px solid var(--btc-line); color: var(--btc-label); font-size: 11px; font-weight: 800; }
.btc-ladder-head span + span, .btc-ladder-row > span:nth-of-type(2), .btc-ladder-row > span:nth-of-type(3) { text-align: right; }
.btc-ladder-row { position: relative; min-height: 28px; padding: 0 12px; border-bottom: 1px solid var(--btc-line-soft); }
.btc-depth { position: absolute; inset: 0 0 0 auto; background: color-mix(in srgb, var(--fall) 10%, transparent); pointer-events: none; }
.btc-ladder-row[data-side="bid"] .btc-depth { background: color-mix(in srgb, var(--rise) 10%, transparent); }
.btc-ladder-row > span { position: relative; }
.btc-ladder-row[data-side="ask"] .btc-ladder-price { color: var(--fall); font-weight: 700; }
.btc-ladder-row[data-side="bid"] .btc-ladder-price { color: var(--rise); font-weight: 700; }
.btc-ladder-row[data-marked] { box-shadow: inset 3px 0 0 var(--btc-marker-entry); }
.btc-ladder-row[data-marked="take-profit"] { box-shadow: inset 3px 0 0 var(--btc-marker-take-profit); }
.btc-ladder-row[data-marked="stop-loss"] { box-shadow: inset 3px 0 0 var(--btc-marker-stop-loss); }
.btc-ladder-row[data-marked="hedge"] { box-shadow: inset 3px 0 0 var(--btc-marker-hedge); }
.btc-ladder-row[data-marked="average"] { box-shadow: inset 3px 0 0 var(--btc-marker-average); }
.btc-ladder-marks { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; padding-bottom: 4px; }
.btc-ladder-mid { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; padding: 10px 12px; border-block: 1px solid var(--btc-line); background: var(--btc-head); }
.btc-ladder-mid strong { font-size: 20px; }
.btc-ladder-mid small { color: var(--btc-label); }
.btc-ladder-off { display: grid; padding: 6px 12px; border-bottom: 1px solid var(--btc-line); background: var(--btc-sunken); }
.btc-ladder-off[data-where="below"] { border-top: 1px solid var(--btc-line); border-bottom: 0; }
.btc-ladder-off p { margin: 0 0 4px; color: var(--btc-label); font-size: 11px; font-weight: 800; }
.btc-ladder-off-row { display: grid; grid-template-columns: minmax(0, 1.2fr) 1fr auto; align-items: center; gap: 8px; min-height: 28px; }
.btc-ladder-off-row > span:nth-child(2) { text-align: right; }
.btc-ratio { display: flex; margin: 10px 12px 0; font-size: 11px; font-weight: 800; color: #fff; }
.btc-ratio span { min-width: 64px; padding: 5px 8px; background: var(--rise); }
.btc-ratio span + span { background: var(--fall); text-align: right; }
.btc-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px solid var(--btc-line-soft); list-style: none; }
/* 실행·주문 상태 */
.btc-safety-facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--btc-line); }
.btc-safety-facts div { display: grid; gap: 4px; padding: 10px 12px; border-left: 1px solid var(--btc-line); }
.btc-safety-facts div:first-child { border-left: 0; }
.btc-safety-facts span { color: var(--btc-label); font-size: 11px; font-weight: 800; }
.btc-safety-facts div[data-level="ok"] strong { color: var(--btc-ok); }
.btc-safety-facts div[data-level="hold"] strong { color: var(--btc-hold); }
/* 거래소 연결·봇 설정 폼 (기존 trading-* 클래스도 각지게) */
.btc-app .trading-exchanges { gap: 0; border: 1px solid var(--btc-line); }
.btc-app .trading-exchange { margin: 0; padding: 14px; border: 0; border-left: 1px solid var(--btc-line); background: var(--btc-bg); }
.btc-app .trading-exchange:first-child { border-left: 0; }
.btc-app .trading-exchange[aria-pressed="true"] { background: var(--btc-ink); color: var(--btc-on-ink); box-shadow: none; }
.btc-app .trading-exchange[aria-pressed="true"] span, .btc-app .trading-exchange[aria-pressed="true"] small { color: inherit; opacity: .75; }
.btc-app .trading-offsets { border-color: var(--btc-line); }
.btc-app .trading-form input, .btc-app .trading-form select { min-height: 44px; border: 1px solid var(--btc-line); background: var(--btc-sunken); color: var(--btc-ink); font-size: 16px; }
.btc-connection { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--btc-line-soft); }
.btc-connection > div:first-child { display: grid; gap: 2px; }
.btc-connection small { color: var(--btc-label); }
.btc-connection-form { flex-basis: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.btc-connection-form h3, .btc-connection-form .btc-form-actions { grid-column: 1 / -1; margin: 0; }
.btc-form-page .trading-form { margin-top: 0; }
.btc-form-wide { grid-column: 1 / -1; margin: 0; }
.btc-login-form { max-width: 420px; grid-template-columns: 1fr; }
/* 태블릿 가로(예: 1024~1180px): 조작 패널을 위로 올리고 차트·호가를 나란히 */
@media (max-width: 1180px) {
  .btc-console-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, 330px); grid-template-areas: "main controller" "main side"; }
  .btc-safety-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .btc-safety-facts div:nth-child(4) { border-left: 0; }
  .btc-safety-facts div:nth-child(n + 4) { border-top: 1px solid var(--btc-line); }
}
/* 태블릿 세로(예: 768~900px): 한 줄로 쌓고 호가를 차트 위에 */
@media (max-width: 900px) {
  .btc-stats, .btc-safety-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btc-stat:nth-child(3), .btc-safety:nth-child(3) { border-left: 0; }
  .btc-stat:nth-child(n + 3), .btc-safety:nth-child(n + 3) { border-top: 1px solid var(--btc-line); }
  .btc-console-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "controller" "side" "main"; }
  .btc-report-stats { grid-template-columns: 1fr 1fr; }
  .btc-report-stats div:nth-child(3) { border-left: 0; }
  .btc-report-stats div:nth-child(n + 3) { border-top: 1px solid var(--btc-line); }
  .btc-connection-form { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .btc-safety-facts { grid-template-columns: 1fr 1fr; }
  .btc-card-actions { grid-template-columns: 1fr 1fr; }
  :root .btc-card-actions .btn-primary { grid-column: 1 / -1; border-bottom: 1px solid var(--btc-line); }
  :root .btc-card-actions .btn:nth-child(2) { border-left: 0; }
}
@media (pointer: coarse) {
  :root .btc-app .btn, .btc-chip { min-height: 48px; }
  .btc-chips .btc-chip { min-height: 44px; }
  .btc-ladder-row { min-height: 34px; }
}
