:root {
  --bg: #f2f4f8;
  --bg-grad-a: #e8eef8;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #d5dde7;
  --danger: #b91c1c;
  --danger-deep: #7f1d1d;
  --warn: #c05621;
  --success: #047857;
  --info: #0369a1;
  --buy-window-fill: rgba(14, 165, 233, 0.18);
  --buy-window-border: rgba(14, 165, 233, 0.38);
  --buy-window-text: #075985;
  --sell-window-fill: rgba(251, 146, 60, 0.2);
  --sell-window-border: rgba(251, 146, 60, 0.4);
  --sell-window-text: #9a3412;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, #ffffff, transparent 40%),
    radial-gradient(circle at 90% 10%, #dde8f8, transparent 30%),
    linear-gradient(170deg, var(--bg-grad-a), var(--bg));
  font-family: "Segoe UI", "Noto Sans", sans-serif;
  line-height: 1.45;
}

.container {
  width: min(1120px, 100% - 2rem);
  margin: 0 auto;
}

.app-header {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
}

.app-heading-group {
  display: grid;
  gap: 0.12rem;
  padding: 0.9rem 0 0.5rem;
}

.app-title {
  margin: 0;
  font-size: 1.22rem;
}

.app-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.mode-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
  padding: 0 0 1rem;
}

.mode-pill {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  border: 2px solid #fff;
  color: #fff;
}

.mode-pill-danger {
  background: linear-gradient(135deg, var(--danger), var(--danger-deep));
}

.mode-label {
  display: block;
  font-size: 0.76rem;
  opacity: 0.9;
}

.mode-value {
  display: block;
  font-size: 1.7rem;
  line-height: 1.15;
}

.app-nav {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
}

.nav-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0;
}

.nav-spacer {
  flex: 1 1 auto;
}

.nav-inner a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.34rem 0.7rem;
  background: #fff;
}

.nav-auth-email {
  display: inline-flex;
  align-items: center;
  padding: 0.34rem 0.1rem;
  line-height: 1.2;
  max-width: min(38vw, 360px);
  overflow-wrap: anywhere;
}

.locale-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: wrap;
}

.locale-btn.is-active {
  background: var(--info);
  border-color: var(--info);
  color: #fff;
}

.nav-auth-remaining {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.82rem;
}

.nav-auth-remaining strong {
  min-width: 2ch;
  text-align: right;
}

.app-main {
  padding: 1rem 0 1.2rem;
  display: grid;
  gap: 0.9rem;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.page-links {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

.page-links a {
  color: var(--info);
  text-decoration: none;
  font-weight: 600;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.card h2,
.card h3 {
  margin-top: 0;
}

.grid-2 {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid-3 {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.cards-vertical {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 1fr;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table-wrap-tall {
  max-height: 28rem;
  overflow-y: auto;
  padding-right: 0.15rem;
  scrollbar-width: thin;
}

.table-wrap-tall table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--border);
  padding: 0.62rem 0.5rem;
  vertical-align: top;
}

th {
  font-size: 0.84rem;
  color: #334155;
}

.shadow-report-table {
  min-width: 0;
  table-layout: fixed;
}

.shadow-report-table th,
.shadow-report-table td {
  word-break: break-word;
}

.shadow-report-table .col-symbol {
  width: 180px;
}

.shadow-report-table .col-diff-count {
  width: 64px;
}

.shadow-report-table .col-shadow-result {
  width: 92px;
}

.shadow-report-table .col-latest-category {
  width: 110px;
}

.shadow-report-table .col-latest-judgment {
  width: 112px;
}

.shadow-report-table .col-latest-reason {
  width: 260px;
}

.shadow-report-table .col-score {
  width: 104px;
}

.shadow-report-table .col-shadow-entry-exit {
  width: 210px;
}

.shadow-report-table .col-pnl {
  width: 118px;
}

.shadow-report-table .col-gap {
  width: 168px;
}

.shadow-report-table .col-pnl-delta {
  width: 110px;
}

.shadow-report-total-row td {
  background: #f8fafc;
  border-top: 2px solid var(--border);
  font-size: 0.92rem;
}

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

.small {
  font-size: 0.84rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.17rem 0.52rem;
  font-size: 0.74rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.badge-success {
  background: #def7ec;
  color: #065f46;
  border-color: #a7f3d0;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

.badge-warn {
  background: #ffedd5;
  color: #9a3412;
  border-color: #fed7aa;
}

.badge-info {
  background: #dbeafe;
  color: #1e3a8a;
  border-color: #bfdbfe;
}

.badge-muted {
  background: #e2e8f0;
  color: #334155;
  border-color: #cbd5e1;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.symbols-inline-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.8rem;
}

.symbols-inline-row p {
  margin: 0;
}

.symbols-inline-details {
  margin: 0;
}

.btn {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.38rem 0.75rem;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.btn-primary {
  background: var(--info);
  border-color: var(--info);
  color: #fff;
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn-disabled-link {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.inline-form {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}

.inline-actions-wrap {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}

.stack {
  display: grid;
  gap: 0.6rem;
}

.stack p {
  margin: 0.2rem 0;
}

.auth-card {
  max-width: 640px;
  margin: 0 auto;
}

.toggle-btn {
  margin-top: 0.5rem;
}

.is-extra {
  display: none;
}

.is-extra.show {
  display: table-row;
}

.reason-box {
  max-width: 420px;
  white-space: pre-wrap;
  word-break: break-word;
}

details > summary {
  cursor: pointer;
  color: var(--info);
}

.alert-block {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: #fafcff;
}

.app-footer {
  padding-bottom: 1.4rem;
}

.auto-refresh-control {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 0.3rem 0.55rem;
}

.row-new {
  background: #ecfeff;
}

.analysis-row-skipped td {
  background: #f8fafc;
  color: #64748b;
}

.analysis-row-skipped td strong {
  color: #475569;
}

.analysis-row-skipped td:first-child {
  box-shadow: inset 3px 0 0 #94a3b8;
}

.system-status-layout {
  display: grid;
  gap: 0.85rem;
}

.system-status-card {
  background: #000;
  border-color: #233247;
  box-shadow:
    inset 0 1px 0 rgba(148, 163, 184, 0.08),
    0 10px 28px rgba(15, 23, 42, 0.18);
}

.system-status-card > h3 {
  color: #fff;
}

.system-clock-block {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 0.45rem;
  justify-items: center;
  text-align: center;
  width: min(100%, 460px);
  margin: 0 auto;
  padding: 0.95rem 1.15rem 0.9rem;
  border: 1px solid #233247;
  border-radius: 20px;
  background: #000;
  box-shadow:
    inset 0 1px 0 rgba(148, 163, 184, 0.12),
    inset 0 -18px 32px rgba(0, 0, 0, 0.35),
    0 18px 42px rgba(15, 23, 42, 0.18);
}

.system-clock-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.045) 0,
    rgba(255, 255, 255, 0.045) 1px,
    transparent 1px,
    transparent 5px
  );
  opacity: 0.38;
  pointer-events: none;
}

.system-clock-block::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  pointer-events: none;
}

.system-clock-top {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.system-clock-label {
  color: #94a3b8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.system-clock-zone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.22);
  background: rgba(251, 191, 36, 0.11);
  color: #fcd34d;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.digital-clock {
  position: relative;
  z-index: 1;
  color: #a3e635;
  line-height: 1;
  letter-spacing: 0.1em;
  text-shadow:
    0 0 10px rgba(163, 230, 53, 0.28),
    0 0 24px rgba(132, 204, 22, 0.12);
}

.digital-clock.has-graphic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.18rem, 0.6vw, 0.42rem);
  min-height: clamp(4.2rem, 10vw, 6.2rem);
  letter-spacing: 0;
  text-shadow: none;
}

.segment-digit {
  position: relative;
  width: clamp(2.35rem, 5.3vw, 3.5rem);
  height: clamp(4.25rem, 9vw, 6rem);
  border-radius: 0.78rem;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.86), rgba(15, 23, 42, 0.96));
  box-shadow:
    inset 0 0 0 1px rgba(148, 163, 184, 0.08),
    inset 0 0 16px rgba(0, 0, 0, 0.52),
    0 8px 18px rgba(2, 6, 23, 0.26);
}

.segment-digit.segment-digit-empty {
  opacity: 0.25;
}

.seg {
  position: absolute;
  opacity: 0.18;
  background: #334155;
  box-shadow: none;
}

.seg.is-on {
  opacity: 1;
  background: #a3e635;
  box-shadow:
    0 0 8px rgba(163, 230, 53, 0.45),
    0 0 18px rgba(163, 230, 53, 0.18);
}

.seg-a,
.seg-d,
.seg-g {
  left: 18%;
  width: 64%;
  height: 9%;
  clip-path: polygon(10% 0, 90% 0, 100% 50%, 90% 100%, 10% 100%, 0 50%);
}

.seg-a {
  top: 7%;
}

.seg-g {
  top: 45.5%;
}

.seg-d {
  top: 84%;
}

.seg-b,
.seg-c,
.seg-e,
.seg-f {
  width: 12%;
  height: 31%;
  clip-path: polygon(0 10%, 50% 0, 100% 10%, 100% 90%, 50% 100%, 0 90%);
}

.seg-b,
.seg-c {
  right: 8%;
}

.seg-e,
.seg-f {
  left: 8%;
}

.seg-b,
.seg-f {
  top: 13%;
}

.seg-c,
.seg-e {
  top: 55%;
}

.segment-colon {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(0.72rem, 1.8vw, 1.05rem);
  width: clamp(0.6rem, 1.5vw, 0.95rem);
  height: clamp(4.25rem, 9vw, 6rem);
}

.segment-colon span {
  width: clamp(0.34rem, 0.9vw, 0.5rem);
  height: clamp(0.34rem, 0.9vw, 0.5rem);
  border-radius: 999px;
  background: #a3e635;
  box-shadow:
    0 0 7px rgba(163, 230, 53, 0.42),
    0 0 16px rgba(163, 230, 53, 0.18);
}

.system-clock-meta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  color: #cbd5e1;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.system-clock-separator {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #475569;
}

.system-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
}

.status-mini-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
  background: #fff;
}

.status-mini-card p {
  margin: 0.2rem 0;
}

.system-status-control-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.system-status-control-row p {
  margin: 0;
}

.system-inline-form {
  margin-left: auto;
}

.system-inline-toggle {
  padding: 0.2rem 0.56rem;
  border-radius: 999px;
  border-color: #475569;
  background: transparent;
  color: #cbd5e1;
}

.system-inline-toggle:hover {
  border-color: #94a3b8;
  color: #fff;
}

.recommendation-home-card {
  display: grid;
  gap: 0.8rem;
}

.recommendation-home-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.recommendation-home-head h3,
.recommendation-home-head p {
  margin: 0;
}

.recommendation-home-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.recommendation-actions-bar {
  display: grid;
  gap: 0.75rem;
}

.recommendation-home-notice {
  margin: 0;
  color: var(--success);
}

.recommendation-home-error {
  margin: 0;
  color: var(--danger);
}

.recommendation-feedback {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f8fbff;
}

.recommendation-feedback[hidden] {
  display: none !important;
}

.recommendation-feedback-body {
  display: grid;
  gap: 0.25rem;
}

.recommendation-feedback-body p {
  margin: 0;
}

.recommendation-feedback-success {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.recommendation-feedback-error {
  background: #fef2f2;
  border-color: #fecaca;
}

.recommendation-apply-form {
  display: grid;
  grid-template-columns: minmax(170px, 240px) minmax(180px, 280px) auto auto;
  align-items: end;
  gap: 0.75rem 1rem;
}

.recommendation-apply-field {
  min-width: 0;
  display: grid;
  gap: 0.35rem;
}

.recommendation-apply-form input[type="date"],
.recommendation-apply-form input[type="text"] {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  background: #fff;
  color: var(--text);
}

.recommendation-detail-button {
  min-width: 136px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 0.95rem;
  white-space: nowrap;
}

.recommendation-apply-pending {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.24);
}

.recommendation-apply-pending[hidden] {
  display: none !important;
}

.recommendation-apply-pending-box {
  min-width: min(420px, calc(100vw - 2rem));
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.18);
}

.recommendation-apply-pending-box strong,
.recommendation-apply-pending-box p {
  display: block;
  margin: 0;
}

.recommendation-apply-pending-box p {
  margin-top: 0.35rem;
}

@media (max-width: 840px) {
  .recommendation-home-grid {
    grid-template-columns: 1fr;
  }

  .recommendation-apply-form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .recommendation-detail-button {
    width: 100%;
  }
}

