:root {
  color-scheme: light;
  --canvas: #f4f7fb;
  --surface-1: #ffffff;
  --surface-2: #edf2f8;
  --surface-3: #e3eaf4;
  --line: #cad5e3;
  --line-strong: #9aabc0;
  --text: #172033;
  --text-2: #283a52;
  --muted: #475c74;
  --dim: #53687f;
  --accent: #465bd7;
  --accent-strong: #3449c1;
  --accent-2: #3249b9;
  --green: #117a3a;
  --red: #b4233c;
  --yellow: #7a5100;
  --strategy-match-surface: #e4f4e8;
  --strategy-match-border: #168544;
  --strategy-match-badge: #0c6b32;
  --strategy-reject-surface: #fdebed;
  --strategy-reject-border: #c23445;
  --strategy-reject-badge: #a51f36;
  --strategy-badge-text: #ffffff;
  --page-inline-inset: 24px;
  --panel-heading-block-inset: 16px;
  --panel-heading-inline-inset: 20px;
  --panel-content-inset: 16px;
  --panel-item-gap: 8px;
  --panel-heading-height: 76px;
  --panel-workspace-min-height: 620px;
  --panel-border-width: 1px;
  --panel-radius: 12px;
  --action-control-height: 44px;
  --type-panel-title: 20px;
  --type-ui: 14px;
  --radius: var(--panel-radius);
  --control: 8px;
  --sans: Inter, Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; }
