:root {
  --font-korean: "Pretendard Variable", Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --bg: #10110f;
  --bg-deep: #0c0d0c;
  --surface: rgba(28, 29, 27, 0.7);
  --surface-strong: rgba(22, 23, 21, 0.9);
  --surface-soft: rgba(255, 255, 255, 0.035);
  --line: rgba(244, 239, 225, 0.18);
  --line-strong: rgba(215, 184, 111, 0.34);
  --text: #f4f1e8;
  --muted: #cbc8bf;
  --soft: #9b9b94;
  --accent: #d2ad63;
  --accent-soft: rgba(210, 173, 99, 0.12);
  --good: #8fc49d;
  --warn: #d49a76;
  --danger: #d9877a;
  --terminal-text: #e6edf5;
  --terminal-muted: #8291a5;
  --terminal-grid: rgba(148, 163, 184, 0.16);
  --terminal-up: #52c7a1;
  --terminal-down: #ea7d88;
  --terminal-ma20: #e6bd64;
  --terminal-ma50: #7ba7e8;
  --terminal-band: #ae91df;
  --terminal-volume: rgba(123, 167, 232, 0.35);
  --radius-lg: 2rem;
  --radius-md: 1.35rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 20rem;
  min-height: 100dvh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    var(--bg);
  background-size: 5rem 5rem;
  font-family: var(--font-korean);
  font-variant-numeric: tabular-nums;
  line-height: 1.72;
  word-break: keep-all;
  overflow-wrap: anywhere;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(12, 13, 12, 0.92) 0%, rgba(12, 13, 12, 0.35) 48%, rgba(12, 13, 12, 0.86) 100%),
    radial-gradient(ellipse at 72% 18%, rgba(210, 173, 99, 0.1), transparent 38%);
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.ambient {
  position: fixed;
  z-index: -2;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(100px);
  opacity: 0.18;
}

.ambient-one {
  top: -13rem;
  left: 5vw;
  background: #bb9a5c;
}

.ambient-two {
  right: -12rem;
  top: 28rem;
  background: #596157;
}

.shell {
  width: min(100% - 3rem, 84rem);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  padding: 0.7rem 1rem;
  color: #17150f;
  background: var(--accent);
  border-radius: 999px;
  font-weight: 800;
  transform: translateY(-200%);
  transition: transform 180ms var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 5;
  padding-top: 1.5rem;
}

.glass-bar,
.glass-panel {
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: linear-gradient(135deg, rgba(44, 45, 42, 0.72), rgba(28, 29, 27, 0.6));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 24px 70px rgba(6, 7, 6, 0.28);
  backdrop-filter: blur(22px) saturate(120%);
}

.glass-bar {
  min-height: 5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 2.5rem;
  border-radius: 999px;
  padding: 0.75rem 1.15rem 0.75rem 0.9rem;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.brand-mark {
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
}

.brand-copy {
  min-width: 0;
  display: grid;
  line-height: 1.2;
}

.brand-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.98rem;
  letter-spacing: -0.025em;
}

.brand-copy small {
  margin-top: 0.24rem;
  color: var(--accent);
  font-family: var(--font-korean);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  transition: color 220ms var(--ease);
}

.header-nav a:hover {
  color: var(--text);
}

.header-date {
  margin: 0;
  color: var(--soft);
  font-family: var(--font-korean);
  font-size: 0.7rem;
  white-space: nowrap;
}

.hero {
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(22rem, 0.85fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6rem);
  padding: clamp(4rem, 7vw, 6.5rem) 0 clamp(3.5rem, 6vw, 5.5rem);
}

.hero.is-solo {
  grid-template-columns: minmax(0, 0.82fr);
}

.hero-copy {
  position: relative;
}

.eyebrow,
.filter-label,
.panel-label,
.section-index {
  margin: 0;
  color: var(--accent);
  font-family: var(--font-korean);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.live-dot {
  width: 0.45rem;
  height: 0.45rem;
  display: inline-block;
  margin-right: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(210, 173, 99, 0.35);
  animation: breathe 2.8s ease-out infinite;
}

@keyframes breathe {
  70% { box-shadow: 0 0 0 0.55rem rgba(210, 173, 99, 0); }
  100% { box-shadow: 0 0 0 0 rgba(210, 173, 99, 0); }
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 13ch;
  margin: 1.1rem 0 0;
  font-size: clamp(2.65rem, 5.2vw, 5rem);
  line-height: 1.06;
  letter-spacing: -0.058em;
}

.report-date {
  min-height: 1.5em;
  margin: 1.3rem 0 0;
  color: var(--accent);
  font-family: var(--font-korean);
  font-size: 0.9rem;
  font-weight: 700;
}

.hero-description {
  max-width: 52ch;
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.7vw, 1.22rem);
}

.report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.8rem;
  margin: 2rem 0 0;
}

.report-meta div {
  display: grid;
  gap: 0.12rem;
}

.report-meta dt {
  color: var(--soft);
  font-size: 0.76rem;
  font-weight: 700;
}

.report-meta dd {
  margin: 0;
  color: var(--text);
  font-family: var(--font-korean);
  font-size: 0.82rem;
}

.brief-panel {
  position: relative;
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  transform: translateY(2.5rem);
}

.brief-panel::before {
  position: absolute;
  inset: 0.7rem;
  pointer-events: none;
  border: 1px solid rgba(210, 173, 99, 0.1);
  border-radius: calc(var(--radius-lg) - 0.6rem);
  content: "";
}