@media (min-width: 841px) and (max-width: 1120px) {
  .recommendation-home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recommendation-apply-form {
    grid-template-columns: minmax(170px, 1fr) minmax(180px, 1fr) auto;
  }

  .recommendation-apply-form .recommendation-detail-button {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

.recommendation-meta-grid {
  align-items: stretch;
}

.recommendation-section-grid {
  align-items: start;
}

.card-subtle {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem;
  background: #fbfdff;
}

.card-subtle h4 {
  margin-top: 0;
}

.recommendation-selected-row td {
  background: rgba(14, 165, 233, 0.08);
}

.recommendation-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.recommendation-history-actions .muted {
  white-space: nowrap;
}

.recommendation-history-delete-form {
  margin: 0;
}

.button-small {
  min-height: 34px;
  padding: 0.35rem 0.7rem;
}

.plans-table {
  min-width: 1280px;
  table-layout: fixed;
}

.plans-table .col-plan,
.plans-table .col-date,
.plans-table .col-mode,
.plans-table .col-status,
.plans-table .col-paused,
.plans-table .col-progress,
.plans-table .col-budget,
.plans-table .col-items,
.plans-table .col-actions,
.plans-table .col-last-transition {
  white-space: nowrap;
}

.plans-table .col-plan {
  width: 520px;
  min-width: 520px;
}

.plans-table .col-date {
  width: 102px;
}

.plans-table .col-status {
  width: 82px;
}

.plans-table .col-paused {
  width: 78px;
  text-align: center;
}

.plans-table .col-progress {
  width: 72px;
  text-align: center;
}

.plans-table .col-actions {
  width: 170px;
}

.plan-id-cell {
  display: grid;
  gap: 0.4rem;
  align-items: start;
}

.plan-id-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.plan-report-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.plan-inline-note {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.btn.btn-small {
  padding: 0.3rem 0.7rem;
  font-size: 0.9rem;
}

.btn-snapshot-home {
  background: linear-gradient(180deg, #d63a4a 0%, #b91c2f 100%);
  border-color: #8f1625;
  color: #fff;
  box-shadow: 0 8px 18px rgba(185, 28, 47, 0.22);
}

.btn-snapshot-home:hover,
.btn-snapshot-home:focus-visible {
  background: linear-gradient(180deg, #e04354 0%, #c21f34 100%);
  border-color: #7f1421;
  color: #fff;
}

.plans-table .col-last-alert {
  width: 250px;
  min-width: 250px;
  white-space: normal;
}

.plans-table .col-live-summary {
  width: 334px;
  min-width: 334px;
}

.plans-table .col-inspect {
  width: 92px;
  white-space: nowrap;
  text-align: center;
}

.monitor-running-board {
  display: grid;
  gap: 0.8rem;
  content-visibility: auto;
  contain-intrinsic-size: 220px;
}

.running-board-summary-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.running-board-summary-root {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.running-board-summary-footer {
  margin: 0;
  grid-column: 1 / -1;
  padding-left: 0.15rem;
}

.summary-kpi-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  background: #fbfdff;
  min-height: 94px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  container-type: inline-size;
}

.summary-kpi-card .label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.summary-kpi-card strong {
  font-size: 1.5rem;
  line-height: 1.1;
}

.recommendation-home-grid .summary-kpi-card,
.profit-kpi-grid .summary-kpi-card {
  padding: 0.62rem 0.72rem;
  min-height: 76px;
}

.recommendation-home-grid .summary-kpi-card .label,
.profit-kpi-grid .summary-kpi-card .label {
  font-size: 0.72rem;
  margin-bottom: 0.22rem;
}

.recommendation-home-grid .summary-kpi-card strong,
.profit-kpi-grid .summary-kpi-card strong {
  font-size: 1.12rem;
  line-height: 1.12;
}

.recommendation-home-grid .summary-kpi-card .small,
.profit-kpi-grid .summary-kpi-card .small {
  font-size: 0.74rem;
}

.profit-kpi-grid .summary-kpi-card p {
  margin: 0.35rem 0 0;
}

.profit-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
}

.profit-summary-hero {
  background:
    radial-gradient(circle at top right, rgba(148, 199, 255, 0.18), transparent 34%),
    linear-gradient(180deg, #f9fcff 0%, #ffffff 100%);
}

.profit-insight-list {
  display: grid;
  gap: 0.8rem;
}

.profit-insight-list .alert-block,
.profit-home-insights p {
  margin: 0;
}

.profit-home-card {
  background:
    radial-gradient(circle at top left, rgba(177, 227, 186, 0.18), transparent 32%),
    linear-gradient(180deg, #fcfffd 0%, #ffffff 100%);
}

.profit-home-header {
  margin-bottom: 0.55rem;
  align-items: end;
}

.profit-home-header-copy {
  display: grid;
  gap: 0.12rem;
}

.profit-home-header-copy h3,
.profit-home-header-copy p {
  margin: 0;
}

.profit-home-insights {
  display: grid;
  gap: 0.3rem;
  margin-top: 0.9rem;
}

.profit-home-graph-shell {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.05rem;
}

.profit-home-graph-body {
  display: block;
}

.profit-home-criteria {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  align-items: center;
  margin-top: 0.2rem;
}

.profit-home-criteria span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  background: rgba(255, 255, 255, 0.8);
  color: #475569;
  font-size: 0.72rem;
  line-height: 1.2;
}

.profit-home-criteria .profit-home-criteria-title {
  background: #e0f2fe;
  border-color: rgba(3, 105, 161, 0.18);
  color: #075985;
  font-weight: 700;
}

.profit-period-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 0.65rem;
}

.profit-period-card {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 0.68rem 0.72rem;
  background: rgba(255, 255, 255, 0.86);
  display: grid;
  gap: 0.4rem;
}

.profit-period-positive {
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.95) 0%, rgba(255, 255, 255, 0.94) 100%);
}

.profit-period-negative {
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.95) 0%, rgba(255, 255, 255, 0.94) 100%);
}

.profit-period-flat {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, rgba(255, 255, 255, 0.94) 100%);
}

.profit-period-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.5rem;
}

.profit-period-head h4,
.profit-period-head p,
.profit-period-card p {
  margin: 0;
}

.profit-period-head h4 {
  font-size: 0.88rem;
}

.profit-period-head strong {
  font-size: 1rem;
  line-height: 1.1;
}

.profit-period-sparkline {
  height: 38px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: end;
  gap: 0.2rem;
  padding-top: 0.15rem;
}

.profit-period-spark {
  width: 100%;
  min-height: 4px;
  border-radius: 999px 999px 3px 3px;
}

.profit-home-layout {
  align-items: start;
}

.profit-home-primary,
.profit-home-side {
  display: grid;
  gap: 0.55rem;
}

.profit-home-side h4 {
  margin: 0;
}

.profit-home-day-list {
  display: grid;
  gap: 0.7rem;
}

.profit-home-day-list .alert-block p {
  margin: 0;
}

.profit-home-strip,
.profit-trend-chart {
  display: grid;
  gap: 0.55rem;
}

.profit-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  margin: 0.65rem 0 0.9rem;
}

.profit-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  color: #475569;
}

.profit-legend-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.profit-chart-legend-pnl {
  background: linear-gradient(180deg, #86efac 0%, #16a34a 100%);
}

.profit-chart-legend-pattern {
  background: #0284c7;
}

.profit-chart-legend-structure {
  background: #d97706;
}

.profit-chart-legend-guide {
  background: rgba(71, 85, 105, 0.32);
}

.profit-comparison-panel {
  display: none;
  gap: 0.75rem;
}

.profit-comparison-panel.is-active {
  display: grid;
}

.profit-panel-nav-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.34rem;
  min-width: 320px;
  max-width: 100%;
}

.profit-panel-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: start;
  margin: 0 0 0.5rem;
}

.profit-panel-title-block {
  display: grid;
  gap: 0.24rem;
  min-width: 0;
}

.profit-panel-title-block h4,
.profit-panel-title-block p {
  margin: 0;
}

.profit-comparison-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 0.8rem;
  align-items: start;
}

.profit-comparison-left {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.profit-comparison-side {
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.profit-chart-toolbar {
  display: flex;
  align-items: start;
  gap: 0.55rem;
}

.profit-chart-toolbar-copy {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.profit-chart-toolbar-copy p {
  margin: 0;
}

.profit-chart-toolbar-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
}

.profit-chart-toolbar-meta {
  font-size: 0.74rem;
  color: #64748b;
}

.profit-chart-toolbar-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.46rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.84);
  color: #334155;
  font-size: 0.72rem;
  line-height: 1.2;
  white-space: nowrap;
}

.profit-period-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.8rem;
}

.profit-period-chart-head h4,
.profit-period-chart-head p {
  margin: 0;
}

.profit-period-chart-summary {
  display: grid;
  gap: 0.14rem;
  text-align: right;
}

.profit-chart-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0;
  width: fit-content;
}

.profit-chart-nav-status {
  min-width: 0;
  text-align: right;
  white-space: nowrap;
  font-size: 0.76rem;
}

.profit-comparison-side-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  flex-wrap: wrap;
  text-align: right;
}

.profit-home-graph-note-list {
  display: grid;
  gap: 0.28rem;
}

.profit-home-graph-note-list p {
  margin: 0;
}

.profit-graph-view {
  display: none;
}

.profit-graph-view.is-active {
  display: block;
}

.profit-comparison-scroll {
  overflow: visible;
  width: 100%;
  padding: 0.15rem 0 0.25rem;
  margin: 0;
}

.profit-comparison-svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  margin: 0;
}

.profit-chart-score-band {
  stroke: none;
  opacity: 0.22;
}

.profit-chart-score-band-stop {
  fill: #dc2626;
}

.profit-chart-score-band-poor {
  fill: #f97316;
}

.profit-chart-score-band-valid {
  fill: #0ea5e9;
}

.profit-chart-score-band-good {
  fill: #14b8a6;
}

.profit-chart-score-band-strong {
  fill: #16a34a;
}

.profit-chart-score-band-label {
  fill: rgba(15, 23, 42, 0.44);
  font-size: 10px;
  font-weight: 700;
  font-family: "Segoe UI", "Noto Sans", sans-serif;
}

.profit-chart-guide-line {
  fill: none;
  stroke-width: 1.4;
}

.profit-chart-guide-boundary {
  stroke: rgba(148, 163, 184, 0.24);
}

.profit-chart-guide-zero {
  stroke: rgba(15, 23, 42, 0.36);
  stroke-dasharray: 4 4;
}

.profit-chart-guide-goal {
  stroke: rgba(2, 132, 199, 0.44);
  stroke-dasharray: 5 4;
}

.profit-chart-guide-valid {
  stroke: rgba(217, 119, 6, 0.42);
  stroke-dasharray: 3 5;
}

.profit-chart-guide-label,
.profit-chart-axis-label,
.profit-chart-x-label {
  fill: #64748b;
  font-size: 11px;
  font-family: "Segoe UI", "Noto Sans", sans-serif;
}

.profit-chart-guide-label {
  font-size: 10px;
}

.profit-chart-axis-label-right {
  text-anchor: start;
}

.profit-chart-bar {
  stroke: rgba(255, 255, 255, 0.6);
  stroke-width: 0.8;
  opacity: 0.96;
}

.profit-chart-bar-overflow {
  opacity: 0.38;
}

.profit-chart-bar-positive {
  fill: #22c55e;
}

.profit-chart-bar-negative {
  fill: #ef4444;
}

.profit-chart-bar-flat {
  fill: #cbd5e1;
}

.profit-chart-line {
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
  stroke-dasharray: 5 5;
}

.profit-chart-line-pattern {
  stroke: #0284c7;
}

.profit-chart-line-structure {
  stroke: #d97706;
}

.profit-chart-point {
  stroke: #fff;
  stroke-width: 1.4;
  opacity: 0.86;
}

.profit-chart-point-pattern {
  fill: #0284c7;
}

.profit-chart-point-structure {
  fill: #d97706;
}

.profit-chart-bar-label {
  fill: #0f172a;
  font-size: 10px;
  font-weight: 700;
  font-family: "Segoe UI", "Noto Sans", sans-serif;
  dominant-baseline: middle;
}

.profit-home-strip-row,
.profit-trend-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 110px;
  gap: 0.65rem;
  align-items: center;
}

.profit-home-card .profit-kpi-grid {
  gap: 0.5rem;
}

.profit-home-card .profit-period-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.profit-home-card .profit-period-card {
  padding: 0.56rem 0.62rem;
  gap: 0.24rem;
}

.profit-home-card .profit-period-card p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profit-home-card .profit-chart-legend {
  margin: 0;
  gap: 0.28rem;
}

.profit-home-card .profit-chart-legend span {
  font-size: 0.72rem;
}

.profit-home-card .profit-chart-legend,
.profit-home-card .profit-home-graph-note-list {
  padding: 0.55rem 0.62rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
}

.profit-comparison-side .profit-chart-legend {
  margin-top: 0.45rem;
}

.profit-home-card .profit-chart-nav .btn {
  width: 100%;
}

.profit-home-card .profit-comparison-panel {
  gap: 0.35rem;
}

@media (max-width: 900px) {
  .profit-home-card .profit-period-grid {
    grid-template-columns: 1fr;
  }

  .profit-comparison-main {
    grid-template-columns: 1fr;
  }

  .profit-panel-nav-block {
    align-items: flex-start;
    width: 100%;
    min-width: 0;
  }

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

  .profit-comparison-side {
    padding-top: 0;
  }

  .profit-chart-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .profit-comparison-side-summary {
    justify-content: flex-start;
    text-align: left;
  }
}

.profit-home-strip-row {
  grid-template-columns: 52px minmax(0, 1fr);
}

.profit-trend-date,
.profit-trend-value {
  font-size: 0.9rem;
}

.profit-trend-bar-shell,
.profit-home-strip-bar-shell {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
}

.profit-home-strip-bar-shell {
  height: 8px;
}

