/* PremierStock — "trend" skin (2026-12). Loaded after styles.css; overrides tokens and surfaces only.
   Direction: quiet neutral surfaces, large tabular numerals, soft rounded cards, one ink accent.
   Red = up, blue = down (KR convention) stay the only saturated colours. Light only for now: the weather-map canvas draws with fixed ink colours. */

:root {
  --paper: #f4f5f7;
  --paper-2: #eceef1;
  --paper-3: #e3e6ea;
  --card: #ffffff;
  --ink: #17191d;
  --ink-2: #333840;
  --mute: #6a7280;
  --mute-2: #98a0ac;
  --rule: rgba(23, 25, 29, .08);
  --rule-strong: rgba(23, 25, 29, .18);
  --ochre: #17191d;                 /* legacy accent slot → ink; hits are shown by weight, not colour */
  --ochre-soft: rgba(23, 25, 29, .06);
  --up: #e5384a;
  --dn: #2f6bea;
  --miss: #98a0ac;
  --up-soft: rgba(229, 56, 74, .10);
  --dn-soft: rgba(47, 107, 234, .10);

  --mono: PremiereSans, 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --latin: var(--sans);
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 24, 32, .04), 0 8px 24px -12px rgba(20, 24, 32, .10);
  --maxw: 1200px;
}


body { line-height: 1.6; letter-spacing: -0.015em; }
body::before { display: none; }              /* paper grain off */
.mono, .data-table, [class*="-val"], [class*="-nums"], .price-amt, time { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
:focus-visible { outline: 2px solid var(--dn); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--dn-soft); }

/* Header: translucent bar, pill nav */
.site-header { background: color-mix(in srgb, var(--paper) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--rule); }
.brand-word { font-weight: 700; font-size: 1.12rem; letter-spacing: -0.03em; }
.brand-tag { font-size: .68rem; font-weight: 600; padding: 3px 7px; border-radius: 6px; background: var(--ochre-soft); color: var(--mute); border: 0; }
.nav a { border-radius: 999px; padding: 7px 12px; font-weight: 500; color: var(--mute); text-decoration: none; transition: background .18s, color .18s; }
.nav a:hover { background: var(--ochre-soft); color: var(--ink); }
.nav a.is-active, .nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.nav a::after, .nav a::before { display: none !important; }
.header-cta, .btn-primary, .search-submit { background: var(--ink); color: var(--paper); border: 0; border-radius: 12px; font-weight: 600; transition: transform .12s var(--ease), opacity .18s; }
.header-cta:hover, .btn-primary:hover, .search-submit:hover { opacity: .88; }
.btn:active, .header-cta:active, .search-submit:active, .chip-btn:active, .tab-btn:active { transform: scale(.97); }
.header-pass, .lang-switch, .btn-outline, .btn-paper, .btn-pill-paper { border: 1px solid var(--rule-strong); border-radius: 12px; background: var(--card); }
.pass-pill { border-radius: 6px; background: var(--ochre-soft); color: var(--ink-2); border: 0; font-weight: 600; }
.clock { color: var(--mute-2); }

/* Type scale */
.hero-title { font-weight: 800; letter-spacing: -0.045em; line-height: 1.12; text-wrap: balance; }
.hero-title em, .hero-title mark, .hero-title .hl { font-style: normal; background: none; color: var(--dn); box-shadow: none; text-decoration: none; }
.hero-lede, .sec-lede { color: var(--mute); text-wrap: pretty; max-width: 62ch; }
.sec-h, .method-title, .contact-title { font-weight: 750; letter-spacing: -0.035em; text-wrap: balance; }
.kicker, .section-tag, .hub-kicker, .proof-kicker, .posture-kicker, .modal-kicker, .paywall-kicker, .passcode-kicker { font-family: var(--sans); font-weight: 600; font-size: .78rem; letter-spacing: 0; text-transform: none; color: var(--mute); }
.section-tag::before, .section-tag::after { display: none; }