.panel-label {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.panel-line {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

.brief-panel h2 {
  margin: 0.75rem 0 1.25rem;
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  letter-spacing: -0.04em;
}

.brief-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.brief-list li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.85rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.brief-list p {
  margin: 0;
  color: #dedbd2;
  font-size: 1rem;
  line-height: 1.65;
}

.brief-number {
  padding-top: 0.1rem;
  color: var(--accent);
  font-family: var(--font-korean);
  font-size: 0.7rem;
  font-weight: 800;
}

.notice {
  margin: -1rem 0 2rem;
  border: 1px solid rgba(212, 154, 118, 0.36);
  border-radius: 999px;
  padding: 0.8rem 1rem;
  color: #e1bba2;
  background: rgba(212, 154, 118, 0.08);
  font-size: 0.83rem;
}

.filter-bar {
  position: sticky;
  top: 1rem;
  z-index: 4;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
  border-radius: var(--radius-lg);
  padding: 1rem 1.2rem;
}

.filter-label,
.filter-helper {
  margin: 0;
}

.filter-helper {
  color: var(--soft);
  font-size: 0.82rem;
}

.filters {
  min-width: 0;
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding: 0.2rem;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filter-button {
  min-height: 2.6rem;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 750;
  transition: color 240ms var(--ease), background 240ms var(--ease), border-color 240ms var(--ease), transform 240ms var(--ease);
}

.filter-button:hover {
  border-color: rgba(210, 173, 99, 0.4);
  color: var(--text);
}

.filter-button:active {
  transform: scale(0.98);
}

.filter-button[aria-pressed="true"] {
  border-color: var(--accent);
  color: #1c1810;
  background: var(--accent);
}

.state {
  padding: 5rem 0 8rem;
}

.loading,
.state-panel {
  max-width: 48rem;
}

.loading {
  display: grid;
  gap: 0.9rem;
}

.skeleton {
  display: block;
  width: 100%;
  height: 1rem;
  border-radius: 0.45rem;
  background: linear-gradient(90deg, var(--surface-soft) 25%, rgba(255, 255, 255, 0.09) 50%, var(--surface-soft) 75%);
  background-size: 200% 100%;
  animation: loading 1.6s ease-in-out infinite;
}

.skeleton-kicker { width: 8rem; height: 0.7rem; }
.skeleton-title { width: 70%; height: 3.2rem; }
.skeleton-short { width: 52%; }
.skeleton-panel { height: 14rem; margin-top: 1.5rem; border-radius: var(--radius-lg); }

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

.state-panel {
  border-top: 1px solid var(--line-strong);
  padding-top: 1.5rem;
}

.state-panel h2 {
  margin-bottom: 0.5rem;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}

.state-panel p {
  color: var(--muted);
}

.retry-button {
  min-height: 2.75rem;
  margin-top: 0.6rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  color: #1c1810;
  background: var(--accent);
  cursor: pointer;
  font-weight: 800;
  transition: transform 220ms var(--ease), background 220ms var(--ease);
}

.retry-button:hover { background: #dfc17f; }
.retry-button:active { transform: scale(0.98); }

#content {
  padding: clamp(4.5rem, 7vw, 6.5rem) 0;
}

.content-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 3rem;
}

.content-heading h2 {
  margin: 0.5rem 0 0;
  font-size: clamp(2rem, 4.5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.content-count {
  margin: 0;
  color: var(--soft);
  font-family: var(--font-korean);
  font-size: 0.82rem;
}

.sections {
  display: grid;
  gap: 2.2rem;
}

.report-section {
  scroll-margin-top: 8rem;
  animation: reveal 620ms var(--ease) both;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(1.3rem); }
  to { opacity: 1; transform: translateY(0); }
}

.section-heading {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  align-items: start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-index {
  padding-top: 0.45rem;
  color: var(--soft);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  letter-spacing: -0.04em;
}

.section-caption {
  margin: 0.2rem 0 0;
  color: var(--soft);
  font-size: 0.9rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 1.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  color: var(--muted);
  font-family: var(--font-korean);
  font-size: 0.65rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-badge::before {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-badge[data-status="ok"],
.status-badge[data-status="ready"],
.status-badge[data-status="success"],
.status-badge[data-status="normal"] {
  border-color: rgba(143, 196, 157, 0.3);
  color: var(--good);
  background: rgba(143, 196, 157, 0.06);
}

.status-badge[data-status="degraded"],
.status-badge[data-status="partial"] {
  border-color: rgba(212, 154, 118, 0.32);
  color: var(--warn);
  background: rgba(212, 154, 118, 0.06);
}

.status-badge[data-status="error"],
.status-badge[data-status="failed"] {
  border-color: rgba(217, 135, 122, 0.32);
  color: var(--danger);
  background: rgba(217, 135, 122, 0.06);
}

.item-list {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.report-item {
  min-width: 0;
  grid-column: span 6;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 12.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: clamp(1.35rem, 2.6vw, 2rem);
  background: linear-gradient(145deg, rgba(31, 32, 30, 0.86), rgba(19, 20, 18, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 48px rgba(5, 6, 5, 0.2);
  animation: reveal 560ms var(--ease) both;
  animation-delay: calc(var(--item-index, 0) * 55ms);
  transition: transform 260ms var(--ease), border-color 260ms var(--ease);
}

.report-item:nth-child(4n + 1) { grid-column: span 7; }
.report-item:nth-child(4n + 2) { grid-column: span 5; }
.report-item:nth-child(4n + 3) { grid-column: span 5; }
.report-item:nth-child(4n + 4) { grid-column: span 7; }

.report-section[data-section-id="weather"] .report-item {
  grid-column: span 6;
  min-height: 15rem;
  background:
    radial-gradient(circle at 88% 15%, rgba(210, 173, 99, 0.13), transparent 36%),
    linear-gradient(145deg, rgba(35, 36, 33, 0.92), rgba(18, 19, 17, 0.88));
}

.report-section[data-section-id="calltaxi"] .report-item:nth-child(-n + 2) {
  grid-column: span 6;
  min-height: 15rem;
  border-color: rgba(210, 173, 99, 0.24);
  background:
    radial-gradient(circle at 88% 12%, rgba(210, 173, 99, 0.15), transparent 38%),
    linear-gradient(145deg, rgba(36, 35, 31, 0.94), rgba(18, 19, 17, 0.9));
}

.report-section[data-section-id="calltaxi"] .report-item:nth-child(-n + 2) h3 {
  color: var(--accent);
}

.report-item:hover {
  border-color: rgba(210, 173, 99, 0.3);
  transform: translateY(-0.2rem);
}

.item-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  color: var(--soft);
  font-family: var(--font-korean);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.item-number {
  color: var(--accent);
}

.report-item h3 {
  margin: 0;
  font-size: clamp(1.22rem, 2.1vw, 1.58rem);
  line-height: 1.4;
  letter-spacing: -0.028em;
}

.item-summary {
  margin: 0.85rem 0 1.4rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.72;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: auto 0 0;
  padding: 0;
  list-style: none;
}

.item-meta li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.58rem;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.025);
  font-family: var(--font-korean);
  font-size: 0.76rem;
  line-height: 1.45;
}

.weather-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1.4rem;
}

.weather-meta li {
  display: flex;
  align-items: center;
  min-height: 2.65rem;
  border-radius: 0.85rem;
  padding: 0.55rem 0.72rem;
  color: #e4e0d7;
  background: rgba(255, 255, 255, 0.045);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
}

.source-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  margin-top: 1.25rem;
  color: #d7d2c5;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 750;
}

.source-link::after {
  width: 0.45rem;
  height: 0.45rem;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  content: "";
  transform: rotate(45deg);
  transition: transform 220ms var(--ease);
}

.source-link:hover { color: var(--accent); }
.source-link:hover::after { transform: translateX(0.18rem) rotate(45deg); }
.source-link:active { transform: translateY(1px); }

.section-empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  padding: 2rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

.site-footer {
  padding: 1rem 0 3rem;
  color: var(--soft);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1.35rem;
  font-family: var(--font-korean);
  font-size: 0.68rem;
}

.footer-inner p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

/* Financial terminal workspace */
#report.shell {
  width: min(100% - 2rem, 110rem);
}

.terminal {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.6rem;
  color: var(--terminal-text);
  font-size: 0.84rem;
}

.terminal-toolbar {
  display: grid;
  grid-template-columns: minmax(13rem, 0.8fr) minmax(28rem, 1.4fr) minmax(15rem, 0.8fr) auto;
  align-items: center;
  gap: 1rem;
  border-radius: 1.25rem;
  padding: 0.85rem 1rem;
}

.terminal-title {
  margin: 0.1rem 0 0;
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  letter-spacing: -0.04em;
}

.terminal-tabs,
.segmented-control,
.indicator-toggles {
  display: flex;
  align-items: center;
  gap: 0.22rem;
  min-width: 0;
}

.terminal-tabs {
  overflow-x: auto;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: rgba(0, 0, 0, 0.18);
  scrollbar-width: thin;
}

.terminal-tabs button,
.segmented-control button,
.toolbar-button,
.panel-actions button,
.research-controls button,
.portfolio-form button,
.terminal-table button {
  border: 1px solid transparent;
  border-radius: 0.65rem;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-korean);
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
  transition: border-color 160ms var(--ease), color 160ms var(--ease), background 160ms var(--ease);
}

.terminal-tabs button,
.segmented-control button {
  padding: 0.48rem 0.66rem;
}

.terminal-tabs button[aria-selected="true"],
.segmented-control button[aria-pressed="true"],
.terminal-tabs button:hover,
.segmented-control button:hover {
  border-color: var(--line-strong);
  color: var(--text);
  background: var(--accent-soft);
}

.command-box {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  padding: 0.2rem 0.6rem;
  color: var(--accent);
  background: rgba(0, 0, 0, 0.2);
  font-family: var(--font-korean);
}

.command-box input,
.chart-controls select,
.portfolio-form input,
.portfolio-form select,
.research-controls select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  color: var(--terminal-text);
  background: rgba(7, 9, 11, 0.68);
  font: inherit;
}

.command-box input {
  width: 100%;
  border: 0;
  padding: 0.55rem 0;
  outline: 0;
  background: transparent;
}

.command-box kbd {
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  padding: 0.14rem 0.32rem;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.58rem;
}

.toolbar-button,
.panel-actions button,
.research-controls button,
.portfolio-form button {
  border-color: var(--line);
  padding: 0.58rem 0.75rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.toolbar-button:hover,
.panel-actions button:hover,
.research-controls button:hover,
.portfolio-form button:hover,
.terminal-table button:hover {
  border-color: var(--line-strong);
  background: var(--accent-soft);
}

.market-strip {
  min-width: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(10.5rem, 1fr);
  gap: 0.5rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.55rem;
  background: rgba(8, 10, 12, 0.74);
  scrollbar-width: thin;
}

.ticker-card {
  min-width: 0;
  display: grid;
  gap: 0.15rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  padding: 0.58rem 0.7rem;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.025);
}

.ticker-card:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
}

.ticker-card[data-direction="up"] .ticker-value { color: var(--terminal-up); }
.ticker-card[data-direction="down"] .ticker-value { color: var(--terminal-down); }

.ticker-name,
.ticker-status {
  overflow: hidden;
  color: var(--terminal-muted);
  font-family: var(--font-korean);
  font-size: 0.6rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticker-value {
  overflow: hidden;
  color: var(--terminal-text);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticker-skeleton {
  min-height: 4.4rem;
  border-radius: 0.75rem;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  background-size: 220% 100%;
  animation: terminal-shimmer 1.4s linear infinite;
}

@keyframes terminal-shimmer {
  to { background-position: -220% 0; }
}

.ticker-error {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.65rem;
  color: var(--terminal-muted);
}

.data-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: var(--terminal-muted);
  font-family: var(--font-korean);
  font-size: 0.62rem;
}

.data-legend span,
.data-status,
.item-data-status,
.paper-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.22rem 0.48rem;
  color: var(--terminal-muted);
  background: rgba(255, 255, 255, 0.025);
  font-family: var(--font-korean);
  font-size: 0.58rem;
  font-weight: 800;
  white-space: nowrap;
}

[data-data-status="actual"],
[data-data-status="near_real_time"] {
  border-color: rgba(82, 199, 161, 0.35);
  color: var(--terminal-up);
  background: rgba(82, 199, 161, 0.08);
}

[data-data-status="delayed"],
[data-data-status="fallback"] {
  border-color: rgba(230, 189, 100, 0.36);
  color: var(--terminal-ma20);
  background: rgba(230, 189, 100, 0.08);
}

[data-data-status="api_required"],
[data-data-status="unavailable"] {
  border-color: rgba(234, 125, 136, 0.36);
  color: var(--terminal-down);
  background: rgba(234, 125, 136, 0.08);
}

.terminal-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  align-items: start;
  gap: 0.75rem;
}

