:root {
  --bg0: #0f1412;
  --bg1: #17201c;
  --bg2: #1f2b25;
  --ink: #e8efe9;
  --muted: #9aada2;
  --line: #2c3b33;
  --accent: #3dba7e;
  --warn: #e0a35a;
  --sell: #e06b6b;
  --hold: #8aa0b5;
  --font-display: "Segoe UI", "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "Cascadia Code", "Consolas", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-display);
  background:
    radial-gradient(1200px 600px at 10% -10%, #1d3a2c 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #243044 0%, transparent 50%),
    linear-gradient(180deg, var(--bg0), #0b100e 70%);
}

.shell {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 1rem;
}

.top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.brand-block {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.brand {
  margin: 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 650;
}

/* Paper trades and the queue sit below the results. */
.shell-lower {
  display: grid;
  gap: 1rem;
  padding-top: 0;
  padding-bottom: 3rem;
}

.results-empty {
  margin: 1rem 0 0;
  padding: 1.4rem 1rem;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}

.health {
  margin: 0;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.health.ok {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}

.health.bad {
  color: var(--sell);
}

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

.super-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.super-head h2 {
  margin: 0 0 0.3rem;
}

.super-lede {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.85rem;
  max-width: 44rem;
}

.super-styles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.5rem;
}

.style-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  cursor: pointer;
  color: var(--ink);
  font-size: 0.85rem;
}

.style-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.style-card.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.style-card:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.style-card .tfs-line {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.78rem;
}

.style-card .desc {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.super-custom {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.super-custom select {
  background: var(--bg2);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  font: inherit;
}

.row-actions {
  display: flex;
  gap: 0.3rem;
}

.row-actions button,
.pager button {
  font-size: 0.72rem;
  padding: 0.25rem 0.55rem;
}

.pill {
  display: inline-block;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid var(--line);
}

.pill.BUY,
.pill.on {
  color: var(--accent);
}

.pill.SELL,
.pill.stopped {
  color: var(--sell);
}

.pill.HOLD,
.pill.paused {
  color: var(--hold);
}

.pill.auto {
  color: var(--warn);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.pager button:disabled {
  opacity: 0.4;
  cursor: default;
}

.empty-row {
  color: var(--muted);
  font-size: 0.82rem;
}

.paper-box {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  margin-top: 0.9rem;
  padding: 0.7rem 0.85rem;
  border: 1px dashed var(--line);
  border-radius: 10px;
  font-size: 0.85rem;
}

.paper-box select {
  background: var(--bg2);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  font: inherit;
}

.paper-box .paper-msg {
  color: var(--muted);
}

.options-box {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
}

.options-box .muted {
  color: var(--muted);
  font-size: 0.8rem;
}

.options-notes {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.pill.pending {
  color: var(--hold);
}

.pill.open {
  color: var(--warn);
}

.pill.won {
  color: var(--accent);
}

.pill.lost {
  color: var(--sell);
}

.past-note {
  margin: 0;
  padding: 0.6rem 0.9rem;
  border: 1px solid color-mix(in srgb, var(--warn) 50%, var(--line));
  border-radius: 10px;
  color: var(--warn);
  font-size: 0.85rem;
}

.auto-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.switch {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  color: var(--ink);
  font-size: 0.85rem;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.switch-track {
  position: relative;
  width: 2.3rem;
  height: 1.3rem;
  border-radius: 999px;
  background: var(--bg2);
  border: 1px solid var(--line);
  transition: background 0.15s;
  flex: 0 0 auto;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(1.3rem - 6px);
  height: calc(1.3rem - 6px);
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.15s, background 0.15s;
}

.switch input:checked + .switch-track {
  background: color-mix(in srgb, var(--accent) 35%, var(--bg2));
  border-color: var(--accent);
}

.switch input:checked + .switch-track::after {
  transform: translateX(1rem);
  background: var(--accent);
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.auto-status {
  color: var(--muted);
  font-size: 0.8rem;
}

.auto-status.changed {
  color: var(--warn);
  font-weight: 600;
}

.auto-status.error {
  color: var(--sell);
}

.screens {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0.8rem 0;
}

.screen {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  font-size: 0.82rem;
}

.screen.pass {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
}

.screen.fail {
  border-color: color-mix(in srgb, var(--sell) 45%, var(--line));
}

.screen .role {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.screen .verdict {
  font-weight: 650;
  margin: 0.2rem 0;
}

.screen .nouls {
  color: var(--muted);
  font-size: 0.76rem;
}

.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin-top: 0.4rem;
}

.matrix th,
.matrix td {
  text-align: left;
  padding: 0.35rem 0.45rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.matrix th {
  color: var(--muted);
  font-weight: 600;
}

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

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

.bias-mixed {
  color: var(--hold);
}

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

.tz-label {
  color: var(--muted);
  font-size: 0.75rem;
}

.admin-link {
  color: var(--muted);
  font-size: 0.8rem;
  text-decoration: none;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.admin-link:hover {
  color: var(--ink);
}

.review {
  color: var(--accent);
}

.panel {
  background: color-mix(in srgb, var(--bg1) 88%, transparent);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  backdrop-filter: blur(6px);
}

#form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem 1rem;
  align-items: start;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}

input[type="text"],
input[type="number"],
input:not([type]) {
  background: var(--bg2);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  font: inherit;
}

.tfs {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}

.tfs legend {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  width: 100%;
}

.check {
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink);
}

button {
  background: var(--accent);
  color: #062014;
  border: 0;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  opacity: 0.55;
  cursor: wait;
}

button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 600;
}

.mode-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.mode-label {
  font-size: 0.8rem;
  color: var(--muted);
}

.mode-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.mode-btn,
.chart-style-btn {
  background: transparent;
  color: var(--muted);
  border: 0;
  border-radius: 0;
  padding: 0.45rem 0.95rem;
  font-weight: 600;
}

.chart-style-btn {
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
}

.chart-style-btn:disabled {
  cursor: not-allowed;
}

.mode-btn.active,
.chart-style-btn.active {
  background: var(--accent);
  color: #062014;
}

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

.watchlist-panel {
  margin-bottom: 1rem;
}

.watch-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.watch-head h2 {
  margin: 0;
  font-size: 1rem;
}

.watch-form {
  display: flex;
  gap: 0.5rem;
}

.watch-form input {
  min-width: 9rem;
}

.watch-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.watch-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.55rem 0.35rem 0.7rem;
  font-weight: 600;
  font-size: 0.85rem;
}

.chip:hover {
  border-color: var(--accent);
}

.chip-x {
  display: inline-flex;
  width: 1.1rem;
  height: 1.1rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
}

.chip-x:hover {
  color: var(--sell);
  background: rgba(224, 107, 107, 0.15);
}

.form-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  grid-column: 1 / -1;
}

.form-actions button {
  min-width: 12rem;
  padding: 0.75rem 1.4rem;
  font-size: 1rem;
}

.field-hint {
  min-height: 1em;
  font-size: 0.75rem;
  color: var(--muted);
}

.method {
  grid-column: span 2;
  border: 0;
  margin: 0;
  padding: 0;
  align-self: start;
}

.method legend {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  padding: 0;
}

.method-btn {
  flex-direction: row;
  align-items: center;
  padding: 0.45rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.method-btn input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.method-btn:has(input:checked) {
  background: var(--accent);
  color: #062014;
}

.method-btn:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.method-pane {
  grid-column: 1 / -1;
}

.tf-chip {
  flex-direction: row;
  align-items: center;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.tf-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tf-chip:has(input:checked) {
  color: var(--ink);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.tf-chip:has(input:checked)::before {
  content: "✓";
  color: var(--accent);
  margin-right: 0.3rem;
}

.tf-chip:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.symbol-row select,
.symbol-row input,
.chart-switch select {
  background: var(--bg2);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  font: inherit;
}

.chart-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
}

.chart-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
  flex-direction: row;
}

.indicators {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
}

.indicators summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.indicators[open] summary {
  margin-bottom: 0.5rem;
}

.ind-count {
  color: var(--muted);
  font-weight: 400;
  margin-left: 0.35rem;
}

.ind-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.45rem;
}

.symbol-field {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.symbol-field > label {
  font-size: 0.8rem;
  color: var(--muted);
}

.symbol-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  flex-wrap: wrap;
}

.symbol-row select,
.symbol-row input {
  flex: 1 1 14rem;
  min-width: 0;
}

.symbol-row button {
  flex: 0 0 auto;
}

.indicators legend {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.linkish {
  background: transparent;
  color: var(--accent);
  border: 0;
  padding: 0;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.indicator-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.45rem;
}

.ind-chip {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  color: var(--ink);
  font-size: 0.8rem;
}

.ind-chip.active {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
}

.ind-chip .check {
  font-weight: 600;
}

.ind-chip .ind-desc {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.3;
}

.ind-chip .ind-tag {
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.status {
  margin: 0.9rem 0 0;
  color: var(--warn);
}

[hidden] {
  display: none !important;
}

/* Results keep the column width; the chart scrolls sideways when narrower. */
.results {
  display: grid;
  gap: 1rem;
  width: calc(100% - 2rem);
  margin: 0.2rem auto 4rem;
}

/* Let wide tables scroll inside their panel instead of stretching the page. */
.results > * {
  min-width: 0;
  width: min(1080px, 100%);
  justify-self: center;
}

.chart-trades {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.6rem;
}

.trade-tag {
  padding: 0.45rem 0.75rem;
  border: 1px solid #f5c542;
  border-left-width: 4px;
  border-radius: 8px;
  background: rgba(245, 197, 66, 0.1);
  font-size: 0.85rem;
  color: var(--ink);
}

.trade-tag strong {
  color: #f5c542;
  margin-right: 0.35rem;
}

.chart-toggles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.4rem;
  margin-bottom: 0.6rem;
}

.toggles-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-right: 0.2rem;
}

.tool-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: line-through;
  opacity: 0.7;
}

.tool-toggle.on {
  color: var(--ink);
  text-decoration: none;
  opacity: 1;
  background: var(--bg2);
}

.tool-toggle .swatch {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 3px;
}

.chart-toggles .linkish {
  margin-left: 0.3rem;
}

/* Below this width the chart scrolls sideways instead of squashing. */
.chart-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.chart-box {
  position: relative;
  min-width: 720px;
  height: clamp(320px, 62vh, 680px);
}

.rec h2 {
  margin: 0 0 0.4rem;
}

.action {
  display: inline-block;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-right: 0.6rem;
}

.action.BUY {
  color: var(--accent);
}
.action.SELL {
  color: var(--sell);
}
.action.HOLD {
  color: var(--hold);
}

.meta {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.why {
  margin: 0.7rem 0 0.8rem;
  padding: 0.75rem 0.9rem;
  border-left: 3px solid var(--hold);
  border-radius: 0 10px 10px 0;
  background: color-mix(in srgb, var(--hold) 8%, transparent);
}

.trade-decision {
  margin-top: 0.9rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
}

.trade-decision > h3 {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.why-BUY {
  border-left-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.why-SELL {
  border-left-color: var(--sell);
  background: color-mix(in srgb, var(--sell) 8%, transparent);
}

.why h3 {
  margin: 0 0 0.3rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.why p {
  margin: 0;
  line-height: 1.45;
}

.why .why-how {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.why-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.why-check {
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--muted);
}

.why-check strong {
  color: var(--ink);
}

.why-check.pass strong {
  color: var(--accent);
}

.why-check.fail {
  border-color: color-mix(in srgb, var(--sell) 55%, var(--line));
}

.why-check.fail strong {
  color: var(--sell);
}

.why-check.unsure strong {
  color: var(--warn);
}

.rec-key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.8rem 0 0.4rem;
}

.rec-key div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 7.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg2);
}

.rec-key span {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rec-key strong {
  font-size: 1rem;
}

.rec-details {
  margin-top: 0.9rem;
  border-top: 1px solid var(--line);
  padding-top: 0.6rem;
}

.rec-details summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.rec-details[open] summary {
  margin-bottom: 0.4rem;
}

.codes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.codes span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.25rem 0.45rem;
  border-radius: 6px;
  background: var(--bg2);
  border: 1px solid var(--line);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

th,
td {
  text-align: left;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.disclaimer {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
  margin: 0.2rem 0 0;
}

.bias {
  margin-left: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.chart-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.chart-head h2 {
  margin: 0;
}

.chart-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.entry-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.85rem;
}

.entry-lists h3 {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.level-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.45;
}

.level-list code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
}

@media (max-width: 700px) {
  .entry-lists {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  #form {
    grid-template-columns: 1fr 1fr;
  }

  .method {
    grid-column: 1 / -1;
  }
}

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

/* Phones: long tables become one card per row, each cell labelled with its
   column (labels set by tables.js). */
@media (max-width: 700px) {
  table.stack,
  table.stack tbody,
  table.stack tr,
  table.stack td {
    display: block;
    width: 100%;
  }

  table.stack thead {
    display: none;
  }

  table.stack tr {
    margin-bottom: 0.55rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg2);
  }

  table.stack td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.32rem 0;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
    text-align: right;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  table.stack td:last-child {
    border-bottom: 0;
  }

  table.stack td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    max-width: 45%;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    text-align: left;
  }

  /* Action cells and full-width messages have no label. */
  table.stack td[data-label=""]::before,
  table.stack td[data-full]::before {
    content: none;
  }

  table.stack td[data-label=""] {
    justify-content: flex-end;
  }

  table.stack td[data-full] {
    display: block;
    text-align: left;
  }

  table.stack .row-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

.install-btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}