html { min-height: 100%; scrollbar-gutter: stable; }
body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
h1, h2, h3, p { margin-top: 0; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 12px 16px;
  border: 1px solid var(--accent-2);
  border-radius: var(--control);
  background: var(--surface-3);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.shell {
  display: flex;
  width: min(1440px, 100%);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 0 var(--page-inline-inset) 28px;
  flex-direction: column;
}
main { display: flex; width: 100%; flex: 1 0 auto; flex-direction: column; }
.app-view { width: 100%; flex: 1 0 auto; }
.app-view[hidden] { display: none !important; }
.app-view:focus, main:focus { outline: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  min-height: 64px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--canvas) 94%, transparent);
  backdrop-filter: blur(14px);
}
.brand { display: inline-flex; width: max-content; min-height: 44px; gap: 11px; align-items: center; }
.brand-mark {
  width: 32px;
  height: 32px;
  padding: 3px;
  border-radius: var(--control);
  background: var(--accent);
  color: #fff;
}
.brand-bones { fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; }
.brand-skull { fill: currentColor; }
.brand-eye { fill: var(--accent); }
.brand-copy strong, .brand-copy small { display: block; }
.brand-copy strong { font-size: 14px; letter-spacing: .12em; }
.brand-copy small { margin-top: 3px; color: var(--dim); font-size: 13px; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a {
  display: inline-flex;
  min-height: 40px;
  padding: 0 13px;
  align-items: center;
  border-radius: var(--control);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.nav a:hover, .nav a.active { background: var(--surface-2); color: var(--text); }
.connection { justify-self: end; display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.status-dot.online { background: var(--green); }
.status-dot.offline { background: var(--red); }
.access-mode { padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13px; }
.access-mode.public { border-color: var(--strategy-match-border); background: var(--strategy-match-surface); color: var(--strategy-match-badge); font-weight: 700; }
[hidden] { display: none !important; }
.signature { margin-left: 2px; padding-left: 9px; border-left: 1px solid var(--line-strong); color: var(--text-2); font-size: 13px; font-weight: 650; letter-spacing: .035em; white-space: nowrap; }

.panel {
  width: 100%;
  margin: 24px 0 16px;
  border: var(--panel-border-width) solid var(--line);
  border-radius: var(--panel-radius);
  background: var(--surface-1);
  overflow: hidden;
}
.primary-panel, .calendar-panel { min-height: calc(100svh - 108px); }
.panel-heading {
  display: flex;
  min-height: var(--panel-heading-height);
  padding: var(--panel-heading-block-inset) var(--panel-heading-inline-inset);
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.heading-copy { display: flex; min-width: 0; gap: 12px; align-items: center; }
.heading-copy h1, .heading-copy h2 { margin: 0; font-size: var(--type-panel-title); font-weight: 650; letter-spacing: -.025em; line-height: 1.3; }
.heading-copy p, .calendar-attribution { margin: 5px 0 0; font-size: var(--type-ui); line-height: 1.5; }
.heading-copy p { color: var(--dim); font-weight: 500; }
.heading-copy p strong { color: var(--muted); font-family: var(--mono); font-weight: 500; }
.calendar-attribution { display: inline-block; color: var(--accent-2); font-weight: 650; }
.calendar-attribution:hover { text-decoration: underline; }
.panel-actions { display: flex; gap: 12px; align-items: center; }
.operation-status { display: inline-flex; gap: 7px; align-items: center; color: var(--muted); font-size: var(--type-ui); line-height: 1.45; white-space: nowrap; }
.operation-status::before { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); content: ""; }
.operation-status[data-state="success"] { color: var(--green); }
.operation-status[data-state="success"]::before { background: var(--green); }
.operation-status[data-state="warning"] { color: var(--yellow); }
.operation-status[data-state="warning"]::before { background: var(--yellow); }
.operation-status[data-state="failure"] { color: var(--red); }
.operation-status[data-state="failure"]::before { background: var(--red); }
.operation-status[data-state="running"]::before { background: var(--accent-2); animation: pulse 1s ease-in-out infinite; }

.button, .auto-analysis-button, .retry-auto-button {
  min-height: var(--action-control-height);
  border: 1px solid var(--line-strong);
  border-radius: var(--control);
  background: var(--surface-2);
  cursor: pointer;
  font-weight: 650;
}
.button { padding: 0 15px; font-size: var(--type-ui); }
.button:hover { border-color: var(--muted); background: var(--surface-3); }
.button:disabled, .auto-analysis-button:disabled, .retry-auto-button:disabled { cursor: wait; opacity: .55; }

.drop-workspace { min-width: 0; min-height: var(--panel-workspace-min-height); background: var(--canvas); }
.drop-feed { display: grid; min-height: var(--panel-workspace-min-height); padding: var(--panel-content-inset); gap: var(--panel-item-gap); align-content: start; }
.drop-feed[aria-busy="true"], .calendar-board[aria-busy="true"] { opacity: .62; }
.empty-state {
  display: flex;
  min-height: 330px;
  padding: 30px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
}
.empty-state.slim { min-height: 140px; }
.empty-state h3 { margin: 14px 0 5px; color: var(--text-2); font-size: 16px; }
.empty-state p { max-width: 420px; margin: 0; color: var(--dim); font-size: 14px; line-height: 1.65; }
.radar-icon { width: 36px; height: 36px; border: 1px solid var(--line-strong); border-radius: 50%; }

.drop-card {
  display: grid;
  grid-template-columns: minmax(220px, .32fr) minmax(260px, 1fr) 150px;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-1);
}
.drop-card.strategy-match {
  border-color: var(--strategy-match-border);
  border-left-width: 5px;
  background: var(--strategy-match-surface);
  box-shadow: inset 3px 0 0 var(--strategy-match-border);
}
.drop-card.strategy-reject {
  border-color: var(--strategy-reject-border);
  border-left-width: 5px;
  background: var(--strategy-reject-surface);
  box-shadow: inset 3px 0 0 var(--strategy-reject-border);
}
.drop-card a, .drop-card button, .drop-card details { cursor: pointer; }
.drop-identity { min-width: 0; padding-right: 16px; border-right: 1px solid var(--line); }
.strategy-badge {
  display: inline-flex;
  min-height: 26px;
  margin-bottom: 9px;
  padding: 3px 9px;
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--strategy-badge-text);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
}
.strategy-badge.match { border-color: var(--strategy-match-border); background: var(--strategy-match-badge); }
.strategy-badge.reject { border-color: var(--strategy-reject-border); background: var(--strategy-reject-badge); }
.drop-symbol-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: baseline; }
.ticker { color: var(--text); font: 700 21px/1.25 var(--mono); }
.drop-price { text-align: right; }
.drop-price small, .drop-price strong, .drop-rate small, .drop-rate strong { display: block; }
.drop-price small { color: var(--dim); font-size: 13px; line-height: 1.4; }
.drop-price strong { margin-top: 2px; color: var(--text-2); font: 600 16px/1.25 var(--mono); }
.drop-rate { display: flex; grid-column: 1 / -1; gap: 8px; align-items: baseline; }
.drop-rate small { color: var(--dim); font-size: 13px; line-height: 1.45; }
.drop-rate strong { color: var(--red); font: 650 21px/1.25 var(--mono); }
.drop-cause { min-width: 0; }
.cause-heading { display: flex; min-height: 20px; align-items: center; }
.cause-heading small { color: var(--dim); font-size: 13px; font-weight: 600; }
.drop-reason { margin: 9px 0 0; color: var(--text-2); font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; }
.drop-actions { display: flex; width: 150px; min-width: 0; gap: 10px; flex-direction: column; align-items: stretch; justify-content: space-between; }
.source-link { display: inline-flex; min-height: 32px; align-items: center; color: var(--accent-2); font-size: 14px; line-height: 1.45; font-weight: 600; }
.source-link:hover { text-decoration: underline; }
.source-link.unavailable { color: var(--dim); }
.auto-analysis-button, .retry-auto-button {
  display: flex;
  width: 100%;
  padding: 9px 11px;
  align-items: center;
  justify-content: space-between;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
}
.auto-analysis-button:not(:disabled):hover, .retry-auto-button:not(:disabled):hover { border-color: var(--accent-2); background: var(--accent-strong); }
.auto-analysis-status {
  display: flex;
  width: 100%;
  min-height: var(--action-control-height);
  padding: 9px 11px;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line-strong);
  border-radius: var(--control);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}
