:root {
  color-scheme: light;
  --bg: #fbfcfd;
  --paper: #ffffff;
  --ink: #0b1325;
  --muted: #526174;
  --line: #d9e2ec;
  --line-strong: #bccada;
  --blue: #1f63d8;
  --blue-dark: #174ca7;
  --green: #25855a;
  --amber: #b46b00;
  --red: #b83227;
  --shadow: 0 20px 60px rgba(16, 34, 55, 0.09);
  --radius: 8px;
  --shell: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(rgba(31, 99, 216, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 99, 216, 0.045) 1px, transparent 1px),
    var(--bg);
  background-size: 34px 34px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.reg {
  position: relative;
  top: -0.3em;
  font-size: 0.72em;
  line-height: 0;
  vertical-align: baseline;
  margin-left: 0.02em;
}

.hero-copy h1 .reg,
.page-hero h1 .reg {
  top: -0.9em;
  font-size: 0.34em;
}

button,
input,
select {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 20;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
}

.skip-link:focus {
  left: 12px;
}

.shell {
  width: min(var(--shell), calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.91);
  backdrop-filter: blur(16px);
}

.nav {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0;
}

.brand-mark {
  width: 28px;
  height: 34px;
  border: 2px solid var(--blue);
  border-radius: 5px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  padding: 5px;
  background: #f4f8ff;
}

.brand-mark span {
  display: block;
  border-radius: 2px;
  background: var(--blue);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #233148;
  font-size: 0.94rem;
  font-weight: 700;
}

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

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--blue);
}

.hero {
  border-bottom: 1px solid var(--line);
}

.section-grid {
  background:
    linear-gradient(90deg, rgba(218, 75, 47, 0.14) 1px, transparent 1px) calc((100% - min(var(--shell), calc(100% - 40px))) / 2) 0 / 1px 100% no-repeat,
    rgba(255, 255, 255, 0.72);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 0.9fr);
  align-items: center;
  gap: 64px;
  padding: 20px 0 14px;
}

.hero-copy h1 {
  margin: 0;
  max-width: 620px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4rem, 7vw, 6rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 610px;
  margin: 18px 0 0;
  color: #17233a;
  font-size: clamp(1.05rem, 2vw, 1.24rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
}

.independence-note {
  max-width: 610px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.button {
  min-height: 44px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  padding: 0 22px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 8px 18px rgba(31, 99, 216, 0.22);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--blue-dark);
}

.button.quiet {
  color: var(--blue);
  background: transparent;
}

.button.full {
  width: 100%;
}

.trust-list {
  margin: 24px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  max-width: 650px;
}

.trust-list div {
  border-top: 1px solid var(--line-strong);
  padding-top: 14px;
}

.trust-list dt {
  font-weight: 800;
  margin-bottom: 4px;
}

.trust-list dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.calculator-card {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

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

.card-head h2,
.card-head p {
  margin: 0;
}

.card-head h2 {
  font-size: 1.32rem;
  letter-spacing: 0;
}

.card-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.reset-button {
  border: 0;
  color: var(--blue);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.score-form {
  display: grid;
  gap: 10px;
}

.score-form label,
.advanced label {
  display: grid;
  gap: 7px;
  color: #253047;
  font-size: 0.9rem;
  font-weight: 800;
}

select,
input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  min-height: 38px;
  padding: 0 12px;
  outline: none;
}

select:focus,
input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31, 99, 216, 0.14);
}

.score-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.with-max {
  display: flex;
  align-items: center;
  gap: 8px;
}

.with-max input {
  text-align: right;
}

.with-max span {
  min-width: 44px;
  color: var(--muted);
  font-weight: 800;
}

.advanced {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 14px;
  background: #fbfdff;
}

.advanced summary {
  color: #27354c;
  cursor: pointer;
  font-weight: 800;
}

.advanced-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.curve-label {
  margin-top: 12px;
}

.result-panel {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.result-label,
.result-summary,
.next-step {
  margin: 0;
}

.result-label {
  color: var(--muted);
  font-weight: 800;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.result-main {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 6px;
}

.result-main strong {
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.8rem;
  line-height: 1;
}

.confidence {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: #e6f4ed;
  color: var(--green);
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 900;
}

#resultSummary {
  margin: 8px 0 0;
  color: #29364d;
}

.meter {
  height: 9px;
  border-radius: 999px;
  background: #e8edf4;
  overflow: hidden;
  margin: 12px 0 8px;
}

.meter span {
  display: block;
  height: 100%;
  width: 64%;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.next-step {
  color: var(--muted);
  font-size: 0.94rem;
}

.score-guide,
.faq {
  padding: 72px 0;
}

.subject-strip {
  padding: 24px 0 72px;
}

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

.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.1;
}

.section-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 720px;
}

.row-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}

.row-heading a,
.source-note a {
  color: var(--blue);
  font-weight: 800;
}

.centered {
  text-align: center;
}

.centered p {
  margin-inline: auto;
}

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

.subject-tile {
  min-height: 128px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  padding: 18px 12px;
  display: grid;
  place-items: center;
  gap: 10px;
  font-weight: 900;
  cursor: pointer;
}

.subject-tile span {
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.2rem;
  line-height: 1;
}

.subject-tile:hover,
.subject-tile:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 12px 28px rgba(22, 49, 85, 0.09);
}

.band {
  padding: 82px 0;
  border-block: 1px solid var(--line);
  background: #f4f8fb;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: 36px;
}

