:root {
  color-scheme: light;
  --canvas: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --ink: #15191e;
  --muted: #66717d;
  --faint: #929ca6;
  --line: #dfe4e8;
  --line-strong: #cbd2d8;
  --blue: #1268d3;
  --blue-soft: #eaf3ff;
  --green: #14805b;
  --green-soft: #e7f5ef;
  --red: #c53f3f;
  --red-soft: #fceceb;
  --amber: #9a6b08;
  --amber-soft: #fff5d9;
  --charcoal: #252b32;
  --header-surface: rgba(255, 255, 255, 0.98);
  --on-accent: #ffffff;
  --brand-mark: #252b32;
  --brand-mark-ink: #ffffff;
  --calendar-today: #252b32;
  --calendar-today-ink: #ffffff;
  --focus-ring: rgba(18, 104, 211, 0.2);
  --status-idle: #a7afb7;
  --shadow-soft: rgba(24, 31, 38, 0.12);
  --shadow-menu: rgba(24, 31, 38, 0.16);
  --shadow-dialog: rgba(23, 29, 35, 0.22);
  --dialog-backdrop: rgba(20, 25, 30, 0.38);
  --success-border: #a8d8c3;
  --error-border: #efb8b5;
  --control-hover-border: #aab4bd;
  --blue-hover: #074c9f;
  --primary-hover: #0e5dbd;
  --download-hover: #0864c7;
  --review-hover: #f7fbff;
  --table-hover: #f5f9fe;
  --positive-panel: #fbfdfc;
  --body-copy: #3e4750;
  --sync-border: #c6dbf5;
  --emoji-hover-border: #aebdcb;
  --emoji-hover: #f3f7fa;
  --chart-muted: #7a828a;
  --chart-grid: #e5e9ed;
  --chart-blue: #1776d2;
  --chart-green: #16815d;
  --chart-guide: #6f7780;
  --chart-red: #d94c4c;
  --market-up: #e3485f;
  --market-up-soft: rgba(227, 72, 95, 0.12);
  --market-down: #2f7edb;
  --market-down-soft: rgba(47, 126, 219, 0.12);
  font-family: Inter, Pretendard, "Noto Sans KR", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #101418;
  --surface: #171c21;
  --surface-soft: #1e252c;
  --ink: #edf1f4;
  --muted: #a7b1ba;
  --faint: #7e8994;
  --line: #2b343d;
  --line-strong: #3c4752;
  --blue: #68adff;
  --blue-soft: #172d45;
  --green: #51c997;
  --green-soft: #17382c;
  --red: #ff8585;
  --red-soft: #422526;
  --amber: #e6ba61;
  --amber-soft: #3b301b;
  --charcoal: #aeb8c1;
  --header-surface: rgba(16, 20, 24, 0.98);
  --brand-mark: #e6ebef;
  --brand-mark-ink: #12171c;
  --calendar-today: #e6ebef;
  --calendar-today-ink: #12171c;
  --focus-ring: rgba(104, 173, 255, 0.28);
  --status-idle: #68737e;
  --shadow-soft: rgba(0, 0, 0, 0.32);
  --shadow-menu: rgba(0, 0, 0, 0.42);
  --shadow-dialog: rgba(0, 0, 0, 0.55);
  --dialog-backdrop: rgba(0, 0, 0, 0.68);
  --success-border: #2e7359;
  --error-border: #85494b;
  --control-hover-border: #596673;
  --blue-hover: #9bc9ff;
  --primary-hover: #4d99ee;
  --download-hover: #4d99ee;
  --review-hover: #1a2835;
  --table-hover: #1b2935;
  --positive-panel: #17241f;
  --body-copy: #c8d0d7;
  --sync-border: #315b83;
  --emoji-hover-border: #596673;
  --emoji-hover: #252e36;
  --chart-muted: #9ba7b2;
  --chart-grid: #34404b;
  --chart-blue: #68adff;
  --chart-green: #51c997;
  --chart-guide: #9ba7b2;
  --chart-red: #ff8585;
  --market-up: #ff6479;
  --market-up-soft: rgba(255, 100, 121, 0.16);
  --market-down: #58a1f3;
  --market-down-soft: rgba(88, 161, 243, 0.16);
}

.public-site [data-private] {
  display: none !important;
}

.public-site .metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--canvas); }

body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
}

button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}
input::placeholder, textarea::placeholder { color: var(--faint); }

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(400px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  min-height: 72px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: var(--header-surface);
  transition: background-color 180ms ease, border-color 180ms ease;
}

.app-header::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  z-index: 2;
  height: 2px;
  background: var(--blue);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  content: "";
  pointer-events: none;
}

.app-header:has(#refresh.is-refreshing)::after {
  opacity: 1;
  animation: refresh-progress 1.05s ease-in-out infinite;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: max-content;
  color: var(--ink);
  text-decoration: none;
}

.brand-market-cluster {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 18px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  width: max-content;
  gap: 10px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: var(--brand-mark);
  color: var(--brand-mark-ink);
  font-size: 16px;
  font-weight: 850;
}

.office-entry {
  position: relative;
  flex: 0 0 34px;
  padding: 0;
  border: 0;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.office-entry:hover { transform: translateY(-1px); box-shadow: 0 0 0 3px var(--focus-ring); }
.office-entry.active { box-shadow: 0 0 0 3px var(--focus-ring), inset 0 -3px var(--blue); }

.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; font-weight: 820; }
.brand small { margin-top: 2px; color: var(--faint); font-size: 9px; font-weight: 750; }

.header-market-ticker {
  position: relative;
  display: grid;
  grid-template-columns: auto auto auto 8px;
  align-items: center;
  min-width: 0;
  max-width: 250px;
  min-height: 36px;
  padding: 0 10px 0 16px;
  overflow: hidden;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  gap: 7px;
}

.header-market-ticker:hover { background: var(--surface-soft); }
.header-market-ticker > span,
.header-market-ticker > strong,
.header-market-ticker > em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-market-ticker > span { color: var(--muted); font-size: 10px; font-weight: 720; }
.header-market-ticker > strong { font-size: 11px; font-weight: 780; }
.header-market-ticker > em { color: var(--faint); font-size: 10px; font-style: normal; font-weight: 780; }
.header-market-ticker.up > em { color: var(--market-up); }
.header-market-ticker.down > em { color: var(--market-down); }
.header-market-ticker > i {
  width: 6px;
  height: 6px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.header-market-ticker.changing > span,
.header-market-ticker.changing > strong,
.header-market-ticker.changing > em { animation: market-ticker-swap 260ms ease both; }

.primary-nav {
  display: flex;
  align-items: center;
  align-self: stretch;
  gap: 4px;
}

.nav-tab {
  position: relative;
  align-self: stretch;
  min-width: 68px;
  padding: 0 15px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 720;
}

.nav-tab:hover { color: var(--ink); }
.nav-tab.active { color: var(--ink); }
.nav-tab.active::after {
  position: absolute;
  right: 14px;
  bottom: -1px;
  left: 14px;
  height: 3px;
  background: var(--blue);
  content: "";
}

.runtime-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  gap: 8px;
}

.runtime-status strong { color: var(--ink); font-size: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--status-idle); }
.status-dot.active { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.status-separator { width: 1px; height: 14px; background: var(--line); }

.icon-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}
.icon-button:hover { background: var(--surface-soft); }
.icon-button:disabled { cursor: default; opacity: 0.72; }
.currency-toggle {
  display: grid;
  grid-template-columns: repeat(2, 34px);
  align-items: center;
  flex: 0 0 auto;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface-soft);
}
.currency-toggle button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--faint);
  font-size: 13px;
  font-weight: 800;
}
.currency-toggle button:hover { color: var(--ink); }
.currency-toggle button.is-active {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 1px 3px var(--shadow-soft);
  color: var(--ink);
}
.theme-icon { display: grid; place-items: center; width: 20px; height: 20px; font-family: "Segoe UI Symbol", sans-serif; font-size: 19px; line-height: 1; }
.theme-icon::before { content: "☾"; }
html[data-theme="dark"] .theme-icon::before { content: "☀︎"; font-size: 17px; }
.refresh-icon { display: block; }
#refresh.is-refreshing .refresh-icon { animation: refresh-spin 0.72s linear infinite; }

.refresh-feedback {
  position: absolute;
  top: calc(100% + 9px);
  right: 32px;
  z-index: 30;
  min-width: 118px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: 0 8px 22px var(--shadow-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  text-align: center;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
}
.refresh-feedback.visible { opacity: 1; transform: translateY(0); }
.refresh-feedback[data-tone="success"] { border-color: var(--success-border); color: var(--green); }
.refresh-feedback[data-tone="error"] { border-color: var(--error-border); color: var(--red); }

.auth-entry {
  position: relative;
  flex: 0 0 auto;
}

.auth-login-button,
.auth-user-button {
  min-width: 58px;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

.auth-login-button:hover,
.auth-user-button:hover { border-color: var(--control-hover-border); background: var(--surface-soft); }
.auth-login-button[hidden], .auth-user-button[hidden] { display: none; }
.auth-user-button { display: inline-flex; align-items: center; max-width: 128px; gap: 6px; }
.auth-user-button span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.auth-user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 136px;
  padding: 4px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 14px 36px var(--shadow-menu);
  white-space: normal;
}

.auth-user-menu[hidden] { display: none; }
.auth-user-menu button {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 680;
  text-align: left;
}
.auth-user-menu button:hover { background: var(--surface-soft); }
.auth-user-menu button + button { border-top: 1px solid var(--line); color: var(--red); }

main { width: 100%; }
.view { min-height: calc(100vh - 72px); }
.view[hidden] { display: none; }
.view.is-refreshing { animation: refresh-content 520ms ease both; }
.view.refresh-complete { animation: refresh-complete 650ms ease both; }

@keyframes refresh-spin {
  to { transform: rotate(360deg); }
}

@keyframes refresh-progress {
  0% { transform: scaleX(0); transform-origin: left; }
  52% { transform: scaleX(0.72); transform-origin: left; }
  53% { transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}

@keyframes refresh-content {
  0%, 100% { opacity: 1; }
  45% { opacity: 0.76; }
}

@keyframes refresh-complete {
  0% { box-shadow: inset 0 2px 0 rgba(20, 128, 91, 0.5); }
  100% { box-shadow: inset 0 2px 0 rgba(20, 128, 91, 0); }
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  max-width: 1440px;
  min-height: 150px;
  margin: 0 auto;
  padding: 48px 32px 26px;
}

.page-heading h1 { margin: 4px 0 0; font-size: 30px; line-height: 1.2; font-weight: 800; }
.eyebrow, .section-kicker {
  margin: 0;
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.updated-at { color: var(--muted); font-size: 12px; font-weight: 600; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px 38px;
  gap: 12px;
}

.overview-live-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 1376px;
  margin: 0 auto 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.overview-live-strip > div { min-width: 0; min-height: 68px; padding: 14px 18px; }
.overview-live-strip > div + div { border-left: 1px solid var(--line); }
.overview-live-strip span,
.overview-live-strip strong { display: block; }
.overview-live-strip span { color: var(--muted); font-size: 10px; font-weight: 680; }
.overview-live-strip strong { margin-top: 7px; font-size: 15px; font-weight: 780; }

.metric {
  position: relative;
  min-width: 0;
  min-height: 126px;
  padding: 22px 22px 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}
.metric::before { position: absolute; top: 0; right: 0; left: 0; height: 3px; background: var(--charcoal); content: ""; }
.metric.accent-blue::before { background: var(--blue); }
.metric.accent-green::before { background: var(--green); }
.metric.accent-amber::before { background: var(--amber); }
.metric.loss::before { background: var(--red); }
.metric span, .metric strong, .metric small { display: block; }
.metric span { color: var(--muted); font-size: 12px; font-weight: 680; }
.metric strong { margin-top: 12px; overflow-wrap: anywhere; font-size: 25px; line-height: 1; font-weight: 790; }
.metric small { margin-top: 10px; color: var(--faint); font-size: 11px; font-weight: 620; }

.day-strength-band {
  padding: 28px max(32px, calc((100vw - 1440px) / 2 + 32px)) 34px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.day-strength-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  max-width: 1376px;
  margin: 0 auto 16px;
  gap: 20px;
}
.day-strength-heading h2 { margin: 4px 0 0; font-size: 18px; font-weight: 790; }
.day-strength-heading p { margin: 7px 0 0; color: var(--muted); font-size: 10px; }
.day-strength-status {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
}
.day-strength-status[data-status="ready"] { border-color: var(--green); color: var(--green); }
.day-strength-status[data-status="collecting"] { border-color: var(--blue); color: var(--blue); }
.day-strength-list { max-width: 1376px; margin: 0 auto; border-top: 1px solid var(--line-strong); }
.day-strength-row {
  display: grid;
  grid-template-columns: 28px minmax(145px, 1.25fr) 74px repeat(3, minmax(92px, .75fr)) minmax(180px, 1.25fr);
  align-items: center;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
  gap: 14px;
}
.day-strength-rank { color: var(--faint); font-size: 11px; font-weight: 760; text-align: center; }
.day-strength-symbol,
.day-strength-score,
.day-strength-metric { min-width: 0; }
.day-strength-symbol strong,
.day-strength-symbol small,
.day-strength-score strong,
.day-strength-score small,
.day-strength-metric strong,
.day-strength-metric small { display: block; }
.day-strength-symbol strong { font-size: 14px; font-weight: 810; }
.day-strength-symbol small { margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.day-strength-score { padding-left: 10px; border-left: 3px solid var(--line-strong); }
.day-strength-score.high { border-color: var(--green); }
.day-strength-score.medium { border-color: var(--blue); }
.day-strength-score.watch { border-color: var(--amber); }
.day-strength-score strong { font-size: 17px; font-weight: 820; }
.day-strength-score small,
.day-strength-metric small { margin-bottom: 4px; color: var(--faint); font-size: 9px; font-weight: 650; }
.day-strength-metric strong { overflow-wrap: anywhere; font-size: 12px; font-weight: 740; }
.day-strength-reasons { display: flex; min-width: 0; flex-wrap: wrap; gap: 4px 10px; }
.day-strength-reasons small { color: var(--muted); font-size: 10px; font-weight: 650; }
.day-strength-reasons small + small::before { margin-right: 10px; color: var(--line-strong); content: "·"; }
.day-strength-disclaimer { max-width: 1376px; margin: 12px auto 0; color: var(--faint); font-size: 9px; }
.closing-scan-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1376px;
  margin: 0 auto 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.closing-scan-strip > div { min-width: 0; min-height: 72px; padding: 15px 18px; }
.closing-scan-strip > div + div { border-left: 1px solid var(--line); }
.closing-scan-strip span,
.closing-scan-strip strong { display: block; }
.closing-scan-strip span { color: var(--muted); font-size: 10px; font-weight: 680; }
.closing-scan-strip strong { margin-top: 8px; overflow-wrap: anywhere; font-size: 15px; font-weight: 780; }
.closing-scan-strip .day-strength-status { width: fit-content; margin-top: 7px; font-size: 10px; }
.closing-day-strength { border-top: 0; }

.split-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.data-section { min-width: 0; padding: 30px 28px; }
.data-section:first-child { padding-left: max(32px, calc((100vw - 1440px) / 2 + 32px)); }
.data-section.fill-section { padding-right: max(32px, calc((100vw - 1440px) / 2 + 32px)); padding-left: 28px; border-left: 1px solid var(--line); }
.data-section.review-preview-section { padding-right: max(32px, calc((100vw - 1440px) / 2 + 32px)); padding-left: 28px; border-left: 1px solid var(--line); }

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 42px;
  margin-bottom: 16px;
  gap: 16px;
}
.section-heading h2 { margin: 4px 0 0; font-size: 18px; line-height: 1.2; font-weight: 780; }
.text-button { padding: 4px 0; border: 0; background: transparent; color: var(--blue); font-size: 12px; font-weight: 720; white-space: nowrap; }
.text-button:hover { color: var(--blue-hover); }

.compact-list { border-top: 1px solid var(--line); }
.compact-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, .8fr) 88px;
  align-items: center;
  width: 100%;
  min-height: 70px;
  padding: 10px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  gap: 14px;
}
.compact-row:not(.static):hover { background: var(--surface-soft); }
.compact-row.static { grid-template-columns: 48px minmax(110px, 1fr) minmax(100px, .8fr) 90px; }
.ticker-block, .row-meta, .row-result { min-width: 0; }
.ticker-block strong, .ticker-block small, .row-meta strong, .row-meta small, .row-result strong, .row-result small { display: block; }
.ticker-block strong { font-size: 15px; font-weight: 790; }
.ticker-block small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: keep-all;
}
.row-meta { text-align: right; }
.row-meta small, .row-result small { color: var(--faint); font-size: 10px; font-weight: 620; }
.row-meta strong, .row-result strong { margin-top: 5px; font-size: 13px; font-weight: 740; }
.row-result { text-align: right; }

