@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/CormorantGaramond-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/CormorantGaramond-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/IBMPlexSans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/IBMPlexSans-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/IBMPlexSans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/IBMPlexSans-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans TC";
  src: url("fonts/NotoSansTC-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans TC";
  src: url("fonts/NotoSansTC-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans TC";
  src: url("fonts/NotoSansTC-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0f1419;
  --surface: #1a212a;
  --surface-2: #151b23;
  --surface-3: #202a35;
  --ink: #e6e9ed;
  --muted: #8b9099;
  --dim: #5f6874;
  --hair: #2a3038;
  --gold: #d4a558;
  --red: #d65a5a;
  --green: #3fa86a;
  --blue-info: #7aa2f7;
  --shadow: 0 18px 70px rgba(0, 0, 0, .22);
  --font-display: "Cormorant Garamond", "Noto Sans TC", serif;
  --font-body: "IBM Plex Sans", "Noto Sans TC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(212, 165, 88, .045), rgba(15, 20, 25, 0) 34rem),
    var(--bg);
}

button {
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid var(--hair);
  background: #0f1419;
  color: var(--ink);
  font: inherit;
  min-height: 36px;
  padding: 8px 10px;
}

input:focus,
select:focus {
  outline: 1px solid rgba(212, 165, 88, .72);
  border-color: var(--gold);
}

input.invalid,
select.invalid,
.array-input.invalid {
  border-color: var(--red);
  box-shadow: inset 0 0 0 1px rgba(214, 90, 90, .3);
}

.shell {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0 34px;
}

.masthead {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
  padding: 20px 0 36px;
}

.masthead-copy {
  min-width: 0;
}

.kicker {
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.display-title {
  margin: 12px 0 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(58px, 8vw, 108px);
  font-weight: 600;
  line-height: .88;
  letter-spacing: 0;
}

.deck {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.gold-rule {
  width: min(560px, 100%);
  height: 1px;
  margin-top: 28px;
  background: linear-gradient(90deg, var(--gold), rgba(212, 165, 88, 0));
}

.masthead-status {
  margin-top: 14px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.locale-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: rgba(21, 27, 35, .88);
  box-shadow: var(--shadow);
}

.locale-toggle button {
  min-width: 44px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 13px;
}

.locale-toggle button:hover,
.locale-toggle button:focus-visible {
  color: var(--ink);
  outline: none;
  border-color: var(--hair);
}

.locale-toggle button.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(212, 165, 88, .07);
}

.empty-cta {
  display: grid;
  grid-template-columns: 5px 1fr;
  gap: 18px;
  align-items: center;
  margin: 0 0 18px;
  border: 1px solid rgba(212, 165, 88, .42);
  background:
    linear-gradient(90deg, rgba(212, 165, 88, .09), rgba(212, 165, 88, 0)),
    var(--surface-2);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.empty-cta[hidden] {
  display: none;
}

.empty-cta-rule {
  width: 5px;
  height: 100%;
  min-height: 58px;
  background: var(--gold);
}

.empty-cta h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.12;
}

.empty-cta p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

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

.panel-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  position: relative;
  min-height: 166px;
  grid-column: span 4;
  overflow: hidden;
  border: 1px solid var(--hair);
  background:
    linear-gradient(180deg, rgba(212, 165, 88, .045), rgba(212, 165, 88, 0) 54%),
    linear-gradient(135deg, rgba(255, 255, 255, .018), rgba(255, 255, 255, 0)),
    var(--surface-2);
  box-shadow: var(--shadow);
}

.panel::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(212, 165, 88, .38), rgba(212, 165, 88, 0));
}

.panel-wide {
  grid-column: span 8;
}

.section-head {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--hair);
}

.section-head h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.panel-body {
  padding: 18px 20px 20px;
}

.panel-note {
  margin: 0;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.5;
}

