:root {
  --bg: #fcfcff;
  --bg-soft: #f5f7ff;
  --surface: #ffffff;
  --surface-2: #f8f9ff;
  --text: #0e1b3f;
  --text-soft: #2d3b66;
  --brand: #1e2f68;
  --brand-2: #c6921a;
  --focus: #b8860b;
  --border: #d8dff2;
  --max-width: 1280px;
  --header-height: 72px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(circle at 92% 6%, #f6e8bf 0%, #fff9e8 16%, transparent 44%),
    radial-gradient(circle at 8% 0%, #e9efff 0%, #f4f6ff 26%, transparent 48%),
    var(--bg);
  color: var(--text);
  line-height: 1.7;
}

a {
  color: #1a2f6b;
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.18em;
  text-decoration-color: #d9b45f;
  transition: color 160ms ease, text-decoration-color 160ms ease, text-shadow 160ms ease, background-size 180ms ease;
}

a:visited {
  color: #2f3f7f;
  text-decoration-color: #c8a758;
}

a:hover {
  color: #0f2257;
  text-decoration-color: #e2bc62;
  text-shadow: 0 1px 0 #fff5dd;
}

.prose a,
.breadcrumbs a,
.related-links a,
.footer-inner nav a,
.card a {
  background-image: linear-gradient(120deg, #fdf2cf, #ffe6a6);
  background-repeat: no-repeat;
  background-size: 0% 100%;
  background-position: 0 100%;
  border-radius: 0.2rem;
}

.prose a:hover,
.breadcrumbs a:hover,
.related-links a:hover,
.footer-inner nav a:hover,
.card a:hover {
  background-size: 100% 100%;
}

a:focus-visible {
  outline: 2px solid #c6921a;
  outline-offset: 2px;
  border-radius: 0.25rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 1000;
  background: #fff;
  color: #111;
  padding: 0.5rem 0.75rem;
  border-radius: 0.4rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, #ffffff 90%, transparent);
  border-bottom: 1px solid var(--border);
}

.header-inner,
.footer-inner,
.page-shell {
  width: min(calc(100% - 2.5rem), var(--max-width));
  margin-inline: auto;
}

.header-inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.main-nav a {
  color: var(--text-soft);
  text-decoration: none;
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  transition: all 160ms ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
  background: #eef2ff;
  box-shadow: inset 0 0 0 1px #e7c780;
  transform: translateY(-1px);
}

.page-shell {
  padding-block: 2.2rem 3rem;
  min-height: calc(100svh - var(--header-height));
}

.hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1.2rem;
  align-items: stretch;
}

.eyebrow {
  color: var(--brand-2);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  color: #101f49;
  text-shadow: 0 1px 0 #fff6dd;
}

.hero p {
  color: var(--text-soft);
}

.hero-panel,
.card,
.related-links,
.content-main {
  background: linear-gradient(170deg, #ffffff, #f7f9ff);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 8px 24px #0f1e4312;
}

.hero-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  padding: 0.82rem 1.15rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.015em;
  border: 1px solid transparent;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background-position 280ms ease,
    color 180ms ease;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.18) 48%, transparent 60%);
  transform: translateX(-120%);
  opacity: 0;
  transition: transform 500ms ease, opacity 200ms ease;
  pointer-events: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px #0f1e4326;
}

.btn:hover::before {
  transform: translateX(120%);
  opacity: 1;
}