.recent-review-list { border-top: 1px solid var(--line); }
.review-preview {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 20px;
  align-items: center;
  width: 100%;
  min-height: 104px;
  padding: 13px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  gap: 14px;
}
.review-preview:hover { background: var(--review-hover); }
.review-preview-date { align-self: start; padding-top: 3px; color: var(--blue); font-size: 10px; font-weight: 800; }
.review-preview-copy { min-width: 0; }
.review-preview-copy strong, .review-preview-copy p, .review-preview-copy small { display: block; }
.review-preview-copy strong { overflow: hidden; font-size: 14px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.review-preview-copy p { display: -webkit-box; margin: 6px 0 0; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.review-preview-copy small { margin-top: 7px; overflow: hidden; color: var(--faint); font-size: 9px; font-weight: 680; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.review-preview-arrow { color: var(--blue); font-size: 20px; line-height: 1; }

.side-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-height: 24px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 780;
}
.side-badge.buy { background: var(--red-soft); color: var(--red); }
.side-badge.sell { background: var(--blue-soft); color: var(--blue); }

.wide-band {
  max-width: 1440px;
  margin: 0 auto;
  padding: 36px 32px 52px;
}
.wide-band.flush-top { padding-top: 0; }
.compact-table-wrap { max-height: 590px; }

.table-wrap { width: 100%; overflow-x: auto; border-top: 1px solid var(--line-strong); }
.data-table { width: 100%; min-width: 820px; border-collapse: collapse; table-layout: fixed; background: var(--surface); }
.data-table th, .data-table td { height: 64px; padding: 0 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.data-table th { height: 48px; background: var(--surface-soft); color: var(--muted); font-size: 11px; font-weight: 760; white-space: nowrap; }
.data-table td { font-size: 13px; font-weight: 650; }
.data-table th:first-child, .data-table td:first-child { width: 190px; }
.data-table th.number, .data-table td.number { text-align: right; }
.data-table tbody tr[role="button"] { cursor: pointer; }
.data-table tbody tr:hover, .data-table tbody tr:focus-visible { background: var(--table-hover); outline: 0; }
.data-table td small { display: block; margin-top: 4px; font-size: 10px; }
.symbol-title, .symbol-subtitle { display: block; }
.symbol-title { font-size: 14px; font-weight: 800; }
.symbol-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 560;
  line-height: 1.4;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: keep-all;
}
.date-label { display: block; margin-bottom: 4px; color: var(--blue); font-size: 10px; font-weight: 760; }
.strong { font-weight: 780 !important; }
.positive { color: var(--green) !important; }
.negative { color: var(--red) !important; }
.neutral { color: var(--ink) !important; }

.records-heading { min-height: 126px; padding-top: 34px; }
.records-title { display: flex; align-items: center; gap: 10px; }
.records-title svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.secondary-button, .today-button {
  height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}
.secondary-button:hover, .today-button:hover { background: var(--surface-soft); }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.secondary-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.calendar-band {
  padding: 24px max(32px, calc((100vw - 1440px) / 2 + 32px)) 32px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.month-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 22px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.month-summary > div { min-height: 72px; padding: 15px 18px; }
.month-summary > div + div { border-left: 1px solid var(--line); }
.month-summary span, .month-summary strong { display: block; }
.month-summary span { color: var(--muted); font-size: 10px; font-weight: 680; }
.month-summary strong { margin-top: 6px; font-size: 18px; font-weight: 790; }
.calendar-toolbar { display: flex; align-items: center; min-height: 42px; margin-bottom: 14px; }
.calendar-toolbar h2 { min-width: 150px; margin: 0 6px; text-align: center; font-size: 18px; font-weight: 790; }
.calendar-toolbar .today-button { margin-left: auto; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-grid { border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.calendar-weekdays span { padding: 9px 8px; color: var(--faint); font-size: 10px; font-weight: 720; text-align: center; }
.calendar-day, .calendar-blank {
  min-height: 94px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.calendar-day {
  position: relative;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  padding: 10px;
  color: var(--muted);
  text-align: left;
}
.calendar-day:hover { background: var(--surface-soft); }
.calendar-day.selected { z-index: 1; outline: 2px solid var(--blue); outline-offset: -2px; background: var(--blue-soft); }
.calendar-day.today > span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--calendar-today); color: var(--calendar-today-ink); }
.calendar-day > span { font-size: 12px; font-weight: 700; }
.calendar-day strong { margin-top: auto; color: var(--ink); font-size: 12px; font-weight: 800; }
.calendar-day small { margin-top: 3px; color: var(--green); font-size: 10px; font-weight: 700; }
.calendar-blank { pointer-events: none; }

.record-list-band { max-width: 1440px; margin: 0 auto; padding: 34px 32px 60px; }
.record-summary { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; gap: 20px; }
.record-summary h2 { margin: 4px 0 0; font-size: 20px; font-weight: 780; }
.muted-count { color: var(--muted); font-size: 14px; }
.record-summary-stats { display: flex; align-items: center; color: var(--muted); font-size: 11px; gap: 18px; }
.record-summary-stats strong { margin-left: 4px; color: var(--ink); font-size: 13px; }
.filters { display: flex; justify-content: flex-end; margin-bottom: 12px; gap: 8px; }
.search-field { display: flex; align-items: center; width: 220px; height: 38px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); color: var(--muted); gap: 7px; }
.search-field input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
select { height: 38px; padding: 0 30px 0 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 650; }
.alert-table { min-width: 920px; }
.records-dialog {
  width: min(1480px, calc(100vw - 40px));
  height: min(860px, calc(100vh - 40px));
  max-height: calc(100vh - 40px);
  overflow: hidden;
}
.records-dialog[open] { display: flex; flex-direction: column; }
.records-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; flex: 0 0 auto; padding: 24px 28px 20px; border-bottom: 1px solid var(--line); gap: 18px; }
.records-dialog-header h2 { margin: 5px 0 0; font-size: 24px; }
.records-dialog-actions { display: flex; align-items: center; gap: 8px; }
.records-dialog-actions .icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.record-summary-strip { flex: 0 0 auto; justify-content: flex-start; min-height: 52px; padding: 0 28px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.records-dialog .record-list-band { width: 100%; max-width: none; margin: 0; padding: 20px 28px 32px; overflow: auto; }

.learning-band { max-width: 1440px; margin: 0 auto; padding: 0 32px 48px; }
.learning-guide { display: grid; grid-template-columns: minmax(0, 1fr) 310px; min-height: 272px; margin-bottom: 18px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); }
.learning-guide-copy { display: flex; min-width: 0; flex-direction: column; padding: 30px 32px 24px; }
.learning-guide-copy h2 { margin: 7px 0 0; overflow-wrap: anywhere; font-size: 25px; line-height: 1.3; }
.learning-guide-copy > p { max-width: 760px; margin: 10px 0 22px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.learning-progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: auto; border-top: 1px solid var(--line); }
.learning-progress > div { position: relative; min-width: 0; padding: 15px 18px 0 0; }
.learning-progress > div + div { padding-left: 18px; }
.learning-progress > div + div::before { position: absolute; top: 14px; bottom: 0; left: 0; width: 1px; background: var(--line); content: ""; }
.learning-progress span, .learning-progress strong { display: block; }
.learning-progress span { color: var(--muted); font-size: 10px; font-weight: 700; }
.learning-progress strong { margin-top: 6px; overflow-wrap: anywhere; font-size: 14px; }
.learning-progress > div.active span { color: var(--blue); }
.learning-progress > div.active strong { color: var(--blue); }
.learning-guide-character { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-width: 0; margin: 0; padding: 10px 20px 18px; border-left: 1px solid var(--line); background: var(--surface); }
.learning-agent-visual { position: relative; display: grid; min-height: 188px; place-items: center; }
.learning-agent-visual img { position: relative; z-index: 1; display: block; width: 184px; height: 188px; object-fit: contain; }
.learning-agent-signal { position: absolute; right: 8px; bottom: 20px; display: flex; align-items: flex-end; height: 28px; gap: 4px; }
.learning-agent-signal i { display: block; width: 4px; height: 8px; background: var(--line-strong); }
.learning-agent-signal i:nth-child(2) { height: 15px; }
.learning-agent-signal i:nth-child(3) { height: 23px; }
.learning-guide-character figcaption { min-width: 0; border-top: 1px solid var(--line); padding-top: 12px; text-align: center; }
.learning-guide-character figcaption span, .learning-guide-character figcaption strong, .learning-guide-character figcaption small { display: block; }
.learning-guide-character figcaption span { color: var(--blue); font-size: 9px; font-weight: 800; }
.learning-guide-character figcaption strong { margin-top: 5px; overflow-wrap: anywhere; font-size: 14px; line-height: 1.35; }
.learning-guide-character figcaption small { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.learning-guide-character.is-online figcaption strong { color: var(--green); }
.learning-guide-character.is-offline figcaption strong { color: var(--red); }
.learning-guide-character[data-state="offline"] .learning-agent-signal i { background: var(--red); }
.learning-guide-character[data-state="scanning"] .learning-agent-signal i,
.learning-guide-character[data-state="tracking"] .learning-agent-signal i,
.learning-guide-character[data-state="validating"] .learning-agent-signal i { background: var(--blue); animation: agent-signal 1.1s ease-in-out infinite alternate; }
.learning-guide-character[data-state="tracking"] .learning-agent-signal i { background: var(--amber); }
.learning-guide-character[data-state="validating"] .learning-agent-signal i { background: var(--green); }
.learning-guide-character[data-state="scanning"] .learning-agent-signal i:nth-child(2),
.learning-guide-character[data-state="tracking"] .learning-agent-signal i:nth-child(2),
.learning-guide-character[data-state="validating"] .learning-agent-signal i:nth-child(2) { animation-delay: .18s; }
.learning-guide-character[data-state="scanning"] .learning-agent-signal i:nth-child(3),
.learning-guide-character[data-state="tracking"] .learning-agent-signal i:nth-child(3),
.learning-guide-character[data-state="validating"] .learning-agent-signal i:nth-child(3) { animation-delay: .36s; }
@keyframes agent-signal { from { opacity: .35; transform: scaleY(.65); } to { opacity: 1; transform: scaleY(1); } }
.learning-list { display: grid; gap: 16px; }
.weekly-learning-entry { border-top: 3px solid var(--blue); }
.learning-stats.weekly-learning-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.weekly-reason-list { margin: 15px 0 0; padding: 0; list-style: none; }
.weekly-reason-list li { display: flex; min-height: 36px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; gap: 18px; }
.weekly-reason-list strong { color: var(--ink); font-size: 11px; }
.weekly-validation-note { margin: 15px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.weekly-missed-row p { color: var(--muted); }
.learning-entry { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); }
.learning-entry-header { display: flex; align-items: flex-start; justify-content: space-between; width: 100%; padding: 24px 26px 20px; border: 0; background: transparent; color: var(--ink); text-align: left; gap: 24px; }
.learning-entry-toggle:hover { background: var(--surface-soft); }
.learning-entry-header > div { min-width: 0; }
.learning-date { color: var(--blue); font-size: 10px; font-weight: 800; }
.learning-entry-header h2 { margin: 6px 0 0; overflow-wrap: anywhere; font-size: 20px; line-height: 1.3; }
.learning-entry-header p { max-width: 900px; margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.learning-entry-summary { display: block; margin-top: 13px; color: var(--faint); font-size: 10px; font-weight: 700; line-height: 1.6; }
.learning-entry-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; }
.learning-chevron { color: var(--muted); font-size: 22px; line-height: 1; transition: transform .18s ease; }
.learning-entry.expanded .learning-chevron { transform: rotate(180deg); }
.learning-entry:not(.expanded) > :not(.learning-entry-toggle) { display: none; }
.learning-gate { flex: 0 0 auto; min-height: 26px; padding: 5px 8px; border-radius: 4px; font-size: 10px; font-weight: 760; white-space: nowrap; }
.learning-gate.collecting { background: var(--amber-soft); color: var(--amber); }
.learning-gate.ready { background: var(--green-soft); color: var(--green); }
.learning-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.learning-stats > div { min-width: 0; min-height: 74px; padding: 15px 18px; }
.learning-stats > div + div { border-left: 1px solid var(--line); }
.learning-stats span, .learning-stats strong { display: block; }
.learning-stats span { color: var(--muted); font-size: 10px; font-weight: 650; }
.learning-stats strong { margin-top: 7px; overflow-wrap: anywhere; font-size: 15px; }
.learning-stats small { display: block; margin-top: 4px; color: var(--faint); font-size: 9px; line-height: 1.4; }
.learning-paper-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: var(--positive-panel); }
.learning-paper-strip > div { min-width: 0; min-height: 66px; padding: 13px 18px; }
.learning-paper-strip > div + div { border-left: 1px solid var(--line); }
.learning-paper-strip span, .learning-paper-strip strong { display: block; }
.learning-paper-strip span { color: var(--muted); font-size: 10px; font-weight: 650; }
.learning-paper-strip strong { margin-top: 6px; overflow-wrap: anywhere; font-size: 13px; }
.learning-paper-strip .learning-trade-range { display: flex; flex-wrap: wrap; align-items: center; overflow-wrap: normal; gap: 2px 7px; }
.learning-trade-range > span { white-space: nowrap; }
.learning-trade-range .learning-trade-divider { color: var(--faint); }
.learning-content-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); }
.learning-section { min-width: 0; padding: 22px 26px 24px; }
.learning-section + .learning-section { border-left: 1px solid var(--line); }
.learning-section-heading span { color: var(--blue); font-size: 9px; font-weight: 800; }
.learning-section-heading h3 { margin: 4px 0 0; font-size: 14px; }
.learning-findings, .learning-decisions, .learning-alerts { margin: 15px 0 0; padding: 0; list-style: none; }
.learning-finding { position: relative; padding-left: 13px; }
.learning-finding + .learning-finding { margin-top: 15px; }
.learning-finding::before { position: absolute; top: 5px; left: 0; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); content: ""; }
.learning-finding.good::before { background: var(--green); }
.learning-finding.risk::before { background: var(--red); }
.learning-finding strong { display: block; overflow-wrap: anywhere; font-size: 12px; }
.learning-finding p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.learning-decisions li { position: relative; padding-left: 13px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.learning-decisions li + li { margin-top: 10px; }
.learning-decisions li::before { position: absolute; top: 0; left: 0; color: var(--blue); font-weight: 850; content: "·"; }
.learning-alert-section { padding: 20px 26px 24px; border-top: 1px solid var(--line); }
.learning-alert-section.strong-results { background: var(--positive-panel); }
.learning-under10-section { background: var(--surface-soft); }
.learning-analysis-note { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.learning-cohort-buckets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 16px 0 0; padding: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); list-style: none; }
.learning-cohort-buckets li { min-width: 0; padding: 13px 15px; }
.learning-cohort-buckets li + li { border-left: 1px solid var(--line); }
.learning-cohort-buckets span, .learning-cohort-buckets strong, .learning-cohort-buckets small { display: block; }
.learning-cohort-buckets span { color: var(--muted); font-size: 10px; font-weight: 700; }
.learning-cohort-buckets strong { margin-top: 5px; font-size: 15px; }
.learning-cohort-buckets small { margin-top: 4px; overflow-wrap: anywhere; color: var(--faint); font-size: 9px; line-height: 1.45; }
.learning-pattern-heading { margin-top: 18px; font-size: 11px; font-weight: 800; }
.learning-patterns { margin: 9px 0 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.learning-patterns li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(180px, .6fr); align-items: center; min-height: 62px; padding: 11px 0; border-bottom: 1px solid var(--line); gap: 20px; }
.learning-patterns strong, .learning-patterns span { display: block; }
.learning-patterns strong { overflow-wrap: anywhere; font-size: 11px; }
.learning-patterns span { margin-top: 4px; overflow-wrap: anywhere; color: var(--muted); font-size: 10px; line-height: 1.5; }
.learning-pattern-comparison { text-align: right; }
.learning-pattern-comparison strong { color: var(--red); }
.learning-alerts { border-top: 1px solid var(--line); }
.learning-alert-row { display: grid; grid-template-columns: minmax(180px, 0.8fr) minmax(130px, 0.5fr) minmax(220px, 1.7fr); align-items: center; min-height: 64px; padding: 11px 0; border-bottom: 1px solid var(--line); gap: 18px; }
.learning-alert-row > div { min-width: 0; }
.learning-alert-row strong, .learning-alert-row span { display: block; }
.learning-alert-row > div:first-child strong { font-size: 13px; }
.learning-alert-row > div:first-child span { margin-top: 3px; overflow-wrap: anywhere; color: var(--muted); font-size: 10px; }
.learning-alert-result { text-align: right; }
.learning-alert-result strong { font-size: 13px; }
.learning-alert-result span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.learning-alert-row p { min-width: 0; margin: 0; overflow-wrap: anywhere; color: var(--muted); font-size: 11px; line-height: 1.55; }
.learning-empty { min-height: 340px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }

