:root {
  --ink: #131515;
  --panel: #ffffff;
  --soft: #eef3f0;
  --line: #d7dfd8;
  --field: #157044;
  --field-dark: #073b2b;
  --gold: #ffd24a;
  --red: #ce3f36;
  --sky: #d7ecff;
  --muted: #60635d;
  --deep: #102820;
  --shadow: 0 16px 40px rgba(17, 24, 19, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(241,247,242,0.9) 420px, #fbfaf5 760px),
    radial-gradient(circle at 8% 0%, rgba(255,210,74,0.2), transparent 28%),
    #fbfaf5;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.6rem 0.9rem;
  background: var(--gold);
  color: var(--ink);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(19, 21, 21, 0.1);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1160px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-links a,
.site-footer a {
  padding: 0.55rem 0.75rem;
  border-radius: 7px;
  color: #2d302b;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-links a:hover,
.site-footer a:hover {
  background: #ece6d8;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 0.55rem 0.75rem;
  font-weight: 800;
}

.hero,
.visual-hero,
.page-hero,
.band,
.split-section,
.content-grid,
.calculator-shell,
.tier-board,
.update-list,
.legal-page {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  align-items: center;
  gap: 2rem;
  padding: 42px 0 20px;
}

.hero-dashboard img,
.visual-hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-copy h1,
.page-hero h1,
.visual-hero h1 {
  margin: 0;
  max-width: 880px;
  font-size: clamp(2rem, 3.15vw, 3.35rem);
  line-height: 1.06;
  letter-spacing: 0;
}

.hero-copy h1 {
  max-width: 680px;
}

.hero-copy p,
.page-hero p,
.visual-hero p,
.section-head p {
  max-width: 700px;
  color: var(--muted);
  font-size: 1rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--field);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.25rem 0;
}

.hero-dashboard {
  border: 1px solid rgba(215, 223, 216, 0.95);
  border-radius: 8px;
  background: rgba(255,255,255,0.84);
  padding: 0.8rem;
  box-shadow: var(--shadow);
}

.hero-dashboard img {
  border-radius: 7px;
}

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

.dashboard-grid a {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfaf5;
  padding: 0.82rem;
  text-decoration: none;
}

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

.dashboard-grid strong {
  display: block;
  margin-top: 0.15rem;
  line-height: 1.15;
}

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

.button.primary {
  background: var(--field);
  color: #fff;
}

.button.secondary {
  border-color: var(--line);
  background: var(--panel);
  color: var(--ink);
}

.facts-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1.1rem 0 0;
}

.facts-strip div,
.task-card,
.note-box,
.source-panel,
.link-grid a,
.role-grid article,
.update-list article,
.code-panel,
.contact-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(17, 24, 19, 0.06);
}

.facts-strip div {
  padding: 0.78rem;
}

dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 0.15rem 0 0;
  font-weight: 900;
}

.news-strip {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid #c8ddcd;
  border-radius: 8px;
  background: #eff9f1;
  padding: 0.9rem 1rem;
}

.news-strip div {
  display: grid;
  gap: 0.18rem;
}

.news-strip span {
  color: #415046;
}

.news-strip a {
  flex: 0 0 auto;
  color: var(--field-dark);
  font-weight: 900;
}

.band {
  padding: 54px 0;
}

.band.muted {
  width: 100%;
  margin-top: 24px;
  padding-left: max(16px, calc((100% - 1160px) / 2));
  padding-right: max(16px, calc((100% - 1160px) / 2));
  background: #edf3ed;
}

.section-head {
  margin-bottom: 1.4rem;
}

.section-head h2,
.split-section h2,
.content-grid h2,
.note-box h2,
.source-panel h2,
.legal-page h1,
.legal-page h2 {
  margin: 0 0 0.7rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.task-grid,
.link-grid,
.role-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.task-card,
.link-grid a,
.role-grid article {
  padding: 1.15rem;
}

.guide-layout {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 1.4rem;
  padding: 44px 0;
}

.guide-article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 1.35rem;
}

