:root {
  --bg: #edf0e7;
  --ink: #17231e;
  --muted: #66736e;
  --panel: rgba(252, 250, 245, 0.92);
  --panel-strong: rgba(255, 255, 255, 0.82);
  --line: rgba(23, 35, 30, 0.1);
  --shadow: 0 18px 48px rgba(24, 35, 29, 0.12);
  --green: #1d7b4f;
  --green-soft: rgba(29, 123, 79, 0.12);
  --amber: #b46c1b;
  --amber-soft: rgba(180, 108, 27, 0.14);
  --red: #bf5438;
  --red-soft: rgba(191, 84, 56, 0.12);
  --blue: #1d618d;
  --blue-soft: rgba(29, 97, 141, 0.12);
  --slate: rgba(23, 35, 30, 0.06);
  --cream: #fbf8f1;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(188, 214, 198, 0.72), transparent 28%),
    radial-gradient(circle at 88% 0%, rgba(238, 221, 186, 0.76), transparent 26%),
    linear-gradient(180deg, #f3f4ef 0%, #e8e9e1 52%, #e4e5dd 100%);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

.app-shell {
  width: min(1520px, calc(100% - 28px));
  margin: 0 auto;
  padding: 20px 0 40px;
}

.hero,
.panel,
.summary-card,
.bot-card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero {
  border-radius: 34px;
  padding: 30px 32px;
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.eyebrow,
.summary-label,
.metric-label,
.bot-kicker,
.section-title,
.data-table th,
.mini-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
}

.eyebrow,
.bot-kicker {
  color: var(--amber);
  margin-bottom: 10px;
}

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

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 5vw, 66px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

h2 {
  font-size: 28px;
  letter-spacing: -0.04em;
}

h3 {
  font-size: 28px;
  letter-spacing: -0.04em;
}

.subtitle,
.panel-head p,
.summary-sub,
.metric-sub,
.source-line,
.bot-market,
.event-copy,
.architecture-note p,
.empty-inline,
.empty-state,
.status-sub,
.status-body,
.log-time,
.log-bot,
.log-message,
.chart-label,
.chart-value,
.table-sub {
  color: var(--muted);
}

.subtitle {
  max-width: 780px;
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.6;
}

.hero-actions,
.status-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}

.pill,
.badge,
.chip,
.state-pill {
  border-radius: 999px;
}

.pill {
  padding: 11px 15px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
  font-size: 14px;
}

.pill.subtle {
  background: var(--blue-soft);
  color: var(--blue);
}

.layout {
  display: grid;
  gap: 18px;
}

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

.summary-card {
  border-radius: 24px;
  padding: 18px;
}

.summary-label {
  color: var(--muted);
  margin-bottom: 12px;
}

.summary-value {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

.summary-sub {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.5;
}

.top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.2fr) minmax(320px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.mid-grid,
.bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.panel {
  border-radius: 30px;
  padding: 22px;
}

.panel-accent {
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.92), rgba(251, 247, 240, 0.9));
}

.panel-chart {
  background:
    radial-gradient(circle at top right, rgba(29, 97, 141, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(252, 251, 247, 0.92), rgba(249, 247, 242, 0.92));
}

.panel-slim {
  background:
    linear-gradient(180deg, rgba(249, 248, 243, 0.94), rgba(246, 245, 239, 0.92));
}

.panel-bots {
  padding-top: 24px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}

.collapsible-panel {
  overflow: hidden;
  align-self: start;
}

.collapsible-panel:not([open]) .collapsible-body {
  display: none;
}

.collapsible-head {
  list-style: none;
  cursor: pointer;
  margin-bottom: 0;
}

.collapsible-head::-webkit-details-marker {
  display: none;
}

.collapse-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.collapse-hint::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-weight: 700;
}

.collapsible-panel[open] .collapse-hint::before {
  content: "-";
}

.collapsible-body {
  margin-top: 16px;
}

.panel-head p {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.5;
}

