:root {
  --bg: #07080a;
  --bg-2: #0c0e12;
  --panel: #101318;
  --panel-2: #14181f;
  --line: #1c232c;
  --line-2: #2a3340;
  --text: #dce3ea;
  --muted: #7d8793;
  --faint: #4e5864;
  --amber: #e6b84d;
  --amber-dim: rgba(230, 184, 77, 0.16);
  --cyan: #7ee0d0;
  --up: #3ecf8e;
  --down: #ef6b73;
  --shadow: 0 0 0 1px var(--line);
  --font: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 6px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.45;
}

body {
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 28%),
    radial-gradient(1200px 500px at 80% -10%, rgba(230, 184, 77, 0.06), transparent 50%);
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  z-index: 8;
}

a {
  color: var(--amber);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
select {
  font-family: inherit;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(12, 14, 18, 0.92);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 4;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  width: max-content;
}

a.brand,
a.brand:hover {
  color: inherit;
  text-decoration: none;
}

a.brand:hover .brand-mark {
  background: rgba(230, 184, 77, 0.28);
}

.app.is-home a.brand .brand-mark {
  background: rgba(230, 184, 77, 0.28);
}

.brand-mark {
  width: 42px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--amber);
  color: var(--amber);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
  background: var(--amber-dim);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 12px;
  letter-spacing: 0.16em;
  font-weight: 600;
  text-transform: uppercase;
}

.top-cats {
  display: flex;
  gap: 6px;
}

.top-cats a {
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  padding: 6px 10px;
  letter-spacing: 0.12em;
  font-size: 11px;
}

.top-cats a:hover,
.top-cats a.active {
  color: var(--text);
  border-color: var(--line-2);
  background: var(--panel);
  text-decoration: none;
}

.top-cats a.active {
  color: var(--amber);
  border-color: var(--amber);
  background: var(--amber-dim);
}

.clock-block {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.clock-tz-wrap {
  display: inline-flex;
  align-items: center;
}

.clock-tz-wrap select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--panel);
  color: var(--cyan);
  border: 1px solid var(--line-2);
  border-radius: 3px;
  padding: 3px 22px 3px 8px;
  font-size: 10px;
  letter-spacing: 0.1em;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%237ee0d0' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
}

.clock-tz-wrap select:hover,
.clock-tz-wrap select:focus {
  border-color: var(--cyan);
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 8px var(--up);
}

.shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 0;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: var(--bg-2);
  padding: 18px 12px 24px;
  overflow: visible;
  max-height: none;
}

.prompt {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 11px;
}

.prompt span {
  color: var(--amber);
}

.side-group {
  margin-bottom: 12px;
}

.side-group h2 {
  margin: 0 0 8px;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--faint);
  font-weight: 600;
}

.side-group a,
.side-empty {
  display: block;
  padding: 6px 8px;
  color: var(--muted);
  text-decoration: none;
  border-left: 2px solid transparent;
}

.side-group a:hover,
.side-group a.active {
  color: var(--text);
  background: var(--panel);
  border-left-color: var(--amber);
  text-decoration: none;
}

.side-empty {
  color: var(--faint);
  font-style: italic;
}

.side-asset {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 8px;
  font-size: 12px;
}

.side-asset span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.side-asset strong {
  font-weight: 600;
  letter-spacing: 0.04em;
}

