:root {
  color-scheme: light;
  --ink: #172d35;
  --ink-soft: #4b626b;
  --paper: #f6f8f5;
  --paper-strong: #ffffff;
  --line: #d9dfd7;
  --blue: #315f8a;
  --blue-strong: #244967;
  --teal: #116b68;
  --teal-soft: #dcefed;
  --coral: #c95f43;
  --coral-soft: #f8dfd7;
  --amber: #c28a14;
  --amber-soft: #f7e6b8;
  --green: #587343;
  --green-soft: #e4ecd9;
  --shadow: 0 18px 42px rgba(23, 45, 53, 0.14);
  --radius: 8px;
  --header-height: 78px;
  --body-background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(246, 248, 245, 0.96) 46%, #eef3f1 100%);
  --header-background: rgba(255, 255, 255, 0.94);
  --header-border: rgba(23, 45, 53, 0.12);
  --surface-background: var(--paper-strong);
  --surface-border: rgba(23, 45, 53, 0.12);
  --surface-shadow: 0 10px 26px rgba(23, 45, 53, 0.07);
  --section-border: rgba(23, 45, 53, 0.08);
  --nav-background: #ffffff;
  --nav-hover-background: var(--teal);
  --nav-active-background: var(--blue);
  --brand-mark-background: #ffffff;
  --button-background: var(--blue);
  --button-background-hover: var(--blue-strong);
  --button-color: #ffffff;
  --button-secondary-background: #ffffff;
  --button-secondary-color: var(--ink);
  --button-ghost-background: #ffffff;
  --button-ghost-border: rgba(49, 95, 138, 0.25);
  --tool-background: linear-gradient(135deg, #e7f1ef 0%, #f7f9f4 44%, #f5e7dc 100%);
  --warning-background: linear-gradient(180deg, #fffaf0 0%, var(--amber-soft) 100%);
  --warning-border: rgba(194, 138, 20, 0.36);
  --success-background: linear-gradient(180deg, #f8fff3 0%, var(--green-soft) 100%);
  --success-border: rgba(88, 115, 67, 0.3);
  --inline-code-background: rgba(49, 95, 138, 0.1);
  --inline-code-color: #244967;
  --code-background: #112b34;
  --code-color: #eff8f6;
  --table-head-background: var(--blue-strong);
  --table-head-color: #ffffff;
  --control-background: #ffffff;
  --control-color: var(--ink);
  --score-background: #d8e2dc;
  --scroll-shadow: inset -18px 0 18px -20px rgba(23, 45, 53, 0.85);
  --footer-background: #172d35;
  --footer-color: rgba(255, 255, 255, 0.9);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #e9f2f0;
    --ink-soft: #b6c9c6;
    --paper: #111c21;
    --paper-strong: #16272d;
    --line: rgba(219, 232, 228, 0.18);
    --blue: #85b7e2;
    --blue-strong: #a9cceb;
    --teal: #54c7bd;
    --teal-soft: #173634;
    --coral: #f0a085;
    --coral-soft: #4a251f;
    --amber: #f1c15b;
    --amber-soft: #44351a;
    --green: #9abd78;
    --green-soft: #263a24;
    --shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
    --body-background: linear-gradient(180deg, #0d171b 0%, #111c21 48%, #0f2024 100%);
    --header-background: rgba(17, 28, 33, 0.92);
    --header-border: rgba(219, 232, 228, 0.14);
    --surface-background: var(--paper-strong);
    --surface-border: rgba(219, 232, 228, 0.16);
    --surface-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
    --section-border: rgba(219, 232, 228, 0.1);
    --nav-background: rgba(22, 39, 45, 0.92);
    --nav-hover-background: #22635e;
    --nav-active-background: #315f8a;
    --brand-mark-background: #f6f8f5;
    --button-background: #315f8a;
    --button-background-hover: #244967;
    --button-color: #ffffff;
    --button-secondary-background: #22343b;
    --button-secondary-color: var(--ink);
    --button-ghost-background: #15262c;
    --button-ghost-border: rgba(133, 183, 226, 0.34);
    --tool-background: linear-gradient(135deg, #122b2e 0%, #17272d 48%, #2a221d 100%);
    --warning-background: linear-gradient(180deg, rgba(68, 53, 26, 0.74) 0%, rgba(51, 40, 22, 0.92) 100%);
    --warning-border: rgba(241, 193, 91, 0.35);
    --success-background: linear-gradient(180deg, rgba(38, 58, 36, 0.7) 0%, rgba(30, 48, 31, 0.9) 100%);
    --success-border: rgba(154, 189, 120, 0.32);
    --inline-code-background: rgba(133, 183, 226, 0.16);
    --inline-code-color: #c4def5;
    --code-background: #071318;
    --code-color: #eef8f6;
    --table-head-background: #244967;
    --table-head-color: #ffffff;
    --control-background: #101e24;
    --control-color: var(--ink);
    --score-background: rgba(216, 226, 220, 0.18);
    --scroll-shadow: inset -18px 0 18px -20px rgba(233, 242, 240, 0.72);
    --footer-background: #071318;
    --footer-color: rgba(233, 242, 240, 0.9);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--body-background);
  font-family: Inter, "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  line-height: 1.65;
}

body::selection {
  color: var(--button-color);
  background: var(--teal);
}

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

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

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

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

code {
  padding: 0.08rem 0.25rem;
  border-radius: 4px;
  background: var(--inline-code-background);
  color: var(--inline-code-color);
  font-size: 0.95em;
}

pre {
  max-width: 100%;
  margin: 0;
  overflow: auto;
  white-space: pre;
}

pre code {
  display: block;
  min-width: 100%;
  padding: 1rem;
  background: var(--code-background);
  color: var(--code-color);
  line-height: 1.55;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
}

h1 {
  max-width: 24ch;
  font-size: 3.25rem;
}

h2 {
  margin-bottom: 1rem;
  font-size: 2.45rem;
}

h3 {
  margin-bottom: 0.6rem;
  font-size: 1.18rem;
}

p {
  margin: 0 0 1rem;
  overflow-wrap: anywhere;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.45rem;
}

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

caption {
  padding: 0.85rem 1rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: left;
}

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

thead th {
  color: var(--table-head-color);
  background: var(--table-head-background);
}

tbody th {
  color: var(--blue-strong);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 30;
  padding: 0.75rem 1rem;
  color: var(--button-color);
  background: var(--ink);
  border-radius: var(--radius);
}

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

.shell,
main > section,
.site-footer > .footer-inner {
  width: min(1160px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--header-height);
  background: var(--header-background);
  border-bottom: 1px solid var(--header-border);
  backdrop-filter: blur(16px);
}

.header-inner {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1220px, calc(100% - 1.5rem));
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 0.72rem;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--brand-mark-background);
}

.brand-text {
  min-width: 0;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 0.98rem;
  line-height: 1.2;
}

.brand span {
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.25;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  overflow-x: auto;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--nav-background);
  scrollbar-width: thin;
}

.main-nav a {
  flex: 0 0 auto;
  padding: 0.48rem 0.72rem;
  color: var(--ink);
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a:focus {
  color: var(--button-color);
  background: var(--nav-hover-background);
}

.main-nav a[aria-current="page"] {
  color: var(--button-color);
  background: var(--nav-active-background);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--button-background);
  border-radius: var(--radius);
  color: var(--button-color);
  background: var(--button-background);
  font-weight: 850;
  cursor: pointer;
}

.menu-toggle:hover,
.menu-toggle:focus {
  background: var(--button-background-hover);
}

main {
  display: block;
}

main > section {
  padding: 4rem 0;
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

main > section + section {
  border-top: 1px solid var(--section-border);
}

.hero {
  width: 100%;
  max-width: none;
  min-height: 560px;
  display: grid;
  align-items: center;
  padding: 3.5rem 0;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(23, 45, 53, 0.96) 0%, rgba(17, 107, 104, 0.94) 48%, rgba(49, 95, 138, 0.9) 100%);
}

.hero > * {
  width: min(1160px, calc(100% - 2rem));
  margin-inline: auto;
}

.hero .eyebrow,
.kicker {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 1rem;
  padding: 0.36rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.hero .lead {
  max-width: 58rem;
  margin-top: 1.3rem;
  font-size: 1.18rem;
  line-height: 1.65;
}

.hero p:not(.eyebrow):not(.lead) {
  max-width: 56rem;
  color: rgba(255, 255, 255, 0.86);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.68rem 1rem;
  border: 1px solid var(--button-background);
  border-radius: var(--radius);
  color: var(--button-color);
  background: var(--button-background);
  font-weight: 850;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
.button:focus {
  color: var(--button-color);
  background: var(--button-background-hover);
}

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

.button.ghost {
  color: var(--blue);
  background: var(--button-ghost-background);
  border-color: var(--button-ghost-border);
}

.notice {
  padding-block: 2.5rem;
}

.notice,
.card,
.step,
.copy-block,
.tool-panel,
.result-panel {
  min-width: 0;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  background: var(--surface-background);
  box-shadow: var(--surface-shadow);
}

section.notice {
  padding: 1.35rem;
  margin-block: 2.5rem;
}

.notice.warning {
  border-color: var(--warning-border);
  background: var(--warning-background);
}

.notice.success {
  border-color: var(--success-border);
  background: var(--success-background);
}

.cards,
.steps,
.tool-grid,
.dashboard-grid {
  display: grid;
  gap: 1rem;
}

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

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

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

.cards,
.steps {
  margin-top: 1.2rem;
}

.cards > *,
.steps > *,
.tool-grid > *,
.dashboard-grid > * {
  min-width: 0;
}

.card,
.step,
.tool-panel,
.result-panel {
  padding: 1.15rem;
}

.card h3,
.step h3 {
  color: var(--ink);
}

.step {
  position: relative;
  display: grid;
  gap: 0.65rem;
}

.step-number {
  display: inline-grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  font-weight: 900;
}

.table-wrapper {
  position: relative;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  margin-block: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline-offset: 3px;
  background: var(--surface-background);
  box-shadow: var(--scroll-shadow);
}

.checklist {
  list-style: none;
  padding: 0;
}

.checklist li {
  position: relative;
  padding-left: 1.75rem;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid var(--teal);
  border-radius: 3px;
  background: var(--surface-background);
}

.timeline {
  display: grid;
  gap: 1rem;
  margin-top: 1.2rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  padding: 1rem;
  border-left: 6px solid var(--teal);
  border-radius: var(--radius);
  background: var(--paper-strong);
}

.timeline-date {
  color: var(--coral);
  font-weight: 900;
}

.copy-block {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-block: 1.2rem;
}

.copy-block h3 {
  order: 1;
  padding: 1rem 1rem 0;
}

.copy-block p {
  order: 1;
  padding-inline: 1rem;
}

.copy-block pre {
  order: 3;
}

.copy-button {
  order: 2;
  align-self: flex-end;
  min-height: 2rem;
  margin: 0.65rem 0.65rem 0.35rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--button-background);
  border-radius: 6px;
  color: var(--button-color);
  background: var(--button-background);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.copy-button:hover,
.copy-button:focus {
  background: var(--button-background-hover);
}

.card pre {
  max-width: 100%;
  border-radius: var(--radius);
}

.tool-section {
  width: 100%;
  max-width: none;
  padding: 3.5rem 0;
  color: var(--ink);
  background: var(--tool-background);
}

.tool-section > .tool-inner {
  width: min(1160px, calc(100% - 2rem));
  margin-inline: auto;
}

.tool-section h2 {
  max-width: 48rem;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: start;
  margin-top: 1.4rem;
}

.tool-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  margin-top: 1.2rem;
}

.tool-panel label,
.tool-panel legend {
  display: block;
  margin: 0 0 0.35rem;
  color: var(--ink);
  font-weight: 850;
}

.tool-panel fieldset {
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
}

.tool-panel input,
.tool-panel textarea,
.tool-panel select {
  width: 100%;
  min-height: 2.55rem;
  padding: 0.62rem 0.72rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--control-color);
  background: var(--control-background);
}

.tool-panel textarea {
  min-height: 7rem;
  resize: vertical;
}

.choice-list {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.choice-list label {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--control-background);
  font-weight: 650;
}

.choice-list input {
  width: auto;
  min-height: auto;
  margin-top: 0.32rem;
}

.result-panel {
  border-left: 8px solid var(--teal);
}

.result-panel strong {
  color: var(--blue-strong);
}

.score-meter {
  height: 0.8rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--score-background);
}

