:root {
  --bg: #0b1016;
  --panel: #131922;
  --panel-2: #182230;
  --panel-3: #1d2a39;
  --panel-green: #10211d;
  --panel-red: #24161a;
  --panel-gold: #231d12;
  --line: rgba(152, 173, 197, 0.16);
  --text: #edf4ff;
  --muted: #93a0b5;
  --soft: #d6deeb;
  --accent: #58a6ff;
  --accent-2: #56d4c2;
  --pos: #ff6175;
  --neg: #21c47b;
  --warn: #f2bd58;
  --danger: #ff6175;
  --risk-red-bg: linear-gradient(180deg, rgba(54, 17, 24, 0.96), rgba(18, 20, 28, 0.98));
  --risk-black-bg: linear-gradient(180deg, rgba(26, 4, 8, 0.98), rgba(7, 9, 14, 0.99));
  --danger-panel: linear-gradient(135deg, rgba(121, 16, 16, 0.92), rgba(77, 10, 10, 0.96));
  --danger-text: #fff3f3;
  --field-bg: #09111c;
  --card-tint: rgba(255, 255, 255, 0.025);
  --mobile-control-top: calc(14px + env(safe-area-inset-top));
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html {
  background: var(--bg);
  color-scheme: dark;
}
body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y;
  background:
    radial-gradient(circle at 0% 0%, rgba(88, 166, 255, 0.14), transparent 22rem),
    radial-gradient(circle at 100% 0%, rgba(86, 212, 194, 0.08), transparent 26rem),
    radial-gradient(circle at 50% 100%, rgba(242, 189, 88, 0.05), transparent 30rem),
    linear-gradient(180deg, #0b1016 0%, #111823 42%, #0c1218 100%);
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }

.pull-refresh-indicator {
  position: fixed;
  z-index: 120;
  top: calc(8px + env(safe-area-inset-top));
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 92%, var(--accent) 8%);
  color: var(--soft);
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -56px);
  transition: opacity 140ms ease, transform 140ms ease, background-color 140ms ease;
}
.pull-active .pull-refresh-indicator,
.pull-refreshing .pull-refresh-indicator {
  opacity: 1;
  transform: translate(-50%, 0);
}
.pull-ready .pull-refresh-indicator,
.pull-refreshing .pull-refresh-indicator {
  border-color: rgba(0, 167, 138, 0.52);
  background: color-mix(in srgb, var(--panel) 78%, var(--accent-2) 22%);
}
.pull-refresh-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(145, 167, 201, 0.36);
  border-top-color: var(--accent-2);
  border-radius: 50% !important;
}
.pull-refreshing .pull-refresh-spinner {
  animation: pull-refresh-spin 680ms linear infinite;
}
@keyframes pull-refresh-spin {
  to { transform: rotate(360deg); }
}