/* Cards: one surface language */
.hub-card, .price-card, .proof-card, .basket-card, .msv-card, .doc-card, .wx-card, .meta-card, .ledger-panel, .posture-cell, .cb-item, .quad-item,
.pu-card, .factor-cat-card, .comp-bench-card, .comm-post-card, .comm-composer-card, .ticker-poll-card, .dossier-card, .verdict-box, .prob-box,
.alloc-box, .paywall-box, .ai-box, .consent-box, .cycle-step, .work-item, .bulletin-surface, .dossier-chart-box, .msv-short-box {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.posture-cell, .cb-item, .quad-item, .prob-box, .cycle-step, .factor-cat-card, .msv-short-box, .alloc-box { border-radius: var(--r-md); box-shadow: none; }
.hub-card, .cb-item, .msv-card, .comm-post-card { transition: transform .2s var(--ease), border-color .2s; }
.hub-card:hover, .cb-item:hover, .msv-card:hover { transform: translateY(-2px); border-color: var(--rule-strong); }
.posture-signboard, .cycle-board, .proof-board { background: transparent; border: 0; }

/* Search: the primary action */
.search-bar { background: var(--card); border: 1px solid var(--rule-strong); border-radius: 16px; box-shadow: var(--shadow); padding: 6px; }
.search-bar:focus-within { border-color: var(--ink); }
.search-bar input { background: transparent; border: 0; outline: 0; }
.search-dropdown { background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-md); box-shadow: 0 16px 40px -16px rgba(20, 24, 32, .28); }
.chip-btn, .chip-link, .comm-hot-chip, .code-chip { background: var(--card); border: 1px solid var(--rule); border-radius: 999px; font-weight: 500; transition: background .18s, border-color .18s; }
.chip-btn:hover, .chip-link:hover { border-color: var(--rule-strong); background: var(--paper-2); }

/* Pills, tabs, badges */
.pill, .hub-pill, .msv-badge, .badge-mini, .safety-tag, .lock-tag, .pu-tag, .vat-tag, .comm-stance-tag, .msv-kind-chip { border-radius: 7px; border: 0; background: var(--ochre-soft); color: var(--ink-2); font-family: var(--sans); font-weight: 600; letter-spacing: 0; }
.pill-warn, .msv-b-warn { background: var(--up-soft); color: var(--up); }
.pill-accent, .msv-b-info { background: var(--dn-soft); color: var(--dn); }
.filter-tabs { background: var(--paper-2); border: 0; border-radius: 12px; padding: 4px; gap: 2px; }
.tab-btn { border: 0; border-radius: 9px; background: transparent; color: var(--mute); font-weight: 600; transition: background .18s, color .18s; }
.tab-btn.active, .tab-btn.is-active, .tab-btn[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 24, 32, .12); }

/* Direction colour as soft tint, never as full blocks */
.is-up, .verdict-up, .lg-up, .msv-pos { color: var(--up); }
.is-dn, .verdict-down, .lg-dn, .msv-neg { color: var(--dn); }
.verdict-up { background: var(--up-soft); border-color: transparent; }
.verdict-down { background: var(--dn-soft); border-color: transparent; }
.stamp, .wx-stamp { border-radius: var(--r-sm); border-width: 1px; transform: none; font-family: var(--sans); background: var(--card); box-shadow: var(--shadow); }
.bar-track, .factor-bar-bg, .tp-bar, .ps-bar, .alloc-bar, .msv-ex-track { border-radius: 999px; background: var(--paper-2); overflow: hidden; border: 0; }

/* Tables */
.data-table { border-collapse: separate; border-spacing: 0; }
.data-table th { font-family: var(--sans); font-size: .78rem; font-weight: 600; color: var(--mute); text-transform: none; letter-spacing: 0; background: transparent; border-bottom: 1px solid var(--rule); }
.data-table td { border-bottom: 1px solid var(--rule); }
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: var(--ochre-soft); }
.table-scroll { border-radius: var(--r-md); }