.alert-list,
.sources,
.log-tail,
.status-list {
  display: grid;
  gap: 12px;
}

.alert-card,
.source-card,
.log-row,
.analysis-box,
.sub-box,
.chart-wrap,
.status-card,
.status-summary,
.metric {
  border: 1px solid var(--line);
  background: var(--panel-strong);
}

.alert-card,
.source-card,
.log-row,
.status-card,
.status-summary {
  border-radius: 18px;
  padding: 14px;
}

.alert-card.critical,
.log-row.critical,
.status-card.critical {
  background: var(--red-soft);
}

.alert-card.warning,
.log-row.warning,
.status-card.warning {
  background: var(--amber-soft);
}

.alert-card.info,
.log-row.info,
.status-card.info {
  background: rgba(29, 97, 141, 0.08);
}

.alert-card.success,
.log-row.success,
.status-card.success {
  background: var(--green-soft);
}

.alert-title,
.source-title,
.section-title,
.status-title,
.table-primary {
  font-weight: 700;
}

.alert-detail {
  margin-top: 8px;
  line-height: 1.5;
}

.status-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mini-stat {
  display: grid;
  gap: 4px;
}

.mini-stat strong {
  font-size: 22px;
}

.status-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.status-sub {
  margin-top: 6px;
  font-size: 12px;
}