.terminal-panel {
  position: relative;
  min-width: 18rem;
  min-height: 15rem;
  max-width: 100%;
  overflow: auto;
  resize: both;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 0.85rem;
  background: linear-gradient(145deg, rgba(20, 23, 26, 0.92), rgba(11, 13, 15, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 18px 45px rgba(0, 0, 0, 0.2);
}

.terminal-panel.is-dragging {
  opacity: 0.52;
  border-color: var(--accent);
}

.chart-panel { grid-column: span 8; min-height: 42rem; }
.market-monitor-panel { grid-column: span 4; min-height: 28rem; }
.portfolio-panel { grid-column: span 7; }
.research-panel { grid-column: span 5; }
.ai-panel,
.source-panel { grid-column: span 6; }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.68rem;
}

.drag-handle {
  cursor: grab;
}

.drag-handle:active {
  cursor: grabbing;
}

.panel-header h2 {
  margin: 0.1rem 0 0;
  font-size: 1rem;
  letter-spacing: -0.025em;
}

.panel-kicker {
  margin: 0;
  color: var(--accent);
  font-family: var(--font-korean);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.panel-note {
  margin: 0.7rem 0;
  color: var(--terminal-muted);
  font-size: 0.72rem;
  line-height: 1.55;
}

.paper-badge {
  border-color: rgba(174, 145, 223, 0.36);
  color: var(--terminal-band);
}

.chart-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.55rem 0.75rem;
  padding: 0.72rem 0 0.55rem;
}

.chart-controls > label,
.portfolio-form label {
  display: grid;
  gap: 0.25rem;
  color: var(--terminal-muted);
  font-family: var(--font-korean);
  font-size: 0.58rem;
  font-weight: 800;
}

.chart-controls select,
.portfolio-form input,
.portfolio-form select,
.research-controls select {
  min-height: 2.1rem;
  padding: 0.4rem 0.55rem;
}

.indicator-toggles {
  flex-wrap: wrap;
  margin-left: auto;
}

.indicator-toggles label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  padding: 0.34rem 0.48rem;
  color: var(--terminal-muted);
  font-family: var(--font-korean);
  font-size: 0.58rem;
  cursor: pointer;
}

.chart-stage {
  position: relative;
  min-height: 31rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 0.75rem;
  background: rgba(5, 7, 9, 0.72);
}

#market-chart {
  display: block;
  width: 100%;
  height: 31rem;
}

.chart-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  color: var(--terminal-muted);
  background: rgba(5, 7, 9, 0.82);
  text-align: center;
}

.chart-meta,
.portfolio-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding-top: 0.65rem;
}

.chart-meta > div,
.portfolio-summary > div {
  display: grid;
  gap: 0.08rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 0.38rem 0.55rem;
  background: rgba(255, 255, 255, 0.025);
}

.chart-meta span,
.portfolio-summary span {
  color: var(--terminal-muted);
  font-family: var(--font-korean);
  font-size: 0.52rem;
}

.chart-meta strong,
.portfolio-summary strong {
  font-size: 0.68rem;
}

.table-scroll {
  max-width: 100%;
  overflow: auto;
  padding-top: 0.65rem;
}

.terminal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.68rem;
  white-space: nowrap;
}

.terminal-table th,
.terminal-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 0.55rem 0.45rem;
  text-align: left;
  vertical-align: middle;
}

.terminal-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--terminal-muted);
  background: #111418;
  font-family: var(--font-korean);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.terminal-table td strong,
.terminal-table td span {
  display: block;
}

.terminal-table td span {
  color: var(--terminal-muted);
  font-size: 0.58rem;
}

.terminal-table a {
  color: var(--terminal-text);
  text-decoration: none;
}

.terminal-table a:hover { color: var(--accent); }
.terminal-table td[data-direction="up"] { color: var(--terminal-up); }
.terminal-table td[data-direction="down"] { color: var(--terminal-down); }
.terminal-table button { padding: 0.25rem 0.35rem; }

.portfolio-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(7rem, 1fr));
  gap: 0.55rem;
  align-items: end;
}

.portfolio-form button {
  min-height: 2.1rem;
}

.portfolio-summary > p {
  width: 100%;
  margin: 0;
}

.portfolio-warning,
.portfolio-error {
  color: var(--terminal-down);
  font-size: 0.68rem;
}

[data-rebalance="needed"] { color: var(--terminal-down); }
[data-rebalance="balanced"] { color: var(--terminal-up); }

.allocation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  padding-top: 0.7rem;
}

.allocation-grid section {
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  padding: 0.55rem;
}

.allocation-grid h3 {
  margin: 0 0 0.45rem;
  font-size: 0.67rem;
}

