/* StockTube / Figma Make editorial theme.
   Presentation only. The operational console never loads this file; every
   shared rule is also explicitly excluded from data-st-page="trading".
   These are the approved Make surfaces, with readable small-text variants. */
body[data-st-page]:not([data-st-page=trading]) {
    color-scheme: light;
    --st-bg: #aab3a8;
    --st-canvas: #aab3a8;
    --st-surface: #e8e6dc;
    --st-reading-bg: #d9ddd3;
    --st-reading-ink: #26332e;
    --st-reading-muted: #34423a;
    --st-ink: #26332e;
    --st-muted: #34423a;
    --st-accent: #315f50;
    --st-accent-ink: #244637;
    --st-accent-fill: #284e42;
    --st-accent-soft: #c7d0c5;
    --st-on-accent: #f3f2ea;
    --st-line: #8b978d;
    --st-line-soft: #b2b9af;
    --st-panel: #d9ddd3;
    --st-workspace: #aab3a8;
    --st-panel-line: #a2ada1;
    --st-on-dark: #26332e;
    --st-muted-dark: #34423a;
    --st-raised: #e1e3d9;
    --st-sage: #244637;
    --st-sage-surface: #c7d0c5;
    --st-sand: #644c25;
    --st-sand-surface: #d3d0c5;
    --st-gain: #8a3f3f;
    --st-gain-bg: #ead7d0;
    --st-loss: #365b77;
    --st-loss-bg: #d4dfe2;
    --st-warning: #62491e;
    --st-warning-bg: #e8dfc4;
    --st-radius: 18px;
    --st-width: 1180px;
    --st-number-font: 'Noto Sans KR', 'SFMono-Regular', sans-serif;
    --primary-color: #284e42;
    --contrast-color: #284e42;
    --bg-color: #aab3a8;
    --surface-color: #d9ddd3;
    --border-color: #8b978d;
    --text-primary: #26332e;
    --text-secondary: #34423a;
    margin: 0;
    padding: 0 !important;
    min-height: 100vh;
    min-height: 100dvh;
    background: radial-gradient(circle at 8% 12%, #e7e2d138, transparent 26rem), var(--st-canvas) !important;
    color: var(--st-ink);
    font: 16px/1.75 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Segoe UI', sans-serif;
    letter-spacing: -.015em;
    -webkit-text-size-adjust: 100%;
}
body[data-st-page]:not([data-st-page=trading]) *,
body[data-st-page]:not([data-st-page=trading]) *::before,
body[data-st-page]:not([data-st-page=trading]) *::after { box-sizing: border-box; }
body[data-st-page]:not([data-st-page=trading]) :where(button, input, select, textarea) { font-family: inherit; letter-spacing: inherit; }
body[data-st-page]:not([data-st-page=trading]) :where(button, summary, select, input:not([type=range]):not([type=checkbox]):not([type=radio]), textarea) { min-height: 44px; }
body[data-st-page]:not([data-st-page=trading]) :where(button, a, summary) { touch-action: manipulation; transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease; }
body[data-st-page]:not([data-st-page=trading]) :where(button, summary) { cursor: pointer; }
body[data-st-page]:not([data-st-page=trading]) button:disabled { cursor: not-allowed; }
body[data-st-page]:not([data-st-page=trading]) :where(a, button, summary, input, select, textarea):focus-visible { outline: 3px solid #244637; outline-offset: 3px; }
body[data-st-page]:not([data-st-page=trading]) :where(p, li, h1, h2, h3, h4) { overflow-wrap: break-word; }
body[data-st-page]:not([data-st-page=trading]) :where(h1, h2, h3, h4) { color: var(--st-ink); font-family: inherit; font-weight: 650; letter-spacing: -.035em; text-wrap: pretty; }
body[data-st-page]:not([data-st-page=trading]) :where(img, video, canvas, iframe) { max-width: 100%; }
body[data-st-page]:not([data-st-page=trading]) [hidden] { display: none !important; }
body[data-st-page]:not([data-st-page=trading]) ::placeholder { color: #4c5951; opacity: 1; }
body[data-st-page]:not([data-st-page=trading]) #st-main { min-width: 0; }

/* A compact, in-flow header. No bottom rail covering content in a webview. */
body[data-st-page]:not([data-st-page=trading]) #stocktube-shell { width: 100%; }
body[data-st-page]:not([data-st-page=trading]) #stocktube-shell .st-header { display: block; height: auto; margin: 0; padding: env(safe-area-inset-top, 0px) 24px 0; border: 0; border-bottom: 1px solid #8b978d; background: #aab3a8e6; color: var(--st-ink); text-align: left; }
body[data-st-page]:not([data-st-page=trading]) .st-header-inner { max-width: var(--st-width); min-height: 80px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
body[data-st-page]:not([data-st-page=trading]) #stocktube-shell .st-brand { display: inline-flex; align-items: center; flex-shrink: 0; gap: 10px; min-height: 44px; color: var(--st-ink); text-decoration: none; font-size: 22px; line-height: 1.2; letter-spacing: -.7px; font-weight: 750; }
/* Restore the original StockTube mark; the surrounding header stays intact. */
body[data-st-page]:not([data-st-page=trading]) .st-brand-symbol { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; background: #ef4444; color: #fff; font-size: 1.2rem; font-weight: 900; line-height: 1; box-shadow: 0 4px 10px rgba(239, 68, 68, .18); }
@media (max-width: 720px) {
    body[data-st-page]:not([data-st-page=trading]) .st-brand-symbol { width: 34px; height: 34px; font-size: 1.08rem; }
}
body[data-st-page]:not([data-st-page=trading]) .st-header-tools { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 22px; }
/* Keep the approved palette, but give the primary destinations a clear surface
   and a filled current-page state instead of nearly identical small labels. */
body[data-st-page]:not([data-st-page=trading]) #stocktube-shell .st-desktop-nav { display: flex; min-width: 0; gap: 6px; padding: 4px; margin: 0 0 0 auto; background: var(--st-reading-bg); border: 1px solid var(--st-line); border-radius: 16px; }
body[data-st-page]:not([data-st-page=trading]) #stocktube-shell .st-desktop-nav a { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 20px; color: var(--st-ink); background: var(--st-surface); border: 1px solid transparent; border-radius: 11px; text-decoration: none; font-size: 16px; line-height: 1.4; font-weight: 750; white-space: nowrap; }
body[data-st-page]:not([data-st-page=trading]) #stocktube-shell .st-desktop-nav a:hover { color: var(--st-ink); background: var(--st-accent-soft); border-color: var(--st-accent); }
body[data-st-page]:not([data-st-page=trading]) #stocktube-shell .st-desktop-nav a[aria-current=page] { color: var(--st-on-accent); background: var(--st-accent-fill); border-color: var(--st-accent-fill); }
body[data-st-page]:not([data-st-page=trading]) #stocktube-shell .st-mobile-nav { display: none; }
body[data-st-page]:not([data-st-page=trading]) .st-skip { position: fixed; top: -100px; left: 16px; z-index: 20001; padding: 12px 18px; border-radius: 10px; background: var(--st-accent-fill); color: var(--st-on-accent); }
body[data-st-page]:not([data-st-page=trading]) .st-skip:focus { top: 12px; }
body[data-st-page]:not([data-st-page=trading]) .st-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; width: min(var(--st-width), calc(100% - 48px)); margin: 48px auto 0; padding: 26px 0 calc(26px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--st-line); color: var(--st-muted); font-size: 13px; }
body[data-st-page]:not([data-st-page=trading]) .st-footer a { color: var(--st-muted); text-decoration: none; min-height: 44px; align-content: center; }
body[data-st-page]:not([data-st-page=trading]) .st-footer .st-footer-brand { color: var(--st-ink); font-size: 17px; font-weight: 750; }
body[data-st-page]:not([data-st-page=trading]) .st-footer > a:last-child { margin-left: auto; }
body[data-st-page]:not([data-st-page=trading]) .site-footer { position: static !important; width: auto; margin: 28px auto 0; padding: 18px !important; background: transparent !important; box-shadow: none !important; color: var(--st-muted) !important; border-color: var(--st-line) !important; z-index: auto !important; }
body[data-st-page]:not([data-st-page=trading]) .site-footer :where(a, span) { color: var(--st-ink) !important; }

/* Shared page rhythm, typography and small supporting controls. */
body[data-st-page]:not([data-st-page=trading]) .st-page-heading { padding: 32px 0 24px; }
body[data-st-page]:not([data-st-page=trading]) .st-page-heading h1 { margin: 0 0 8px; font-size: clamp(26px, 3vw, 38px); line-height: 1.35; }
body[data-st-page]:not([data-st-page=trading]) .st-page-heading p { margin: 0; max-width: 720px; font-size: 16px; color: var(--st-muted); }
body[data-st-page]:not([data-st-page=trading]) :where(.st-eyebrow, .st-console-eyebrow) { margin: 0 0 9px; color: var(--st-accent-ink); font-size: 12px; font-weight: 750; letter-spacing: .1em; }
body[data-st-page]:not([data-st-page=trading]) .st-page-heading--split { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
body[data-st-page]:not([data-st-page=trading]) :where(.st-heading-links, .st-page-links, .st-page-tools, .st-workspace-links, .st-home-followup) { display: flex; flex-wrap: wrap; gap: 10px; }
body[data-st-page]:not([data-st-page=trading]) :where(.st-heading-links, .st-page-links, .st-page-tools, .st-workspace-links, .st-home-followup) a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; color: var(--st-accent-ink); background: var(--st-surface); border: 1px solid var(--st-line); border-radius: 12px; text-decoration: none; font-size: 14px; }
body[data-st-page]:not([data-st-page=trading]) .st-home-followup { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--st-line); }
body[data-st-page]:not([data-st-page=trading]) .st-section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 18px; margin: 0 0 20px; padding: 16px 0 12px; border-bottom: 1px solid var(--st-line-soft); }
body[data-st-page]:not([data-st-page=trading]) .st-section-heading h2 { margin: 0; font-size: 22px; }
body[data-st-page]:not([data-st-page=trading]) :where(.st-reference-note, .st-section-note) { color: var(--st-muted); font-size: 13px; }
body[data-st-page]:not([data-st-page=trading]) .st-secondary-disclosure { margin: 24px 0; padding: 0 20px; border: 1px solid var(--st-line-soft); border-radius: var(--st-radius); background: var(--st-reading-bg); }
body[data-st-page]:not([data-st-page=trading]) .st-secondary-disclosure > summary { padding: 14px 0; color: var(--st-accent-ink); font-size: 16px; }

/* Homepage: search is the main action; the full letter lives on daily.html. */
body[data-st-page=home]:not([data-st-page=trading]) { --st-width: 1440px; }
body[data-st-page=home] > .container { width: min(var(--st-width), calc(100% - 48px)); max-width: var(--st-width); margin: 0 auto; padding: 0; }
body[data-st-page=home] #stHomeExplore { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: center; gap: 64px; padding: 44px 0 34px; min-height: 290px; }
body[data-st-page=home] #stHomeIntro h1 { margin: 10px 0 14px; font-size: clamp(34px, 3.3vw, 46px); line-height: 1.28; letter-spacing: -.055em; }
body[data-st-page=home] #stHomeIntro p { margin: 0; max-width: 410px; font-size: 16px; line-height: 1.75; color: var(--st-muted); }
body[data-st-page=home] #stHomeIntro .st-eyebrow { margin: 0; font-size: 12px; color: var(--st-accent-ink); }
body[data-st-page=home] .site-search-header { margin: 0; padding: 0; width: 100%; min-width: 0; }
body[data-st-page=home] :where(.stocktube-brand, .st-home-heading) { display: none; }
body[data-st-page=home] .site-search-stack { width: 100%; margin: 0; }
body[data-st-page=home] .st-search-label { display: block; margin: 0 0 8px; color: var(--st-muted); font-size: 13px; font-weight: 600; }
body[data-st-page=home] .site-search-header .search-container { display: flex; gap: 8px; width: 100%; max-width: none; margin: 0; padding: 7px; background: var(--st-surface); border: 1px solid #8b978d; border-radius: 15px 20px 15px 18px; box-shadow: 0 10px 22px #26332e13; }
body[data-st-page=home] .site-search-header .search-container:focus-within { border-color: var(--st-accent); outline: 2px solid #315f5040; outline-offset: 2px; }
body[data-st-page=home] .site-search-header #searchInput { flex: 1 1 auto; min-width: 0; width: 100%; height: 48px; padding: 0 10px; color: var(--st-ink); background: transparent; font-size: 16px; border: 0; }
body[data-st-page=home] .site-search-header #searchBtn { flex: 0 0 auto; min-width: 68px; min-height: 48px; height: 48px; padding: 0 17px; border: 0; border-radius: 12px; background: var(--st-accent-fill); color: var(--st-on-accent); font-size: 15px; font-weight: 650; }
body[data-st-page=home] .search-region-controls { display: flex; flex-shrink: 0; align-items: center; gap: 2px; padding: 2px; background: var(--st-reading-bg); border: 0; border-radius: 10px; }
body[data-st-page=home] .site-search-header .search-container.is-querying .search-region-controls { display: flex; }
body[data-st-page=home] .search-region-controls .region-btn { min-width: 48px; min-height: 44px; padding: 5px 8px; background: transparent; color: var(--st-muted); border: 0; border-radius: 8px; font-size: 13px; }
body[data-st-page=home] .search-region-controls .region-btn.active { background: #c0cabd; color: var(--st-ink); box-shadow: none; }
body[data-st-page=home] .search-region-controls .region-btn > span:first-child { display: none; }
body[data-st-page=home] :where(.st-search-suggestions, .st-quick-searches, .st-quick-search) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; color: var(--st-muted); font-size: 13px; }
body[data-st-page=home] :where(.st-search-suggestions, .st-quick-searches, .st-quick-search) button { min-height: 44px; padding: 7px 14px; border: 1px solid #87988a; border-radius: 999px; color: var(--st-ink); background: #d9ddd3b3; font-size: 14px; }
body[data-st-page=home] .st-market-status { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 16px 0 0; color: var(--st-muted); font-size: 13px; }
body[data-st-page=home] .st-market-status strong { color: var(--st-ink); }
body[data-st-page=home] #stHomeBrief { margin: 0 0 30px; }
body[data-st-page=home] :where(.st-brief-strip, .st-home-brief-summary, .st-home-brief) { display: grid; grid-template-columns: minmax(170px, .75fr) minmax(0, 1.7fr) auto; align-items: center; gap: 28px; padding: 24px 30px; border-radius: 6px 23px 6px 23px; background: var(--st-accent-fill); color: var(--st-on-accent); box-shadow: 0 12px 24px #26332e12; }
body[data-st-page=home] :where(.st-brief-strip, .st-home-brief-summary, .st-home-brief) :where(h2, h3, p, a, strong, small, span) { color: inherit; }
body[data-st-page=home] #stHomeBrief :where(h2, h3, p, a, strong, small, span) { color: inherit; }
body[data-st-page=home] :where(.st-brief-strip, .st-home-brief-summary, .st-home-brief) :where(h2, h3, strong) { margin: 4px 0; font-size: 24px; font-weight: 650; }
body[data-st-page=home] :where(.st-brief-strip, .st-home-brief-summary, .st-home-brief) p { margin: 0; font-size: 15px; line-height: 1.8; }
body[data-st-page=home] :where(.st-brief-strip, .st-home-brief-summary, .st-home-brief) :where(.st-eyebrow, #stHomeBriefMeta) { font-size: 12px; }
body[data-st-page=home] :where(.st-brief-strip, .st-home-brief-summary, .st-home-brief) :where(a, button) { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 8px 0; background: transparent; border: 0; border-bottom: 1px solid #c7d0c5; text-decoration: none; font-size: 14px; white-space: nowrap; }
body[data-st-page=home] #stHomeBriefRetry { justify-self: start; min-height: 44px; padding: 10px 16px; border: 1px solid var(--st-on-accent); border-radius: 10px; background: var(--st-on-accent); color: var(--st-accent-fill); font-size: 14px; font-weight: 650; white-space: normal; }
body[data-st-page=home] #stHomeBriefRetry:hover { background: var(--st-reading-bg); border-color: var(--st-reading-bg); }
body[data-st-page=home] #stHomeBriefRetry:focus-visible { outline-color: var(--st-on-accent); }
body[data-st-page=home] :where(.st-home-news, .st-home-stories) { margin: 28px 0; padding: 32px 36px; background: var(--st-reading-bg); border-radius: 26px 7px 7px 7px; }
body[data-st-page=home] .st-home-news-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
body[data-st-page=home] .st-home-news-item { min-width: 0; padding: 24px; background: var(--st-sand-surface); border: 1px solid #aeb6aa; border-radius: 6px 24px 6px 6px; }
body[data-st-page=home] .st-home-news-item:nth-child(even) { background: #cbd7d2; }
body[data-st-page=home] .st-home-news-item a { color: var(--st-ink); text-decoration: none; }
body[data-st-page=home] .st-home-news-item h3 { margin: 12px 0; font-size: 21px; line-height: 1.6; }
body[data-st-page=home] .st-story-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
body[data-st-page=home] .st-story { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; padding: 24px; background: var(--st-sand-surface); border: 1px solid #aeb6aa; border-radius: 6px 24px 6px 6px; }
body[data-st-page=home] .st-story:nth-child(even) { background: #cbd7d2; }
body[data-st-page=home] .st-story :where(a, h3) { color: var(--st-ink); text-decoration: none; }
body[data-st-page=home] .st-story h3 { margin: 12px 0; font-size: 21px; line-height: 1.6; }
body[data-st-page=home] .st-story :where(p, span) { font-size: 13px; color: var(--st-muted); }
body[data-st-page=home] .st-story > a:last-child { display: inline-flex; align-items: center; min-height: 44px; margin-top: auto; font-size: 14px; }
body[data-st-page=home] .st-home-indices { margin: 24px 0; }
body[data-st-page=home] .st-home-indices .briefing-direction-hypothesis { padding: 22px 26px; background: var(--st-reading-bg); border-color: var(--st-line-soft); border-radius: 8px 20px 8px 8px; }
body[data-st-page=home] .st-home-indices .briefing-index-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
body[data-st-page=home] .st-home-indices .briefing-index-card { background: var(--st-surface); border-color: var(--st-line-soft); }
body[data-st-page=home] .st-home-indices .briefing-reason-list { background: transparent; border: 0; }
body[data-st-page=home] .st-home-indices :where(.briefing-reason-list, .briefing-index-label, .briefing-empty, .briefing-inline-note) { color: var(--st-muted); font-size: 15px; }
body[data-st-page=home] .st-home-indices :where(.briefing-range, .briefing-index-name, h3, h4) { color: var(--st-ink); }

/* Search becomes a single reading view, not a briefing/dashboard split. */
body[data-st-page=home] .briefing-search-workspace,
body[data-st-page=home] .briefing-search-workspace.search-active { display: block; width: 100%; max-width: none; overflow: visible; }
/* Legacy split-view hover/focus rules must not recreate an inner scroller
   with no scroll range and block wheel/touch chaining to the page. */
body[data-st-page=home] .briefing-search-workspace .briefing-search-right,
body[data-st-page=home] .briefing-search-workspace.search-active .briefing-search-right:hover,
body[data-st-page=home] .briefing-search-workspace.search-active .briefing-search-right:focus-within { position: static; top: auto; min-width: 0; max-height: none; overflow: visible; overscroll-behavior: auto; }
body[data-st-page=home][data-st-view=home] .briefing-search-right { display: none; }
body[data-st-page=home] #stHomeMore { margin: 28px 0 0; padding: 0 20px; border: 1px solid var(--st-line); border-radius: 12px; background: var(--st-reading-bg); }
body[data-st-page=home] #stHomeMore > summary { min-height: 44px; padding: 12px 0; color: var(--st-accent-ink); font-size: 15px; }
/* The reference column cannot contain another two-column dashboard: its
   minimum-width news panel used to squeeze the index text to one character. */
body[data-st-page=home] #stHomeMore .st-home-layout { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; }
body[data-st-page=home] #stHomeMore :is(.st-home-layout > *, .st-home-reference, .briefing-market-panel, .briefing-index-card) { min-width: 0; max-width: 100%; }
body[data-st-page=home] #stHomeMore .briefing-market-top-layout,
body[data-st-page=home] #stHomeMore .briefing-index-grid { grid-template-columns: minmax(0, 1fr); }
body[data-st-page=home] #stHomeMore .briefing-section-title { flex-wrap: wrap; align-items: flex-start; }
body[data-st-page=home] #stHomeMore .briefing-section-title h4 { min-width: 0; word-break: keep-all; overflow-wrap: break-word; }
body[data-st-page=home] #stHomeMore .briefing-section-title > span { max-width: 100%; }
body[data-st-page=home] #stHomeMore .briefing-headline-news-section { height: auto; max-height: none; }
body[data-st-page=home] #stHomeMore .st-index-reference { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 12px 16px; border: 1px solid var(--st-line-soft); border-radius: 10px; background: var(--st-sage-surface); color: var(--st-accent-ink); font-size: 14px; text-decoration: none; }
body[data-st-page=home] #stHomeMore .briefing-editorial-signal-board { grid-template-columns: minmax(0, 1fr); }
body[data-st-page=home] #stHomeMore .briefing-editorial-signal-side { border-left: 0; border-top: 1px solid var(--st-line-soft); padding: 18px 24px; }
/* Long reports and candidates are siblings of the compact overview, never
   a second grid squeezed into its left-hand column. */
body[data-st-page=home] #stHomeMore .st-home-analysis { min-width: 0; width: 100%; margin: 36px 0; }
body[data-st-page=home] #stHomeMore .st-home-analysis :is(.briefing-report-grid, .briefing-editorial-stock-grid) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px; }
body[data-st-page=home] #stHomeMore .st-home-analysis :is(.briefing-report-card, .briefing-editorial-stock-card) { padding: 22px; }
body[data-st-page=home] #stHomeMore .st-home-analysis .briefing-report-card :is(p, ul, small) { font-size: 14px; line-height: 1.8; }
body[data-st-page=home] #stHomeMore .st-home-analysis .briefing-report-card-title { font-size: 18px; line-height: 1.6; }
body[data-st-page=home] #stHomeMore [data-trend-held] { padding: 0 20px 20px; border: 0; border-radius: 12px; background: var(--st-surface); }
body[data-st-page=home] #stHomeMore [data-trend-held] > summary { padding: 18px 0; }
body[data-st-page=home] #stHomeMore [data-trend-held] [data-trend-current] { border: 0; background: var(--st-reading-bg); }
@media (max-width: 1100px) {
    body[data-st-page=home] #stHomeMore .st-home-layout { grid-template-columns: minmax(0, 1fr); }
}
body[data-st-page=home][data-st-view=stock] .st-home-followup { display: none; }
body[data-st-page=home][data-st-view=stock] #stHomeExplore { display: block; min-height: 0; padding: 24px 28px 0; background: var(--st-reading-bg); border-radius: 22px 7px 0 0; margin-top: 20px; }
body[data-st-page=home][data-st-view=stock] #stHomeIntro,
body[data-st-page=home][data-st-view=stock] #stHomeBrief,
body[data-st-page=home][data-st-view=stock] .briefing-search-left,
body[data-st-page=home][data-st-view=stock] #stHomeNews,
body[data-st-page=home][data-st-view=stock] #stHomeBriefIndices { display: none !important; }
/* Quote basis is shown on the selected note; avoid repeating it above the note. */
body[data-st-page=home][data-st-view=stock] #stMarketStatus { display: none; }
body[data-st-page=home][data-st-view=stock] .briefing-search-right { padding: 0 28px 30px; background: var(--st-reading-bg); border-radius: 0 0 20px 7px; }
body[data-st-page=home] .briefing-search-result-toolbar { display: flex; justify-content: flex-end; padding: 0; margin: 0; border: 0; background: transparent; }
body[data-st-page=home] .briefing-search-close-btn { min-height: 44px; padding: 6px 12px; color: var(--st-muted); border: 1px solid var(--st-line-soft); border-radius: 10px; background: transparent; }
body[data-st-page=home] .stock-chart-section { margin: 0; padding: 0; background: transparent; border: 0; box-shadow: none; }
body[data-st-page=home] .kis-stocks-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
body[data-st-page=home] .kis-stock-card { min-width: 0; padding: 16px 0; border: 0; border-bottom: 1px solid var(--st-line-soft); border-radius: 0; background: transparent; box-shadow: none; color: var(--st-ink); }
body[data-st-page=home] .kis-stock-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 0 14px; margin-bottom: 8px; background: transparent; border: 0; }
body[data-st-page=home] .kis-stock-header h4 { margin: 0; font-size: 30px; font-weight: 650; color: var(--st-ink); }
body[data-st-page=home] .kis-stock-header h4 button { max-width: 100%; padding: 0; color: inherit; border: 0; background: transparent; font: inherit; letter-spacing: inherit; text-align: left; }
body[data-st-page=home] .kis-stock-code { padding: 4px 0; border-radius: 0; background: transparent; color: var(--st-muted); font-size: 14px; }
body[data-st-page=home] :where(.kis-price-main, .kis-price-main.positive, .kis-price-main.negative, .kis-price-main.neutral) { padding: 4px 0 12px; background: transparent !important; border: 0; }
body[data-st-page=home] :is(.kis-current-price, .kis-price-main .kis-current-price, .kis-price-main.positive .kis-current-price, .kis-price-main.negative .kis-current-price) { color: var(--st-ink) !important; font-size: clamp(28px, 3vw, 38px); font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.045em; }
body[data-st-page=home] .kis-change { display: inline-block; margin-top: 8px; padding: 4px 8px; background: var(--st-raised); border-radius: 7px; font-size: 16px; }
body[data-st-page=home] :is(.kis-change.positive, .kis-price-main.positive .kis-change) { color: var(--st-gain) !important; background: var(--st-gain-bg); }
body[data-st-page=home] :is(.kis-change.negative, .kis-price-main.negative .kis-change) { color: var(--st-loss) !important; background: var(--st-loss-bg); }
body[data-st-page=home] .st-stock-observation { margin: 20px 0 14px; padding: 20px 0 12px; border-top: 1px solid var(--st-line); color: var(--st-ink); font-size: 16px; line-height: 1.85; }
body[data-st-page=home] .st-stock-observation :where(p, strong) { margin: 0; font-weight: 500; }
body[data-st-page=home] .st-stock-observation .st-eyebrow { margin-bottom: 10px; font-size: 13px; font-weight: 700; }
body[data-st-page=home] :where(.st-stock-details, .st-stock-detail, .st-stock-secondary) { min-width: 0; }
body[data-st-page=home] :where(.st-stock-details, .st-stock-detail) > summary { color: var(--st-accent-ink); font-size: 14px; padding: 10px 0; }
body[data-st-page=home] .st-stock-secondary { padding: 16px; background: var(--st-sand-surface); border: 1px solid var(--st-line-soft); border-radius: 14px; }
body[data-st-page=home] .st-stock-secondary .kis-stock-header h4 { font-size: 20px; }
body[data-st-page=home] .st-stock-secondary .kis-current-price { font-size: 23px !important; }
body[data-st-page=home] .st-quote-basis { color: var(--st-muted); font-size: 13px; line-height: 1.7; margin: 8px 0; }
body[data-st-page=home] .st-stock-primary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, .8fr); column-gap: 24px; }
body[data-st-page=home] .st-stock-primary .kis-stock-header { grid-column: 1; grid-row: 1 / span 3; align-self: start; display: block; }
body[data-st-page=home] .st-stock-primary .kis-stock-code { display: block; margin-top: 6px; }
body[data-st-page=home] .st-stock-primary .kis-price-container { display: contents; }
body[data-st-page=home] .st-stock-primary .kis-current-price { grid-column: 2; grid-row: 1; justify-self: end; }
body[data-st-page=home] .st-stock-primary .kis-change { grid-column: 2; grid-row: 2; justify-self: end; }
body[data-st-page=home] .st-stock-primary .kis-change { width: fit-content; max-width: 100%; }
body[data-st-page=home] .st-stock-primary .st-quote-basis { grid-column: 2; grid-row: 3; text-align: right; }
body[data-st-page=home] .st-stock-primary :where(.st-stock-observation, .st-stock-details) { grid-column: 1 / -1; }
body[data-st-page=home] .st-stock-primary .st-stock-observation { grid-row: 4; }
body[data-st-page=home] .st-stock-primary .st-stock-details { grid-row: 5; }
body[data-st-page=home] .st-stock-secondary { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 20px; }
body[data-st-page=home] .st-stock-secondary .kis-stock-header { grid-column: 1; grid-row: 1 / span 2; display: block; margin: 0; padding: 0; }
body[data-st-page=home] .st-stock-secondary .kis-stock-code { display: block; }
body[data-st-page=home] .st-stock-secondary .kis-price-container { display: contents; }
body[data-st-page=home] .st-stock-secondary :where(.kis-current-price, .kis-change) { grid-column: 2; justify-self: end; }
body[data-st-page=home] .st-stock-secondary .st-quote-basis { grid-column: 1 / -1; margin-bottom: 0; }
body[data-st-page=home] .st-stock-secondary :where(.st-stock-observation, .st-stock-details) { display: none; }
body[data-st-page=home] .st-compare-stocks { margin-top: 28px; border-top: 1px solid var(--st-line); padding-top: 24px; }
body[data-st-page=home] .st-compare-stocks h2 { margin: 6px 0 18px; color: var(--st-ink); font-size: 22px; }
body[data-st-page=home] .st-compare-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; }
body[data-st-page=home] :where(.kis-stocks-header, .kis-chart-legend) { background: transparent; border: 0; padding: 12px 0; border-radius: 0; color: var(--st-muted); }
body[data-st-page=home] :where(.kis-stocks-header h3, .kis-legend-title) { color: var(--st-ink); font-size: 16px; }
body[data-st-page=home] :where(.kis-legend-item, .kis-info-label, .kis-price-loading) { color: var(--st-muted); }
body[data-st-page=home] :where(.kis-info-item, .kis-chart-section, .intraday-range, .complex-analysis, .analysis-section, .news-links-section) { background: var(--st-surface); border-color: var(--st-line-soft); color: var(--st-ink); border-radius: 12px; }
body[data-st-page=home] :where(.kis-info-value, .kis-stock-name) { color: var(--st-ink); }
body[data-st-page=home] .news-section { background: transparent; border: 0; margin: 0; }
body[data-st-page=home] .videos-container { display: block; margin-top: 18px; }
body[data-st-page=home] .dashboard-header { margin: 0 0 18px; padding: 18px 0 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; text-align: left; color: var(--st-ink); }
body[data-st-page=home] .dashboard-main-title { margin: 0 0 8px; color: var(--st-ink); font-size: 25px; text-shadow: none; }
body[data-st-page=home] .dashboard-main-description { margin: 0; color: var(--st-muted); font-size: 14px; line-height: 1.7; }
body[data-st-page=home] .dashboard-container { display: block; }
body[data-st-page=home] .dashboard-container.st-video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
body[data-st-page=home] .dashboard-container.st-video-grid > p { grid-column: 1 / -1; }
body[data-st-page=home] .st-video-category { display: inline-block; margin-bottom: 8px; color: var(--st-accent-ink); font-size: 13px; }
body[data-st-page=home] .dashboard-section { margin: 24px 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
body[data-st-page=home] .section-header { padding: 12px 0; color: var(--st-ink); background: transparent; border: 0; border-bottom: 1px solid var(--st-line-soft); border-radius: 0; }
body[data-st-page=home] .video-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 18px; }
body[data-st-page=home] :where(.video-item, .video-card) { display: block; min-width: 0; margin: 0; padding: 0; overflow: hidden; color: var(--st-ink); background: var(--st-surface); border: 1px solid var(--st-line-soft); border-radius: 8px 20px 8px 8px; box-shadow: none; }
body[data-st-page=home] .video-thumbnail { width: 100%; max-width: none; height: auto; aspect-ratio: 16/9; overflow: hidden; border-radius: 0; }
body[data-st-page=home] .video-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
body[data-st-page=home] .video-main-link { display: block; color: var(--st-ink); text-decoration: none; }
body[data-st-page=home] .video-main-link:focus-visible { outline: 3px solid var(--st-accent-ink); outline-offset: -4px; border-radius: 8px 20px 0 0; }
body[data-st-page=home] .video-main-link:hover .video-title { text-decoration: underline; text-underline-offset: .2em; }
body[data-st-page=home] .video-thumbnail { position: relative; }
body[data-st-page=home] .st-creator-label { position: absolute; top: 12px; left: 12px; z-index: 1; padding: 5px 10px; color: var(--st-on-accent); background: var(--st-accent-fill); border: 1px solid #f3f2ea80; border-radius: 7px; box-shadow: 0 2px 8px #26332e33; font-size: 13px; font-weight: 650; line-height: 1.6; }
body[data-st-page=home] .st-video-placeholder { display: grid; place-items: center; width: 100%; height: 100%; background: var(--st-sand-surface); color: var(--st-muted); font-size: 15px; }
body[data-st-page=home] .video-info { min-width: 0; padding: 18px; background: transparent; }
body[data-st-page=home] .video-title { color: var(--st-ink); font-size: 17px; font-weight: 600; line-height: 1.65; -webkit-line-clamp: 3; }
body[data-st-page=home] :where(.video-channel, .video-meta, .video-description) { color: var(--st-muted); font-size: 13px; line-height: 1.7; }
body[data-st-page=home] .st-video-metrics { padding: 0 18px; border-top: 1px solid var(--st-line-soft); background: transparent; color: var(--st-muted); font-size: 14px; }
body[data-st-page=home] .st-video-metrics > summary { min-height: 44px; padding: 10px 0; color: var(--st-accent-ink); font-weight: 500; }
body[data-st-page=home] .st-video-metrics :where(.video-metrics, .relative-metrics) { display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 0; padding: 0 0 14px; border: 0; background: transparent; color: var(--st-muted); }
body[data-st-page=home] .st-video-metrics .metric-item { color: var(--st-muted); font-size: 13px; }
body[data-st-page=home] .st-video-metrics :where(.recent-badge, .expert-score, .hot-badge) { padding: 2px 6px; background: var(--st-accent-soft); color: var(--st-accent-ink); border-radius: 5px; }
body[data-st-page=home] .st-video-opinion { margin: 14px 0 6px; padding: 10px 14px; color: var(--st-ink); background: #c7d0c5; border-left: 3px solid var(--st-accent); border-radius: 6px; font-size: 14px; }
body[data-st-page=home] .st-market-context { margin: 28px 0 0; padding: 26px 24px; background: var(--st-sand-surface); border-radius: 8px 22px 8px 8px; color: var(--st-ink); }
body[data-st-page=home] .st-market-context h2 { margin: 4px 0 12px; font-size: 24px; line-height: 1.5; }
body[data-st-page=home] .st-market-context p { margin: 0 0 12px; max-width: 680px; color: var(--st-muted); font-size: 16px; }
body[data-st-page=home] .st-market-context a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 0; color: var(--st-accent-ink); text-underline-offset: .3em; }

body[data-st-page=report] .report-container .change-positive { color: var(--st-gain); }
body[data-st-page=report] .report-container .change-negative { color: var(--st-loss); }
body[data-st-page=home] .error { margin: 16px 0; padding: 16px; background: var(--st-warning-bg); color: var(--st-warning); border: 1px solid #97875f; border-radius: 12px; }

/* Full briefing remains a real-data letter, not the prototype's fixed copy. */
body[data-st-page=briefing] > .container { width: min(1080px, calc(100% - 48px)); max-width: 1080px; margin: 0 auto; padding: 0; }
body[data-st-page=briefing] .header { padding: 38px 0 28px; margin: 0; color: var(--st-ink); text-align: left; }
body[data-st-page=briefing] .header h1 { color: var(--st-ink); font-size: clamp(28px, 3vw, 42px); line-height: 1.4; }
body[data-st-page=briefing] .header .subtitle { color: var(--st-muted); opacity: 1; font-size: 16px; }
body[data-st-page=briefing] .briefing-card { padding: clamp(24px, 4vw, 48px); background: var(--st-surface); border: 0; border-radius: 6px 24px 6px 6px; box-shadow: none; color: var(--st-ink); }
body[data-st-page=briefing] .briefing-header { border-color: var(--st-line); }
body[data-st-page=briefing] .briefing-title { color: var(--st-ink); font-size: 25px; }
body[data-st-page=briefing] :where(.briefing-content, .briefing-content p, .briefing-content li) { color: var(--st-ink); font-size: 16px; line-height: 1.9; }
body[data-st-page=briefing] :where(.briefing-content h2, .briefing-content h3, .briefing-content h4) { color: var(--st-ink); border-color: var(--st-line-soft); }
body[data-st-page=briefing] :where(.briefing-note, .briefing-observation-item, .sources, .source-item) { color: var(--st-ink); background: var(--st-reading-bg); border-color: var(--st-line-soft); }
body[data-st-page=briefing] :where(.sources summary, .sources-list a, .back-link) { color: var(--st-accent-ink); }
body[data-st-page=briefing] .back-link { min-height: 44px; padding: 8px 14px; border-radius: 12px; background: var(--st-surface) !important; border: 1px solid var(--st-line); text-decoration: none; font-size: 14px; }
body[data-st-page=briefing] [data-briefing-index-panel] { padding: 0; background: transparent !important; border: 0 !important; border-radius: 0 !important; }
body[data-st-page=briefing] .st-index-panel-title { margin: 0 0 8px; }
body[data-st-page=briefing] .st-index-panel > .st-index-description { margin: 8px 0 24px; }
body[data-st-page=briefing] .st-index-grid { gap: 24px; }
body[data-st-page=briefing] .st-index-grid > .st-index-card:only-child { grid-column: 1 / -1; }
body[data-st-page=briefing] .st-index-card { padding: 24px; border: 1px solid var(--st-line-soft); background: var(--st-reading-bg); }
body[data-st-page=briefing] .st-index-card > .st-index-title { margin: 0 0 8px; }
body[data-st-page=briefing] .st-index-rationale-list { margin: 16px 0 0; padding-left: 22px; }
body[data-st-page=briefing] :where(.briefing-meta, .loading, .st-index-description) { color: var(--st-muted); }
body[data-st-page=briefing] .st-briefing-schedule { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; padding: 14px 18px; background: #c7d0c5; border-radius: 12px; color: var(--st-muted); font-size: 13px; text-align: left; }
body[data-st-page=briefing] .st-briefing-schedule div { display: grid; gap: 2px; }
body[data-st-page=briefing] .st-briefing-schedule dd { margin: 0; color: var(--st-ink); }

/* Read-only public trading page: same identity without changing its payload. */
body[data-st-page=bot] .trading-container { width: min(var(--st-width), calc(100% - 48px)); max-width: var(--st-width); margin: 32px auto; padding: 0; background: transparent; color: var(--st-ink); }
body[data-st-page=bot] .trading-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--st-line); }
body[data-st-page=bot] .trading-header h1 { margin: 0; color: var(--st-ink); font-size: 32px; line-height: 1.4; }
body[data-st-page=bot] .dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
body[data-st-page=bot] .dashboard-card { min-width: 0; padding: 26px; color: var(--st-ink); background: var(--st-reading-bg); border: 1px solid var(--st-line-soft); border-radius: 8px 22px 8px 8px; box-shadow: none; }
body[data-st-page=bot] .dashboard-card h3 { margin-bottom: 16px; color: var(--st-ink); font-size: 18px; font-weight: 600; }
body[data-st-page=bot] .dashboard-card > h2 { font-size: 32px; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
body[data-st-page=bot] :where(.st-workspace-intro, .st-section-note, .st-pipeline-meta) { color: var(--st-muted); font-size: 15px; line-height: 1.8; }
body[data-st-page=bot] .st-console-notice { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px 24px; padding: 20px 24px; margin-bottom: 20px; border: 0; border-radius: 6px 20px 6px 6px; background: #c7d0c5; }
body[data-st-page=bot] .st-console-notice strong { color: var(--st-accent-ink); }
body[data-st-page=bot] .st-console-notice :where(span, p) { color: var(--st-muted); font-size: 14px; }
body[data-st-page=bot] .st-public-status-line { display: grid; grid-template-columns: repeat(2, minmax(132px, 1fr)); gap: 12px; min-width: 0; }
body[data-st-page=bot] .st-state-badge { display: flex; flex-direction: column; justify-content: center; gap: 3px; min-width: 0; padding: 12px 16px; border: 1px solid var(--st-line); border-radius: 12px; background: var(--st-surface); color: var(--st-ink); }
body[data-st-page=bot] .st-state-badge .st-state-label { color: inherit; font-size: 12px; font-weight: 600; }
body[data-st-page=bot] .st-state-badge .st-state-value { display: inline-flex; align-items: center; gap: 8px; color: inherit; font-size: 18px; font-weight: 750; line-height: 1.5; }
body[data-st-page=bot] #engineStatusText::before { content: ''; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
body[data-st-page=bot] .st-state-badge[data-state=running] { border-color: var(--st-accent-fill); background: var(--st-accent-fill); color: var(--st-on-accent); }
body[data-st-page=bot] .st-state-badge[data-mode=real] { border-color: #9a793b; background: var(--st-warning-bg); color: var(--st-warning); }
body[data-st-page=bot] .st-state-badge[data-mode=paper] { border-color: #7a96aa; background: var(--st-loss-bg); color: var(--st-loss); }
body[data-st-page=bot] .st-read-only-line { display: flex; flex-wrap: wrap; gap: 4px 8px; }
body[data-st-page=bot] .st-console-refresh { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-top: 12px; border-top: 1px solid var(--st-line-soft); font-size: 13px; }
body[data-st-page=bot] .st-refresh-state { grid-column: 1 / -1; padding: 12px; color: var(--st-warning); background: var(--st-warning-bg); border-radius: 8px; font-size: 14px; }
body[data-st-page=bot] .st-result-summary { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr); gap: 20px; }
body[data-st-page=bot] .st-result-primary { background: #c7d0c5; }
body[data-st-page=bot] .st-result-primary h2 { font-size: 34px; }
body[data-st-page=bot] :where(.st-console-section-heading, .st-public-scope, .st-supporting-details, .st-analytics-card, .st-radar-card) { grid-column: 1 / -1; }
body[data-st-page=bot] .st-console-section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding-top: 14px; }
body[data-st-page=bot] .st-console-section-heading h2 { margin: 0; font-size: 23px; }
body[data-st-page=bot] .st-console-section-heading p { margin: 0; color: var(--st-muted); font-size: 14px; }
body[data-st-page=bot] :where(.st-public-scope, .st-supporting-details) { padding: 0 22px; border: 1px solid var(--st-line-soft); border-radius: 18px; background: var(--st-surface); }
body[data-st-page=bot] :where(.st-public-scope, .st-supporting-details) > summary { padding: 16px 0; color: var(--st-accent-ink); font-size: 16px; }
body[data-st-page=bot] :where(.st-public-scope, .st-supporting-details) > summary span { margin-left: 8px; color: var(--st-muted); font-size: 13px; }
body[data-st-page=bot] :where(.st-public-scope-grid, .st-supporting-grid, .st-account-workspace) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 0 0 18px; }
body[data-st-page=bot] .ops-split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; }
body[data-st-page=bot] :where(.holding-card, .holdings-empty, #analyticsSummary > div, #buyPipelineCounts > div) { background: var(--st-surface) !important; border-color: var(--st-line-soft) !important; }
body[data-st-page=bot] :is([style*="background:#111827"], [style*="background:#0f172a"], [style*="background:#15152d"], [style*="background:#1e1e3a"]) { background: var(--st-surface) !important; }
body[data-st-page=bot] :is([style*="color:#888"], [style*="color: #888"], [style*="color:#666"], [style*="color: #666"], [style*="color:#aaa"], [style*="color: #aaa"]) { color: var(--st-muted) !important; }
body[data-st-page=bot] :where(.holding-card-name, .journal-title, .journal-text) { color: var(--st-ink); }
body[data-st-page=bot] :where(.holding-card-meta, .holding-card-prices, .holding-card-pnl, .holding-card-risk, .holdings-empty, .journal-meta, .journal-summary) { color: var(--st-muted); font-size: 14px; }
body[data-st-page=bot] :is(#todayTrades, #availCash) { color: var(--st-ink) !important; }
body[data-st-page=bot] :is([style*="font-size:11px"], [style*="font-size: 11px"], [style*="font-size:10px"], [style*="font-size: 10px"]) { font-size: 13px !important; }
body[data-st-page=bot] .pos { color: var(--st-gain); }
body[data-st-page=bot] .neg { color: var(--st-loss); }
body[data-st-page=bot] .status-badge.stopped { background: var(--st-reading-bg); color: var(--st-muted); }
body[data-st-page=bot] .status-badge.running { background: #c7d0c5; color: var(--st-accent-ink); }
body[data-st-page=bot] :where(.journal-btn, .journal-chip, .journal-chat-chip) { color: var(--st-ink); background: var(--st-reading-bg); border-color: var(--st-line); }
body[data-st-page=bot] .st-mood-decoration { display: none; }

/* Long reading and offline pages preserve their original text and actions. */
body[data-st-page=privacy] > .container { width: min(1100px, calc(100% - 48px)); max-width: 1100px; margin: auto; padding: 0 0 24px; }
body[data-st-page=privacy] .st-policy-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 34px; }
body[data-st-page=privacy] .st-policy-nav { position: sticky; top: 20px; align-self: start; display: grid; gap: 4px; padding: 14px; background: #c7d0c5; border: 1px solid var(--st-line-soft); border-radius: 8px 18px 8px 8px; }
body[data-st-page=privacy] .st-policy-nav p { margin: 0 0 4px; padding: 4px 8px; font-size: 13px; color: var(--st-muted); }
body[data-st-page=privacy] .st-policy-nav a { display: block; min-height: 44px; padding: 9px 8px; color: var(--st-accent-ink); font-size: 14px; text-decoration: none; }
body[data-st-page=privacy] .st-policy-content { min-width: 0; padding: 26px 32px; background: var(--st-surface); border-radius: 7px 24px 7px 7px; }
body[data-st-page=privacy] :where(p, li) { color: var(--st-ink); font-size: 16px; line-height: 1.9; }
body[data-st-page=privacy] h2 { margin-top: 28px; padding-left: 0; border-left: 0; border-bottom: 1px solid var(--st-line-soft); padding-bottom: 12px; color: var(--st-ink); font-size: 20px; scroll-margin-top: 20px; }
body[data-st-page=privacy] .highlight { margin: 0 0 24px; padding: 20px; background: #c7d0c5; border: 0; color: var(--st-ink); font-size: 16px; }
body[data-st-page=privacy] a { color: var(--st-accent-ink); text-underline-offset: .2em; }
body[data-st-page=privacy] .updated { color: var(--st-muted); }
body[data-st-page=offline] { display: block; text-align: center; }
body[data-st-page=offline] .st-offline-panel { width: min(560px, calc(100% - 48px)); margin: 48px auto; padding: 36px; background: var(--st-reading-bg); border: 0; border-radius: 8px 26px 8px 8px; }
body[data-st-page=offline] .st-offline-icon { margin: 0 auto 20px; color: var(--st-accent-ink); line-height: 1; animation: none; }
body[data-st-page=offline] h1 { margin: 0 0 16px; color: var(--st-ink); font-size: 30px; }
body[data-st-page=offline] :where(p, li) { color: var(--st-muted); font-size: 16px; line-height: 1.8; }
body[data-st-page=offline] .st-offline-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
body[data-st-page=offline] .st-offline-actions a { min-height: 44px; padding: 10px 16px; color: var(--st-accent-ink); }
body[data-st-page=offline] .retry-btn { min-height: 44px; padding: 10px 20px; background: var(--st-accent-fill); color: var(--st-on-accent); border-radius: 12px; font-weight: 650; }
body[data-st-page=offline] .card { margin: 24px 0 0; padding: 20px; background: var(--st-surface); border-color: var(--st-line-soft); }
body[data-st-page=offline] .st-offline-checklist { padding-left: 20px; margin: 0; text-align: left; }
body[data-st-page=offline] .st-offline-checklist li + li { margin-top: 12px; }

/* Existing internal research/report pages inherit the identity, not publicity. */
body[data-st-page=research]:not([data-st-page=trading]) { --green: #8a3f3f; --red: #365b77; --blue: #365b77; }
/* Research's later stylesheet intentionally retains a dark chart overlay.
   Tags sit on a light panel, so only they need the higher-specificity ink. */
body[data-st-page=research]:not([data-st-page=trading]) .tag { color: var(--st-ink); }
body[data-st-page=research]:not([data-st-page=trading]) :is(.research-list-link, .research-selection-jump a) { color: var(--st-accent-ink); }
body[data-st-page=research]:not([data-st-page=trading]) #reportsPanel a { color: var(--st-accent-ink); }
body[data-st-page=research] :where(.card, .panel, .report-card, .research-card) { background: var(--st-reading-bg); border-color: var(--st-line-soft); border-radius: 14px; }
body[data-st-page=research] .research-toolbar h1 { font-size: 32px; }
body[data-st-page=research] .research-toolbar { padding-top: 24px; }
body[data-st-page=research-export] { color-scheme: light; }
body[data-st-page=research-export] .research-export { width: min(var(--st-width), calc(100% - 48px)); }
body[data-st-page=research-export] .research-export .chart { max-width: none; }
body[data-st-page=report] { --report-ink: #26332e; --report-muted: #34423a; --report-line: #8b978d; --report-panel: #d9ddd3; }
body[data-st-page=report] .report-container .header { background: transparent; color: var(--st-ink); }
body[data-st-page=report] .report-container :where(.accuracy-box, .stock-card, .lessons-box) { color: var(--st-ink); background: var(--st-reading-bg); border-color: var(--st-line-soft); }

/* Preserve the existing chat's behavior and shared session keys. */
body[data-st-page]:not([data-st-page=trading]) .st-chat-fab { background: var(--st-accent-fill); color: var(--st-on-accent); border-color: var(--st-accent); box-shadow: none; font-weight: 650; }
body[data-st-page]:not([data-st-page=trading]) .st-chat-head { background: #c7d0c5; color: var(--st-ink); border-color: var(--st-line); }
body[data-st-page]:not([data-st-page=trading]) :where(.st-chat-panel, .st-chat-form, .st-chat-status) { background: var(--st-surface); color: var(--st-ink); border-color: var(--st-line); }
body[data-st-page]:not([data-st-page=trading]) .st-chat-messages { background: var(--st-reading-bg); }
body[data-st-page]:not([data-st-page=trading]) .st-chat-bubble { background: var(--st-surface); color: var(--st-ink); border-color: var(--st-line); }
body[data-st-page]:not([data-st-page=trading]) .st-chat-row.admin:not(.mine) .st-chat-bubble { background: #c7d0c5; color: var(--st-accent-ink); border-color: #8b978d; }
body[data-st-page]:not([data-st-page=trading]) .st-chat-send { background: var(--st-accent-fill); color: var(--st-on-accent); }
body[data-st-page]:not([data-st-page=trading]) :where(.st-chat-empty, .st-chat-meta, .st-chat-status) { color: var(--st-muted); }
body[data-st-page]:not([data-st-page=trading]) .st-chat-widget.st-chat-docked { position: static !important; inset: auto !important; transform: none !important; z-index: auto; }
body[data-st-page]:not([data-st-page=trading]) .st-chat-docked .st-chat-fab { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px 12px; font-size: 13px; }
body[data-st-page]:not([data-st-page=trading]) .st-chat-docked .st-chat-panel { position: fixed; inset: auto 24px 24px auto; width: min(370px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); z-index: 16000; }
body[data-st-page]:not([data-st-page=trading]) .kis-local-notice-popup { z-index: 20000; }
body[data-st-page]:not([data-st-page=trading]) .kis-local-notice-panel { background: var(--st-surface); color: var(--st-ink); border-color: var(--st-line); }
body[data-st-page]:not([data-st-page=trading]) .kis-local-notice-panel :where(h2, p) { color: var(--st-ink); }
body[data-st-page]:not([data-st-page=trading]) :is(.kis-local-notice-secondary, .kis-local-notice-close) { background: var(--st-reading-bg); color: var(--st-ink); border-color: var(--st-line); }

@media (max-width: 900px) {
    body[data-st-page=home] #stHomeExplore { gap: 30px; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
    body[data-st-page=home] :where(.st-brief-strip, .st-home-brief-summary, .st-home-brief) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 18px; }
    body[data-st-page=home] :where(.st-brief-strip, .st-home-brief-summary, .st-home-brief) > :last-child { grid-column: 1 / -1; justify-self: start; }
    body[data-st-page=bot] .ops-split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
    body[data-st-page]:not([data-st-page=trading]) #stocktube-shell .st-header { padding-inline: max(18px, env(safe-area-inset-left, 0px)); }
    body[data-st-page]:not([data-st-page=trading]) .st-header-inner { min-height: 64px; flex-wrap: wrap; gap: 10px 8px; padding: 10px 0 12px; }
    body[data-st-page]:not([data-st-page=trading]) #stocktube-shell .st-brand { font-size: 21px; }
    body[data-st-page]:not([data-st-page=trading]) .st-header-tools { gap: 6px; margin-left: auto; }
    body[data-st-page]:not([data-st-page=trading]) #stocktube-shell .st-desktop-nav { order: 3; flex: 1 0 100%; width: 100%; max-width: 100%; margin: 0; gap: 4px; overflow-x: auto; }
    body[data-st-page]:not([data-st-page=trading]) #stocktube-shell .st-desktop-nav a { flex: 1 0 auto; min-height: 48px; padding: 10px 8px; font-size: 15px; }
    body[data-st-page]:not([data-st-page=trading]) #stocktube-shell .st-mobile-nav { display: block; position: relative; margin: 0; padding: 0; background: transparent; border: 0; box-shadow: none; z-index: 950; }
    body[data-st-page]:not([data-st-page=trading]) .st-more { position: relative; margin: 0; padding: 0; border: 0; }
    body[data-st-page]:not([data-st-page=trading]) .st-more > summary { display: grid; place-items: center; width: 44px; min-height: 44px; padding: 10px; color: var(--st-ink); background: transparent; border: 0; border-radius: 10px; list-style: none; }
    body[data-st-page]:not([data-st-page=trading]) .st-more > summary::-webkit-details-marker { display: none; }
    body[data-st-page]:not([data-st-page=trading]) .st-more[open] > summary { background: var(--st-reading-bg); }
    body[data-st-page]:not([data-st-page=trading]) .st-more-panel { position: absolute; top: calc(100% + 9px); right: 0; width: min(290px, calc(100vw - 36px)); padding: 10px; background: var(--st-surface); border: 1px solid var(--st-line); border-radius: 16px 6px 16px 16px; box-shadow: 0 12px 32px #26332e26; }
    body[data-st-page]:not([data-st-page=trading]) .st-more-panel p { margin: 0; padding: 7px 10px; color: var(--st-muted); font-size: 13px; }
    body[data-st-page]:not([data-st-page=trading]) .st-more-panel a { display: flex; gap: 12px; align-items: center; min-height: 48px; padding: 10px 12px; color: var(--st-ink); text-decoration: none; border-radius: 8px; font-size: 16px; font-weight: 650; }
    body[data-st-page]:not([data-st-page=trading]) .st-more-panel a[aria-current=page] { background: var(--st-accent-fill); color: var(--st-on-accent); }
    body[data-st-page]:not([data-st-page=trading]) .st-footer { width: calc(100% - 36px); gap: 12px 18px; margin-top: 30px; }
    body[data-st-page]:not([data-st-page=trading]) .st-footer > span { order: 2; width: 100%; }
    body[data-st-page=home] > .container { width: calc(100% - 20px); }
    body[data-st-page=home] #stHomeExplore { display: block; min-height: 0; padding: 28px 8px 26px; }
    body[data-st-page=home] #stHomeIntro { margin-bottom: 24px; }
    body[data-st-page=home] #stHomeIntro h1 { font-size: 31px; }
    body[data-st-page=home] .site-search-header .search-container { flex-wrap: wrap; gap: 6px; padding: 7px; }
    body[data-st-page=home] .site-search-header #searchInput { flex: 1 1 calc(100% - 78px); width: auto; height: 44px; padding: 0 8px; }
    body[data-st-page=home] .site-search-header #searchBtn { order: 1; min-height: 44px; height: 44px; min-width: 64px; padding: 0 14px; }
    body[data-st-page=home] .search-region-controls { order: 2; width: 100%; background: transparent; border-top: 1px solid var(--st-line-soft); border-radius: 0; padding: 5px 0 0; gap: 8px; }
    body[data-st-page=home] .search-region-controls .region-btn { min-width: 76px; min-height: 44px; border: 1px solid var(--st-line-soft); border-radius: 8px; }
    body[data-st-page=home] :where(.st-brief-strip, .st-home-brief-summary, .st-home-brief) { display: block; padding: 24px 20px; }
    body[data-st-page=home] :where(.st-brief-strip, .st-home-brief-summary, .st-home-brief) p { margin: 16px 0; font-size: 16px; }
    body[data-st-page=home] :where(.st-brief-strip, .st-home-brief-summary, .st-home-brief) :where(.st-eyebrow, #stHomeBriefMeta) { margin: 0; font-size: 13px; }
    body[data-st-page=home] :where(.st-home-news, .st-home-stories) { padding: 24px 18px; }
    body[data-st-page=home] :is(.st-home-news-grid, .st-story-grid) { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    body[data-st-page=home] #stHomeMore .st-home-analysis :is(.briefing-report-grid, .briefing-editorial-stock-grid) { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    body[data-st-page=home] #stHomeMore .st-home-analysis :is(.briefing-report-card, .briefing-editorial-stock-card) { padding: 20px; }
    body[data-st-page=home] #stHomeMore [data-trend-held] { padding: 0 14px 14px; }
    body[data-st-page=briefing] .st-index-grid { gap: 16px; }
    body[data-st-page=briefing] .st-index-card { padding: 20px 18px; }
    body[data-st-page=home] .st-home-indices .briefing-index-grid { grid-template-columns: minmax(0, 1fr); }
    body[data-st-page=home] .st-home-indices .briefing-direction-hypothesis { padding: 20px 18px; }
    body[data-st-page=home] .st-home-news-item { padding: 20px; }
    body[data-st-page=home][data-st-view=stock] #stHomeExplore { margin-top: 12px; padding: 14px 14px 0; }
    body[data-st-page=home][data-st-view=stock] .briefing-search-right { padding: 0 14px 24px; }
    body[data-st-page=home] .kis-stock-header h4 { font-size: 28px; }
    body[data-st-page=home] .kis-current-price { font-size: 31px !important; }
    body[data-st-page=home] .kis-stock-card { padding: 20px 0; }
    body[data-st-page=home] .st-stock-primary { grid-template-columns: minmax(0, 1fr); }
    body[data-st-page=home] .dashboard-container.st-video-grid { grid-template-columns: minmax(0, 1fr); }
    body[data-st-page=home] .st-stock-primary .kis-stock-header { grid-column: 1; grid-row: 1; }
    body[data-st-page=home] .st-stock-primary .kis-stock-header { padding: 0; margin: 0; }
    body[data-st-page=home] .st-stock-primary .kis-stock-header .st-eyebrow { margin: 0 0 4px; font-size: 12px; line-height: 1.5; }
    body[data-st-page=home] .st-stock-primary .kis-stock-header h4 { font-size: 26px; line-height: 1.4; }
    body[data-st-page=home] .st-stock-primary .kis-stock-code { margin: 2px 0 6px; padding: 0; line-height: 1.5; }
    body[data-st-page=home] .st-stock-primary .kis-current-price { grid-column: 1; grid-row: 2; justify-self: start; }
    body[data-st-page=home] .st-stock-primary .kis-change { grid-column: 1; grid-row: 3; justify-self: start; }
    body[data-st-page=home] .st-stock-primary .st-quote-basis { grid-column: 1; grid-row: 4; text-align: left; }
    body[data-st-page=home] .st-stock-primary .st-stock-observation { grid-row: 5; }
    body[data-st-page=home] .st-stock-primary .st-stock-details { grid-row: 6; }
    body[data-st-page=home] .st-stock-secondary { padding: 16px; }
    body[data-st-page=home] .video-list { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    body[data-st-page=home] .video-title { font-size: 17px; }
    body[data-st-page=home] .st-market-context { padding: 24px 18px; }
    body[data-st-page=home] .st-market-context h2 { font-size: 23px; }
    body[data-st-page=home] .dashboard-main-title { font-size: 23px; }
    body[data-st-page=briefing] > .container { width: calc(100% - 20px); }
    body[data-st-page=briefing] .header { padding: 28px 8px 24px; }
    body[data-st-page=briefing] .header h1 { font-size: 31px; }
    body[data-st-page=briefing] .briefing-card { padding: 26px 18px; }
    body[data-st-page=briefing] .briefing-header { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
    body[data-st-page=briefing] .briefing-meta { text-align: left; }
    body[data-st-page=briefing] .st-briefing-schedule { grid-template-columns: minmax(0, 1fr); }
    body[data-st-page=bot] .trading-container { width: calc(100% - 24px); margin: 24px auto; }
    body[data-st-page=bot] .trading-header h1 { font-size: 29px; }
    body[data-st-page=bot] .dashboard-card { padding: 22px 18px; }
    body[data-st-page=bot] :where(.st-result-summary, .st-account-workspace, .st-public-scope-grid, .st-supporting-grid, .ops-split) { grid-template-columns: minmax(0, 1fr); }
    body[data-st-page=bot] .st-console-notice { grid-template-columns: minmax(0, 1fr); padding: 20px 18px; }
    body[data-st-page=bot] .st-public-status-line { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    body[data-st-page=bot] .st-state-badge { padding: 12px; }
    body[data-st-page=bot] .st-console-section-heading { display: block; }
    body[data-st-page=bot] .st-console-section-heading p { margin-top: 6px; }
    body[data-st-page=bot] :where(.st-public-scope, .st-supporting-details) > summary span { display: block; margin: 5px 0 0; }
    body[data-st-page=privacy] > .container { width: calc(100% - 24px); }
    body[data-st-page=privacy] .st-policy-layout { display: block; }
    body[data-st-page=privacy] .st-policy-nav { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 20px; padding: 10px; }
    body[data-st-page=privacy] .st-policy-nav p { grid-column: 1 / -1; }
    body[data-st-page=privacy] .st-policy-content { padding: 24px 18px; }
    body[data-st-page=offline] .st-offline-panel { width: calc(100% - 24px); margin: 30px auto; padding: 28px 20px; }
    body[data-st-page=research-export] .research-export { width: calc(100% - 24px); }
    body[data-st-page]:not([data-st-page=trading]) :where(input:not([type=range]), select, textarea) { font-size: 16px !important; }
    body[data-st-page]:not([data-st-page=trading]) .st-chat-docked .st-chat-panel { left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom, 0px)); width: auto; max-height: calc(100dvh - 24px); }
    body[data-st-page]:not([data-st-page=trading]) .st-chat-docked .st-chat-fab { padding: 8px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    body[data-st-page]:not([data-st-page=trading]) *,
    body[data-st-page]:not([data-st-page=trading]) *::before,
    body[data-st-page]:not([data-st-page=trading]) *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