.btn:focus-visible {
  outline: 3px solid #c6921a;
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(120deg, #0d1c43 0%, #122758 58%, #173573 100%);
  color: #fff8e8;
  border-color: #d7b65a;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.48);
  box-shadow: 0 10px 24px #101f4920, inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.btn-primary:hover {
  border-color: #e5c46f;
  box-shadow: 0 16px 32px #101f4930, 0 0 0 1px #e5c46f55, inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.btn-secondary {
  background: linear-gradient(180deg, #fffdf5 0%, #fff4d7 100%);
  color: #152b63;
  border-color: #e6c66f;
  box-shadow: 0 8px 18px #c6921a1a, inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.btn-secondary:hover {
  border-color: #c6921a;
  box-shadow: 0 14px 28px #c6921a22, inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.icon svg {
  fill: currentColor;
}

.btn .icon {
  display: inline-grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.btn-secondary .icon {
  background: rgba(18, 36, 90, 0.08);
}

.btn-primary .icon {
  background: rgba(255, 255, 255, 0.18);
}

/* Homepage CTA buttons: keep them flat and readable, without layered effects. */
.home-actions .btn {
  min-width: 15.5rem;
  justify-content: center;
  box-shadow: none;
  text-shadow: none;
}

.home-actions .btn::before {
  display: none;
}

.home-actions .btn:hover,
.home-actions .btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: none;
}

.home-actions .btn-primary {
  background: #10244f;
  color: #fff9ea;
  border-color: #d8b85f;
}

.home-actions .btn-primary:hover {
  background: #132a5d;
  color: #fff9ea;
  border-color: #e3c46f;
}

.home-actions .btn-secondary {
  background: #fff8e8;
  color: #10244f;
  border-color: #d6b45a;
}

.home-actions .btn-secondary:hover {
  background: #fff3d2;
  color: #10244f;
  border-color: #e0bf68;
}

.home-actions .btn .icon {
  background: rgba(255, 255, 255, 0.16);
}

.home-actions .btn-secondary .icon {
  background: rgba(16, 36, 79, 0.08);
}

.home-actions .btn-primary .icon {
  background: rgba(255, 255, 255, 0.18);
}

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

.home-midnight {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.75rem;
  padding: 2.4rem 0.6rem;
}

.home-midnight .eyebrow {
  margin-bottom: 0;
}

.home-divider {
  width: min(100%, 64rem);
  height: 1px;
  margin: 0.2rem auto;
  background: linear-gradient(90deg, transparent 0%, rgba(198, 146, 26, 0.8) 16%, rgba(16, 36, 79, 0.42) 50%, rgba(198, 146, 26, 0.8) 84%, transparent 100%);
  opacity: 0.9;
}

.home-title {
  margin: 0;
  font-size: clamp(2.05rem, 3.6vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #12245a;
  text-wrap: balance;
}

.home-what {
  margin: 0.1rem 0 0;
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  color: #8a6515;
  font-weight: 700;
}

.home-copy {
  margin: 0.35rem auto 0;
  max-width: 74ch;
  color: var(--text-soft);
}

.home-copy-strong {
  color: #10244f;
  font-weight: 700;
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
  max-width: 60rem;
  position: relative;
  padding-top: 0.55rem;
}

.home-copy-strong::before {
  content: "";
  display: block;
  width: 4.5rem;
  height: 2px;
  margin: 0 auto 0.6rem;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #c6921a, transparent);
}

.home-bullets {
  list-style: none;
  margin: 0.15rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem 1rem;
  width: min(100%, 64rem);
}

.home-bullets li {
  color: #243764;
  margin: 0;
  padding: 0.45rem 0.1rem;
  border-top: 1px solid #e4d6a3;
  border-bottom: 1px solid transparent;
  text-wrap: balance;
}

.home-bullets li::before {
  content: "✦";
  color: #c6921a;
  margin-right: 0.4rem;
}

.home-overview {
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.home-overview h3 {
  margin: 0;
  font-size: 1.02rem;
  color: #7a5a12;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.home-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  width: min(100%, 64rem);
  align-items: start;
}

.home-overview-pillar {
  text-align: left;
}

.home-overview-pillar h4 {
  margin: 0 0 0.35rem;
  color: #132a5d;
  font-size: 1.05rem;
}

.home-overview-pillar p {
  margin: 0;
  color: var(--text-soft);
}

.home-overview-pillar ul {
  margin: 0.45rem 0 0;
  padding-left: 1.2rem;
}

.home-overview-pillar li {
  color: #2a3a67;
  margin: 0.25rem 0;
}

.home-overview-pillar li::marker {
  color: #c6921a;
}

.home-relevant {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  margin-top: 0.4rem;
}

.home-relevant h3 {
  margin: 0;
  font-size: 1rem;
  color: #7a5a12;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.home-relevant-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  max-width: 52rem;
}

.home-relevant-links a {
  font-weight: 700;
  color: #132a5d;
  text-decoration-color: #d8b85f;
}

.home-relevant-links a:hover {
  color: #0d1f49;
  text-decoration-color: #e3c46f;
}

.home-links {
  margin-top: 0.35rem;
  display: grid;
  gap: 0.55rem;
}

.home-links a {
  display: block;
  font-weight: 700;
  font-size: clamp(1.08rem, 1.9vw, 1.3rem);
  color: #142b67;
  text-decoration-color: #d3a948;
}

.home-links a:hover {
  color: #0e1f50;
  text-decoration-color: #e1bb61;
}

.home-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.card h2 {
  margin-top: 0;
  color: #12245a;
}

.card a {
  color: #1a2d66;
  text-decoration-color: #d9b45f;
}

.card a:hover {
  color: #112357;
  text-decoration-color: #e4bf66;
}

.content-page {
  display: grid;
  gap: 1rem;
}

.breadcrumbs {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  flex-wrap: wrap;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.content-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.related-links h2 {
  margin-top: 0;
}

.related-links {
  margin-top: 0.35rem;
}

.related-links ul {
  padding-left: 1rem;
}

.prose :is(h1, h2, h3, h4) {
  color: #101f49;
  scroll-margin-top: calc(var(--header-height) + 16px);
  line-height: 1.25;
}

.prose h1 {
  font-size: clamp(1.8rem, 2.8vw, 2.6rem);
  line-height: 1.15;
  position: relative;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid #ecd49a;
}

.prose h2 {
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  margin-top: 2rem;
  position: relative;
  padding-left: 0.85rem;
}

.prose h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  bottom: 0.12em;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #1f3473, #c6921a);
}

.prose h3,
.prose h4 {
  color: #1b326e;
}

.prose p,
.prose li {
  color: var(--text-soft);
}

.prose a {
  color: #16306d;
  font-weight: 560;
  text-decoration-color: #d8b25a;
}

.prose a:hover {
  color: #0f2258;
  text-decoration-color: #e5c067;
}

.breadcrumbs a,
.related-links a,
.footer-inner nav a {
  font-weight: 550;
}

.prose ul,
.prose ol {
  padding-left: 1.35rem;
}

.prose li {
  margin: 0.3rem 0;
}

.prose ul li::marker {
  color: #c6921a;
}

.prose ol li::marker {
  color: #1d3170;
  font-weight: 700;
}

.prose pre {
  position: relative;
  max-width: 100%;
  overflow-x: auto;
  border-radius: 0.85rem;
  border: 1px solid #d9c27f;
  background: linear-gradient(180deg, #fffdf7, #fff7e7);
  padding: 1rem;
}

.prose pre code {
  color: #16295d;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.prose pre code.hljs {
  display: block;
  background: transparent;
  min-width: 0;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, monospace;
  font-size: 0.92em;
}

.prose :not(pre) > code {
  color: #16295d;
  background: #e9eeff;
  border-radius: 0.35rem;
  padding: 0.12rem 0.35rem;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-title {
  color: #1c2f68;
}

.hljs-string,
.hljs-attr,
.hljs-template-variable {
  color: #9f6d00;
}

.hljs-comment,
.hljs-quote {
  color: #6f7ea6;
  font-style: italic;
}

.hljs-number,
.hljs-symbol,
.hljs-bullet {
  color: #b78412;
}

.hljs-function,
.hljs-title.function_,
.hljs-title.class_,
.hljs-variable,
.hljs-property,
.hljs-selector-class,
.hljs-selector-id,
.hljs-built_in,
.hljs-type,
.hljs-params,
.hljs-meta,
.hljs-tag,
.hljs-name,
.hljs-operator,
.hljs-punctuation {
  color: #223b79;
}

.copy-code-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  border: 1px solid #e0bf69;
  background: #ffe9b0;
  color: #4d3a11;
  border-radius: 0.45rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.copy-code-btn:hover {
  background: #ffdd8c;
}

.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 1rem 0;
}

.prose table th,
.prose table td {
  border: 1px solid #d4def5;
  padding: 0.55rem 0.7rem;
  white-space: nowrap;
}

.prose blockquote {
  margin-left: 0;
  border-left: 4px solid #c6921a;
  padding-left: 1rem;
  color: #2b3a66;
}

/* Keep markdown task lists interactive and easy to tap. */
.prose input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  margin-right: 0.5rem;
  accent-color: #c6921a;
}

.heading-anchor {
  color: #8a6b22;
  margin-left: 0.3rem;
  text-decoration: none;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, #f5f7ff, #f1f4ff);
}

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

.footer-inner nav {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

@media (max-width: 1024px) {
  :root {
    --max-width: 980px;
  }

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

  .content-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  :root {
    --header-height: auto;
  }

  .header-inner {
    padding-block: 0.65rem;
    height: auto;
    flex-direction: column;
    align-items: flex-start;
  }

  .page-shell {
    width: min(calc(100% - 1.1rem), var(--max-width));
    padding-top: 1.2rem;
  }

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

  .home-title {
    font-size: clamp(1.7rem, 8.2vw, 2.4rem);
  }

  .home-actions {
    flex-direction: column;
    align-items: stretch;
    width: min(100%, 24rem);
    margin-inline: auto;
  }

  .home-actions .btn {
    justify-content: center;
  }

  .home-overview-grid {
    grid-template-columns: 1fr;
  }

  .home-bullets {
    grid-template-columns: 1fr;
  }

  .home-divider {
    width: min(100%, 32rem);
  }
}

