:root {
  color-scheme: dark;
  --bg: #070b09;
  --bg-soft: #0c1210;
  --surface: #111814;
  --surface-raised: #161e19;
  --line: rgba(214, 232, 218, 0.09);
  --line-strong: rgba(214, 232, 218, 0.16);
  --text: #f2f6f2;
  --muted: #8b978e;
  --muted-bright: #b7c2b8;
  --green: #74e6a4;
  --green-deep: #2f9a58;
  --amber: #e8c57a;
  --red: #ef8b8b;
  --blue: #95b4e4;
  --violet: #b8a4de;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 22px 56px rgba(0, 0, 0, 0.28);
  --font: "IBM Plex Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-sans-serif, sans-serif;
  font-family: var(--font);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--bg);
  scrollbar-color: rgba(214, 232, 218, 0.18) transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(ellipse 70% 46% at 8% -12%, rgba(116, 230, 164, 0.13), transparent 52%),
    radial-gradient(ellipse 48% 36% at 96% 0%, rgba(149, 180, 228, 0.08), transparent 48%),
    linear-gradient(180deg, #0b110e 0%, var(--bg) 28rem);
}

::selection { color: #07110b; background: rgba(116, 230, 164, 0.82); }
button, a { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible {
  outline: 2px solid rgba(116, 230, 164, 0.72);
  outline-offset: 2px;
}

.ambient {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(116, 230, 164, 0.05), transparent 18rem),
    radial-gradient(circle at 88% 72%, rgba(149, 180, 228, 0.04), transparent 20rem);
}

.ops-shell {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 22px 0 42px;
}

.surface {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent 34%),
    var(--surface);
  box-shadow: var(--shadow);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  margin: -8px -10px 10px;
  padding: 12px 10px;
  background: color-mix(in srgb, var(--bg) 76%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.brand b { font-size: 16px; font-weight: 650; letter-spacing: -0.03em; }
.brand small { color: var(--muted); font-size: 12px; letter-spacing: 0; }

.brand-mark {
  display: grid;
  grid-template-columns: repeat(3, 4px);
  align-items: end;
  gap: 3px;
  width: 36px;
  height: 36px;
  padding: 8px;
  border: 1px solid rgba(116, 230, 164, 0.22);
  border-radius: 11px;
  background:
    linear-gradient(180deg, rgba(116, 230, 164, 0.16), rgba(116, 230, 164, 0.04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.brand-mark i { display: block; border-radius: 99px; background: var(--green); }
.brand-mark i:nth-child(1) { height: 8px; opacity: 0.5; }
.brand-mark i:nth-child(2) { height: 13px; opacity: 0.78; }
.brand-mark i:nth-child(3) { height: 18px; }

.top-actions { display: flex; align-items: center; gap: 8px; }

.product-nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 22px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
}

.product-nav-link {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border: 0;
  border-radius: 999px;
  padding: 0 13px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 560;
  text-decoration: none;
  transition: 160ms ease;
}

.product-nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.product-nav-link.active {
  color: #07110b;
  background: var(--green);
  box-shadow: 0 8px 18px rgba(116, 230, 164, 0.18);
}

.state-pill,
.readonly-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-bright);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  font-weight: 600;
}

.state-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 16%, transparent);
}

.state-pill.ok { color: var(--green); border-color: rgba(116, 230, 164, 0.22); background: rgba(116, 230, 164, 0.08); }
.state-pill.warn { color: var(--amber); border-color: rgba(232, 197, 122, 0.22); background: rgba(232, 197, 122, 0.08); }
.state-pill.danger { color: var(--red); border-color: rgba(239, 139, 139, 0.24); background: rgba(239, 139, 139, 0.08); }
.state-pill.waiting i { animation: pulse 1.6s infinite; }
.readonly-pill { color: var(--blue); border-color: rgba(149, 180, 228, 0.22); background: rgba(149, 180, 228, 0.08); }

.text-button,
.refresh-button {
  min-height: 36px;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
}

.text-button {
  display: none;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
}

.text-button.visible { display: inline-flex; align-items: center; }
.text-button:hover { color: var(--text); }

.refresh-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface-raised);
  font-size: 12px;
  font-weight: 620;
  transition: 160ms ease;
}

.refresh-button:hover {
  border-color: rgba(116, 230, 164, 0.34);
  background: #1c2620;
}