.allocation-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.allocation-list span {
  border-radius: 999px;
  padding: 0.22rem 0.42rem;
  color: var(--terminal-muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.58rem;
}

.research-controls {
  display: grid;
  grid-template-columns: auto minmax(10rem, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.75rem;
}

.research-controls label {
  color: var(--terminal-muted);
  font-family: var(--font-korean);
  font-size: 0.58rem;
}

.research-result {
  display: grid;
  gap: 0.72rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 0.75rem;
}

.research-result section,
.research-hero,
.research-state {
  border: 1px solid var(--line);
  border-radius: 0.72rem;
  padding: 0.65rem;
  background: rgba(255, 255, 255, 0.022);
}

.research-result h3,
.research-result h4,
.research-result p {
  margin: 0;
}

.research-result h3 { font-size: 1.15rem; }
.research-result h4 { margin-bottom: 0.45rem; font-size: 0.72rem; }
.research-result p { color: var(--terminal-muted); font-size: 0.68rem; }

.research-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0;
}

.research-facts div {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.55rem;
  padding: 0.45rem;
}

.research-facts dt {
  color: var(--terminal-muted);
  font-size: 0.54rem;
}

.research-facts dd {
  margin: 0.12rem 0 0;
  font-size: 0.68rem;
}

.research-result ul {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding-left: 1rem;
}

.research-result li {
  color: var(--terminal-muted);
  font-size: 0.65rem;
}

.research-result li a {
  color: var(--terminal-text);
  text-decoration: none;
}

.research-result li time { margin-left: 0.4rem; }

.research-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.research-sources a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.42rem;
  color: var(--terminal-muted);
  text-decoration: none;
  font-size: 0.56rem;
}

.compact-brief {
  margin: 0.65rem 0 0;
  padding-left: 1.25rem;
}

.compact-brief li {
  padding: 0.35rem 0;
  color: var(--terminal-text);
  font-size: 0.72rem;
}

.source-list {
  display: grid;
  gap: 0.4rem;
  padding-top: 0.65rem;
}

.source-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 0.42rem 0;
}

.source-row > div {
  min-width: 0;
  display: grid;
}

.source-row strong,
.source-row span,
.source-row time {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-row strong { font-size: 0.67rem; }
.source-row > div span,
.source-row time { color: var(--terminal-muted); font-size: 0.56rem; }

.item-topline {
  flex-wrap: wrap;
}

.item-data-status {
  margin-right: auto;
}

.terminal-panel.is-maximized {
  position: fixed;
  inset: 0.75rem;
  z-index: 100;
  width: auto !important;
  height: auto !important;
  max-width: none;
  resize: none;
  border-color: var(--line-strong);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.75);
}

.terminal-panel.is-maximized .chart-stage,
.terminal-panel.is-maximized #market-chart {
  height: calc(100dvh - 13rem);
}

.has-maximized-panel {
  overflow: hidden;
}

.glass-bar {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: clamp(0.75rem, 2vw, 2.5rem);
}

