* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; background: var(--canvas); }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(850px 520px at 5% -12%, color-mix(in srgb, var(--color-accent) 18%, transparent), transparent 70%),
    radial-gradient(650px 440px at 100% 17%, color-mix(in srgb, var(--color-accent) 16%, transparent), transparent 72%),
    linear-gradient(180deg, #fbfdff 0, var(--canvas) 37rem, #f9fbff 100%);
  font-family:
    "Manrope",
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    sans-serif;
  font-feature-settings: "tnum" 1, "ss01" 1;
  line-height: 1.45;
}

button, input, select { font: inherit; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell { width: min(1200px, calc(100% - 48px)); margin: 0 auto; padding-bottom: 26px; }
.topbar {
  display: grid;
  grid-template-columns: minmax(175px, 1fr) auto minmax(245px, 1fr);
  align-items: center;
  min-height: 60px;
  gap: 20px;
  border-bottom: 1px solid rgba(209, 221, 239, 0.74);
}
.home-topbar {
  grid-template-columns: minmax(175px, 1fr) auto max-content;
}
.brand { display: inline-flex; gap: 9px; align-items: center; width: fit-content; color: var(--blue); text-decoration: none; }
.brand strong { font-size: 15px; font-weight: 720; letter-spacing: -0.045em; }
.brand-mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-accent-border);
  border-radius: 10px;
  background: linear-gradient(145deg, #f9fcff, #e7f0ff);
  box-shadow: 0 5px 14px color-mix(in srgb, var(--color-accent) 10%, transparent);
}
.brand-mark svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.topnav { display: flex; align-items: center; justify-content: center; gap: 4px; }
.topnav a { padding: 6px 10px; border-radius: 7px; color: #708099; font-size: 11px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: color 160ms var(--ease-out), background-color 160ms var(--ease-out), transform 140ms var(--ease-out); }
.topnav a:first-child { color: var(--blue); background: var(--blue-soft); }
.home-nav a:first-child { color: #708099; background: transparent; }
.topnav a:active { transform: scale(0.97); }
.topbar-actions { display: flex; min-width: 0; justify-content: flex-end; align-items: center; gap: 9px; }
.live-status { display: inline-flex; gap: 7px; align-items: center; color: #5f708b; font-size: 10px; font-weight: 650; white-space: nowrap; }
.live-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--color-accent); box-shadow: 0 0 0 4px var(--color-accent-soft); }
.live-status.live i { background: var(--color-accent); box-shadow: 0 0 0 4px var(--color-accent-soft); }
.live-status.cached i { background: #8b98aa; box-shadow: 0 0 0 4px rgba(139, 152, 170, 0.14); }
.connection-state {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 650;
  color: #5f708b;
  background: rgba(231, 240, 255, 0.6);
  border: 1px solid rgba(215, 229, 250, 0.8);
  white-space: nowrap;
  transition: color 200ms var(--ease-out), background-color 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
.connection-state[data-status="live"] {
  color: var(--color-accent-hover);
  background: var(--color-accent-soft);
  border-color: var(--color-accent-border);
}
.connection-state[data-status="reconnecting"],
.connection-state[data-status="paused"] {
  color: var(--color-text-secondary);
  background: var(--color-surface-secondary);
  border-color: var(--color-border);
}
.retry-banner {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 16px;
  margin: 12px auto 0;
  max-width: 1280px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-accent-soft), color-mix(in srgb, var(--color-accent) 4%, transparent));
  border: 1px solid var(--color-accent-border);
  color: var(--color-accent-hover);
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--color-accent) 12%, transparent);
}
.retry-banner[hidden] { display: none; }
.retry-banner i {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-accent-soft);
  color: var(--color-accent-hover);
  font-style: normal;
  font-weight: 700;
  font-size: 13px;
}
.retry-banner-copy { flex: 1 1 auto; min-width: 0; }
.retry-banner-copy strong { display: block; font-weight: 650; }
.retry-banner-copy small { color: var(--color-text-secondary); font-size: 12px; }
.retry-banner-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.retry-banner button {
  border: 1px solid var(--color-accent-border);
  background: rgba(255, 255, 255, 0.7);
  color: var(--color-accent-hover);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out);
}
.retry-banner button:hover { background: rgba(255, 255, 255, 0.95); }
.retry-banner button.primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-contrast);
}
.retry-banner button.primary:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); }
.chart-header-titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chart-freshness {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--faint);
  font-weight: 550;
  white-space: nowrap;
}
.chart-freshness::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #8b98aa;
  box-shadow: 0 0 0 2px rgba(139, 152, 170, 0.14);
}
.chart-freshness[data-fresh="fresh"]::before { background: var(--color-accent); box-shadow: 0 0 0 2px var(--color-accent-soft); }
.chart-freshness[data-fresh="stale"]::before { background: var(--color-text-tertiary); box-shadow: 0 0 0 2px var(--color-surface-secondary); }
.chart-freshness[data-fresh="expired"] { color: var(--color-text-secondary); }
.chart-freshness[data-fresh="expired"]::before { background: var(--color-text-secondary); box-shadow: 0 0 0 2px var(--color-surface-secondary); }
.chart-freshness[data-fresh="unknown"] { opacity: 0.7; }
.updated-at { color: var(--faint); font-size: 10px; white-space: nowrap; }
.account-link {
  display: inline-flex;
  max-width: 190px;
  align-items: center;
  padding: 6px 9px;
  overflow: hidden;
  border: 1px solid #d7e5fa;
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
  color: #617694;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: border-color 160ms var(--ease-out), color 160ms var(--ease-out), background-color 160ms var(--ease-out);
}
.account-link.authenticated { border-color: #d7eadf; background: #f2fbf7; color: #267255; }

main { padding-top: 24px; }
.card { border: 0; background: rgba(255, 255, 255, 0.94); box-shadow: var(--shadow-soft); }
.market-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(390px, 0.85fr); min-height: 176px; overflow: hidden; border-radius: 20px; background: linear-gradient(135deg, #fff 0%, #f7faff 100%); }
.market-hero::before { position: absolute; z-index: 1; top: 0; right: 0; left: 0; height: 3px; background: linear-gradient(90deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 8%, transparent) 58%, transparent); content: ""; }
.market-hero::after { position: absolute; right: -88px; bottom: -158px; width: 280px; height: 280px; border: 28px solid color-mix(in srgb, var(--color-accent) 5%, transparent); border-radius: 50%; content: ""; pointer-events: none; }
.market-hero-main { position: relative; z-index: 1; padding: 23px 27px 24px; }
.card-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.instrument-heading { display: inline-flex; gap: 11px; align-items: center; color: #63738c; }
.instrument-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--color-accent); box-shadow: 0 0 0 4px var(--color-accent-soft); }
.instrument-copy { display: grid; gap: 1px; }
.instrument-copy strong { color: #425875; font-size: 14px; font-weight: 740; letter-spacing: -0.025em; }
.instrument-copy small { color: var(--faint); font-size: 9px; font-weight: 560; }
.source-badge, .engine-badge {
  display: inline-flex;
  padding: 3px 6px;
  border: 1px solid #dce8fa;
  border-radius: 5px;
  background: #f4f8ff;
  color: #6680ad;
  font-size: 8px;
  font-weight: 780;
  letter-spacing: 0.065em;
  white-space: nowrap;
}
.source-badge.live, .engine-badge.ai { border-color: var(--color-accent-border); background: var(--color-accent-soft); color: var(--color-accent-hover); }
.engine-badge.rules { border-color: #e1e6ee; background: #f7f9fc; color: #7b899e; }
.price-row { display: flex; gap: 12px; align-items: end; margin-top: 25px; }
.price-row > strong { min-width: 7ch; color: var(--ink-strong); font-size: clamp(42px, 4.3vw, 56px); font-variant-numeric: tabular-nums; font-weight: 620; letter-spacing: -0.065em; line-height: 0.95; }
.price-context { display: grid; gap: 1px; padding-bottom: 2px; }
.price-context b { color: #71829c; font-size: 10px; font-weight: 720; }
.price-context small { color: var(--faint); font-size: 9px; }
.reference-price { display: flex; gap: 7px; align-items: baseline; margin-top: 13px; color: #71829c; }
.reference-price[hidden] { display: none; }
.reference-price > span { font-size: 10px; font-weight: 650; }
.reference-price > strong { color: #4d6381; font-size: 18px; font-weight: 700; letter-spacing: -0.025em; }
.reference-price > b { color: #71829c; font-size: 10px; font-weight: 700; }
.reference-price > small { margin-left: 4px; color: var(--faint); font-size: 9px; }
.quote-source-detail { max-width: 630px; margin: 10px 0 0; color: #7f8ea4; font-size: 10px; line-height: 1.5; }
.market-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-left: 1px solid var(--line); background: rgba(246, 250, 255, 0.7); }
.market-stat { display: flex; min-width: 0; flex-direction: column; justify-content: center; padding: 24px 17px; }
.market-stat + .market-stat { border-left: 1px solid var(--line); }
.market-stat span { color: #8998ad; font-size: 9px; font-weight: 620; white-space: nowrap; }
.market-stat strong { min-width: 7ch; margin-top: 7px; overflow: hidden; color: #425875; font-size: clamp(15px, 1.5vw, 19px); font-variant-numeric: tabular-nums; font-weight: 650; letter-spacing: -0.035em; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.market-stat strong.up { color: var(--up); }
.market-stat strong.down { color: var(--down); }
.market-stat strong.neutral { color: var(--neutral-deep); }

.dashboard-grid, .intelligence-grid { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(300px, 0.78fr); gap: 12px; margin-top: 12px; }
.dashboard-grid { align-items: start; }
.intelligence-grid { grid-template-areas: "news technical"; align-items: start; }
.news-column { display: grid; min-width: 0; grid-area: news; gap: 12px; align-content: start; }
.news-card { grid-area: auto; }
.technical-column { position: sticky; top: 12px; display: grid; grid-area: technical; gap: 12px; }
.card { overflow: hidden; border-radius: 18px; }
.chart-card { display: flex; min-height: 0; align-self: start; flex-direction: column; padding: 21px 23px 17px; }
.card-header { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; }
.card-header h2 { margin: 0; color: #304663; font-size: 16px; font-weight: 700; letter-spacing: -0.035em; }
.chart-header { align-items: center; }
.range-tabs { display: flex; gap: 2px; align-items: center; padding: 3px; border: 1px solid #e1e9f4; border-radius: 8px; background: #f8fbff; }
.range-tabs button { min-width: 42px; padding: 5px 6px; border: 0; border-radius: 5px; background: transparent; color: #8391a8; cursor: pointer; font-size: 10px; transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), box-shadow 160ms var(--ease-out), transform 140ms var(--ease-out); }
.range-tabs button[aria-selected="true"] { background: var(--color-accent); color: var(--color-accent-contrast); box-shadow: 0 3px 8px color-mix(in srgb, var(--color-accent) 20%, transparent); font-weight: 760; }
.range-tabs button:active { transform: scale(0.96); }
.range-tabs button.pro-locked { color: var(--color-accent-hover); background: var(--color-accent-soft); }
.range-tabs button.pro-locked::after { margin-left: 2px; content: "Pro"; font-size: 7px; font-weight: 800; vertical-align: super; }
.pro-inline-gate { display: block; padding: 10px 12px; border: 1px solid var(--color-accent-border); border-radius: 8px; color: var(--color-accent-hover); background: var(--color-accent-soft); font-size: 11px; font-weight: 720; text-align: center; text-decoration: none; transition: transform 140ms var(--ease-out); }
.pro-inline-gate:active { transform: scale(0.97); }
.pro-inline-gate:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 2px; }
.chart-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 13px; color: #94a1b4; font-size: 10px; }
.chart-meta-divider { width: 3px; height: 3px; flex: 0 0 auto; border-radius: 50%; background: #b4c0d1; }
.chart-wrap { position: relative; min-width: 0; min-height: 0; height: auto; aspect-ratio: 920 / 358; flex: 0 0 auto; margin-top: 10px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; border: 1px solid #edf2f8; border-radius: 13px; background: transparent; scrollbar-width: none; touch-action: pan-x; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.chart-wrap * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.chart-wrap::-webkit-scrollbar { display: none; }
.chart-wrap:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 2px; }
.chart-canvas { position: relative; min-width: 100%; height: 100%; }
.chart-y-axis { position: sticky; top: 0; left: 0; z-index: 3; display: block; height: 100%; overflow: visible; background: linear-gradient(90deg, #fff 76%, rgba(255, 255, 255, 0)); pointer-events: none; }
.chart-scrollbar { display: flex; align-items: center; height: 18px; padding: 5px 7px 0; }
.chart-scrollbar[hidden] { display: none; }
.chart-scrollbar input { width: 100%; height: 13px; margin: 0; appearance: none; background: transparent; cursor: ew-resize; }
.chart-scrollbar input::-webkit-slider-runnable-track { height: 5px; border-radius: 999px; background: #e5edf7; }
.chart-scrollbar input::-webkit-slider-thumb { width: 56px; height: 9px; margin-top: -2px; appearance: none; border: 0; border-radius: 999px; background: #9eafc6; box-shadow: 0 1px 4px rgba(65, 87, 119, 0.18); }
.chart-scrollbar input::-moz-range-track { height: 5px; border: 0; border-radius: 999px; background: #e5edf7; }
.chart-scrollbar input::-moz-range-thumb { width: 56px; height: 9px; border: 0; border-radius: 999px; background: #9eafc6; box-shadow: 0 1px 4px rgba(65, 87, 119, 0.18); }
#candle-chart { position: absolute; inset: 0; display: block; width: 100%; min-height: 0; height: 100%; overflow: hidden; touch-action: none; -webkit-user-drag: none; }
#candle-chart [data-candle] { transition: opacity 100ms ease, filter 100ms ease; }
#candle-chart [data-candle].selected { filter: drop-shadow(0 0 2px rgba(26, 73, 143, 0.55)); opacity: 1; }
#candle-chart [data-candle].selected line { stroke-width: 1.35; }
#candle-chart [data-candle].selected rect { stroke: rgba(255, 255, 255, 0.82); stroke-width: 0.65; }
.chart-skeleton { position: absolute; inset: 0; display: flex; gap: 7px; align-items: end; padding: 24px 44px 41px; pointer-events: none; }
.chart-skeleton span { flex: 1; height: 42%; border-radius: 4px 4px 1px 1px; background: linear-gradient(90deg, #eef5ff, #dceaff, #eef5ff); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.chart-skeleton span:nth-child(2) { height: 70%; }.chart-skeleton span:nth-child(3) { height: 53%; }.chart-skeleton span:nth-child(4) { height: 82%; }.chart-skeleton span:nth-child(5) { height: 58%; }
.chart-wrap.ready .chart-skeleton { visibility: hidden; opacity: 0; transition: opacity 180ms var(--ease-out), visibility 180ms var(--ease-out); }
.chart-message { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 24px; color: #71829a; font-size: 12px; text-align: center; }
.chart-message.error { color: #a45555; }
.chart-message .chart-message-retry { display: block; margin: 10px auto 0; padding: 7px 16px; border: 1px solid #d9e3f1; border-radius: 8px; background: #fff; color: var(--blue); font-size: 12px; font-weight: 650; cursor: pointer; transition: background-color 160ms var(--ease-out); }
.chart-message .chart-message-retry:hover { background: var(--blue-soft); }
.chart-crosshair { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.chart-crosshair-vertical,
.chart-crosshair-horizontal { position: absolute; display: block; background: rgba(60, 91, 137, 0.38); }
.chart-crosshair-vertical { width: 1px; }
.chart-crosshair-horizontal { height: 1px; }
.chart-coordinate { position: absolute; display: block; padding: 2px 6px; border: 1px solid rgba(56, 88, 134, 0.2); border-radius: 5px; background: rgba(67, 92, 130, 0.9); color: #fff; box-shadow: 0 3px 9px rgba(47, 73, 112, 0.16); font-size: 10px; font-variant-numeric: tabular-nums; line-height: 1.35; white-space: nowrap; }
.chart-coordinate-price { transform: translateY(-50%); }
.chart-coordinate-time { transform: translate(-50%, -100%); }
.chart-selection-info { position: absolute; top: 10px; z-index: 2; display: flex; gap: 4px 24px; flex-wrap: wrap; align-items: baseline; color: #7f8fa7; font-size: 10px; font-variant-numeric: tabular-nums; line-height: 1.45; pointer-events: none; }
.chart-selection-value { display: inline-flex; gap: 7px; align-items: baseline; white-space: nowrap; }
.chart-selection-label { color: #98a6ba; font-weight: 400; }
.chart-selection-price { color: #53647d; font-size: 11px; font-weight: 400; letter-spacing: 0.01em; }
.chart-selection-price.up { color: var(--color-up-strong); }
.chart-selection-price.down { color: var(--color-down-strong); }

.judgement-card { position: relative; display: flex; min-height: 0; flex-direction: column; padding: 21px 21px 19px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; border-color: #8794a8; color: #fff; background: linear-gradient(148deg, #7c899d, #59677c); box-shadow: 0 16px 38px rgba(70, 82, 101, 0.2); }
.judgement-card::-webkit-scrollbar { width: 7px; }
.judgement-card::-webkit-scrollbar-track { background: transparent; }
.judgement-card::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: rgba(255, 255, 255, 0.32); background-clip: padding-box; }
.judgement-card:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.82); outline-offset: 2px; }
.judgement-card.bullish { border-color: var(--color-up); background: var(--color-up-soft); color: var(--color-text); box-shadow: none; }
.judgement-card.bearish { border-color: var(--color-down); background: var(--color-down-soft); color: var(--color-text); box-shadow: none; }
.judgement-card.neutral { border-color: #8794a8; background: linear-gradient(148deg, #7c899d, #59677c); box-shadow: 0 16px 38px rgba(70, 82, 101, 0.2); }
.judgement-card::before { position: absolute; top: -135px; right: -108px; width: 275px; height: 275px; border: 25px solid rgba(255, 255, 255, 0.08); border-radius: 50%; content: ""; }
.judgement-card > * { position: relative; z-index: 1; }
.judgement-card .card-header h2 { color: #fff; }
.judgement-card .engine-badge { border-color: rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.11); color: #fff; }
.judgement-card .engine-badge.rules { border-color: rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.88); }
.judgement-meta { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.judgement-generated-at { color: rgba(255, 255, 255, 0.72); font-size: 9px; font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap; }
.judgement-headline { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; margin-top: 21px; }
.direction-orb { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.58); border-radius: 50%; background: rgba(255, 255, 255, 0.16); box-shadow: inset 0 0 16px rgba(255, 255, 255, 0.1), 0 5px 14px rgba(35, 44, 58, 0.12); }
.direction-orb span { color: #fff; font-size: 21px; font-weight: 650; line-height: 1; }
.judgement-headline p { margin: 0 0 3px; color: rgba(255, 255, 255, 0.68); font-size: 10px; }
.judgement-headline h3 { margin: 0; color: #fff; font-size: 20px; font-weight: 660; letter-spacing: -0.045em; }
.judgement-copy { margin-top: 15px; padding: 12px 13px; border: 1px solid rgba(255, 255, 255, 0.17); border-radius: 10px; background: rgba(255, 255, 255, 0.08); }
.judgement-copy h4 { margin: 0; color: #fff; font-size: 12px; font-weight: 680; letter-spacing: -0.015em; line-height: 1.5; }
.judgement-copy p { margin: 7px 0 0; color: rgba(255, 255, 255, 0.76); font-size: 10px; line-height: 1.62; }
.confidence-line { display: flex; justify-content: space-between; margin-top: 15px; padding-top: 13px; border-top: 1px solid rgba(255, 255, 255, 0.23); color: rgba(255, 255, 255, 0.7); font-size: 10px; }
.confidence-line strong { color: #fff; font-size: 11px; }
.probability-group { display: grid; min-height: 70px; gap: 8px; margin-top: 11px; }
.probability-row { display: grid; grid-template-columns: 32px 1fr 31px; gap: 8px; align-items: center; color: rgba(255, 255, 255, 0.72); font-size: 10px; }
.probability-row strong { color: #fff; font-size: 10px; text-align: right; }.probability-track { height: 6px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, 0.2); }.probability-fill { height: 100%; border-radius: inherit; background: var(--color-up); transition: width 250ms var(--ease-out); }.probability-fill.down { background: var(--color-down); }.probability-fill.flat { background: var(--color-text-tertiary); }
.judgement-history { margin-top: 16px; padding-top: 13px; border-top: 1px solid rgba(255, 255, 255, 0.2); }
.judgement-history-heading { display: flex; align-items: center; justify-content: space-between; }
.judgement-history-heading small { color: rgba(255, 255, 255, 0.58); font-size: 9px; }
.judgement-history-windows { display: grid; min-height: 144px; gap: 7px; margin-top: 9px; }
.judgement-history-row { display: grid; grid-template-columns: 68px 1fr; gap: 8px; align-items: center; padding: 8px 9px; border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 8px; background: rgba(255, 255, 255, 0.07); }
.judgement-history-label { display: flex; flex-direction: column; }
.judgement-history-label strong { color: #fff; font-size: 10px; font-weight: 700; }
.judgement-history-label small { margin-top: 2px; color: rgba(255, 255, 255, 0.55); font-size: 8px; }
.judgement-history-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.judgement-history-values span { color: rgba(255, 255, 255, 0.62); font-size: 9px; white-space: nowrap; }
.judgement-history-values b { display: block; margin-top: 2px; color: #fff; font-size: 10px; font-variant-numeric: tabular-nums; }
.judgement-history-empty { color: rgba(255, 255, 255, 0.65); font-size: 10px; }
.judgement-details { margin-top: 16px; padding-top: 13px; border-top: 1px solid rgba(255, 255, 255, 0.2); }
.detail-label { display: block; color: rgba(255, 255, 255, 0.65); font-size: 9px; font-weight: 700; letter-spacing: 0.04em; }
.judgement-drivers { display: grid; min-height: 54px; gap: 6px; margin: 9px 0 0; padding: 0; list-style: none; }
.judgement-drivers li { position: relative; padding-left: 12px; color: rgba(255, 255, 255, 0.86); font-size: 10px; line-height: 1.46; }
.judgement-drivers li::before { position: absolute; top: 0.56em; left: 1px; width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, 0.68); content: ""; }
.judgement-risk { margin: 12px 0 0; padding: 9px 10px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 8px; background: rgba(20, 61, 137, 0.18); color: rgba(255, 255, 255, 0.72); font-size: 9.5px; line-height: 1.55; }

.news-sentiment-card, .news-card, .technical-card, .trade-signal-card { padding: 21px 23px; }
.news-card, .technical-card { min-height: 310px; }
.news-sentiment-header { align-items: center; }
.news-sentiment-subtitle { margin: 4px 0 0; color: #8796aa; font-size: 10px; }
.news-sentiment-window { flex: 0 0 auto; padding: 4px 8px; border: 1px solid #e1e8f2; border-radius: 999px; color: #7b8ba2; background: #f7faff; font-size: 10px; font-weight: 700; white-space: nowrap; }
.news-sentiment-total { display: flex; gap: 8px; align-items: baseline; margin-top: 17px; padding-bottom: 12px; border-bottom: 1px solid #e9eef6; color: #7e8da3; font-size: 10px; }
.news-sentiment-total strong { color: #304663; font-size: 24px; font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.news-sentiment-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.news-sentiment-item { min-width: 0; padding: 11px 10px 10px; border: 1px solid #e7edf5; border-radius: 10px; background: #fbfdff; }
.news-sentiment-item-heading { display: flex; gap: 6px; align-items: center; color: #4a5f7d; font-size: 11px; }
.news-sentiment-item-heading i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--neutral); box-shadow: 0 0 0 3px var(--neutral-soft); }
.news-sentiment-item.bullish .news-sentiment-item-heading i { background: var(--bullish); box-shadow: 0 0 0 3px var(--bullish-soft); }
.news-sentiment-item.bearish .news-sentiment-item-heading i { background: var(--bearish); box-shadow: 0 0 0 3px var(--bearish-soft); }
.news-sentiment-item-metrics { display: flex; gap: 3px; align-items: baseline; margin-top: 8px; color: #8b99ad; font-size: 9px; white-space: nowrap; }
.news-sentiment-item-metrics > strong { color: #304663; font-size: 20px; font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.news-sentiment-item-metrics > b { margin-left: auto; color: #5d708d; font-size: 11px; font-variant-numeric: tabular-nums; font-weight: 700; }
.news-sentiment-item-metrics > small { color: #9aa7b8; font-size: 9px; }
.news-sentiment-bar { height: 4px; margin-top: 9px; overflow: hidden; border-radius: 999px; background: #edf1f6; }
.news-sentiment-bar span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--neutral); transition: width 240ms var(--ease-out); }
.news-sentiment-item.bullish .news-sentiment-bar span { background: var(--bullish); }
.news-sentiment-item.bearish .news-sentiment-bar span { background: var(--bearish); }
.news-card-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.news-generated-at { color: #7d8da5; font-size: 9px; font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap; }
.count-badge { min-width: 24px; padding: 3px 7px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 11px; text-align: center; }
.view-all-link { display: inline-flex; gap: 4px; align-items: center; padding: 4px 7px; border-radius: 6px; color: #617694; font-size: 10px; font-weight: 650; text-decoration: none; white-space: nowrap; transition: color 160ms var(--ease-out), background-color 160ms var(--ease-out), transform 140ms var(--ease-out); }
.view-all-link span { color: var(--blue); transition: transform 160ms var(--ease-out); }
.view-all-link:active { transform: scale(0.97); }
.news-list { display: grid; min-height: 270px; margin-top: 9px; }
.dashboard-placeholder { opacity: 0.72; }
.dashboard-placeholder .probability-fill { width: 42%; background: linear-gradient(90deg, var(--color-border), var(--color-selected), var(--color-border)) !important; background-size: 200% 100% !important; animation: shimmer 1.3s linear infinite; }
.news-placeholder { display: grid; min-height: 82px; gap: 8px; align-content: center; border-bottom: 1px solid var(--line); }
.news-placeholder > * { display: block; border-radius: 999px; background: linear-gradient(90deg, var(--color-border), var(--color-selected), var(--color-border)); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.news-placeholder strong { width: 78%; height: 11px; }
.news-placeholder span { width: 94%; height: 8px; }
.news-placeholder small { width: 34%; height: 7px; }
.news-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 15px 0; border-top: 1px solid #e9eef6; }
.news-item:first-child { border-top-color: #e1e8f2; }
.news-item-content { min-width: 0; }
.news-title-row { display: block; }
.news-title { color: #344a68; font-size: 13px; font-weight: 640; line-height: 1.45; text-decoration: none; transition: color 160ms var(--ease-out); }.news-title.no-link { cursor: default; }
.news-summary { margin: 6px 0 0; color: #71819a; font-size: 11px; line-height: 1.58; }
.news-meta { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.impact-badge, .relevance-badge { width: fit-content; padding: 3px 6px; border-radius: 5px; font-size: 9px; font-weight: 750; letter-spacing: 0.02em; }
.impact-badge.bullish { border: 1px solid color-mix(in srgb, var(--color-up) 32%, transparent); background: var(--color-up-soft); color: var(--color-up-strong); box-shadow: none; }
.impact-badge.bearish { border: 1px solid color-mix(in srgb, var(--color-down) 32%, transparent); background: var(--color-down-soft); color: var(--color-down-strong); box-shadow: none; }
.impact-badge.neutral { border: 1px solid #d9e0e9; background: var(--neutral-soft); color: var(--neutral-deep); }
.relevance-badge { border: 1px solid #e1e8f2; background: #fff; color: #76869d; font-weight: 650; }
.relevance-badge.direct { border-color: #dce9ff; color: #4777c6; }
.news-source { color: #74849a; font-size: 10px; }.news-time { color: #a0acbd; font-size: 10px; }
.news-reason { margin: 8px 0 0; padding-left: 9px; border-left: 2px solid #d7e5fa; color: #657791; font-size: 10px; line-height: 1.52; }
.news-reason span { margin-right: 7px; color: inherit; font-weight: 700; }
.news-timeline { margin-top: 10px; border-top: 1px dashed #e1e9f4; }
.news-timeline summary { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding-top: 9px; color: #71839c; cursor: pointer; font-size: 10px; list-style: none; }
.news-timeline summary::-webkit-details-marker { display: none; }
.news-timeline summary b { color: var(--blue); font-weight: 700; }
.news-timeline summary b::after { display: inline-block; margin-left: 5px; content: "⌄"; transition: transform 160ms var(--ease-out); }
.news-timeline[open] summary b::after { transform: rotate(180deg); }
.news-timeline ol { display: grid; gap: 8px; margin: 10px 0 2px; padding: 0 0 0 5px; list-style: none; }
.news-timeline li { display: grid; grid-template-columns: 64px 1fr; gap: 10px; color: #8a98ab; font-size: 10px; }
.news-timeline li time { padding-top: 2px; color: #9ca9ba; white-space: nowrap; }
.news-timeline li div { min-width: 0; padding-left: 10px; border-left: 2px solid #dce8f8; }
.news-timeline li a, .news-timeline li div > span { color: #526984; font-weight: 620; line-height: 1.45; text-decoration: none; }
.news-timeline li small { display: block; margin-top: 2px; color: #91a0b4; }
.news-empty { display: grid; min-height: 205px; place-items: center; color: #91a0b5; font-size: 12px; text-align: center; }

.technical-card, .trade-signal-card { background: linear-gradient(145deg, #fff, #f9fbff); }
.technical-state, .trade-signal-action { padding: 4px 7px; border: 1px solid #d9e0e9; border-radius: 6px; background: var(--neutral-soft); color: var(--neutral-deep); font-size: 10px; font-weight: 760; line-height: 1.45; }
.technical-state.bullish, .trade-signal-card.bullish .trade-signal-action { border-color: color-mix(in srgb, var(--color-up) 32%, transparent); background: var(--color-up-soft); color: var(--color-up-strong); }
.technical-state.bearish, .trade-signal-card.bearish .trade-signal-action { border-color: color-mix(in srgb, var(--color-down) 32%, transparent); background: var(--color-down-soft); color: var(--color-down-strong); }
.technical-state.neutral, .trade-signal-card.neutral .trade-signal-action { border-color: #d9e0e9; background: var(--neutral-soft); color: var(--neutral-deep); }
.technical-score-row { display: grid; grid-template-columns: 104px 1fr; gap: 18px; align-items: center; margin-top: 24px; }
.score-wheel {
  --score-accent: var(--neutral);
  --score-strength: 0;
  position: relative;
  display: grid;
  width: 88px;
  height: 88px;
  align-content: center;
  justify-items: center;
}
.score-wheel.bullish { --score-accent: var(--bullish); }
.score-wheel.bearish { --score-accent: var(--bearish); }
.score-wheel svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.score-wheel circle { fill: none; stroke-width: 7; }
.score-wheel-track { stroke: #e9eff8; }
.score-wheel-value {
  stroke: var(--score-accent);
  stroke-linecap: round;
  stroke-dasharray: var(--score-strength) 100;
  transform: rotate(-90deg);
  transform-box: fill-box;
  transform-origin: center;
  transition: stroke-dasharray 240ms var(--ease-out), stroke 180ms ease, transform 240ms var(--ease-out);
}
.score-wheel.bearish .score-wheel-value { transform: rotate(-90deg) scaleY(-1); }
.score-wheel span, .score-wheel small { position: relative; z-index: 1; }
.score-wheel span {
  color: var(--score-accent);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  transition: color 180ms ease;
}
.score-wheel small { margin-top: 3px; color: #98a6ba; font-size: 9px; }
.indicator-cluster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.indicator-cluster div { display: grid; min-width: 0; gap: 2px; padding: 7px 8px; border: 1px solid #e9eef6; border-radius: 7px; background: rgba(248, 251, 255, 0.84); }
.indicator-cluster span { overflow: hidden; color: #8c99ad; font-size: 9px; letter-spacing: 0.04em; text-overflow: ellipsis; white-space: nowrap; }
.indicator-cluster strong { overflow: hidden; color: #405571; font-size: 11px; font-variant-numeric: tabular-nums; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.trade-signal-heading { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.trade-signal-heading > div { display: grid; gap: 2px; }
.trade-signal-heading h2 { margin: 0; color: #304663; font-size: 16px; font-weight: 700; letter-spacing: -0.035em; }
.trade-signal-heading span { color: #929fb1; font-size: 10px; font-weight: 650; letter-spacing: 0.04em; }
.trade-signal-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.trade-signal-metrics div { display: grid; min-width: 0; gap: 3px; padding: 7px 8px; border: 1px solid #e9eef6; border-radius: 7px; background: rgba(248, 251, 255, 0.84); }
.trade-signal-metrics span { overflow: hidden; color: #919eb0; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.trade-signal-metrics strong { color: #405571; font-size: 12px; font-variant-numeric: tabular-nums; }
.trade-signal-reason { margin: 12px 0 0; color: #596e89; font-size: 11px; line-height: 1.55; }
.trade-signal-history-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; color: var(--color-accent-hover); font-size: 11px; font-weight: 720; text-decoration: none; }
.trade-signal-history-link span { transition: transform 140ms var(--ease-out); }
.trade-signal-history-link:hover span { transform: translateX(2px); }
.trade-signal-history-link:active { transform: scale(0.98); }
.trade-signal-pro-gate { margin-top: 12px; }
.technical-factors { display: grid; margin-top: 22px; border-top: 1px solid #e8eef6; }
.technical-factor { display: grid; grid-template-columns: 7px 1fr; gap: 9px; padding: 10px 0; border-bottom: 1px solid #edf1f7; }
.technical-factor i { width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: #a4b1c3; box-shadow: 0 0 0 3px rgba(164, 177, 195, 0.11); }
.technical-factor.bullish i { background: var(--color-up); box-shadow: 0 0 0 3px var(--color-up-soft); }
.technical-factor.bearish i { background: var(--color-down); box-shadow: 0 0 0 3px var(--color-down-soft); }
.technical-factor.neutral i { background: var(--neutral); box-shadow: 0 0 0 3px rgba(113, 128, 150, 0.12); }
.technical-factor strong { display: block; color: #425772; font-size: 10px; font-weight: 700; }
.technical-factor p, .technical-empty { margin: 3px 0 0; color: #7a899e; font-size: 10px; line-height: 1.5; }
.technical-method { margin: 14px 0 0; padding: 9px 10px; border-radius: 8px; background: #f3f7fd; color: #8090a7; font-size: 9.5px; line-height: 1.55; }

.archive-nav a:first-child { color: #708099; background: transparent; }
.archive-nav a[aria-current="page"] { color: var(--blue); background: var(--blue-soft); }
.back-link { display: inline-flex; gap: 6px; align-items: center; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.8); color: #62748e; font-size: 10px; font-weight: 650; text-decoration: none; transition: border-color 160ms var(--ease-out), color 160ms var(--ease-out), background-color 160ms var(--ease-out), transform 140ms var(--ease-out); }
.back-link:active { transform: scale(0.97); }
.archive-main { padding-top: 32px; }
.archive-heading { display: flex; gap: 24px; align-items: flex-end; justify-content: space-between; }
.archive-eyebrow { display: block; margin-bottom: 8px; color: var(--blue); font-size: 9px; font-weight: 780; letter-spacing: 0.12em; }
.archive-heading h1 { margin: 0; color: var(--ink-strong); font-size: clamp(30px, 4vw, 44px); font-weight: 650; letter-spacing: -0.055em; line-height: 1; }
.archive-heading p { max-width: 690px; margin: 11px 0 0; color: #72839c; font-size: 12px; line-height: 1.65; }
.archive-updated { padding-bottom: 3px; color: var(--faint); font-size: 10px; white-space: nowrap; }
.archive-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 23px; }
.archive-summary article { display: flex; min-height: 82px; flex-direction: column; justify-content: center; padding: 14px 17px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.88); box-shadow: 0 6px 20px rgba(43, 78, 128, 0.04); }
.archive-summary span { color: #8392a8; font-size: 10px; font-weight: 620; }
.archive-summary strong { margin-top: 5px; color: #354d6d; font-size: 23px; font-weight: 630; letter-spacing: -0.04em; }
.filter-card { margin-top: 11px; padding: 20px 21px 21px; }
.filter-heading { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; }
.filter-heading h2, .results-heading h2 { margin: 0; color: #304663; font-size: 16px; font-weight: 700; letter-spacing: -0.035em; }
.filter-heading p, .results-heading p { margin: 4px 0 0; color: #8b99ad; font-size: 10px; }
.filter-reset { padding: 5px 7px; border: 0; border-radius: 6px; background: transparent; color: #71839e; cursor: pointer; font-size: 10px; font-weight: 650; transition: color 160ms var(--ease-out), background-color 160ms var(--ease-out), transform 140ms var(--ease-out); }
.filter-reset:active, .filter-submit:active, .pagination button:active { transform: scale(0.97); }
.filter-form { display: grid; grid-template-columns: 1.35fr repeat(4, minmax(120px, 1fr)); gap: 11px; align-items: end; margin-top: 18px; }
.filter-field { display: grid; min-width: 0; gap: 6px; }
.filter-field > span { color: #71839d; font-size: 9px; font-weight: 700; }
.filter-field-label { color: var(--color-text-secondary, #71839d); font-size: 12px; font-weight: 700; }
.filter-field input, .filter-field select { width: 100%; min-width: 0; height: 37px; padding: 0 10px; border: 1px solid #dce6f2; border-radius: 8px; background: #fbfdff; color: #425875; font-size: 11px; transition: border-color 160ms var(--ease-out), background-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out); }
.filter-field input::placeholder { color: #a3afc0; }
.filter-field input:focus, .filter-field select:focus { border-color: var(--color-border-focus); background: var(--color-surface-elevated); box-shadow: 0 0 0 3px var(--color-focus-ring); outline: 0; }
.filter-field input[aria-invalid="true"] { border-color: #e2a7b2; background: #fff7f8; }
.date-input-shell { position: relative; min-width: 0; }
.date-input-shell .date-display-input { padding-right: 40px; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.date-picker-trigger { position: absolute; inset: 0 0 0 auto; display: grid; width: 40px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--color-text-secondary, #71839d); cursor: pointer; place-items: center; transition: color 140ms var(--ease-out), background-color 140ms var(--ease-out), transform 140ms var(--ease-out); }
.date-picker-trigger svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.date-picker-trigger:active { transform: scale(0.96); }
.date-input-shell .date-native-picker { position: absolute; right: 8px; bottom: 0; width: 1px; height: 1px; padding: 0; opacity: 0; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .date-picker-trigger:hover { background: var(--color-hover, rgba(113, 131, 157, 0.1)); color: var(--color-text, #425875); }
}
.filter-error { grid-column: 1 / -1; margin: 0; color: #b03a4e; font-size: 12px; }
.filter-submit { height: 37px; padding: 0 16px; border: 1px solid var(--color-accent); border-radius: 8px; background: var(--color-accent); color: var(--color-accent-contrast); box-shadow: 0 6px 14px color-mix(in srgb, var(--color-accent) 16%, transparent); cursor: pointer; font-size: 11px; font-weight: 720; transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), transform 140ms var(--ease-out); }
.archive-results { margin-top: 27px; }
.results-heading { display: flex; gap: 18px; align-items: center; justify-content: space-between; padding: 0 2px 10px; }
.results-actions { display: flex; gap: 14px; align-items: center; }
.view-switch { display: inline-flex; padding: 3px; border: 1px solid #dce6f2; border-radius: 9px; background: #f7faff; }
.view-switch button { padding: 6px 9px; border: 0; border-radius: 6px; background: transparent; color: #74859d; cursor: pointer; font-size: 10px; font-weight: 680; transition: color 160ms var(--ease-out), background-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out); }
.view-switch button[aria-pressed="true"] { background: #fff; color: var(--blue); box-shadow: 0 2px 7px rgba(50, 85, 135, 0.12); }
.archive-list { display: grid; gap: 9px; }
.archive-news-item { padding: 18px 19px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255, 255, 255, 0.93); box-shadow: 0 7px 22px rgba(43, 78, 128, 0.045); }
.archive-news-item[data-status="unprocessed"] { border-style: dashed; background: rgba(252, 253, 255, 0.91); }
.archive-news-header { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; }
.archive-news-title { min-width: 0; }
.archive-news-title > a, .archive-news-title > span { color: #2e4564; font-size: 14px; font-weight: 680; line-height: 1.52; text-decoration: none; transition: color 160ms var(--ease-out); }
.archive-news-origin { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; margin-top: 6px; color: #8997aa; font-size: 9.5px; }
.archive-news-origin span { color: #647894; font-weight: 650; }
.archive-news-origin time::before { margin-right: 7px; color: #c3ccd8; content: "·"; }
.status-badge { flex: 0 0 auto; padding: 4px 7px; border: 1px solid var(--color-accent-border); border-radius: 6px; background: var(--color-accent-soft); color: var(--color-accent-hover); font-size: 9px; font-weight: 720; white-space: nowrap; }
.status-badge.unprocessed { border-color: var(--color-accent-border); background: var(--color-accent-soft); color: var(--color-accent-hover); }
.status-badge.skipped { border-color: #e3e8ef; background: #f7f9fc; color: #8491a4; }
.archive-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 11px; }
.archive-badge { padding: 3px 6px; border-radius: 5px; background: #f3f6fa; color: #75859b; font-size: 9px; font-weight: 700; }
.archive-badge.relevance.direct { background: var(--color-accent-soft); color: var(--color-accent-hover); }
.archive-badge.judgement.bullish { border: 1px solid color-mix(in srgb, var(--color-up) 32%, transparent); background: var(--color-up-soft); color: var(--color-up-strong); box-shadow: none; }
.archive-badge.relevance.indirect { border: 1px solid #dfe9f7; background: #f8fbff; color: #6980a3; }
.archive-badge.relevance.unrelated, .archive-badge.relevance.pending, .archive-badge.judgement.pending { background: #f5f7fa; color: #8a97aa; }
.archive-badge.judgement.bearish { border: 1px solid color-mix(in srgb, var(--color-down) 32%, transparent); background: var(--color-down-soft); color: var(--color-down-strong); box-shadow: none; }
.archive-badge.judgement.neutral { border: 1px solid #d9e0e9; background: var(--neutral-soft); color: var(--neutral-deep); }
.archive-badge.impact-level { border: 1px solid var(--color-accent-border); background: var(--color-accent-soft); color: var(--color-accent-hover); }
.archive-badge.source-count { max-width: 100%; overflow: hidden; border: 1px solid #e1e9f4; background: #f8fbff; color: #72849d; text-overflow: ellipsis; white-space: nowrap; }
.archive-analysis-grid { display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); gap: 10px; margin-top: 13px; }
.archive-analysis-grid section { padding: 11px 12px; border-radius: 9px; background: #f7faff; }
.archive-analysis-grid span { display: block; color: #5680bf; font-size: 9px; font-weight: 720; }
.archive-analysis-grid p { margin: 5px 0 0; color: #627590; font-size: 10.5px; line-height: 1.62; }
.event-cluster-reason { margin: 10px 0 0; padding: 9px 11px; border-left: 2px solid #9fc1fb; border-radius: 0 7px 7px 0; background: #f7faff; color: #667b98; font-size: 10px; line-height: 1.55; }
.event-cluster-reason span { margin-right: 8px; color: var(--blue); font-weight: 750; }
.archive-news-footer { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px solid #edf1f6; }
.source-address { display: inline-flex; min-width: 0; gap: 6px; align-items: center; color: #6b7e99; font-size: 9px; text-decoration: none; }
.source-address span { color: #96a3b5; }
.source-address strong { color: #5278b3; font-size: 9px; font-weight: 700; }
.source-address i { color: var(--blue); font-style: normal; }
.source-address.unavailable { overflow: hidden; }
.source-address code { max-width: min(480px, 48vw); overflow: hidden; color: #8090a6; font-family: inherit; text-overflow: ellipsis; white-space: nowrap; }
.analyzer-label { color: #a0abb9; font-size: 8.5px; white-space: nowrap; }
.archive-event-timeline { margin-top: 13px; padding-top: 11px; border-top: 1px solid #e8eef6; }
.archive-event-timeline summary { display: flex; align-items: center; justify-content: space-between; color: #617793; cursor: pointer; font-size: 11px; font-weight: 700; list-style: none; }
.archive-event-timeline summary::-webkit-details-marker { display: none; }
.archive-event-timeline summary b { color: var(--blue); font-size: 10px; font-weight: 680; }
.archive-event-timeline summary b::after { display: inline-block; margin-left: 6px; content: "⌄"; transition: transform 160ms var(--ease-out); }
.archive-event-timeline[open] summary b::after { transform: rotate(180deg); }
.archive-event-timeline ol { display: grid; margin: 14px 0 1px; padding: 0; list-style: none; }
.archive-event-timeline li { position: relative; display: grid; grid-template-columns: 9px 1fr; gap: 11px; padding-bottom: 14px; }
.archive-event-timeline li:last-child { padding-bottom: 0; }
.archive-event-timeline li i { position: relative; width: 8px; height: 8px; margin-top: 5px; border: 2px solid #8bb4f5; border-radius: 50%; background: #fff; }
.archive-event-timeline li:not(:last-child) i::after { position: absolute; top: 8px; left: 1px; width: 2px; height: calc(100% + 17px); background: #dfeafb; content: ""; }
.archive-event-timeline li > div { min-width: 0; }
.archive-event-timeline li a, .archive-event-timeline li > div > span { display: inline-block; margin-top: 4px; color: #425b7b; font-size: 12px; font-weight: 650; line-height: 1.5; text-decoration: none; }
.archive-event-timeline li p { margin: 4px 0 0; color: #75869e; font-size: 11px; line-height: 1.55; }
.event-timeline-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: #8e9bad; font-size: 9px; }
.event-timeline-meta strong { color: #627b9b; font-weight: 700; }
.event-timeline-meta em { padding: 2px 5px; border-radius: 4px; background: var(--blue-soft); color: var(--blue); font-style: normal; font-weight: 700; }
.archive-loading { display: grid; min-height: 240px; align-content: center; justify-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255, 255, 255, 0.82); color: #8998ad; }
.archive-loading span { width: min(520px, 70%); height: 9px; border-radius: 999px; background: linear-gradient(90deg, #eef4fc, #dce9fb, #eef4fc); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.archive-loading span:nth-child(2) { width: min(430px, 58%); }.archive-loading span:nth-child(3) { width: min(350px, 46%); }
.archive-loading p { margin: 10px 0 0; font-size: 10px; }
.archive-empty { display: grid; min-height: 260px; align-content: center; justify-items: center; border: 1px dashed #dce5f0; border-radius: 15px; background: rgba(255, 255, 255, 0.65); text-align: center; }
.archive-empty strong { color: #526680; font-size: 13px; }.archive-empty p { margin: 6px 0 0; color: #8a98aa; font-size: 10px; }
.pagination { display: flex; gap: 5px; align-items: center; justify-content: center; margin-top: 18px; }
.pagination button { min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid #dce6f2; border-radius: 8px; background: #fff; color: #637691; cursor: pointer; font-size: 10px; font-weight: 650; transition: border-color 160ms var(--ease-out), color 160ms var(--ease-out), background-color 160ms var(--ease-out), transform 140ms var(--ease-out); }
.pagination button[aria-current="page"] { border-color: var(--color-accent); background: var(--color-accent); color: var(--color-accent-contrast); box-shadow: 0 5px 12px color-mix(in srgb, var(--color-accent) 16%, transparent); }
.pagination button:disabled { cursor: default; opacity: 0.42; }
.pagination span { padding: 0 2px; color: #9aa7b8; font-size: 10px; }

.toast { position: fixed; z-index: 10; right: 24px; bottom: 23px; max-width: min(270px, calc(100vw - 48px)); padding: 9px 11px; border: 1px solid #d9e7fa; border-radius: 9px; background: rgba(255, 255, 255, 0.97); color: #4b607e; box-shadow: 0 12px 34px rgba(50, 85, 135, 0.16); font-size: 11px; opacity: 0; pointer-events: none; transform: translateY(9px); transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out); }.toast.show { opacity: 1; transform: translateY(0); }

@media (hover: hover) and (pointer: fine) {
  .topnav a:hover { background: var(--blue-soft); color: var(--blue); }
  .news-title:not(.no-link):hover { color: var(--blue); }
  .view-all-link:hover, .filter-reset:hover { background: var(--blue-soft); color: var(--blue); }
  .account-link:hover { border-color: var(--color-accent-border); background: var(--color-accent-soft); color: var(--color-accent-hover); }
  .view-all-link:hover span { transform: translateX(2px); }
  .back-link:hover { border-color: var(--color-accent-border); background: var(--color-accent-soft); color: var(--color-accent-hover); }
  .archive-news-title > a:hover { color: var(--blue); }
  .filter-submit:hover { border-color: var(--blue-deep); background: var(--blue-deep); }
  .pagination button:not(:disabled):not([aria-current="page"]):hover { border-color: var(--color-accent-border); background: var(--color-accent-soft); color: var(--color-accent-hover); }
  .view-switch button:not([aria-pressed="true"]):hover { color: var(--blue); }
  .news-timeline li a:hover, .archive-event-timeline li a:hover { color: var(--blue); }
  .range-tabs button:not([aria-selected="true"]):hover { background: var(--blue-soft); color: var(--blue); }
}

@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (max-width: 1040px) {
  .topbar { grid-template-columns: minmax(165px, 1fr) auto minmax(215px, 1fr); gap: 12px; }
  .dashboard-grid, .intelligence-grid { grid-template-columns: 1fr; }.intelligence-grid { grid-template-areas: "technical" "news"; align-items: stretch; }.judgement-card { height: auto !important; max-height: none !important; min-height: 0; overflow-y: visible; scrollbar-gutter: auto; }.technical-card, .news-card { min-height: 0; }.technical-column { position: static; }.technical-score-row { margin: 25px 0 10px; }
  .filter-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .app-shell { width: min(100% - 28px, 560px); }.topbar { grid-template-columns: 1fr auto; min-height: 64px; }.topnav { display: none; }.topbar-actions { gap: 8px; }.updated-at { font-size: 9px; }main { padding-top: 16px; }
  .market-hero { grid-template-columns: 1fr; min-height: 0; border-radius: 16px; }.market-hero-main { padding: 19px 18px 21px; }.price-row { margin-top: 23px; }.price-row > strong { font-size: clamp(40px, 12vw, 49px); }.reference-price { flex-wrap: wrap; row-gap: 3px; }.reference-price > small { width: 100%; margin-left: 0; }.quote-source-detail { font-size: 9.5px; }.market-stats { min-height: 84px; border-top: 1px solid var(--line); border-left: 0; }.market-stat { padding: 16px 11px; }.market-stat strong { margin-top: 6px; font-size: clamp(14px, 4vw, 17px); }
  .dashboard-grid, .intelligence-grid { gap: 10px; margin-top: 10px; }.chart-card { min-height: auto; padding: 18px 14px 14px; border-radius: 16px; }.chart-header { align-items: flex-start; flex-direction: column; }.range-tabs { width: 100%; justify-content: space-between; }.range-tabs button { min-width: auto; flex: 1; padding-inline: 3px; }.chart-wrap, .chart-canvas, #candle-chart { min-height: 266px; height: 266px; }
  .judgement-card { min-height: 0; padding: 19px 17px; border-radius: 16px; }.judgement-headline { margin-top: 18px; }.judgement-copy { margin-top: 13px; }.confidence-line { margin-top: 15px; }.news-card, .technical-card, .trade-signal-card { padding: 19px 17px; border-radius: 16px; }.news-title { font-size: 12px; }.technical-score-row { grid-template-columns: 98px 1fr; gap: 6px; margin-top: 22px; }
  .trade-signal-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .archive-main { padding-top: 22px; }.archive-heading { align-items: flex-start; flex-direction: column; gap: 9px; }.archive-heading p { font-size: 11px; }.archive-updated { padding: 0; }.archive-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }.archive-summary article { min-height: 74px; padding: 12px 14px; }.archive-summary strong { font-size: 20px; }.filter-card { padding: 18px 16px; }.filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }.filter-search { grid-column: 1 / -1; }.filter-submit { grid-column: 1 / -1; }.archive-results { margin-top: 22px; }.results-heading { align-items: flex-start; flex-direction: column; }.results-actions { width: 100%; justify-content: space-between; }.archive-news-item { padding: 16px 15px; }.archive-analysis-grid { grid-template-columns: 1fr; }.archive-news-footer { align-items: flex-start; flex-direction: column; gap: 7px; }.source-address code { max-width: calc(100vw - 92px); }.analyzer-label { white-space: normal; }
}

@media (max-width: 410px) {
  .site-header .brand strong { display: none; }.account-link { max-width: 126px; font-size: 11px; }.market-hero-main { padding-inline: 16px; }.price-row { gap: 9px; }.price-row > strong { font-size: 39px; }.price-context small { display: none; }.market-stat { padding-inline: 8px; }.market-stat span { font-size: 8px; }.market-stat strong { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Readable type scale: keep supporting text comfortably legible on every screen. */
body { font-size: 15px; }

.brand strong { font-size: 17px; }
.topnav a { font-size: 14px; }
.live-status, .updated-at { font-size: 12px; }

.instrument-copy strong { font-size: 16px; }
.instrument-copy small,
.source-badge,
.engine-badge,
.market-stat span { font-size: 12px; }
.price-context b { font-size: 13px; }
.price-context small { font-size: 12px; }
.quote-source-detail { font-size: 13px; line-height: 1.6; }
.market-stat strong { font-size: clamp(17px, 1.6vw, 21px); }

.card-header h2,
.filter-heading h2,
.results-heading h2 { font-size: 18px; }
.range-tabs button,
.chart-meta { font-size: 12px; }
.chart-selection-info { font-size: 12px; }
.chart-selection-price { font-size: 12px; }
.chart-coordinate { font-size: 11px; }

.judgement-headline p,
.confidence-line,
.probability-row,
.probability-row strong { font-size: 13px; }
.probability-row { grid-template-columns: 34px 1fr 46px; }
.judgement-copy h4 { font-size: 15px; }
.judgement-copy p,
.judgement-drivers li,
.judgement-risk { font-size: 13px; }
.confidence-line strong { font-size: 14px; }
.detail-label { font-size: 12px; }
.judgement-history-heading small,
.judgement-history-label strong,
.judgement-history-values span { font-size: 12px; }
.judgement-history-label small { font-size: 11px; }
.judgement-history-values b { font-size: 13px; }

.count-badge { font-size: 13px; }
.view-all-link { font-size: 13px; }
.impact-badge,
.relevance-badge { font-size: 12px; }
.news-item > .impact-badge {
  display: inline-flex;
  min-width: 58px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.news-title { font-size: 16px; line-height: 1.5; }
.news-summary { font-size: 14px; line-height: 1.65; }
.news-source,
.news-time { font-size: 12px; }
.news-reason { font-size: 13px; line-height: 1.6; }
.news-timeline summary,
.news-timeline li { font-size: 12px; }
.news-empty { font-size: 14px; }

.technical-state,
.trade-signal-action,
.score-wheel small,
.indicator-cluster span,
.technical-factor strong { font-size: 12px; }
.indicator-cluster strong { font-size: 14px; }
.technical-factor p,
.technical-empty,
.technical-method,
.trade-signal-reason { font-size: 13px; line-height: 1.6; }

.back-link { font-size: 13px; }
.archive-eyebrow,
.archive-summary span,
.filter-field > span,
.status-badge,
.archive-badge,
.archive-analysis-grid span { font-size: 12px; }
.archive-heading p { font-size: 15px; }
.archive-updated,
.filter-heading p,
.results-heading p,
.archive-news-origin,
.source-address,
.source-address strong,
.analyzer-label,
.archive-loading p,
.archive-empty p,
.pagination button,
.pagination span { font-size: 13px; }
.filter-reset,
.filter-field input,
.filter-field select,
.filter-submit { font-size: 14px; }
.filter-field input,
.filter-field select,
.filter-submit { height: 42px; }
.archive-news-title > a,
.archive-news-title > span { font-size: 16px; }
.view-switch button,
.archive-event-timeline summary,
.archive-event-timeline li a,
.archive-event-timeline li > div > span { font-size: 13px; }
.archive-event-timeline summary b,
.event-timeline-meta { font-size: 12px; }
.archive-event-timeline li p { font-size: 13px; }
.archive-analysis-grid p { font-size: 14px; line-height: 1.65; }
.event-cluster-reason { font-size: 13px; line-height: 1.6; }
.archive-empty strong { font-size: 16px; }
.pagination button { min-width: 36px; height: 36px; }

.toast { max-width: min(340px, calc(100vw - 48px)); font-size: 14px; line-height: 1.5; }
@media (max-width: 720px) {
  .updated-at { font-size: 12px; }
  .quote-source-detail { font-size: 13px; }
  .market-stat strong { font-size: clamp(16px, 4.5vw, 19px); }
  .news-title { font-size: 16px; }
  .news-item { gap: 10px; }
  .news-item > .impact-badge { min-width: 54px; min-height: 30px; padding: 6px 10px; font-size: 14px; }
  .archive-heading p { font-size: 14px; }
}

@media (max-width: 410px) {
  .market-stat span { font-size: 11px; }
  .market-stat strong { font-size: 16px; }
  .range-tabs button { font-size: 11px; }
}

/* Dashboard header: compact, right-aligned, and intentionally quiet. */
.site-header {
  position: relative;
  z-index: 30;
  height: 60px;
  border-bottom: 1px solid #e3ebf5;
  background: rgba(251, 253, 255, 0.98);
  box-shadow: 0 2px 10px rgba(29, 45, 75, 0.025);
}

.site-header .home-topbar {
  width: 100%;
  max-width: 1320px;
  height: 60px;
  min-height: 60px;
  margin-inline: auto;
  padding-inline: 24px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-header .brand { gap: 12px; min-width: 0; }
.site-header .brand-mark {
  width: 32px;
  height: 32px;
  border-color: #dbe8fb;
  border-radius: 12px;
  background: #f4f8ff;
  box-shadow: none;
}
.site-header .brand-mark svg { width: 22px; height: 22px; stroke-width: 1.9; }
.site-header .brand strong {
  min-width: 0;
  overflow: hidden;
  color: var(--blue);
  font-size: 15px;
  font-weight: 740;
  letter-spacing: -0.045em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-center-slot { min-width: 0; }
.site-header .home-nav { gap: 4px; }
.site-header .home-nav a {
  position: relative;
  min-height: 40px;
  padding-inline: 13px;
  border-radius: 10px;
  color: #5f6f86;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color 160ms var(--ease-out), background-color 160ms var(--ease-out), transform 140ms var(--ease-out);
}
.site-header .home-nav a:hover { color: var(--color-accent-hover); background: var(--color-accent-soft); }
.site-header .home-nav a[aria-current="page"] { color: var(--color-accent-hover); background: var(--color-accent-soft); }
.site-header .home-nav a[aria-current="page"]::after {
  position: absolute;
  right: 13px;
  bottom: 2px;
  left: 13px;
  height: 2px;
  border-radius: 999px;
  background: var(--color-accent);
  content: "";
}
.site-header .home-nav a:active { transform: scale(0.97); }
.site-header .home-nav a:focus-visible,
.site-header button:focus-visible,
.site-header .auth-trigger:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.site-header .topbar-actions { gap: 8px; }
.market-status-group {
  display: inline-flex;
  min-width: 0;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  height: 36px;
  white-space: nowrap;
}
.site-header .connection-state {
  gap: 7px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #5f6f86;
  background: transparent;
  font-size: 13px;
  font-weight: 650;
}
.site-header .connection-state[data-status="live"] { color: var(--color-accent-hover); background: transparent; }
.site-header .connection-state[data-status="reconnecting"] { color: var(--color-text-secondary); background: transparent; }
.site-header .connection-state[data-status="paused"] { color: var(--color-text-secondary); background: transparent; }
.site-header .updated-at {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #94a3b8;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.header-local-controls { display: inline-flex; align-items: center; gap: 12px; }
.header-menu-toggle {
  height: 36px;
  min-height: 36px;
  border-radius: 10px;
  box-shadow: none;
}

.header-menu-toggle {
  display: none;
  width: 40px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--color-accent-border);
  color: #5f6f86;
  background: transparent;
  cursor: pointer;
}
.header-menu-toggle:hover { color: var(--blue); background: var(--blue-soft); }
.header-menu-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.header-menu-toggle .menu-icon-close { display: none; }
.header-menu-toggle[aria-expanded="true"] .menu-icon-open { display: none; }
.header-menu-toggle[aria-expanded="true"] .menu-icon-close { display: block; }

.header-mobile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: max(16px, calc((100vw - 1600px) / 2 + 24px));
  width: fit-content;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - var(--header-height) - 24px);
  padding: 10px;
  overflow-y: auto;
  border: 1px solid #dce6f3;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(29, 45, 75, 0.14);
}
.header-mobile-menu .home-nav { display: flex; width: max-content; max-width: 100%; align-items: stretch; flex-direction: column; gap: 2px; }
.header-mobile-menu .home-nav a { width: auto; max-width: 100%; justify-content: flex-start; }
.header-mobile-controls { margin-top: 8px; padding-top: 10px; border-top: 1px solid #e8eef6; }
.header-mobile-controls:empty { display: none; min-height: 0; margin: 0; padding: 0; border: 0; }
.header-mobile-controls .header-local-controls { width: 100%; }
.header-mobile-controls .language-switcher { width: auto; flex: 1; }
.header-mobile-controls .language-switcher strong { display: inline; }
.header-mobile-controls .theme-toggle { flex: 0 0 40px; }

@media (max-width: 1199px) {
  .site-header .updated-at-prefix { display: none; }
}

@media (max-width: 899px) {
  .site-header .home-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    padding-block: 0;
  }
  .site-header .topbar-actions {
    grid-column: auto;
    grid-row: auto;
    padding-bottom: 0;
  }
  .site-header .header-center-slot { display: none; }
  .site-header .header-menu-toggle { display: grid; }
  .site-header .updated-at { display: none; }
  .site-header .header-mobile-menu {
    right: 16px;
    width: fit-content;
    max-width: calc(100vw - 32px);
  }
}

@media (max-width: 639px) {
  .site-header .home-topbar { gap: 10px; padding-inline: 16px; }
  .site-header .topbar-actions { gap: 10px; }
  .site-header .market-status-group { gap: 0; }
}

@media (max-width: 419px) {
  .site-header .brand strong { max-width: 34vw; }
}