.refresh-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.refresh-button.spinning svg { animation: spin 0.8s linear infinite; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.72fr);
  gap: 16px;
}

.equity-card,
.system-card {
  min-height: 292px;
  padding: 24px 26px 22px;
  overflow: hidden;
}

.card-kicker,
.section-title,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.card-kicker time,
.card-kicker span:last-child {
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.equity-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 28px;
  min-height: 156px;
  padding-top: 22px;
}

.currency-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.equity-main strong {
  display: block;
  font-size: clamp(40px, 4.6vw, 56px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
}

.daily-change {
  display: inline-flex;
  margin-top: 14px;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted-bright);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.daily-change.positive,
.positive { color: var(--green) !important; }
.daily-change.negative,
.negative { color: var(--red) !important; }
.daily-change.positive { background: rgba(116, 230, 164, 0.1); }
.daily-change.negative { background: rgba(239, 139, 139, 0.1); }

.equity-chart {
  align-self: center;
  width: 100%;
  height: 108px;
  overflow: visible;
}

.chart-line {
  fill: none;
  stroke: var(--green);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.chart-fill { fill: url("#equityFill"); }
.chart-dot {
  fill: var(--surface);
  stroke: var(--green);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.equity-chart.down .chart-line { stroke: var(--red); }
.equity-chart.down .chart-fill { fill: url("#equityFillDown"); }
.equity-chart.down .chart-dot { stroke: var(--red); }

.equity-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.equity-meta div { display: flex; flex-direction: column; gap: 6px; }
.equity-meta span,
.review-equity span,
.review-stats span { color: var(--muted); font-size: 11px; }
.equity-meta b { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }

.system-state-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 132px;
  padding: 24px 0 18px;
}

.system-orb {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
}

.system-orb::before,
.system-orb i { content: ""; display: block; border-radius: 50%; }
.system-orb::before { width: 26px; height: 26px; background: currentColor; opacity: 0.1; }
.system-orb i {
  position: absolute;
  width: 9px;
  height: 9px;
  background: currentColor;
  box-shadow: 0 0 22px currentColor;
}

.system-orb.ok { color: var(--green); }
.system-orb.warn { color: var(--amber); }
.system-orb.danger { color: var(--red); }
.system-orb.waiting { color: var(--muted); }

.system-state-row strong {
  font-size: 24px;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.system-state-row p {
  max-width: 360px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.system-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
}

.system-facts div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.system-facts div:first-child { padding-left: 0; border-left: 0; }
.system-facts div:last-child { padding-right: 0; }
.system-facts dt { color: var(--muted); font-size: 11px; }
.system-facts dd { margin: 0; font-size: 12px; font-weight: 620; font-variant-numeric: tabular-nums; }

.moments-section { margin-top: 34px; }
.strategies-section { margin-top: 28px; }

.strategy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.strategy-card {
  position: relative;
  min-height: 186px;
  overflow: hidden;
  padding: 20px;
}

.strategy-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--green);
}

.strategy-card[data-strategy="active"]::before { background: var(--amber); }

.strategy-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.strategy-head span:first-child {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.strategy-head h3 {
  margin: 5px 0 0;
  font-size: 18px;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.strategy-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.strategy-metrics div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  padding: 13px 12px;
  border-left: 1px solid var(--line);
}

.strategy-metrics div:first-child { padding-left: 0; border-left: 0; }
.strategy-metrics span { color: var(--muted); font-size: 11px; }
.strategy-metrics b { overflow-wrap: anywhere; font-size: 13px; font-variant-numeric: tabular-nums; }
.strategy-card p { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

.view-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.view-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.view-chip b { font-size: 12px; }
.view-chip small { color: var(--muted); font-size: 11px; }
.view-chip.ok { border-color: rgba(116, 230, 164, 0.28); }
.view-chip.danger { border-color: rgba(239, 139, 139, 0.28); }

.ledger-card {
  margin-top: 14px;
  padding: 18px 20px 14px;
}

.ledger-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.ledger-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.ledger-head h3 {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 600;
}

.ledger-head small { color: var(--muted); font-size: 12px; }

.ledger-metrics {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.ledger-metrics div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 10px;
  border-left: 1px solid var(--line);
}

.ledger-metrics div:first-child { padding-left: 0; border-left: 0; }
.ledger-metrics span { color: var(--muted); font-size: 11px; }
.ledger-metrics b { font-size: 13px; font-variant-numeric: tabular-nums; }

.ledger-trades { margin-top: 12px; display: grid; gap: 8px; }

.ledger-trade {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 6px 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.ledger-trade small { grid-column: 1 / -1; color: var(--muted); }
.ledger-trade.win { border-color: rgba(116, 230, 164, 0.22); }
.ledger-trade.loss { border-color: rgba(239, 139, 139, 0.22); }
.ledger-trade.unresolved { border-color: rgba(235, 190, 104, 0.35); }
.ledger-trade .up { color: var(--green); }
.ledger-trade .down { color: var(--red); }
.ledger-empty { color: var(--muted); font-size: 12px; padding: 8px 0; }

.ledger-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.ledger-breakdown-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
}

.ledger-breakdown-item div { display: grid; gap: 3px; min-width: 0; }
.ledger-breakdown-item b { font-size: 12px; }
.ledger-breakdown-item small { color: var(--muted); font-size: 10px; }
.ledger-breakdown-item strong { font-size: 12px; font-variant-numeric: tabular-nums; }
.ledger-breakdown-item em { font-size: 11px; font-style: normal; font-variant-numeric: tabular-nums; }

@media (max-width: 860px) {
  .ledger-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger-metrics div { border-left: 0; border-top: 1px solid var(--line); }
  .ledger-metrics div:first-child { border-top: 0; }
  .ledger-trade { grid-template-columns: 1fr; }
}

.archive-pill.danger { color: var(--red); background: rgba(239, 139, 139, 0.1); }

.section-title { margin-bottom: 14px; }
.section-title > div > span,
.panel-head > div > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.section-title h2,
.panel-head h2 {
  margin: 4px 0 0;
  font-size: 20px;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.section-title small { color: var(--muted); font-size: 12px; }

.moments-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(214px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.moment-card,
.empty-card {
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 17px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 42%),
    rgba(14, 20, 16, 0.82);
}

.moment-card { position: relative; overflow: hidden; }
.moment-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--green);
}

.moment-card.kind-risk::before { background: var(--red); }
.moment-card.kind-macro::before { background: var(--amber); }
.moment-card.kind-trade::before { background: var(--blue); }
.moment-card time { display: block; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.moment-card strong { display: block; margin-top: 18px; font-size: 14px; letter-spacing: -0.02em; }
.moment-card p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.empty-card { display: grid; place-items: center; color: var(--muted); font-size: 13px; }

.journal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.72fr);
  gap: 16px;
  margin-top: 28px;
}

.timeline-panel,
.review-panel {
  min-height: 560px;
  padding: 22px 24px;
}

.panel-head {
  min-height: 52px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.filters {
  display: flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  background: rgba(0, 0, 0, 0.16);
}

.filter {
  border: 0;
  border-radius: 999px;
  padding: 6px 11px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}

.filter.active { color: #07110b; background: var(--green); }
.timeline { padding-top: 6px; }

.timeline-item {
  display: grid;
  grid-template-columns: 22px 78px 1fr;
  min-height: 84px;
}

.timeline-rail { position: relative; display: flex; justify-content: center; }
.timeline-rail::after {
  content: "";
  position: absolute;
  top: 26px;
  bottom: -1px;
  width: 1px;
  background: var(--line);
}

.timeline-item:last-child .timeline-rail::after { display: none; }
.timeline-rail i {
  position: relative;
  z-index: 1;
  width: 8px;
  height: 8px;
  margin-top: 20px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(149, 180, 228, 0.12);
}

.level-ok .timeline-rail i { background: var(--green); box-shadow: 0 0 0 4px rgba(116, 230, 164, 0.12); }
.level-warn .timeline-rail i { background: var(--amber); box-shadow: 0 0 0 4px rgba(232, 197, 122, 0.14); }
.level-danger .timeline-rail i { background: var(--red); box-shadow: 0 0 0 4px rgba(239, 139, 139, 0.14); }

.timeline-time { padding-top: 16px; }
.timeline-time time { display: block; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.timeline-time span {
  display: inline-flex;
  margin-top: 6px;
  border-radius: 999px;
  padding: 2px 6px;
  color: var(--green);
  background: rgba(116, 230, 164, 0.1);
  font-size: 10px;
}

.timeline-copy { padding: 14px 0 16px 8px; }
.timeline-copy strong { font-size: 13px; letter-spacing: -0.02em; }
.timeline-copy p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.58; word-break: break-word; }
.empty-state { display: grid; min-height: 260px; place-items: center; color: var(--muted); font-size: 13px; text-align: center; }

.archive-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 620;
}

.archive-pill.final { color: var(--green); background: rgba(116, 230, 164, 0.09); }
.archive-pill.provisional { color: var(--amber); background: rgba(232, 197, 122, 0.08); }

.review-conclusion {
  min-height: 86px;
  margin-top: 18px;
  border-left: 3px solid var(--green);
  padding: 10px 0 10px 14px;
  color: var(--muted-bright);
  font-size: 13px;
  line-height: 1.7;
}

.review-equity {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
}

.review-equity div:not(.arrow) { display: flex; flex-direction: column; gap: 6px; }
.review-equity div:last-child { text-align: right; }
.review-equity b { font-size: 14px; font-variant-numeric: tabular-nums; }
.review-equity .arrow { color: var(--muted); font-size: 16px; }

.review-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.review-stats div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  border-bottom: 1px solid var(--line);
}

.review-stats div:nth-child(odd) { padding-right: 12px; }
.review-stats div:nth-child(even) { padding-left: 12px; border-left: 1px solid var(--line); }
.review-stats b { font-size: 12px; }

.archive-block { margin-top: 22px; }
.archive-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted-bright);
  font-size: 12px;
}