.profit-trend-bar,
.profit-home-strip-bar {
  height: 100%;
  border-radius: 999px;
}

.profit-trend-bar-positive {
  background: linear-gradient(90deg, #4ade80 0%, #16a34a 100%);
}

.profit-trend-bar-negative {
  background: linear-gradient(90deg, #fca5a5 0%, #dc2626 100%);
}

.profit-trend-bar-flat {
  background: linear-gradient(90deg, #cbd5e1 0%, #94a3b8 100%);
}

.profit-leader-grid {
  align-items: start;
}

.plan-live-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.34rem;
  max-width: 330px;
}

.live-summary-pill {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.34rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  width: 100%;
  min-height: 32px;
  padding: 0.24rem 0.5rem;
  font-size: 0.74rem;
  line-height: 1.2;
}

.live-summary-pill strong {
  font-size: 0.84rem;
  min-width: 1.6ch;
  text-align: center;
}

.live-summary-pill span {
  min-width: 0;
  font-size: 0.71rem;
  line-height: 1.15;
}

.live-summary-pill.tone-buy {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.28);
  color: #075985;
}

.live-summary-pill.tone-sell {
  background: rgba(251, 146, 60, 0.14);
  border-color: rgba(251, 146, 60, 0.28);
  color: #9a3412;
}

.live-summary-pill.tone-warn {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.live-summary-pill.tone-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.monitor-running-board .table-wrap {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 0;
}

.monitor-running-board .plans-table {
  min-width: 0;
  table-layout: fixed;
}

.monitor-running-board .plans-table th,
.monitor-running-board .plans-table td {
  padding: 0.58rem 0.4rem;
}

.monitor-running-board .plans-table .col-plan,
.monitor-running-board .plans-table .col-date,
.monitor-running-board .plans-table .col-status,
.monitor-running-board .plans-table .col-paused,
.monitor-running-board .plans-table .col-progress,
.monitor-running-board .plans-table .col-live-summary,
.monitor-running-board .plans-table .col-last-transition,
.monitor-running-board .plans-table .col-last-alert,
.monitor-running-board .plans-table .col-inspect {
  min-width: 0;
}

.monitor-running-board .plans-table .col-plan {
  width: 172px;
}

.monitor-running-board .plans-table .col-date {
  width: 92px;
}

.monitor-running-board .plans-table .col-status {
  width: 86px;
}

.monitor-running-board .plans-table .col-paused {
  width: 72px;
}

.monitor-running-board .plans-table .col-progress {
  width: 64px;
}

.monitor-running-board .plans-table .col-live-summary {
  width: 282px;
}

.monitor-running-board .plans-table .col-last-transition {
  width: 102px;
  white-space: normal;
}

.monitor-running-board .plans-table .col-last-alert {
  width: 122px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.monitor-running-board .plans-table .col-inspect {
  width: 78px;
}

.monitor-running-board .plans-table thead .col-last-transition,
.monitor-running-board .plans-table thead .col-last-alert,
.monitor-running-board .plans-table thead .col-live-summary,
.monitor-running-board .plans-table thead .col-inspect {
  white-space: normal;
  line-height: 1.2;
}

.monitor-running-board .plans-table thead th {
  background: #f8fbff;
}

.monitor-running-board .plans-table tbody td {
  vertical-align: middle;
}

.monitor-running-board .plans-table tbody td.col-last-alert:empty {
  border-bottom-color: transparent;
}

.admin-settings-notice {
  margin-bottom: 1rem;
}

.admin-settings-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-settings-topbar > div:first-child {
  flex: 1 1 320px;
  min-width: 0;
}

.admin-settings-topbar-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  width: min(100%, 680px);
}

.admin-settings-owner-card {
  min-width: 0;
}

.admin-settings-owner-card strong {
  overflow-wrap: anywhere;
}

.admin-settings-owner-meta {
  display: grid;
  gap: 0.16rem;
}

.admin-settings-owner-meta span {
  overflow-wrap: anywhere;
}

.admin-settings-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.admin-settings-section {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.admin-settings-section-head h4 {
  margin-bottom: 0.25rem;
}

.admin-settings-table {
  width: 100%;
}

.admin-settings-table th {
  width: 42%;
  vertical-align: top;
}

.admin-settings-table td {
  vertical-align: middle;
}

.admin-settings-table input[type="text"],
.admin-settings-table input[type="number"],
.admin-settings-table select,
.admin-settings-table textarea {
  width: 100%;
}

.admin-settings-table textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.admin-settings-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
}

.admin-settings-meta {
  margin-top: 0.35rem;
}

.admin-settings-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.admin-restart-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
}

.admin-restart-dialog {
  width: min(680px, 100%);
  display: grid;
  gap: 0.9rem;
  padding: 1.15rem 1.2rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
}

.admin-restart-dialog h3,
.admin-restart-dialog p {
  margin: 0;
}

.admin-restart-status-list {
  display: grid;
  gap: 0.32rem;
}

.admin-restart-status-list p {
  overflow-wrap: anywhere;
}

.admin-restart-live-box {
  display: grid;
  gap: 0.3rem;
}

@media (max-width: 900px) {
  .admin-settings-topbar,
  .admin-settings-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-settings-topbar-cards {
    grid-template-columns: 1fr;
  }

  .admin-settings-owner-card {
    min-width: 0;
  }
}

.monitor-running-board .reason-box {
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.monitor-running-board .plan-live-summary {
  max-width: 100%;
  gap: 0.28rem;
}

.monitor-running-board .live-summary-pill {
  min-height: 30px;
  padding: 0.2rem 0.42rem;
  gap: 0.28rem;
  font-size: 0.72rem;
}

.monitor-running-board .live-summary-pill strong {
  min-width: 1.4ch;
  font-size: 0.8rem;
}

.monitor-running-board .live-summary-pill span {
  font-size: 0.68rem;
}

.monitor-running-board .plans-table .col-inspect .btn {
  min-width: 64px;
  padding-inline: 0.42rem;
  justify-content: center;
}

.progress-track {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #e2e8f0;
  overflow: hidden;
}

.progress-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #0ea5e9);
}

.monitor-board-section {
  content-visibility: auto;
  contain-intrinsic-size: 860px;
}

.symbol-monitor-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(520px, 1fr));
  overflow-anchor: none;
}

.runtime-view-switcher-card {
  margin-top: 0.75rem;
}

.runtime-view-switcher-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.runtime-view-switcher-head h2 {
  margin-bottom: 0.2rem;
}

.runtime-view-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.runtime-view-switcher .btn.is-active,
.home-snapshot-view-tab.is-active {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}

.runtime-plan-view-panel {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.runtime-plan-view-panel[hidden] {
  display: none !important;
}

.report-view-switcher-card {
  margin-top: 0.75rem;
}

.report-view-switcher-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.report-view-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.report-view-tab.is-active {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}

.report-view-panel {
  display: grid;
  gap: 1rem;
}

.report-view-panel[hidden] {
  display: none !important;
}

.report-view-panel-shadow .report-metric,
.report-view-panel-shadow .card {
  background: linear-gradient(180deg, #f4f6f8, #eef2f5);
}

.shadow-view-theme {
  background: linear-gradient(180deg, #f4f6f8, #eef2f5);
  border-color: rgba(100, 116, 139, 0.25);
}

.shadow-view-theme .symbol-monitor-card {
  background: #f7f8fa;
}

.runtime-summary-cards {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.runtime-summary-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 0.75rem 0.8rem;
}

.runtime-summary-card .label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 0.18rem;
}

.runtime-summary-card strong {
  font-size: 1.02rem;
}

.compare-symbol-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fcfdff;
  padding: 0.7rem 0.78rem;
  display: grid;
  gap: 0.55rem;
}

.compare-symbol-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
}

.compare-symbol-card-grid {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.compare-symbol-card-note {
  border-top: 1px dashed var(--border);
  padding-top: 0.5rem;
}

.compare-symbol-card-shell {
  border: 0;
  background: transparent;
  padding: 0;
  content-visibility: auto;
  contain-intrinsic-size: 240px;
}

.compare-symbol-card-note .label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 0.12rem;
}

#plan-detail-root,
#plan-detail-root * {
  overflow-anchor: none;
}

.symbol-monitor-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.65rem 0.72rem;
  background: #fbfdff;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  container-type: inline-size;
  content-visibility: auto;
  contain-intrinsic-size: 420px;
}

.symbol-monitor-card p {
  margin: 0.18rem 0;
}

.cost-breakdown-details {
  width: 100%;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 0.42rem 0.5rem;
}

.cost-breakdown-details > summary {
  list-style: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  color: inherit;
}

.cost-breakdown-details > summary::-webkit-details-marker {
  display: none;
}

.cost-breakdown-details > summary .label {
  color: var(--muted);
  font-size: 0.9rem;
}

.cost-breakdown-details > summary .value {
  font-weight: 700;
  color: var(--text);
}

.cost-breakdown-grid {
  margin-top: 0.55rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.4rem;
}

.symbol-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.symbol-card-head .left {
  min-width: 0;
}

.symbol-card-head .left strong {
  font-size: 1rem;
}

.symbol-card-head .left .muted {
  margin-left: 0.2rem;
}

.symbol-card-head .right {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.window-phase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin: 0.32rem 0 0.42rem;
}

.window-phase-chip {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.3rem 0.45rem;
  background: #fff;
}

.window-phase-chip.buy-window-chip {
  background: var(--buy-window-fill);
  border-color: var(--buy-window-border);
  color: var(--buy-window-text);
}

.window-phase-chip.sell-window-chip {
  background: var(--sell-window-fill);
  border-color: var(--sell-window-border);
  color: var(--sell-window-text);
}

.window-phase-line {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.38rem;
  flex-wrap: wrap;
}

.window-phase-status {
  font-weight: 700;
}

.buy-window-chip .window-phase-status,
.buy-window-chip strong {
  color: var(--buy-window-text);
}

.sell-window-chip .window-phase-status,
.sell-window-chip strong {
  color: var(--sell-window-text);
}

.window-phase-time {
  color: var(--muted);
  font-size: 0.86rem;
}

.window-phase-chip.in {
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.window-phase-chip.before {
  opacity: 0.94;
}

.window-phase-chip.expired {
  opacity: 0.82;
}

.window-phase-chip.missing {
  border-color: #e2e8f0;
  background: #f8fafc;
  opacity: 1;
}

.symbol-lane {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.35rem 0.35rem 0.25rem;
  background: #fff;
}

.symbol-lane svg {
  width: 100%;
  height: 76px;
  display: block;
}

.symbol-lane.is-actionable {
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.symbol-lane.is-actionable:hover,
.symbol-lane.is-actionable:focus-visible {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.22);
  transform: translateY(-1px);
}

.symbol-chart-summary {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.12rem;
}

.symbol-chart-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.symbol-chart-summary-head .label {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.chart-open-btn {
  white-space: nowrap;
}

.lane-base {
  fill: #eef2f7;
  stroke: #cbd5e1;
  stroke-width: 0.7;
}

.lane-buy-window {
  fill: var(--buy-window-fill);
}

.lane-sell-window {
  fill: var(--sell-window-fill);
}

.marker-order {
  stroke: #0369a1;
  stroke-width: 1.4;
}

.marker-order.marker-shadow {
  stroke: #7c3aed;
}

.marker-fill {
  stroke: #047857;
  stroke-width: 1.4;
}

.marker-fill.marker-shadow {
  stroke: #c026d3;
}

.marker-cancel {
  stroke: #b45309;
  stroke-width: 1.4;
}

.marker-force-close {
  stroke: #991b1b;
  stroke-width: 1.4;
}

.marker-now {
  stroke: #0f172a;
  stroke-width: 1.2;
  stroke-dasharray: 1.4 1.4;
}

.marker-now-text {
  font-size: 0.46rem;
  fill: #475569;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.lane-time {
  font-size: 0.5rem;
  fill: #94a3b8;
  font-weight: 500;
}

.lane-time-mid {
  font-size: 0.56rem;
  fill: #64748b;
}

.symbol-chart-panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.12rem 0.18rem 0.26rem;
  background: #fff;
}

.symbol-chart-panel-inner {
  display: grid;
  gap: 0.3rem;
}

.symbol-chart-controls {
  display: grid;
  gap: 0.3rem;
  padding: 0.24rem 0.08rem 0.02rem;
}

.symbol-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.chart-head-actions {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.4rem;
}

.chart-data-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  flex: 0 0 auto;
}

.chart-data-btn {
  border: 1px solid #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 0.18rem 0.58rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.chart-data-btn:disabled {
  cursor: wait;
  opacity: 0.7;
}

.chart-mode-meta {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 600;
}

.chart-mode-switch {
  display: inline-flex;
  gap: 0.28rem;
  flex-wrap: nowrap;
  justify-content: flex-end;
  justify-self: end;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 0.05rem;
  scrollbar-width: thin;
}