.news-band { max-width: 1440px; margin: 0 auto; padding: 0 32px 52px; }
.news-source-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 18px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--line-strong); gap: 1px; }
.news-source-link { display: flex; min-width: 0; min-height: 82px; align-items: center; justify-content: space-between; padding: 15px 18px; border-top: 3px solid var(--charcoal); background: var(--surface); color: var(--ink); text-decoration: none; gap: 16px; }
.news-source-link > span { min-width: 0; }
.news-source-link strong, .news-source-link small { display: block; }
.news-source-link strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.news-source-link small { margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.news-source-link b { flex: 0 0 auto; color: var(--faint); font-size: 15px; font-weight: 600; }
.news-source-link.stocktitan { border-top-color: var(--blue); }
.news-source-link.pump { border-top-color: var(--amber); }
.news-source-link.fintel { border-top-color: var(--green); }
.news-source-link:hover { background: var(--surface-soft); }
.news-source-link:hover b { color: currentColor; }
.news-desk-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-bottom: 1px solid var(--line); background: var(--surface); }
.news-panel { min-width: 0; padding: 26px 28px 32px; }
.news-panel + .news-panel { border-left: 1px solid var(--line); }
.research-symbol-list { border-top: 1px solid var(--line); }
.research-symbol-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; min-height: 78px; padding: 12px 4px; border-bottom: 1px solid var(--line); gap: 18px; }
.research-symbol-row > div { min-width: 0; }
.research-symbol-row strong, .research-symbol-row span, .research-symbol-row small { display: block; }
.research-symbol-row strong { font-size: 15px; }
.research-symbol-row span { margin-top: 3px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.research-symbol-row small { margin-top: 6px; color: var(--faint); font-size: 10px; }
.research-symbol-row nav { display: flex; gap: 6px; }
.research-symbol-row a { min-width: 54px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 4px; color: var(--blue); font-size: 10px; font-weight: 750; text-align: center; text-decoration: none; }
.research-symbol-row a:hover { border-color: var(--blue); background: var(--blue-soft); }
.catalyst-list { border-top: 1px solid var(--line); }
.catalyst-row { display: block; min-height: 128px; padding: 16px 14px 15px; border-bottom: 1px solid var(--line); border-left: 3px solid var(--ink); color: var(--ink); text-decoration: none; }
.catalyst-row:hover { background: var(--surface-soft); }
.catalyst-row-head { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 14px; }
.catalyst-identity { display: flex; min-width: 0; align-items: baseline; gap: 9px; }
.catalyst-symbol { flex: 0 0 auto; color: var(--ink); font-size: 12px; font-weight: 850; }
.catalyst-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.catalyst-row.positive { border-left-color: var(--green); }
.catalyst-row.risk { border-left-color: var(--red); }
.catalyst-row.positive .catalyst-symbol, .catalyst-row.positive .catalyst-title, .catalyst-row.positive .catalyst-meta b { color: var(--green); }
.catalyst-row.risk .catalyst-symbol, .catalyst-row.risk .catalyst-title, .catalyst-row.risk .catalyst-meta b { color: var(--red); }
.catalyst-meta { flex: 0 0 auto; color: var(--faint); font-size: 9px; text-align: right; }
.catalyst-meta b { display: inline; margin-right: 7px; color: var(--muted); font-size: 9px; }
.catalyst-title { display: block; margin-top: 11px; overflow-wrap: anywhere; font-size: 12px; }
.catalyst-summary { margin: 5px 0 0; overflow-wrap: anywhere; color: var(--muted); font-size: 10px; line-height: 1.5; }
.catalyst-original { display: block; max-width: 100%; margin-top: 6px; overflow: hidden; color: var(--faint); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.account-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 1440px;
  margin: 0 auto 34px;
  padding: 0 32px;
}
.account-switcher-band {
  display: flex;
  align-items: flex-end;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px 18px;
  gap: 18px;
}
.account-switcher-label {
  flex: 0 0 auto;
  padding-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.account-switcher {
  display: flex;
  min-width: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line-strong);
  scrollbar-width: thin;
}
.account-person-tab {
  display: grid;
  flex: 0 0 auto;
  min-width: 108px;
  min-height: 52px;
  padding: 8px 16px 9px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  text-align: left;
  gap: 3px;
}
.account-person-tab strong { color: var(--ink); font-size: 12px; font-weight: 760; }
.account-person-tab small { color: var(--muted); font-size: 10px; font-weight: 620; }
.account-person-tab:hover { background: var(--surface-soft); }
.account-person-tab.active { border-bottom-color: var(--blue); background: var(--blue-soft); }
.account-person-tab.active strong { color: var(--blue); }
.account-strip > div { min-height: 98px; padding: 20px 22px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); background: var(--surface); }
.account-strip > div + div { border-left: 1px solid var(--line); }
.account-strip span, .account-strip strong, .account-strip small { display: block; }
.account-strip span { color: var(--muted); font-size: 11px; font-weight: 650; }
.account-strip strong { margin-top: 12px; overflow-wrap: anywhere; font-size: 20px; font-weight: 780; }
.account-strip small { margin-top: 5px; font-size: 11px; font-weight: 650; }
.live-scan-strip { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1440px; margin: 0 auto 34px; padding: 0 32px; }
.live-scan-strip > div { min-width: 0; min-height: 92px; padding: 18px 22px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.live-scan-strip > div + div { border-left: 1px solid var(--line); }
.live-scan-strip span, .live-scan-strip strong { display: block; }
.live-scan-strip span { color: var(--muted); font-size: 10px; font-weight: 650; }
.live-scan-strip strong { margin-top: 9px; overflow-wrap: anywhere; font-size: 18px; }
.section-note { color: var(--muted); font-size: 10px; font-weight: 700; }
.candidate-filters {
  display: flex;
  align-items: center;
  margin: 0 0 14px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  gap: 2px;
  scrollbar-width: thin;
}
.candidate-filters[hidden] { display: none; }
.candidate-filter {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 13px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 740;
}
.candidate-filter:hover { color: var(--ink); background: var(--surface-soft); }
.candidate-filter.is-active { border-bottom-color: var(--blue); color: var(--blue); }
.candidate-sort-mobile { display: none; }
.live-candidate-table { min-width: 1180px; }
.live-candidate-table th:nth-child(2), .live-candidate-table td:nth-child(2) { width: 112px; }
.live-candidate-table th:nth-child(3), .live-candidate-table td:nth-child(3) { width: 104px; }
.live-candidate-table th:nth-child(4), .live-candidate-table td:nth-child(4) { width: 88px; }
.live-candidate-table th:last-child, .live-candidate-table td:last-child { width: 220px; }
.candidate-sort-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  white-space: nowrap;
  gap: 5px;
}
.number .candidate-sort-button { width: 100%; justify-content: flex-end; }
.candidate-rank-header { display: table-cell; white-space: nowrap; }
.candidate-rank-header .candidate-sort-button { display: inline-flex; width: auto; }
.candidate-sort-button:hover, .candidate-sort-button:focus-visible { color: var(--ink); outline: 0; }
.candidate-sort-button.is-active { color: var(--blue); }
.sort-indicator { display: inline-block; min-width: 10px; color: var(--faint); font-size: 10px; text-align: center; }
.candidate-sort-button.is-active .sort-indicator { color: currentColor; }
.live-candidate-table tbody tr { cursor: pointer; }
.live-candidate-table tbody tr:hover { background: var(--surface-soft); }
.live-candidate-table td.number { white-space: nowrap; font-variant-numeric: tabular-nums; }
.live-candidate-table td:last-child { max-width: 260px; color: var(--muted); font-size: 10px; white-space: normal; }
.candidate-state-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 23px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
}
.candidate-state-chip.candidate-state-alertable { border-color: var(--success-border); background: var(--green-soft); color: var(--green); }
.candidate-state-chip.candidate-state-verifying { border-color: var(--sync-border); background: var(--blue-soft); color: var(--blue); }
.candidate-state-chip.candidate-state-near { border-color: var(--success-border); color: var(--green); }
.candidate-state-chip.candidate-state-building { border-color: var(--line-strong); color: var(--ink); }
.candidate-state-chip.candidate-state-blocked { border-color: var(--error-border); background: var(--red-soft); color: var(--red); }
.candidate-state-chip.candidate-state-recent { color: var(--faint); }
.candidate-state-chip.candidate-state-carryover { border-color: var(--amber); background: var(--amber-soft); color: var(--amber); }
.candidate-route { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; font-weight: 680; }
.candidate-rank-cell { color: var(--ink); }
.candidate-signal-score { font-size: 12px; font-weight: 780; }
.candidate-score-unit { margin-left: 2px; color: var(--muted); font-size: 9px; }
.candidate-score-track { display: block; width: 72px; height: 3px; margin: 6px 0 0 auto; overflow: hidden; background: var(--line); }
.candidate-score-track i { display: block; height: 100%; background: var(--faint); }
.candidate-score-strong .candidate-signal-score { color: var(--green); }
.candidate-score-strong .candidate-score-track i { background: var(--green); }
.candidate-score-ready .candidate-signal-score { color: var(--blue); }
.candidate-score-ready .candidate-score-track i { background: var(--blue); }
.candidate-score-watch .candidate-signal-score { color: var(--amber); }
.candidate-score-watch .candidate-score-track i { background: var(--amber); }
.candidate-score-low .candidate-signal-score { color: var(--red); }
.candidate-score-low .candidate-score-track i { background: var(--red); }
.candidate-score-recent .candidate-signal-score { color: var(--faint); }
.readiness-value { display: block; color: var(--ink); font-size: 12px; font-weight: 780; }
.readiness-track { display: block; width: 68px; height: 3px; margin: 6px 0 0 auto; overflow: hidden; background: var(--line); }
.readiness-track i { display: block; height: 100%; background: var(--blue); }
.candidate-status-detail { display: block; line-height: 1.5; }
.candidate-more-row { display: flex; justify-content: center; padding: 14px 20px 2px; border-top: 1px solid var(--line); }
.candidate-more-row[hidden] { display: none; }
.candidate-more-button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font-size: 11px;
  font-weight: 760;
  gap: 8px;
}
.candidate-more-button:hover { border-color: var(--blue); color: var(--blue); }
.candidate-gap-panel { padding: 18px 28px 2px; border-top: 1px solid var(--line); }
.candidate-gap-panel h3 { margin: 4px 0 12px; font-size: 15px; }
.candidate-gap-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.candidate-gap-item { min-width: 0; padding: 11px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.candidate-gap-item span, .candidate-gap-item strong { display: block; }
.candidate-gap-item span { color: var(--muted); font-size: 9px; font-weight: 680; }
.candidate-gap-item strong { margin-top: 4px; overflow-wrap: anywhere; color: var(--ink); font-size: 11px; line-height: 1.45; }
.candidate-gap-item.is-complete { grid-column: 1 / -1; border-left: 3px solid var(--green); }
.stage-chip { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 7px; border-radius: 4px; background: var(--surface-soft); color: var(--muted); font-size: 10px; font-weight: 760; }
.stage-chip.eligible { background: var(--green-soft); color: var(--green); }
.stage-stack { display: inline-flex; align-items: flex-start; flex-direction: column; gap: 4px; }
.stage-chip.alert-only, .mode-chip.alert-only { background: var(--amber-soft); color: var(--amber); }
.mode-chip { display: inline-flex; align-items: center; min-height: 22px; width: fit-content; padding: 3px 7px; border-radius: 4px; font-size: 10px; font-weight: 760; }
.record-mode { display: block; width: fit-content; margin-top: 5px; color: var(--muted); font-size: 9px; font-weight: 700; }
.record-mode.alert-only { padding: 2px 5px; border-radius: 3px; background: var(--amber-soft); color: var(--amber); }
.live-validation-band { border-top: 1px solid var(--line); }
.validation-status { display: inline-flex; align-items: center; min-height: 26px; padding: 4px 8px; border-radius: 4px; background: var(--amber-soft); color: var(--amber); font-size: 10px; font-weight: 760; }
.validation-status.ready { background: var(--green-soft); color: var(--green); }
.validation-summary { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.validation-summary > div { min-width: 0; padding: 14px 16px; }
.validation-summary > div + div { border-left: 1px solid var(--line); }
.validation-summary span, .validation-summary strong { display: block; }
.validation-summary span { color: var(--muted); font-size: 10px; font-weight: 650; }
.validation-summary strong { margin-top: 6px; font-size: 15px; }
.validation-table { min-width: 850px; }
.holdings-table { min-width: 1000px; }
.fills-table { min-width: 1260px; }
.performance-table { min-width: 1050px; }
.performance-exits-table { min-width: 900px; }
.performance-exits-band { padding-top: 4px; }

.source-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
}
.source-chip.account { background: var(--blue-soft); color: var(--blue); }
.source-chip.paper { background: var(--amber-soft); color: var(--amber); }
.source-chip.participant { background: var(--green-soft); color: var(--green); }

.empty-inline { min-height: 96px; padding: 34px 0; color: var(--muted); font-size: 12px; text-align: center; }
.empty-state { display: grid; place-items: center; align-content: center; min-height: 260px; color: var(--muted); gap: 6px; }
.empty-state[hidden] { display: none; }
.empty-state strong { color: var(--ink); font-size: 15px; }
.empty-state span { font-size: 12px; }

dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 70px var(--shadow-dialog);
}
dialog::backdrop { background: var(--dialog-backdrop); }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 26px 28px 20px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 5px 0 0; font-size: 26px; }
.dialog-header p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }

