@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=IBM+Plex+Mono:wght@500;600&family=Manrope:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;
  --ice: #eaf1fa;
  --paper: #f8fbff;
  --white: #ffffff;
  --ink: #111a2f;
  --ink-soft: #24314d;
  --slate: #5c6b80;
  --line: #c7d3e2;
  --line-strong: #9dadc2;
  --blue: #2f6fed;
  --blue-dark: #174fc1;
  --red: #f05252;
  --red-dark: #c73737;
  --display: "Bricolage Grotesque", "Arial Black", sans-serif;
  --body: "Manrope", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", monospace;
  --shadow: 0 28px 80px rgba(34, 49, 77, 0.13);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scroll-padding-top: 28px;
  background: var(--ice);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(rgba(47, 111, 237, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 111, 237, 0.07) 1px, transparent 1px),
    var(--ice);
  background-position: center top;
  background-size: 42px 42px;
  font-family: var(--body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 0, var(--ice) 600px);
  content: "";
  pointer-events: none;
}

body::selection,
body *::selection {
  color: var(--white);
  background: var(--blue);
}

a {
  color: var(--blue-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--white);
  background: var(--ink);
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  color: var(--white);
  transform: translateY(0);
}

.wrap {
  width: min(1180px, calc(100vw - 48px));
  max-width: none;
  margin: 0 auto;
  padding: 32px 0 64px;
}

header {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 284px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding: clamp(32px, 6vw, 72px);
  overflow: hidden;
  border: 0;
  border-radius: 34px;
  color: var(--white);
  background: var(--ink);
  box-shadow: var(--shadow);
}

header::before {
  position: absolute;
  inset: -60% -10% -65% 38%;
  z-index: -2;
  background:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 44px 44px;
  content: "";
  transform: rotate(-8deg);
}

header::after {
  position: absolute;
  right: clamp(30px, 7vw, 92px);
  bottom: clamp(78px, 10vw, 118px);
  z-index: -1;
  width: 250px;
  height: 34px;
  background:
    radial-gradient(circle at 17px 17px, var(--blue) 0 10px, transparent 11px),
    radial-gradient(circle at 71px 17px, var(--red) 0 10px, transparent 11px),
    radial-gradient(circle at 125px 17px, var(--blue) 0 10px, transparent 11px),
    radial-gradient(circle at 179px 17px, var(--red) 0 10px, transparent 11px),
    radial-gradient(circle at 233px 17px, var(--blue) 0 10px, transparent 11px);
  content: "";
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.22));
  transform: rotate(-8deg);
}

.title {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
  color: var(--white);
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.legal-brand:hover {
  color: var(--white);
}

.legal-brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  grid-template-columns: repeat(5, 5px);
  align-items: center;
  gap: 1px;
  padding: 9px 3px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  transform: rotate(-8deg);
}

.legal-brand-mark i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
}

.legal-brand-mark i:nth-child(2),
.legal-brand-mark i:nth-child(4) {
  background: var(--red);
}

h1 {
  max-width: 760px;
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: clamp(2.8rem, 7vw, 5.9rem);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.92;
}

.sub {
  margin: 0;
  color: #c7d5e8;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.pill {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 13px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.79rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.pill:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}

.pill-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(240, 82, 82, 0.2);
}

main {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: clamp(20px, 4vw, 48px);
  margin-top: 26px;
}