.score-meter span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--coral), var(--amber), var(--teal));
  transition: width 0.2s ease;
}

.footer-shell,
.site-footer {
  color: var(--footer-color);
  background: var(--footer-background);
}

.site-footer {
  margin-top: 3rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.footer-brand img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--brand-mark-background);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.92rem;
}

.site-footer a {
  color: #fff;
}

@media (max-width: 980px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 0.75rem;
  }

  .main-nav {
    width: 100%;
  }

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

  .dashboard-grid,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 3rem 0;
  }

  h1 {
    font-size: 2.75rem;
  }

  h2 {
    font-size: 2.1rem;
  }
}

@media (max-width: 620px) {
  body {
    line-height: 1.58;
  }

  main > section {
    width: min(100% - 1rem, 1160px);
    padding: 2.7rem 0;
  }

  .hero > * {
    width: min(100% - 1rem, 1160px);
  }

  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.78rem;
  }

  .hero .lead {
    font-size: 1.05rem;
  }

  .brand img {
    width: 46px;
    height: 46px;
  }

  .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .main-nav a {
    padding: 0.42rem 0.58rem;
    font-size: 0.84rem;
  }

  .main-nav {
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible;
  }

  .main-nav.is-open {
    display: grid;
  }

  .main-nav a {
    text-align: center;
  }

  .two-columns,
  .three-columns,
  .four-columns {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media print {
  .site-header,
  .site-footer,
  .hero-actions,
  .copy-button,
  .tool-section {
    display: none !important;
  }

  body {
    background: #fff;
  }

  main > section,
  .hero > * {
    width: 100%;
  }

  .hero {
    min-height: auto;
    color: var(--ink);
    background: #fff;
  }

  .card,
  .step,
  .notice,
  .copy-block {
    box-shadow: none;
  }
}
