:root {
  --bg-start: #e8f0f8;
  --bg-end: #d8e3ef;
  --ink: #10263d;
  --muted: #4e6780;
  --line: #c3d9ee;
  --card: rgba(245, 250, 255, 0.92);
  --brand: #1d78dd;
  --brand-deep: #0f4f99;
  --accent: #13ab96;
  --warning: #ef7d2b;
  --shadow: 0 18px 36px rgba(14, 66, 120, 0.13);
  --header-bg: rgba(234, 242, 250, 0.9);
}

* { box-sizing: border-box; }

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

body {
  font-family: "Sora", "Nunito", "Avenir Next", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-start) 0%, var(--bg-end) 100%);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.22;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: min(1160px, 92vw);
  margin: 0 auto;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  z-index: -2;
  filter: blur(6px);
}

.bg-orb.left {
  width: 420px;
  height: 420px;
  left: -120px;
  top: -120px;
  background: radial-gradient(circle at 35% 35%, rgba(29, 120, 221, 0.3), rgba(29, 120, 221, 0));
}

.bg-orb.right {
  width: 460px;
  height: 460px;
  right: -170px;
  bottom: -180px;
  background: radial-gradient(circle at 40% 40%, rgba(19, 171, 150, 0.26), rgba(19, 171, 150, 0));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(146, 182, 217, 0.45);
  background: var(--header-bg);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-image {
  width: 62px;
  height: 62px;
  display: block;
  object-fit: contain;
  aspect-ratio: 1 / 1;
  border-radius: 0;
  border: 0;
  background: transparent;
  padding: 0;
}

.logo {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  border: 1px solid rgba(29, 120, 221, 0.4);
  background: linear-gradient(145deg, #1e90ff, #125db7);
  color: #fff;
  font-weight: 800;
  font-size: 0.94rem;
  letter-spacing: 0.02em;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 18px rgba(15, 72, 136, 0.28);
  position: relative;
  overflow: hidden;
}

.logo::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.logo span {
  position: relative;
  z-index: 1;
}

.brand h1 {
  font-size: 1rem;
  font-weight: 800;
}

.brand small {
  color: var(--muted);
  font-size: 0.74rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #285072;
  font-size: 0.88rem;
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle,
.btn {
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid #b6d4ef;
  cursor: pointer;
}

.theme-toggle {
  background: rgba(255, 255, 255, 0.86);
  color: #1f4769;
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.theme-icon {
  position: absolute;
  line-height: 1;
  font-size: 1rem;
  transition: opacity 180ms ease, transform 180ms ease;
}

.theme-icon-sun {
  opacity: 0;
  transform: scale(0.8) rotate(-18deg);
}

.theme-icon-moon {
  opacity: 1;
  transform: scale(1) rotate(0);
}

body[data-theme="dark"] .theme-icon-sun {
  opacity: 1;
  transform: scale(1) rotate(0);
}

body[data-theme="dark"] .theme-icon-moon {
  opacity: 0;
  transform: scale(0.8) rotate(18deg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn {
  color: #fff;
  border: none;
  background: linear-gradient(140deg, var(--brand), var(--brand-deep));
  box-shadow: 0 10px 18px rgba(24, 91, 163, 0.25);
  padding: 10px 16px;
}

main {
  padding: 44px 0 56px;
}

.hero-card {
  border: 1px solid #bcd8f1;
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #bbd8f5;
  background: #ecf5ff;
  color: #1e527d;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  padding: 7px 10px;
}

.hero-card h2 {
  margin-top: 12px;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  max-width: 20ch;
}

.hero-card p {
  margin-top: 12px;
  max-width: 66ch;
}

.meta-strip {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.meta-pill {
  border: 1px solid #c8ddf2;
  border-radius: 13px;
  background: #f4faff;
  padding: 10px;
}

.meta-pill span {
  display: block;
  font-size: 0.7rem;
  color: #4e6780;
  font-weight: 700;
}

.meta-pill strong {
  display: block;
  margin-top: 4px;
  font-size: 0.84rem;
  color: #163956;
}

.layout {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 0.95fr 2.05fr;
  gap: 14px;
}

.toc,
.content-card {
  border: 1px solid #c3daef;
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.toc {
  padding: 16px;
  height: fit-content;
  position: sticky;
  top: 98px;
}

.toc h3 {
  font-size: 0.95rem;
}

.toc ul {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.toc a {
  display: block;
  border: 1px solid #d1e5f6;
  border-radius: 11px;
  background: #f5fbff;
  color: #214f78;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 9px 10px;
}

.toc a.is-active {
  border-color: #7fb4e8;
  background: #e9f4ff;
  color: #11436f;
}

.content-card {
  padding: 20px;
}

.policy-section + .policy-section {
  margin-top: 14px;
}

.policy-section {
  border: 1px solid #cbe0f3;
  border-radius: 16px;
  background: #f9fcff;
  padding: 14px;
}

.policy-section h3 {
  font-size: 1rem;
}

.policy-section p {
  margin-top: 8px;
  font-size: 0.9rem;
}

.policy-section ul {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.policy-section li {
  position: relative;
  padding-left: 16px;
  font-size: 0.86rem;
  color: #466179;
}

.policy-section li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}

.callout {
  margin-top: 12px;
  border: 1px solid #c7ddf3;
  border-radius: 14px;
  background: linear-gradient(145deg, #edf6ff, #e4f3f1);
  padding: 12px;
}

.callout strong {
  display: block;
  font-size: 0.9rem;
}

.callout p {
  margin-top: 6px;
  font-size: 0.84rem;
}

.footer {
  margin-top: 18px;
  border: 1px solid #c3daef;
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.footer-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-links a {
  border: 1px solid #c8def1;
  border-radius: 999px;
  background: #f5fbff;
  color: #1f4d77;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 8px 12px;
}

body[data-theme="dark"] {
  --bg-start: #0d1b31;
  --bg-end: #081426;
  --ink: #e8f2ff;
  --muted: #b2c6df;
  --line: #395878;
  --card: rgba(15, 33, 57, 0.88);
  --header-bg: rgba(7, 19, 35, 0.84);
}

body[data-theme="dark"] .logo,
body[data-theme="dark"] .theme-toggle,
body[data-theme="dark"] .meta-pill,
body[data-theme="dark"] .toc a,
body[data-theme="dark"] .policy-section,
body[data-theme="dark"] .footer-links a,
body[data-theme="dark"] .callout {
  border-color: #456689;
  background: rgba(19, 42, 71, 0.9);
  color: #d8e8fd;
}

body[data-theme="dark"] .policy-section p,
body[data-theme="dark"] .policy-section li,
body[data-theme="dark"] .brand small,
body[data-theme="dark"] p,
body[data-theme="dark"] .meta-pill span,
body[data-theme="dark"] .callout p,
body[data-theme="dark"] .nav-links {
  color: #b8cde7;
}

body[data-theme="dark"] .logo {
  border-color: #4f79a6;
  background: linear-gradient(145deg, #3d9eff, #216fcb);
}

body[data-theme="dark"] .brand-logo-image {
  border: 0;
  background: transparent;
}

body[data-theme="dark"] .meta-pill strong,
body[data-theme="dark"] .toc h3,
body[data-theme="dark"] .policy-section h3,
body[data-theme="dark"] .callout strong,
body[data-theme="dark"] .brand h1 {
  color: #e7f1ff;
}

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

  .toc {
    position: static;
  }

  .meta-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
  }

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