.terminal-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  width: min(1680px, calc(100% - 32px));
  margin: 16px auto;
  align-items: start;
  transform: translateY(var(--pull-distance, 0));
  transition: transform 160ms ease;
}
body.pull-active .terminal-shell,
body.pull-refreshing .terminal-shell {
  transition: transform 80ms ease;
}
.sidebar {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: calc(100vh - 32px);
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(17, 25, 35, 0.98), rgba(11, 17, 24, 0.98));
  box-shadow: var(--shadow);
}
.brand-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(145, 167, 201, 0.08);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff8d63, #ffcc68);
  color: #08111d;
  font-weight: 900;
}
.brand-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}
.brand-subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.ui-version {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(86, 212, 194, 0.3);
  background: rgba(86, 212, 194, 0.12);
  color: #c1f5ec;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nav-group {
  display: grid;
  gap: 8px;
}
.nav-label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--soft);
  font-size: 14px;
  font-weight: 700;
}
.nav-link.active {
  border-color: rgba(88, 166, 255, 0.24);
  background: linear-gradient(180deg, rgba(23, 33, 49, 0.98), rgba(16, 24, 35, 0.98));
  color: #ffffff;
}
.nav-link small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.sidebar-card {
  padding: 14px;
  border: 1px solid rgba(145, 167, 201, 0.08);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.015));
}
.sidebar-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.sidebar-card strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
.sidebar-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.sidebar-card .mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(145, 167, 201, 0.08);
}
.mini-grid b {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.workspace {
  min-width: 0;
  display: grid;
  gap: 14px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(21, 29, 39, 0.96), rgba(13, 19, 27, 0.96));
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}
.topbar h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.topbar p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.topbar-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--soft);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.notice, .error {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid;
  font-size: 13px;
}
.notice {
  background: rgba(33, 196, 123, 0.08);
  border-color: rgba(33, 196, 123, 0.24);
  color: #dcfff0;
}
.error {
  background: rgba(255, 97, 117, 0.08);
  border-color: rgba(255, 97, 117, 0.24);
  color: #ffe1e5;
}
.market-banner {
  display: grid;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(21, 29, 39, 0.96), rgba(13, 19, 27, 0.96));
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}
.market-banner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.market-banner-head small {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.market-banner-track-wrap {
  overflow: hidden;
}
.market-banner-track {
  display: inline-flex;
  align-items: stretch;
  gap: 12px;
  min-width: max-content;
  animation: market-banner-scroll 48s linear infinite;
}
.market-banner:hover .market-banner-track {
  animation-play-state: paused;
}
.market-banner-item {
  display: grid;
  grid-template-columns: minmax(160px, auto) auto;
  gap: 14px;
  align-items: center;
  min-width: 280px;
  padding: 12px 14px;
  border: 1px solid rgba(145, 167, 201, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}
.market-banner-symbol {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.market-banner-symbol strong {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
}
.market-banner-symbol span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.market-banner-quote {
  display: grid;
  gap: 4px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.market-banner-quote b {
  font-size: 18px;
  font-weight: 900;
}
.market-banner-quote span {
  font-size: 12px;
  font-weight: 800;
}
.market-banner-empty {
  color: var(--muted);
  font-size: 13px;
}
.market-risk-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}
.market-risk-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.risk-score-box {
  min-width: 112px;
  padding: 10px 12px;
  border: 1px solid rgba(145, 167, 201, 0.14);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.risk-score-box span {
  display: block;
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
}
.risk-score-box strong {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  letter-spacing: 0.06em;
}
.risk-chain {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.risk-chain span {
  min-height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(145, 167, 201, 0.12);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.risk-chain span.active {
  border-color: rgba(255, 97, 117, 0.5);
  background: rgba(255, 97, 117, 0.16);
  color: color-mix(in srgb, var(--danger) 68%, var(--text) 32%);
}
.risk-chain span.unavailable {
  border-style: dashed;
}
.risk-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.risk-card-grid > div {
  padding: 12px;
  border: 1px solid rgba(145, 167, 201, 0.1);
  background: rgba(255, 255, 255, 0.02);
}
.risk-card-grid b {
  display: block;
  margin-bottom: 8px;
  color: var(--soft);
  font-size: 13px;
}
.risk-card-grid ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.risk-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}
.market-risk-card.green { border-color: rgba(33, 196, 123, 0.34); }
.market-risk-card.yellow { border-color: rgba(242, 189, 88, 0.42); }
.market-risk-card.orange { border-color: rgba(255, 145, 77, 0.48); }
.market-risk-card.red { border-color: rgba(255, 97, 117, 0.58); background: var(--risk-red-bg); }
.market-risk-card.black { border-color: rgba(255, 97, 117, 0.76); background: var(--risk-black-bg); }
.market-risk-card.strong-alert {
  box-shadow: 0 0 0 2px rgba(255, 97, 117, 0.26), 0 18px 42px rgba(255, 97, 117, 0.16);
}
.plan-warning-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 88, 88, 0.34);
  background: var(--danger-panel);
  color: var(--danger-text);
  box-shadow: 0 16px 34px rgba(88, 11, 11, 0.2);
}
.plan-warning-banner strong {
  font-size: 14px;
  font-weight: 900;
}
.plan-warning-banner span {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: color-mix(in srgb, var(--danger-text) 86%, var(--text) 14%);
}

.module {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(18, 24, 33, 0.96), rgba(12, 17, 24, 0.98));
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}
.module-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(145, 167, 201, 0.08);
}
.module-title {
  font-size: 18px;
  font-weight: 800;
}
.module-subtitle {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.section-body {
  padding: 16px 20px 20px;
}

.overview-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  gap: 16px;
  padding: 18px 20px 20px;
  align-items: stretch;
}
.pnl-stack {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.snapshot-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.snapshot-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(145, 167, 201, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.headline-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 260px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(22, 27, 37, 0.98), rgba(14, 19, 27, 0.98)),
    radial-gradient(circle at 88% 12%, rgba(242, 189, 88, 0.14), transparent 14rem),
    radial-gradient(circle at 8% 100%, rgba(88, 166, 255, 0.12), transparent 18rem);
  min-width: 0;
  overflow: hidden;
}
.headline-card .label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.headline-card .value {
  margin-top: 8px;
  font-size: clamp(34px, 3.4vw, 50px);
  line-height: 0.98;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}
.headline-meta { display: grid; gap: 8px; }
.headline-meta .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(145, 167, 201, 0.08);
  color: var(--soft);
  font-size: 13px;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}