.panel-action,
.gold-button,
.ghost-button,
.icon-button {
  border: 1px solid var(--hair);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.panel-action,
.gold-button {
  border-color: rgba(212, 165, 88, .72);
  color: var(--gold);
  background: rgba(212, 165, 88, .065);
}

.panel-action,
.gold-button,
.ghost-button {
  min-height: 36px;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.compact {
  min-height: 32px;
  padding: 6px 10px;
}

.tiny {
  min-height: 28px;
  padding: 3px 8px;
}

.gold-button:disabled,
.ghost-button:disabled,
.panel-action:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.leg-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.saved-leg {
  display: grid;
  gap: 4px;
  border-left: 1px solid var(--gold);
  padding: 8px 0 8px 12px;
}

.saved-leg-name {
  color: var(--ink);
  font-weight: 600;
}

.saved-leg-meta,
.saved-leg code {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.meta-line {
  flex: 0 0 auto;
  border: 1px solid rgba(212, 165, 88, .48);
  padding: 5px 9px;
  color: var(--gold);
  background: rgba(212, 165, 88, .05);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.meta-line:empty {
  display: none;
}

.section-actions .report-meta {
  align-self: center;
}

.status-footer {
  min-height: 32px;
  margin-top: 22px;
  border-top: 1px solid var(--hair);
  padding-top: 14px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 12px;
}

.status-footer strong {
  color: var(--ink);
  font-weight: 400;
}

.composer-dialog {
  width: min(1080px, calc(100% - 34px));
  max-height: min(880px, calc(100vh - 34px));
  border: 1px solid rgba(212, 165, 88, .72);
  padding: 0;
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.example-dialog {
  width: min(720px, calc(100% - 34px));
  max-height: min(760px, calc(100vh - 34px));
  border: 1px solid rgba(212, 165, 88, .72);
  padding: 0;
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.composer-dialog::backdrop {
  background: rgba(5, 8, 12, .72);
  border: 1px solid var(--hair);
}

.example-dialog::backdrop {
  background: rgba(5, 8, 12, .72);
}

.composer-modal {
  display: grid;
  grid-template-rows: auto auto minmax(320px, 1fr) auto;
  max-height: min(880px, calc(100vh - 34px));
}

.example-modal {
  display: grid;
  max-height: min(760px, calc(100vh - 34px));
}

.composer-modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--hair);
}

.composer-modal-head h2 {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0;
}

.icon-button {
  width: 34px;
  height: 34px;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
}

.composer-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--hair);
  padding: 0 18px;
  background: var(--surface);
}

.composer-tabs button {
  position: relative;
  flex: 0 0 auto;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 14px 12px 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
}

.composer-tabs button.active {
  border-bottom-color: var(--gold);
  color: var(--gold);
}

.composer-tab-panel {
  overflow: auto;
  padding: 22px 24px 24px;
}

.readonly-banner,
.validation-banner,
.priority-banner {
  display: grid;
  gap: 5px;
  margin: 0 0 16px;
  border: 1px solid rgba(214, 90, 90, .5);
  padding: 10px 12px;
  color: var(--red);
  background: rgba(214, 90, 90, .06);
  font-size: 12px;
  line-height: 1.45;
}

.priority-banner {
  border-color: rgba(212, 165, 88, .5);
  color: var(--muted);
  background: rgba(212, 165, 88, .05);
}

.priority-banner code {
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 11px;
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--hair);
  padding: 14px 18px;
  background: var(--surface);
}

.composer-footer-actions {
  display: flex;
  gap: 10px;
}

.strategy-key-chip {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.strategy-key-chip code {
  max-width: min(520px, 48vw);
  overflow: hidden;
  color: var(--gold);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-row {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  border: 0;
  padding: 0;
}

.form-label,
.form-row legend,
.param-label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.form-section {
  display: grid;
  gap: 14px;
  margin: 0 0 18px;
  border: 1px solid var(--hair);
  padding: 14px;
  background: rgba(15, 20, 25, .3);
}

.form-section h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
}

.subsection {
  margin-top: 12px;
}

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

.radio-row .radio-grid:first-of-type {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.radio-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 8px;
  min-height: 64px;
  border: 1px solid var(--hair);
  padding: 10px;
  background: rgba(15, 20, 25, .55);
  cursor: pointer;
}

.radio-card input {
  width: auto;
  min-height: 0;
  margin: 3px 0 0;
  padding: 0;
}

.radio-title {
  color: var(--ink);
  font-weight: 600;
}

.radio-caption {
  grid-column: 2;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 11px;
}

.indicator-picker {
  display: grid;
  grid-template-columns: minmax(180px, 320px) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 18px;
}

.indicator-list {
  display: grid;
  gap: 14px;
}

.indicator-row {
  border: 1px solid var(--hair);
  background: rgba(15, 20, 25, .42);
}

.indicator-row-head {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  border-bottom: 1px solid var(--hair);
  padding: 14px;
}

.node-chip {
  align-self: center;
  border: 1px solid var(--hair);
  padding: 7px 9px;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 11px;
}

.param-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

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

.param-field {
  display: grid;
  gap: 7px;
}

.array-input,
.value-ref {
  display: grid;
  gap: 8px;
  border: 1px solid transparent;
}

.array-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}

.value-ref {
  grid-template-columns: auto auto 1fr;
  align-items: center;
}

.value-ref {
  grid-template-columns: auto auto auto 1fr;
}

.inline-picker {
  display: grid;
  grid-template-columns: minmax(180px, 320px) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.condition-tree,
.condition-children,
.repeat-list,
.clause-list {
  display: grid;
  gap: 12px;
}

.condition-node {
  display: grid;
  gap: 10px;
  border: 1px solid var(--hair);
  padding: 12px;
  background: rgba(15, 20, 25, .42);
}

.condition-node.invalid {
  border-color: var(--red);
}

.condition-head,
.clause-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--hair);
  padding-bottom: 9px;
}