.guide-article h2 {
  margin: 0 0 0.7rem;
  line-height: 1.15;
}

.guide-article h3 {
  margin: 1.2rem 0 0.5rem;
}

.guide-article p {
  color: #4d554e;
}

.toc-card {
  align-self: start;
  position: sticky;
  top: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 10px 28px rgba(17, 24, 19, 0.08);
}

.toc-card h2 {
  margin: 0 0 0.8rem;
}

.toc-card a {
  display: block;
  border-top: 1px solid var(--line);
  padding: 0.72rem 0;
  color: var(--field-dark);
  font-weight: 850;
  text-decoration: none;
}

.toc-card p {
  color: var(--muted);
}

.task-card h3,
.link-grid strong,
.role-grid h3 {
  margin: 0 0 0.45rem;
  display: block;
  font-size: 1.05rem;
  line-height: 1.2;
}

.task-card p,
.link-grid span,
.role-grid p {
  margin: 0 0 0.9rem;
  color: var(--muted);
}

.task-card a,
.update-list a,
.text-link {
  color: var(--field-dark);
  font-weight: 850;
}

.step {
  display: inline-flex;
  margin-bottom: 0.9rem;
  color: var(--red);
  font-weight: 950;
}

.split-section,
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.5rem;
  padding: 42px 0;
}

.source-panel,
.note-box {
  padding: 1.2rem;
}

.plain-list {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  color: var(--muted);
}

.mini-calc {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

label {
  display: grid;
  gap: 0.38rem;
  color: #343832;
  font-weight: 850;
}

input {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 0.65rem 0.75rem;
  color: var(--ink);
  font: inherit;
}

.calc-result {
  grid-column: 1 / -1;
  border: 1px solid #b7d3be;
  border-radius: 8px;
  background: #eaf6ee;
  padding: 0.9rem;
  color: var(--field-dark);
  font-weight: 900;
}

.page {
  padding-bottom: 56px;
}

.page-hero {
  padding: 48px 0 24px;
}

.visual-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 2rem;
  align-items: center;
  padding: 48px 0 28px;
}

.visual-hero img {
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.code-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.2rem;
  align-items: start;
  padding: 1.35rem;
  margin: 22px auto 28px;
  width: min(1160px, calc(100% - 32px));
}

.code-panel h2 {
  margin: 0.2rem 0;
  font-size: 3rem;
  line-height: 1;
}

.code-panel dl {
  display: grid;
  gap: 0.8rem;
  margin: 0;
}

.status-pill {
  width: fit-content;
  margin: 0 0 0.7rem;
  border-radius: 999px;
  background: #ece6d8;
  padding: 0.32rem 0.62rem;
  color: #383b35;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-pill.active {
  background: #d7f1dc;
  color: var(--field-dark);
}

.number-list {
  padding-left: 1.3rem;
}

.number-list li {
  margin-bottom: 0.7rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
}

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

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.timeline {
  width: min(980px, calc(100% - 32px));
  margin: 28px auto;
  display: grid;
  gap: 0.9rem;
}

.timeline article {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 1rem;
  border-left: 4px solid var(--field);
  background: var(--panel);
  padding: 1rem;
}

.timeline span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  font-weight: 950;
}

.timeline h2,
.timeline p {
  margin: 0;
}

.timeline p {
  color: var(--muted);
}

.calculator-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.2rem;
  align-items: start;
  padding: 24px 0;
}

.formation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  border: 1px solid #b8d7c2;
  border-radius: 8px;
  background:
    linear-gradient(rgba(255,255,255,0.82), rgba(255,255,255,0.82)),
    linear-gradient(90deg, #0f6b3b, #1e8a4f);
  padding: 1rem;
}

.formation-grid label {
  border-radius: 8px;
  background: rgba(255,255,255,0.9);
  padding: 0.75rem;
}