.status-body {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.status-time {
  color: var(--muted);
  font-size: 13px;
}

.chart-panel {
  min-height: 240px;
}

.sparkline {
  width: 100%;
  height: 220px;
}

.sparkline {
  height: 120px;
}

.sparkline path.line {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sparkline path.fill {
  stroke: none;
  opacity: 0.12;
}

.chart-point {
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 2;
}

.chart-point.pos {
  fill: var(--green);
}

.chart-point.neg {
  fill: var(--red);
}

.chart-axis {
  stroke: rgba(23, 35, 30, 0.16);
  stroke-width: 2;
}

.chart-label,
.chart-value {
  font-size: 12px;
  font-family: inherit;
}

.chart-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.chart-interactive {
  position: relative;
}

.range-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.range-btn.active {
  background: var(--blue-soft);
  color: var(--blue);
  border-color: rgba(29, 97, 141, 0.22);
}

.chart-timeline {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.desk-bar-chart {
  position: relative;
  min-height: 240px;
  padding: 18px 6px 10px;
}

.desk-bar-chart::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: var(--zero);
  border-top: 1px solid rgba(23, 35, 30, 0.16);
}

.desk-bar-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  min-height: 210px;
}

.desk-bar-col {
  display: grid;
  grid-template-rows: 24px 1fr 24px;
  gap: 8px;
  align-items: stretch;
  justify-items: center;
}

.desk-bar-value {
  font-size: 12px;
  color: var(--ink);
}

.desk-bar-col.pos .desk-bar-value {
  color: var(--green);
}

.desk-bar-col.neg .desk-bar-value {
  color: var(--red);
}

.desk-bar-slot {
  position: relative;
  width: 100%;
  min-height: 158px;
  padding-bottom: 6px;
}

.desk-bar {
  position: absolute;
  left: 50%;
  width: min(42px, 72%);
  transform: translateX(-50%);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.desk-bar.pos {
  bottom: calc(100% - var(--zero));
  height: var(--size);
  background: linear-gradient(180deg, #3c9f71 0%, #1d7b4f 100%);
}

.desk-bar.neg {
  top: var(--zero);
  height: var(--size);
  background: linear-gradient(180deg, #d97b57 0%, #bf5438 100%);
}

.desk-bar-day {
  font-size: 12px;
  color: var(--ink);
}

.chart-tooltip {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  transform: translate(-50%, -100%);
  border: 1px solid var(--line);
  background: rgba(23, 35, 30, 0.92);
  color: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 10px 28px rgba(24, 35, 29, 0.2);
}

.timeline-tick {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.chart-wrap .chart-timeline {
  min-height: 28px;
}

.timeline-tick.pos {
  background: var(--green-soft);
  color: var(--green);
}

.timeline-tick.neg {
  background: var(--red-soft);
  color: var(--red);
}

.bot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.bot-card {
  border-radius: 30px;
  padding: 20px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.bot-btc15m {
  background:
    radial-gradient(circle at top right, rgba(29, 97, 141, 0.08), transparent 35%),
    var(--panel);
}

.bot-head,
.source-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.bot-head > *,
.source-top > *,
.metric,
.sub-box,
.source-card,
.log-row,
.status-card,
.summary-card {
  min-width: 0;
}

.bot-head-copy {
  min-width: 0;
}

.bot-head-copy h3,
.hero-copy h1 {
  overflow-wrap: anywhere;
}

.badge-row,
.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge,
.state-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge.live {
  background: var(--green-soft);
  color: var(--green);
}

.badge.warm {
  background: var(--amber-soft);
  color: var(--amber);
}

.badge.stale {
  background: var(--red-soft);
  color: var(--red);
}

.badge.unknown {
  background: rgba(23, 35, 30, 0.08);
  color: var(--muted);
}

.badge.mode {
  background: var(--blue-soft);
  color: var(--blue);
}

.chip {
  padding: 6px 10px;
  background: var(--slate);
  font-size: 13px;
}

.signal-chip.bull {
  background: var(--green-soft);
  color: var(--green);
}

.signal-chip.bear {
  background: var(--red-soft);
  color: var(--red);
}

.signal-chip.neutral {
  background: var(--slate);
  color: var(--ink);
}

.muted-chip {
  color: var(--muted);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.metric {
  border-radius: 20px;
  padding: 12px;
  overflow: hidden;
}

.metric-label {
  color: var(--muted);
}

.metric-value {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 800;
}

.metric-pnl .metric-value {
  margin-bottom: 2px;
}

.pnl-breakdown {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.pnl-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.pnl-line.total {
  padding-top: 6px;
  border-top: 1px solid rgba(23, 35, 30, 0.08);
}

.pnl-line strong {
  font-size: 13px;
}

.analysis-box,
.sub-box,
.chart-wrap {
  border-radius: 22px;
  padding: 14px;
}

.signal-entry-panel summary {
  list-style: none;
  cursor: pointer;
}

.signal-entry-panel summary::-webkit-details-marker {
  display: none;
}

.signal-entry-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.signal-entry-summary::after {
  content: "open";
  color: var(--muted);
  font-size: 12px;
  margin-left: auto;
}

.signal-entry-panel[open] .signal-entry-summary::after {
  content: "hide";
}

.signal-entry-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.signal-entry-meta {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.combined-analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 14px;
  align-items: start;
  margin-top: 12px;
}

.signal-pane,
.checklist-pane {
  min-width: 0;
}

.subsection-title {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.checklist-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin: 10px 0 12px;
}

.checklist-profile {
  font-weight: 700;
}

.checklist-summary {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

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

.entry-check {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.7);
  display: grid;
  gap: 2px;
}

.entry-check strong {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.entry-check span {
  font-size: 13px;
  font-weight: 600;
}

.entry-check em {
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
}

.entry-check.ok {
  background: var(--green-soft);
}

.entry-check.ok strong,
.entry-check.ok span {
  color: var(--green);
}

.entry-check.bad {
  background: var(--red-soft);
}

.entry-check.bad strong,
.entry-check.bad span {
  color: var(--red);
}

.chart-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.dual-box {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 12px;
}

.mini-row {
  display: grid;
  grid-template-columns: minmax(60px, auto) auto auto auto auto auto;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(23, 35, 30, 0.07);
  font-size: 14px;
}

.mini-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.event-copy {
  margin-top: 10px;
  line-height: 1.55;
}

.summary-sub,
.metric-sub,
.source-line,
.bot-market,
.event-copy,
.status-sub,
.status-body,
.log-message,
.chart-title span,
.mini-row span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.table-wrap {
  overflow-x: visible;
  overflow-y: auto;
  border-radius: 22px;
  border: 1px solid var(--line);
}

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

.profile-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  padding: 16px;
}

.profile-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.profile-card-title {
  min-width: 0;
}

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

.profile-stat {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
  border-radius: 16px;
  padding: 10px 12px;
  min-width: 0;
}

.profile-stat > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-stat strong {
  display: block;
  font-size: 18px;
  overflow-wrap: anywhere;
}

.profile-stat em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.timeline-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
  margin-bottom: 14px;
}

.filter-group {
  display: grid;
  gap: 6px;
  min-width: 160px;
}

.filter-group span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter-group select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
}

.timeline-list {
  display: grid;
  gap: 10px;
}

.timeline-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.timeline-page-label {
  color: var(--muted);
  font-size: 13px;
}

.timeline-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.4fr) minmax(76px, 0.7fr) minmax(76px, 0.7fr) minmax(82px, 0.75fr) minmax(68px, 0.55fr) minmax(68px, 0.55fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px 12px;
}

.timeline-cell {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.timeline-strategy {
  font-weight: 700;
  color: var(--ink);
}

.timeline-size,
.timeline-time {
  color: var(--muted);
}

.timeline-mode,
.timeline-result {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.timeline-mode.live {
  background: var(--green-soft);
  color: var(--green);
}

.timeline-mode.dry {
  background: var(--blue-soft);
  color: var(--blue);
}

.timeline-result.win {
  background: var(--green-soft);
  color: var(--green);
}

.timeline-result.loss {
  background: var(--red-soft);
  color: var(--red);
}

.timeline-result.neutral {
  background: var(--slate);
  color: var(--muted);
}

.timeline-result.open {
  background: var(--blue-soft);
  color: var(--blue);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.56);
  table-layout: auto;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(23, 35, 30, 0.08);
  font-size: 14px;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.data-table th {
  position: sticky;
  top: 0;
  background: var(--cream);
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
  z-index: 1;
}

#profiles-table td:nth-child(1),
#profiles-table td:nth-child(2),
#profiles-table td:nth-child(6) {
  white-space: normal;
}

#profiles-table td:nth-child(1) {
  min-width: 260px;
}

#profiles-table td:nth-child(3) {
  min-width: 180px;
}

#profiles-table td:nth-child(4),
#profiles-table td:nth-child(5) {
  min-width: 170px;
}

.profile-primary {
  margin-top: 2px;
}

#timeline-table td:nth-child(1),
#timeline-table td:nth-child(2),
#timeline-table td:nth-child(3),
#timeline-table td:nth-child(4),
#timeline-table td:nth-child(5),
#timeline-table td:nth-child(6),
#timeline-table td:nth-child(7) {
  white-space: nowrap;
}

#timeline-table td:last-child {
  white-space: normal;
  min-width: 220px;
}

.table-primary {
  margin-bottom: 2px;
}

.table-sub {
  font-size: 12px;
}

.check-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 180px;
}