.auth-dialog,
.profile-dialog {
  width: min(430px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
}
.profile-dialog { width: min(680px, calc(100vw - 28px)); }

.auth-dialog-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.auth-dialog-header h2 { margin: 5px 0 0; font-size: 22px; }
.auth-panel { padding: 24px; }
.auth-panel[hidden] { display: none; }
.auth-form { display: grid; gap: 14px; }
.auth-declaration { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; line-height: 1.5; }
.auth-declaration input { flex: 0 0 16px; width: 16px; height: 16px; margin-top: 2px; }
.auth-policy { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.auth-field { display: grid; gap: 7px; }
.auth-field span { color: var(--muted); font-size: 11px; font-weight: 720; }
.auth-field input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
}
.auth-field input:hover { border-color: var(--control-hover-border); }
.auth-primary-button {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 5px;
  background: var(--blue);
  color: var(--on-accent);
  font-size: 13px;
  font-weight: 780;
}
.auth-primary-button:hover { background: var(--primary-hover); }
.auth-primary-button:disabled { cursor: wait; opacity: 0.65; }
.auth-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.auth-links button,
.auth-return-button {
  min-height: 34px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
}
.auth-links button:hover, .auth-return-button:hover { color: var(--blue); }
.auth-return-button { width: 100%; margin-top: 12px; }
.auth-message {
  margin: 0;
  padding: 9px 10px;
  border-radius: 4px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.5;
}
.auth-message.error { background: var(--red-soft); color: var(--red); }
.auth-message[hidden], .auth-result[hidden] { display: none; }
.auth-result {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 13px;
  font-weight: 720;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.profile-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  padding: 20px 24px;
  gap: 18px;
}
.profile-summary div { min-width: 0; }
.profile-summary dt { color: var(--muted); font-size: 10px; font-weight: 680; }
.profile-summary dd { margin: 6px 0 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 750; }
.profile-approval-status { padding: 11px 24px; border-top: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); font-size: 11px; font-weight: 680; }
.profile-approval-status.is-approved { background: var(--green-soft); color: var(--green); }
.profile-approval-status.is-pending { background: var(--amber-soft); color: var(--amber); }
.profile-password-section,
.profile-social-section { padding: 22px 24px 24px; border-top: 1px solid var(--line); }
.profile-password-section h3,
.profile-social-section h3 { margin: 0; font-size: 15px; }
.profile-section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 17px; }
.profile-section-heading h3 { margin-top: 4px; }
.profile-guide { margin: 0 0 18px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); }
.profile-guide summary { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 11px 14px; cursor: pointer; list-style: none; gap: 12px; }
.profile-guide summary::-webkit-details-marker { display: none; }
.profile-guide summary > span:first-child,
.profile-guide summary strong,
.profile-guide summary small { display: block; min-width: 0; }
.profile-guide summary strong { font-size: 12px; }
.profile-guide summary small { margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 560; line-height: 1.45; }
.profile-guide-toggle { flex: 0 0 auto; color: var(--muted); font-size: 20px; line-height: 1; transition: transform 160ms ease; }
.profile-guide[open] .profile-guide-toggle { transform: rotate(180deg); }
.profile-guide-steps { display: grid; margin: 0; padding: 3px 14px 15px; counter-reset: profile-guide; list-style: none; gap: 12px; }
.profile-guide-steps li { display: grid; grid-template-columns: 25px minmax(0, 1fr); position: relative; padding-left: 0; column-gap: 9px; counter-increment: profile-guide; }
.profile-guide-steps li::before { display: grid; grid-row: 1 / span 2; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: var(--blue); color: var(--on-accent); content: counter(profile-guide); font-size: 10px; font-weight: 800; }
.profile-guide-steps strong { align-self: center; font-size: 11px; }
.profile-guide-steps span { grid-column: 2; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.profile-guide-steps code { padding: 1px 4px; border-radius: 3px; background: var(--surface); color: var(--ink); font-size: 9px; }
.profile-guide-download { display: flex; align-items: center; justify-content: center; min-height: 40px; margin: 0 14px 14px; border-radius: 5px; background: var(--blue); color: var(--on-accent); font-size: 11px; font-weight: 760; text-decoration: none; }
.profile-guide-download:hover { background: var(--download-hover); }
.profile-guide-notes { padding: 12px 14px; border-top: 1px solid var(--line); background: var(--surface); }
.profile-guide-notes p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.profile-guide-notes p + p { margin-top: 6px; }
.profile-guide-notes strong { color: var(--ink); }
.profile-guide-notes code { padding: 1px 4px; border-radius: 3px; background: var(--surface-soft); color: var(--ink); font-size: 9px; }
.privacy-switches { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.privacy-switches label {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 680;
  gap: 9px;
}
.privacy-switches input,
.holding-visibility-choice input { width: 17px; height: 17px; accent-color: var(--blue); }
.holding-visibility-fieldset { min-width: 0; margin: 2px 0 0; padding: 0; border: 0; }
.holding-visibility-fieldset legend { margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 720; }
.holding-visibility-list { display: grid; max-height: 220px; overflow: auto; border-top: 1px solid var(--line); }
.holding-visibility-choice { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; min-height: 54px; border-bottom: 1px solid var(--line); gap: 9px; }
.holding-visibility-choice span,
.holding-visibility-choice strong,
.holding-visibility-choice small { display: block; min-width: 0; }
.holding-visibility-choice strong { font-size: 12px; }
.holding-visibility-choice small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.holding-visibility-choice em { font-size: 11px; font-style: normal; font-weight: 750; }
.profile-inline-empty { margin: 0; padding: 14px 0; color: var(--muted); font-size: 11px; }
.broker-connect-form { display: grid; grid-template-columns: 150px minmax(0, 1fr) 108px; gap: 8px; }
.broker-connect-form select,
.broker-connect-form input,
.community-compose select,
.community-compose input,
.community-compose textarea,
.community-comment-form input {
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
}
.broker-connect-form select,
.broker-connect-form input { height: 42px; padding: 0 11px; }
.broker-guide { margin-top: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); }
.broker-guide summary { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 10px 14px; cursor: pointer; list-style: none; gap: 12px; }
.broker-guide summary::-webkit-details-marker { display: none; }
.broker-guide summary > span:first-child,
.broker-guide summary strong,
.broker-guide summary small { display: block; min-width: 0; }
.broker-guide summary strong { font-size: 12px; }
.broker-guide summary small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.broker-guide[open] .profile-guide-toggle { transform: rotate(180deg); }
.broker-guide-list { border-top: 1px solid var(--line); background: var(--surface); }
.broker-guide-list article { padding: 14px; }
.broker-guide-list article[hidden] { display: none; }
.broker-guide-list header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.broker-guide-list header strong { font-size: 12px; }
.broker-status { flex: 0 0 auto; padding: 4px 6px; border-radius: 4px; background: var(--amber-soft); color: var(--amber); font-size: 9px; font-weight: 780; }
.broker-status.is-ready { background: var(--green-soft); color: var(--green); }
.broker-guide-list ol { display: grid; margin: 12px 0; padding-left: 18px; color: var(--muted); font-size: 10px; line-height: 1.6; gap: 5px; }
.broker-guide-list p { margin: 12px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.broker-guide-list code { padding: 1px 4px; border-radius: 3px; background: var(--surface-soft); color: var(--ink); font-size: 9px; }
.broker-guide-list a { color: var(--blue); font-size: 10px; font-weight: 730; text-decoration: none; }
.broker-guide-list a:hover { text-decoration: underline; }
.broker-guide-security { margin: 0; padding: 11px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; line-height: 1.55; }
.sync-token-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; margin-top: 12px; padding: 12px; border: 1px solid var(--sync-border); border-radius: 5px; background: var(--blue-soft); gap: 7px 10px; }
.sync-token-result[hidden] { display: none; }
.sync-token-result > span { grid-column: 1 / -1; color: var(--blue); font-size: 10px; font-weight: 750; }
.sync-token-result code { min-width: 0; overflow: auto; padding: 8px; background: var(--surface); color: var(--ink); font-size: 11px; white-space: nowrap; }
.profile-connections { display: grid; margin-top: 14px; border-top: 1px solid var(--line); }
.profile-connection-row { display: flex; align-items: center; justify-content: space-between; min-height: 68px; border-bottom: 1px solid var(--line); gap: 16px; }
.profile-connection-row div { min-width: 0; }
.profile-connection-row strong,
.profile-connection-row span,
.profile-connection-row small { display: block; }
.profile-connection-row strong { font-size: 12px; }
.profile-connection-row span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.profile-connection-row small { margin-top: 3px; color: var(--faint); font-size: 9px; }

.member-auth-gate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  min-height: 100px;
  margin: 0 auto;
  padding: 24px 32px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.member-auth-gate[hidden] { display: none; }
.member-auth-gate strong { font-size: 14px; }
.member-auth-gate div strong,
.member-auth-gate div span { display: block; }
.member-auth-gate div span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.approval-gate { justify-content: flex-start; }
.social-login-button { width: 100px; }
.playground-band,
.community-band { max-width: 1440px; margin: 0 auto; padding: 0 32px 48px; }
.playground-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 64px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; gap: 18px; }
.playground-toolbar strong { color: var(--ink); }
.playground-directory-heading { display: flex; min-width: 0; align-items: center; gap: 18px; }
.playground-directory-heading > span { flex: 0 0 auto; }
.playground-member-directory { display: flex; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.playground-member-directory button { min-height: 42px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-weight: 700; white-space: nowrap; }
.playground-member-directory button:hover,
.playground-member-directory button.active { border-bottom-color: var(--blue); color: var(--blue); }
.playground-toolbar-actions { display: flex; flex: 0 0 auto; gap: 7px; }
.playground-overview { border-bottom: 1px solid var(--line); }
.playground-overview-row { display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(120px, 1fr) 90px minmax(220px, 1.6fr); width: 100%; min-height: 72px; padding: 0 16px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; text-align: left; gap: 16px; align-items: center; }
.playground-overview-row:last-child { border-bottom: 0; }
.playground-overview-row:hover { background: var(--surface-soft); }
.playground-overview-row strong,
.playground-overview-row span,
.playground-overview-row small { display: block; min-width: 0; }
.playground-overview-name strong { font-size: 13px; }
.playground-overview-name small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.playground-overview-brokers { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.playground-overview-count { color: var(--muted); font-size: 10px; }
.playground-overview-pnl { display: flex; justify-content: flex-end; gap: 14px; }
.playground-overview-pnl span { text-align: right; }
.playground-overview-pnl small { color: var(--muted); font-size: 9px; }
.playground-overview-pnl strong { margin-top: 4px; font-size: 12px; }
.playground-overview-empty { color: var(--faint); font-size: 10px; text-align: right; }
.playground-member-detail { padding-top: 14px; }
.playground-detail-toolbar { display: flex; align-items: center; min-height: 48px; border-bottom: 1px solid var(--line); gap: 12px; }
.playground-detail-toolbar strong { font-size: 13px; }
.playground-admin-panel { border-bottom: 1px solid var(--line); padding: 18px 0 8px; }
.playground-admin-panel .section-heading { padding: 0 16px 13px; }
.playground-admin-list { border-top: 1px solid var(--line); }
.playground-admin-row { display: flex; align-items: center; justify-content: space-between; min-height: 62px; padding: 9px 16px; border-bottom: 1px solid var(--line); gap: 16px; }
.playground-admin-row > div { min-width: 0; }
.playground-admin-row strong,
.playground-admin-row span { display: block; }
.playground-admin-row strong { font-size: 12px; overflow-wrap: anywhere; }
.playground-admin-row span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.playground-admin-row-actions { display: flex; align-items: center; gap: 8px; }
.playground-admin-state { color: var(--muted); font-size: 9px; font-weight: 720; }
.playground-admin-state.is-pending { color: var(--amber); }
.playground-members { display: grid; gap: 16px; padding-top: 16px; }
.member-ledger { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.member-ledger-header { display: flex; align-items: flex-start; justify-content: space-between; min-height: 78px; padding: 18px 20px; border-bottom: 1px solid var(--line); gap: 18px; }
.member-ledger-header h2 { margin: 0; font-size: 17px; }
.member-ledger-header h2 small { display: inline-block; margin-left: 5px; padding: 3px 5px; border-radius: 4px; background: var(--blue-soft); color: var(--blue); font-size: 9px; vertical-align: 2px; }
.member-ledger-header > time { color: var(--faint); font-size: 10px; white-space: nowrap; }
.member-brokers { display: flex; flex-wrap: wrap; margin-top: 8px; gap: 5px; }
.member-brokers span { padding: 3px 6px; border-radius: 4px; background: var(--surface-soft); color: var(--muted); font-size: 9px; font-weight: 680; }
.member-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.member-summary > div { min-height: 76px; padding: 14px 20px; }
.member-summary > div + div { border-left: 1px solid var(--line); }
.member-summary span,
.member-summary strong,
.member-summary small { display: block; }
.member-summary span { color: var(--muted); font-size: 10px; }
.member-summary strong { margin-top: 7px; font-size: 15px; }
.member-summary small { margin-top: 4px; font-size: 10px; font-weight: 730; }
.member-ledger-section { padding: 18px 20px 20px; }
.member-ledger-section + .member-ledger-section { border-top: 1px solid var(--line); }
.member-ledger-section h3 { margin: 0 0 12px; font-size: 13px; }
.member-ledger-section h3 span { color: var(--muted); font-size: 10px; }
.playground-holdings-table { min-width: 820px; }
.playground-holdings-table td strong,
.playground-holdings-table td small { display: block; }
.playground-holdings-table td small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.member-private-note { margin: 0; padding: 18px 0; color: var(--muted); font-size: 11px; }
.member-trade-row { display: grid; grid-template-columns: 48px 80px 1fr 1fr 140px; align-items: center; min-height: 44px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; gap: 10px; }
.member-trade-row strong { color: var(--ink); }
.member-trade-row time { text-align: right; }
.trade-side { width: 38px; padding: 4px 0; border-radius: 4px; text-align: center; font-size: 9px; font-weight: 780; }
.trade-side.buy { background: var(--red-soft); color: var(--red); }
.trade-side.sell { background: var(--blue-soft); color: var(--blue); }
.member-chat { margin-top: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.member-chat > header { display: flex; align-items: flex-end; justify-content: space-between; min-height: 70px; padding: 16px 20px; border-bottom: 1px solid var(--line); gap: 12px; }
.member-chat > header h3 { margin: 3px 0 0; font-size: 14px; }
.member-chat > header > span { color: var(--faint); font-size: 9px; }
.member-chat-list { max-height: 420px; overflow-y: auto; }
.member-chat-row { display: grid; grid-template-columns: minmax(90px, 140px) minmax(0, 1fr) auto; align-items: start; padding: 13px 20px; border-bottom: 1px solid var(--line); gap: 12px; }
.member-chat-author strong,
.member-chat-author time { display: block; }
.member-chat-author strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.member-chat-author time { margin-top: 4px; color: var(--faint); font-size: 9px; }
.member-chat-row p { margin: 0; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-wrap; }
.member-chat-actions { display: flex; gap: 8px; }
.member-chat-actions button { padding: 2px 0; border: 0; background: transparent; color: var(--muted); font-size: 9px; }
.member-chat-empty { margin: 0; padding: 24px 20px; color: var(--muted); font-size: 11px; text-align: center; }
.member-chat-form { padding: 12px 20px 16px; background: var(--surface-soft); }
.member-chat-name { display: grid; grid-template-columns: 68px minmax(0, 260px); align-items: center; margin-bottom: 9px; gap: 8px; }
.member-chat-name span { color: var(--muted); font-size: 10px; font-weight: 700; }
.member-chat-name input { width: 100%; height: 34px; padding: 0 10px; }
.member-chat-emojis { display: flex; flex-wrap: wrap; margin-bottom: 9px; gap: 5px; }
.member-chat-emojis button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); font-size: 15px; }
.member-chat-emojis button:hover { border-color: var(--emoji-hover-border); background: var(--emoji-hover); }
.member-chat-compose { display: grid; grid-template-columns: minmax(0, 1fr) 68px; align-items: stretch; gap: 8px; }
.member-chat-compose textarea { min-height: 58px; padding: 10px 11px; resize: vertical; }
.member-chat-compose .auth-primary-button { height: auto; }
.member-chat-form .auth-message { margin-top: 8px; }

.community-compose { display: grid; grid-template-columns: 130px minmax(0, 1fr) 156px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); gap: 8px; }
.community-compose select,
.community-compose input { height: 42px; padding: 0 11px; }
.community-visibility { display: grid; grid-template-columns: 1fr 1fr; min-width: 0; margin: 0; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); gap: 3px; }
.community-visibility label { position: relative; min-width: 0; }
.community-visibility input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.community-visibility span { display: grid; height: 34px; place-items: center; border-radius: 4px; color: var(--muted); font-size: 10px; font-weight: 740; cursor: pointer; }
.community-visibility input:checked + span { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); }
.community-visibility input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 1px; }
.community-compose textarea { grid-column: 1 / -1; min-height: 94px; padding: 11px; resize: vertical; }
.community-compose .auth-message { grid-column: 1 / 3; }
.community-compose .auth-primary-button { grid-column: 3; }
.community-list { display: grid; gap: 12px; padding-top: 16px; }
.community-post { padding: 20px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.community-post > header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.community-badges, .community-author { display: flex; align-items: center; min-width: 0; gap: 6px; }
.community-category { padding: 4px 7px; border-radius: 4px; background: var(--blue-soft); color: var(--blue); font-size: 9px; font-weight: 780; }
.community-private { padding: 4px 7px; border-radius: 4px; background: var(--surface-soft); color: var(--muted); font-size: 9px; font-weight: 780; }
.community-post header strong { font-size: 11px; }
.community-post time { color: var(--faint); font-size: 9px; }
.community-post header > button,
.community-comment-actions button,
.community-reply-cancel { padding: 3px 0; border: 0; background: transparent; color: var(--faint); font-size: 10px; }
.community-post h2 { margin: 16px 0 8px; font-size: 16px; }
.community-body { margin: 0; color: var(--body-copy); font-size: 12px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.community-comments { margin-top: 18px; border-top: 1px solid var(--line); }
.community-comment { position: relative; padding: 12px 76px 12px 0; border-bottom: 1px solid var(--line); }
.community-comment > div { display: flex; gap: 7px; }
.community-comment p { margin: 6px 0 0; font-size: 11px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.community-comment-actions { position: absolute; top: 12px; right: 0; display: flex; gap: 10px; }
.community-comment-actions button:hover,
.community-reply-cancel:hover { color: var(--blue); }
.community-replies { margin: 11px -76px -12px 12px; border-left: 2px solid var(--line-strong); padding-left: 14px; }
.community-comment.is-reply { padding-right: 76px; }
.community-reply-form { display: grid; grid-template-columns: minmax(0, 1fr) 56px 34px; margin-top: 10px; gap: 7px; }
.community-reply-form[hidden] { display: none; }
.community-reply-form input { height: 34px; padding: 0 9px; }
.community-comment-form { display: grid; grid-template-columns: minmax(0, 1fr) 64px; padding-top: 12px; gap: 8px; }
.community-comment-form input { height: 38px; padding: 0 10px; }

.office-status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 32px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.office-status-strip > div { min-width: 0; min-height: 76px; padding: 15px 18px; }
.office-status-strip > div + div { border-left: 1px solid var(--line); }
.office-status-strip span,
.office-status-strip strong { display: block; }
.office-status-strip span { color: var(--muted); font-size: 10px; font-weight: 680; }
.office-status-strip strong { margin-top: 8px; overflow-wrap: anywhere; font-size: 15px; font-weight: 790; }

.office-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.72fr);
  margin: 22px 32px 0;
  border: 1px solid var(--line);
  background: var(--surface);
}

.office-floor { min-width: 0; }
.office-floor-header,
.office-flow-band > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 76px;
  padding: 18px 20px 15px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
.office-floor-header h2,
.office-flow-band h2 { margin: 3px 0 0; font-size: 17px; }
.office-floor-header > span { color: var(--muted); font-size: 10px; font-weight: 700; }

.office-agent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 18px;
  background: var(--surface-soft);
  gap: 10px;
}

