:root {
  --primary: #0f3b5f;
  --primary-deep: #0d2448;
  --secondary: #1a3a6a;
  --gold: #c8952a;
  --gold-light: #e8b923;
  --ink: #1a2a3a;
  --muted: #6a7a8a;
  --line: #d0d8e8;
  --surface: #f5f7fb;
  --surface-warm: #f5f2e9;
  --white: #ffffff;
  --shadow: 0 20px 60px rgba(13, 36, 72, 0.14);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Inter, Lato, Arial, sans-serif;
  line-height: 1.6;
}

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

a {
  color: var(--primary);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--gold);
}

button,
input,
select,
textarea {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  background: var(--white);
  color: var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(208, 216, 232, 0.75);
  backdrop-filter: blur(14px);
}

.header-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  min-height: 84px;
  display: grid;
  grid-template-columns: minmax(190px, 280px) 1fr auto;
  align-items: center;
  gap: 1rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  width: min(260px, 52vw);
  height: auto;
}

.site-nav {
  justify-self: end;
}

.site-nav ul {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.45rem 0.7rem;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 750;
  text-decoration: none;
  border-radius: var(--radius);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--primary);
  background: #eef3fb;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--primary);
  background: var(--white);
}

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.72rem 1rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button svg,
.icon-button svg {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
  color: var(--white);
  background: var(--secondary);
  box-shadow: 0 12px 28px rgba(13, 36, 72, 0.18);
}

.button.secondary {
  background: var(--gold);
  color: var(--primary-deep);
}

.button.secondary:hover {
  background: var(--gold-light);
  color: var(--primary-deep);
}

.button.ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.36);
}

.button.light {
  color: var(--primary);
  background: var(--white);
  border: 1px solid var(--line);
}

.button.light:hover {
  color: var(--primary);
  background: #eef3fb;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(560px, 76svh, 780px);
  display: grid;
  align-items: end;
  color: var(--white);
  overflow: hidden;
}

.hero.compact {
  min-height: clamp(420px, 54svh, 620px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--primary-deep) center / cover no-repeat;
  background-image: var(--hero-image);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(13, 36, 72, 0.92) 0%, rgba(15, 59, 95, 0.72) 45%, rgba(13, 36, 72, 0.28) 100%),
    linear-gradient(0deg, rgba(13, 36, 72, 0.88) 0%, rgba(13, 36, 72, 0) 45%);
}

.hero-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 7rem 0 5rem;
}

.hero-content {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--gold-light);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--primary-deep);
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  color: var(--white);
  max-width: 880px;
  font-size: clamp(3rem, 8vw, 6.7rem);
}

.hero-title-tight {
  font-size: clamp(2.9rem, 7vw, 5.8rem);
}

.hero p {
  max-width: 700px;
  margin: 1.2rem 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.section {
  padding: clamp(4rem, 7vw, 7rem) 0;
}

.section.tight {
  padding: clamp(2.7rem, 5vw, 4.5rem) 0;
}

.section.navy {
  color: var(--white);
  background: var(--primary-deep);
}

.section.navy h2,
.section.navy h3,
.section.navy p,
.section.navy li {
  color: var(--white);
}

.section.soft {
  background: var(--surface);
}

.section.warm {
  background: var(--surface-warm);
}

.container {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

.section-head {
  max-width: 780px;
  margin-bottom: 2.4rem;
}

.section-head.center {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(2.1rem, 4.8vw, 4rem);
}

.section-head p {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.section.navy .section-head p {
  color: rgba(255, 255, 255, 0.78);
}

.grid {
  display: grid;
  gap: 1rem;
}

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

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

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

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.split.flip {
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1fr);
}

.media-frame {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--line);
}

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

.media-frame.tall img {
  aspect-ratio: 3 / 4;
}

.card {
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 30px rgba(13, 36, 72, 0.06);
}

.card.dark {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.card.dark h3,
.card.dark p,
.card.dark li {
  color: var(--white);
}

.card h3 {
  font-size: 1.15rem;
}

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

.card ul,
.check-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.card li,
.check-list li {
  position: relative;
  padding-left: 1.35rem;
  margin: 0.45rem 0;
}

.card li::before,
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 99px;
  background: var(--gold);
}

.icon-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  color: var(--primary);
  background: #eef3fb;
}