.auto-analysis-status.complete { border-color: color-mix(in srgb, var(--green) 45%, var(--line)); color: var(--green); }
.auto-analysis-status.review { border-color: color-mix(in srgb, var(--yellow) 45%, var(--line)); color: var(--yellow); }
.auto-analysis-status.failure { border-color: color-mix(in srgb, var(--red) 45%, var(--line)); color: var(--red); }
.auto-analysis-status.unavailable { color: var(--yellow); }

.drop-news, .evidence-list { margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.drop-news > summary, .evidence-list > summary { width: max-content; max-width: 100%; cursor: pointer; font-weight: 600; }
.drop-news > div, .evidence-list > div { display: grid; gap: 6px; margin-top: 8px; }
.source-entry { min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--control); background: var(--canvas); }
.source-primary { display: grid; gap: 4px; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.source-primary small { display: block; color: var(--dim); font-size: 13px; line-height: 1.5; }
a.source-primary:hover { color: var(--text); }
.source-summary { margin: 2px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }

.auto-analysis { grid-column: 1 / -1; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--canvas); cursor: default; }
.auto-analysis.running { border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); }
.auto-analysis.success { border-color: color-mix(in srgb, var(--green) 38%, var(--line)); }
.auto-analysis.review { border-color: color-mix(in srgb, var(--yellow) 45%, var(--line)); }
.auto-analysis.error { border-color: color-mix(in srgb, var(--red) 45%, var(--line)); }
.analysis-head { display: flex; gap: 10px; align-items: center; }
.analysis-head > div { min-width: 0; }
.analysis-head small, .analysis-head strong { display: block; }
.analysis-head small { margin-bottom: 3px; color: var(--dim); font-size: 13px; }
.analysis-head strong { color: var(--text-2); font-size: 16px; line-height: 1.45; }
.analysis-badges { display: flex; gap: 6px; margin-top: 7px; align-items: center; flex-wrap: wrap; }
.analysis-badges span { display: inline-flex; min-height: 24px; padding: 3px 8px; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13px; font-weight: 650; line-height: 1.3; }
.analysis-completion-badge { color: var(--muted); background: var(--surface-1); }
.analysis-precision-badge.exact { border-color: color-mix(in srgb, var(--green) 48%, var(--line)); color: var(--green); }
.analysis-precision-badge.estimate { border-color: color-mix(in srgb, var(--accent) 52%, var(--line)); color: var(--accent-2); }
.analysis-precision-badge.lower-bound { border-color: color-mix(in srgb, var(--yellow) 52%, var(--line)); color: var(--yellow); }
.analysis-precision-badge.reference, .analysis-precision-badge.unresolved { color: var(--dim); }
.analysis-spinner, .analysis-state-icon { display: grid; width: 29px; height: 29px; flex: 0 0 auto; place-items: center; border: 1px solid var(--accent); border-radius: 50%; color: var(--accent-2); font: 700 12px/1 var(--mono); }
.analysis-spinner { border-right-color: transparent; animation: spin .8s linear infinite; }
.analysis-progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 9px; padding: 0; list-style: none; }
.analysis-progress li { display: flex; gap: 8px; align-items: center; color: var(--dim); font-size: 13px; line-height: 1.45; }
.analysis-progress i { display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; font: normal 650 12px/1 var(--mono); }
.analysis-progress li.active { color: var(--text-2); }
.analysis-progress li.active i { border-color: var(--accent); color: var(--accent-2); }
.analysis-progress li.done i { border-color: var(--green); color: var(--green); }
.auto-analysis.running > p, .calculation-withheld p, .evidence-missing { margin: 0; color: var(--dim); font-size: 14px; line-height: 1.65; }
.auto-summary { margin-top: 13px; padding: 11px; border-left: 2px solid var(--accent); background: var(--surface-1); }
.auto-summary p { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.65; }
.auto-result-grid { display: grid; grid-template-columns: 1.25fr repeat(3, 1fr); margin-top: 14px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.auto-result-grid > div { min-width: 0; padding: 13px; border-right: 1px solid var(--line); }
.auto-result-grid > div:last-child { border-right: 0; }
.auto-result-grid span, .auto-result-grid strong, .auto-result-grid small { display: block; }
.auto-result-grid span { margin-bottom: 7px; color: var(--dim); font-size: 13px; line-height: 1.45; }
.auto-result-grid strong { color: var(--text-2); font: 600 16px/1.3 var(--mono); overflow-wrap: anywhere; }
.auto-result-grid .hero-metric strong { color: var(--text); font-size: 28px; }
.auto-result-grid small { margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.fd-ev-overview { margin-top: 14px; }
.fd-ev-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.fd-ev-kpis > div { min-width: 0; padding: 12px; border-right: 1px solid var(--line); background: var(--surface-1); }
.fd-ev-kpis > div:last-child { border-right: 0; }
.fd-ev-kpis span, .fd-ev-kpis strong, .fd-ev-kpis small { display: block; }
.fd-ev-kpis span { margin-bottom: 7px; color: var(--dim); font-size: 13px; line-height: 1.45; }
.fd-ev-kpis strong { color: var(--text-2); font: 650 20px/1.3 var(--mono); overflow-wrap: anywhere; }
.fd-ev-kpis small { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.fd-ev-kpis .fd-ev-kpi-result { background: color-mix(in srgb, var(--accent) 7%, var(--canvas)); }
.fd-ev-kpis .fd-ev-kpi-result strong { color: var(--text); font-size: 24px; }
.fd-ev-kpis .fd-ev-zero-kpi { background: color-mix(in srgb, var(--accent) 4%, var(--surface-1)); }
.fd-ev-kpis .fd-ev-zero-kpi strong { color: var(--accent-2); font-size: 20px; }
.fd-ev-kpis .fd-ev-zero-kpi.estimate { background: color-mix(in srgb, var(--yellow) 4%, var(--surface-1)); }
.fd-ev-kpis .fd-ev-zero-kpi.estimate strong { color: var(--text-2); }
.fd-ev-bridge { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); margin-top: 8px; padding: 9px 11px; gap: 7px; align-items: center; border: 1px solid var(--line); border-radius: var(--control); background: var(--canvas); }
.fd-ev-bridge > div { min-width: 0; }
.fd-ev-bridge span, .fd-ev-bridge strong, .fd-ev-bridge small { display: block; }
.fd-ev-bridge span { color: var(--dim); font-size: 13px; line-height: 1.45; }
.fd-ev-bridge small { margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.fd-ev-bridge strong { margin-top: 4px; color: var(--text-2); font: 600 14px/1.4 var(--mono); overflow-wrap: anywhere; }
.fd-ev-bridge i { color: var(--dim); font: normal 650 14px/1 var(--mono); }
.fd-ev-bridge-result { padding-left: 9px; border-left: 1px solid var(--line-strong); }
.fd-ev-bridge-result strong { color: var(--accent-2); }
.cash-burn-panel { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(0, 2.2fr); margin-top: 8px; padding: 10px 11px; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: var(--control); background: var(--surface-1); }
.cash-burn-heading strong, .cash-burn-heading small { display: block; }
.cash-burn-heading strong { color: var(--text-2); font-size: 14px; }
.cash-burn-heading small { margin-top: 4px; color: var(--dim); font-size: 13px; line-height: 1.5; }
.cash-burn-quarters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.cash-burn-quarters > div { min-width: 0; padding-left: 8px; border-left: 1px solid var(--line-strong); }
.cash-burn-quarters span, .cash-burn-quarters strong { display: block; }
.cash-burn-quarters span { color: var(--dim); font-size: 13px; }
.cash-burn-quarters strong { margin-top: 4px; color: var(--text-2); font: 600 14px/1.4 var(--mono); overflow-wrap: anywhere; }
.cash-burn-quarters p { margin: 0; color: var(--dim); font-size: 13px; }
.valuation-details { margin-top: 10px; border-top: 1px solid var(--line); }
.valuation-details > summary { width: max-content; max-width: 100%; padding-top: 12px; cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 650; }
.valuation-details[open] > summary { color: var(--text-2); }
.valuation-details-body { padding-top: 2px; }
.zero-crossing-explanation { margin: 10px 0 0; padding: 10px 12px; border-left: 2px solid var(--yellow); background: var(--surface-1); color: var(--text-2); font-size: 14px; line-height: 1.65; }
.estimate-detail-title { margin: 0 0 9px; color: var(--muted); font-size: 13px; }
.estimate-detail-title strong { color: var(--text-2); }
.positive { color: var(--green) !important; }
.negative { color: var(--red) !important; }
.review-reasons, .calculation-withheld, .analysis-warnings, .result-certainty { margin-top: 13px; padding: 11px; border: 1px solid color-mix(in srgb, var(--yellow) 38%, var(--line)); border-radius: var(--control); }
.review-reasons { background: color-mix(in srgb, var(--yellow) 6%, var(--canvas)); }
.review-reasons > strong, .calculation-withheld strong { display: block; margin-bottom: 6px; color: var(--yellow); font-size: 14px; }
.review-reasons p { margin: 0 0 7px; color: var(--text-2); font-size: 14px; line-height: 1.65; }
.review-reasons ul, .analysis-warnings ul { margin: 0; padding-left: 19px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.analysis-warnings > strong, .evidence-list > strong { display: block; margin-bottom: 7px; color: var(--muted); font-size: 14px; font-weight: 650; }
.analysis-warnings > strong { color: var(--yellow); }
.result-certainty { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.result-certainty > div { min-width: 0; padding: 10px; border-radius: var(--control); background: var(--surface-1); }
.result-certainty strong { display: block; margin-bottom: 5px; color: var(--text-2); font-size: 14px; }
.result-certainty p, .model-classification-note { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.certainty-confirmed { border-left: 2px solid var(--green); }
.certainty-limited { border-left: 2px solid var(--yellow); }
.estimate-result-grid .hero-metric { background: color-mix(in srgb, var(--accent) 5%, var(--canvas)); }
.estimate-disclosure { margin-top: 13px; padding: 12px; border: 1px solid color-mix(in srgb, var(--yellow) 42%, var(--line)); border-radius: var(--control); background: color-mix(in srgb, var(--yellow) 4%, var(--canvas)); }
.estimate-context { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.estimate-context p, .estimate-included { min-width: 0; margin: 0; padding: 9px 10px; border-radius: var(--control); background: var(--surface-1); }
.estimate-context strong, .estimate-context span, .estimate-included strong, .estimate-included span { display: block; }
.estimate-context strong, .estimate-included strong, .estimate-omissions > strong, .estimate-exact-blockers > strong { margin-bottom: 4px; color: var(--text-2); font-size: 13px; }
.estimate-context span, .estimate-included span { color: var(--muted); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.estimate-included { margin-top: 8px; }
.estimate-omissions, .estimate-exact-blockers { margin-top: 9px; padding: 10px; border-left: 2px solid var(--yellow); background: var(--surface-1); }
.estimate-omissions p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.estimate-omissions ul, .estimate-exact-blockers ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.estimate-warning { margin: 9px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.estimate-warning strong { margin-right: 7px; color: var(--yellow); }
.model-classification-note { margin-top: 10px; padding: 9px 10px; border-left: 2px solid var(--accent); background: var(--surface-1); }
.model-classification-note strong { color: var(--text-2); }
.retry-auto-button { width: max-content; min-height: var(--action-control-height); margin-top: 10px; }

.calendar-view { padding-top: 0; }
.calendar-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .32fr); min-height: var(--panel-workspace-min-height); }
.calendar-board { min-width: 0; padding: var(--panel-content-inset); border-right: 1px solid var(--line); background: var(--canvas); }
.calendar-candidate-notice { margin: 0 0 12px; padding: 11px 13px; border: 1px solid color-mix(in srgb, var(--yellow) 42%, var(--line)); border-radius: var(--control); background: color-mix(in srgb, var(--yellow) 8%, var(--surface-1)); color: var(--text-2); font-size: 14px; font-weight: 650; line-height: 1.5; }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-bottom: 0; border-radius: 9px 9px 0 0; overflow: hidden; }
.calendar-weekdays span { padding: 10px 4px; border-right: 1px solid var(--line); color: var(--dim); font-size: 13px; line-height: 1.4; font-weight: 650; text-align: center; }
.calendar-weekdays span:last-child { border-right: 0; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; padding: 1px; background: var(--line); border-radius: 0 0 9px 9px; overflow: hidden; }
.calendar-day { min-width: 0; min-height: 148px; padding: 10px; background: var(--surface-1); }
.calendar-day.today { background: color-mix(in srgb, var(--accent) 8%, var(--surface-1)); box-shadow: inset 0 2px var(--accent); }
.calendar-day-number { display: flex; gap: 6px; align-items: center; justify-content: space-between; color: var(--muted); font: 600 13px/1.45 var(--mono); }
.calendar-day-number small { color: var(--accent-2); font: 650 12px/1.3 var(--sans); }
.calendar-day-events { display: grid; gap: 5px; margin-top: 9px; }
.calendar-event-chip, .calendar-review-chip {
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface-2);
  cursor: pointer;
  text-align: left;
}
.calendar-event-chip { display: grid; gap: 3px; padding: 7px; }
.calendar-event-chip strong { color: var(--text-2); font: 700 14px/1.35 var(--mono); overflow-wrap: anywhere; }
.calendar-event-chip small { overflow: hidden; color: var(--dim); font-size: 13px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event-chip:hover, .calendar-event-chip.active, .calendar-review-chip:hover, .calendar-review-chip.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface-2)); }
.calendar-review { margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); }
.review-heading { display: flex; margin-bottom: 9px; gap: 8px; align-items: center; }
.review-heading h2 { margin: 0; color: var(--muted); font-size: 14px; font-weight: 650; }
.review-heading span { display: grid; min-width: 24px; height: 24px; padding: 0 7px; place-items: center; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--dim); font: 650 12px/1 var(--mono); }
.calendar-review-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.calendar-review-chips > p { margin: 0; color: var(--dim); font-size: 13px; }
.calendar-review-chip { display: inline-flex; min-height: 34px; padding: 0 10px; gap: 8px; align-items: center; }
.calendar-review-chip strong { font: 700 14px/1.3 var(--mono); }
.calendar-review-chip span { color: var(--dim); font-size: 13px; }

.calendar-detail { min-width: 0; padding: 18px; background: var(--surface-2); }
.calendar-detail:focus { outline: 0; }
.calendar-detail-empty { display: flex; min-height: 360px; flex-direction: column; align-items: center; justify-content: center; color: var(--dim); text-align: center; }
.calendar-detail-empty > span { display: grid; width: 30px; height: 30px; margin-bottom: 12px; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; }
.calendar-detail-empty strong { color: var(--muted); font-size: 14px; }
.calendar-detail-empty p { max-width: 280px; margin: 8px 0 0; font-size: 14px; line-height: 1.65; }
.calendar-detail-card { position: sticky; top: 82px; }
.calendar-detail-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.calendar-detail-head span { color: var(--dim); font-size: 13px; }
.calendar-detail-head strong { font: 700 19px/1.25 var(--mono); }
.calendar-detail-card > h2 { margin: 17px 0 11px; color: var(--text); font-size: 19px; line-height: 1.5; letter-spacing: -.02em; overflow-wrap: anywhere; }
.calendar-detail-summary { margin: 0 0 16px; color: var(--text-2); font-size: 14px; line-height: 1.65; }
.calendar-detail-card dl { display: grid; margin: 14px 0; border: 1px solid var(--line); border-radius: var(--control); overflow: hidden; }
.calendar-detail-card dl div { display: flex; min-height: 36px; padding: 8px 10px; gap: 12px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.calendar-detail-card dl div:last-child { border-bottom: 0; }
.calendar-detail-card dt { color: var(--dim); font-size: 13px; }
.calendar-detail-card dd { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.5; text-align: right; }
.detail-review-reason { padding: 10px; border-left: 2px solid var(--yellow); color: var(--yellow); font-size: 14px; line-height: 1.65; }
.official-source-button { display: flex; min-height: var(--action-control-height); padding: 0 12px; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: var(--control); color: var(--accent-2); font-size: var(--type-ui); font-weight: 650; }
.official-source-button:hover { border-color: var(--accent); }
.calendar-detail-sources { display: grid; gap: 6px; margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--line); }
.calendar-detail-sources h3 { margin: 0 0 3px; color: var(--muted); font-size: 14px; }

footer { display: flex; min-height: 54px; flex: 0 0 auto; align-items: center; justify-content: space-between; color: var(--dim); font-size: 12px; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 50; max-width: min(420px, calc(100vw - 28px)); padding: 12px 15px; border: 1px solid var(--line-strong); border-radius: var(--control); background: var(--surface-3); color: var(--text-2); font-size: 14px; line-height: 1.55; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .16s ease; }
.toast.show { opacity: 1; transform: none; }
.toast.error { border-color: var(--red); color: var(--red); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; } }

