:root {
  --purple: #5a32a3;
  --purple-dark: #402276;
  --purple-light: #f2edfb;
  --gold: #eda132;
  --ink: #191726;
  --muted: #615d70;
  --line: #e4dfec;
  --surface: #ffffff;
  --background: #f7f5fa;
  --danger: #a32d42;
  --success: #28724f;
  --shadow: 0 12px 34px rgba(50, 30, 80, 0.10);
  color-scheme: light dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  color: var(--ink);
  background: var(--background);
}
a { color: var(--purple); text-underline-offset: 0.18em; }
a:hover { color: var(--purple-dark); }
img { max-width: 100%; }
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  padding: 10px 14px;
  color: #fff;
  background: var(--purple-dark);
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { top: 12px; }
.site-header {
  color: #fff;
  background: linear-gradient(135deg, #43237d 0%, #6d3dba 62%, #9a5ee2 100%);
  box-shadow: 0 5px 20px rgba(38, 20, 65, 0.22);
}
.header-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  text-decoration: none;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.brand img {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  box-shadow: 0 5px 14px rgba(0,0,0,0.22);
}
.brand-text small {
  display: block;
  margin-top: 2px;
  color: rgba(255,255,255,0.75);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
nav a {
  display: inline-block;
  padding: 8px 11px;
  border-radius: 999px;
  color: rgba(255,255,255,0.90);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 650;
}
nav a:hover, nav a[aria-current="page"] {
  color: #fff;
  background: rgba(255,255,255,0.17);
}
.hero {
  background:
    radial-gradient(circle at 85% 15%, rgba(237,161,50,0.22), transparent 27%),
    linear-gradient(180deg, #f4effc 0%, var(--background) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 54px;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--purple);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
h1, h2, h3 { line-height: 1.22; letter-spacing: -0.025em; }
h1 { margin: 0; font-size: clamp(2.15rem, 6vw, 4.25rem); }
h2 { margin-top: 2.25rem; font-size: clamp(1.45rem, 3vw, 2.05rem); }
h3 { margin-top: 1.65rem; font-size: 1.18rem; }
.hero p { max-width: 760px; font-size: 1.1rem; color: var(--muted); }
.meta { font-size: 0.92rem; color: var(--muted); }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 17px;
  border: 1px solid var(--purple);
  border-radius: 12px;
  color: #fff;
  background: var(--purple);
  text-decoration: none;
  font-weight: 750;
  box-shadow: 0 7px 18px rgba(90,50,163,0.18);
}
.button:hover { color: #fff; background: var(--purple-dark); }
.button.secondary { color: var(--purple); background: transparent; box-shadow: none; }
.button.secondary:hover { color: var(--purple-dark); background: var(--purple-light); }
main { width: min(1040px, calc(100% - 32px)); margin: 0 auto; padding: 38px 0 76px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 42px; align-items: start; }
.content { min-width: 0; }
.toc {
  position: sticky;
  top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.toc strong { display: block; margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 1.25rem; }
.toc li { margin: 5px 0; font-size: 0.91rem; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 28px 0; }
.card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card h2, .card h3 { margin-top: 0; }
.card .icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 12px;
  color: var(--purple);
  background: var(--purple-light);
  font-size: 1.25rem;
}
.callout {
  margin: 24px 0;
  padding: 18px 20px;
  border-left: 5px solid var(--gold);
  border-radius: 12px;
  background: #fff7e8;
}
.callout.important { border-left-color: var(--danger); background: #fff0f2; }
.callout.safe { border-left-color: var(--success); background: #eef9f3; }
.policy-section {
  scroll-margin-top: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.policy-section:last-child { border-bottom: 0; }
ul, ol { padding-left: 1.35rem; }
li { margin: 0.35rem 0; }
table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 0.95rem; }
th, td { padding: 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--purple-light); }
details {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 5px 16px rgba(50,30,80,0.06);
}
summary { padding: 16px 18px; cursor: pointer; font-weight: 750; }
details > div { padding: 0 18px 18px; color: var(--muted); }
.contact-box {
  margin-top: 34px;
  padding: 26px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
}
.contact-box a { color: #fff; }
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 38px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; }
.muted { color: var(--muted); }
.tag {
  display: inline-block;
  margin: 3px 4px 3px 0;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--purple-dark);
  background: var(--purple-light);
  font-size: 0.82rem;
  font-weight: 700;
}
code { padding: 0.12em 0.35em; border-radius: 5px; background: var(--purple-light); }
@media (max-width: 820px) {
  .header-inner { align-items: flex-start; flex-direction: column; }
  .layout { grid-template-columns: 1fr; }
  .toc { position: static; order: -1; }
  .card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .hero-inner { padding-top: 44px; }
  nav ul { gap: 2px; }
  nav a { padding: 7px 8px; font-size: 0.86rem; }
  th, td { padding: 9px; }
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f4f0fb;
    --muted: #c4bed0;
    --line: #42394f;
    --surface: #211d28;
    --background: #151219;
    --purple-light: #2d2240;
    --shadow: 0 12px 34px rgba(0,0,0,0.25);
  }
  .hero { background: linear-gradient(180deg, #251c33 0%, var(--background) 100%); }
  .callout { background: #3c301c; }
  .callout.important { background: #3a2027; }
  .callout.safe { background: #1c3429; }
  th { background: #30243f; }
}
