:root {
  color-scheme: light;
  --page-bg: #f7f9ff;
  --section-bg: #eef7ff;
  --surface: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.86);
  --text-primary: #141827;
  --text-secondary: #596174;
  --text-muted: #667085;
  --brand-primary: #8b5cf6;
  --brand-action: #7c3aed;
  --brand-action-hover: #6d28d9;
  --accent-cyan: #00a6d6;
  --link-color: #007a99;
  --accent-magenta: #d946ef;
  --border-lavender: #d8ccff;
  --border-cyan: #c8e7f4;
  --focus-ring: #8b5cf6;
  --brand-gradient: linear-gradient(
    90deg,
    #8b5cf6 0%,
    #00a6d6 54%,
    #d946ef 100%
  );
  --radius: 14px;
  --header-height: 72px;
  --page-padding: clamp(1rem, 4vw, 2.5rem);
  --shadow-soft: 0 16px 42px rgba(82, 67, 145, 0.08);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1.5rem);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--page-bg);
  color: var(--text-primary);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
summary,
a {
  -webkit-tap-highlight-color: transparent;
}

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

a:hover {
  text-decoration-thickness: 0.12em;
}

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

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  color: var(--text-primary);
  font-weight: 720;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

button {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  transform: translateY(-180%);
  border-radius: var(--radius);
  background: var(--text-primary);
  color: #ffffff;
  padding: 0.75rem 1rem;
  font-weight: 700;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-height);
  background: rgba(247, 249, 255, 0.97);
}

.site-header::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--brand-gradient);
  content: "";
}

.site-header__inner {
  display: flex;
  width: min(100%, 1280px);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--page-padding);
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.wordmark {
  display: inline-flex;
  min-height: 44px;
  flex: 0 0 auto;
  align-items: center;
  text-decoration: none;
}

.wordmark__logo {
  display: block;
  width: auto;
  height: 40px;
}

.desktop-nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 0.25rem;
}

.desktop-nav a {
  display: inline-flex;
  min-height: 44px;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  padding: 0 0.85rem;
  align-items: center;
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
}

.desktop-nav a:hover {
  color: var(--text-primary);
  background: rgba(216, 204, 255, 0.22);
}

.desktop-nav a[aria-current="page"] {
  border-bottom-color: var(--brand-action);
  color: var(--brand-action);
}

.mobile-menu {
  display: none;
  position: relative;
}

.page-shell {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding-right: var(--page-padding);
  padding-left: var(--page-padding);
}

.article-hero {
  border-bottom: 1px solid var(--border-cyan);
  padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(2.5rem, 6vw, 5rem);
}

.breadcrumb {
  margin-bottom: clamp(2rem, 5vw, 3.75rem);
}

.breadcrumb ol {
  display: flex;
  margin: 0;
  padding: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  list-style: none;
}

.breadcrumb li + li::before {
  margin-right: 0.45rem;
  color: var(--brand-primary);
  content: "/";
}

.breadcrumb a {
  color: var(--link-color);
}

.article-hero__accent {
  width: 3.5rem;
  height: 3px;
  margin-bottom: 1.1rem;
  border-radius: var(--radius);
  background: var(--brand-gradient);
}

.article-kicker {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 700;
}

.article-kicker span {
  margin: 0 0.45rem;
  color: var(--accent-cyan);
}

.article-hero h1 {
  max-width: 980px;
  margin-bottom: 1.35rem;
  font-size: clamp(2.2rem, 5.2vw, 4.45rem);
  line-height: 1.06;
}

.article-intro {
  max-width: 760px;
  margin-bottom: 1.2rem;
  color: var(--text-secondary);
  font-size: clamp(1.08rem, 1.6vw, 1.22rem);
  line-height: 1.68;
}

.effective-date {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 650;
}

.article-layout {
  padding-top: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: clamp(4rem, 8vw, 7.5rem);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(240px, 288px);
  justify-content: space-between;
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: start;
}

.article-flow {
  grid-row: 1;
  grid-column: 1;
  min-width: 0;
}