.side-asset small {
  color: var(--faint);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.side-asset.active strong {
  color: var(--amber);
}

.main {
  padding: 18px 22px 32px;
  min-width: 0;
}

.crumb {
  color: var(--muted);
  margin-bottom: 16px;
  font-size: 12px;
}

.crumb .cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: var(--amber);
  margin-left: 4px;
  vertical-align: -1px;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.app.is-home .shell {
  grid-template-columns: 1fr;
}

.app.is-home .sidebar {
  display: none;
}

.app.is-home .main {
  padding: 56px 32px 80px;
}

.home-page {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.home-hero {
  padding: 8px 0 44px;
  border-bottom: 1px solid var(--line);
}

.home-hero h1 {
  display: inline-block;
  margin: 0 0 52px;
  padding: 12px 18px;
  border: 1px solid var(--amber);
  background: var(--amber-dim);
  color: var(--amber);
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.home-sub {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.home-block {
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}

.home-index {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.home-block h2 {
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: 0.01em;
  font-weight: 600;
}

.home-block-body p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.7;
}

.home-more {
  color: var(--amber);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.home-more:hover {
  text-decoration: underline;
}

.home-band {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 0;
  padding: 32px 0 4px;
  color: var(--text);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel h1,
.panel h2 {
  margin: 0 0 8px;
  font-size: 14px;
  letter-spacing: 0.08em;
  font-weight: 600;
}

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

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

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

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

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

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  text-align: left;
  color: inherit;
  width: 100%;
}

.card:hover,
.card.active {
  border-color: var(--amber);
  background: var(--panel-2);
}

.card .sym {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.card .px {
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin: 6px 0 2px;
}

.card .chg {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.spark {
  display: block;
  width: 100%;
  height: 36px;
  margin-top: 8px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.toolbar-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.ranges {
  display: flex;
  gap: 4px;
}

.ranges button {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 4px 8px;
  cursor: pointer;
}

.ranges button.active,
.ranges button:hover {
  color: var(--amber);
  border-color: var(--amber);
}

.chart-wrap {
  position: relative;
  height: 280px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.chart-wrap.md {
  height: 220px;
}

.chart-wrap.lg {
  height: 340px;
}

.chart-wrap.gauge {
  height: 132px;
}

.chart-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.chart-block h2 {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 500;
}

.chart-block .toolbar {
  margin-bottom: 8px;
}

.chart-block .toolbar h2 {
  margin: 0;
}

.quant-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.kpi {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 10px 12px;
  border-radius: var(--radius);
}

.kpi .label {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}

.kpi .val {
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
}

.insight {
  background: var(--bg);
  border: 1px solid var(--line);
  border-left: 2px solid var(--amber);
  padding: 10px 12px;
  color: var(--text);
  font-size: 12px;
  margin: 0 0 14px;
}

.legend-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 6px 0 8px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.legend-inline i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  vertical-align: middle;
}

.two-tables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
}

.chart-tip {
  position: absolute;
  pointer-events: none;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  padding: 6px 8px;
  font-size: 11px;
  display: none;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
}

.stats-table th,
.stats-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

.stats-table th {
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.pct-table td,
.pct-table th {
  text-align: right;
  white-space: nowrap;
  font-size: 11px;
}

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

.range-bar {
  height: 6px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 6px;
}

.range-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--down), var(--amber), var(--up));
  position: relative;
}

.hl {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.tools-grid,
.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.tool-card,
.slot {
  border: 1px dashed var(--line-2);
  background: var(--panel);
  padding: 16px;
  min-height: 120px;
}

.tool-card.ready {
  border-style: solid;
}

.tool-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 4px 0 8px;
  align-items: end;
}

.form-kicker {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--faint);
  text-transform: uppercase;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field > span {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}

.pf-filters .field > span {
  color: var(--text);
}

.field > span strong {
  color: var(--text);
  font-weight: 600;
}

.field input[type="number"],
.field input[type="text"],
.field select {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: 3px;
  padding: 7px 8px;
  font-family: inherit;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.field input[type="number"]:focus,
.field input[type="text"]:focus,
.field select:focus {
  outline: none;
  border-color: var(--amber);
}

.field input[type="range"] {
  width: 100%;
  accent-color: var(--amber);
  margin: 6px 0 4px;
}

.field-split {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
}

.field-span-2 {
  grid-column: span 2;
}

.field-span-all {
  grid-column: 1 / -1;
}

.is-hidden {
  display: none !important;
}

.field-actions {
  justify-content: space-between;
}

.field-actions .btn {
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
}

.field-actions .btn:hover {
  text-decoration: none;
}

.risk-pill {
  display: inline-block;
  border: 1px solid var(--line-2);
  padding: 3px 8px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.risk-pill.safe {
  color: var(--up);
  border-color: var(--up);
  background: rgba(62, 207, 142, 0.1);
}

.risk-pill.warn {
  color: var(--amber);
  border-color: var(--amber);
  background: var(--amber-dim);
}

.risk-pill.danger {
  color: var(--down);
  border-color: var(--down);
  background: rgba(239, 107, 115, 0.12);
}

.kpi.is-selected {
  border-color: var(--amber);
}

.kpi.is-selected .label {
  color: var(--amber);
}

.kpi .val .risk-pill {
  font-size: 11px;
  font-weight: 600;
}

.calc-alert {
  background: rgba(239, 107, 115, 0.08);
  border: 1px solid var(--down);
  border-left: 2px solid var(--down);
  padding: 10px 12px;
  color: var(--text);
  font-size: 12px;
  margin: 0 0 14px;
}

.calc-alert.warn {
  background: var(--amber-dim);
  border-color: var(--amber);
  border-left-color: var(--amber);
}

.day-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.day-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
}

.icon-btn {
  width: 34px;
  height: 34px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line-2);
  border-radius: 3px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.icon-btn:hover {
  color: var(--down);
  border-color: var(--down);
}

.ghost-btn {
  align-self: start;
  background: transparent;
  color: var(--muted);
  border: 1px dashed var(--line-2);
  padding: 7px 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ghost-btn:hover {
  color: var(--amber);
  border-color: var(--amber);
}

.badge {
  display: inline-block;
  border: 1px solid var(--line-2);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
  padding: 2px 6px;
}

.compare {
  width: 100%;
  border-collapse: collapse;
  overflow: auto;
}

.compare th,
.compare td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.compare th {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.btn {
  display: inline-block;
  border: 1px solid var(--amber);
  color: var(--amber);
  padding: 5px 10px;
  background: var(--amber-dim);
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.06em;
  cursor: pointer;
}

a.btn:hover {
  text-decoration: none;
}

.btn.disabled {
  border-color: var(--line-2);
  color: var(--faint);
  background: transparent;
  pointer-events: none;
}

.pf-phase-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  flex-shrink: 0;
}

.pf-phase-kicker {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.pf-phase-bar .ranges button {
  min-width: 0;
  padding: 6px 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
}

.pf-chips {
  flex-wrap: wrap;
}

.tool-form.pf-filters {
  align-items: start;
}

.pf-filter-foot {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  margin-top: 4px;
}

.pf-filter-foot .btn {
  width: auto;
  flex: 0 0 auto;
  align-self: center;
}

.pf-size-select {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pf-size-select span {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.pf-size-select select {
  min-width: 92px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}

.pf-size-select select:focus {
  outline: none;
  border-color: var(--amber);
}

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

.pf-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.pf-card h2 {
  margin: 4px 0 0;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.pf-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.pf-card .sym {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.pf-score {
  text-align: right;
}

.pf-score small {
  display: block;
  margin-top: 4px;
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pf-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.pf-card .pf-metrics + .muted {
  margin-top: 2px;
}

.pf-card-cta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.pf-rules td:nth-child(5) {
  white-space: normal;
  min-width: 180px;
}

.pf-heat th,
.pf-heat td {
  text-align: center;
}

.pf-heat th:first-child,
.pf-heat td:first-child,
.pf-heat th:last-child,
.pf-heat td:last-child {
  text-align: left;
}

.pf-heat-cell {
  font-variant-numeric: tabular-nums;
  white-space: normal;
}

.pf-heat-cell small {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  letter-spacing: 0.04em;
  opacity: 0.9;
  white-space: normal;
  line-height: 1.25;
}

.pf-heat-empty {
  color: var(--faint);
}

.kpi .faint {
  margin-top: 4px;
  font-size: 10px;
}

.disclaimer {
  margin-top: 18px;
  color: var(--muted);
  font-size: 11px;
  max-width: 72ch;
}

.legal-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 16px 22px 20px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.55;
}

.legal-footer h2 {
  margin: 0 0 8px;
  font-size: 10px;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--muted);
  text-transform: none;
}

.legal-footer ul {
  margin: 0;
  padding-left: 16px;
  list-style: disc;
  width: 100%;
}

.legal-footer li {
  margin: 0 0 6px;
}

.legal-footer li:last-child {
  margin-bottom: 0;
}

.legal-footer strong {
  color: var(--muted);
  font-weight: 600;
}

.legal-copy {
  margin: 12px 0 0;
  color: var(--faint);
  font-size: 10px;
}

.empty {
  padding: 28px 8px;
  color: var(--muted);
}

.empty code {
  color: var(--cyan);
}

.statusbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  padding: 8px 18px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.tape {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.err {
  color: var(--down);
}

@media (max-width: 960px) {
  .grid-4,
  .quant-kpis,
  .chart-grid,
  .two-tables,
  .tool-form,
  .pf-cards {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 760px) {
  .pf-phase-bar {
    flex-wrap: wrap;
  }
  .pf-phase-bar .ranges button {
    min-width: 0;
    flex: 1;
  }

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

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 14px;
    max-height: none;
    overflow: visible;
  }

  #side-nav {
    display: block;
    overflow: visible;
  }

  .side-group {
    margin: 0 0 12px;
    min-width: 0;
  }

  .statusbar {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .quant-kpis,
  .chart-grid,
  .two-tables,
  .grid-4,
  .tool-form,
  .pf-cards {
    grid-template-columns: 1fr;
  }

  .field-span-2,
  .pf-filters .field {
    grid-column: span 1;
  }

  .top-cats a {
    padding: 6px 7px;
    letter-spacing: 0.06em;
    font-size: 10px;
  }

  .app.is-home .main {
    padding: 32px 20px 56px;
  }

  .home-hero h1 {
    font-size: 20px;
  }

  .home-block h2 {
    font-size: 18px;
  }
}