.chart-mode-btn {
  border: 1px solid var(--border);
  background: #f8fafc;
  color: #334155;
  border-radius: 999px;
  padding: 0.18rem 0.52rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.chart-mode-btn.is-active {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.price-chart-shell {
  display: grid;
  gap: 0.24rem;
  position: relative;
}

.price-chart-shell svg {
  width: 100%;
  height: auto;
  aspect-ratio: 700 / 230;
  display: block;
}

.chart-empty {
  min-height: 90px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #f8fafc;
}

.chart-loading {
  color: #334155;
  font-weight: 700;
}

.chart-error {
  color: var(--danger);
  font-weight: 700;
}

.chart-base {
  fill: #eef2f7;
  stroke: #cbd5e1;
  stroke-width: 0.6;
}

.chart-price-line {
  fill: none;
  stroke: #0f4c81;
  stroke-width: 0.48;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart-hover-surface {
  fill: transparent;
  pointer-events: all;
}

.chart-buy-window {
  fill: var(--buy-window-fill);
}

.chart-sell-window {
  fill: var(--sell-window-fill);
}

.chart-ref-low {
  stroke: #0369a1;
  stroke-width: 0.65;
  stroke-dasharray: 1.3 1.3;
}

.chart-ref-high {
  stroke: #c05621;
  stroke-width: 0.65;
  stroke-dasharray: 1.3 1.3;
}

.chart-ref-buy {
  stroke: #047857;
  stroke-width: 0.65;
  stroke-dasharray: 2 1.5;
}

.chart-ref-sell {
  stroke: #7c3aed;
  stroke-width: 0.65;
  stroke-dasharray: 2 1.5;
}

.chart-ref-label {
  font-size: 0.5rem;
  fill: #64748b;
  font-weight: 600;
}

.chart-marker-order {
  fill: #fff;
  stroke: #0369a1;
  stroke-width: 1.55;
}

.chart-marker-order.chart-marker-shadow {
  fill: #faf5ff;
  stroke: #7c3aed;
}

.chart-marker-order.chart-marker-variant-baseline {
  fill: #eff6ff;
  stroke: #2563eb;
}

.chart-marker-order.chart-marker-variant-candidate {
  fill: #fdf2f8;
  stroke: #db2777;
}

.chart-marker-fill {
  fill: #047857;
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 0.9;
}

.chart-marker-fill.chart-marker-shadow {
  fill: #c026d3;
  stroke: rgba(255, 255, 255, 0.95);
}

.chart-marker-fill.chart-marker-variant-baseline {
  fill: #4f46e5;
}

.chart-marker-fill.chart-marker-variant-candidate {
  fill: #ea580c;
}

.chart-marker-cancel {
  fill: none;
  stroke: #b45309;
  stroke-width: 1.45;
  stroke-linecap: round;
}

.chart-marker-cancel.chart-marker-shadow {
  stroke: #7c3aed;
}

.chart-marker-cancel.chart-marker-variant-baseline {
  stroke: #4f46e5;
}

.chart-marker-cancel.chart-marker-variant-candidate {
  stroke: #db2777;
}

.chart-marker-force-close {
  fill: #991b1b;
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 0.9;
}

.chart-marker-force-close.chart-marker-shadow {
  fill: #7c3aed;
}

.chart-marker-force-close.chart-marker-variant-baseline {
  fill: #4f46e5;
}

.chart-marker-force-close.chart-marker-variant-candidate {
  fill: #db2777;
}

.chart-now-line {
  stroke: #0f172a;
  stroke-width: 0.6;
  stroke-dasharray: 1.2 1.2;
}

.chart-now-label {
  font-size: 0.52rem;
  fill: #475569;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.chart-hover-guide {
  stroke: #1e293b;
  stroke-width: 0.7;
  stroke-dasharray: 2 2;
  opacity: 0;
  pointer-events: none;
}

.chart-hover-guide.is-visible {
  opacity: 0.9;
}

.chart-mid-line {
  stroke: #cbd5e1;
  stroke-width: 0.32;
  stroke-dasharray: 1 1.8;
}

.chart-y-grid-line {
  stroke: #d7e0ea;
  stroke-width: 0.26;
}

.chart-y-axis-label {
  font-size: 0.5rem;
  fill: #64748b;
  font-weight: 600;
}

.chart-hover-tooltip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 10px));
  padding: 0.18rem 0.42rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
  max-width: 260px;
  white-space: normal;
  opacity: 0;
  transition: opacity 120ms ease;
}

.chart-hover-tooltip.is-visible {
  opacity: 1;
}

.chart-hover-tooltip.is-below {
  transform: translate(-50%, 10px);
}

.chart-hover-tooltip.is-detailed {
  text-align: left;
}

.chart-hover-tooltip-title {
  display: block;
  margin-bottom: 0.16rem;
  font-weight: 800;
}

.chart-hover-tooltip-title.is-actual {
  color: #0f172a;
}

.chart-hover-tooltip-title.is-shadow {
  color: #7c3aed;
}

.chart-hover-tooltip-title.is-baseline {
  color: #60a5fa;
}

.chart-hover-tooltip-title.is-candidate {
  color: #f472b6;
}

.chart-hover-tooltip-line {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  opacity: 0.96;
}

.chart-hover-tooltip-marker-block {
  display: block;
}

.chart-hover-tooltip-marker-block.is-shadow {
  border-left: 2px solid rgba(124, 58, 237, 0.45);
  padding-left: 0.38rem;
}

.chart-hover-tooltip-marker-block.is-baseline {
  border-left: 2px solid rgba(37, 99, 235, 0.45);
  padding-left: 0.38rem;
}

.chart-hover-tooltip-marker-block.is-candidate {
  border-left: 2px solid rgba(219, 39, 119, 0.45);
  padding-left: 0.38rem;
}

.chart-hover-tooltip-divider {
  margin: 0.22rem 0 0.3rem;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
}

.chart-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  font-size: 0.86rem;
  color: var(--muted);
  align-items: center;
  margin-bottom: 0.36rem;
}

.price-chart-shell .lane-time {
  font-size: 0.5rem;
  fill: #94a3b8;
  font-weight: 500;
}

.price-chart-shell .lane-time-mid {
  font-size: 0.56rem;
  fill: #64748b;
}

.symbol-monitor-summary {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.execution-v1-panel {
  display: grid;
  gap: 0.42rem;
  margin-top: 0.48rem;
  padding: 0.52rem 0.56rem;
  border: 1px solid #dbe7f3;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.execution-v1-head {
  display: flex;
  align-items: center;
  gap: 0.34rem;
  flex-wrap: wrap;
}

.execution-v1-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.38rem;
}

.execution-v1-reason {
  grid-column: 1 / -1;
}

.execution-v1-raw {
  border-top: 1px dashed #d7e3ef;
  padding-top: 0.38rem;
}

.execution-v1-raw > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.execution-v1-raw-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.4rem;
}

.execution-v1-raw pre {
  margin: 0.4rem 0 0;
  max-height: 180px;
  overflow: auto;
  padding: 0.55rem;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.72rem;
  line-height: 1.4;
}

.execution-shadow-panel {
  display: grid;
  gap: 0.4rem;
  padding: 0.48rem 0.52rem;
  border: 1px dashed #cbd5e1;
  border-radius: 9px;
  background: #f8fafc;
}

.execution-shadow-head {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  flex-wrap: wrap;
}

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

.symbol-chart-overlay-summary {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-bottom: 0.55rem;
}

.symbol-chart-insights {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin-top: 0.55rem;
}

.symbol-chart-insight {
  min-height: 74px;
}

.symbol-chart-insight .value.metric-good {
  color: var(--success);
}

.symbol-chart-insight .value.metric-bad {
  color: var(--danger);
}

.symbol-chart-insight .value.metric-neutral {
  color: #0f172a;
}

.symbol-chart-overlay-flags {
  margin-top: 0.55rem;
}

.symbol-chart-evidence {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.symbol-chart-evidence-head h4 {
  margin: 0;
  font-size: 0.95rem;
}

.symbol-chart-evidence-note {
  margin: 0.24rem 0 0;
  color: #475569;
  font-size: 0.78rem;
  line-height: 1.45;
}

.symbol-chart-evidence-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.symbol-chart-evidence-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 0.65rem 0.75rem;
  display: grid;
  gap: 0.45rem;
}

.symbol-chart-evidence-card .label {
  color: var(--muted);
  font-size: 0.78rem;
}

.symbol-chart-evidence-card strong {
  font-size: 1rem;
  color: #0f172a;
}

.symbol-chart-evidence-list {
  display: grid;
  gap: 0.28rem;
}

.symbol-chart-evidence-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: #0f172a;
}

.symbol-chart-evidence-meta {
  color: #64748b;
  font-size: 0.75rem;
}

.symbol-chart-evidence-empty {
  color: #94a3b8;
  font-size: 0.78rem;
}

.symbol-chart-evidence-levels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.symbol-chart-evidence-level {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.08);
  color: #075985;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.18rem 0.46rem;
}

.symbol-chart-evidence-level em {
  font-style: normal;
  font-weight: 600;
  color: #0f766e;
}

.home-plan-snapshot-dialog {
  width: min(1840px, calc(100vw - 0.25rem));
  max-width: 1840px;
  max-height: calc(100vh - 0.5rem);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.home-plan-snapshot-dialog::backdrop {
  background: rgba(15, 23, 42, 0.4);
}

.home-plan-snapshot-dialog-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.55rem;
  padding: 0.72rem;
  background: #f8fbff;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.18);
  height: min(940px, calc(100vh - 0.5rem));
  max-height: calc(100vh - 0.5rem);
  overflow: hidden;
}

.home-plan-snapshot-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.home-plan-snapshot-dialog-title-row {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
}

.home-plan-snapshot-dialog-head h3 {
  margin: 0;
  font-size: 1.1rem;
  flex: 0 0 auto;
}

.home-plan-snapshot-dialog-head p {
  margin: 0;
  flex: 1 1 22rem;
}

.home-plan-snapshot-dialog-actions {
  display: inline-flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.home-plan-snapshot-dialog-body {
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
  height: auto;
  max-height: none;
}

.home-snapshot-view-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin: 0 0 0.65rem;
}

.home-snapshot-view-tab {
  min-width: 82px;
}

.home-snapshot-view-panel[hidden] {
  display: none !important;
}

.home-snapshot-view-panel {
  display: grid;
  gap: 0.65rem;
  min-height: 100%;
  align-content: start;
}

.home-snapshot-panel-shadow {
  padding: 0.2rem;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.55), rgba(241, 245, 249, 0.3));
}

.home-snapshot-meta {
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 0.45rem;
}

.home-snapshot-kpis {
  display: grid;
  gap: 0.42rem;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-bottom: 0.55rem;
}

button.home-snapshot-detail-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
  appearance: none;
  font: inherit;
  color: inherit;
  background: #fff;
}

.home-snapshot-detail-card.is-active {
  border-color: #dc2626;
  box-shadow:
    inset 0 0 0 1px rgba(220, 38, 38, 0.08),
    0 10px 22px rgba(220, 38, 38, 0.08);
}

.home-snapshot-detail-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  margin-bottom: 0.7rem;
}

.home-snapshot-detail-panel-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
}

.home-snapshot-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.85rem 1rem 0.75rem;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.96));
}

.home-snapshot-detail-title {
  margin: 0;
  font-size: 1rem;
}

.home-snapshot-detail-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  text-align: center;
  white-space: nowrap;
}

.home-snapshot-detail-hint {
  margin: 0.2rem 0 0;
}

.home-snapshot-detail-body {
  padding: 0 1rem 1rem;
}

.home-snapshot-detail-empty {
  margin: 0;
  display: inline;
}

.home-snapshot-detail-list {
  display: grid;
  gap: 0.55rem;
}

.home-snapshot-detail-row {
  display: grid;
  gap: 0.45rem;
  border-top: 1px solid var(--border);
  padding-top: 0.7rem;
}

.home-snapshot-detail-row:first-child {
  border-top: 0;
  padding-top: 0.1rem;
}

.home-snapshot-detail-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.home-snapshot-detail-row-title {
  min-width: 0;
}

.home-snapshot-detail-row-badges {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.home-snapshot-detail-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.home-snapshot-detail-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f8fafc;
  font-size: 0.78rem;
  line-height: 1.2;
}

.home-snapshot-detail-chip .label {
  color: var(--muted);
}

.home-snapshot-detail-chip .value {
  color: var(--text);
  font-weight: 600;
}

.trade-action-feed-stack {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

#runtime-trade-actions-card {
  margin: 0.5rem 0 0.65rem;
}

button.trade-action-summary-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
  appearance: none;
  font: inherit;
  color: inherit;
  background: #fff;
}

.trade-action-summary-card {
  display: grid;
  gap: 0.2rem;
  align-content: start;
  min-height: 128px;
}

.trade-action-feed-stack > .trade-action-summary-card {
  max-width: 280px;
}

.trade-action-overview-card {
  max-width: none;
  min-height: 92px;
}

.trade-action-overview-card .trade-action-summary-line {
  font-size: 0.72rem;
}

.trade-action-summary-card .label {
  display: block;
  text-align: left;
}

.trade-action-summary-count {
  font-size: 0.78rem;
  color: var(--muted);
}

.trade-action-summary-list {
  display: grid;
  gap: 0.14rem;
  margin-top: 0.15rem;
}