.archive-heading small { color: var(--muted); font-size: 11px; }
.archive-list { display: grid; gap: 8px; max-height: 220px; margin-top: 10px; overflow-y: auto; }

.archive-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  text-align: left;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: 160ms ease;
}

.archive-item:hover,
.archive-item.active {
  border-color: rgba(116, 230, 164, 0.28);
  background: rgba(116, 230, 164, 0.05);
}

.archive-item span { min-width: 0; }
.archive-item b { display: block; font-size: 12px; }
.archive-item small {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-item em { flex: 0 0 auto; color: var(--muted); font-size: 12px; font-style: normal; }
.archive-empty {
  display: grid;
  min-height: 76px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 12px;
}

.footer-note {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 22px;
  padding: 0 4px;
  color: #6d776f;
  font-size: 11px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  max-width: min(430px, calc(100vw - 48px));
  transform: translateY(16px);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 12px 14px;
  opacity: 0;
  pointer-events: none;
  color: var(--text);
  background: #18211b;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
  font-size: 13px;
  transition: 180ms ease;
}

.toast.visible { transform: translateY(0); opacity: 1; }

@keyframes pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

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

@media (max-width: 920px) {
  .ops-shell { width: min(100% - 28px, 760px); padding-top: 14px; }
  .hero-grid,
  .journal-grid,
  .strategy-grid { grid-template-columns: 1fr; }
  .system-card { min-height: 260px; }
  .review-panel { min-height: auto; }
}

@media (max-width: 620px) {
  .topbar {
    align-items: flex-start;
    margin-left: -4px;
    margin-right: -4px;
    padding-left: 4px;
    padding-right: 4px;
  }

  .top-actions { flex-wrap: wrap; justify-content: flex-end; }
  .state-pill { order: 3; }
  .readonly-pill { display: none; }
  .refresh-button { padding: 0 10px; }
  .product-nav { width: 100%; border-radius: 16px; }
  .equity-card,
  .system-card,
  .timeline-panel,
  .review-panel { padding: 18px; border-radius: 16px; }
  .equity-main { grid-template-columns: 1fr; gap: 10px; padding-top: 22px; }
  .equity-main strong { font-size: 44px; }
  .equity-chart { height: 76px; }
  .equity-meta { margin-top: 8px; }
  .equity-meta b { font-size: 12px; }
  .system-facts { grid-template-columns: 1fr; }
  .strategy-metrics { grid-template-columns: 1fr; }
  .strategy-metrics div { padding: 11px 0; border-left: 0; border-top: 1px solid var(--line); }
  .strategy-metrics div:first-child { border-top: 0; }
  .system-facts div { padding: 0; border-left: 0; }
  .moments-track { grid-auto-columns: 78%; }
  .panel-head { align-items: flex-start; gap: 10px; }
  .timeline-item { grid-template-columns: 16px 62px 1fr; }
  .timeline-copy { padding-left: 3px; }
  .footer-note { flex-direction: column; gap: 4px; }
}
