:root {
  --bg: #0f1218;
  --card: #171b24;
  --text: #e7eaf0;
  --muted: #9aa3b2;
  --accent: #5cc8ff;
  --good: #7cd992;
  --bad: #ff7b7b;
  --line: #2a3140;
  --input-bg: #101420;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1000px 600px at 20% 0%, #1a2040, var(--bg));
  color: var(--text);
  line-height: 1.5;
}

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

p.lead {
  color: var(--muted);
  margin: 0 0 1.5rem;
  max-width: 64ch;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
}
a:hover {
  border-bottom-color: var(--accent);
}

form.row-count {
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

form.row-count label {
  color: var(--muted);
  font-size: 0.95rem;
}

form.row-count select {
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem 1.15rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.9rem;
  color: var(--accent);
}

/* Recommended choice callout + row highlight */
.callout-pick {
  background: color-mix(in srgb, var(--accent) 12%, #1a1f2e 88%);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line) 55%);
  border-radius: 10px;
  padding: 0.9rem 1rem 1rem;
  margin: 0 0 1rem;
}
.callout-pick__headline {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.4rem;
}
.callout-pick__sub {
  color: #c8d0df;
  font-size: 0.9rem;
  margin: 0;
  max-width: 70ch;
}

tr.row-recommended > td,
tr.row-recommended-marginal > td {
  background: #1c2434;
  box-shadow: inset 3px 0 0 0 var(--accent);
}
tr.row-recommended-marginal > td {
  background: #182030;
  box-shadow: inset 3px 0 0 0 color-mix(in srgb, var(--accent) 60%, #555 40%);
}
.pick-pill {
  display: inline-block;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0a1018;
  background: var(--accent);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  margin-left: 0.35rem;
  font-weight: 600;
  vertical-align: 0.15em;
}
.pick-pill--subtle {
  color: #d6ecff;
  background: #2a3f55;
  border: 1px solid #3d5a78;
  font-size: 0.58rem;
  font-weight: 500;
}

.grid-head {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.35rem;
  padding: 0 0.1rem;
}

.tier-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.tier-row input {
  width: 100%;
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.45rem 0.5rem;
  font-size: 0.95rem;
}

.tier-row input::placeholder {
  color: #5a6478;
}

.fieldset-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin: 0.9rem 0 1.1rem;
  padding: 0.75rem 0;
  border: none;
  border-top: 1px solid var(--line);
}

.fieldset-inline legend {
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0 0.2rem 0.5rem 0;
  width: 100%;
}

.fieldset-inline label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text);
}

.fieldset-inline input[type="radio"] {
  accent-color: var(--accent);
}

.currency {
  max-width: 5rem;
}

label.currency-label {
  color: var(--muted);
  font-size: 0.85rem;
  margin-left: 0.25rem;
}
label.currency-label ~ input {
  max-width: 4.5rem;
  margin-left: 0.35rem;
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.35rem 0.4rem;
}

button[type="submit"].primary {
  background: color-mix(in srgb, var(--accent) 20%, #2a3b55);
  color: var(--text);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 0.5rem 1.15rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.25rem;
}
button[type="submit"].primary:hover {
  background: color-mix(in srgb, var(--accent) 32%, #2a3b55);
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: #2a303c;
  color: var(--muted);
  margin-left: 0.4rem;
}

.alert {
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  margin: 0 0 1rem;
  font-size: 0.9rem;
}
.alert-error {
  background: #3a1f1f;
  color: #ffc9c9;
  border: 1px solid #662020;
}
.alert-good {
  background: #1f2e22;
  color: #c0f0cc;
  border: 1px solid #2d5a2f;
}
.alert-warn {
  background: #2e2a1f;
  color: #ffe8a8;
  border: 1px solid #5a4a2d;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 0.5rem 0 1.25rem;
}
table.data th,
table.data td {
  border: 1px solid var(--line);
  padding: 0.45rem 0.5rem;
  text-align: left;
}
table.data th {
  color: var(--muted);
  font-weight: 500;
  background: #131722;
}
table.data td {
  color: var(--text);
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
}

h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0.5rem 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footnote {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0.5rem 0 0;
  max-width: 70ch;
}

.caption {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
  max-width: 66ch;
}

.muted {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 0.75rem;
  max-width: 66ch;
}

code {
  background: #131722;
  padding: 0.1rem 0.25rem;
  border-radius: 3px;
  font-size: 0.9em;
}

header.page-header {
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

header.page-header h1 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

@media (max-width: 640px) {
  .grid-head,
  .tier-row {
    grid-template-columns: 1fr;
  }
  .grid-head {
    display: none;
  }
  .tier-row {
    background: #131722;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.5rem;
  }
}
