* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: #f4f7fb;
  color: #102033;
  line-height: 1.6;
}

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

  .cs-nav {
    gap: 14px;
  }
}

.tool-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
}

.hero {
  background: linear-gradient(135deg, #1e3a5f, #2563eb);
  color: #ffffff;
  border-radius: 28px;
  padding: 46px;
  margin-bottom: 28px;
  box-shadow: 0 18px 45px rgba(16, 32, 51, 0.18);
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.78rem;
  font-weight: 800;
  opacity: 0.86;
}

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

h1 {
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  line-height: 1.05;
  margin-bottom: 18px;
  max-width: 820px;
}

.hero-text {
  font-size: 1.12rem;
  max-width: 780px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.92);
}

.tool-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 24px;
  align-items: start;
}

.calculator-card,
.result-card,
.explainer,
.disclaimer {
  background: #ffffff;
  border: 1px solid #dce6f2;
  border-radius: 24px;
  box-shadow: 0 14px 35px rgba(16, 32, 51, 0.08);
}

.calculator-card {
  padding: 28px;
}

.form-header {
  border-bottom: 1px solid #e7eef7;
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.form-header h2 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.form-header p,
.section-heading p,
.empty-state p,
.explainer p,
.disclaimer p {
  color: #53657a;
}

.top-settings {
  max-width: 260px;
  margin-bottom: 24px;
}

.form-section {
  border-top: 1px solid #e7eef7;
  padding-top: 24px;
  margin-top: 24px;
}

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

.section-heading h3 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-weight: 750;
  color: #1b2f46;
}

input,
select {
  width: 100%;
  border: 1px solid #cbd8e6;
  border-radius: 14px;
  padding: 13px 14px;
  font: inherit;
  color: #102033;
  background: #ffffff;
  outline: none;
}

input:focus,
select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.13);
}

.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

button,
.article-link {
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  font-weight: 850;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-button,
.article-link {
  background: #2563eb;
  color: #ffffff;
}

.secondary-button {
  background: #e8eef7;
  color: #1e3a5f;
}

.result-card {
  padding: 24px;
  position: sticky;
  top: 20px;
}

.empty-state {
  min-height: 260px;
  display: grid;
  align-content: center;
}

.hidden {
  display: none;
}

.result-label {
  color: #2563eb;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  margin-bottom: 8px;
}

#result-title {
  font-size: 1.8rem;
  line-height: 1.12;
  margin-bottom: 10px;
}

#result-message {
  color: #43576d;
  margin-bottom: 20px;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 22px 0;
}

.summary-grid div {
  border: 1px solid #e2ebf5;
  border-radius: 18px;
  padding: 14px;
  background: #f8fbff;
}

.summary-grid .wide {
  grid-column: 1 / -1;
  background: #eef5ff;
}

.summary-grid span {
  display: block;
  color: #53657a;
  font-size: 0.86rem;
  margin-bottom: 4px;
}

.summary-grid strong {
  font-size: 1.12rem;
  color: #102033;
}

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

.meter-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #53657a;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.meter {
  height: 12px;
  background: #e4edf7;
  border-radius: 999px;
  overflow: hidden;
}

#assigned-bar {
  height: 100%;
  width: 0%;
  background: #2563eb;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.advice-box {
  border-radius: 20px;
  background: #f4f7fb;
  padding: 18px;
  border: 1px solid #e2ebf5;
}

.advice-box h3 {
  margin-bottom: 10px;
}

.advice-box ul {
  margin: 0;
  padding-left: 20px;
}

.advice-box li {
  margin-bottom: 8px;
  color: #43576d;
}

.explainer,
.disclaimer {
  padding: 28px;
  margin-top: 24px;
}

.explainer h2 {
  font-size: 1.6rem;
}

.article-link {
  margin-top: 8px;
}

.disclaimer {
  box-shadow: none;
  background: #fbfcfe;
}

.disclaimer p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

@media (max-width: 920px) {
  .tool-shell {
    grid-template-columns: 1fr;
  }

  .result-card {
    position: static;
  }

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

@media (max-width: 640px) {
  .tool-page {
    width: min(100% - 22px, 1180px);
    padding: 18px 0;
  }

  .hero,
  .calculator-card,
  .result-card,
  .explainer,
  .disclaimer {
    border-radius: 20px;
  }

  .hero {
    padding: 28px 22px;
  }

  .calculator-card,
  .result-card,
  .explainer,
  .disclaimer {
    padding: 20px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .button-row {
    flex-direction: column;
  }

  button,
  .article-link {
    width: 100%;
  }
}
