:root {
  --navy-950: #06152b;
  --navy-900: #0a1d3d;
  --navy-800: #0f2c55;
  --navy-700: #153d72;
  --blue-500: #1c7ed6;
  --cyan-400: #2ec7ff;
  --green-500: #18a866;
  --amber-500: #f2a93b;
  --red-500: #dd4b4b;
  --white: #ffffff;
  --surface: #f5f8fc;
  --surface-strong: #eaf1f8;
  --text: #102033;
  --muted: #64748b;
  --border: #d9e3ef;
  --shadow: 0 24px 70px rgba(6, 21, 43, 0.16);
  --radius: 8px;
  --radius-lg: 12px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--surface);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px max(20px, calc((100vw - var(--container)) / 2));
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img,
.site-footer img {
  border-radius: 50%;
  background: var(--navy-900);
}

.brand strong {
  display: block;
  color: var(--navy-900);
  font-size: 0.98rem;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.site-header nav {
  display: flex;
  gap: 6px;
}

.site-header nav a {
  padding: 10px 12px;
  color: var(--navy-800);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  background: var(--surface-strong);
  outline: none;
}

.hero-shell {
  padding: 54px 20px 42px;
  background:
    radial-gradient(circle at 10% 0%, rgba(46, 199, 255, 0.18), transparent 28%),
    linear-gradient(135deg, var(--navy-950) 0%, var(--navy-900) 52%, var(--navy-800) 100%);
}

.hero-copy,
.calculator-grid,
.roadmap-section,
.insight-section {
  max-width: var(--container);
  margin: 0 auto;
}

.hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.6fr);
  gap: 30px;
  align-items: end;
  margin-bottom: 30px;
  color: var(--white);
}

.hero-copy h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-copy p {
  margin: 0;
  color: #d6e6f6;
  font-size: clamp(1rem, 1.6vw, 1.16rem);
}

.calculator-grid {
  display: grid;
  grid-template-columns: minmax(330px, 0.92fr) minmax(420px, 1.08fr);
  gap: 20px;
  align-items: start;
}

.input-panel,
.result-panel,
.roadmap-section,
.insight-section {
  background: var(--white);
  border: 1px solid rgba(217, 227, 239, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.input-panel,
.result-panel {
  padding: 22px;
}

.panel-heading,
.section-heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.panel-heading h2,
.section-heading h2 {
  margin: 0;
  color: var(--navy-950);
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.15;
}

.panel-heading p,
.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
}

.panel-heading.compact h2 {
  font-size: 1.45rem;
}

.step-number {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--white);
  background: var(--navy-900);
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 800;
}

.progress-wrap {
  margin: 22px 0;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--navy-800);
  font-size: 0.86rem;
  font-weight: 800;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  background: var(--surface-strong);
  border-radius: 999px;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan-400), var(--blue-500));
  border-radius: inherit;
  transition: width 220ms ease;
}

.preset-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.preset-button,
.ghost-button {
  min-height: 42px;
  padding: 10px 12px;
  color: var(--navy-800);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 800;
}

.preset-button:hover,
.ghost-button:hover {
  background: var(--surface-strong);
}

.field-group {
  display: grid;
  gap: 7px;
  margin-bottom: 17px;
}

.field-group label,
.label-row label {
  color: var(--navy-950);
  font-size: 0.92rem;
  font-weight: 850;
}

.field-group label span {
  color: var(--muted);
  font-weight: 700;
}

.field-group small {
  color: var(--muted);
  font-size: 0.82rem;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

output {
  color: var(--blue-500);
  font-weight: 900;
}

input,
select {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

input:focus,
select:focus,
button:focus-visible {
  border-color: var(--blue-500);
  outline: 3px solid rgba(28, 126, 214, 0.18);
}

.range-input {
  min-height: 24px;
  padding: 0;
  accent-color: var(--blue-500);
}

.form-message {
  min-height: 22px;
  margin: 0 0 14px;
  color: var(--red-500);
  font-size: 0.9rem;
  font-weight: 750;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 17px;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-500), var(--navy-700));
  border: 0;
  border-radius: var(--radius);
  font-size: 0.94rem;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(28, 126, 214, 0.24);
}

.primary-button:hover {
  transform: translateY(-1px);
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.primary-link {
  color: var(--white);
  background: linear-gradient(135deg, var(--green-500), var(--navy-700));
  box-shadow: 0 12px 26px rgba(24, 168, 102, 0.2);
}

.secondary-link {
  color: var(--navy-800);
  background: var(--white);
  border: 1px solid var(--border);
}

.primary-link:hover,
.secondary-link:hover {
  transform: translateY(-1px);
}

.result-panel {
  display: grid;
  gap: 18px;
}

.result-media {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--navy-900);
  aspect-ratio: 16 / 9;
}