.icon-mark svg {
  width: 24px;
  height: 24px;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
}

.stat {
  padding: 1.3rem;
  background: var(--white);
}

.stat strong {
  display: block;
  color: var(--primary);
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted);
  font-weight: 700;
}

.feature-list {
  display: grid;
  gap: 0.75rem;
}

.feature-item {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem;
  border-left: 4px solid var(--gold);
  background: var(--white);
  border-radius: var(--radius);
}

.feature-item h3 {
  font-size: 1.05rem;
}

.feature-item p {
  margin: 0.3rem 0 0;
  color: var(--muted);
}

.cta-band {
  padding: clamp(2.4rem, 5vw, 4rem);
  border-radius: var(--radius);
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(15, 59, 95, 0.96), rgba(13, 36, 72, 0.98)),
    var(--primary);
  box-shadow: var(--shadow);
}

.cta-band h2,
.cta-band p {
  color: var(--white);
}

.cta-band p {
  max-width: 760px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.3rem;
}

.filter-button {
  min-height: 40px;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--primary);
  font-weight: 800;
  cursor: pointer;
}

.filter-button.is-active {
  color: var(--white);
  background: var(--primary);
  border-color: var(--primary);
}

.resource-card {
  display: grid;
  gap: 0.8rem;
  min-height: 100%;
}

.resource-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  color: var(--primary);
  background: #eef3fb;
}

