:root {
  --bg: #0b0f19;
  --panel: #131b2e;
  --panel-alt: #0d1525;
  --line: #26354f;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --emerald: #10b981;
  --indigo: #6366f1;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 10% 0%, rgba(16, 185, 129, 0.12), transparent 30rem),
              radial-gradient(circle at 90% 15%, rgba(99, 102, 241, 0.12), transparent 32rem),
              var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
  max-width: 100%;
}

button, select, input {
  font: inherit;
}

.skip {
  position: fixed;
  z-index: 20;
  left: 12px;
  top: -70px;
  padding: 10px 16px;
  border-radius: 8px;
  background: #fff;
  color: #0b0f19;
  font-weight: 700;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.skip:focus {
  top: 12px;
}

.hero {
  padding: 24px max(20px, calc((100% - 980px) / 2)) 40px;
  border-bottom: 1px solid rgba(16, 185, 129, 0.15);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

nav a, footer a {
  color: var(--emerald);
  font-weight: 700;
  text-decoration: none;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
}

nav label {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

nav select {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-alt);
  color: var(--text);
  min-height: 44px;
}

.eyebrow, .kicker {
  margin: 28px 0 8px;
  color: var(--emerald);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(32px, 6vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  background: linear-gradient(135deg, #ffffff 40%, var(--emerald) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lead {
  max-width: 720px;
  margin: 16px 0 20px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 19px);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips span {
  padding: 6px 14px;
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.08);
  font-size: 13px;
  font-weight: 600;
  color: var(--emerald);
}

main {
  width: min(980px, calc(100% - 32px));
  margin: auto;
  padding: 24px 0 60px;
}

.panel {
  margin: 20px 0;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(19, 27, 46, 0.95), rgba(13, 21, 37, 0.95));
  box-shadow: var(--shadow);
}

.section-head, .result-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.panel h2 {
  margin: 0;
  font-size: clamp(22px, 3.5vw, 30px);
  letter-spacing: -0.02em;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.option-box {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(11, 15, 25, 0.5);
}

.option-box label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.option-box input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-alt);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  min-height: 48px;
}

.option-box.opt-a {
  border-top: 3px solid var(--emerald);
}

.option-box.opt-b {
  border-top: 3px solid var(--indigo);
}

.criteria-list {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
}

.criterion-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(11, 15, 25, 0.4);
}

.crit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.crit-title {
  font-size: 16px;
  font-weight: 700;
  color: #f8fafc;
}

.weight-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.weight-selector select {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-alt);
  color: var(--amber);
  font-weight: 700;
  min-height: 44px;
  min-width: 68px;
}

.crit-ratings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.rating-col label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.rating-col input[type="range"] {
  width: 100%;
  height: 8px;
  accent-color: var(--emerald);
  cursor: pointer;
  min-height: 44px;
}

.rating-col.col-b input[type="range"] {
  accent-color: var(--indigo);
}

.score-badge {
  font-weight: 800;
  color: var(--text);
}

.btn-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.primary-btn {
  flex: 1;
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--emerald), #059669);
  color: #041f14;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  min-height: 48px;
  transition: transform 0.2s, filter 0.2s;
}

.primary-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.ghost-btn {
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  min-height: 48px;
  min-width: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

/* Results */
.result-card {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 18px;
  background: rgba(16, 185, 129, 0.05);
}

.verdict-banner {
  text-align: center;
  margin-bottom: 20px;
}

.verdict-tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.verdict-headline {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 6px;
}

.verdict-sub {
  color: var(--muted);
  font-size: 14px;
}

.score-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}

.score-box {
  padding: 16px;
  border-radius: 14px;
  text-align: center;
}

.score-box.box-a {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.score-box.box-b {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.score-box .score-val {
  font-size: 36px;
  font-weight: 900;
  line-height: 1.1;
}

.score-box.box-a .score-val {
  color: var(--emerald);
}

.score-box.box-b .score-val {
  color: var(--indigo);
}

.score-box .score-name {
  font-size: 14px;
  font-weight: 700;
  margin-top: 4px;
}

.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 13px;
}

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

.breakdown-table th {
  color: var(--muted);
  font-weight: 700;
}

.breakdown-table .num-col {
  text-align: right;
  font-weight: 700;
}

/* Method */
.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.method-card {
  padding: 16px;
  border-radius: 14px;
  background: rgba(11, 15, 25, 0.5);
  border: 1px solid var(--line);
}

.method-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  font-weight: 800;
  margin-bottom: 8px;
}

.method-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.method-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* Related */
.related {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.related a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(19, 27, 46, 0.8);
  color: var(--text);
  text-decoration: none;
  min-height: 64px;
  transition: transform 0.2s, border-color 0.2s;
}

.related a:hover {
  border-color: var(--emerald);
  transform: translateY(-2px);
}

.related .rel-icon {
  font-size: 24px;
}

.related strong {
  display: block;
  font-size: 14px;
}

.related small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px max(20px, calc((100% - 980px) / 2));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

#toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  max-width: 320px;
  padding: 12px 18px;
  border-radius: 10px;
  background: #064e3b;
  color: #a7f3d0;
  font-weight: 700;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 0.25s;
}

#toast.show {
  opacity: 1;
  transform: none;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--emerald);
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .options-grid {
    grid-template-columns: 1fr;
  }
  .crit-ratings {
    grid-template-columns: 1fr;
  }
  .method-grid {
    grid-template-columns: 1fr;
  }
  .related {
    grid-template-columns: 1fr;
  }
  .score-comparison {
    grid-template-columns: 1fr;
  }
  .btn-row {
    flex-direction: column;
  }
  footer {
    flex-direction: column;
    text-align: center;
  }
}
