:root {
  --bg: #0f1722;
  --surface: #18222f;
  --surface-2: #1f2c3b;
  --line: #2c3a4c;
  --text: #e8eef5;
  --muted: #9fb0c2;
  --accent: #c6ff3a;       /* tennis ball green-yellow */
  --accent-ink: #0f1722;
  --up: #ff7a59;
  --down: #59b0ff;
  --ok: #46d39a;
  --radius: 14px;
  --maxw: 760px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 18px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 34, 0.85);
}
.site-header .wrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  font-size: 1.15rem;
}
.tagline { color: var(--muted); font-size: 0.85rem; }
.nav-blog {
  margin-left: auto;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
}
.nav-blog:hover { text-decoration: underline; }

/* Hero */
.hero { padding: 30px 0 8px; }
h1 {
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  line-height: 1.15;
  margin: 0 0 12px;
}
.lead { font-size: 1.08rem; color: var(--text); margin: 0 0 14px; }
.disclaimer {
  font-size: 0.86rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  border-radius: 8px;
  margin: 0;
}

/* Cards and content */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin: 22px 0;
}
h2 { font-size: 1.3rem; margin: 26px 0 10px; }
.content h2:first-child { margin-top: 8px; }

/* Calculator */
.field { margin-bottom: 14px; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
select, input[type="number"] {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 1rem;
  width: 100%;
}
select:focus, input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.form-help, .form-note { color: var(--muted); font-size: 0.9rem; }

.match-head, .match-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 40px;
  gap: 8px;
  align-items: center;
}
.match-head {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 6px 0 4px;
}
.match-row { margin-bottom: 8px; }
.match-row .remove {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 8px;
  height: 42px;
  cursor: pointer;
  font-size: 1rem;
}
.match-row .remove:hover { border-color: var(--up); color: var(--up); }

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  margin-top: 4px;
}
.btn-primary {
  display: block;
  width: 100%;
  margin-top: 18px;
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: 10px;
  padding: 14px;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
}
.btn-primary:hover { filter: brightness(1.05); }

/* Result */
.result {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}
.result.zone-bump-up { border-left: 4px solid var(--up); }
.result.zone-bump-down { border-left: 4px solid var(--down); }
.result.zone-appeal-up { border-left: 4px solid var(--up); }
.result.zone-appeal-down { border-left: 4px solid var(--down); }
.result.zone-mid-band { border-left: 4px solid var(--ok); }

.estimate-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 14px;
}
.estimate-label { color: var(--muted); font-size: 0.85rem; }
.estimate-value {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.05;
}
.estimate-level { color: var(--muted); font-size: 0.95rem; }

.band-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 16px;
  font-size: 0.8rem;
  color: var(--muted);
}
.band-track {
  position: relative;
  flex: 1;
  height: 8px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--down), var(--ok), var(--up));
}
.band-marker {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent-ink);
  transform: translate(-50%, -50%);
}
.verdict { font-size: 1.05rem; margin: 6px 0 10px; }
.result-note { color: var(--muted); font-size: 0.82rem; margin: 8px 0 0; }
.per-match summary { cursor: pointer; color: var(--accent); font-size: 0.9rem; }
.per-match ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 0.9rem; }

/* Tables */
table.bands {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 6px;
  font-size: 0.92rem;
}
.bands th, .bands td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.bands th { color: var(--accent); }
.bands td:first-child { font-weight: 700; white-space: nowrap; }
.note { color: var(--muted); font-size: 0.85rem; }

/* FAQ */
details {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 8px 0;
  background: var(--surface);
}
details summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 2px; color: var(--muted); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding: 18px 0 40px;
}
.site-footer p { color: var(--muted); font-size: 0.82rem; margin: 0; }

@media (max-width: 460px) {
  .match-head { font-size: 0.72rem; }
  .estimate-value { font-size: 2.5rem; }
}
