:root {
  --navy: #081b47;
  --navy-soft: #31446f;
  --blue: #075cf4;
  --blue-dark: #0347ca;
  --blue-pale: #eaf2ff;
  --violet: #6d35d7;
  --violet-pale: #f1ebff;
  --green: #0caa67;
  --green-pale: #e8f8f1;
  --orange: #f06a16;
  --orange-pale: #fff1e6;
  --paper: #f5f9ff;
  --surface: #ffffff;
  --surface-soft: #f9fbff;
  --rule: #dce6f5;
  --rule-strong: #cbd9ee;
  --error: #c4322b;
  --shadow: 0 24px 70px rgba(31, 74, 139, 0.12);
  --shadow-soft: 0 12px 34px rgba(31, 74, 139, 0.08);
  --radius: 18px;
  --display: "Manrope", sans-serif;
  --sans: "Instrument Sans", sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --navy: #edf4ff;
  --navy-soft: #a9b9d3;
  --blue: #4d91ff;
  --blue-dark: #75aaff;
  --blue-pale: #132b52;
  --violet: #b28cff;
  --violet-pale: #2b2047;
  --green: #42d598;
  --green-pale: #123b32;
  --orange: #ff9a5c;
  --orange-pale: #43291e;
  --paper: #071226;
  --surface: #101e35;
  --surface-soft: #0d1a2f;
  --rule: #253754;
  --rule-strong: #344a6d;
  --error: #ff8580;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 12px 34px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--navy);
  background:
    radial-gradient(circle at 9% 14%, rgba(7, 92, 244, 0.09), transparent 24rem),
    radial-gradient(circle at 92% 32%, rgba(109, 53, 215, 0.055), transparent 22rem),
    linear-gradient(180deg, #fbfdff 0, var(--paper) 48rem, #f8fbff 100%);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

[data-theme="dark"] body {
  background:
    radial-gradient(circle at 9% 14%, rgba(77, 145, 255, 0.13), transparent 24rem),
    radial-gradient(circle at 92% 32%, rgba(178, 140, 255, 0.08), transparent 22rem),
    linear-gradient(180deg, #09162a 0, var(--paper) 48rem, #081427 100%);
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  margin-top: 0;
  font-family: var(--display);
  line-height: 1.15;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 30;
  padding: 0.7rem 1rem;
  color: white;
  background: var(--navy);
  border-radius: 10px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
main,
.site-footer {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  min-height: 80px;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  gap: 0.78rem;
  align-items: center;
  color: var(--navy);
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 38px;
  height: 44px;
  color: white;
  background: linear-gradient(145deg, #0873ff, #063eb5);
  clip-path: polygon(50% 0, 92% 11%, 88% 72%, 50% 100%, 12% 72%, 8% 11%);
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
  place-items: center;
  filter: drop-shadow(0 5px 7px rgba(7, 92, 244, 0.22));
}

.brand-mark::after {
  position: absolute;
  inset: 5px 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  clip-path: inherit;
  content: "";
}

.site-nav {
  display: flex;
  gap: clamp(1rem, 2.8vw, 2.2rem);
  align-items: center;
  font-size: 0.88rem;
  font-weight: 650;
}

.site-nav a {
  text-decoration: none;
}

.theme-toggle {
  display: inline-flex;
  min-height: 38px;
  gap: 0.45rem;
  padding: 0.35rem 0.65rem 0.35rem 0.42rem;
  color: var(--navy);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  cursor: pointer;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.theme-toggle:hover {
  border-color: var(--blue);
  transform: translateY(-1px);
}

.theme-toggle-icon {
  display: grid;
  width: 27px;
  height: 27px;
  color: white;
  background: var(--navy);
  border-radius: 50%;
  font-size: 0.9rem;
  line-height: 1;
  place-items: center;
}

[data-theme="dark"] .theme-toggle-icon {
  color: #071226;
  background: #ffd166;
}

.site-nav > a:not(.nav-cta) {
  position: relative;
}

.site-nav > a:not(.nav-cta)::after {
  position: absolute;
  right: 0;
  bottom: -0.35rem;
  left: 0;
  height: 2px;
  background: var(--blue);
  border-radius: 999px;
  content: "";
  transform: scaleX(0);
  transition: transform 160ms ease;
}

.site-nav > a:not(.nav-cta):hover::after {
  transform: scaleX(1);
}

.nav-cta {
  display: inline-flex;
  min-height: 42px;
  gap: 0.55rem;
  padding: 0.7rem 1.05rem;
  color: white;
  background: linear-gradient(135deg, var(--blue), #0878ff);
  border: 0;
  border-radius: 10px;
  align-items: center;
  box-shadow: 0 9px 20px rgba(7, 92, 244, 0.2);
  cursor: pointer;
  font: inherit;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.nav-cta:hover {
  box-shadow: 0 12px 24px rgba(7, 92, 244, 0.28);
  transform: translateY(-2px);
}

.practice-tests-action {
  position: relative;
}

.practice-tests-notice {
  position: absolute;
  top: calc(100% + 0.65rem);
  right: 0;
  z-index: 20;
  width: 230px;
  margin: 0;
  padding: 0.75rem 0.85rem;
  color: var(--navy);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  font-size: 0.75rem;
  line-height: 1.45;
}

.practice-tests-notice[hidden] {
  display: none;
}

.hero {
  position: relative;
  padding: 3.3rem 9rem 2.1rem;
  text-align: center;
}

.hero-copy {
  animation: rise-in 560ms ease both;
}

.eyebrow,
.step-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  color: var(--blue);
}

.eyebrow span {
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

h1 {
  margin: 0.7rem 0 0.45rem;
  font-size: clamp(2.35rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.055em;
}

h1 em {
  color: var(--blue);
  font-style: normal;
}

.hero-intro {
  margin: 0;
  color: var(--navy-soft);
  font-size: clamp(1rem, 1.7vw, 1.16rem);
}

.hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.2rem;
  justify-content: center;
}

.hero-notes span {
  padding: 0.28rem 0.68rem;
  color: var(--navy-soft);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.hero-notes span::before {
  margin-right: 0.3rem;
  color: var(--green);
  content: "✓";
}

.score-stamp {
  position: absolute;
  right: 0;
  bottom: 2.1rem;
  display: flex;
  padding: 0.6rem 0.85rem;
  color: var(--navy-soft);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--rule);
  border-radius: 12px;
  flex-direction: column;
  box-shadow: var(--shadow-soft);
  text-align: left;
}

.score-stamp strong {
  color: var(--blue);
  font-family: var(--display);
  font-size: 1rem;
}

.score-stamp small {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.calculator-shell {
  display: grid;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--rule);
  border-radius: 20px;
  box-shadow: var(--shadow);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
  animation: rise-in 620ms 80ms ease both;
}

.calculator-form-panel,
.results-panel {
  min-width: 0;
  padding: clamp(1.4rem, 3vw, 2rem);
}

.calculator-form-panel {
  border-right: 1px solid var(--rule);
}

.panel-heading,
.results-topline {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.panel-heading {
  margin-bottom: 1.15rem;
}

.panel-heading h2,
.results-panel h2 {
  margin-bottom: 0;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 750;
  letter-spacing: -0.025em;
}

.panel-heading .step-label {
  margin-bottom: 0.35rem;
}

.step-label {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  color: var(--navy-soft);
  letter-spacing: 0.04em;
  text-transform: none;
}

.step-label > span {
  display: grid;
  width: 29px;
  height: 29px;
  color: white;
  background: var(--blue);
  border-radius: 50%;
  font-size: 0.84rem;
  place-items: center;
  box-shadow: 0 5px 12px rgba(7, 92, 244, 0.2);
}

.text-button {
  padding: 0.35rem 0.55rem;
  color: var(--navy-soft);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 650;
}

.text-button:hover {
  color: var(--blue);
  background: var(--blue-pale);
}

.score-input-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 1fr 1fr;
}

.score-field {
  min-width: 0;
  padding: 1rem;
  background: var(--surface-soft);
  border: 1px solid var(--rule);
  border-radius: 13px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.score-field:focus-within {
  border-color: #9fc1ff;
  box-shadow: 0 9px 24px rgba(7, 92, 244, 0.09);
  transform: translateY(-1px);
}

.score-field label {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  margin-bottom: 0.8rem;
}

.section-code {
  display: grid;
  flex: 0 0 38px;
  height: 38px;
  color: var(--blue);
  background: var(--blue-pale);
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 800;
  place-items: center;
}

.score-field:nth-child(2) .section-code {
  color: var(--violet);
  background: var(--violet-pale);
}

.score-field:nth-child(3) .section-code {
  color: var(--green);
  background: var(--green-pale);
}

.score-field:nth-child(4) .section-code {
  color: var(--orange);
  background: var(--orange-pale);
}

.score-field label strong,
.score-field label small {
  display: block;
}

.score-field label strong {
  font-family: var(--display);
  font-size: 0.79rem;
  line-height: 1.25;
}

.score-field label small {
  margin-top: 0.08rem;
  color: var(--navy-soft);
  font-size: 0.66rem;
}

.input-wrap {
  display: flex;
  min-height: 49px;
  padding: 0 0.78rem;
  background: white;
  border: 1px solid var(--rule-strong);
  border-radius: 9px;
  align-items: center;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.input-wrap:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(7, 92, 244, 0.1);
}

.input-wrap input {
  min-width: 0;
  width: 100%;
  padding: 0;
  color: var(--navy);
  background: transparent;
  border: 0;
  outline: 0;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 750;
}

.input-wrap input::placeholder {
  color: #98a8c4;
}

.input-wrap > span {
  flex: 0 0 auto;
  color: var(--navy-soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.dm-mode-toggle {
  display: grid;
  gap: 3px;
  margin-bottom: 0.7rem;
  padding: 3px;
  background: var(--blue-pale);
  border: 1px solid var(--rule);
  border-radius: 10px;
  grid-template-columns: 1fr 1fr;
}

.dm-mode-button {
  min-height: 32px;
  padding: 0.35rem 0.55rem;
  color: var(--navy-soft);
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font: 750 0.66rem var(--display);
  transition: background 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.dm-mode-button[aria-pressed="true"] {
  color: white;
  background: var(--blue);
  box-shadow: 0 5px 12px rgba(7, 92, 244, 0.22);
}

.dm-mode-button:focus-visible {
  outline: 3px solid rgba(7, 92, 244, 0.22);
  outline-offset: 2px;
}

.dm-simple-entry[hidden],
.dm-complex-entry[hidden] {
  display: none;
}

.dm-complex-entry {
  padding: 0.72rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
}

.dm-complex-note {
  margin: 0 0 0.65rem;
  color: var(--navy-soft);
  font-size: 0.6rem;
  line-height: 1.4;
}

.dm-complex-grid {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(3, 1fr);
}

.dm-complex-field label {
  display: block;
  min-height: 2.4em;
  margin: 0 0 0.3rem;
  color: var(--navy-soft);
  font-size: 0.57rem;
  font-weight: 700;
  line-height: 1.2;
}

.dm-complex-input {
  display: flex;
  min-height: 40px;
  padding: 0 0.45rem;
  background: var(--surface-soft);
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  align-items: center;
}

.dm-complex-input:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(7, 92, 244, 0.1);
}

.dm-complex-input input {
  min-width: 0;
  width: 100%;
  padding: 0;
  color: var(--navy);
  background: transparent;
  border: 0;
  outline: 0;
  font: 750 0.86rem var(--display);
}

.dm-complex-input input::placeholder {
  color: #98a8c4;
}

.dm-complex-input span {
  color: var(--navy-soft);
  font-size: 0.55rem;
  font-weight: 700;
}

.score-field.has-error {
  border-color: #f0a5a1;
}

.score-field.has-error .input-wrap {
  border-color: var(--error);
}

.score-field.has-error .dm-complex-input {
  border-color: var(--error);
}

.field-hint,
.field-error {
  min-height: 1.2em;
  margin: 0.45rem 0 0;
  font-size: 0.62rem;
  line-height: 1.35;
}

.field-hint {
  color: var(--navy-soft);
}

.field-error {
  color: var(--error);
  font-weight: 700;
}

.field-error:empty {
  display: none;
}

.calculate-button {
  display: grid;
  width: 100%;
  min-height: 54px;
  gap: 0.7rem;
  margin-top: 1rem;
  padding: 0.8rem 1.1rem;
  color: white;
  background: linear-gradient(135deg, #0877ff 0%, #075cf4 54%, #034ad0 100%);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  box-shadow: 0 12px 24px rgba(7, 92, 244, 0.22);
  font-family: var(--display);
  font-weight: 750;
  grid-template-columns: auto 1fr auto;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.calculate-button:hover {
  box-shadow: 0 16px 28px rgba(7, 92, 244, 0.3);
  transform: translateY(-1px);
}

.calculate-button:active {
  box-shadow: 0 7px 14px rgba(7, 92, 244, 0.2);
  transform: translateY(1px);
}

.calculate-button .button-icon {
  font-size: 1rem;
}

.form-note {
  margin: 0.9rem 0 0;
  color: var(--navy-soft);
  font-size: 0.68rem;
  text-align: center;
}

.form-note span {
  margin-right: 0.25rem;
  color: var(--navy-soft);
}

.results-panel {
  display: flex;
  background:
    radial-gradient(circle at 92% 0, rgba(7, 92, 244, 0.07), transparent 14rem),
    white;
  flex-direction: column;
}

.result-status {
  padding: 0.24rem 0.62rem;
  color: var(--blue);
  background: var(--blue-pale);
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.results-panel h2 {
  margin-top: 1.45rem;
  color: var(--navy-soft);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 650;
  text-align: center;
}

.results-panel h2 small {
  font-size: inherit;
  font-weight: inherit;
}

.total-score {
  display: flex;
  margin-top: 0.2rem;
  align-items: baseline;
  justify-content: center;
}

.total-value {
  color: var(--blue);
  font-family: var(--display);
  font-size: clamp(3.7rem, 7vw, 5.25rem);
  font-weight: 750;
  letter-spacing: -0.065em;
  line-height: 1;
}

.total-limit {
  margin-left: 0.55rem;
  color: var(--navy-soft);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
}

.result-summary {
  min-height: 2.7em;
  margin: 0.6rem auto 1rem;
  color: var(--navy-soft);
  font-size: 0.7rem;
  line-height: 1.4;
  text-align: center;
}

.score-breakdown {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(3, 1fr);
}

.score-breakdown div,
.result-metric {
  display: flex;
  min-width: 0;
  min-height: 112px;
  padding: 0.85rem 0.55rem;
  background: var(--surface-soft);
  border: 1px solid var(--rule);
  border-radius: 11px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.score-breakdown span,
.score-breakdown small,
.result-metric span,
.result-metric small {
  color: var(--navy-soft);
  font-size: 0.63rem;
  font-weight: 650;
}

.score-breakdown strong,
.result-metric strong {
  margin: 0.25rem 0;
  color: var(--blue);
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 750;
  line-height: 1.2;
}

.score-breakdown div:nth-child(2) strong {
  color: var(--violet);
}

.score-breakdown div:nth-child(3) strong {
  color: var(--green);
}

.result-pair {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.65rem;
  grid-template-columns: 1fr 1fr;
}

.result-metric strong {
  color: var(--orange);
}

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

.result-actions {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.8rem;
  grid-template-columns: 1fr 1fr;
}

.result-action {
  min-height: 44px;
  padding: 0.7rem 0.85rem;
  color: var(--navy);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  cursor: pointer;
  font: 700 0.72rem var(--display);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.result-action:hover:not(:disabled) {
  border-color: var(--blue);
  box-shadow: 0 8px 20px rgba(7, 92, 244, 0.14);
  transform: translateY(-1px);
}

.result-action-primary {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.result-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.result-action-status {
  min-height: 1.2em;
  margin: 0.45rem 0 0;
  color: var(--green);
  font-size: 0.66rem;
  font-weight: 650;
  text-align: center;
}

.result-disclaimer {
  display: grid;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 1rem;
  color: var(--navy-soft);
  grid-template-columns: auto 1fr;
}

.result-disclaimer > span {
  display: grid;
  width: 20px;
  height: 20px;
  color: var(--blue);
  background: var(--blue-pale);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 800;
  place-items: center;
}

.result-disclaimer p {
  margin: 0;
  font-size: 0.65rem;
  line-height: 1.45;
}

.trust-strip {
  display: grid;
  gap: 1rem;
  margin: 1.4rem 0 5rem;
  grid-template-columns: repeat(4, 1fr);
}

.trust-strip > a {
  display: flex;
  min-height: 244px;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--rule);
  border-radius: 15px;
  align-items: center;
  box-shadow: var(--shadow-soft);
  flex-direction: column;
  text-align: center;
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.trust-strip > a:hover {
  border-color: #a9c7fb;
  box-shadow: 0 18px 38px rgba(31, 74, 139, 0.13);
  transform: translateY(-4px);
}

.guide-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 0.95rem;
  border-radius: 50%;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 800;
  place-items: center;
}

.guide-icon-blue {
  color: var(--blue);
  background: var(--blue-pale);
}

.guide-icon-violet {
  color: var(--violet);
  background: var(--violet-pale);
}

.guide-icon-green {
  color: var(--green);
  background: var(--green-pale);
}

.guide-icon-orange {
  color: var(--orange);
  background: var(--orange-pale);
}

.trust-strip strong {
  font-family: var(--display);
  font-size: 0.92rem;
}

.trust-strip small {
  margin-top: 0.55rem;
  color: var(--navy-soft);
  font-size: 0.73rem;
  line-height: 1.5;
}

.trust-strip b {
  margin-top: auto;
  padding-top: 1rem;
  color: var(--blue);
  font-size: 0.72rem;
}

.guide {
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--rule);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

.guide-intro {
  padding: clamp(2rem, 4vw, 3.6rem);
  background:
    radial-gradient(circle at 92% 5%, rgba(7, 92, 244, 0.1), transparent 18rem),
    linear-gradient(135deg, #fbfdff, #f2f7ff);
  border-bottom: 1px solid var(--rule);
  text-align: center;
}

.guide-lead {
  max-width: 720px;
  margin: 1rem auto 0;
  color: var(--navy-soft);
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.guide-section {
  display: grid;
  gap: 2rem;
  padding: clamp(2rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--rule);
  grid-template-columns: 58px minmax(0, 1fr);
}

.guide-section:last-child {
  border-bottom: 0;
}

.section-number {
  display: grid;
  width: 46px;
  height: 46px;
  color: white;
  background: var(--blue);
  border-radius: 13px;
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 800;
  place-items: center;
  box-shadow: 0 9px 18px rgba(7, 92, 244, 0.18);
}

.guide-copy {
  max-width: 900px;
}

.guide-copy h2,
.faq-heading h2,
.disclaimer h2 {
  margin-bottom: 1.1rem;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  font-weight: 750;
  letter-spacing: -0.04em;
}

.guide-copy > p {
  margin: 0 0 1rem;
  color: var(--navy-soft);
  font-size: 0.96rem;
}

.guide-copy > p:first-of-type {
  color: var(--navy);
}

.formula-card {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.6rem;
  padding: 1.15rem;
  color: var(--navy);
  background: var(--blue-pale);
  border: 1px solid #bfd4fb;
  border-radius: 12px;
  align-items: center;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.formula-card b {
  color: var(--blue);
  font-size: 1.2rem;
}

.conversion-table-wrap {
  margin-top: 1.6rem;
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

caption {
  padding: 0.8rem 1rem;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--rule);
  font-weight: 700;
  text-align: left;
}

th,
td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
}

th {
  color: var(--navy);
  background: var(--blue-pale);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.source-link {
  display: inline-flex;
  gap: 0.55rem;
  margin-top: 0.35rem;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 700;
}

.section-cards {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.6rem;
  grid-template-columns: 1fr 1fr;
}

.section-cards > div {
  padding: 1.2rem;
  background: var(--surface-soft);
  border: 1px solid var(--rule);
  border-radius: 12px;
}

.section-cards span {
  color: var(--blue);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-cards h3 {
  margin: 0.42rem 0 0.55rem;
  font-size: 1rem;
}

.section-cards p {
  margin: 0;
  color: var(--navy-soft);
  font-size: 0.78rem;
}

.faq-section {
  padding: 4rem 0;
}

.faq-heading {
  max-width: 650px;
  margin: 0 auto 1.8rem;
  text-align: center;
}

.faq-heading h2 {
  margin: 0.7rem 0 0.55rem;
}

.faq-heading > p:last-child {
  margin: 0;
  color: var(--navy-soft);
}

.faq-list {
  display: grid;
  gap: 0.75rem 1rem;
  grid-template-columns: 1fr 1fr;
}

.faq-list details {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--rule);
  border-radius: 11px;
  box-shadow: 0 6px 16px rgba(31, 74, 139, 0.05);
}

.faq-list summary {
  display: flex;
  min-height: 62px;
  gap: 1rem;
  padding: 1rem 1.1rem;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 700;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary span {
  position: relative;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  color: var(--blue);
}

.faq-list summary span::before,
.faq-list summary span::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 1.5px;
  background: currentColor;
  border-radius: 99px;
  content: "";
  transform: translate(-50%, -50%);
}

.faq-list summary span::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform 160ms ease;
}

.faq-list details[open] summary {
  color: var(--blue);
  background: var(--blue-pale);
}

.faq-list details[open] summary span::after {
  transform: translate(-50%, -50%);
}

.faq-list details p {
  margin: 0;
  padding: 0 1.1rem 1rem;
  color: var(--navy-soft);
  font-size: 0.78rem;
}

.disclaimer {
  display: grid;
  gap: 1rem;
  margin-bottom: 4rem;
  padding: 1.35rem 1.5rem;
  color: #5f4c16;
  background: #fff9df;
  border: 1px solid #f2dfa1;
  border-radius: 14px;
  align-items: center;
  grid-template-columns: auto 1fr;
}

.disclaimer-mark {
  display: grid;
  width: 40px;
  height: 40px;
  color: #8c6b06;
  background: #ffedab;
  border-radius: 50%;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 800;
  place-items: center;
}

.disclaimer h2 {
  margin-bottom: 0.3rem;
  color: #51400d;
  font-size: 1rem;
}

.disclaimer p {
  max-width: 980px;
  margin: 0;
  font-size: 0.75rem;
}

.site-footer {
  display: grid;
  gap: 2rem;
  padding: 2.8rem 0 1.5rem;
  border-top: 1px solid var(--rule-strong);
  grid-template-columns: 1.5fr repeat(3, 1fr);
}

.footer-brand {
  margin-bottom: 0.85rem;
}

.site-footer p {
  max-width: 300px;
  margin: 0;
  color: var(--navy-soft);
  font-size: 0.74rem;
}

.footer-column {
  display: flex;
  gap: 0.45rem;
  flex-direction: column;
}

.footer-column strong {
  margin-bottom: 0.25rem;
  font-family: var(--display);
  font-size: 0.78rem;
}

.footer-column a {
  color: var(--navy-soft);
  font-size: 0.73rem;
  text-decoration: none;
}

.footer-column a:hover {
  color: var(--blue);
}

.footer-column .footer-email {
  color: var(--blue);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.copyright {
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
  grid-column: 1 / -1;
  max-width: none !important;
  text-align: center;
}

[data-theme="dark"] .skip-link {
  color: #071226;
  background: #edf4ff;
}

[data-theme="dark"] .hero-notes span,
[data-theme="dark"] .score-stamp {
  background: rgba(16, 30, 53, 0.9);
}

[data-theme="dark"] .calculator-shell {
  background: rgba(16, 30, 53, 0.97);
}

[data-theme="dark"] .input-wrap {
  background: #0a172a;
}

[data-theme="dark"] .results-panel {
  background:
    radial-gradient(circle at 92% 0, rgba(77, 145, 255, 0.12), transparent 14rem),
    var(--surface);
}

[data-theme="dark"] .trust-strip > a {
  background: rgba(16, 30, 53, 0.92);
}

[data-theme="dark"] .guide {
  background: rgba(16, 30, 53, 0.82);
}

[data-theme="dark"] .guide-intro {
  background:
    radial-gradient(circle at 92% 5%, rgba(77, 145, 255, 0.15), transparent 18rem),
    linear-gradient(135deg, #101e35, #0c1a30);
}

[data-theme="dark"] .faq-list details {
  background: rgba(16, 30, 53, 0.94);
}

[data-theme="dark"] .disclaimer {
  color: #eadba9;
  background: #2c2615;
  border-color: #5d5129;
}

[data-theme="dark"] .disclaimer-mark {
  color: #ffdd73;
  background: #4a3d17;
}

[data-theme="dark"] .disclaimer h2 {
  color: #fff0bd;
}

:focus-visible {
  outline: 3px solid rgba(7, 92, 244, 0.45);
  outline-offset: 3px;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1020px) {
  .site-nav > a:not(.nav-cta):nth-child(3),
  .site-nav > a:not(.nav-cta):nth-child(4) {
    display: none;
  }

  .hero {
    padding-inline: 5rem;
  }

  .calculator-shell {
    grid-template-columns: 1fr;
  }

  .calculator-form-panel {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .results-panel {
    min-height: 540px;
  }

  .trust-strip {
    grid-template-columns: 1fr 1fr;
  }

  .trust-strip > a {
    min-height: 220px;
  }
}

@media (max-width: 720px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 28px, 1200px);
  }

  .site-header {
    min-height: 70px;
  }

  .brand {
    font-size: 0.88rem;
  }

  .brand-mark {
    width: 32px;
    height: 38px;
  }

  .site-nav > a:not(.nav-cta) {
    display: none;
  }

  .theme-toggle {
    width: 38px;
    padding: 0;
    justify-content: center;
  }

  .theme-toggle-label {
    display: none;
  }

  .nav-cta {
    min-height: 38px;
    padding: 0.58rem 0.75rem;
    font-size: 0.72rem;
  }

  .hero {
    padding: 2.7rem 0 1.7rem;
  }

  .score-stamp {
    display: none;
  }

  h1 {
    font-size: clamp(2.2rem, 11vw, 3rem);
  }

  .hero-notes {
    gap: 0.4rem;
  }

  .calculator-form-panel,
  .results-panel {
    padding: 1.15rem;
  }

  .panel-heading,
  .results-topline {
    align-items: flex-start;
  }

  .score-input-grid {
    grid-template-columns: 1fr;
  }

  .score-field {
    padding: 0.9rem;
  }

  .results-panel {
    min-height: auto;
  }

  .total-value {
    font-size: 4rem;
  }

  .score-breakdown {
    gap: 0.45rem;
  }

  .score-breakdown div,
  .result-metric {
    min-height: 104px;
    padding-inline: 0.3rem;
  }

  .score-breakdown strong,
  .result-metric strong {
    font-size: 1.3rem;
  }

  .trust-strip {
    margin-bottom: 3.5rem;
    grid-template-columns: 1fr;
  }

  .trust-strip > a {
    min-height: 200px;
  }

  .guide-section {
    gap: 1rem;
    grid-template-columns: 1fr;
  }

  .section-number {
    width: 38px;
    height: 38px;
  }

  .formula-card {
    grid-template-columns: 1fr;
  }

  .formula-card b {
    transform: rotate(90deg);
  }

  .section-cards,
  .faq-list {
    grid-template-columns: 1fr;
  }

  .faq-section {
    padding: 3.5rem 0;
  }

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

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }

  .footer-about,
  .copyright {
    grid-column: 1 / -1;
  }
}

@media (max-width: 420px) {
  .brand > span:last-child {
    max-width: 86px;
    line-height: 1.1;
  }

  .nav-cta span {
    display: none;
  }

  .score-breakdown {
    grid-template-columns: 1fr;
  }

  .score-breakdown div {
    min-height: 82px;
  }

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

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

  .site-footer {
    grid-template-columns: 1fr;
  }

  .footer-column,
  .footer-about,
  .copyright {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