.office-agent {
  --agent-color: #65717c;
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  min-width: 0;
  min-height: 132px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: inset 3px 0 var(--agent-color);
  color: var(--ink);
  text-align: left;
  gap: 11px;
  align-content: start;
}
.office-agent:hover { border-color: var(--control-hover-border); background: var(--review-hover); }
.office-agent.selected { border-color: var(--blue); box-shadow: inset 3px 0 var(--agent-color), 0 0 0 2px var(--focus-ring); }
.office-agent.agent-control { background: var(--charcoal); color: var(--on-accent); box-shadow: none; }
html[data-theme="dark"] .office-agent.agent-control { background: #e1e6ea; color: #15191e; }

.office-bot {
  --agent-color: #65717c;
  position: relative;
  display: block;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  background: var(--agent-color);
  box-shadow: inset 0 -5px rgba(0, 0, 0, 0.08);
}
.office-bot i {
  position: absolute;
  top: 15px;
  width: 5px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
}
.office-bot i:first-child { left: 11px; }
.office-bot i:nth-child(2) { right: 11px; }
.office-bot b {
  position: absolute;
  bottom: 9px;
  left: 50%;
  width: 12px;
  height: 5px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 0 0 8px 8px;
  transform: translateX(-50%);
}
.office-bot.mini { width: 36px; height: 36px; }
.office-bot.mini i { top: 12px; width: 4px; height: 5px; }
.office-bot.mini i:first-child { left: 9px; }
.office-bot.mini i:nth-child(2) { right: 9px; }
.office-bot.mini b { bottom: 7px; width: 10px; }
.office-agent.state-working .office-bot { animation: office-bot-working 1.35s ease-in-out infinite; }
.office-agent.state-attention .office-bot b { height: 7px; border-top: 2px solid rgba(255, 255, 255, 0.88); border-bottom: 0; border-radius: 8px 8px 0 0; }

.office-agent-copy { min-width: 0; }
.office-agent-copy > span,
.office-agent-copy > strong,
.office-agent-copy > small { display: block; }
.office-agent-copy > span { overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.agent-control .office-agent-copy > span { color: inherit; opacity: 0.7; }
.office-agent-copy > strong { margin-top: 3px; font-size: 14px; }
.office-agent-copy > small { display: -webkit-box; margin-top: 8px; overflow: hidden; color: var(--body-copy); font-size: 10px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.agent-control .office-agent-copy > small { color: inherit; opacity: 0.78; }
.office-agent-state {
  grid-column: 1 / -1;
  align-self: end;
  width: max-content;
  max-width: 100%;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 760;
}
.state-working .office-agent-state { border-color: var(--success-border); color: var(--green); }
.state-complete .office-agent-state { border-color: var(--sync-border); color: var(--blue); }
.state-attention .office-agent-state { border-color: var(--error-border); color: var(--red); }
.agent-control .office-agent-state { border-color: rgba(255, 255, 255, 0.24); color: inherit; }
html[data-theme="dark"] .agent-control .office-agent-state { border-color: rgba(0, 0, 0, 0.2); }

.agent-radar { --agent-color: #3978d3; }
.agent-tape { --agent-color: #18a176; }
.agent-catalyst { --agent-color: #e05f54; }
.agent-risk { --agent-color: #c33f58; }
.agent-control { --agent-color: #252b32; }
.agent-orderbook { --agent-color: #c08718; }
.agent-tracking { --agent-color: #168ca5; }
.agent-paper { --agent-color: #7e62c6; }
.agent-review { --agent-color: #23876f; }

.office-briefing {
  min-width: 0;
  border-left: 1px solid var(--line);
  background: var(--surface);
}
.office-briefing-head { min-height: 180px; padding: 23px 22px; border-bottom: 1px solid var(--line); }
.office-briefing-head h2 { margin: 7px 0 0; overflow-wrap: anywhere; font-size: 19px; line-height: 1.4; }
.office-briefing-head p { margin: 12px 0 0; color: var(--body-copy); font-size: 11px; line-height: 1.65; }
.office-bottleneck { min-height: 74px; padding: 15px 22px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.office-bottleneck span,
.office-bottleneck strong { display: block; }
.office-bottleneck span { color: var(--muted); font-size: 9px; font-weight: 700; }
.office-bottleneck strong { margin-top: 6px; overflow-wrap: anywhere; font-size: 11px; line-height: 1.45; }
.office-selected { padding: 20px 22px 22px; }
.office-selected > header { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.office-selected header span:not(.office-bot) { display: block; color: var(--muted); font-size: 9px; font-weight: 700; }
.office-selected h3 { margin: 2px 0 0; font-size: 15px; }
.office-selected em { color: var(--blue); font-size: 9px; font-style: normal; font-weight: 780; }
.office-selected > p { min-height: 46px; margin: 16px 0 0; color: var(--body-copy); font-size: 11px; line-height: 1.6; }
.office-selected dl { margin: 17px 0 0; border-top: 1px solid var(--line); }
.office-selected dl div { display: grid; grid-template-columns: 62px minmax(0, 1fr); padding: 11px 0; border-bottom: 1px solid var(--line); gap: 12px; }
.office-selected dt { color: var(--muted); font-size: 9px; font-weight: 700; }
.office-selected dd { margin: 0; overflow-wrap: anywhere; font-size: 10px; font-weight: 680; line-height: 1.45; }

.office-flow-band { margin: 22px 32px 32px; border: 1px solid var(--line); background: var(--surface); }
.office-flow-band > header { justify-content: flex-start; }
.office-flow {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.office-flow li { position: relative; min-width: 0; min-height: 80px; padding: 16px 12px; border-left: 1px solid var(--line); }
.office-flow li:first-child { border-left: 0; }
.office-flow li span,
.office-flow li strong { display: block; }
.office-flow li span { color: var(--faint); font-size: 9px; font-weight: 720; }
.office-flow li strong { margin-top: 8px; overflow-wrap: anywhere; font-size: 10px; line-height: 1.35; }
.office-flow li::after { position: absolute; right: -4px; top: 35px; z-index: 1; width: 7px; height: 7px; border-top: 1px solid var(--faint); border-right: 1px solid var(--faint); transform: rotate(45deg); content: ""; }
.office-flow li:last-child::after { display: none; }
.office-flow li.working span { color: var(--green); }
.office-flow li.complete span { color: var(--blue); }
.office-flow li.attention span { color: var(--red); }

@keyframes office-bot-working {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.detail-price-band { display: grid; grid-template-columns: repeat(4, 1fr); padding: 18px 28px; border-bottom: 1px solid var(--line); background: var(--surface-soft); gap: 14px; }
.detail-price-band span, .detail-price-band strong { display: block; }
.detail-price-band span { color: var(--muted); font-size: 10px; font-weight: 650; }
.detail-price-band strong { margin-top: 7px; overflow-wrap: anywhere; font-size: 17px; }
.detail-live-band { border-bottom: 1px solid var(--line); }
.detail-live-heading { display: flex; align-items: flex-end; justify-content: space-between; padding: 18px 28px 12px; gap: 16px; }
.detail-live-heading h3 { margin: 3px 0 0; font-size: 15px; }
.live-trace-status { color: var(--muted); font-size: 10px; font-weight: 700; }
.live-trace-status.active { color: var(--green); }
.live-chart-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.live-chart-pane { min-width: 0; padding: 14px 18px 16px 28px; }
.live-chart-pane + .live-chart-pane { border-left: 1px solid var(--line); padding-right: 28px; }
.live-chart-label { display: flex; align-items: center; justify-content: space-between; min-height: 18px; gap: 12px; color: var(--muted); font-size: 10px; font-weight: 650; }
.live-chart-label strong { color: var(--ink); overflow-wrap: anywhere; text-align: right; }
.live-chart { display: block; width: 100%; height: 148px; margin-top: 8px; }
.fade-result-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: var(--surface-soft); padding: 14px 28px; gap: 16px; }
.fade-result-grid[hidden] { display: none; }
.fade-result-grid span, .fade-result-grid strong { display: block; }
.fade-result-grid span { color: var(--muted); font-size: 10px; font-weight: 650; }
.fade-result-grid strong { margin-top: 5px; overflow-wrap: anywhere; font-size: 13px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0; padding: 24px 28px 12px; gap: 18px 24px; }
.detail-grid div { min-width: 0; }
.detail-grid dt { color: var(--muted); font-size: 10px; font-weight: 650; }
.detail-grid dd { margin: 6px 0 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 720; }
.reason-list { display: flex; flex-wrap: wrap; padding: 12px 28px 28px; gap: 6px; }
.reason-list span { padding: 6px 8px; border-radius: 4px; background: var(--blue-soft); color: var(--blue); font-size: 10px; font-weight: 680; }

.market-status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 32px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.market-status-strip > div { min-width: 0; min-height: 72px; padding: 14px 18px; }
.market-status-strip > div + div { border-left: 1px solid var(--line); }
.market-status-strip span,
.market-status-strip strong { display: block; }
.market-status-strip span { color: var(--muted); font-size: 10px; font-weight: 680; }
.market-status-strip strong { margin-top: 7px; overflow-wrap: anywhere; font-size: 15px; font-weight: 790; }

.market-board { padding: 22px 32px 34px; }
.market-board-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 66px;
  margin-bottom: 14px;
  gap: 18px;
}
.market-board-heading h2 { margin: 3px 0 0; font-size: 18px; }
.market-primary-control { display: flex; align-items: center; gap: 9px; }
.market-primary-control > span { color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; }
.market-primary-control select {
  min-width: 176px;
  height: 38px;
  padding: 0 34px 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 720;
}

.market-board-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.82fr) minmax(0, 1.8fr);
  align-items: stretch;
  gap: 12px;
}

.market-primary-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 380px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
}
.market-primary-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--ink);
  content: "";
}
.market-primary-card.up::before { background: var(--market-up); }
.market-primary-card.down::before { background: var(--market-down); }
.market-primary-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.market-primary-card > header span { color: var(--muted); font-size: 10px; font-weight: 720; }
.market-primary-card > header h2 { margin: 4px 0 0; font-size: 20px; }
.market-primary-card > header em {
  padding: 5px 7px;
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 750;
  white-space: nowrap;
}
.market-primary-quote { display: flex; align-items: baseline; flex-wrap: wrap; margin-top: 15px; gap: 8px 12px; }
.market-primary-quote strong { font-size: 30px; font-weight: 820; }
.market-primary-quote span { color: var(--muted); font-size: 14px; font-weight: 790; }
.market-primary-card.up .market-primary-quote span { color: var(--market-up); }
.market-primary-card.down .market-primary-quote span { color: var(--market-down); }
#market-primary-chart { display: block; width: 100%; height: 190px; margin-top: 7px; }
.market-primary-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: auto -22px -22px;
  border-top: 1px solid var(--line);
}
.market-primary-stats > div { min-width: 0; padding: 13px 14px 15px; }
.market-primary-stats > div + div { border-left: 1px solid var(--line); }
.market-primary-stats dt { color: var(--muted); font-size: 9px; font-weight: 680; }
.market-primary-stats dd { margin: 5px 0 0; overflow: hidden; text-overflow: ellipsis; font-size: 12px; font-weight: 760; white-space: nowrap; }

.market-index-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.market-index-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  min-height: 116px;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  gap: 10px;
}
.market-index-item:hover { border-color: var(--line-strong); background: var(--surface-soft); }
.market-index-item.selected { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.market-index-item.up.selected { border-color: var(--market-up); box-shadow: inset 0 0 0 1px var(--market-up); }
.market-index-item.down.selected { border-color: var(--market-down); box-shadow: inset 0 0 0 1px var(--market-down); }
.market-index-item canvas { display: block; width: 74px; height: 58px; }
.market-index-copy { min-width: 0; }
.market-index-copy > span { display: flex; align-items: center; min-width: 0; gap: 5px; }
.market-index-copy > span strong { overflow: hidden; text-overflow: ellipsis; font-size: 11px; white-space: nowrap; }
.market-index-copy > span b {
  flex: 0 0 auto;
  padding: 2px 4px;
  border-radius: 3px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 8px;
  font-weight: 680;
}
.market-index-copy > strong { display: block; margin-top: 7px; overflow: hidden; text-overflow: ellipsis; font-size: 16px; white-space: nowrap; }
.market-index-copy > em { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-style: normal; font-weight: 760; }
.market-index-item.up .market-index-copy > em { color: var(--market-up); }
.market-index-item.down .market-index-copy > em { color: var(--market-down); }
.market-index-empty {
  display: grid;
  place-items: center;
  grid-column: 1 / -1;
  min-height: 220px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.market-source-note { margin: 12px 0 0; color: var(--faint); font-size: 9px; line-height: 1.6; text-align: right; }

@keyframes market-ticker-swap {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1220px) {
  .candidate-sort-mobile {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 36px;
    align-items: center;
    margin-bottom: 12px;
    gap: 8px;
  }
  .candidate-sort-mobile label { color: var(--muted); font-size: 10px; font-weight: 720; }
  .candidate-sort-mobile select { width: 100%; max-width: none; height: 36px; }
  .candidate-sort-mobile .icon-button { width: 36px; height: 36px; }
  .live-candidate-band .table-wrap { overflow: visible; border-top: 0; }
  .live-candidate-table { display: block; min-width: 0; background: transparent; }
  .live-candidate-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .live-candidate-table tbody { display: grid; gap: 10px; }
  .live-candidate-table tbody tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
  }
  .live-candidate-table td,
  .live-candidate-table td:first-child,
  .live-candidate-table td:last-child {
    display: block;
    width: auto;
    max-width: none;
    height: auto;
    min-height: 60px;
    padding: 10px 12px;
    border-right: 1px solid var(--line);
    text-align: left;
    white-space: normal;
  }
  .live-candidate-table td::before {
    display: block;
    margin-bottom: 6px;
    color: var(--faint);
    content: attr(data-label);
    font-size: 9px;
    font-weight: 700;
  }
  .live-candidate-table td:nth-child(1) { grid-column: span 2; }
  .live-candidate-table td:nth-child(9) { grid-column: span 2; }
  .live-candidate-table td:nth-child(3n),
  .live-candidate-table td:last-child { border-right: 0; }
  .live-candidate-table td:last-child { grid-column: 1 / -1; }
  .candidate-score-track, .readiness-track { margin-left: 0; }
}

@media (max-width: 1320px) and (min-width: 981px) {
  .app-header { grid-template-columns: minmax(220px, 1fr) auto; padding: 0 20px; }
  .header-market-ticker { max-width: 210px; }
  .primary-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
    height: 46px;
    overflow-x: auto;
    border-top: 1px solid var(--line);
    scrollbar-width: none;
  }
  .primary-nav::-webkit-scrollbar { display: none; }
  .nav-tab { min-width: 62px; padding: 0 11px; }
  .runtime-status { grid-column: 2; grid-row: 1; white-space: nowrap; }
  .market-status-strip { margin-right: 20px; margin-left: 20px; }
  .market-board { padding-right: 20px; padding-left: 20px; }
  .market-board-layout { grid-template-columns: minmax(310px, 0.8fr) minmax(0, 1.35fr); }
  .market-index-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .app-header { grid-template-columns: 1fr auto; padding: 0 20px; }
  .primary-nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; height: 46px; overflow-x: auto; border-top: 1px solid var(--line); scrollbar-width: none; }
  .primary-nav::-webkit-scrollbar { display: none; }
  .nav-tab { min-width: 62px; }
  .runtime-status { grid-column: 2; grid-row: 1; }
  .view { min-height: calc(100vh - 118px); }
  .market-status-strip { margin-right: 20px; margin-left: 20px; }
  .market-board { padding-right: 20px; padding-left: 20px; }
  .market-board-layout { grid-template-columns: 1fr; }
  .market-index-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric-grid { grid-template-columns: 1fr 1fr; padding-right: 20px; padding-left: 20px; }
  .day-strength-band { padding-right: 20px; padding-left: 20px; }
  .day-strength-row { grid-template-columns: 24px minmax(130px, 1fr) 68px repeat(3, minmax(82px, .7fr)); }
  .day-strength-reasons { grid-column: 2 / -1; padding-bottom: 11px; }
  .closing-scan-strip { margin-right: 20px; margin-left: 20px; }
  .overview-live-strip { grid-template-columns: 1fr 1fr; margin-right: 20px; margin-left: 20px; }
  .overview-live-strip > div:nth-child(3) { border-left: 0; }
  .overview-live-strip > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .page-heading, .wide-band, .record-list-band { padding-right: 20px; padding-left: 20px; }
  .split-band { grid-template-columns: 1fr; }
  .data-section, .data-section:first-child, .data-section.fill-section, .data-section.review-preview-section { padding: 26px 20px; }
  .data-section.fill-section, .data-section.review-preview-section { border-top: 1px solid var(--line); border-left: 0; }
  .calendar-band { padding-right: 20px; padding-left: 20px; }
  .calendar-day, .calendar-blank { min-height: 78px; }
  .account-strip { grid-template-columns: 1fr 1fr; padding-right: 20px; padding-left: 20px; }
  .live-scan-strip { grid-template-columns: 1fr 1fr; padding-right: 20px; padding-left: 20px; }
  .account-switcher-band { padding-right: 20px; padding-left: 20px; }
  .account-strip > div:nth-child(3) { border-left: 0; }
  .account-strip > div:nth-child(n+3) { border-top: 0; }
  .live-scan-strip > div:nth-child(3) { border-left: 0; }
  .live-scan-strip > div:nth-child(n+3) { border-top: 0; }
  .validation-summary { grid-template-columns: 1fr 1fr; }
  .validation-summary > div:nth-child(3) { border-left: 0; }
  .validation-summary > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .learning-band { padding-right: 20px; padding-left: 20px; }
  .learning-guide { grid-template-columns: minmax(0, 1fr) 260px; }
  .news-band { padding-right: 20px; padding-left: 20px; }
  .news-desk-grid { grid-template-columns: 1fr; }
  .news-panel + .news-panel { border-top: 1px solid var(--line); border-left: 0; }
  .playground-band, .community-band { padding-right: 20px; padding-left: 20px; }
  .member-auth-gate { margin: 0 20px; padding-right: 20px; padding-left: 20px; }
  .learning-stats { grid-template-columns: repeat(3, 1fr); }
  .learning-stats.weekly-learning-stats { grid-template-columns: repeat(3, 1fr); }
  .learning-stats > div:nth-child(4) { border-left: 0; }
  .learning-stats > div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .learning-paper-strip { grid-template-columns: repeat(2, 1fr); }
  .learning-paper-strip > div:nth-child(3) { border-top: 1px solid var(--line); border-left: 0; }
  .learning-paper-strip > div:nth-child(4) { border-top: 1px solid var(--line); }
  .learning-cohort-buckets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .learning-cohort-buckets li:nth-child(3) { border-top: 1px solid var(--line); border-left: 0; }
  .learning-cohort-buckets li:nth-child(4) { border-top: 1px solid var(--line); }
  .office-status-strip { margin-right: 20px; margin-left: 20px; }
  .office-workspace { grid-template-columns: 1fr; margin-right: 20px; margin-left: 20px; }
  .office-briefing { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 0; }
  .office-briefing-head { border-right: 1px solid var(--line); }
  .office-bottleneck { grid-column: 1 / -1; grid-row: 2; }
  .office-selected { grid-column: 2; grid-row: 1; }
  .office-flow-band { margin-right: 20px; margin-left: 20px; }
  .office-flow { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .office-flow li:nth-child(5) { border-left: 0; }
  .office-flow li:nth-child(n+5) { border-top: 1px solid var(--line); }
  .office-flow li:nth-child(4)::after { display: none; }
}

@media (max-width: 640px) {
  .live-candidate-table tbody tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-candidate-table td:nth-child(1) { grid-column: 1 / -1; }
  .live-candidate-table td:nth-child(9) { grid-column: auto; }
  .live-candidate-table td:nth-child(3n) { border-right: 1px solid var(--line); }
  .live-candidate-table td:nth-child(2n),
  .live-candidate-table td:last-child { border-right: 0; }
  .app-header { min-height: 62px; padding: 0 14px; }
  .brand-mark { width: 30px; height: 30px; }
  .office-entry { flex-basis: 30px; }
  .brand strong { font-size: 15px; }
  .brand small { display: none; }
  .brand-market-cluster { gap: 7px; }
  .brand-lockup { gap: 7px; }
  .header-market-ticker {
    grid-template-columns: auto 6px;
    max-width: 48px;
    min-height: 32px;
    padding: 0 4px 0 8px;
    gap: 3px;
  }
  .header-market-ticker > span { width: 22px; font-size: 0; }
  .header-market-ticker > span::after { font-size: 10px; content: "지수"; }
  .header-market-ticker > strong,
  .header-market-ticker > em { display: none; }
  .runtime-status #scanner-status, .runtime-status #session-status, .status-separator { display: none; }
  .runtime-status { gap: 5px; }
  .runtime-status .status-dot { display: none; }
  .runtime-status strong { max-width: 62px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .refresh-feedback { right: 14px; }
  .auth-login-button, .auth-user-button { min-width: 52px; padding: 0 8px; }
  .auth-user-button { max-width: 84px; }
  .primary-nav { margin: 0 -14px; padding: 0 6px; }
  .nav-tab { flex: 0 0 62px; min-width: 62px; padding: 0 5px; font-size: 12px; }
  .page-heading { min-height: 116px; padding: 32px 14px 20px; }
  .page-heading h1 { font-size: 25px; }
  .market-status-strip { margin-right: 14px; margin-left: 14px; }
  .market-status-strip > div { min-height: 62px; padding: 11px 10px; }
  .market-status-strip strong { font-size: 12px; }
  .market-board { padding: 18px 14px 28px; }
  .market-board-heading { align-items: stretch; flex-direction: column; margin-bottom: 12px; gap: 12px; }
  .market-primary-control { display: grid; grid-template-columns: auto minmax(0, 1fr); width: 100%; }
  .market-primary-control select { width: 100%; min-width: 0; }
  .market-primary-card { min-height: 350px; padding: 18px; }
  .market-primary-quote strong { font-size: 25px; }
  #market-primary-chart { height: 170px; }
  .market-primary-stats { margin-right: -18px; margin-bottom: -18px; margin-left: -18px; }
  .market-primary-stats > div { padding: 11px 9px 13px; }
  .market-index-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-index-item { grid-template-columns: 54px minmax(0, 1fr); min-height: 104px; padding: 9px 8px; gap: 7px; }
  .market-index-item canvas { width: 54px; height: 52px; }
  .market-index-copy > span b { display: none; }
  .market-index-copy > strong { font-size: 13px; }
  .updated-at { max-width: 120px; font-size: 10px; text-align: right; }
  .metric-grid { padding: 0 14px 28px; gap: 8px; }
  .day-strength-band { padding: 22px 14px 26px; }
  .day-strength-heading { align-items: flex-start; }
  .day-strength-heading p { line-height: 1.5; }
  .day-strength-row { grid-template-columns: repeat(3, minmax(0, 1fr)); min-height: 0; padding: 13px 0; gap: 12px 8px; }
  .day-strength-rank { display: none; }
  .day-strength-symbol { grid-column: 1 / span 2; }
  .day-strength-score { grid-column: 3; }
  .day-strength-metric { padding-top: 9px; border-top: 1px solid var(--line); }
  .day-strength-reasons { grid-column: 1 / -1; padding-bottom: 0; }
  .day-strength-reasons small + small::before { margin-right: 7px; }
  .closing-scan-strip { grid-template-columns: 1fr; margin-right: 14px; margin-left: 14px; }
  .closing-scan-strip > div { min-height: 60px; padding: 11px 12px; }
  .closing-scan-strip > div + div { border-top: 1px solid var(--line); border-left: 0; }
  .overview-live-strip { margin-right: 14px; margin-left: 14px; }
  .overview-live-strip > div { min-height: 62px; padding: 12px; }
  .overview-live-strip strong { font-size: 13px; }
  .metric { min-height: 112px; padding: 18px 16px; }
  .metric strong { font-size: 20px; }
  .data-section, .data-section:first-child, .data-section.fill-section, .data-section.review-preview-section { padding: 24px 14px; }
  .review-preview { grid-template-columns: 1fr 18px; min-height: 112px; padding: 14px 2px; gap: 5px 10px; }
  .review-preview-date { grid-column: 1; padding-top: 0; }
  .review-preview-copy { grid-column: 1; }
  .review-preview-arrow { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .compact-row { grid-template-columns: minmax(100px, 1fr) 92px 68px; gap: 8px; }
  .compact-row.static { grid-template-columns: 38px minmax(72px, 1fr) 62px 76px; gap: 6px; }
  .compact-row.static .row-meta strong, .compact-row.static .row-result strong { font-size: 11px; }
  .wide-band, .record-list-band { padding-right: 14px; padding-left: 14px; }
  .records-heading { min-height: 100px; padding-top: 24px; }
  .calendar-band { padding: 18px 8px 24px; }
  .month-summary { margin: 0 6px 18px; }
  .month-summary > div { min-height: 64px; padding: 13px 10px; }
  .month-summary strong { font-size: 15px; }
  .calendar-toolbar { padding: 0 6px; }
  .calendar-day, .calendar-blank { min-height: 68px; }
  .calendar-day { padding: 7px 6px; }
  .calendar-day strong { font-size: 10px; }
  .calendar-day small { font-size: 9px; }
  .record-summary { align-items: flex-start; flex-direction: column; }
  .record-summary-stats { width: 100%; justify-content: space-between; gap: 8px; }
  .learning-heading { min-height: 100px; padding-top: 24px; }
  .learning-band { padding: 0 14px 28px; }
  .learning-guide { grid-template-columns: 1fr; min-height: 0; }
  .learning-guide-copy { padding: 20px 18px 18px; }
  .learning-guide-copy h2 { font-size: 18px; }
  .learning-guide-copy > p { margin-bottom: 16px; font-size: 11px; }
  .learning-progress { grid-template-columns: 1fr 1fr; }
  .learning-progress > div { padding: 11px 8px 0 0; }
  .learning-progress > div + div { padding-left: 8px; }
  .learning-progress > div + div::before { display: none; }
  .learning-progress > div:nth-child(n+3) { margin-top: 9px; border-top: 1px solid var(--line); }
  .learning-guide-character { grid-template-columns: 118px minmax(0, 1fr); grid-template-rows: auto; min-height: 150px; padding: 10px 16px 12px; border-top: 1px solid var(--line); border-left: 0; }
  .learning-agent-visual { min-height: 126px; }
  .learning-agent-visual img { width: 116px; height: 126px; }
  .learning-agent-signal { right: 0; bottom: 15px; }
  .learning-guide-character figcaption { align-self: center; border-top: 0; padding: 0 0 0 12px; text-align: left; }
  .news-band { padding: 0 14px 28px; }
  .news-source-links { grid-template-columns: 1fr; }
  .news-source-link { min-height: 64px; padding: 11px 14px; }
  .news-panel { padding: 20px 14px 24px; }
  .research-symbol-row { grid-template-columns: 1fr; gap: 10px; }
  .research-symbol-row nav { justify-content: flex-start; }
  .catalyst-row { min-height: 132px; padding: 15px 8px; }
  .catalyst-row-head { display: block; }
  .catalyst-meta { display: block; margin-top: 5px; text-align: left; }
  .social-heading { min-height: 100px; padding-top: 24px; }
  .playground-band, .community-band { padding: 0 14px 28px; }
  .member-auth-gate { margin: 0 14px; padding: 18px 14px; gap: 14px; }
  .member-ledger-header { display: block; padding: 16px; }
  .member-ledger-header > time { display: block; margin-top: 9px; }
  .member-summary { grid-template-columns: 1fr 1fr; }
  .member-summary > div { min-height: 68px; padding: 12px 16px; }
  .member-summary > div:nth-child(odd) { border-left: 0; }
  .member-ledger-section { padding: 16px; }
  .member-chat > header { align-items: flex-start; padding: 14px 16px; }
  .member-chat-row { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 16px; }
  .member-chat-row p { grid-column: 1 / -1; grid-row: 2; }
  .member-chat-form { padding: 12px 16px 16px; }
  .member-chat-compose { grid-template-columns: minmax(0, 1fr) 62px; }
  .member-trade-row { grid-template-columns: 42px 58px 1fr 1fr; gap: 6px; }
  .member-trade-row time { grid-column: 2 / -1; padding-bottom: 8px; text-align: left; }
  .community-compose { grid-template-columns: 108px minmax(0, 1fr); }
  .community-visibility { grid-column: 1 / -1; }
  .community-compose > .auth-primary-button { grid-column: 1 / -1; }
  .community-compose .auth-message { grid-column: 1 / -1; }
  .community-post { padding: 16px; }
  .community-post > header { grid-template-columns: auto minmax(0, 1fr); }
  .community-post header > button { grid-column: 2; justify-self: end; }
  .office-heading { min-height: 100px; padding-top: 24px; }
  .office-status-strip { grid-template-columns: 1fr 1fr; margin-right: 14px; margin-left: 14px; }
  .office-status-strip > div { min-height: 66px; padding: 12px; }
  .office-status-strip > div:nth-child(3) { border-left: 0; }
  .office-status-strip > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .office-status-strip strong { font-size: 13px; }
  .office-workspace { margin: 14px 14px 0; }
  .office-floor-header { min-height: 68px; padding: 15px 14px 13px; }
  .office-floor-header > span { max-width: 108px; text-align: right; }
  .office-agent-grid { grid-template-columns: 1fr 1fr; padding: 10px; gap: 8px; }
  .office-agent { grid-template-columns: 38px minmax(0, 1fr); min-height: 126px; padding: 11px 10px; gap: 8px; }
  .office-agent.agent-control { grid-column: 1 / -1; grid-row: 1; min-height: 104px; }
  .office-bot { width: 36px; height: 36px; }
  .office-bot i { top: 12px; width: 4px; height: 5px; }
  .office-bot i:first-child { left: 9px; }
  .office-bot i:nth-child(2) { right: 9px; }
  .office-bot b { bottom: 7px; width: 10px; }
  .office-agent-copy > strong { font-size: 12px; }
  .office-agent-copy > small { font-size: 9px; }
  .office-briefing { display: block; }
  .office-briefing-head { min-height: 0; padding: 19px 16px; border-right: 0; }
  .office-briefing-head h2 { font-size: 17px; }
  .office-bottleneck { min-height: 68px; padding: 13px 16px; }
  .office-selected { padding: 17px 16px 19px; }
  .office-flow-band { margin: 14px 14px 28px; }
  .office-flow-band > header { min-height: 64px; padding: 15px 14px 13px; }
  .office-flow { grid-template-columns: 1fr 1fr; }
  .office-flow li { min-height: 66px; padding: 12px; }
  .office-flow li:nth-child(odd) { border-left: 0; }
  .office-flow li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .office-flow li:nth-child(even)::after { display: none; }
  .learning-entry-header { display: block; padding: 19px 18px 17px; }
  .learning-entry-header h2 { font-size: 17px; }
  .learning-entry-actions { justify-content: space-between; margin-top: 13px; }
  .learning-gate { display: inline-flex; }
  .learning-stats { grid-template-columns: repeat(2, 1fr); }
  .learning-stats.weekly-learning-stats { grid-template-columns: repeat(2, 1fr); }
  .learning-stats > div { min-height: 66px; padding: 12px 14px; }
  .learning-stats > div:nth-child(odd) { border-left: 0; }
  .learning-stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .learning-paper-strip { grid-template-columns: 1fr 1fr; }
  .learning-paper-strip > div { min-height: 62px; padding: 12px 14px; }
  .learning-content-grid { grid-template-columns: 1fr; }
  .learning-section { padding: 19px 18px 21px; }
  .learning-section + .learning-section { border-top: 1px solid var(--line); border-left: 0; }
  .learning-alert-section { padding: 18px; }
  .learning-patterns li { grid-template-columns: 1fr; gap: 8px; }
  .learning-pattern-comparison { text-align: left; }
  .learning-alert-row { grid-template-columns: minmax(0, 1fr) 110px; gap: 10px; }
  .learning-alert-row p { grid-column: 1 / -1; }
  .records-dialog { width: 100vw; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
  .records-dialog-header { align-items: center; padding: 18px 14px 15px; }
  .records-dialog-header h2 { font-size: 18px; }
  .records-dialog-actions .secondary-button { width: 36px; padding: 0; font-size: 0; }
  .records-dialog-actions .secondary-button svg { width: 17px; height: 17px; }
  .record-summary-strip { min-height: 48px; padding: 0 14px; }
  .records-dialog .record-list-band { padding: 14px 14px 24px; }
  .filters { justify-content: stretch; }
  .search-field { flex: 1 1 auto; width: auto; }
  select { max-width: 116px; }
  .market-primary-control select { max-width: none; }
  .account-strip { grid-template-columns: 1fr 1fr; margin-bottom: 24px; padding: 0 14px; }
  .live-scan-strip { grid-template-columns: 1fr 1fr; margin-bottom: 24px; padding: 0 14px; }
  .live-scan-strip > div { min-height: 82px; padding: 14px; }
  .live-scan-strip strong { font-size: 16px; }
  .candidate-filters { margin-right: -2px; margin-left: -2px; }
  .candidate-gap-panel { padding: 16px 20px 2px; }
  .candidate-gap-list { grid-template-columns: 1fr; }
  .candidate-gap-item.is-complete { grid-column: 1; }
  .account-switcher-band { display: block; padding: 0 14px 14px; }
  .account-switcher-label { display: block; padding-bottom: 6px; }
  .account-person-tab { min-width: 104px; padding-right: 13px; padding-left: 13px; }
  .account-strip > div { min-height: 88px; padding: 16px 14px; }
  .account-strip strong { font-size: 17px; }
  .detail-price-band { grid-template-columns: 1fr 1fr; padding: 16px 20px; }
  .detail-live-heading { align-items: flex-start; padding: 16px 20px 12px; }
  .live-chart-grid { grid-template-columns: 1fr; }
  .live-chart-pane { padding: 14px 20px 16px; }
  .live-chart-pane + .live-chart-pane { border-top: 1px solid var(--line); border-left: 0; padding-right: 20px; }
  .fade-result-grid { grid-template-columns: 1fr 1fr; padding: 14px 20px; }
  .detail-grid { padding: 20px 20px 10px; gap: 16px; }
  .reason-list { padding: 10px 20px 22px; }
  .dialog-header { padding: 22px 20px 18px; }
  .auth-dialog, .profile-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .auth-dialog-header { padding: 19px 18px 16px; }
  .auth-dialog-header h2 { font-size: 20px; }
  .auth-panel, .profile-password-section, .profile-social-section { padding: 20px 18px; }
  .profile-summary { grid-template-columns: 1fr; padding: 20px 18px; gap: 15px; }
  .profile-approval-status { padding: 11px 18px; }
  .privacy-switches { grid-template-columns: 1fr; }
  .broker-connect-form { grid-template-columns: 1fr; }
  .broker-connect-form select { max-width: none; }
  .sync-token-result { grid-template-columns: 1fr; }
  .sync-token-result > span { grid-column: 1; }
  .playground-toolbar { align-items: stretch; flex-direction: column; padding: 10px 0; gap: 8px; }
  .playground-directory-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .playground-member-directory { width: 100%; }
  .playground-toolbar-actions { justify-content: flex-end; }
  .playground-overview-row { grid-template-columns: minmax(0, 1fr) auto; min-height: 92px; padding: 12px 8px; gap: 9px 12px; }
  .playground-overview-brokers { grid-column: 1; }
  .playground-overview-count { grid-column: 2; grid-row: 1; text-align: right; }
  .playground-overview-pnl { grid-column: 1 / -1; justify-content: flex-start; border-top: 1px solid var(--line); padding-top: 9px; }
  .playground-overview-pnl span { text-align: left; }
  .playground-overview-empty { grid-column: 1 / -1; text-align: left; }
  .playground-admin-row { align-items: flex-start; flex-direction: column; }
  .playground-admin-row-actions { width: 100%; justify-content: space-between; }
}

@media (max-width: 380px) {
  .runtime-status #session-status { display: none; }
  .runtime-status { gap: 3px; }
  .runtime-status .icon-button { flex-basis: 33px; width: 33px; height: 33px; }
  .currency-toggle { grid-template-columns: repeat(2, 29px); height: 33px; }
  .currency-toggle button { width: 29px; height: 27px; }
  .auth-login-button, .auth-user-button { min-width: 48px; max-width: 70px; padding: 0 6px; }
}

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

/* Pixel AI Office */
.pixel-office-shell {
  margin: 22px 32px 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
}

.pixel-office-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  gap: 18px;
}

.pixel-office-title {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 11px;
}

.pixel-office-title h2 { margin: 3px 0 0; font-size: 17px; }
.pixel-office-title > strong {
  margin-left: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  white-space: nowrap;
}

.pixel-live-lamp {
  position: relative;
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 1px var(--success-border);
}

.pixel-live-lamp::after {
  position: absolute;
  inset: -5px;
  border: 1px solid var(--success-border);
  border-radius: 50%;
  animation: pixel-office-pulse 1.8s ease-out infinite;
  content: "";
}

.pixel-office-controls {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 7px;
}

.office-speed-group {
  display: flex;
  align-items: center;
  gap: 7px;
}

.office-speed-group > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.office-speed-control {
  display: grid;
  grid-template-columns: repeat(3, 38px);
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  gap: 2px;
}

.office-speed-control button,
.office-control-button {
  height: 32px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
}

.office-speed-control button:hover,
.office-control-button:hover { border-color: var(--control-hover-border); color: var(--ink); }
.office-speed-control button.active {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px var(--shadow-color);
}

.office-control-button {
  padding: 0 11px;
  border-color: var(--line);
  background: var(--surface);
}

.office-control-button.active { border-color: var(--sync-border); background: var(--blue-soft); color: var(--blue); }

.pixel-office-viewport {
  position: relative;
  width: 100%;
  height: clamp(500px, 57vw, 720px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #121922;
  isolation: isolate;
}

#pixel-office-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  outline: 0;
  image-rendering: pixelated;
  touch-action: manipulation;
}

#pixel-office-canvas:focus-visible { box-shadow: inset 0 0 0 3px var(--blue); }

.pixel-office-scene-status {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(9, 15, 21, 0.88);
  color: #ffffff;
  font-size: 10px;
  font-weight: 720;
  transform: translate(-50%, -50%);
}

.pixel-office-scene-status[hidden] { display: none; }

.pixel-office-legend {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: flex;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  background: rgba(9, 15, 21, 0.82);
  color: #dce4ea;
  gap: 10px;
  font-size: 8px;
  font-weight: 680;
}

.pixel-office-legend span { display: inline-flex; align-items: center; gap: 4px; }
.pixel-office-legend i { width: 7px; height: 7px; background: #83919e; }
.pixel-office-legend i.working { background: #35c789; }
.pixel-office-legend i.complete { background: #4d91ea; }
.pixel-office-legend i.attention { background: #ef5a67; }

.pixel-office-report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.9fr);
  border-bottom: 1px solid var(--line);
}

.pixel-office-director,
.pixel-office-selected { min-width: 0; padding: 21px 22px; }
.pixel-office-director { border-right: 1px solid var(--line); }
.pixel-office-director h2 { margin: 6px 0 0; overflow-wrap: anywhere; font-size: 19px; line-height: 1.38; }
.pixel-office-director > p { margin: 9px 0 0; color: var(--body-copy); font-size: 11px; line-height: 1.6; }
.pixel-office-director .office-bottleneck {
  display: flex;
  align-items: center;
  min-height: 0;
  margin-top: 16px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
  gap: 10px;
}
.pixel-office-director .office-bottleneck span { flex: 0 0 auto; margin: 0; font-size: 9px; }
.pixel-office-director .office-bottleneck strong { margin: 0; font-size: 10px; }

.pixel-office-selected > header {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.office-report-avatar {
  --agent-color: #65717c;
  position: relative;
  display: block;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 5px;
  background: var(--agent-color);
}
.office-report-avatar i { position: absolute; top: 15px; width: 4px; height: 4px; background: rgba(255, 255, 255, 0.94); }
.office-report-avatar i:first-child { left: 9px; }
.office-report-avatar i:nth-child(2) { right: 9px; }
.office-report-avatar b { display: none; }
.pixel-office-selected header div > span { display: block; color: var(--muted); font-size: 9px; font-weight: 700; }
.pixel-office-selected h3 { margin: 2px 0 0; font-size: 15px; }
.pixel-office-selected em { color: var(--blue); font-size: 9px; font-style: normal; font-weight: 780; }
.office-current-task {
  min-height: 62px;
  margin-top: 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--agent-color, var(--blue));
  background: var(--surface-soft);
}
.office-current-task > span { display: block; color: var(--muted); font-size: 9px; font-weight: 760; }
.office-current-task > p { margin: 5px 0 0; color: var(--body-copy); font-size: 11px; font-weight: 650; line-height: 1.55; }
.pixel-office-selected dl { margin: 13px 0 0; border-top: 1px solid var(--line); }
.pixel-office-selected dl div { display: grid; grid-template-columns: 62px minmax(0, 1fr); padding: 8px 0; border-bottom: 1px solid var(--line); gap: 10px; }
.pixel-office-selected dt { color: var(--muted); font-size: 9px; font-weight: 700; }
.pixel-office-selected dd { margin: 0; overflow-wrap: anywhere; font-size: 10px; font-weight: 680; line-height: 1.4; }

.pixel-office-roster {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface-soft);
}

.office-roster-team {
  --team-color: var(--ink);
  min-width: 0;
  border-left: 1px solid var(--line);
}

.office-roster-team:first-child { border-left: 0; }
.office-roster-team:nth-child(1) { --team-color: #3978d3; }
.office-roster-team:nth-child(2) { --team-color: #18a176; }
.office-roster-team:nth-child(3) { --team-color: #c33f58; }
.office-roster-team:nth-child(4) { --team-color: #7e62c6; }

.office-roster-team > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  box-shadow: inset 0 2px var(--team-color);
  gap: 8px;
}

.office-roster-team > header strong {
  overflow: hidden;
  color: var(--team-color);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.office-roster-team > header span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 8px;
  font-weight: 680;
}

.office-roster-team > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
}

.office-roster-agent {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  min-width: 0;
  min-height: 54px;
  padding: 10px 9px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  gap: 7px;
  align-content: center;
}
.office-roster-agent:first-child { border-left: 0; }
.office-roster-agent:hover { background: var(--review-hover); }
.office-roster-agent.selected { background: var(--surface); box-shadow: inset 0 3px var(--agent-color, #65717c); }
.office-roster-swatch { width: 9px; height: 24px; background: var(--agent-color, #65717c); }
.office-roster-agent strong,
.office-roster-agent small,
.office-roster-agent em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.office-roster-agent strong { color: var(--agent-color, var(--ink)); font-size: 10px; }
.office-roster-agent small { margin-top: 2px; color: var(--muted); font-size: 8px; }
html[data-theme="dark"] .office-roster-agent.agent-control { --agent-color: #d6dde3; }
.office-roster-agent em { grid-column: 1 / -1; margin-top: 4px; color: var(--faint); font-size: 8px; font-style: normal; font-weight: 680; }
.office-roster-agent.state-working em { color: var(--green); }
.office-roster-agent.state-complete em { color: var(--blue); }
.office-roster-agent.state-attention em { color: var(--red); }

@keyframes pixel-office-pulse {
  0% { opacity: 0.8; transform: scale(0.72); }
  80%, 100% { opacity: 0; transform: scale(1.25); }
}

@media (max-width: 980px) {
  .pixel-office-shell { margin-right: 20px; margin-left: 20px; }
  .pixel-office-toolbar { align-items: flex-start; flex-direction: column; }
  .pixel-office-controls { width: 100%; justify-content: flex-end; }
  .pixel-office-report-grid { grid-template-columns: 1fr 1fr; }
  .pixel-office-roster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .office-roster-team:nth-child(odd) { border-left: 0; }
  .office-roster-team:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 640px) {
  .pixel-office-shell { margin: 14px 14px 0; }
  .pixel-office-toolbar { min-height: 0; padding: 14px; gap: 12px; }
  .pixel-office-title { align-items: flex-start; flex-wrap: wrap; }
  .pixel-office-title h2 { font-size: 15px; }
  .pixel-office-title > strong { flex-basis: 100%; margin: 0 0 0 23px; }
  .pixel-office-controls { justify-content: flex-start; flex-wrap: wrap; }
  .office-speed-group { flex-basis: 100%; }
  .office-speed-control { grid-template-columns: repeat(3, 34px); }
  .office-control-button { padding: 0 9px; }
  .pixel-office-viewport { height: clamp(430px, 126vw, 520px); }
  .pixel-office-legend { right: 8px; bottom: 8px; gap: 7px; }
  .pixel-office-report-grid { grid-template-columns: 1fr; }
  .pixel-office-director,
  .pixel-office-selected { padding: 18px 15px; }
  .pixel-office-director { border-right: 0; border-bottom: 1px solid var(--line); }
  .pixel-office-director h2 { font-size: 17px; }
  .pixel-office-roster { grid-template-columns: 1fr; }
  .office-roster-team,
  .office-roster-team:nth-child(odd) { border-left: 0; }
  .office-roster-team:nth-child(n+2) { border-top: 1px solid var(--line); }
  .office-roster-agent { min-height: 54px; }
}

@media (max-width: 380px) {
  .pixel-office-viewport { height: 450px; }
  .pixel-office-legend span { font-size: 0; }
  .pixel-office-legend i { width: 9px; height: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .pixel-live-lamp::after { animation: none; }
}
.community-attachments {
  margin: 16px 0;
}

.community-attachment {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.community-attachment a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  min-width: 0;
}

body.attachment-preview { margin: 0; background: #202326; color: #f4f5f6; }
.attachment-preview > header {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px;
  padding: 20px 24px; border-bottom: 1px solid #454b51;
}
.attachment-preview a { color: #9dceff; text-decoration: underline; }
.attachment-preview h1 { flex: 1; min-width: 0; margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.attachment-preview nav { display: flex; flex-wrap: wrap; gap: 20px; }
.attachment-preview main { max-width: 1280px; margin: 0 auto; padding: 24px 16px; }
.attachment-preview figure { margin: 0 0 28px; }
.attachment-preview img { display: block; width: 100%; height: auto; }
.attachment-preview figcaption { text-align: center; padding: 8px; color: #ccd1d6; font-size: 13px; }