.toc-column {
  grid-row: 1;
  grid-column: 2;
  min-width: 0;
}

.toc-disclosure {
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
}

.toc-disclosure > summary {
  display: none;
}

.toc-nav {
  max-height: calc(100dvh - var(--header-height) - 3rem);
  overflow-y: auto;
  border: 1px solid var(--border-lavender);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 1.1rem 0.85rem 1.25rem;
  scrollbar-width: thin;
}

.toc-title {
  margin: 0 0 0.7rem;
  padding: 0 0.75rem;
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 760;
}

.toc-nav ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc-nav a {
  display: flex;
  min-height: 38px;
  border-left: 3px solid transparent;
  color: var(--text-secondary);
  padding: 0.48rem 0.65rem 0.48rem 0.75rem;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 590;
  line-height: 1.28;
  text-decoration: none;
}

.toc-nav a:hover {
  color: var(--text-primary);
  background: var(--section-bg);
}

.toc-nav a[aria-current="location"] {
  border-left-color: var(--brand-action);
  background: rgba(216, 204, 255, 0.3);
  color: var(--brand-action);
  font-weight: 740;
}

.toc-item--nested a {
  padding-left: 1.05rem;
  font-size: 0.79rem;
}

.article-flow > section + section {
  margin-top: clamp(3.75rem, 8vw, 6.5rem);
}

.article-flow h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.75rem, 3.4vw, 2.45rem);
  line-height: 1.16;
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

.article-flow h3,
.article-flow h4 {
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

.quick-answer {
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius);
  background: var(--section-bg);
  padding: clamp(1.4rem, 4vw, 2.25rem);
}

.quick-answer h2 {
  margin-bottom: 0.9rem;
}

.answer-lead {
  margin-bottom: 2rem;
  color: var(--text-primary);
  font-size: 1.08rem;
  font-weight: 560;
  line-height: 1.68;
}

.quick-answer h3 {
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.takeaways {
  margin: 0;
  padding: 0;
  counter-reset: takeaway;
  list-style: none;
}

.takeaways li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.8rem;
  border-top: 1px solid var(--border-cyan);
  padding: 0.9rem 0;
  align-items: start;
  color: var(--text-secondary);
  line-height: 1.55;
  counter-increment: takeaway;
}

.takeaways li::before {
  display: inline-flex;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--border-lavender);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--brand-action);
  align-items: center;
  justify-content: center;
  font-size: 0.77rem;
  font-weight: 800;
  content: counter(takeaway);
}

.takeaways li:last-child {
  padding-bottom: 0;
}

.boundary-section {
  border-left: 3px solid var(--accent-cyan);
  background: rgba(238, 247, 255, 0.62);
  padding: 0.35rem 0 0.35rem clamp(1.2rem, 3vw, 2rem);
}

.boundary-section p,
.boundary-section li,
.section-answer,
.conclusion-section p,
.faq-section > p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

.boundary-section ul {
  margin: 1.25rem 0 0;
  padding-left: 1.25rem;
}

.boundary-section li + li {
  margin-top: 0.7rem;
}

.document-section > .section-answer {
  margin-bottom: 1.4rem;
}

.document-meta {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 2.75rem;
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem 1.1rem;
}

.document-meta div {
  display: grid;
  grid-template-columns: minmax(8.5rem, 0.35fr) minmax(0, 1fr);
  gap: 0.75rem;
}

.document-meta dt {
  color: var(--text-secondary);
  font-weight: 700;
}

.document-meta dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.legal-copy {
  font-size: 1.125rem;
  line-height: 1.72;
}

.legal-copy h3 {
  margin: clamp(3.25rem, 7vw, 5.25rem) 0 1rem;
  font-size: clamp(1.42rem, 2.5vw, 1.82rem);
  line-height: 1.24;
}

.legal-copy h4 {
  margin: 2.5rem 0 0.85rem;
  font-size: clamp(1.18rem, 2vw, 1.35rem);
  line-height: 1.3;
}