.data-card, .tool-card {
  padding: 14px;
  border: 1px solid rgba(145, 167, 201, 0.1);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
  min-width: 0;
}
.data-card {
  min-height: 102px;
}
.data-grid .data-card:nth-child(4n + 1) {
  border-color: rgba(88, 166, 255, 0.18);
  background: linear-gradient(180deg, rgba(17, 28, 42, 0.94), rgba(14, 22, 32, 0.94));
}
.data-grid .data-card:nth-child(4n + 2) {
  border-color: rgba(86, 212, 194, 0.16);
  background: linear-gradient(180deg, rgba(15, 31, 29, 0.72), rgba(14, 22, 29, 0.72));
}
.data-grid .data-card:nth-child(4n + 3) {
  border-color: rgba(242, 189, 88, 0.16);
  background: linear-gradient(180deg, rgba(36, 29, 18, 0.58), rgba(18, 20, 26, 0.72));
}
.data-grid .data-card:nth-child(4n + 4) {
  border-color: rgba(255, 97, 117, 0.14);
  background: linear-gradient(180deg, rgba(35, 20, 24, 0.5), rgba(18, 20, 28, 0.72));
}
.data-card .key {
  color: var(--muted);
  font-size: 12px;
}
.data-card .val {
  display: block;
  margin-top: 10px;
  font-size: 19px;
  line-height: 1.15;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.data-card .hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.status-block {
  padding: 12px 14px;
  border: 1px solid rgba(145, 167, 201, 0.1);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
}
.status-block span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.status-block strong {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  color: var(--soft);
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}
.signal-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.signal-card {
  min-height: 92px;
  padding: 14px;
  border: 1px solid rgba(145, 167, 201, 0.1);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(18, 25, 35, 0.98), rgba(11, 17, 24, 0.98));
}
.signal-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.signal-card strong {
  display: block;
  margin-top: 10px;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.signal-card small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

.tabs {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(145, 167, 201, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.tab {
  min-height: 34px;
  padding: 6px 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.tab.active {
  background: linear-gradient(180deg, rgba(18, 30, 46, 0.98), rgba(12, 20, 31, 0.98));
  color: #ffffff;
}
.period-view[hidden] { display: none; }
.calendar-summary {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(145, 167, 201, 0.08);
}
.calendar-summary-main span,
.calendar-summary-side span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.calendar-summary-main strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.calendar-summary-side {
  display: flex;
  gap: 20px;
  text-align: right;
}
.calendar-summary-side strong {
  display: block;
  margin-top: 6px;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.calendar-cell, .month-card, .year-card {
  min-height: 102px;
  padding: 12px;
  border: 1px solid rgba(145, 167, 201, 0.1);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.calendar-cell.ghost { visibility: hidden; }
.calendar-cell.empty { background: rgba(255, 255, 255, 0.015); }
.calendar-cell strong, .month-card strong, .year-card strong {
  font-size: 16px;
  font-weight: 800;
}
.calendar-cell span, .month-card span, .year-card span {
  display: block;
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.calendar-cell small, .month-card small, .year-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.month-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.year-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(145, 167, 201, 0.1);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.015));
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(145, 167, 201, 0.07);
  text-align: left;
  vertical-align: top;
}
th {
  color: var(--muted);
  background: #121b28;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.015); }
tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.symbol-cell { font-weight: 800; letter-spacing: 0.02em; }
.symbol-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.symbol-logo,
.symbol-fallback {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  flex: 0 0 24px;
}
.symbol-logo {
  display: block;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(145, 167, 201, 0.16);
}
.symbol-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(62, 123, 255, 0.35), rgba(86, 212, 194, 0.22));
  border: 1px solid rgba(145, 167, 201, 0.16);
  color: var(--soft);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.symbol-copy {
  display: grid;
  min-width: 0;
}
.symbol-code {
  display: block;
  line-height: 1.2;
}
.symbol-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(89, 167, 255, 0.12);
  color: #bdddff;
  font-size: 11px;
  font-weight: 800;
}
.status-pill.pending {
  background: rgba(242, 189, 88, 0.14);
  color: #ffdd95;
}
.side-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  aspect-ratio: 1 / 1;
  padding: 0;
  border-radius: 50%;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  flex-shrink: 0;
  vertical-align: middle;
}
.side-pill.buy {
  background: blue;
  border-color: blue;
  color: #ffffff;
}
.side-pill.sell {
  background: red;
  border-color: red;
  color: #ffffff;
}

form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.inline-form {
  display: flex;
  justify-content: flex-end;
  min-width: 130px;
}
.filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 360px) auto auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--soft);
  font-size: 13px;
}
input, select, textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid rgba(145, 167, 201, 0.16);
  background: var(--field-bg);
  color: var(--text);
  font: inherit;
}
textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.55;
}
input::placeholder, textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}
button, .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 0;
  background: linear-gradient(135deg, #3e7bff, #2959d4);
  color: white;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.secondary-button {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(145, 167, 201, 0.14);
  color: var(--soft);
}
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid rgba(255, 97, 117, 0.22);
  background: rgba(255, 97, 117, 0.12);
  color: #ffdce2;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.full { grid-column: 1 / -1; }
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.single-tool-grid {
  grid-template-columns: minmax(0, 1fr);
}
.tool-card h3 {
  margin-bottom: 14px;
  font-size: 18px;
}
.plan-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(145, 167, 201, 0.16);
  background: rgba(255, 255, 255, 0.02);
}
.plan-panel.missing {
  border-color: rgba(255, 97, 117, 0.2);
  background: linear-gradient(180deg, rgba(74, 16, 24, 0.42), rgba(255, 255, 255, 0.02));
}
.plan-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.plan-content,
.plan-table-content {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.7;
}
.plan-content {
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(145, 167, 201, 0.12);
  background: rgba(255, 255, 255, 0.025);
  color: var(--soft);
}
.empty-plan-state {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 94, 126, 0.35);
  background: rgba(118, 20, 37, 0.18);
  color: #ffd8df;
}
.empty-plan-state strong {
  font-size: 14px;
}
.empty-plan-state span {
  font-size: 13px;
  line-height: 1.6;
}
.tool-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.fee-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.fee-preview span {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 12px;
}
.fee-preview strong { color: var(--soft); font-weight: 800; }
.fee-total strong { color: var(--neg); }
.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.search-row input {
  max-width: 320px;
}
.edit-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.edit-summary span {
  display: block;
  padding: 12px 14px;
  border: 1px solid rgba(145, 167, 201, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 12px;
}
.edit-summary strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
  color: var(--text);
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 9px;
  background: rgba(89, 167, 255, 0.12);
  border: 1px solid rgba(89, 167, 255, 0.18);
  color: #bdddff;
  font-size: 12px;
  font-weight: 800;
}
.journal-content {
  max-width: 560px;
  white-space: pre-wrap;
  line-height: 1.55;
}
.news-list {
  display: grid;
  gap: 10px;
}
.news-item {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(145, 167, 201, 0.1);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.014));
}
.news-symbol {
  min-width: 0;
}
.news-copy {
  min-width: 0;
  display: grid;
  gap: 7px;
}
.news-title {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}
.news-title:hover {
  color: #bdddff;
}
.news-copy p {
  color: var(--soft);
  font-size: 13px;
  line-height: 1.55;
}
.news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.news-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}
.empty-state {
  padding: 18px;
  border: 1px dashed rgba(145, 167, 201, 0.2);
  border-radius: 16px;
  color: var(--muted);
  font-size: 13px;
}
@keyframes market-banner-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.muted { color: var(--muted); }