.check-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.check-chip.ok {
  background: var(--green-soft);
  color: var(--green);
}

.check-chip.bad {
  background: var(--red-soft);
  color: var(--red);
}

.profile-disclosure {
  border-top: 1px solid rgba(23, 35, 30, 0.08);
  padding-top: 10px;
  margin-top: 10px;
}

.profile-disclosure:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.profile-disclosure summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.profile-disclosure summary::-webkit-details-marker {
  display: none;
}

.profile-name {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.profile-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.inline-disclosure {
  min-width: 0;
}

.inline-disclosure summary {
  cursor: pointer;
  list-style: none;
  color: var(--ink);
  font-weight: 600;
}

.inline-disclosure summary::-webkit-details-marker {
  display: none;
}

.inline-disclosure.compact summary {
  font-size: 13px;
}

.inline-disclosure summary::after {
  content: " open";
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  margin-left: 6px;
}

.inline-disclosure[open] summary::after {
  content: " hide";
}

.inline-disclosure-body {
  margin-top: 10px;
}

.runtime-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 180px;
}

.runtime-stat {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
  border-radius: 14px;
  padding: 8px 10px;
  display: grid;
  gap: 3px;
}

.runtime-stat span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.runtime-stat strong {
  font-size: 16px;
}

.state-pill {
  padding-inline: 9px;
}