nav {
  position: sticky;
  top: 24px;
  display: block;
  align-self: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(248, 251, 255, 0.92);
  box-shadow: 0 16px 44px rgba(34, 49, 77, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

nav h2 {
  margin: 0 0 14px;
  color: var(--slate);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.toc {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  position: relative;
  display: block;
  padding: 9px 10px 9px 25px;
  border: 0;
  border-radius: 10px;
  color: var(--ink-soft);
  font-size: 0.79rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease;
}

.toc a::before {
  position: absolute;
  top: 50%;
  left: 9px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper);
  content: "";
  transform: translateY(-50%);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.toc a:hover,
.toc a[aria-current="true"] {
  color: var(--blue-dark);
  background: rgba(47, 111, 237, 0.08);
}

.toc a:hover::before,
.toc a[aria-current="true"]::before {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.12);
}

article {
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(34, 49, 77, 0.09);
}

section {
  padding: clamp(30px, 5vw, 54px) clamp(26px, 6vw, 70px);
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}

section:first-of-type {
  border-top: 0;
}

section:target {
  background: linear-gradient(90deg, rgba(47, 111, 237, 0.07), transparent 60%);
}

h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

p,
li {
  color: var(--ink-soft);
}

p {
  max-width: 74ch;
  margin: 0 0 14px;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 12px 0 0;
  padding-left: 1.3rem;
}

li + li {
  margin-top: 8px;
}

strong {
  color: var(--ink);
}

.muted {
  color: var(--slate);
}

.callout {
  margin: 20px 0 0;
  padding: 20px 22px;
  border: 1px solid rgba(47, 111, 237, 0.22);
  border-left: 4px solid var(--blue);
  border-radius: 0 16px 16px 0;
  background: rgba(47, 111, 237, 0.065);
}

.callout + .callout {
  margin-top: 12px;
}

code,
.mono {
  padding: 3px 7px;
  border: 1px solid rgba(199, 211, 226, 0.9);
  border-radius: 7px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.1);
  font-family: var(--mono);
  font-size: 0.86em;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.legal-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink-soft);
  background: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.legal-links a:hover {
  border-color: var(--blue);
  color: var(--blue-dark);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding: 0 5px;
  color: var(--slate);
  font-size: 0.75rem;
}

footer a {
  color: var(--ink-soft);
  font-weight: 700;
}

.print-note {
  display: none;
}

@media (max-width: 900px) {
  header {
    min-height: 250px;
  }

  header::after {
    right: -40px;
    opacity: 0.65;
  }

  main {
    grid-template-columns: 1fr;
  }

  nav {
    position: static;
    overflow: hidden;
    padding: 16px;
  }

  .toc {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  .toc li {
    flex: 0 0 auto;
    margin: 0;
    scroll-snap-align: start;
  }

  .toc a {
    min-height: 42px;
    padding: 11px 14px 11px 29px;
    border: 1px solid var(--line);
    background: var(--white);
    white-space: nowrap;
  }

  .toc a::before {
    left: 12px;
  }
}

@media (max-width: 620px) {
  .wrap {
    width: min(100% - 24px, 1180px);
    padding: 12px 0 38px;
  }

  header {
    min-height: 300px;
    grid-template-columns: 1fr;
    align-content: space-between;
    padding: 25px 22px;
    border-radius: 24px;
  }

  header::before {
    inset: -35% -80% -45% 30%;
  }

  header::after {
    right: -82px;
    bottom: 90px;
    opacity: 0.52;
  }

  .legal-brand {
    margin-bottom: 42px;
  }

  h1 {
    font-size: clamp(2.65rem, 15vw, 4.4rem);
  }

  .pill {
    justify-self: start;
  }

  main {
    gap: 14px;
    margin-top: 14px;
  }

  nav,
  article {
    border-radius: 20px;
  }

  section {
    padding: 30px 22px;
  }

  .callout {
    padding: 18px;
  }

  footer {
    display: grid;
    justify-content: stretch;
    padding: 0 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  body {
    color: #111;
    background: #fff;
  }

  .wrap {
    width: 100%;
    padding: 0;
  }

  header,
  article {
    color: #111;
    background: #fff;
    box-shadow: none;
  }

  header {
    min-height: 0;
    padding: 0 0 28px;
  }

  header::before,
  header::after,
  nav,
  .pill,
  .legal-brand,
  footer {
    display: none;
  }

  h1,
  .sub,
  p,
  li {
    color: #111;
  }

  article {
    border: 0;
  }

  section {
    padding: 24px 0;
    break-inside: avoid;
  }

  .print-note {
    display: block;
  }
}