@media (max-width: 1280px) {
  .terminal-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    min-height: 0;
  }
  .overview-layout,
  .data-grid,
  .signal-grid,
  .status-grid,
  .month-grid,
  .year-grid,
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 840px) {
  .terminal-shell {
    width: min(100%, calc(100% - 20px));
    margin: 10px auto;
  }
  .topbar,
  .module-head,
  .overview-layout,
  .section-body { padding-left: 14px; padding-right: 14px; }
  .topbar,
  .module-head,
  .calendar-summary,
  .search-row,
  .inline-form,
  .form-actions { flex-direction: column; align-items: stretch; }
  .topbar-pills { justify-content: flex-start; }
  .overview-layout,
  .calendar-grid,
  .edit-summary,
  form { grid-template-columns: 1fr; }
  .data-grid,
  .signal-grid,
  .status-grid,
  .month-grid,
  .year-grid,
  .tool-grid,
  .fee-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-row,
  .news-item {
    grid-template-columns: 1fr;
  }
  .headline-card {
    min-height: 196px;
    padding: 14px;
  }
  .headline-card .value {
    font-size: clamp(28px, 8vw, 42px);
  }
  .data-card,
  .signal-card,
  .status-block,
  .calendar-cell,
  .month-card,
  .year-card,
  .tool-card {
    min-height: 0;
    padding: 12px;
  }
  .data-card .val,
  .signal-card strong,
  .calendar-summary-main strong,
  .calendar-summary-side strong {
    font-size: 16px;
  }
  .data-card .hint,
  .signal-card small,
  .status-block span,
  .calendar-cell small,
  .month-card small,
  .year-card small {
    font-size: 10px;
  }
  .plan-warning-banner,
  .plan-panel-head,
  .market-risk-head {
    flex-direction: column;
    align-items: stretch;
  }
  .plan-warning-banner .secondary-button,
  .plan-panel-head .secondary-button {
    width: 100%;
  }
  .calendar-weekdays { display: none; }
  table, thead, tbody, tr, td {
    display: block;
    width: 100%;
  }
  thead { display: none; }
  tbody tr {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(145, 167, 201, 0.08);
  }
  td {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 6px 0;
    border: 0;
    text-align: right;
  }
  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 800;
    text-align: left;
  }
  td:first-child::before { display: none; }
  td:first-child {
    justify-content: flex-start;
    padding-bottom: 10px;
    font-size: 16px;
  }
  .journal-content {
    max-width: none;
    text-align: left;
  }
}