.account-button,
.toolbar-button,
.terminal-panel button,
.account-dialog button {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 0.5rem;
  color: var(--terminal-text, var(--text));
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

.account-button {
  min-height: 2.4rem;
  padding: 0.45rem 0.8rem;
  border-color: rgba(53, 208, 161, 0.34);
  color: #c8f9e9;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.account-button:hover,
.terminal-panel button:hover,
.account-dialog button:hover {
  border-color: rgba(53, 208, 161, 0.5);
  background: rgba(53, 208, 161, 0.08);
}

.crypto-panel { grid-column: span 8; min-height: 36rem; }
.news-panel { grid-column: span 4; min-height: 36rem; }

.paper-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.65rem;
  border: 1px solid rgba(110, 168, 254, 0.4);
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  color: #a8c8ff;
  background: rgba(110, 168, 254, 0.08);
  font-family: var(--font-korean);
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.crypto-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.45rem;
  margin: 0.7rem 0;
}

.crypto-quote-card {
  min-width: 0;
  display: grid;
  gap: 0.15rem;
  padding: 0.55rem;
  text-align: left;
}

.crypto-quote-card .ticker-value { font-size: 0.82rem; }
.crypto-quote-card[data-direction="up"] .ticker-status { color: var(--terminal-up); }
.crypto-quote-card[data-direction="down"] .ticker-status { color: var(--terminal-down); }

.news-card,
.ai-answer {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.65rem;
  background: rgba(0, 0, 0, 0.18);
}

.account-user-row,
.news-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.settings-form h3,
.provider-section h3 {
  margin: 0;
  font-size: 0.82rem;
}

.compact-state { margin: 0.35rem 0; color: var(--terminal-muted); font-size: 0.62rem; }
.compact-table-scroll { max-height: 13rem; }

.portfolio-form,
.settings-form,
.account-form,
.ai-query-form {
  display: grid;
  gap: 0.55rem;
}

.settings-form label,
.account-form label,
.ai-query-form label,
.research-controls label {
  min-width: 0;
  display: grid;
  gap: 0.25rem;
  color: var(--terminal-muted);
  font-size: 0.58rem;
  font-weight: 700;
}

.settings-form input,
.settings-form select,
.account-form input,
.ai-query-form textarea,
.ai-query-form select,
.research-controls input {
  min-width: 0;
  width: 100%;
  min-height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.42rem;
  padding: 0.35rem 0.45rem;
  color: var(--terminal-text);
  background: #0a1017;
  font: inherit;
}

.news-list {
  max-height: 39rem;
  display: grid;
  gap: 0.55rem;
  overflow: auto;
  margin-top: 0.6rem;
  padding-right: 0.2rem;
}

.news-card { padding: 0.65rem; }
.news-card-top { justify-content: flex-start; flex-wrap: wrap; color: var(--terminal-muted); font-size: 0.54rem; }
.news-source { margin-right: auto; }
.news-sentiment[data-sentiment="positive"] { color: var(--terminal-up); }
.news-sentiment[data-sentiment="negative"] { color: var(--terminal-down); }
.news-title { display: block; margin-top: 0.4rem; color: var(--terminal-text); text-decoration: none; font-size: 0.76rem; font-weight: 800; line-height: 1.45; }
.news-summary { margin: 0.35rem 0; color: var(--terminal-muted); font-size: 0.64rem; line-height: 1.55; }
.news-meta { display: flex; flex-wrap: wrap; gap: 0.3rem; color: var(--terminal-muted); font-size: 0.53rem; }
.news-meta span { border: 1px solid rgba(255,255,255,.08); border-radius: 999px; padding: .12rem .3rem; }
.news-translation { margin-top: .45rem; border-top: 1px solid rgba(255,255,255,.06); padding-top: .4rem; white-space: pre-wrap; font-size: .62rem; }
.news-translation button { padding: .28rem .45rem; }
.news-translation-error { color: #ff9aaa; }

.ai-query-form {
  grid-template-columns: 10rem minmax(0, 1fr) auto;
  align-items: end;
  margin-top: 0.8rem;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 0.7rem;
}

.ai-query-form .ai-prompt-label { grid-column: 2; }
.ai-query-form textarea { min-height: 5.5rem; resize: vertical; line-height: 1.5; }
.ai-query-form button { min-height: 2.2rem; padding: .4rem .65rem; }
.ai-answer { margin-top: .65rem; padding: .65rem; color: var(--terminal-text); font-size: .68rem; line-height: 1.6; white-space: pre-wrap; }

.account-dialog {
  width: min(56rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  border: 1px solid rgba(53, 208, 161, 0.28);
  border-radius: 0.9rem;
  padding: 0;
  color: var(--terminal-text);
  background: #080d13;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.76);
}

.account-dialog::backdrop { background: rgba(0, 0, 0, 0.74); backdrop-filter: blur(5px); }
.dialog-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid rgba(255,255,255,.08); padding: .8rem 1rem; background: rgba(8, 13, 19, .95); }
.dialog-header h2 { margin: .1rem 0 0; font-size: 1.2rem; }
.dialog-close { width: 2.2rem; height: 2.2rem; font-size: 1.3rem; }
.account-view { padding: 1rem; }
.account-message { min-height: 1.4rem; margin: 0; padding: .45rem 1rem 0; color: var(--terminal-muted); font-size: .65rem; }
.account-message[data-kind="error"] { color: #ff9aaa; }
.account-message[data-kind="success"] { color: #a5efd7; }
.account-form { max-width: 28rem; margin-top: .75rem; }
.account-form button,
.settings-form > button,
.secret-actions button { min-height: 2.2rem; padding: .4rem .65rem; }
.register-wrap { margin-top: 1rem; }
.account-divider { display: flex; align-items: center; gap: .6rem; color: var(--terminal-muted); font-size: .58rem; }
.account-divider::before,
.account-divider::after { height: 1px; flex: 1; background: rgba(255,255,255,.08); content: ""; }
.account-user-row { border-bottom: 1px solid rgba(255,255,255,.08); padding-bottom: .75rem; }
.account-user-row > div { display: grid; gap: .1rem; }
.account-user-row span { color: var(--terminal-muted); font-size: .62rem; }
.account-user-row button { padding: .35rem .55rem; }

.settings-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: .65rem;
  padding: .75rem;
}

.settings-form h3,
.settings-form > .panel-note,
.settings-form > .paper-warning,
.settings-form > details,
.settings-form > .secret-actions { grid-column: 1 / -1; }
.secret-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.secret-form input[data-configured="true"] { border-color: rgba(53,208,161,.34); }
.broker-settings { border: 1px solid rgba(255,255,255,.07); border-radius: .55rem; padding: .55rem; }
.broker-settings summary { cursor: pointer; font-size: .68rem; font-weight: 800; }
.broker-settings > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin-top: .55rem; }
.secret-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.danger-button { border-color: rgba(255,86,110,.48) !important; color: #ff9aaa !important; background: rgba(255,86,110,.08) !important; }
.provider-section { margin-top: 1rem; }
.provider-status { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .5rem; }
.provider-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .2rem .45rem; border: 1px solid rgba(255,255,255,.08); border-radius: .55rem; padding: .55rem; }
.provider-card strong { font-size: .68rem; }
.provider-card small,
.provider-card p { grid-column: 1 / -1; margin: 0; color: var(--terminal-muted); font-size: .56rem; }
.paper-warning { margin: .45rem 0 0; color: #ffe0a0; font-size: .6rem; line-height: 1.5; }

@media (max-width: 62rem) {
  .glass-bar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .header-nav {
    display: none;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 5.5rem;
  }

  .hero.is-solo {
    grid-template-columns: 1fr;
  }

  .brief-panel {
    max-width: 48rem;
    transform: none;
  }

  .filter-bar {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .terminal-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .terminal-tabs,
  .command-box {
    grid-column: 1 / -1;
  }

  .chart-panel,
  .market-monitor-panel,
  .crypto-panel,
  .news-panel,
  .portfolio-panel,
  .research-panel,
  .ai-panel,
  .source-panel {
    grid-column: span 12;
  }
}

@media (max-width: 48rem) {
  .shell {
    width: min(100% - 1.25rem, 84rem);
  }

  #report.shell {
    width: min(100% - 0.75rem, 84rem);
  }

  .site-header {
    padding-top: 0.65rem;
  }

  .glass-bar {
    min-height: 4.1rem;
    border-radius: 1.35rem;
    padding: 0.55rem 0.7rem;
  }

  .brand-mark {
    width: 2.65rem;
    height: 2.65rem;
  }

  .brand-copy strong {
    font-size: 0.86rem;
  }

  .header-date {
    max-width: 8rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero {
    padding: 3.75rem 0 3rem;
  }

  .terminal {
    margin-top: 0.65rem;
  }

  .terminal-toolbar {
    grid-template-columns: 1fr;
    border-radius: 0.9rem;
    padding: 0.7rem;
  }

  .terminal-tabs,
  .command-box,
  .toolbar-button {
    grid-column: 1;
  }

  .terminal-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .terminal-panel,
  .chart-panel,
  .market-monitor-panel,
  .crypto-panel,
  .news-panel,
  .portfolio-panel,
  .research-panel,
  .ai-panel,
  .source-panel {
    grid-column: 1;
    min-width: 0;
    width: auto !important;
    resize: vertical;
    border-radius: 0.8rem;
    padding: 0.65rem;
  }

  .chart-panel {
    min-height: 34rem;
  }

  .chart-controls {
    align-items: stretch;
  }

  .chart-controls > label,
  .segmented-control,
  .indicator-toggles {
    width: 100%;
  }

  .segmented-control,
  .indicator-toggles {
    overflow-x: auto;
  }

  .indicator-toggles {
    margin-left: 0;
  }

  .chart-stage,
  #market-chart {
    min-height: 25rem;
    height: 25rem;
  }

  .portfolio-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-form,
  .secret-form,
  .broker-settings > div,
  .ai-query-form {
    grid-template-columns: 1fr;
  }

  .settings-form h3,
  .settings-form > .panel-note,
  .settings-form > .paper-warning,
  .settings-form > details,
  .settings-form > .secret-actions,
  .ai-query-form .ai-prompt-label {
    grid-column: 1;
  }

  .account-dialog {
    width: calc(100vw - 0.75rem);
    max-height: calc(100dvh - 0.75rem);
  }

  .allocation-grid,
  .research-facts {
    grid-template-columns: 1fr;
  }

  .source-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .source-row time {
    grid-column: 1 / -1;
  }

  h1 {
    font-size: clamp(2.5rem, 12vw, 3.65rem);
  }

  .brief-panel,
  .filter-bar {
    border-radius: 1.45rem;
  }

  .filter-bar {
    position: relative;
    top: auto;
    padding: 1rem;
  }

  #content {
    padding: 4.5rem 0;
  }

  .content-heading {
    display: grid;
    gap: 0.75rem;
  }

  .section-heading {
    grid-template-columns: 2.25rem minmax(0, 1fr);
    gap: 0.65rem;
  }

  .status-badge {
    grid-column: 2;
    justify-self: start;
  }

  .item-list {
    grid-template-columns: 1fr;
  }

  .report-item,
  .report-item:nth-child(n),
  .report-section[data-section-id="weather"] .report-item,
  .report-section[data-section-id="calltaxi"] .report-item:nth-child(n) {
    grid-column: 1;
    min-height: 0;
  }

  .weather-meta {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Newspaper daily briefing redesign */
:root {
  --bg: #f4f6f8;
  --bg-deep: #e8edf1;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-strong: #ffffff;
  --surface-soft: rgba(35, 45, 56, 0.045);
  --line: rgba(37, 46, 56, 0.2);
  --line-strong: rgba(31, 38, 46, 0.72);
  --text: #20252b;
  --muted: #505963;
  --soft: #6c7681;
  --accent: #962b30;
  --accent-soft: rgba(150, 43, 48, 0.08);
  --good: #176348;
  --warn: #965813;
  --danger: #a32b35;
  --terminal-text: #20252b;
  --terminal-muted: #68727d;
  --terminal-grid: rgba(45, 56, 67, 0.13);
  --terminal-up: #176348;
  --terminal-down: #a32b35;
  --terminal-ma20: #9b661e;
  --terminal-ma50: #315b80;
  --terminal-band: #76538c;
  --terminal-volume: rgba(49, 91, 128, 0.28);
  --radius-lg: 0.25rem;
  --radius-md: 0.18rem;
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at 14% 7%, rgba(255, 255, 255, 0.92), transparent 32rem),
    linear-gradient(90deg, rgba(52, 65, 78, 0.025) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 5px 5px, auto;
  font-family: var(--font-korean);
  line-height: 1.68;
}

body::before {
  z-index: -1;
  background:
    repeating-linear-gradient(0deg, rgba(52, 65, 78, 0.016) 0, rgba(52, 65, 78, 0.016) 1px, transparent 1px, transparent 4px),
    radial-gradient(circle at 82% 12%, rgba(150, 43, 48, 0.045), transparent 25rem);
}

.ambient {
  display: none;
}

.shell {
  width: min(100% - 3rem, 92rem);
}

.glass-bar,
.glass-panel {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 0.75rem 2.5rem rgba(67, 49, 32, 0.07);
  backdrop-filter: none;
}

.site-header {
  padding-top: 1rem;
}

.newspaper-masthead.glass-bar {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 4px double var(--line-strong);
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.edition-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 2.25rem;
  border-bottom: 1px solid var(--line);
  color: var(--soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.035em;
}

.edition-place {
  justify-self: start;
}

.edition-row .header-date {
  justify-self: center;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
}

.account-button {
  justify-self: end;
  min-height: 1.75rem;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  padding: 0 0 0 1rem;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  font-size: 0.73rem;
  font-weight: 800;
}

.newspaper-masthead .brand {
  justify-self: center;
  gap: 1rem;
  padding: 1.3rem 0 1.15rem;
  text-align: center;
}

.newspaper-masthead .brand-mark {
  width: 2.85rem;
  height: 2.85rem;
  border: 2px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  background: transparent;
  font-family: var(--font-korean);
  font-size: 1.18rem;
  font-weight: 900;
}

.newspaper-masthead .brand-copy {
  line-height: 1;
}

.newspaper-masthead .brand-copy strong {
  overflow: visible;
  color: #11100e;
  font-family: var(--font-korean);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.07em;
  white-space: normal;
}

.newspaper-masthead .brand-copy small {
  margin-top: 0.7rem;
  color: var(--soft);
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.newspaper-masthead .header-nav {
  min-width: 0;
  justify-content: center;
  gap: 0;
  overflow-x: auto;
  border-top: 1px solid var(--line-strong);
  scrollbar-width: none;
}

.newspaper-masthead .header-nav::-webkit-scrollbar {
  display: none;
}

.newspaper-masthead .header-nav a {
  flex: 0 0 auto;
  border-right: 1px solid var(--line);
  padding: 0.62rem 1rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.newspaper-masthead .header-nav a:first-child {
  border-left: 1px solid var(--line);
}

.newspaper-masthead .header-nav a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

#report.shell {
  width: min(100% - 3rem, 92rem);
  display: flex;
  flex-direction: column;
}

#report > .hero { order: 10; }
#report > .notice { order: 20; }
#report > .filter-bar { order: 30; }
#report > .state { order: 40; }
#report > #content { order: 50; }
#report > .terminal { order: 60; }

.hero {
  min-height: 0;
  grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 0.65fr);
  align-items: stretch;
  gap: 0;
  border-bottom: 4px double var(--line-strong);
  padding: clamp(2.4rem, 5vw, 4.7rem) 0 clamp(2rem, 4vw, 3.2rem);
}

.hero.is-solo {
  grid-template-columns: minmax(0, 0.82fr);
}

.hero-copy {
  padding: 0 clamp(2rem, 4vw, 4.5rem) 0 0;
}

.hero .eyebrow,
.content-heading .eyebrow,
.terminal-toolbar .eyebrow {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--accent);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.live-dot {
  background: var(--accent);
  box-shadow: none;
  animation: none;
}

.hero h1 {
  max-width: 16ch;
  margin-top: 0.85rem;
  font-family: var(--font-korean);
  font-size: clamp(2.8rem, 6.5vw, 6.25rem);
  font-weight: 900;
  line-height: 1.03;
  letter-spacing: -0.075em;
}

.report-date {
  margin-top: 1.25rem;
  color: var(--accent);
  font-family: inherit;
  font-size: 0.82rem;
  letter-spacing: 0.035em;
}

.hero-description {
  max-width: 64ch;
  margin-top: 1.35rem;
  color: var(--muted);
  font-family: var(--font-korean);
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  line-height: 1.9;
}

.report-meta {
  gap: 0.7rem 2rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.report-meta dt,
.report-meta dd {
  font-family: inherit;
}

.brief-panel {
  transform: none;
  border: 0;
  border-left: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0 0 0 clamp(1.5rem, 3vw, 2.7rem);
  background: transparent;
  box-shadow: none;
}

.brief-panel::before {
  display: none;
}

.panel-label {
  color: var(--accent);
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 900;
}

.brief-panel h2 {
  margin: 0.65rem 0 1.1rem;
  padding-bottom: 0.8rem;
  border-bottom: 3px double var(--line-strong);
  font-family: var(--font-korean);
  font-size: clamp(1.55rem, 2.5vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.05em;
}

.brief-list {
  gap: 0;
}

.brief-list li {
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.85rem;
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0;
}

.brief-number {
  color: var(--accent);
  font-family: var(--font-korean);
  font-size: 0.78rem;
  font-weight: 800;
}

.brief-list p {
  color: var(--text);
  font-family: var(--font-korean);
  font-size: 0.96rem;
  line-height: 1.62;
}

.compact-brief {
  display: block;
  margin-top: 0.7rem;
  padding-left: 1.3rem;
}

.compact-brief li {
  display: list-item;
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 0;
  color: var(--text);
  font-family: var(--font-korean);
  font-size: 0.78rem;
  line-height: 1.65;
}

.notice {
  margin: 1.2rem 0 0;
  border: 1px solid rgba(150, 43, 48, 0.34);
  border-radius: 0;
  color: #7c2429;
  background: rgba(150, 43, 48, 0.055);
}

.filter-bar {
  position: relative;
  top: auto;
  z-index: 2;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
  border: 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0.8rem 0;
  background: transparent;
  box-shadow: none;
}

.filter-label {
  color: var(--text);
  font-family: var(--font-korean);
  font-size: 0.92rem;
  letter-spacing: -0.02em;
}

.filter-helper {
  margin-top: 0.05rem;
  color: var(--soft);
  font-size: 0.72rem;
}

.filters {
  gap: 0;
  padding: 0;
}

.filter-button {
  min-height: 2.3rem;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: 0.45rem 0.85rem;
  color: var(--muted);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 800;
}

.filter-button:first-child {
  border-left: 1px solid var(--line);
}

.filter-button:hover {
  border-color: var(--line);
  color: var(--accent);
  background: var(--accent-soft);
}

.filter-button[aria-pressed="true"] {
  border-color: var(--line);
  color: #fffaf1;
  background: var(--accent);
}

.state {
  padding: 3rem 0 4rem;
}

.skeleton {
  border-radius: 0;
  background: linear-gradient(90deg, rgba(31, 27, 22, 0.04) 25%, rgba(31, 27, 22, 0.1) 50%, rgba(31, 27, 22, 0.04) 75%);
  background-size: 200% 100%;
}

.state-panel h2,
.content-heading h2,
.section-heading h2 {
  font-family: var(--font-korean);
}

#content {
  padding: clamp(3.5rem, 6vw, 6rem) 0 2rem;
}

.content-heading {
  align-items: end;
  margin-bottom: 2rem;
  border-bottom: 4px double var(--line-strong);
  padding-bottom: 1rem;
}

.content-heading h2 {
  margin-top: 0.35rem;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  font-weight: 900;
  letter-spacing: -0.075em;
}

.content-count {
  color: var(--soft);
  font-family: inherit;
  font-size: 0.75rem;
}

.sections {
  gap: clamp(3rem, 6vw, 5.5rem);
}

.report-section {
  scroll-margin-top: 2rem;
}

.section-heading {
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  gap: 1.1rem;
  margin-bottom: 0;
  border-top: 2px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  padding: 0.9rem 0;
}

.section-index {
  align-self: center;
  padding-top: 0;
  color: var(--accent);
  font-family: var(--font-korean);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.section-heading h2 {
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  font-weight: 900;
  letter-spacing: -0.055em;
}

.section-caption {
  margin-top: 0.16rem;
  color: var(--soft);
  font-size: 0.78rem;
}

.status-badge,
.data-status,
.item-data-status,
.paper-badge {
  border-radius: 0;
  font-family: inherit;
  letter-spacing: -0.01em;
}

.status-badge {
  align-self: center;
  min-height: 1.7rem;
  padding: 0.2rem 0.55rem;
  background: transparent;
  font-size: 0.64rem;
}

.item-list {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--line-strong);
}

.report-item,
.report-item:nth-child(4n + 1),
.report-item:nth-child(4n + 2),
.report-item:nth-child(4n + 3),
.report-item:nth-child(4n + 4) {
  grid-column: span 4;
  min-height: 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: clamp(1.2rem, 2.2vw, 2rem);
  background: rgba(255, 252, 245, 0.7);
  box-shadow: none;
  transition: background 180ms ease;
}

.report-item:nth-child(3n) {
  border-right: 0;
}

.report-item:first-child {
  grid-column: span 6;
  border-right: 1px solid var(--line-strong);
  background: rgba(255, 252, 245, 0.92);
}

.report-item:nth-child(2) {
  grid-column: span 6;
  border-right: 0;
}

.report-section[data-section-id="weather"] .report-item,
.report-section[data-section-id="calltaxi"] .report-item:nth-child(-n + 2) {
  grid-column: span 6;
  min-height: 0;
  border-color: var(--line);
  background: rgba(255, 252, 245, 0.84);
}

.report-section[data-section-id="weather"] .report-item:nth-child(2),
.report-section[data-section-id="calltaxi"] .report-item:nth-child(2) {
  border-right: 0;
}

.report-section[data-section-id="calltaxi"] .report-item:nth-child(-n + 2) h3 {
  color: var(--text);
}

.report-item:hover {
  border-color: var(--line);
  background: #ffffff;
  transform: none;
}

.item-topline {
  margin-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem;
  color: var(--soft);
  font-family: inherit;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: none;
}

.item-topline > span:first-child,
.item-number {
  color: var(--accent);
}

.report-item h3 {
  font-family: var(--font-korean);
  font-size: clamp(1.18rem, 1.8vw, 1.55rem);
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: -0.04em;
}

.report-item:first-child h3 {
  font-size: clamp(1.65rem, 2.8vw, 2.5rem);
  line-height: 1.28;
}

.item-summary {
  margin: 0.75rem 0 1.1rem;
  color: var(--muted);
  font-family: var(--font-korean);
  font-size: 0.94rem;
  line-height: 1.82;
}

.report-item:first-child .item-summary {
  font-size: 1rem;
}

.item-meta {
  gap: 0.25rem 0.8rem;
  border-top: 1px dotted var(--line);
  padding-top: 0.7rem;
}

.item-meta li {
  border: 0;
  border-radius: 0;
  padding: 0;
  color: var(--soft);
  background: transparent;
  font-family: inherit;
  font-size: 0.7rem;
}

.weather-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.8rem;
}

.weather-meta li {
  min-height: 0;
  border: 0;
  border-bottom: 1px dotted var(--line);
  border-radius: 0;
  padding: 0.42rem 0;
  color: var(--muted);
  background: transparent;
  font-size: 0.78rem;
}

.source-link {
  margin-top: 1rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
}

.section-empty {
  border: 1px dashed var(--line);
  border-radius: 0;
  background: rgba(255, 252, 245, 0.5);
}

.ai-source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line-strong);
}

.ai-source-group {
  min-width: 0;
  border-right: 1px solid var(--line-strong);
}

.ai-source-group:last-child {
  border-right: 0;
}

.ai-source-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line-strong);
  padding: 0.85rem clamp(1rem, 2vw, 1.5rem);
}

.ai-source-title {
  color: var(--text);
  font-size: 1rem;
  font-weight: 900;
  text-decoration: none;
}

.ai-source-title:hover {
  color: var(--accent);
}

.ai-source-count {
  color: var(--soft);
  font-size: 0.68rem;
  font-weight: 800;
}

.ai-source-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.report-section[data-section-id="ai-trending"] .ai-source-list .report-item:nth-child(n) {
  grid-column: 1;
  border-right: 0;
  border-bottom: 1px solid var(--line);
  padding: clamp(1rem, 2vw, 1.5rem);
  background: rgba(255, 252, 245, 0.7);
}

.report-section[data-section-id="ai-trending"] .ai-source-list .report-item:last-child {
  border-bottom: 0;
}

.report-section[data-section-id="ai-trending"] .ai-source-list .report-item h3 {
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  line-height: 1.45;
}

.report-section[data-section-id="ai-trending"] .ai-source-list .item-summary {
  font-size: 0.86rem;
}

.ai-source-empty {
  min-height: 9rem;
  margin: 0;
  padding: 1.5rem;
  color: var(--soft);
  font-size: 0.82rem;
}

.terminal {
  display: grid;
  gap: 1rem;
  margin: clamp(4rem, 8vw, 8rem) 0 2rem;
  border-top: 5px double var(--line-strong);
  padding-top: 1.25rem;
}

.terminal-toolbar.glass-panel {
  grid-template-columns: minmax(12rem, 0.65fr) minmax(28rem, 1.8fr) minmax(15rem, 0.75fr) auto;
  border: 0;
  border-bottom: 2px solid var(--line-strong);
  border-radius: 0;
  padding: 0 0 1rem;
  background: transparent;
  box-shadow: none;
}

.terminal-title {
  margin-top: 0.22rem;
  color: var(--text);
  font-family: var(--font-korean);
  font-size: clamp(2rem, 3.8vw, 3.7rem);
  font-weight: 900;
  letter-spacing: -0.065em;
}

.terminal-tabs {
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 252, 245, 0.55);
}