.condition-head strong,
.clause-head strong {
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
}

.condition-picker {
  margin: 0;
}

.condition-ref-field {
  grid-column: 1 / -1;
}

.clause-row,
.tier-row,
.gate-row {
  display: grid;
  gap: 12px;
  border: 1px solid var(--hair);
  padding: 12px;
  background: rgba(15, 20, 25, .38);
}

.gate-row {
  grid-template-columns: minmax(120px, 1fr) 100px minmax(180px, 1.4fr) 120px auto;
  align-items: end;
}

.drag-handle {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: grab;
}

.repeat-row,
.time-window-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.mini-field {
  display: grid;
  gap: 6px;
}

.check-row {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.check-row input {
  width: auto;
  min-height: 0;
}

.example-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  padding: 18px;
}

.example-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--hair);
  padding: 12px;
  background: rgba(15, 20, 25, .42);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.example-row:hover,
.example-row:focus-visible {
  border-color: rgba(212, 165, 88, .72);
  outline: none;
}

.example-names,
.example-badges {
  display: grid;
  gap: 4px;
}

.example-names span {
  color: var(--muted);
  font-size: 12px;
}

.example-badges {
  justify-items: end;
}

.badge {
  border: 1px solid var(--hair);
  padding: 4px 7px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.badge.editable,
.badge.pass {
  border-color: rgba(63, 168, 106, .55);
  color: var(--green);
  background: rgba(63, 168, 106, .06);
}

.month-grid {
  display: grid;
  gap: 8px;
}

.month-row {
  display: grid;
  grid-template-columns: 52px repeat(12, minmax(42px, 1fr));
  gap: 4px;
  align-items: center;
}

.month-cell {
  min-height: 32px;
  border: 1px solid var(--hair);
  background: rgba(15, 20, 25, .42);
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
}

.month-cell.year-label {
  cursor: default;
  color: var(--gold);
  background: transparent;
}

.month-cell.selected {
  border-color: rgba(212, 165, 88, .72);
  color: var(--gold);
  background: rgba(212, 165, 88, .08);
}

.month-cell:disabled {
  cursor: not-allowed;
  opacity: .32;
}

.filter-counter {
  margin: 0 0 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.report-stack {
  display: grid;
  gap: 18px;
}

.report-section {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--hair);
  padding-top: 16px;
}

.report-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.report-section h3 {
  margin: 0;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.1;
}

.report-note,
.report-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.report-kv-grid,
.risk-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.kv,
.risk-card {
  display: grid;
  gap: 5px;
  border: 1px solid var(--hair);
  padding: 10px;
  background: rgba(15, 20, 25, .34);
}

.kv span,
.risk-card span {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
}

.kv strong,
.risk-card strong {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.table-scroll {
  overflow: auto;
  border: 1px solid var(--hair);
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.report-table th,
.report-table td {
  border-bottom: 1px solid var(--hair);
  padding: 8px 9px;
  text-align: right;
  white-space: nowrap;
}

.report-table th:first-child,
.report-table td:first-child {
  text-align: left;
}

.sticky-table th:first-child,
.sticky-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface-2);
}

.chart-wrap {
  display: grid;
  gap: 8px;
}

.chart {
  min-height: 220px;
  border: 1px solid var(--hair);
  background: rgba(15, 20, 25, .34);
}

.fallback-chart {
  display: block;
  width: 100%;
  height: 220px;
  border: 1px solid var(--hair);
  background: rgba(15, 20, 25, .34);
}

.heatmap {
  display: grid;
  gap: 5px;
  overflow: auto;
}

.heatmap-row {
  display: grid;
  grid-template-columns: 52px repeat(12, minmax(58px, 1fr));
  gap: 4px;
}

.heatmap-year,
.heatmap-cell {
  min-height: 34px;
  border: 1px solid var(--hair);
  padding: 8px 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.heatmap-year {
  color: var(--gold);
  text-align: left;
}

.heatmap-cell.pos {
  background: rgba(63, 168, 106, var(--heat-alpha));
}

.heatmap-cell.neg {
  background: rgba(214, 90, 90, var(--heat-alpha));
}

.verification-panel {
  display: grid;
  gap: 12px;
}

.verification-checks {
  display: grid;
  gap: 8px;
}

.verify-item {
  display: grid;
  grid-template-columns: auto minmax(140px, .35fr) 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--hair);
  padding: 9px;
  color: var(--muted);
  font-size: 12px;
}

.verify-item.pass {
  border-left: 2px solid var(--green);
}

.verify-item.fail {
  border-left: 2px solid var(--red);
}

.verify-badge {
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 10px;
}

.filter-warning {
  border: 1px solid rgba(212, 165, 88, .6);
  padding: 10px 12px;
  color: var(--gold);
  background: rgba(212, 165, 88, .06);
  font-size: 12px;
  line-height: 1.5;
}

.json-dump {
  max-height: 360px;
  overflow: auto;
  margin: 0;
  border: 1px solid var(--hair);
  padding: 14px;
  background: #0b1016;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.55;
}

.json-key {
  color: var(--gold);
}

.json-string {
  color: var(--green);
}

.json-number {
  color: var(--blue-info);
}

.json-bool,
.json-null {
  color: var(--red);
}

.inline-radio {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.inline-radio input {
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.scaffold h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 30px;
}

.scaffold-list {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 920px) {
  .shell {
    width: min(100% - 28px, 1220px);
    padding-top: 28px;
  }

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

  .locale-toggle {
    position: absolute;
    top: 18px;
    right: 0;
  }

  .display-title {
    padding-right: 110px;
  }

  .panel,
  .panel-wide {
    grid-column: span 12;
  }

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

  .radio-grid,
  .radio-row .radio-grid:first-of-type,
  .param-grid,
  .indicator-row-head,
  .compact-grid,
  .gate-row,
  .repeat-row,
  .time-window-row,
  .inline-picker,
  .example-row,
  .report-kv-grid,
  .risk-grid,
  .verify-item {
    grid-template-columns: 1fr;
  }

  .month-row,
  .heatmap-row {
    grid-template-columns: 52px repeat(6, minmax(42px, 1fr));
  }

  .composer-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .strategy-key-chip code {
    max-width: 100%;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 22px, 1220px);
    padding-top: 18px;
  }

  .kicker {
    max-width: calc(100% - 104px);
  }

  .display-title {
    padding-right: 0;
    font-size: 56px;
  }

  .deck {
    font-size: 15px;
  }

  .section-head {
    display: block;
  }

  .section-head h2 {
    font-size: 25px;
  }

  .meta-line {
    display: inline-block;
    margin-top: 12px;
    white-space: normal;
  }

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

  .composer-dialog {
    width: calc(100% - 18px);
  }

  .composer-tab-panel {
    padding: 18px 14px;
  }

  .composer-modal-head {
    padding: 18px 14px;
  }

  .indicator-picker {
    grid-template-columns: 1fr;
  }

  .value-ref {
    grid-template-columns: 1fr;
  }
}