.trade-action-summary-line {
  font-size: 0.76rem;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trade-action-summary-empty {
  color: var(--muted);
}

.trade-action-summary-card.is-fresh {
  animation: trade-action-flash 1.7s ease-out;
}

@keyframes trade-action-flash {
  0% {
    background: #fee2e2;
    border-color: #ef4444;
    color: #7f1d1d;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.3);
  }
  100% {
    background: #fff;
    border-color: var(--border);
    color: var(--text);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  }
}

.trade-action-detail-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.trade-action-detail-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.8rem 0.95rem;
  font-weight: 600;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.96));
}

.trade-action-detail-title {
  font-weight: 700;
  color: #0f172a;
}

.trade-action-detail-hint {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 500;
}

.trade-action-detail-summary::-webkit-details-marker {
  display: none;
}

.trade-action-detail-summary::after {
  content: "▾";
  color: #475569;
  transition: transform 0.18s ease;
}

.trade-action-detail-panel[open] .trade-action-detail-summary::after {
  transform: rotate(180deg);
}

.trade-action-detail-panel[open] .trade-action-feed-body {
  border-top: 1px solid var(--border);
}

.trade-action-feed-body {
  padding: 0 1rem 1rem;
}

.home-snapshot-symbol-grid {
  display: grid;
  gap: 0.42rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.home-snapshot-symbol-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 0.46rem;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: 0.05rem;
}

.home-snapshot-symbol-card.snapshot-result-profit {
  background:
    linear-gradient(180deg, rgba(255, 244, 244, 0.92) 0%, rgba(255, 255, 255, 0.98) 88px),
    #fffdfd;
  border-color: rgba(214, 91, 91, 0.26);
}

.home-snapshot-symbol-card.snapshot-result-loss {
  background:
    linear-gradient(180deg, rgba(242, 248, 255, 0.94) 0%, rgba(255, 255, 255, 0.98) 88px),
    #fcfdff;
  border-color: rgba(67, 128, 210, 0.24);
}

.runtime-activity-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 2px solid var(--runtime-activity-border, rgba(164, 178, 194, 0.7));
  box-shadow:
    inset 4px 0 0 0 var(--runtime-activity-edge, rgba(164, 178, 194, 0.75)),
    0 0 0 0 var(--runtime-activity-glow, rgba(164, 178, 194, 0));
  opacity: 0.95;
  pointer-events: none;
}

.runtime-activity-card > * {
  position: relative;
  z-index: 1;
}

.runtime-activity-card {
  background:
    linear-gradient(
      180deg,
      var(--runtime-activity-soft, rgba(255, 255, 255, 0.96)) 0%,
      rgba(255, 255, 255, 0) 92px
    ),
    var(--runtime-activity-surface, #fff);
}

.runtime-activity-card.is-animated::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    110deg,
    transparent 0%,
    rgba(255, 255, 255, 0.42) 48%,
    transparent 100%
  );
  transform: translateX(-135%);
  animation: runtime-card-sweep 2.2s linear infinite;
  pointer-events: none;
  z-index: 0;
}

.runtime-activity-card.is-animated::after {
  animation: runtime-card-pulse 1.9s ease-in-out infinite;
}

.runtime-activity-preopen {
  --runtime-activity-border: rgba(90, 129, 255, 0.88);
  --runtime-activity-edge: rgba(90, 129, 255, 0.94);
  --runtime-activity-glow: rgba(90, 129, 255, 0.24);
  --runtime-activity-soft: rgba(231, 237, 255, 0.88);
}

.runtime-activity-buy {
  --runtime-activity-border: rgba(20, 142, 214, 0.9);
  --runtime-activity-edge: rgba(20, 142, 214, 0.96);
  --runtime-activity-glow: rgba(20, 142, 214, 0.22);
  --runtime-activity-soft: rgba(230, 245, 255, 0.9);
}

.runtime-activity-sell {
  --runtime-activity-border: rgba(219, 120, 43, 0.92);
  --runtime-activity-edge: rgba(219, 120, 43, 0.97);
  --runtime-activity-glow: rgba(219, 120, 43, 0.22);
  --runtime-activity-soft: rgba(255, 241, 230, 0.92);
}

.runtime-activity-holding {
  --runtime-activity-border: rgba(46, 156, 122, 0.9);
  --runtime-activity-edge: rgba(46, 156, 122, 0.95);
  --runtime-activity-glow: rgba(46, 156, 122, 0.22);
  --runtime-activity-soft: rgba(231, 250, 243, 0.92);
}

.runtime-activity-tracking {
  --runtime-activity-border: rgba(90, 113, 145, 0.82);
  --runtime-activity-edge: rgba(90, 113, 145, 0.88);
  --runtime-activity-glow: rgba(90, 113, 145, 0.18);
  --runtime-activity-soft: rgba(238, 243, 248, 0.9);
}

.runtime-activity-stale {
  --runtime-activity-border: rgba(212, 62, 62, 0.95);
  --runtime-activity-edge: rgba(212, 62, 62, 0.98);
  --runtime-activity-glow: rgba(212, 62, 62, 0.28);
  --runtime-activity-soft: rgba(255, 234, 234, 0.92);
}

.runtime-activity-closed {
  --runtime-activity-border: rgba(186, 196, 209, 0.78);
  --runtime-activity-edge: rgba(186, 196, 209, 0.84);
  --runtime-activity-glow: rgba(186, 196, 209, 0);
  --runtime-activity-soft: rgba(245, 247, 250, 0.92);
}

.runtime-activity-paused {
  --runtime-activity-border: rgba(121, 92, 182, 0.86);
  --runtime-activity-edge: rgba(121, 92, 182, 0.92);
  --runtime-activity-glow: rgba(121, 92, 182, 0.2);
  --runtime-activity-soft: rgba(242, 236, 255, 0.92);
}

.runtime-activity-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid var(--runtime-activity-pill-border, rgba(186, 196, 209, 0.9));
  background: var(--runtime-activity-pill-bg, rgba(240, 244, 249, 0.9));
  color: var(--runtime-activity-pill-text, var(--muted));
}

.runtime-activity-pill.runtime-activity-preopen {
  --runtime-activity-pill-border: rgba(90, 129, 255, 0.42);
  --runtime-activity-pill-bg: rgba(231, 237, 255, 0.92);
  --runtime-activity-pill-text: #3453c8;
}

.runtime-activity-pill.runtime-activity-buy {
  --runtime-activity-pill-border: rgba(20, 142, 214, 0.36);
  --runtime-activity-pill-bg: rgba(230, 245, 255, 0.95);
  --runtime-activity-pill-text: #0b6a9f;
}

.runtime-activity-pill.runtime-activity-sell {
  --runtime-activity-pill-border: rgba(219, 120, 43, 0.35);
  --runtime-activity-pill-bg: rgba(255, 241, 230, 0.95);
  --runtime-activity-pill-text: #b8641d;
}

.runtime-activity-pill.runtime-activity-holding {
  --runtime-activity-pill-border: rgba(46, 156, 122, 0.34);
  --runtime-activity-pill-bg: rgba(231, 250, 243, 0.95);
  --runtime-activity-pill-text: #1e7f62;
}

.runtime-activity-pill.runtime-activity-tracking {
  --runtime-activity-pill-border: rgba(90, 113, 145, 0.3);
  --runtime-activity-pill-bg: rgba(238, 243, 248, 0.95);
  --runtime-activity-pill-text: #55697f;
}

.runtime-activity-pill.runtime-activity-stale {
  --runtime-activity-pill-border: rgba(212, 62, 62, 0.34);
  --runtime-activity-pill-bg: rgba(255, 234, 234, 0.95);
  --runtime-activity-pill-text: #ba2e2e;
}

.runtime-activity-pill.runtime-activity-closed {
  --runtime-activity-pill-border: rgba(186, 196, 209, 0.8);
  --runtime-activity-pill-bg: rgba(245, 247, 250, 0.96);
  --runtime-activity-pill-text: #607082;
}

.runtime-activity-pill.runtime-activity-paused {
  --runtime-activity-pill-border: rgba(121, 92, 182, 0.34);
  --runtime-activity-pill-bg: rgba(242, 236, 255, 0.95);
  --runtime-activity-pill-text: #6d52b0;
}

.runtime-activity-pill.runtime-activity-good {
  --runtime-activity-pill-border: rgba(31, 147, 103, 0.34);
  --runtime-activity-pill-bg: rgba(232, 249, 239, 0.96);
  --runtime-activity-pill-text: #18724f;
}

.runtime-activity-pill.runtime-activity-warn {
  --runtime-activity-pill-border: rgba(210, 138, 20, 0.34);
  --runtime-activity-pill-bg: rgba(255, 244, 219, 0.96);
  --runtime-activity-pill-text: #9a6200;
}

.runtime-activity-pill.runtime-activity-bad {
  --runtime-activity-pill-border: rgba(201, 64, 64, 0.34);
  --runtime-activity-pill-bg: rgba(255, 235, 235, 0.96);
  --runtime-activity-pill-text: #b42323;
}

.runtime-activity-pill.runtime-activity-muted {
  --runtime-activity-pill-border: rgba(148, 163, 184, 0.34);
  --runtime-activity-pill-bg: rgba(241, 245, 249, 0.96);
  --runtime-activity-pill-text: #64748b;
}

.runtime-activity-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.55rem;
  margin: 0.55rem 0 0.8rem;
}

.runtime-activity-summary-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 0.55rem 0.7rem;
  display: grid;
  gap: 0.18rem;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 92px;
}

.runtime-activity-summary-card-compact {
  padding: 0.48rem 0.62rem;
  gap: 0.14rem;
  min-height: 72px;
}

.runtime-activity-summary-card .label {
  color: var(--muted);
  font-size: 0.8rem;
}

.runtime-activity-summary-card strong {
  font-size: 1.05rem;
}

.runtime-activity-summary-value {
  display: flex;
  align-items: center;
  min-height: 1.7rem;
}

@keyframes runtime-card-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 var(--runtime-activity-glow, rgba(0, 0, 0, 0));
  }
  50% {
    box-shadow: 0 0 0 7px var(--runtime-activity-glow, rgba(0, 0, 0, 0));
  }
}

@keyframes runtime-card-sweep {
  0% {
    transform: translateX(-135%);
  }
  100% {
    transform: translateX(135%);
  }
}

.home-snapshot-window-grid {
  margin: 0;
}

.home-snapshot-window-grid .window-phase-chip {
  padding: 0.26rem 0.4rem;
}

.home-snapshot-window-grid .window-phase-line {
  gap: 0.28rem;
}

.home-snapshot-window-grid .window-phase-time {
  font-size: 0.8rem;
}