/* Bright rectangular UI refresh */
body[data-theme="light"] {
  --bg: #f4f8ff;
  --panel: #ffffff;
  --panel-2: #edf4ff;
  --panel-3: #dbeaff;
  --panel-green: #e7fff6;
  --panel-red: #fff0f3;
  --panel-gold: #fff8df;
  --line: rgba(20, 68, 128, 0.18);
  --text: #071426;
  --muted: #50627a;
  --soft: #172943;
  --accent: #006dff;
  --accent-2: #00a78a;
  --pos: #d71942;
  --neg: #008f5a;
  --warn: #b77900;
  --danger: #c51f3c;
  --risk-red-bg: linear-gradient(180deg, #fff4f6 0%, #ffffff 100%);
  --risk-black-bg: linear-gradient(180deg, #271017 0%, #12080c 100%);
  --danger-panel: linear-gradient(135deg, #fff1f3 0%, #ffe5e9 100%);
  --danger-text: #65111f;
  --field-bg: #ffffff;
  --card-tint: rgba(0, 109, 255, 0.055);
  --shadow: 0 18px 42px rgba(26, 68, 124, 0.15);
  background:
    linear-gradient(90deg, rgba(0, 109, 255, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 167, 138, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, #f8fbff 0%, #edf5ff 100%);
  background-size: 28px 28px, 28px 28px, auto;
}

body[data-theme="dark"] {
  color-scheme: dark;
  background:
    linear-gradient(90deg, rgba(88, 166, 255, 0.07) 1px, transparent 1px),
    linear-gradient(180deg, rgba(86, 212, 194, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, #09111c 0%, #101a27 48%, #080e16 100%);
  background-size: 28px 28px, 28px 28px, auto;
}

body[data-theme="light"] {
  color-scheme: light;
}

* {
  border-radius: 0 !important;
}

a,
button,
.secondary-button,
.nav-link,
.tab,
.row-action,
tbody tr,
.news-item,
.data-card,
.tool-card,
.status-block,
.signal-card,
.calendar-cell,
.month-card,
.year-card {
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.mobile-menu-toggle,
.theme-toggle {
  position: fixed;
  z-index: 80;
  top: var(--mobile-control-top);
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(88, 166, 255, 0.38);
  background: #006dff;
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(0, 109, 255, 0.28);
}
.mobile-menu-toggle {
  left: 14px;
  display: none;
}
.theme-toggle {
  right: 14px;
}
.theme-toggle:hover,
.mobile-menu-toggle:hover,
button:hover,
.secondary-button:hover,
.row-action:hover {
  background: #00a78a;
  border-color: rgba(0, 167, 138, 0.72);
  color: #ffffff;
  box-shadow: 0 0 0 2px rgba(0, 167, 138, 0.18), 0 10px 24px rgba(0, 167, 138, 0.22);
}

.drawer-scrim {
  display: none;
}

.sidebar,
.topbar,
.module,
.headline-card,
.table-wrap,
.data-card,
.tool-card,
.status-block,
.signal-card,
.calendar-cell,
.month-card,
.year-card,
.news-item,
.sidebar-card {
  background: var(--panel);
  border-color: var(--line);
}

body[data-theme="dark"] .sidebar,
body[data-theme="dark"] .topbar,
body[data-theme="dark"] .module,
body[data-theme="dark"] .headline-card,
body[data-theme="dark"] .table-wrap,
body[data-theme="dark"] .data-card,
body[data-theme="dark"] .tool-card,
body[data-theme="dark"] .status-block,
body[data-theme="dark"] .signal-card,
body[data-theme="dark"] .calendar-cell,
body[data-theme="dark"] .month-card,
body[data-theme="dark"] .year-card,
body[data-theme="dark"] .news-item,
body[data-theme="dark"] .sidebar-card {
  background: linear-gradient(180deg, rgba(17, 26, 39, 0.98), rgba(9, 15, 23, 0.98));
}

.brand-mark {
  background: #ffcc00;
  color: #071426;
  box-shadow: inset 0 -4px 0 rgba(255, 97, 117, 0.35);
}
.ui-version,
.pill,
.snapshot-chip,
.status-pill,
.news-meta span {
  background: rgba(0, 109, 255, 0.12);
  border-color: rgba(0, 109, 255, 0.26);
  color: var(--soft);
}
.nav-link {
  border-left: 4px solid transparent;
  background: color-mix(in srgb, var(--panel-2) 74%, transparent);
}
.nav-link:hover {
  border-color: rgba(0, 109, 255, 0.38);
  border-left-color: #ffcc00;
  background: rgba(0, 109, 255, 0.18);
  color: var(--text);
  transform: translateX(3px);
}
.nav-link.active {
  border-color: rgba(0, 109, 255, 0.5);
  border-left-color: #00a78a;
  background: linear-gradient(90deg, rgba(0, 109, 255, 0.26), rgba(0, 167, 138, 0.12));
  color: var(--text);
}
.nav-link:hover small,
.nav-link.active small {
  color: var(--text);
}

.module:hover,
.topbar:hover,
.news-item:hover,
.data-card:hover,
.tool-card:hover,
.status-block:hover,
.signal-card:hover,
.calendar-cell:hover,
.month-card:hover,
.year-card:hover {
  border-color: rgba(0, 109, 255, 0.42);
  box-shadow: 0 0 0 1px rgba(0, 109, 255, 0.18), var(--shadow);
}
.news-item:hover,
.data-card:hover,
.tool-card:hover,
.status-block:hover,
.signal-card:hover,
.calendar-cell:hover,
.month-card:hover,
.year-card:hover {
  transform: translateY(-1px);
}

.news-title:hover,
a:hover {
  color: #00a78a;
}
tbody tr:hover {
  background: rgba(0, 109, 255, 0.11);
}

input,
select,
textarea {
  background: color-mix(in srgb, var(--panel) 86%, #006dff 14%);
  border-color: rgba(0, 109, 255, 0.26);
  color: var(--text);
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(0, 167, 138, 0.45);
  border-color: #00a78a;
}
button,
.secondary-button {
  background: #006dff;
  border: 1px solid rgba(0, 109, 255, 0.62);
}
.secondary-button {
  background: transparent;
  color: var(--text);
}
.tab:hover {
  background: rgba(0, 109, 255, 0.15);
  color: var(--text);
}
.tab.active {
  background: #006dff;
}

body[data-theme="light"] th {
  background: #dceaff;
  color: #22364f;
}
body[data-theme="light"] tbody tr:nth-child(even) {
  background: rgba(0, 109, 255, 0.045);
}

@media (max-width: 840px) {
  body {
    padding-top: calc(60px + env(safe-area-inset-top));
  }
  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .theme-toggle {
    top: var(--mobile-control-top);
    right: 14px;
  }
  .terminal-shell {
    display: block;
    width: min(100%, calc(100% - 16px));
    margin-top: 0;
  }
  .sidebar {
    position: fixed;
    z-index: 90;
    top: 0;
    left: 0;
    width: min(82vw, 320px);
    height: 100dvh;
    padding-top: calc(64px + env(safe-area-inset-top));
    min-height: 0;
    overflow-y: auto;
    transform: translateX(-105%);
    transition: transform 180ms ease;
    box-shadow: 18px 0 44px rgba(0, 0, 0, 0.34);
  }
  body.nav-open .sidebar {
    transform: translateX(0);
  }
  .drawer-scrim {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(2, 8, 18, 0.58);
  }
  body.nav-open .drawer-scrim {
    display: block;
  }
  .workspace {
    gap: 10px;
  }
  .market-banner,
  .market-risk-card,
  .module,
  .topbar {
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
  }
  .topbar,
  .module-head {
    gap: 10px;
  }
  .topbar {
    padding: 12px 14px;
    align-items: stretch;
  }
  .topbar h1 {
    font-size: 18px;
  }
  .topbar-pills,
  .snapshot-strip,
  .risk-meta,
  .news-meta {
    gap: 6px;
  }
  .pill,
  .snapshot-chip,
  .news-meta span {
    min-height: 26px;
    padding: 0 8px;
    font-size: 10px;
  }
  .market-risk-card {
    padding: 14px;
    gap: 12px;
  }
  .risk-score-box {
    width: 100%;
    min-width: 0;
    text-align: left;
  }
  .risk-chain {
    grid-template-columns: repeat(5, minmax(44px, 1fr));
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .risk-chain span {
    min-width: 44px;
    min-height: 28px;
    font-size: 11px;
  }
  .news-copy p,
  .module-subtitle {
    font-size: 12px;
  }
  .filter-row,
  .search-row {
    gap: 8px;
  }
  .filter-row input,
  .search-row input {
    max-width: none;
  }
  td {
    align-items: flex-start;
  }
}

@media (max-width: 840px) {
  .portfolio-table,
  .portfolio-table tbody {
    display: block;
    width: 100%;
  }
  .portfolio-table tbody {
    display: grid;
    gap: 12px;
  }
  .portfolio-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    background: var(--panel);
  }
  .portfolio-table td {
    display: block;
    min-width: 0;
    padding: 9px;
    border: 1px solid rgba(0, 109, 255, 0.14);
    background: rgba(0, 109, 255, 0.07);
    text-align: left;
  }
  .portfolio-table td::before {
    display: block;
    margin-bottom: 5px;
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .portfolio-table td:first-child,
  .portfolio-table td:nth-child(10),
  .portfolio-table td:nth-child(11) {
    grid-column: 1 / -1;
  }
  .portfolio-table td:first-child {
    padding: 10px;
    font-size: 15px;
    background: linear-gradient(90deg, rgba(0, 109, 255, 0.18), rgba(0, 167, 138, 0.1));
  }
  .portfolio-table .num {
    text-align: left;
  }
  .portfolio-table .symbol-badge {
    width: 100%;
    justify-content: flex-start;
  }
  .portfolio-table .symbol-logo,
  .portfolio-table .symbol-fallback {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }
  .portfolio-table .symbol-code {
    font-size: 16px;
    font-weight: 900;
  }
  .portfolio-table .status-pill {
    width: 100%;
    justify-content: center;
  }
  .portfolio-table td:nth-child(9),
  .portfolio-table td:nth-child(10) {
    background: rgba(0, 167, 138, 0.09);
    border-color: rgba(0, 167, 138, 0.24);
  }
  .calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    margin-bottom: 6px;
  }
  .calendar-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }
  .calendar-cell {
    min-height: 72px;
    padding: 7px 5px;
    gap: 5px;
  }
  .calendar-cell strong,
  .month-card strong,
  .year-card strong {
    font-size: 13px;
  }
  .calendar-cell span {
    font-size: 11px;
    line-height: 1.2;
    word-break: break-word;
  }
  .calendar-cell small {
    font-size: 9px;
    line-height: 1.2;
  }
  .calendar-summary-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    text-align: left;
  }
  .calendar-summary-side > div {
    padding: 10px;
    border: 1px solid rgba(0, 109, 255, 0.16);
    background: rgba(0, 109, 255, 0.07);
  }
  .month-grid,
  .year-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .month-card,
  .year-card {
    min-height: 92px;
    padding: 10px;
  }
  .month-card span,
  .year-card span {
    font-size: 13px;
    line-height: 1.25;
    word-break: break-word;
  }
  .month-card small,
  .year-card small {
    font-size: 10px;
  }
}

@media (max-width: 430px) {
  .data-grid,
  .signal-grid,
  .status-grid,
  .risk-card-grid,
  .month-grid,
  .year-grid,
  .tool-grid,
  .fee-preview {
    grid-template-columns: 1fr;
  }
  .topbar,
  .module-head,
  .overview-layout,
  .section-body {
    padding-left: 12px;
    padding-right: 12px;
  }
  .headline-card {
    min-height: 168px;
  }
  .headline-card .value {
    font-size: clamp(24px, 10vw, 34px);
  }
  .portfolio-table tr {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px;
  }
  .portfolio-table td {
    padding: 8px 7px;
  }
  .calendar-cell {
    min-height: 66px;
    padding: 6px 4px;
  }
  .calendar-cell span {
    font-size: 10px;
  }
  .month-grid,
  .year-grid {
    grid-template-columns: 1fr 1fr;
  }
}