.legal-copy p {
  margin-bottom: 1.2rem;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.legal-copy ul,
.legal-copy ol {
  margin: 1.1rem 0 1.6rem;
  padding-left: 1.4rem;
}

.legal-copy li {
  padding-left: 0.25rem;
}

.legal-copy li + li {
  margin-top: 0.65rem;
}

.legal-copy strong {
  font-weight: 740;
}

.legal-copy code {
  border: 1px solid var(--border-cyan);
  border-radius: 0.4rem;
  background: var(--section-bg);
  padding: 0.12em 0.35em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}

.heading-anchor {
  margin-left: 0.45rem;
  color: var(--brand-action);
  font-size: 0.72em;
  font-weight: 650;
  opacity: 0;
  text-decoration: none;
}

h2:hover > .heading-anchor,
h3:hover > .heading-anchor,
h4:hover > .heading-anchor,
.heading-anchor:focus-visible {
  opacity: 1;
}

.table-scroll {
  max-width: 100%;
  margin: 2rem 0;
  overflow-x: auto;
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius);
  background: var(--surface);
  scrollbar-width: thin;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.5;
}

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

th {
  background: var(--section-bg);
  color: var(--text-primary);
  font-weight: 760;
}

td {
  color: var(--text-secondary);
}

tbody th {
  background: var(--surface);
  color: var(--text-secondary);
  font-weight: 720;
}

tr:last-child :is(th, td) {
  border-bottom: 0;
}

[data-align="right"] {
  text-align: right;
}

.conclusion-section {
  border: 1px solid var(--border-lavender);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: clamp(1.4rem, 4vw, 2.25rem);
}

.conclusion-section p:last-child {
  margin-bottom: 0;
}

.faq-section > .section-answer {
  margin-bottom: 1.5rem;
}

.faq-list {
  border-top: 1px solid var(--border-lavender);
}

.faq-item {
  border-bottom: 1px solid var(--border-lavender);
}