.home-snapshot-symbol-meta {
  display: grid;
  gap: 0.22rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-snapshot-symbol-meta-compact .summary-kv {
  padding: 0.26rem 0.34rem;
}

.home-snapshot-symbol-meta-compact .summary-kv .label {
  font-size: 0.66rem;
}

.home-snapshot-symbol-meta-compact .summary-kv .value {
  font-size: 0.8rem;
}

.home-snapshot-inline-metrics {
  display: grid;
  gap: 0.22rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-snapshot-inline-metric {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
  padding: 0.26rem 0.38rem;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 10px;
  background: #f8fafc;
}

.home-snapshot-inline-metric .label {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.1;
  white-space: nowrap;
}

.home-snapshot-inline-metric .value {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.22rem;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.home-snapshot-inline-metric .runtime-activity-pill {
  padding: 0.12rem 0.4rem;
  font-size: 0.66rem;
}

.home-snapshot-inline-metric-note {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.home-snapshot-inline-metric .metric-label-with-help {
  gap: 0.2rem;
}

.home-snapshot-inline-metric .metric-help {
  z-index: 3;
}

.home-snapshot-inline-metric .metric-help-button {
  width: 1rem;
  height: 1rem;
  font-size: 0.64rem;
}

.home-snapshot-inline-metric-opening .value {
  flex-wrap: nowrap;
  white-space: nowrap;
  text-align: right;
  line-height: 1.1;
}

.home-snapshot-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  min-width: 0;
  flex-wrap: nowrap;
}

.home-snapshot-action-row .home-snapshot-inline-metric-opening {
  flex: 1 1 auto;
  min-width: 0;
}

.home-snapshot-action-row .home-snapshot-card-actions .btn {
  padding-inline: 0.52rem;
}

.home-snapshot-info-row {
  min-width: 0;
  height: 0.5rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  margin-top: -0.04rem;
}

.home-snapshot-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  min-width: 0;
  flex-wrap: nowrap;
  margin-top: -0.04rem;
}

.home-snapshot-card-actions {
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;
  margin-left: auto;
}

.home-snapshot-card-actions .btn {
  white-space: nowrap;
}

.home-snapshot-symbol-note {
  margin: 0;
  font-size: 0.56rem;
  line-height: 0.5rem;
  display: block;
  max-width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-snapshot-symbol-note-empty {
  margin: 0;
  height: 0.5rem;
}

.home-snapshot-symbol-card .summary-kv {
  padding: 0.3rem 0.38rem;
}

.home-snapshot-symbol-card .summary-kv .label {
  font-size: 0.68rem;
}

.home-snapshot-symbol-card .summary-kv .value {
  font-size: 0.82rem;
}

@media (max-width: 1480px) {
  .home-snapshot-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .home-snapshot-symbol-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .recommendation-feedback {
    flex-direction: column;
  }

  .home-snapshot-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-snapshot-symbol-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .home-snapshot-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 560px) {
  .home-snapshot-kpis,
  .home-snapshot-symbol-grid {
    grid-template-columns: 1fr;
  }

  .home-snapshot-inline-metrics {
    grid-template-columns: 1fr;
  }

  .home-snapshot-card-footer {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .home-snapshot-action-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

.qty-progress-grid {
  display: grid;
  gap: 0.35rem;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  margin-top: 0.45rem;
}

.summary-row {
  display: grid;
  gap: 0.35rem;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
}

.summary-kv {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 0.32rem 0.4rem;
  background: #fff;
}

.summary-kv .label {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
}

.summary-kv .value {
  font-size: 0.88rem;
  font-weight: 700;
}

.summary-kv.summary-kv-wide {
  grid-column: 1 / -1;
}

.summary-kv.summary-kv-wide .value {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.28;
  white-space: normal;
  word-break: break-word;
}

.summary-kv-inline-note {
  font-weight: 700;
  color: var(--text);
}

.summary-kv-inline-note-strong {
  color: var(--text);
}

.symbol-regime-opening-notes {
  display: grid;
  gap: 0.2rem;
}

.symbol-regime-opening-note {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.symbol-monitor-flags {
  margin-top: 0.42rem;
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.home-snapshot-inline-flags {
  margin-top: 0;
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  overflow: hidden;
}

.home-snapshot-inline-flags-empty {
  flex: 1 1 auto;
  min-height: 1.5rem;
}

.integrity-flag {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #9f1239;
  font-size: 0.64rem;
  border-radius: 999px;
  padding: 0.12rem 0.36rem;
  font-weight: 700;
  white-space: nowrap;
}

.home-snapshot-inline-flags .integrity-flag {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.integrity-flag-muted {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #475569;
}

.home-snapshot-meta .summary-kv-alert .value {
  display: -webkit-box;
  overflow: hidden;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.home-snapshot-meta .summary-kv-transition .value {
  white-space: nowrap;
}

@container (min-width: 620px) {
  .qty-progress-grid {
    grid-template-columns: repeat(3, minmax(110px, 1fr));
  }

  .summary-row {
    grid-template-columns: repeat(3, minmax(110px, 1fr));
  }

  .chart-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@container (max-width: 520px) {
  .chart-head-actions {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .chart-mode-switch {
    justify-content: flex-end;
  }
}

@supports not (container-type: inline-size) {
  .window-phase-grid {
    grid-template-columns: 1fr;
  }

  .qty-progress-grid {
    grid-template-columns: repeat(3, minmax(110px, 1fr));
  }

  .chart-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .running-board-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plan-live-summary {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .symbol-monitor-grid {
    grid-template-columns: 1fr;
  }

  .window-phase-grid {
    grid-template-columns: 1fr;
  }

  .execution-v1-grid {
    grid-template-columns: 1fr;
  }
}

.symbol-chart-dialog {
  width: min(1200px, calc(100vw - 2rem));
  max-width: 1200px;
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
}

.symbol-chart-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.symbol-chart-dialog-shell {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  background: #f8fbff;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
}

.symbol-chart-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.symbol-chart-dialog-head h3 {
  margin: 0;
  font-size: 1.1rem;
}

.symbol-chart-dialog-head p {
  margin: 0.25rem 0 0;
}

.symbol-chart-dialog-body {
  overflow: auto;
  max-height: calc(100vh - 9rem);
  padding-right: 0;
}

.regime-live-pnl-dialog-shell {
  width: 100%;
  max-width: none;
}

.regime-live-pnl-dialog {
  width: min(1288px, calc(100vw - 1rem));
  max-width: 1288px;
}

.regime-live-pnl-dialog-body {
  display: grid;
  gap: 0.9rem;
}

.regime-live-pnl-chart-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.65rem;
}

.regime-live-pnl-chart-summary .summary-kv {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: #ffffff;
  padding: 0.72rem 0.8rem;
}

.regime-live-pnl-budget-card {
  display: grid;
  gap: 0.72rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.97) 100%);
  padding: 0.88rem 0.92rem 0.96rem;
}

.regime-live-pnl-budget-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.regime-live-pnl-budget-head-side {
  display: grid;
  justify-items: end;
  gap: 0.35rem;
}

.regime-live-pnl-budget-head h5,
.regime-live-pnl-budget-head p {
  margin: 0;
}

.regime-live-pnl-budget-total-value {
  font-size: 1.18rem;
  line-height: 1.2;
  color: #0f172a;
  white-space: nowrap;
}

.regime-live-pnl-budget-overall {
  border-radius: 14px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  background: rgba(240, 253, 250, 0.86);
  padding: 0.8rem 0.85rem;
  display: grid;
  gap: 0.46rem;
}

.regime-live-pnl-budget-overall-top,
.regime-live-pnl-budget-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.regime-live-pnl-budget-overall .label,
.regime-live-pnl-budget-item .value {
  color: #0f172a;
}

.regime-live-pnl-budget-meter {
  height: 0.54rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.18);
}

.regime-live-pnl-budget-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e 0%, #14b8a6 100%);
}

.regime-live-pnl-budget-meter.is-symbol span {
  background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
}

.regime-live-pnl-budget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(152px, 1fr));
  gap: 0.62rem;
}

.regime-live-pnl-budget-item {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.92);
  padding: 0.72rem 0.76rem;
  display: grid;
  gap: 0.42rem;
}

.regime-live-pnl-budget-card.is-holding .regime-live-pnl-budget-overall,
.regime-live-pnl-budget-item.is-holding {
  border-color: rgba(37, 99, 235, 0.24);
  background: rgba(239, 246, 255, 0.84);
}

.regime-live-pnl-budget-card.is-closed .regime-live-pnl-budget-overall,
.regime-live-pnl-budget-item.is-closed {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(255, 247, 237, 0.9);
}

.regime-live-pnl-budget-card.is-idle .regime-live-pnl-budget-overall,
.regime-live-pnl-budget-item.is-idle {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(248, 250, 252, 0.96);
}

.regime-live-pnl-budget-item strong {
  font-size: 0.88rem;
  line-height: 1.25;
  color: #0f172a;
}

.regime-live-pnl-budget-state {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.12rem 0.52rem;
  border-radius: 999px;
  font-size: 0.74rem;
  line-height: 1.1;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.86);
  color: #475569;
  white-space: nowrap;
}

.regime-live-pnl-budget-state.is-holding {
  border-color: rgba(37, 99, 235, 0.26);
  background: rgba(219, 234, 254, 0.95);
  color: #1d4ed8;
}

.regime-live-pnl-budget-state.is-closed {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(254, 243, 199, 0.95);
  color: #b45309;
}

.regime-live-pnl-budget-state.is-idle {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(241, 245, 249, 0.95);
  color: #64748b;
}

.regime-live-pnl-budget-item p,
.regime-live-pnl-budget-overall p {
  margin: 0;
}

.regime-live-pnl-budget-item.is-closed .regime-live-pnl-budget-meter.is-symbol span {
  background: linear-gradient(90deg, #d97706 0%, #f59e0b 100%);
}

.regime-live-pnl-budget-item.is-idle .regime-live-pnl-budget-meter.is-symbol span {
  background: linear-gradient(90deg, #94a3b8 0%, #cbd5e1 100%);
}

.regime-live-pnl-chart-shell {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 245, 249, 0.96) 100%);
  padding: 0.92rem 0.95rem 1rem;
}

.regime-live-pnl-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.regime-live-pnl-chart-head h4,
.regime-live-pnl-chart-head p {
  margin: 0;
}

.regime-live-pnl-chart-head-controls {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: nowrap;
  margin-left: auto;
}

.regime-live-pnl-mode-pill,
.regime-live-pnl-loading-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  min-height: 2rem;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.92);
  color: #334155;
  font-size: 0.77rem;
  line-height: 1.2;
  white-space: nowrap;
}

.regime-live-pnl-mode-pill.is-live {
  border-color: rgba(15, 118, 110, 0.24);
  background: rgba(204, 251, 241, 0.9);
  color: #115e59;
}

.regime-live-pnl-mode-pill.is-history {
  border-color: rgba(59, 130, 246, 0.2);
  background: rgba(219, 234, 254, 0.9);
  color: #1d4ed8;
}

.regime-live-pnl-loading-pill {
  display: none;
}

.regime-live-pnl-loading-pill.is-visible {
  display: inline-flex;
}

.regime-live-pnl-loading-pill::before {
  content: "";
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  border: 2px solid rgba(148, 163, 184, 0.34);
  border-top-color: #0f172a;
  animation: regime-live-pnl-spin 0.8s linear infinite;
}

.regime-live-pnl-chart-shell.is-loading {
  opacity: 0.92;
}

.regime-live-pnl-calendar {
  position: relative;
}

.regime-live-pnl-calendar-toggle {
  min-width: 136px;
}

.regime-live-pnl-calendar-popover {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 25;
  display: none;
  width: 286px;
  padding: 0.72rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.16);
}

.regime-live-pnl-calendar.is-open .regime-live-pnl-calendar-popover {
  display: grid;
  gap: 0.55rem;
}

.regime-live-pnl-calendar-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.45rem;
}

.regime-live-pnl-calendar-month-label {
  text-align: center;
  font-size: 0.9rem;
  color: #0f172a;
}

.regime-live-pnl-calendar-weekdays,
.regime-live-pnl-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.24rem;
}

.regime-live-pnl-calendar-weekday {
  text-align: center;
  font-size: 0.72rem;
  color: #64748b;
}

.regime-live-pnl-calendar-day {
  min-height: 2rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(241, 245, 249, 0.9);
  color: #cbd5e1;
  font-size: 0.8rem;
}

.regime-live-pnl-calendar-day.is-enabled {
  background: rgba(219, 234, 254, 0.72);
  color: #0f172a;
  cursor: pointer;
}

.regime-live-pnl-calendar-day.is-enabled:hover {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(191, 219, 254, 0.82);
}

.regime-live-pnl-calendar-day.is-selected {
  border-color: rgba(15, 118, 110, 0.45);
  background: rgba(204, 251, 241, 0.88);
  color: #115e59;
  font-weight: 700;
}

.regime-live-pnl-calendar-day.is-outside {
  background: rgba(248, 250, 252, 0.76);
}

@keyframes regime-live-pnl-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes regime-live-pnl-kospi-pulse {
  0%,
  44%,
  100% {
    opacity: 0.06;
  }
  50%,
  94% {
    opacity: 0.56;
  }
}

.regime-live-pnl-chart-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  flex: 0 1 auto;
  white-space: nowrap;
}

.regime-live-pnl-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-size: 0.79rem;
  color: #475569;
}

.regime-live-pnl-chart-legend i {
  width: 1rem;
  height: 0.18rem;
  border-radius: 999px;
  display: inline-block;
}

.regime-live-pnl-chart-legend .line-pnl {
  background: #0f766e;
}

.regime-live-pnl-chart-legend .line-kospi {
  width: 1rem;
  height: 0;
  border-top: 2px dashed rgba(100, 116, 139, 0.9);
  background: none;
}

.regime-live-pnl-chart-legend .band-regime {
  width: 1rem;
  height: 0.55rem;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(71, 85, 105, 0.04) 0%,
    rgba(71, 85, 105, 0.1) 55%,
    rgba(71, 85, 105, 0.14) 100%
  );
}

.regime-live-pnl-chart-legend .band-stack {
  width: 1rem;
  height: 0.55rem;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(15, 118, 110, 0.18) 0%,
    rgba(37, 99, 235, 0.18) 50%,
    rgba(220, 38, 38, 0.18) 100%
  );
}

.regime-live-pnl-chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.regime-live-pnl-chart-axis,
.regime-live-pnl-chart-label {
  fill: #64748b;
  font-size: 11px;
}

.regime-live-pnl-chart-grid {
  stroke: rgba(148, 163, 184, 0.35);
  stroke-width: 1;
}

.regime-live-pnl-chart-zero {
  stroke: rgba(15, 23, 42, 0.5);
  stroke-width: 1.2;
  stroke-dasharray: 4 4;
}

.regime-live-pnl-chart-line-pnl {
  fill: none;
  stroke: #0f766e;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 3px 8px rgba(15, 118, 110, 0.16));
}

.regime-live-pnl-chart-line-kospi {
  fill: none;
  stroke: rgba(100, 116, 139, 0.9);
  stroke-width: 1.75;
  stroke-dasharray: 7 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.08;
  animation: regime-live-pnl-kospi-pulse 2s linear infinite;
}

.regime-live-pnl-chart-band {
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
  stroke-linecap: round;
  transition: fill-opacity 160ms ease;
}

.regime-live-pnl-chart-regime-band {
  stroke: none;
}