.terminal-tabs button,
.segmented-control button,
.toolbar-button,
.panel-maximize,
.terminal-panel button,
.account-dialog button {
  border-radius: 0;
}

.terminal-tabs button {
  border-right: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  font-size: 0.67rem;
}

.terminal-tabs button:last-child {
  border-right: 0;
}

.terminal-tabs button[aria-selected="true"],
.terminal-tabs button:hover {
  color: #fffaf1;
  background: var(--accent);
}

.command-box {
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--soft);
  background: #fffaf1;
}

.command-box input,
.command-box kbd {
  color: var(--text);
}

.command-box input::placeholder {
  color: #93897d;
}

.command-box kbd {
  border: 1px solid var(--line);
  border-radius: 0;
  background: #e9edf1;
}

.toolbar-button,
.terminal-panel button,
.account-dialog button {
  border-color: var(--line);
  color: var(--text);
  background: #f2f5f7;
}

.toolbar-button:hover,
.terminal-panel button:hover,
.account-dialog button:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #ffffff;
}

.market-strip {
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.ticker-card {
  border-color: var(--line);
}

.ticker-card .ticker-name,
.ticker-card .ticker-value {
  color: var(--text);
}

.ticker-card .ticker-status,
.ticker-card .ticker-source {
  color: var(--terminal-muted);
}

.ticker-card[data-direction="up"] .ticker-status { color: var(--terminal-up); }
.ticker-card[data-direction="down"] .ticker-status { color: var(--terminal-down); }

.data-legend {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.45rem 0;
}

.data-legend span,
.data-status {
  border-radius: 0;
  background: transparent;
}

.terminal-grid {
  gap: 1rem;
}

.terminal-panel {
  border: 1px solid var(--line);
  border-top: 3px solid var(--line-strong);
  border-radius: 0;
  color: var(--terminal-text);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0.55rem 1.8rem rgba(67, 49, 32, 0.06);
}

.terminal-panel::before {
  display: none;
}

.panel-header {
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
}

.panel-kicker {
  color: var(--accent);
  font-family: inherit;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.panel-header h2 {
  color: var(--text);
  font-family: var(--font-korean);
  font-size: 1.2rem;
  letter-spacing: -0.04em;
}

.panel-note,
.compact-state,
.chart-state,
.ai-answer,
.research-result,
.source-list {
  color: var(--terminal-muted);
}

.chart-controls,
.research-controls,
.portfolio-form,
.ai-query-form,
.settings-form,
.account-form {
  color: var(--terminal-muted);
}

.terminal-panel input,
.terminal-panel select,
.terminal-panel textarea,
.account-dialog input,
.account-dialog select,
.account-dialog textarea {
  border-color: var(--line);
  border-radius: 0;
  color: var(--text);
  background: #ffffff;
}

.terminal-panel input::placeholder,
.terminal-panel textarea::placeholder,
.account-dialog input::placeholder,
.account-dialog textarea::placeholder {
  color: #968c80;
}

.segmented-control {
  border-color: var(--line);
  border-radius: 0;
  background: #eef1f4;
}

.segmented-control button {
  color: var(--muted);
  background: transparent;
}

.segmented-control button[aria-pressed="true"] {
  color: #fffaf1;
  background: var(--accent);
}

.indicator-toggles label {
  border-color: var(--line);
  border-radius: 0;
  color: var(--muted);
  background: #f2f5f7;
}

.chart-stage {
  border: 1px solid var(--line);
  border-radius: 0;
  background: #ffffff;
}

.chart-meta > div,
.portfolio-summary > div,
.allocation-card,
.research-facts > div,
.provider-status > div {
  border-color: var(--line);
  border-radius: 0;
  background: rgba(245, 237, 224, 0.7);
}

.terminal-table {
  color: var(--text);
}

.terminal-table th,
.terminal-table td {
  border-color: var(--line);
}

.terminal-table th {
  color: var(--muted);
  background: #e9edf1;
}

.terminal-table tbody tr:nth-child(even) {
  background: rgba(78, 62, 44, 0.025);
}

.crypto-strip {
  gap: 0;
  border: 1px solid var(--line);
}

.crypto-quote-card {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  color: var(--text);
  background: #ffffff;
}

.crypto-quote-card:last-child {
  border-right: 0;
}

.news-card,
.ai-answer,
.research-result,
.source-row,
.broker-settings,
.provider-section {
  border-color: var(--line);
  border-radius: 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.88);
}

.news-card h3,
.research-result h3 {
  font-family: var(--font-korean);
}

.news-card-top,
.news-meta,
.source-row time,
.source-row > div span {
  color: var(--terminal-muted);
}

.paper-warning {
  border-radius: 0;
  color: #795014;
  background: rgba(150, 88, 19, 0.07);
}

.danger-button {
  color: #fffaf1 !important;
  background: var(--danger) !important;
}

.terminal-panel.is-maximized {
  background: var(--bg);
}

.account-dialog {
  border: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--text);
  background: #ffffff;
  box-shadow: 0 2rem 8rem rgba(37, 28, 19, 0.3);
}

