:root {
  color-scheme: dark;
  --bg: #10131a;
  --panel: #171b25;
  --panel-strong: #1f2533;
  --text: #f5f7fb;
  --muted: #9ca8ba;
  --line: #2a3142;
  --accent: #7cc8ff;
  --radius: 22px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(69, 170, 242, 0.22), transparent 34rem),
    var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 3rem clamp(1rem, 5vw, 4rem) 2rem;
}

.hero-copy {
  max-width: 68rem;
}

.hero-card {
  display: grid;
  justify-items: center;
  gap: 1rem;
  min-width: min(17rem, 100%);
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.team-logo {
  width: min(14rem, 42vw);
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 24px;
  background: #f4f2ee;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.hero-note {
  margin: 0;
  color: var(--accent);
  font-weight: 900;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.8rem;
  font-size: clamp(2.2rem, 7vw, 5rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.lead {
  max-width: 48rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.calculators-shell {
  display: grid;
  gap: 1.25rem;
  padding: 0 clamp(1rem, 5vw, 4rem) 4rem;
}

.section-heading {
  max-width: 68rem;
}

.section-heading h2 {
  margin-bottom: 0.45rem;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
}

.hint {
  max-width: 58rem;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(23, 27, 37, 0.86);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
  padding: 1rem;
}

.calculator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 25rem), 1fr));
  gap: 1rem;
}

.calculator-card {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.calculator-card h3 {
  margin-bottom: 0.45rem;
  font-size: 1.35rem;
}

.calculator-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.8rem;
}

.filter {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 100%;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.checkline input {
  width: auto;
}

select,
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-strong);
  color: var(--text);
  outline: none;
}

select {
  padding: 0.75rem 0.8rem;
}

input {
  padding: 0.9rem 1rem;
}

select:focus,
input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 200, 255, 0.16);
}

.button,
.ghost {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
}

.button {
  padding: 0.85rem 1.15rem;
  background: var(--accent);
  color: #071018;
}

.ghost {
  padding: 0.5rem 0.75rem;
  background: rgba(124, 200, 255, 0.1);
  color: var(--accent);
}

.back-link {
  display: inline-flex;
  margin-bottom: 1rem;
}

.calculator-actions,
.preset-row,
.result-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.preset-row {
  align-items: center;
}

.result-title {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.result-pills,
.result-block,
.metric-grid {
  min-height: 2.5rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(31, 37, 51, 0.55);
}

.result-block {
  display: grid;
  gap: 0.75rem;
}

.muted-result {
  color: var(--muted);
}

.channel-pill,
.harmonic-pill,
.metric {
  border-radius: 999px;
  padding: 0.42rem 0.68rem;
  background: rgba(124, 200, 255, 0.12);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
}

.channel-pill[data-band="X"],
.channel-pill[data-band="1.3G"],
.channel-pill[data-band^="3.3G"] {
  background: rgba(255, 190, 92, 0.14);
}

.channel-pill[data-band^="O3"],
.channel-pill[data-band^="Wlk"] {
  background: rgba(145, 124, 255, 0.16);
}

.harmonic-group {
  display: grid;
  gap: 0.5rem;
}

.harmonic-group h4 {
  margin: 0;
  color: var(--accent);
  font-size: 0.9rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.55rem;
}

.metric {
  display: grid;
  gap: 0.2rem;
  border-radius: 16px;
}

.metric span {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric b {
  color: var(--accent);
}

@media (max-width: 860px) {
  .hero {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-card {
    justify-items: stretch;
  }

  .team-logo {
    justify-self: center;
  }
}

@media (max-width: 640px) {
  body {
    overflow-x: hidden;
  }

  .hero {
    padding: 1.25rem 1rem 1rem;
  }

  .hero-card {
    min-width: 0;
  }

  .team-logo {
    width: min(12rem, 70vw);
    border-radius: 22px;
  }

  h1 {
    font-size: clamp(2rem, 15vw, 3.2rem);
    letter-spacing: -0.04em;
  }

  .lead,
  .hint {
    font-size: 0.96rem;
    line-height: 1.55;
  }

  .calculators-shell {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .calculator-grid,
  .calculator-form,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .panel,
  .result-pills,
  .result-block,
  .metric-grid {
    border-radius: 18px;
  }

  .button,
  .ghost {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .calculator-actions,
  .preset-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .result-pills {
    display: grid;
    grid-template-columns: 1fr;
  }

  .channel-pill,
  .harmonic-pill,
  .metric {
    text-align: center;
  }
}