.state-ready {
  background: var(--green-soft);
  color: var(--green);
}

.state-wait {
  background: var(--amber-soft);
  color: var(--amber);
}

.state-blocked {
  background: var(--red-soft);
  color: var(--red);
}

.log-row {
  display: grid;
  grid-template-columns: 92px 120px 1fr;
  gap: 12px;
  align-items: start;
}

.architecture-note {
  display: grid;
  gap: 14px;
}

.architecture-item p {
  margin-top: 6px;
  line-height: 1.6;
}

.source-line {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
}

.empty-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  text-align: center;
}

.empty-state.compact {
  min-height: 120px;
}

.empty-inline {
  display: inline-block;
  margin-top: 8px;
}

.pos {
  color: var(--green);
  font-weight: 700;
}

.neg {
  color: var(--red);
  font-weight: 700;
}

.neutral {
  color: var(--muted);
}

@media (max-width: 1460px) {
  .summary-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

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

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

  .panel-slim {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1180px) {
  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mid-grid,
  .bottom-grid,
  .top-grid,
  .bot-grid {
    grid-template-columns: 1fr;
  }

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

  .combined-analysis-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 18px, 1520px);
    padding-top: 14px;
  }

  .hero {
    flex-direction: column;
    padding: 22px 18px;
  }

  .hero-actions,
  .status-stack {
    align-items: stretch;
    width: 100%;
  }

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

  .metric-grid,
  .dual-box,
  .status-summary,
  .profile-card-grid,
  .entry-check-grid {
    grid-template-columns: 1fr;
  }

  .log-row {
    grid-template-columns: 1fr;
  }

  .bot-head,
  .source-top,
  .panel-head,
  .chart-title,
  .checklist-head,
  .profile-card-top,
  .signal-entry-summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .collapse-hint {
    white-space: normal;
  }

  .checklist-summary {
    text-align: left;
  }

  .signal-entry-meta {
    white-space: normal;
  }

  .timeline-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .timeline-pagination {
    justify-content: space-between;
  }

  .filter-group {
    min-width: 0;
  }

  .timeline-row {
    grid-template-columns: minmax(0, 1.2fr) repeat(5, auto);
    gap: 8px;
    padding: 10px;
  }

  .timeline-cell {
    font-size: 12px;
  }

  .timeline-mode,
  .timeline-result {
    padding: 4px 7px;
    font-size: 10px;
  }

  .table-wrap {
    border: 0;
    overflow: visible;
  }

  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table thead {
    display: none;
  }

  .data-table tbody {
    display: grid;
    gap: 12px;
  }

  .data-table tr {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    padding: 12px;
  }

  .data-table td {
    border-bottom: 0;
    padding: 8px 0;
    min-width: 0 !important;
    white-space: normal !important;
  }

  .data-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .profile-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .panel,
  .bot-card {
    padding: 16px;
  }

  .mini-row {
    grid-template-columns: 1fr;
  }

  .badge-row {
    justify-content: flex-start;
  }

  .desk-bar-grid {
    gap: 8px;
  }

  .desk-bar {
    width: min(28px, 82%);
  }

  .timeline-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "strategy pnl result"
      "size time mode";
    align-items: center;
  }

  .timeline-strategy {
    grid-area: strategy;
  }

  .timeline-pnl {
    grid-area: pnl;
    justify-self: end;
  }

  .timeline-result {
    grid-area: result;
    justify-self: end;
  }

  .timeline-size {
    grid-area: size;
  }

  .timeline-time {
    grid-area: time;
    justify-self: center;
  }

  .timeline-mode {
    grid-area: mode;
    justify-self: end;
  }
}