.steps article {
  position: relative;
  min-height: 200px;
  border-top: 1px solid var(--line-strong);
  padding-top: 26px;
}

.steps span {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

.steps article:nth-child(even) span {
  background: var(--green);
}

.steps h3 {
  margin: 18px 0 8px;
}

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

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f7fafc;
  color: #213049;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

td:first-child {
  width: 130px;
  text-align: center;
}

td strong {
  font-size: 1.42rem;
}

.score-five,
.score-four {
  color: var(--green);
}

.score-three {
  color: var(--amber);
}

.source-note {
  margin: 18px auto 0;
  color: var(--muted);
  text-align: center;
  max-width: 850px;
}

.content-section {
  padding: 82px 0;
  border-top: 1px solid var(--line);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 58px;
  align-items: start;
}

.long-copy {
  max-width: 790px;
}

.long-copy h2,
.long-copy h3 {
  color: var(--ink);
  letter-spacing: 0;
}

.long-copy h2 {
  margin: 0 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 3vw, 3rem);
  line-height: 1.1;
}

.long-copy h3 {
  margin: 34px 0 10px;
  font-size: 1.25rem;
}

.long-copy p {
  margin: 0 0 18px;
  color: #28364c;
  font-size: 1.03rem;
}

.study-panel {
  position: sticky;
  top: 100px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  padding: 24px;
  box-shadow: 0 12px 38px rgba(18, 35, 58, 0.08);
}

.study-panel h2 {
  margin: 0;
  font-size: 1.2rem;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 18px 0;
  display: grid;
  gap: 12px;
}

.check-list li {
  position: relative;
  padding-left: 26px;
  color: #2b3850;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}

.mini-card {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.mini-card h3,
.mini-card p {
  margin: 0;
}

.mini-card p {
  margin-top: 8px;
  color: var(--muted);
}

.faq-list {
  max-width: 920px;
  margin-inline: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.faq-list details + details {
  border-top: 1px solid var(--line);
}

.faq-list summary {
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 900;
}

.faq-list p {
  margin: 0;
  padding: 0 22px 20px;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 48px 0 22px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 36px;
}

.footer-grid h2 {
  margin: 0 0 12px;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-grid p,
.fine-print {
  color: var(--muted);
}

.footer-grid a {
  display: block;
  color: #28364c;
  text-decoration: none;
  margin: 8px 0;
}

.footer-brand {
  display: inline-flex;
  margin-bottom: 12px;
}

.copyright {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.88rem;
}

.legal-disclaimer {
  margin-top: 30px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  color: #526174;
  font-size: 0.88rem;
  line-height: 1.5;
}

.page-hero {
  padding: 78px 0 52px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.page-hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.2rem, 7vw, 6rem);
  line-height: 0.95;
}

.page-hero p {
  max-width: 760px;
  color: #233148;
  font-size: 1.14rem;
}

.subject-directory {
  padding: 68px 0;
}

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

.directory-card {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  padding: 22px;
}

.directory-card h2 {
  margin: 0 0 8px;
  font-size: 1.18rem;
}

.directory-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.directory-card a {
  color: var(--blue);
  font-weight: 900;
}

.subject-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 44px;
  align-items: start;
  padding: 72px 0;
}

.detail-copy {
  max-width: 820px;
}

.detail-copy h2 {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 2.6vw, 2.35rem);
  line-height: 1.12;
}

.detail-copy h2:not(:first-child) {
  margin-top: 36px;
}

.detail-copy p {
  margin: 0 0 18px;
  color: #2d3b53;
}

.fact-list {
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
}

.fact-list li {
  border-left: 4px solid var(--blue);
  background: #f7fafc;
  padding: 12px 14px;
}

.subject-aside {
  top: 94px;
}

.subject-aside .button {
  margin-top: 18px;
}

.plain-page {
  padding: 70px 0;
}

.plain-page article {
  max-width: 820px;
}

.plain-page h1 {
  margin: 0 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 6vw, 5rem);
}

.plain-page h2 {
  margin-top: 34px;
}

.plain-page p {
  color: #2d3b53;
}

.contact-card {
  margin: 26px 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  padding: 24px;
}

.contact-card h2,
.contact-card p {
  margin-top: 0;
}

.contact-card a {
  color: var(--blue);
  font-weight: 900;
  font-size: 1.1rem;
}

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

  .hero-grid {
    gap: 36px;
    min-height: auto;
  }

  .calculator-card {
    max-width: 680px;
  }

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

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

  .study-panel {
    position: static;
  }

  .footer-grid,
  .directory-grid,
  .subject-detail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(var(--shell), calc(100% - 28px));
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
  }

  .nav-links {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding-bottom: 0;
  }

  .nav-links a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    padding: 0 6px;
    font-size: 0.86rem;
    text-align: center;
  }

  .hero-grid {
    padding-top: 42px;
  }

  .hero-copy h1 {
    font-size: clamp(3.05rem, 15vw, 5.2rem);
  }

  .hero-actions,
  .score-input-grid,
  .row-heading {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .trust-list,
  .steps,
  .subject-grid,
  .footer-grid,
  .directory-grid,
  .subject-detail {
    grid-template-columns: 1fr;
  }

  .hero .trust-list {
    display: none;
  }

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

  .calculator-card {
    padding: 20px;
  }

  .result-main strong {
    font-size: 4.2rem;
  }
}