.book-showcase {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.book-art {
  filter: drop-shadow(0 24px 38px rgba(13, 36, 72, 0.18));
}

.workbook-shell {
  display: grid;
  grid-template-columns: minmax(230px, 0.35fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.workbook-sidebar {
  position: sticky;
  top: 104px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.progress-track {
  height: 10px;
  margin: 0.8rem 0 0.3rem;
  overflow: hidden;
  border-radius: 99px;
  background: #e0e6f0;
}

.progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width 180ms ease;
}

.workbook-step {
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 30px rgba(13, 36, 72, 0.06);
}

.workbook-step h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

.field {
  display: grid;
  gap: 0.38rem;
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.field.full {
  grid-column: 1 / -1;
}

.field label,
.checkbox-list legend {
  color: var(--primary-deep);
  font-weight: 850;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 0.78rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafbfd;
  color: var(--ink);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.checkbox-list {
  display: grid;
  gap: 0.6rem;
  margin: 1.1rem 0 0;
  padding: 0;
  border: 0;
}

.checkbox-list label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.checkbox-list input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.2rem;
  accent-color: var(--gold);
  flex: 0 0 auto;
}

.workbook-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.certificate {
  margin-top: 1.2rem;
  padding: 2rem;
  border: 8px solid var(--gold);
  border-radius: var(--radius);
  text-align: center;
  background: #fef9f0;
}

.certificate h3 {
  color: var(--primary);
  font-size: clamp(1.8rem, 5vw, 3.3rem);
}

.certificate-name {
  margin: 1rem 0;
  color: var(--primary-deep);
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1;
}

.blueprint {
  margin-top: 1.4rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 18px 44px rgba(13, 36, 72, 0.08);
}

.blueprint-cover {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: end;
  padding: clamp(1.4rem, 3vw, 2rem);
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(15, 59, 95, 0.98), rgba(13, 36, 72, 0.98)),
    var(--primary);
}

.blueprint-cover h3,
.blueprint-cover p {
  color: var(--white);
}

.blueprint-cover h3 {
  margin-top: 0.35rem;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.blueprint-seal {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(232, 185, 35, 0.7);
  border-radius: 999px;
  color: var(--gold-light);
  font-weight: 900;
  text-align: center;
}

.blueprint-body {
  display: grid;
  gap: 1rem;
  padding: clamp(1.1rem, 3vw, 1.5rem);
}

.blueprint-section {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafbfd;
}

.blueprint-section h4 {
  margin-bottom: 0.7rem;
  color: var(--primary);
  font-size: 1rem;
  text-transform: uppercase;
}

.blueprint-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.blueprint-list li {
  padding: 0.7rem 0.8rem;
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  background: var(--white);
}

.blueprint-list strong {
  color: var(--primary-deep);
}

.tool-summary {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8f9fb;
}

.readout-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.readout {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.readout span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.readout strong {
  display: block;
  margin-top: 0.2rem;
  color: var(--primary);
  font-size: clamp(1.25rem, 3vw, 1.85rem);
  line-height: 1.1;
}

.readout strong.is-negative {
  color: #c0392b;
}

.planner-output {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.planner-output p {
  margin: 0;
  padding: 0.85rem 1rem;
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  background: var(--white);
}

.meter-card {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.meter-card .progress-track {
  margin-top: 0.6rem;
}

.resource-card.is-interactive {
  border-color: rgba(200, 149, 42, 0.55);
  background:
    linear-gradient(180deg, rgba(232, 185, 35, 0.08), rgba(255, 255, 255, 0) 44%),
    var(--white);
}

.resource-card.is-interactive .tag:first-child {
  color: var(--primary-deep);
  background: #fef3e2;
}

.site-footer {
  color: rgba(255, 255, 255, 0.82);
  background: var(--primary-deep);
}

.footer-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 3.5rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr repeat(3, 1fr);
  gap: 2rem;
}

.footer-logo {
  width: min(260px, 70vw);
  margin-bottom: 1rem;
}

.site-footer h2,
.site-footer h3 {
  color: var(--white);
}

.site-footer ul {
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin: 0.45rem 0;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--gold-light);
}

.footer-bottom {
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.9rem;
}

.footer-bottom .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1020px) {
  .header-inner {
    grid-template-columns: minmax(170px, 1fr) auto;
  }

  .menu-toggle {
    display: grid;
  }

  .site-nav {
    grid-column: 1 / -1;
    display: none;
    justify-self: stretch;
    padding-bottom: 1rem;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    display: grid;
    gap: 0.35rem;
  }

  .site-nav a {
    justify-content: space-between;
    background: var(--surface);
  }

  .header-cta {
    display: none;
  }

  .grid.four,
  .grid.three,
  .stat-row,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split,
  .split.flip,
  .book-showcase,
  .workbook-shell {
    grid-template-columns: 1fr;
  }

  .workbook-sidebar {
    position: static;
  }
}

@media (max-width: 680px) {
  .header-inner {
    width: min(100% - 1rem, var(--max));
    min-height: 72px;
  }

  .brand-logo {
    width: min(220px, 66vw);
  }

  .hero {
    min-height: 620px;
  }

  .hero-inner {
    width: min(100% - 1.25rem, var(--max));
    padding: 6rem 0 3rem;
  }

  h1 {
    font-size: clamp(2.55rem, 13vw, 4rem);
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .stat-row,
  .footer-grid,
  .field-grid,
  .readout-grid,
  .blueprint-cover {
    grid-template-columns: 1fr;
  }

  .blueprint-seal {
    width: 76px;
    height: 76px;
  }

  .section {
    padding: 3.2rem 0;
  }

  .container {
    width: min(100% - 1.25rem, var(--max));
  }

  .hero-actions,
  .workbook-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .icon-button {
    width: 100%;
  }

  .footer-bottom .container {
    display: block;
  }
}

@media print {
  .site-header,
  .site-footer,
  .hero,
  .workbook-sidebar,
  .workbook-actions,
  .section:not(.printable) {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .workbook-step {
    display: block !important;
    border: 0;
    box-shadow: none;
  }
}
