:root {
  --bg: #07090c;
  --panel: #10151a;
  --panel-2: #151b21;
  --white: #ffffff;
  --text: #f4f7f8;
  --muted: #aeb8c1;
  --ink: #172027;
  --gold: #f5bd3f;
  --gold-dark: #cc8e15;
  --teal: #2aa198;
  --red: #ff6b5f;
  --line: rgba(255, 255, 255, 0.12);
  --line-dark: #dce4e8;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
  --radius: 8px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(245, 189, 63, 0.16), transparent 28%),
    radial-gradient(circle at 84% 18%, rgba(42, 161, 152, 0.16), transparent 30%),
    linear-gradient(135deg, #07090c 0%, #10151a 52%, #07090c 100%);
}

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

button,
select {
  font: inherit;
}

.tool-shell {
  width: min(100% - 36px, 1180px);
  margin: 0 auto;
  padding: 28px 0 34px;
}

.tool-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 18px 0 28px;
}

.brand img {
  display: block;
  width: 150px;
  height: auto;
}

.tool-header span,
.panel-heading span,
.summary-panel span {
  display: block;
  margin-bottom: 5px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tool-header h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 76px);
  line-height: 0.95;
}

.tool-header p {
  max-width: 640px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.ghost-link,
.primary-action,
.whatsapp-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: var(--radius);
  font-weight: 900;
}

.ghost-link {
  border: 1px solid var(--line);
  color: var(--white);
}

.calculator-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(360px, 1fr);
  gap: 18px;
}

.config-panel,
.result-panel,
.insight-panel,
.summary-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(16, 21, 26, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.config-panel,
.result-panel {
  min-height: 100%;
  padding: 24px;
}

.panel-heading {
  margin-bottom: 18px;
}

.panel-heading strong {
  display: block;
  font-size: 24px;
  line-height: 1.15;
}

.config-panel {
  display: grid;
  gap: 16px;
}

.config-panel label {
  display: grid;
  gap: 8px;
}

.config-panel label span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 800;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

select {
  width: 100%;
  min-height: 48px;
  padding: 0 42px 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    #0b1014;
  color: var(--text);
  outline: none;
}

select:focus {
  border-color: rgba(245, 189, 63, 0.72);
  box-shadow: 0 0 0 3px rgba(245, 189, 63, 0.12);
}

option {
  background: #0b1014;
  color: var(--white);
}

.primary-action {
  width: 100%;
  border: 0;
  background: var(--gold);
  color: var(--bg);
  box-shadow: 0 16px 32px rgba(245, 189, 63, 0.24);
}

.result-panel {
  display: grid;
  gap: 22px;
  background:
    radial-gradient(circle at 82% 12%, rgba(42, 161, 152, 0.2), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02)),
    rgba(16, 21, 26, 0.9);
}

.result-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.status-badge,
.updated {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.status-badge {
  background: rgba(245, 189, 63, 0.16);
  color: var(--gold);
}

.status-badge.is-alert {
  background: rgba(255, 107, 95, 0.16);
  color: #ff9c94;
}

.updated {
  border: 1px solid var(--line);
  color: var(--muted);
}

.score-ring {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 24px;
}

.score-ring svg {
  width: 150px;
  height: 150px;
  transform: rotate(-90deg);
}

.score-ring circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 11;
}

#ring-progress {
  stroke: var(--gold);
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  filter: drop-shadow(0 0 14px rgba(245, 189, 63, 0.34));
  transition: stroke-dashoffset 500ms var(--ease-out), stroke 220ms ease;
}

.score-ring strong {
  display: block;
  color: var(--white);
  font-size: clamp(42px, 8vw, 72px);
  line-height: 0.95;
}

.score-ring span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 800;
}

.score-bars {
  display: grid;
  gap: 12px;
}

.score-bars div {
  display: grid;
  grid-template-columns: 110px 1fr 44px;
  align-items: center;
  gap: 12px;
}

.score-bars span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.score-bars strong {
  text-align: right;
  color: var(--gold);
}

meter {
  width: 100%;
  height: 12px;
}

meter::-webkit-meter-bar {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

meter::-webkit-meter-optimum-value {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--gold));
}

.spec-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.spec-summary article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.spec-summary span,
.spec-summary small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.spec-summary strong {
  display: block;
  margin: 5px 0;
  color: var(--white);
  font-size: 18px;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.insight-panel {
  padding: 22px;
  box-shadow: none;
}

.message-list,
.upgrade-list,
.cooling-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.message-list li,
.upgrade-card,
.cooling-card {
  position: relative;
  padding: 13px 14px 13px 35px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.45;
}

.message-list li::before,
.upgrade-card::before,
.cooling-card::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 15px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 14px rgba(245, 189, 63, 0.42);
}

.upgrade-card strong,
.cooling-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--white);
}

.upgrade-card small,
.cooling-card small {
  color: var(--muted);
  line-height: 1.45;
}

.summary-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding: 22px;
}

.summary-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.55;
}

.whatsapp-action {
  background: var(--gold);
  color: var(--bg);
  white-space: nowrap;
  box-shadow: 0 14px 34px rgba(245, 189, 63, 0.24);
}

.disclaimer {
  max-width: 980px;
  margin: 18px auto 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}

@media (max-width: 980px) {
  .tool-header,
  .calculator-grid,
  .insight-grid,
  .summary-panel {
    grid-template-columns: 1fr;
  }

  .ghost-link {
    width: fit-content;
  }

  .score-ring {
    grid-template-columns: 130px 1fr;
  }

  .score-ring svg {
    width: 130px;
    height: 130px;
  }

  .spec-summary {
    grid-template-columns: 1fr;
  }

  .summary-panel {
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .tool-shell {
    width: min(100% - 28px, 1180px);
    padding-top: 18px;
  }

  .brand img {
    width: 138px;
  }

  .tool-header {
    gap: 14px;
  }

  .config-panel,
  .result-panel,
  .insight-panel,
  .summary-panel {
    padding: 18px;
  }

  .field-row,
  .score-ring,
  .score-bars div {
    grid-template-columns: 1fr;
  }

  .score-ring {
    justify-items: start;
  }

  .score-bars strong {
    text-align: left;
  }

  .whatsapp-action {
    width: 100%;
    white-space: normal;
    text-align: center;
  }
}