.regime-live-pnl-chart-regime-band-label {
  fill: rgba(51, 65, 85, 0.46);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  pointer-events: none;
  user-select: none;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.regime-live-pnl-chart-regime-band-label[data-level="0"] {
  fill: rgba(100, 116, 139, 0.72);
}

.regime-live-pnl-chart-regime-band-label[data-level="1"] {
  fill: rgba(71, 85, 105, 0.58);
}

.regime-live-pnl-chart-regime-band-label[data-level="2"] {
  fill: rgba(51, 65, 85, 0.54);
}

.regime-live-pnl-chart-regime-band-label[data-level="3"] {
  fill: rgba(51, 65, 85, 0.62);
}

.regime-live-pnl-chart-regime-band-label[data-level="4"] {
  fill: rgba(30, 41, 59, 0.72);
}

.regime-live-pnl-chart-band-label-line {
  fill: none;
  stroke-width: 1.1;
  stroke-opacity: 0.75;
}

.regime-live-pnl-chart-band-label-line[data-status="holding"] {
  stroke: #dc2626 !important;
  stroke-opacity: 0.92;
}

.regime-live-pnl-chart-band-label-line[data-status="closed"] {
  stroke: #2563eb !important;
  stroke-opacity: 0.88;
}

.regime-live-pnl-chart-band-label-line[data-status="idle"] {
  stroke: #94a3b8 !important;
  stroke-opacity: 0.82;
}

.regime-live-pnl-chart-band-label {
  fill: #64748b;
  font-size: 11px;
  font-weight: 500;
}

.regime-live-pnl-chart-band-label.is-holding {
  fill: #b91c1c;
}

.regime-live-pnl-chart-band-label.is-closed {
  fill: #1d4ed8;
}

.regime-live-pnl-chart-band-label.is-idle {
  fill: #64748b;
}

.regime-live-pnl-chart-band-label-name {
  fill: #475569;
}

.regime-live-pnl-chart-band-label-name.is-holding {
  fill: #991b1b;
}

.regime-live-pnl-chart-band-label-name.is-closed {
  fill: #1e3a8a;
}

.regime-live-pnl-chart-band-label-name.is-idle {
  fill: #475569;
}

.regime-live-pnl-chart-band-label-value {
  fill: #64748b;
}

.regime-live-pnl-chart-band-label-value.is-holding {
  fill: #b91c1c;
}

.regime-live-pnl-chart-band-label-value.is-closed {
  fill: #1d4ed8;
}

.regime-live-pnl-chart-band-label-value.is-idle {
  fill: #64748b;
}

.regime-live-pnl-chart-point-pnl {
  fill: #0f766e;
}

.regime-live-pnl-chart-point-kospi {
  fill: #64748b;
  opacity: 0.08;
  animation: regime-live-pnl-kospi-pulse 2s linear infinite;
}

.regime-live-pnl-chart-hover-slice {
  fill: rgba(15, 23, 42, 0);
  transition: fill 140ms ease;
}

.regime-live-pnl-chart-hover-slice:hover {
  fill: rgba(15, 23, 42, 0.05);
}

.regime-live-pnl-chart-band-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.6rem;
  margin-top: 0.8rem;
}

.regime-live-pnl-chart-band-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.38rem 0.52rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.9);
  color: #334155;
  min-width: 0;
}

.regime-live-pnl-chart-band-legend-item strong,
.regime-live-pnl-chart-band-legend-item small {
  white-space: nowrap;
}

.regime-live-pnl-chart-band-legend-item .band-swatch {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  display: inline-block;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.82),
    0 0 0 1px rgba(15, 23, 42, 0.08);
}

.replay-lab-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(1320px, calc(100vw - 1rem));
  max-width: 1320px;
  max-height: calc(100vh - 1rem);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
}

.replay-lab-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.replay-lab-dialog-shell {
  display: grid;
  gap: 1rem;
  margin: 0 auto;
  padding: 1.2rem 1.25rem 1.1rem;
  background: #f8fbff;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.2);
  max-height: calc(100vh - 1rem);
  overflow: auto;
}

.replay-lab-dialog-shell .page-header {
  margin-bottom: 0.2rem;
}

.replay-lab-dialog-shell .card-subtle {
  padding: 1rem;
}

.replay-run-kpi-grid {
  gap: 0.55rem;
}

.replay-run-kpi-grid .summary-kpi-card {
  min-height: 66px;
  padding: 0.52rem 0.62rem;
  border-radius: 10px;
}

.replay-run-kpi-grid .summary-kpi-card .label {
  font-size: 0.72rem;
  margin-bottom: 0.18rem;
}

.replay-run-kpi-grid .summary-kpi-card strong {
  font-size: 1.14rem;
  line-height: 1.05;
}

.replay-run-kpi-grid .summary-kpi-card p {
  margin: 0.16rem 0 0;
  font-size: 0.71rem;
  line-height: 1.22;
}

.replay-run-progress-state {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(226, 232, 240, 0.78), rgba(219, 234, 254, 0.88));
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.replay-run-progress-spinner {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  border: 4px solid rgba(148, 163, 184, 0.25);
  border-top-color: #2563eb;
  border-right-color: #0f766e;
  animation: replay-run-spinner-rotate 0.9s linear infinite;
  flex: 0 0 auto;
}

.replay-run-progress-title {
  margin: 0;
  font-weight: 700;
  color: #0f172a;
}

.replay-run-progress-meter {
  display: grid;
  gap: 0.45rem;
}

.replay-run-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.replay-run-progress-meta strong {
  font-size: 1rem;
  color: #0f172a;
}

@keyframes replay-run-spinner-rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.replay-benchmark-picker,
.replay-benchmark-form {
  display: grid;
  gap: 0.9rem 1rem;
}

.replay-benchmark-picker {
  grid-template-columns: minmax(20rem, 42rem);
}

.replay-benchmark-form {
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  align-items: end;
}

.replay-form-field {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.replay-form-field label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-strong);
}

.replay-form-field select {
  width: 100%;
}

.replay-form-field-wide {
  max-width: 42rem;
}

.replay-form-actions {
  display: flex;
  align-items: end;
}

.replay-benchmark-result-table {
  min-width: 0;
  table-layout: fixed;
}

.replay-benchmark-result-table .col-symbol {
  width: 220px;
}

.replay-benchmark-result-table .col-regime {
  width: 100px;
}

.replay-benchmark-result-table .col-money {
  width: 92px;
}

.replay-benchmark-result-table th,
.replay-benchmark-result-table td {
  word-break: break-word;
}

.replay-symbol-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  flex-wrap: nowrap;
}

.replay-symbol-main {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.replay-symbol-main strong,
.replay-symbol-main .muted {
  overflow: hidden;
  text-overflow: ellipsis;
}

.replay-symbol-chart-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  padding-inline: 0.55rem;
}

.replay-chart-overlay-tools {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.replay-chart-overlay-tools .summary-kv .value {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-items: center;
}

.replay-chart-overlay-note {
  margin: 0;
}

.report-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
}

.report-modal[hidden] {
  display: none;
}

.report-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
}

.report-modal-card {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100vw - 0.75rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
}

.plan-report-table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}

.plan-report-table th,
.plan-report-table td {
  padding: 0.38rem 0.22rem;
  line-height: 1.32;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.plan-report-table col.col-symbol {
  width: 12.5rem;
}

.plan-report-table col.col-qty {
  width: 4.2rem;
}

.plan-report-table col.col-price {
  width: 5.8rem;
}

.plan-report-table col.col-pnl {
  width: 6.8rem;
}

.plan-report-table col.col-return {
  width: 5.2rem;
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  margin-bottom: 0.8rem;
}

.cards-grid.report-summary-grid.plan-report-summary-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 2.4rem;
}

.report-modal-card .plan-report-summary-grid + .table-wrap {
  margin-top: 1.2rem;
  padding-top: 0.2rem;
}

.report-metric {
  padding: 0.6rem 0.8rem;
}

.report-metric p {
  margin: 0.15rem 0;
}

.report-metric strong {
  font-size: 1.1rem;
}

.decision-trace-header {
  align-items: flex-start;
}

.decision-trace-header h2,
.decision-trace-header h3 {
  margin-bottom: 0.25rem;
}

.decision-trace-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.decision-trace-filters label {
  display: grid;
  gap: 0.24rem;
  min-width: 180px;
}

.decision-trace-filters label span {
  font-size: 0.84rem;
  color: var(--muted);
}

.decision-trace-filters select {
  width: 100%;
}

.decision-trace-detail {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.45rem;
}

.decision-trace-detail-grid {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.trace-span-2 {
  grid-column: 1 / -1;
}

.decision-trace-sections {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.auth-idle-modal {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
}

.auth-idle-modal[hidden] {
  display: none;
}

.auth-idle-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}

.auth-idle-card {
  position: relative;
  z-index: 1;
  width: min(440px, calc(100% - 1.2rem));
}

.auth-idle-card h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.badge-pulse {
  animation: badge-pulse 1.6s ease-in-out infinite;
}

@keyframes badge-pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .badge-pulse {
    animation: none;
  }
}

label {
  font-weight: 600;
}

input,
textarea,
select {
  width: min(100%, 520px);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  font: inherit;
  background: #fff;
}

textarea {
  width: 100%;
}

.regime-home-card .page-header {
  margin-bottom: 1rem;
}

.regime-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.9fr);
  gap: 1rem;
}

.regime-home-hero,
.regime-home-side {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.98));
  padding: 1rem;
}

.regime-home-hero-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.regime-home-chart-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.regime-home-toggle-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.regime-home-toggle {
  border-radius: 999px;
  border-color: rgba(148, 163, 184, 0.38);
  background: rgba(255, 255, 255, 0.88);
}

.regime-home-toggle.is-active {
  background: linear-gradient(135deg, #0f766e, #0f4c81);
  border-color: transparent;
  color: #fff;
}

.regime-home-hero-head strong {
  display: block;
  font-size: 2rem;
  line-height: 1.1;
}

.regime-home-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.regime-home-chart-shell {
  min-height: 228px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(241, 245, 249, 0.98), rgba(248, 250, 252, 1));
  padding: 0.9rem;
}

.regime-home-sparkline {
  width: 100%;
  height: 228px;
  display: block;
}

.regime-home-sparkline-large {
  overflow: visible;
}

.regime-home-line {
  fill: none;
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.regime-home-line-good {
  stroke: #0f766e;
}

.regime-home-line-bad {
  stroke: #b91c1c;
}

.regime-home-chart-empty {
  min-height: 214px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.regime-home-ticker {
  --regime-home-ticker-gap-size: 18rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.09), rgba(12, 74, 110, 0.08)),
    rgba(255, 255, 255, 0.92);
  min-height: 2.4rem;
  padding: 0.35rem 0.45rem;
}

.regime-home-ticker-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 4.85rem;
  padding: 0.26rem 0.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f766e, #0f4c81);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.regime-home-ticker-viewport {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    rgba(0, 0, 0, 1) 24px,
    rgba(0, 0, 0, 1) calc(100% - 24px),
    transparent 100%
  );
}

.regime-home-ticker-track {
  display: inline-flex;
  align-items: center;
  min-width: max-content;
  padding: 0.3rem 0;
  white-space: nowrap;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.regime-home-ticker-group {
  display: inline-flex;
  align-items: center;
  gap: 1.8rem;
  padding-right: 1rem;
}

.regime-home-ticker-gap {
  flex: 0 0 var(--regime-home-ticker-gap-size);
  width: var(--regime-home-ticker-gap-size);
}

.regime-home-ticker-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.regime-home-ticker-item::before {
  content: "";
  width: 0.36rem;
  height: 0.36rem;
  border-radius: 999px;
  margin-right: 0.55rem;
  background: linear-gradient(135deg, #0f766e, #0f4c81);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.08);
}

.regime-guard-shell {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 0.9rem;
}

.regime-guard-shell > section,
.regime-guard-shell .grid-2,
.regime-guard-shell .grid-3,
.regime-guard-shell .recommendation-section-grid,
.regime-guard-shell .recommendation-meta-grid,
.regime-guard-shell .card,
.regime-guard-shell .card-subtle,
.regime-guard-shell .summary-kpi-card,
.regime-guard-shell .table-wrap {
  min-width: 0;
  max-width: 100%;
}

.regime-guard-shell .summary-kpi-card strong,
.regime-guard-shell .summary-kpi-card p,
.regime-guard-shell td {
  overflow-wrap: anywhere;
}

.regime-summary-grid .summary-kpi-card {
  min-height: 82px;
  padding: 0.68rem 0.78rem;
  justify-content: flex-start;
}

.regime-summary-grid .summary-kpi-card .label,
.regime-summary-grid .summary-kpi-card > .metric-label-with-help {
  font-size: 0.72rem;
  line-height: 1.25;
  margin-bottom: 0.24rem;
}

.regime-summary-grid .summary-kpi-card strong {
  font-size: 1.18rem;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.regime-summary-grid .summary-kpi-card p {
  margin: 0.22rem 0 0;
  font-size: 0.74rem;
  line-height: 1.3;
}

.regime-live-pnl-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.regime-live-pnl-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.regime-live-pnl-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  min-width: 2.45rem;
  min-height: 2.2rem;
  padding-inline: 0;
  flex: 0 0 auto;
}

.regime-live-pnl-open-btn svg,
.regime-live-pnl-link-btn svg {
  width: 1.2rem;
  height: 1.2rem;
}

.regime-live-pnl-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  min-width: 2rem;
  padding-inline: 0;
  flex: 0 0 auto;
}

.regime-budget-usage-rotator-card {
  transition: background-color 180ms ease, border-color 180ms ease;
}

.regime-live-pnl-chart-summary .regime-budget-usage-rotator-card {
  background: inherit;
}

.regime-live-pnl-chart-summary .regime-budget-usage-rotator-card.is-holding,
.regime-budget-usage-rotator-card.is-holding {
  border-color: rgba(220, 38, 38, 0.38);
  background: linear-gradient(180deg, rgba(254, 226, 226, 0.98) 0%, rgba(254, 242, 242, 0.98) 100%);
}

.regime-live-pnl-chart-summary .regime-budget-usage-rotator-card.is-closed,
.regime-budget-usage-rotator-card.is-closed {
  border-color: rgba(37, 99, 235, 0.34);
  background: linear-gradient(180deg, rgba(219, 234, 254, 0.98) 0%, rgba(239, 246, 255, 0.98) 100%);
}

.regime-live-pnl-chart-summary .regime-budget-usage-rotator-card.is-idle,
.regime-budget-usage-rotator-card.is-idle {
  border-color: rgba(148, 163, 184, 0.34);
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
}

.regime-budget-usage-rotator-name {
  font-weight: 700;
  color: #0f172a;
}

.regime-live-pnl-page-main {
  width: min(1380px, calc(100vw - 0.75rem));
  margin: 0 auto;
}

.regime-live-pnl-page {
  display: grid;
  gap: 0.9rem;
}

.regime-live-pnl-page-header {
  margin-bottom: 0;
}

.regime-live-pnl-page-card {
  display: grid;
  gap: 0.85rem;
  padding: 0.9rem;
}

.regime-live-pnl-page-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.regime-live-pnl-standalone-body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 10% 0%, #ffffff, transparent 40%),
    radial-gradient(circle at 90% 10%, #dde8f8, transparent 30%),
    linear-gradient(170deg, var(--bg-grad-a), var(--bg));
  overscroll-behavior: none;
}

.regime-live-pnl-standalone-main {
  width: min(100vw, 1440px);
  margin: 0 auto;
  min-height: 100dvh;
  padding:
    max(0.35rem, env(safe-area-inset-top))
    max(0.35rem, env(safe-area-inset-right))
    max(0.35rem, env(safe-area-inset-bottom))
    max(0.35rem, env(safe-area-inset-left));
}

.regime-live-pnl-standalone-shell {
  display: grid;
  gap: 0.8rem;
}

.regime-live-pnl-standalone-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.15rem 0.2rem;
}