.calculator-result {
  position: sticky;
  top: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.article-band {
  padding-top: 44px;
}

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

.faq-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 1.05rem;
}

.faq-grid h3 {
  margin: 0 0 0.45rem;
  line-height: 1.2;
}

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

.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  margin: 0.55rem 0;
  padding-left: 1.5rem;
  color: #4d554e;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 50%;
  background: var(--field);
}

.calculator-result output {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 2rem;
  font-weight: 950;
}

.calculator-result strong,
.calculator-result p {
  display: block;
  margin-bottom: 0.9rem;
}

.meter {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e3dfd2;
  margin-bottom: 1rem;
}

.meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--field));
}

.tier-board {
  display: grid;
  gap: 0.9rem;
  padding: 28px 0;
}

.tier-board article {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 1rem;
}

.tier {
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #111;
  font-size: 2rem;
  font-weight: 950;
}

.tier.s { background: var(--gold); }
.tier.a { background: #8bd59b; }
.tier.b { background: var(--sky); }
.tier.c { background: #ead7d4; }

.tier-board h2,
.tier-board p {
  margin: 0;
}

.tier-board p {
  color: var(--muted);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.filter-buttons button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  padding: 0.52rem 0.85rem;
  font-weight: 850;
  cursor: pointer;
}

.filter-buttons button.is-active {
  border-color: var(--field);
  background: var(--field);
  color: #fff;
}

.update-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 16px 0 36px;
}

.update-list article {
  padding: 1.2rem;
}

.update-list h2,
.update-list p {
  margin-top: 0;
}

.legal-page {
  max-width: 820px;
  padding: 64px 0;
}

.legal-page p {
  color: var(--muted);
}

.contact-card {
  display: grid;
  gap: 0.4rem;
  padding: 1rem;
  margin: 1rem 0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 44px;
  border-top: 1px solid var(--line);
}

.site-footer p {
  max-width: 520px;
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-content: start;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 64px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 0.5rem;
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .hero,
  .visual-hero,
  .split-section,
  .content-grid,
  .calculator-shell,
  .code-panel,
  .guide-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    gap: 1.1rem;
    padding-top: 24px;
  }

  .task-grid,
  .link-grid,
  .role-grid,
  .update-list,
  .faq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mini-calc,
  .facts-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calculator-result {
    position: static;
  }

  .toc-card {
    position: static;
  }

  .site-footer {
    flex-direction: column;
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .brand span {
    max-width: 210px;
    white-space: normal;
    line-height: 1.1;
  }

  .hero-copy h1,
  .page-hero h1,
  .visual-hero h1 {
    font-size: 1.62rem;
    line-height: 1.08;
  }

  .hero-copy p,
  .page-hero p,
  .visual-hero p,
  .section-head p {
    font-size: 0.95rem;
  }

  .eyebrow {
    margin-bottom: 0.45rem;
    font-size: 0.72rem;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
    margin: 0.85rem 0;
  }

  .button {
    width: 100%;
    min-height: 42px;
  }

  .task-grid,
  .link-grid,
  .role-grid,
  .update-list,
  .mini-calc,
  .formation-grid,
  .dashboard-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .facts-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin-top: 0.9rem;
  }

  .facts-strip div {
    padding: 0.62rem;
  }

  dt,
  .dashboard-grid span {
    font-size: 0.68rem;
  }

  dd {
    font-size: 0.96rem;
  }

  .hero-dashboard {
    padding: 0.6rem;
  }

  .hero-dashboard img {
    max-height: 160px;
    object-fit: cover;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .dashboard-grid a {
    padding: 0.62rem;
  }

  .dashboard-grid strong {
    font-size: 0.88rem;
  }

  .news-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .tier-board article,
  .timeline article {
    grid-template-columns: 1fr;
  }

  .code-panel h2 {
    font-size: 2.35rem;
  }
}