.faq-item summary {
  position: relative;
  min-height: 62px;
  padding: 1.15rem 3rem 1.15rem 0;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1.04rem;
  font-weight: 710;
  line-height: 1.42;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  color: var(--brand-action);
  font-size: 1.4rem;
  font-weight: 500;
  transform: translateY(-50%);
  content: "+";
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer {
  padding: 0 2.75rem 1.3rem 0;
}

.faq-answer p {
  margin-bottom: 0;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

.share-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border-top: 1px solid var(--border-cyan);
  padding-top: 2rem;
  gap: 1.25rem 2rem;
  align-items: center;
}

.share-section h2 {
  margin-bottom: 0.45rem;
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
}

.share-section p {
  margin-bottom: 0;
  color: var(--text-secondary);
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  min-height: 46px;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 720;
  line-height: 1;
  white-space: nowrap;
}

.button:active {
  transform: translateY(1px);
}

.button--primary {
  border: 1px solid var(--brand-action);
  background: var(--brand-action);
  color: #ffffff;
}

.button--primary:hover {
  border-color: var(--brand-action-hover);
  background: var(--brand-action-hover);
}

.button--secondary {
  border: 1px solid var(--brand-action);
  background: var(--surface);
  color: var(--brand-action);
}

.button--secondary:hover {
  background: rgba(216, 204, 255, 0.3);
}

.share-status {
  grid-column: 1 / -1;
  min-height: 1.5em;
  color: var(--brand-action) !important;
  font-size: 0.92rem;
  font-weight: 700;
}

.related-grid {
  display: grid;
  margin: 1.5rem 0 0;
  padding: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  list-style: none;
}

.related-card {
  display: flex;
  height: 100%;
  min-height: 250px;
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.4rem;
  flex-direction: column;
  color: var(--text-primary);
  text-decoration: none;
}

.related-card:hover {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.related-card__category {
  margin-bottom: 1.1rem;
  color: var(--link-color);
  font-size: 0.82rem;
  font-weight: 760;
}

.related-card__title {
  margin-bottom: 0.8rem;
  font-size: 1.16rem;
  font-weight: 750;
  line-height: 1.35;
}

.related-card__summary {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.58;
}

.related-card__date {
  margin-top: auto;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.site-footer {
  border-top: 1px solid var(--border-cyan);
  background: var(--section-bg);
}

.site-footer__inner {
  display: grid;
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 2.5rem var(--page-padding);
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 2rem;
  align-items: start;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.site-footer__brand {
  margin-bottom: 0.35rem;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 760;
}

.site-footer p:last-child {
  margin-bottom: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.2rem;
}

.site-footer a {
  color: var(--link-color);
}

@media (min-width: 901px) {
  .toc-disclosure:not([open]) > .toc-nav {
    display: block !important;
  }
}

@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .toc-column,
  .article-flow {
    grid-row: auto;
    grid-column: 1;
  }

  .toc-column {
    order: -1;
  }

  .toc-disclosure {
    position: static;
    border: 1px solid var(--border-lavender);
    border-radius: var(--radius);
    background: var(--surface);
  }

  .toc-disclosure > summary {
    display: flex;
    min-height: 52px;
    padding: 0.85rem 1rem;
    align-items: center;
    cursor: pointer;
    color: var(--text-primary);
    font-weight: 740;
  }

  .toc-nav {
    max-height: min(62dvh, 520px);
    border: 0;
    border-top: 1px solid var(--border-lavender);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: none;
    padding-top: 0.7rem;
  }

  .toc-title {
    display: none;
  }

  .toc-nav a {
    min-height: 44px;
  }

  .share-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .share-actions {
    grid-column: 1;
  }

  .site-footer__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 800px) {
  :root {
    --header-height: 64px;
  }

  .desktop-nav {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  .wordmark__logo {
    height: 36px;
  }

  .mobile-menu > summary {
    display: inline-flex;
    min-width: 64px;
    min-height: 44px;
    border: 1px solid var(--border-lavender);
    border-radius: var(--radius);
    background: var(--surface);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 720;
    list-style: none;
  }

  .mobile-menu > summary::-webkit-details-marker {
    display: none;
  }

  .mobile-menu nav {
    position: absolute;
    top: calc(100% + 0.65rem);
    right: 0;
    display: grid;
    width: min(82vw, 290px);
    border: 1px solid var(--border-lavender);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    padding: 0.5rem;
  }

  .mobile-menu nav a {
    display: flex;
    min-height: 46px;
    border-left: 3px solid transparent;
    color: var(--text-secondary);
    padding: 0.65rem 0.8rem;
    align-items: center;
    font-weight: 650;
    text-decoration: none;
  }

  .mobile-menu nav a[aria-current="page"] {
    border-left-color: var(--brand-action);
    background: rgba(216, 204, 255, 0.3);
    color: var(--brand-action);
  }

  .document-meta div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }

  .article-hero {
    padding-top: 1.6rem;
  }

  .breadcrumb {
    margin-bottom: 2.2rem;
  }

  .article-hero h1 {
    font-size: clamp(2rem, 10vw, 3rem);
    line-height: 1.08;
  }

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

  .related-card {
    min-height: 0;
  }
}

@media (max-width: 420px) {
  .wordmark__logo {
    height: 32px;
  }

  .article-kicker span {
    display: block;
    width: 2.5rem;
    height: 2px;
    margin: 0.45rem 0;
    overflow: hidden;
    background: var(--brand-gradient);
    color: transparent;
  }

  .quick-answer,
  .conclusion-section,
  .related-card {
    padding: 1.15rem;
  }

  .legal-copy {
    font-size: 1.04rem;
  }

  .share-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .button {
    width: 100%;
  }
}

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

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

@media print {
  .site-header,
  .skip-link,
  .toc-column,
  .share-section,
  .related-section,
  .site-footer,
  .heading-anchor {
    display: none !important;
  }

  body {
    background: #ffffff;
  }

  .article-hero,
  .article-layout {
    padding: 1.5rem 0;
  }

  .content-grid {
    display: block;
  }

  a {
    color: inherit;
  }
}