.result-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.score-card {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  background: linear-gradient(135deg, #f7fbff, #eef6ff);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.score-ring {
  display: grid;
  place-items: center;
  width: 126px;
  height: 126px;
  background:
    radial-gradient(circle closest-side, var(--white) 72%, transparent 73%),
    conic-gradient(var(--green-500) calc(var(--score) * 1%), #dce8f4 0);
  border-radius: 50%;
}

.score-ring span {
  color: var(--navy-950);
  font-size: 1.7rem;
  font-weight: 950;
}

.score-ring small {
  margin-top: -34px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.score-card h3,
.chart-card h3 {
  margin: 0 0 6px;
  color: var(--navy-950);
  font-size: 1.1rem;
}

.score-card p {
  margin: 0;
  color: var(--muted);
}

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

.scenario-card {
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.scenario-card.featured {
  color: var(--white);
  background: var(--navy-900);
  border-color: var(--navy-900);
}

.scenario-card span,
.scenario-card small {
  display: block;
  color: inherit;
  opacity: 0.76;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.scenario-card strong {
  display: block;
  margin: 5px 0 2px;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1;
}

.chart-card {
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.chart-head span {
  color: var(--green-500);
  font-weight: 900;
}

.bar-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 50px;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
  font-size: 0.9rem;
  font-weight: 800;
}

.bar-track {
  height: 14px;
  overflow: hidden;
  background: var(--surface-strong);
  border-radius: 999px;
}

.bar-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  transition: width 320ms ease;
}

.bar-fill.current {
  background: var(--amber-500);
}

.bar-fill.possible {
  background: var(--blue-500);
}

.bar-fill.best {
  background: var(--green-500);
}

.traffic-card {
  padding: 16px;
  background: linear-gradient(135deg, #ffffff, #f3f9ff);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.traffic-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.traffic-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}

.traffic-grid article {
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.traffic-grid span,
.traffic-grid small {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.traffic-grid strong {
  display: block;
  margin: 5px 0 3px;
  color: var(--navy-950);
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  line-height: 1;
}

.traffic-grid small {
  color: var(--green-500);
  text-transform: none;
}

.result-actions {
  justify-content: flex-end;
}

.consultation-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 17px;
  background:
    linear-gradient(135deg, rgba(24, 168, 102, 0.1), rgba(46, 199, 255, 0.09)),
    var(--white);
  border: 1px solid rgba(24, 168, 102, 0.28);
  border-radius: var(--radius-lg);
}

.consultation-card h3 {
  margin: 0 0 6px;
  color: var(--navy-950);
  font-size: 1.08rem;
}

.consultation-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.consultation-actions {
  display: grid;
  gap: 9px;
  min-width: 230px;
}

.roadmap-section,
.insight-section {
  margin-top: 28px;
  padding: 26px;
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 22px;
}

.roadmap-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.roadmap-card h3 {
  margin: 0;
  color: var(--navy-950);
  font-size: 1rem;
  line-height: 1.25;
}

.roadmap-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.roadmap-meta span {
  padding: 6px 8px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--navy-800);
  font-size: 0.74rem;
  font-weight: 850;
}

.roadmap-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.insight-card {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.insight-card.large {
  grid-column: span 2;
  grid-row: span 2;
}

.insight-card.wide {
  grid-column: span 2;
}

.insight-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.insight-card.large img,
.insight-card.wide img {
  aspect-ratio: 16 / 9;
}

.insight-card figcaption {
  padding: 13px;
  color: var(--muted);
  font-size: 0.9rem;
}

.insight-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy-950);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 20px 34px;
  color: #dce8f4;
  background: var(--navy-950);
}

.site-footer p {
  margin: 0;
  text-align: center;
  font-weight: 750;
}

.site-footer a {
  color: var(--white);
}

@media (max-width: 1040px) {
  .hero-copy,
  .calculator-grid {
    grid-template-columns: 1fr;
  }

  .roadmap-grid,
  .insight-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header nav {
    width: 100%;
    overflow-x: auto;
  }

  .hero-shell {
    padding-top: 34px;
  }

  .input-panel,
  .result-panel,
  .roadmap-section,
  .insight-section {
    padding: 17px;
  }

  .preset-row,
  .scenario-grid,
  .traffic-grid,
  .roadmap-grid,
  .insight-grid,
  .consultation-card,
  .score-card {
    grid-template-columns: 1fr;
  }

  .consultation-actions {
    min-width: 0;
  }

  .insight-card.large,
  .insight-card.wide {
    grid-column: auto;
    grid-row: auto;
  }

  .bar-row {
    grid-template-columns: 78px minmax(0, 1fr) 42px;
    gap: 8px;
  }

  .score-ring {
    width: 118px;
    height: 118px;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .result-actions {
    justify-content: stretch;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .site-header,
  .hero-copy,
  .input-panel,
  .result-media,
  .insight-section,
  .preset-row,
  .action-row,
  .consultation-actions,
  .form-message {
    display: none !important;
  }

  .hero-shell {
    padding: 0;
    background: #ffffff;
  }

  .calculator-grid {
    display: block;
  }

  .result-panel,
  .roadmap-section {
    margin: 0 0 16px;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .roadmap-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-footer {
    color: #102033;
    background: #ffffff;
    border-top: 1px solid #d9e3ef;
  }
}