@media (max-width: 1100px) {
  .calendar-workspace { grid-template-columns: 1fr; }
  .calendar-board { border-right: 0; border-bottom: 1px solid var(--line); }
  .calendar-detail-card { position: static; }
  .calendar-detail-empty { min-height: 180px; }
}

@media (max-width: 820px) {
  :root { --page-inline-inset: 16px; }
  .topbar { grid-template-columns: auto 1fr auto; gap: 12px; }
  .brand-copy small, .read-only, #connection-text { display: none; }
  .drop-card { grid-template-columns: minmax(180px, .35fr) minmax(0, 1fr); }
  .drop-actions { grid-column: 1 / -1; width: auto; flex-direction: row; align-items: center; border-top: 1px solid var(--line); padding-top: 11px; }
  .auto-analysis-button, .auto-analysis-status { width: auto; min-width: 180px; }
  .auto-result-grid { grid-template-columns: repeat(2, 1fr); }
  .auto-result-grid > div { border-bottom: 1px solid var(--line); }
  .auto-result-grid > div:nth-child(2n) { border-right: 0; }
  .auto-result-grid > div:nth-last-child(-n + 2) { border-bottom: 0; }
  .calendar-day { min-height: 125px; padding: 8px; }
}

@media (max-width: 560px) {
  :root {
    --page-inline-inset: 12px;
    --panel-heading-block-inset: 14px;
    --panel-heading-inline-inset: 14px;
    --panel-content-inset: 9px;
  }
  html { scrollbar-gutter: auto; }
  .shell { padding-bottom: 18px; }
  .topbar { grid-template-columns: auto minmax(0, 1fr); margin: 0 calc(var(--page-inline-inset) * -1); padding: 6px var(--page-inline-inset) 0; }
  .nav { grid-column: 1 / -1; grid-row: 2; margin: 0 calc(var(--page-inline-inset) * -1); padding: 4px var(--page-inline-inset) 7px; }
  .connection { grid-column: 2; grid-row: 1; }
  .brand-copy strong { font-size: 12px; }
  .panel { margin-top: 14px; }
  .panel-heading { align-items: stretch; flex-direction: column; }
  .panel-actions { align-items: stretch; flex-direction: column; }
  .operation-status { min-height: 22px; white-space: normal; }
  .panel-actions .button { width: 100%; }
  .drop-card { grid-template-columns: 1fr; gap: 12px; padding: 14px; }
  .drop-identity { padding: 0 0 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .drop-actions { grid-column: auto; align-items: stretch; flex-direction: column; }
  .auto-analysis-button, .retry-auto-button, .auto-analysis-status { width: 100%; min-width: 0; }
  .auto-analysis { grid-column: auto; padding: 13px; }
  .analysis-progress { grid-template-columns: 1fr; }
  .fd-ev-kpis { grid-template-columns: 1fr 1fr; }
  .fd-ev-kpis > div { border-bottom: 1px solid var(--line); }
  .fd-ev-kpis > div:nth-child(2n) { border-right: 0; }
  .fd-ev-kpis > div:last-child { grid-column: 1 / -1; border-right: 0; border-bottom: 0; }
  .fd-ev-bridge { grid-template-columns: minmax(0, 1fr) auto; }
  .fd-ev-bridge-result { padding-left: 0; border-left: 0; }
  .cash-burn-panel { grid-template-columns: 1fr; }
  .cash-burn-quarters { grid-template-columns: 1fr 1fr; }
  .auto-result-grid { grid-template-columns: 1fr; }
  .auto-result-grid > div, .auto-result-grid > div:nth-child(2n), .auto-result-grid > div:nth-last-child(-n + 2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .auto-result-grid > div:last-child { border-bottom: 0; }
  .result-certainty { grid-template-columns: 1fr; }
  .estimate-context { grid-template-columns: 1fr; }
  .calendar-panel { min-height: calc(100svh - 88px); }
  .calendar-workspace { min-height: 0; }
  .calendar-weekdays span { padding: 9px 1px; font-size: 12px; }
  .calendar-day { min-height: 104px; padding: 6px 4px; }
  .calendar-day-number { display: grid; gap: 2px; justify-content: start; font-size: 12px; line-height: 1.4; }
  .calendar-day-number small { font-size: 12px; }
  .calendar-day-events { gap: 4px; margin-top: 6px; }
  .calendar-event-chip { padding: 6px 3px; text-align: center; }
  .calendar-event-chip strong { font-size: 13px; line-height: 1.35; }
  .calendar-event-chip small { display: none; }
  .calendar-detail { padding: 15px; }
  .calendar-detail-card > h2 { font-size: 18px; }
  footer { gap: 7px; align-items: flex-start; flex-direction: column; justify-content: center; }
}

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