.regime-live-pnl-standalone-topbar p,
.regime-live-pnl-standalone-topbar strong {
  margin: 0;
}

@media (max-width: 820px) {
  .regime-live-pnl-chart-head {
    flex-direction: column;
  }

  .regime-live-pnl-chart-head-controls {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .regime-live-pnl-calendar-popover {
    right: 0;
    left: auto;
    width: min(286px, calc(100vw - 1.25rem));
  }
}

.regime-guard-shell details {
  min-width: 0;
}

.regime-guard-shell details pre {
  max-width: 100%;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  background: #0f172a;
  color: #e2e8f0;
}

.regime-guard-shell details summary {
  cursor: pointer;
  font-weight: 700;
}

.regime-note-list {
  margin: 0.55rem 0 0;
  padding-left: 1.1rem;
}

.regime-index-guide {
  margin-top: 1rem;
  display: grid;
  gap: 0.8rem;
}

.regime-index-detail-card {
  margin-top: 0.95rem;
}

.regime-index-detail-card .regime-index-guide {
  margin-top: 0;
}

.regime-index-guide h5 {
  margin: 0;
  font-size: 0.96rem;
}

.regime-index-guide-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.regime-index-guide-card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.92));
  padding: 0.85rem 0.95rem;
}

.regime-index-guide-card strong {
  display: block;
  margin-bottom: 0.38rem;
  color: #0f172a;
  font-size: 0.9rem;
}

.regime-index-guide-card p {
  margin: 0.34rem 0 0;
  color: #334155;
  font-size: 0.82rem;
  line-height: 1.46;
}

.regime-history-cell {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.regime-history-cell strong,
.regime-history-cell span {
  overflow-wrap: anywhere;
}

.regime-watch-list {
  display: grid;
  gap: 0.65rem;
}

.regime-watch-item {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.8rem 0.9rem;
  display: grid;
  gap: 0.32rem;
}

.regime-watch-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
}

.regime-watch-item-head strong {
  font-size: 0.98rem;
  line-height: 1.3;
}

.regime-watch-item-body {
  margin: 0;
  color: #0f172a;
  line-height: 1.45;
}

.regime-watch-item-meta {
  margin: 0;
}

.regime-watch-item-timeline {
  border-left: 3px solid rgba(14, 165, 233, 0.28);
}

.metric-label-with-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
  min-width: 0;
  vertical-align: middle;
  width: fit-content;
  max-width: 100%;
}

.metric-label-with-help.label {
  align-self: flex-start;
}

.summary-kpi-card > .metric-label-with-help,
.regime-guard-shell .card-subtle .metric-label-with-help {
  align-self: flex-start;
}

th .metric-label-with-help {
  max-width: 100%;
}

.metric-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 4;
  flex: 0 0 auto;
}

.metric-help-button {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(14, 116, 144, 0.28);
  background: rgba(14, 165, 233, 0.12);
  color: #0f766e;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  user-select: none;
  padding: 0;
}

.metric-help:hover .metric-help-button,
.metric-help:focus-within .metric-help-button {
  background: rgba(14, 165, 233, 0.18);
  border-color: rgba(14, 116, 144, 0.42);
}

.metric-help-popover {
  display: none;
  position: fixed;
  top: var(--metric-help-top, -9999px);
  left: var(--metric-help-left, -9999px);
  right: auto;
  z-index: 15;
  width: min(22rem, calc(100vw - 1rem));
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  color: #0f172a;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(0.25rem);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.metric-help-popover.is-floating {
  display: block;
  position: fixed;
  top: var(--metric-help-top, -9999px);
  left: var(--metric-help-left, -9999px);
  right: auto;
  width: min(22rem, calc(100vw - 1rem));
  z-index: 1200;
}

.metric-help:hover .metric-help-popover,
.metric-help:focus-within .metric-help-popover,
.metric-help.is-open .metric-help-popover {
  display: block;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.metric-help-popover strong {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
}

.metric-help-popover .metric-help-line {
  display: block;
  margin: 0.38rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #334155;
}

.metric-help-popover p {
  margin: 0.38rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #334155;
}

.pattern-validity-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.pattern-validity-section-head h3 {
  margin: 0;
}

.pattern-validity-section-head p {
  margin: 0.2rem 0 0;
}

.pattern-validity-table-wrap {
  overflow-x: hidden;
}

.pattern-validity-table {
  table-layout: fixed;
}

.pattern-validity-table th,
.pattern-validity-table td {
  padding: 0.56rem 0.4rem;
  font-size: 0.88rem;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.pattern-validity-symbol-cell {
  display: grid;
  gap: 0.12rem;
}

.pattern-validity-window-cell {
  min-width: 0;
}

.pattern-validity-window-stack {
  display: grid;
  gap: 0.18rem;
  line-height: 1.3;
}

.pattern-validity-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
}

.pattern-validity-pagination-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.pattern-validity-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.38rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.pattern-validity-page-link.is-current {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 116, 144, 0.34);
  color: #0f766e;
}

.regime-home-milestone-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.regime-home-milestone-item {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.84);
  padding: 0.7rem 0.8rem;
  display: grid;
  gap: 0.34rem;
}

.regime-home-milestone-item strong {
  font-size: 0.94rem;
}

@media (prefers-reduced-motion: reduce) {
  .regime-home-ticker-track {
    transform: translate3d(0, 0, 0) !important;
  }
}

@media (max-width: 640px) {
  .metric-help-popover {
    width: min(18rem, 88vw);
  }

  .pattern-validity-table th,
  .pattern-validity-table td {
    font-size: 0.8rem;
    padding: 0.48rem 0.34rem;
  }

  .pattern-validity-pagination {
    align-items: flex-start;
  }
}

.regime-home-grid-line {
  stroke: rgba(148, 163, 184, 0.22);
  stroke-width: 1;
}

.regime-home-session-line {
  stroke: rgba(100, 116, 139, 0.28);
  stroke-width: 1.15;
  stroke-dasharray: 4 5;
}

.regime-home-axis-label {
  fill: #64748b;
  font-size: 12px;
}

.regime-home-axis-bottom {
  text-anchor: middle;
}

.regime-home-chart-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.regime-home-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.8rem;
}

.regime-home-stat-grid .summary-kpi-card {
  min-height: 64px;
  padding: 0.5rem 0.6rem;
  justify-content: flex-start;
}

.regime-home-stat-grid .summary-kpi-card .label,
.regime-home-stat-grid .summary-kpi-card > .metric-label-with-help {
  font-size: 0.7rem;
  line-height: 1.2;
  margin-bottom: 0.14rem;
}

.regime-home-stat-grid .summary-kpi-card strong {
  font-size: 0.98rem;
  line-height: 1.3;
  font-weight: 700;
}

.regime-home-stat-grid .summary-kpi-card p {
  margin: 0.12rem 0 0;
  font-size: 0.72rem;
  line-height: 1.24;
  color: #64748b;
}

.regime-home-week-card {
  grid-column: 1 / -1;
}

.regime-home-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
  margin-top: 0.38rem;
}

.regime-home-week-day {
  min-height: 64px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(248, 250, 252, 0.88);
  padding: 0.38rem 0.18rem 0.32rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.08rem;
}

.regime-home-week-day.is-open {
  background: rgba(236, 253, 245, 0.92);
  border-color: rgba(34, 197, 94, 0.22);
}

.regime-home-week-day.is-closed {
  background: rgba(248, 250, 252, 0.88);
  border-color: rgba(148, 163, 184, 0.2);
}

.regime-home-week-day.is-today {
  box-shadow: inset 0 0 0 1px rgba(14, 116, 144, 0.55);
}

.regime-home-week-day.is-target {
  border-style: dashed;
  border-color: rgba(37, 99, 235, 0.5);
}

.regime-home-week-name {
  font-size: 0.65rem;
  line-height: 1.1;
  color: #64748b;
}

.regime-home-week-day strong {
  font-size: 0.76rem;
  line-height: 1.1;
}

.regime-home-week-day p {
  margin: 0;
  font-size: 0.62rem;
  line-height: 1.16;
  color: #475569;
}

.regime-home-secondary-list {
  display: grid;
  gap: 0.65rem;
}

.regime-home-secondary-item {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.76);
  padding: 0.75rem 0.85rem;
}

.regime-home-secondary-item-rich {
  display: grid;
  gap: 0.42rem;
  align-items: stretch;
}

.regime-home-secondary-main {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.regime-home-secondary-item .right {
  text-align: right;
}

.regime-home-secondary-item strong {
  display: block;
}

.regime-home-secondary-item p,
.regime-home-secondary-note {
  margin: 0.14rem 0 0;
}

.regime-home-secondary-note {
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.32;
}

.regime-home-us-board {
  display: grid;
  gap: 0.42rem;
}

.regime-home-us-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.75rem;
  align-items: baseline;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding-top: 0.42rem;
}

.regime-home-us-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.regime-home-us-label {
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 600;
}

.regime-home-us-value {
  font-size: 0.88rem;
  line-height: 1.2;
}

.regime-home-us-change {
  font-size: 0.8rem;
  font-weight: 600;
  text-align: right;
}

.regime-home-secondary-good {
  color: #047857;
}

.regime-home-secondary-warn {
  color: #b45309;
}

.regime-home-secondary-bad {
  color: #b91c1c;
}

.regime-home-secondary-muted {
  color: #64748b;
}

.regime-home-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .decision-trace-detail-grid {
    grid-template-columns: 1fr;
  }

  .running-board-summary-grid {
    grid-template-columns: 1fr;
  }

  .monitor-running-board .table-wrap {
    padding: 0;
  }

  .mode-value {
    font-size: 1.4rem;
  }

  .digital-clock.has-graphic {
    gap: 0.18rem;
    min-height: 4.2rem;
  }

  .segment-digit {
    width: 2rem;
    height: 3.7rem;
    border-radius: 0.62rem;
  }

  .segment-colon {
    width: 0.55rem;
    height: 3.7rem;
    gap: 0.62rem;
  }

  .segment-colon span {
    width: 0.34rem;
    height: 0.34rem;
  }

  .system-health-grid {
    grid-template-columns: 1fr;
  }

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

  .plan-report-summary-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .container {
    width: min(1120px, 100% - 1rem);
  }

  .regime-home-grid {
    grid-template-columns: 1fr;
  }

  .regime-home-stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .regime-home-chart-shell {
    min-height: 190px;
    padding: 0.7rem;
  }

  .regime-home-sparkline {
    height: 190px;
  }

  .regime-home-ticker {
    --regime-home-ticker-gap-size: 12rem;
    min-height: 2.15rem;
  }

  .regime-home-ticker-label {
    min-width: 4.3rem;
    padding: 0.22rem 0.44rem;
    font-size: 0.68rem;
  }

  .regime-home-ticker-viewport {
    mask-image: none;
  }

  .regime-home-ticker-track {
    transform: translate3d(0, 0, 0);
  }

  .regime-home-ticker-group {
    gap: 1.3rem;
  }

  .regime-home-ticker-item {
    font-size: 0.82rem;
  }

  .regime-home-milestone-strip {
    grid-template-columns: 1fr;
  }
}