/* Banners and overlays */
.passcode-banner, .mode-banner, .legal-banner, .safety-banner, .sample-ribbon, .comm-clean-banner, .msv-feat-banner { background: var(--paper-2); color: var(--ink-2); border: 0; border-radius: 0; }
.safety-banner, .comm-clean-banner, .msv-feat-banner { border-radius: var(--r-md); }
.modal-backdrop { background: rgba(10, 12, 16, .5); backdrop-filter: blur(6px); }
.modal-panel { background: var(--card); border: 1px solid var(--rule); border-radius: 24px; box-shadow: 0 32px 80px -24px rgba(10, 12, 16, .5); }
.toast { border-radius: 12px; background: var(--ink); color: var(--paper); border: 0; }
.mobile-menu { background: var(--paper); }
.loading-line { background: linear-gradient(90deg, var(--paper-2), var(--paper-3), var(--paper-2)); background-size: 200% 100%; animation: tr-shimmer 1.2s linear infinite; border-radius: 8px; color: transparent; }
@keyframes tr-shimmer { to { background-position: -200% 0; } }

/* Pricing */
.price-card { padding-bottom: 28px; }
.price-amt { font-weight: 800; letter-spacing: -0.04em; }

/* Footer */
.site-footer { background: var(--paper-2); color: var(--mute); border-top: 1px solid var(--rule); }
.site-footer a { color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Posture board: no dark strip inside a light page */
.posture-head { background: transparent; color: var(--ink); border: 0; padding-inline: 4px; }
.posture-head a, .posture-jump { color: var(--ink-2); background: var(--card); border: 1px solid var(--rule); border-radius: 999px; }
.posture-live-dot { background: var(--up); box-shadow: 0 0 0 4px var(--up-soft); }

/* Legacy ochre / cream / dark-block leftovers that bypass tokens */
.hero-title em, .contact-title em { background: none; color: var(--dn); text-decoration: none; }
.manifesto-text strong { box-shadow: inset 0 -0.3em 0 var(--dn-soft); }
.js .manifesto-text .word { color: var(--mute-2); }
.msv-card.is-featured { border: 1px solid var(--ink); box-shadow: var(--shadow); }
.comp-bench-row-us td { background: var(--ochre-soft) !important; }
.price-card.featured { background: var(--card); border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink), var(--shadow); }
.cb-item.is-held, .hub-card.is-pro-hub { background: var(--card); border-color: var(--rule-strong); }
.cb-item.is-broken { background: var(--card); }
.passcode-banner { border-bottom: 1px solid var(--rule); }
.passcode-kicker { background: var(--ink); color: var(--paper); border-radius: 6px; padding: 3px 8px; }
.passcode-banner .code-chip { border: 1px solid var(--rule-strong); border-radius: 8px; background: var(--card); color: var(--ink); font-weight: 600; }
.passcode-sub { color: var(--mute); }
.passcode-banner .btn-outline { color: var(--ink); border-color: var(--rule-strong); background: var(--card); }
.tab-btn.active .mono { color: var(--up); }
.kicker .mono, .cycle-no { background: var(--ochre-soft); color: var(--ink-2); border-radius: 6px; }
.contact { background: var(--paper-2); color: var(--ink); }
.contact .section-tag, .contact-note { color: var(--mute); }
.contact .section-tag .mono { color: var(--ink-2); border-color: var(--rule-strong); }
.btn-ghost-light { color: var(--ink); border-color: var(--rule-strong); }
.btn { border-radius: 12px; }
.btn:hover { background: var(--ink); color: var(--paper); }
.pu-tag { width: fit-content; }

/* standalone doc pages (legal_pages.py): footer had no container, so it ran edge to edge */
.doc-body .site-footer > :not(.sec-inner) { max-width: 1040px; margin-inline: auto; padding-inline: 20px; }

/* ───────── Home first view (2026-12 rev 3): dark "control room" hero, trust block, closing CTA ─────────
   The dark surfaces re-point the colour tokens locally, so every child (search, chips, map card,
   posture board) follows without per-component overrides. */