.account-dialog::backdrop {
  background: rgba(39, 31, 23, 0.62);
  backdrop-filter: blur(2px);
}

.dialog-header {
  border-bottom-color: var(--line-strong);
}

.site-footer {
  color: var(--soft);
}

.footer-inner {
  border-top: 4px double var(--line-strong);
  font-family: inherit;
  font-size: 0.7rem;
}

:focus-visible {
  outline-color: var(--accent);
}

@media (max-width: 78rem) {
  .terminal-toolbar.glass-panel {
    grid-template-columns: minmax(12rem, 0.7fr) minmax(0, 1.5fr) minmax(14rem, 0.8fr);
  }

  .terminal-toolbar .toolbar-button {
    grid-column: 3;
  }

  .report-item,
  .report-item:nth-child(4n + 1),
  .report-item:nth-child(4n + 2),
  .report-item:nth-child(4n + 3),
  .report-item:nth-child(4n + 4) {
    grid-column: span 6;
  }

  .report-item:nth-child(even) {
    border-right: 0;
  }
}

@media (max-width: 64rem) {
  .newspaper-masthead .brand-copy strong {
    font-size: clamp(2rem, 6vw, 3.25rem);
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding-right: 0;
  }

  .brief-panel {
    margin-top: 2rem;
    border-top: 1px solid var(--line-strong);
    border-left: 0;
    padding: 1.5rem 0 0;
  }

  .terminal-toolbar.glass-panel {
    grid-template-columns: 1fr;
  }

  .terminal-toolbar .toolbar-button {
    grid-column: auto;
  }

  .terminal-tabs,
  .command-box {
    width: 100%;
  }
}

