/* Power Station Runtime: overrides on top of core.css. */

:root {
  --accent: #0f766e;
  --accent-contrast: #ffffff;
  --accent-soft: #e6f4f2;
  --warn-bg: #fff7e6;
  --bad-bg: #fdecea;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    --accent: #2dd4bf; --accent-contrast: #04211e; --accent-soft: #0b2a27; --warn-bg: #2b2210; --bad-bg: #2e1512;
  }
}
:root[data-theme="dark"] {
  --accent: #2dd4bf; --accent-contrast: #04211e; --accent-soft: #0b2a27; --warn-bg: #2b2210; --bad-bg: #2e1512;
}

.hero { margin: .5rem 0 1.5rem; }
.hero h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin: 0 0 .5rem; }
.hero p { color: var(--muted); max-width: 44rem; margin: 0; }

.scenarios { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.scenarios span { color: var(--faint); font-size: .9rem; }
.chip {
  font: inherit; font-size: .9rem; cursor: pointer; padding: .35rem .8rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }

.calc { display: grid; gap: 1rem; }
@media (min-width: 900px) {
  .calc { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
  .results-card { position: sticky; top: 1rem; }
}
.calc h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.hint { color: var(--faint); font-size: .8rem; margin-top: .2rem; }

.loads { width: 100%; border-collapse: collapse; font-size: .9rem; }
.loads th { text-align: left; color: var(--faint); font-weight: 600; font-size: .8rem; padding: 0 .25rem .35rem; }
.loads td { padding: .2rem .25rem; }
.loads td:first-child { width: 42%; }
.loads input { padding: .4rem .5rem; }
.empty-row td { color: var(--faint); padding: .75rem .25rem; }
.remove { font: inherit; font-size: .8rem; background: none; border: 0; color: var(--muted); cursor: pointer; text-decoration: underline; padding: .3rem; }
@media (max-width: 560px) {
  .loads thead { display: none; }
  .loads tr { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .35rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }
  .loads td:first-child { grid-column: 1 / -1; width: auto; }
  .loads td:last-child { grid-column: 1 / -1; }
  .loads td[data-label]::before { content: attr(data-label); display: block; font-size: .75rem; color: var(--faint); }
}
.add { display: flex; gap: .5rem; margin-top: .75rem; }
.add select { flex: 1; }
.add button { white-space: nowrap; }

details.more { margin-top: 1rem; }
details.more summary { cursor: pointer; color: var(--muted); }

.headline { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.stat { background: var(--accent-soft); border-radius: var(--radius-sm); padding: .8rem; }
.stat-label { font-size: .8rem; color: var(--muted); }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.2; margin: .15rem 0; }
.stat-sub { font-size: .8rem; color: var(--faint); }
.basis { font-size: .85rem; color: var(--faint); }
.alert { border-radius: var(--radius-sm); padding: .6rem .75rem; font-size: .9rem; }
.alert.bad { background: var(--bad-bg); }
.alert.warn { background: var(--warn-bg); }
.advice { border-top: 1px solid var(--border); margin-top: 1rem; padding-top: 1rem; }
.advice h3 { font-size: 1rem; margin: 0 0 .4rem; }
.shop { margin-top: .25rem; }
.result-empty { color: var(--faint); }

.prose { max-width: 46rem; }
.prose table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-variant-numeric: tabular-nums; }
.prose th, .prose td { border-bottom: 1px solid var(--border); padding: .45rem .5rem; text-align: right; }
.prose th:first-child, .prose td:first-child { text-align: left; }
.prose .note { color: var(--faint); font-size: .9rem; }
.faq dt { font-weight: 600; margin-top: 1.25rem; }
.faq dd { margin: .35rem 0 0; color: var(--muted); }