.hero, html[data-page="home"] .site-header, html[data-page="home"] .passcode-banner, .cta-band {
  --paper: #0b0e13; --paper-2: #131821; --paper-3: #1a212c; --card: #131821;
  --ink: #f4f6f9; --ink-2: #cdd3dc; --mute: #929bab; --mute-2: #6d7686;
  --rule: rgba(255, 255, 255, .09); --rule-strong: rgba(255, 255, 255, .2);
  --ochre: #f4f6f9; --ochre-soft: rgba(255, 255, 255, .07);
  --dn: #6b9bff; --dn-soft: rgba(107, 155, 255, .14); --up: #ff6473; --up-soft: rgba(255, 100, 115, .14);
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 24px 60px -30px rgba(0, 0, 0, .8);
  color: var(--ink);
}
html[data-page="home"] .site-header { background: rgba(11, 14, 19, .78); }
html[data-page="home"] .passcode-banner { background: #131821; border-color: var(--rule); }
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background:
    radial-gradient(880px 520px at 80% 22%, rgba(47, 107, 234, .30), transparent 64%),
    radial-gradient(640px 420px at 4% 100%, rgba(229, 56, 74, .07), transparent 62%),
    #0b0e13;
  padding-bottom: clamp(44px, 6vw, 84px);
}
.hero::before {                                   /* faint isobar grid, fades toward the copy */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 75% 30%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 75% 30%, #000 10%, transparent 70%);
}
.hero-title { font-size: clamp(2.4rem, 1rem + 3.9vw, 4.3rem); letter-spacing: -0.05em; line-height: 1.12; }
.hero-title .line-in { text-wrap: balance; }
@media (min-width: 1021px) { .hero-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); } }
.posture-signboard, .cycle-board { box-shadow: none; }
.hero .posture-signboard { background: transparent; border: 0; }
.hero-lede { font-size: 1.08rem; color: var(--ink-2); }
.hero .kicker .mono { background: var(--dn-soft); color: var(--dn); }
.hero .search-bar { background: #fff; border: 0; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 18px 50px -18px rgba(47, 107, 234, .55); }
.hero .search-bar input { color: #17191d; }
.hero .search-bar input::placeholder { color: #8a92a0; }
.hero .search-submit { background: #2f6bea; color: #fff; }
.hero .wx-card { background: rgba(19, 24, 33, .72); border: 1px solid var(--rule); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hero .wx-map { filter: invert(1) hue-rotate(180deg); }   /* canvas draws fixed ink-on-paper colours; flip them for the dark stage */
.hero .wx-stage::before { display: none; }

/* Trust block */
.tr-sec { padding: clamp(56px, 8vw, 112px) 0 clamp(36px, 5vw, 64px); }
.tr-sec .sec-inner { width: min(var(--maxw), 100% - var(--gutter) * 2); margin-inline: auto; }
.tr-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 20px 56px; align-items: end; }
.tr-kicker { margin: 0 0 14px; font-size: .82rem; font-weight: 600; color: var(--dn); }
.tr-title { margin: 0; font-size: clamp(1.9rem, 1rem + 2.6vw, 3.2rem); font-weight: 800; letter-spacing: -0.045em; line-height: 1.15; white-space: pre-line; text-wrap: balance; }
.tr-lede { margin: 0; color: var(--mute); font-size: 1.02rem; line-height: 1.7; max-width: 46ch; text-wrap: pretty; }
.tr-lede a { display: inline-block; margin-top: 14px; color: var(--ink); font-weight: 650; text-decoration: none; border-bottom: 1.5px solid var(--ink); }
.tr-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: clamp(32px, 4.5vw, 60px) 0 0; border-top: 1.5px solid var(--ink); }
.tr-stats > div { padding: 22px 22px 6px 0; }
.tr-stats > div + div { padding-left: 22px; border-left: 1px solid var(--rule); }
.tr-stats dd { margin: 0; font-size: clamp(2.3rem, 1.2rem + 2.9vw, 3.9rem); font-weight: 800; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.tr-stats dd small { margin-left: 4px; font-size: .32em; font-weight: 650; letter-spacing: -0.01em; color: var(--mute); }
.tr-stats dt { margin: 12px 0 0; color: var(--mute); font-size: .9rem; line-height: 1.55; max-width: 24ch; }
.tr-steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: clamp(36px, 5vw, 64px) 0 0; padding: 0; }
.tr-steps li { counter-increment: s; padding: 24px 24px 26px; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.tr-steps li::before { content: "0" counter(s); display: block; margin-bottom: 18px; font-size: .8rem; font-weight: 700; color: var(--dn); font-variant-numeric: tabular-nums; }
.tr-steps h3 { margin: 0 0 8px; font-size: 1.12rem; font-weight: 750; letter-spacing: -0.03em; }
.tr-steps p { margin: 0; color: var(--mute); font-size: .93rem; line-height: 1.65; }
.tr-assure { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; }
.tr-assure li { padding: 7px 12px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); font-size: .82rem; font-weight: 550; }

/* Closing CTA */
.cta-sec { padding: 0 0 clamp(56px, 7vw, 96px); }
.cta-band {
  width: min(var(--maxw), 100% - var(--gutter) * 2); margin-inline: auto; padding: clamp(32px, 5vw, 64px);
  border-radius: 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap;
  background: radial-gradient(620px 320px at 88% 0%, rgba(47, 107, 234, .34), transparent 66%), #0b0e13;
}
.cta-band h2 { margin: 0; font-size: clamp(1.6rem, 1rem + 2vw, 2.6rem); font-weight: 800; letter-spacing: -0.045em; line-height: 1.18; }
.cta-band p { margin: 10px 0 0; color: var(--ink-2); max-width: 44ch; }
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cta-actions a, .cta-actions button { padding: 15px 22px; border-radius: 14px; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; transition: transform .12s, opacity .18s; }
.cta-actions button { background: #2f6bea; color: #fff; border: 0; }
.cta-actions a { color: var(--ink); border: 1px solid var(--rule-strong); }
.cta-actions :is(a, button):hover { opacity: .88; }
.cta-actions :is(a, button):active { transform: scale(.97); }

@media (max-width: 860px) {
  .tr-head { grid-template-columns: minmax(0, 1fr); }
  .tr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tr-stats > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .tr-stats > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .tr-steps { grid-template-columns: minmax(0, 1fr); }
  .cta-actions, .cta-actions :is(a, button) { width: 100%; text-align: center; }
}

/* ───────── Add-on blocks rendered by ps-extras.js ───────── */
/* Report: health grades + key points */
.hx-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 40px; margin: 20px 0 6px; padding: 22px 24px; background: var(--paper); border-radius: var(--r-md); }
.hx-card h3 { margin: 0 0 12px; font-size: .86rem; font-weight: 700; color: var(--mute); }
.hx-card h3.hx-bad { margin-top: 18px; }
.hx-grades, .hx-tips { list-style: none; margin: 0; padding: 0; }
.hx-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 3.2em; align-items: center; gap: 12px; padding: 7px 0; font-size: .94rem; }
.hx-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.hx-bar i { height: 8px; border-radius: 3px; background: var(--paper-3); }
.hx-row .hx-bar i.on { background: var(--ink); }
.hx-row[data-s="1"] .hx-bar i.on, .hx-row[data-s="2"] .hx-bar i.on { background: var(--mute-2); }
.hx-word { font-weight: 700; text-align: right; font-size: .88rem; }
.hx-row[data-s="1"] .hx-word, .hx-row[data-s="2"] .hx-word { color: var(--mute); }
.hx-foot { margin: 10px 0 0; font-size: .78rem; color: var(--mute-2); }
.hx-tips li { position: relative; padding: 4px 0 4px 18px; font-size: .94rem; line-height: 1.5; }
.hx-tips li::before { content: ""; position: absolute; left: 2px; top: .82em; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.hx-bad + .hx-tips li::before { background: transparent; box-shadow: inset 0 0 0 2px var(--mute); }
.hx-tips .hx-none { color: var(--mute-2); }
.hx-tips .hx-none::before { display: none; }

/* Signals: ranking lists */
.rk-sec { padding: 0 0 clamp(48px, 6vw, 88px); }
.rk-sec .sec-inner { width: min(var(--maxw), 100% - var(--gutter) * 2); margin-inline: auto; }
.rk-head { display: flex; justify-content: space-between; align-items: end; gap: 16px 32px; flex-wrap: wrap; padding-top: clamp(28px, 4vw, 48px); border-top: 1px solid var(--rule); }
.rk-head h2 { margin: 0; font-size: clamp(1.4rem, 1rem + 1.4vw, 2rem); font-weight: 800; letter-spacing: -0.04em; }
.rk-head p { margin: 8px 0 0; color: var(--mute); font-size: .92rem; max-width: 60ch; }
.rk-tabs { display: flex; gap: 4px; padding: 4px; background: var(--paper-2); border-radius: 12px; }
.rk-tabs button { padding: 8px 16px; border: 0; border-radius: 9px; background: transparent; font: inherit; font-weight: 600; color: var(--mute); cursor: pointer; }
.rk-tabs button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.rk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.rk-col { padding: 22px 22px 12px; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.rk-col h3 { margin: 0; font-size: 1.08rem; font-weight: 750; letter-spacing: -0.03em; }
.rk-sub { margin: 4px 0 10px; color: var(--mute); font-size: .84rem; }
.rk-list { list-style: none; margin: 0; padding: 0; }
.rk-list li + li { border-top: 1px solid var(--rule); }
.rk-list li > a, .rk-list li.rk-locked { display: grid; grid-template-columns: 1.6em minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 4px; color: inherit; text-decoration: none; }
.rk-list li > a:hover { background: var(--paper); border-radius: 8px; }
.rk-n { color: var(--mute-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.rk-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-name small, .rk-pct small { margin-left: 6px; font-weight: 500; color: var(--mute-2); font-size: .78em; }
.rk-pct { font-weight: 750; font-variant-numeric: tabular-nums; }
.rk-pct.is-dn { color: var(--dn); } .rk-pct.is-up { color: var(--up); }
.rk-locked { color: var(--mute-2); }
.rk-locked .rk-pct { color: var(--mute-2); }
.rk-lock-note { margin: 14px 0 0; color: var(--mute); font-size: .88rem; }
.rk-lock-note a { color: var(--ink); font-weight: 650; }

/* Baskets: live record */
.bh-wrap:not(:empty) { margin-top: clamp(28px, 4vw, 48px); }
.bh-head h3 { margin: 0; font-size: clamp(1.3rem, 1rem + 1.2vw, 1.8rem); font-weight: 800; letter-spacing: -0.04em; }
.bh-head p { margin: 8px 0 0; color: var(--mute); font-size: .92rem; max-width: 70ch; }
.bh-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.bh-card { padding: 22px; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.bh-card h4 { margin: 0; font-size: 1rem; font-weight: 750; letter-spacing: -0.03em; line-height: 1.4; }
.bh-card h5 { margin: 18px 0 8px; font-size: .8rem; font-weight: 700; color: var(--mute); }
.bh-since { margin: 6px 0 14px; color: var(--mute); font-size: .82rem; }
.bh-wait { margin: 0; padding: 14px; border-radius: 10px; background: var(--paper); color: var(--mute); font-size: .86rem; }
.bh-spark { display: block; width: 100%; height: 72px; }
.bh-spark path { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.bh-spark .nv { stroke: var(--ink); } .bh-spark .bn { stroke: var(--mute-2); stroke-dasharray: 3 3; }
.bh-nums { display: flex; gap: 24px; margin: 10px 0 0; }
.bh-nums dt { color: var(--mute); font-size: .78rem; } .bh-nums dd { margin: 2px 0 0; font-weight: 800; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.bh-chg { list-style: none; margin: 0; padding: 0; font-size: .86rem; }
.bh-chg li { display: grid; grid-template-columns: 3.2em minmax(0, 1fr) auto; gap: 8px; padding: 6px 0; border-top: 1px solid var(--rule); }
.bh-chg time { color: var(--mute-2); } .bh-chg b { font-variant-numeric: tabular-nums; }

@media (max-width: 860px) {
  .hx-card, .rk-grid, .bh-grid { grid-template-columns: minmax(0, 1fr); }
  .hx-row { grid-template-columns: minmax(0, 1fr) 96px 3.2em; }
}

/* Print = just the open stock report (the "PDF 저장" button calls window.print) */
@media print {
  body > :not(main), main > :not(#stock-report-container), .dossier-actions, .paywall-box, #stock-report-container .btn { display: none !important; }
  html, body, main { background: #fff !important; }
  #stock-report-container { display: block !important; margin: 0; padding: 0; }
  .dossier-card { box-shadow: none !important; border: 0 !important; padding: 0 !important; max-width: none !important; }
  .hx-card, .dossier-card section, .dossier-card svg { break-inside: avoid; }
  @page { margin: 14mm; }
}
@media (max-width:640px){.dossier-topbar{flex-wrap:wrap;row-gap:8px}.dossier-topbar .dossier-serial{flex:1 0 100%}}

/* Condition search and holdings check-up */
.sc-form { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end; margin-top: 22px; }
.sc-form label { display: grid; gap: 6px; font-size: .84rem; font-weight: 600; color: var(--mute); }
.sc-form select, .pf-form input { min-height: 44px; padding: 0 14px; border: 1px solid var(--rule); border-radius: 12px; background: var(--card); font: inherit; color: var(--ink); }
.sc-form .sc-chk { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink); cursor: pointer; }
.sc-chk input { width: 18px; height: 18px; accent-color: var(--ink); }
.pf-form { display: flex; gap: 10px; margin-top: 22px; }
.pf-form input { flex: 1 1 auto; min-width: 0; }
.sc-out { margin-top: 18px; }
.sc-msg { margin: 0; padding: 18px 20px; background: var(--paper); border-radius: var(--r-md); color: var(--mute); font-size: .94rem; }
.sc-count { margin: 0 0 12px; color: var(--mute); } .sc-count b { color: var(--ink); font-size: 1.3rem; font-weight: 800; margin-right: 2px; }
.sc-scroll { overflow-x: auto; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.sc-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: .94rem; }
.sc-table th { padding: 14px 16px; text-align: left; font-size: .8rem; font-weight: 650; color: var(--mute); white-space: nowrap; }
.sc-table td { padding: 12px 16px; border-top: 1px solid var(--rule); }
.sc-table .hx-bar { width: 96px; }
.sc-table td .hx-bar i.on { background: var(--ink); }
.sc-table td[data-s="1"] .hx-bar i.on, .sc-table td[data-s="2"] .hx-bar i.on { background: var(--mute-2); }
.sc-name { font-weight: 650; white-space: nowrap; } .sc-name a { color: inherit; text-decoration: none; } .sc-name a:hover { text-decoration: underline; }
.sc-name small { margin-left: 6px; font-weight: 500; color: var(--mute-2); font-size: .78em; }
.pf-avg td { background: var(--paper); font-variant-numeric: tabular-nums; }
.pf-notes { margin: 0 0 14px; }
@media (max-width: 640px) { .sc-form label { flex: 1 1 calc(50% - 8px); } .sc-form .sc-chk { flex-basis: 100%; } .pf-form { flex-direction: column; } }

/* Health radar (report card and holdings check-up) */
.hx-body { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 20px; align-items: center; }
.hx-radar { width: 112px; height: 112px; flex: none; }
.hx-radar .rg { fill: none; stroke: var(--rule-strong); stroke-width: 1; }
.hx-radar .rv { fill: color-mix(in srgb, var(--dn) 22%, transparent); stroke: var(--dn); stroke-width: 2; stroke-linejoin: round; }
.pf-sum { display: flex; gap: 20px; align-items: center; margin-bottom: 14px; } .pf-sum .pf-notes { margin: 0; }
@media (max-width: 640px) { .hx-body { grid-template-columns: minmax(0, 1fr); justify-items: center; } .hx-body .hx-grades { width: 100%; } }

/* price maths on a brokerage key is owner-only: hidden unless <html class="owner"> */
html:not(.owner) [id*="byok"], html:not(.owner) [class*="byok"], html:not(.owner) .owner-only { display: none !important; }