@media (max-width: 48rem) {
  .shell,
  #report.shell {
    width: min(100% - 1.25rem, 92rem);
  }

  .site-header {
    padding-top: 0.45rem;
  }

  .edition-row {
    grid-template-columns: 1fr auto;
    min-height: 2rem;
  }

  .edition-place {
    display: none;
  }

  .edition-row .header-date {
    justify-self: start;
    font-size: 0.66rem;
  }

  .newspaper-masthead .brand {
    gap: 0.65rem;
    padding: 1rem 0 0.9rem;
  }

  .newspaper-masthead .brand-mark {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.92rem;
  }

  .newspaper-masthead .brand-copy strong {
    font-size: clamp(1.65rem, 9vw, 2.4rem);
  }

  .newspaper-masthead .brand-copy small {
    margin-top: 0.42rem;
    font-size: 0.56rem;
    letter-spacing: 0.1em;
  }

  .newspaper-masthead .header-nav {
    justify-content: flex-start;
  }

  .newspaper-masthead .header-nav a {
    padding: 0.52rem 0.76rem;
    font-size: 0.7rem;
  }

  .hero {
    padding: 2.2rem 0 1.8rem;
  }

  .hero h1 {
    font-size: clamp(2.45rem, 13vw, 4rem);
  }

  .hero-description {
    font-size: 0.98rem;
  }

  .filter-bar {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    padding: 0.75rem 0;
  }

  .content-heading {
    display: grid;
    gap: 0.35rem;
  }

  .section-heading {
    grid-template-columns: 2.2rem minmax(0, 1fr);
  }

  .status-badge {
    grid-column: 2;
    justify-self: start;
  }

  .item-list {
    grid-template-columns: 1fr;
  }

  .ai-source-grid {
    grid-template-columns: 1fr;
  }

  .ai-source-group,
  .ai-source-group:last-child {
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
  }

  .ai-source-group:last-child {
    border-bottom: 0;
  }

  .report-item,
  .report-item:first-child,
  .report-item:nth-child(n),
  .report-section[data-section-id="weather"] .report-item,
  .report-section[data-section-id="calltaxi"] .report-item:nth-child(n) {
    grid-column: 1;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 1.2rem 0.2rem;
  }

  .report-item:first-child h3 {
    font-size: 1.65rem;
  }

  .weather-meta {
    grid-template-columns: 1fr;
  }

  .terminal {
    margin-top: 5rem;
  }

  .terminal-tabs {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .terminal-tabs button {
    flex: 0 0 auto;
    padding-inline: 0.75rem;
  }

  .market-strip {
    grid-auto-columns: minmax(9rem, 1fr);
    overflow-x: auto;
  }

  .terminal-panel {
    width: 100% !important;
    min-width: 0;
    resize: vertical;
  }

  .crypto-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(9rem, 1fr);
    overflow-x: auto;
  }

  .footer-inner {
    display: grid;
  }
}

@media print {
  body {
    background: #fff;
  }

  body::before,
  .site-header .header-nav,
  .account-button,
  .filter-bar,
  .terminal,
  .source-link {
    display: none !important;
  }

  .shell,
  #report.shell {
    width: 100%;
  }

  .newspaper-masthead.glass-bar,
  .hero,
  .report-section,
  .report-item {
    break-inside: avoid;
    box-shadow: none;
  }
}
