:root {
  --ink: #172838;
  --muted: #5c6872;
  --line: #d9e0e5;
  --soft: #f3f6f8;
  --paper: #ffffff;
  --accent: #5b3f62;
  --accent-dark: #49324f;
  --accent-soft: #f3edf4;
  --blue-soft: #eaf2f7;
  --teal: #08a8a5;
  --shadow: 0 20px 55px rgba(23, 40, 56, 0.09);
  color: var(--ink);
  background: var(--soft);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #fff 0, #fff 27rem, var(--soft) 27rem),
    var(--soft);
  font-size: 1rem;
  line-height: 1.65;
}

a {
  color: var(--accent-dark);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 3px solid rgba(91, 63, 98, 0.32);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.5rem;
  left: 0.5rem;
  transform: translateY(-150%);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  color: #fff;
  background: var(--ink);
}

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

.site-header,
.page-shell,
.site-footer {
  width: min(1320px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem 2rem;
  border-bottom: 1px solid var(--line);
  padding: 1rem 0 0.85rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--ink);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: clamp(13rem, 25vw, 17rem);
  height: auto;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.site-nav a {
  border-radius: 999px;
  padding: 0.5rem 0.7rem;
  color: #334957;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.hero {
  max-width: 900px;
  padding: clamp(3.3rem, 8vw, 6.7rem) 0 clamp(2.6rem, 6vw, 5rem);
}

.hero-compact {
  max-width: 860px;
  padding-bottom: clamp(2.2rem, 5vw, 4rem);
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

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

h1 {
  max-width: 880px;
  margin-bottom: 1rem;
  font-size: clamp(2.45rem, 6vw, 4.85rem);
}

h2 {
  margin-bottom: 0.85rem;
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
}

h3 {
  margin-bottom: 0.65rem;
  font-size: 1.08rem;
  line-height: 1.35;
}

.lede {
  max-width: 800px;
  margin-bottom: 1rem;
  color: #40515f;
  font-size: clamp(1.08rem, 2vw, 1.28rem);
}

.notice {
  max-width: 800px;
  border-left: 4px solid var(--teal);
  border-radius: 0 12px 12px 0;
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  color: #334c5e;
  background: var(--blue-soft);
}

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

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.direct-section,
.content-section,
.article-layout,
.source-card,
.contact-card {
  margin-bottom: clamp(3.5rem, 7vw, 6rem);
}

.section-intro {
  max-width: 720px;
  margin-bottom: 1.5rem;
}

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

.card {
  display: flex;
  min-height: 230px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(1.25rem, 3vw, 1.8rem);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.card .card-label {
  margin-bottom: 1.4rem;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.card p {
  color: var(--muted);
}

.card-link,
.button-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 10px;
  padding: 0.72rem 0.9rem;
  color: #fff;
  background: var(--ink);
  font-weight: 750;
  text-decoration: none;
}

.card-link {
  margin-top: auto;
}

.card-link:hover,
.button-link:hover {
  background: #5b3f62;
}

.button-link--secondary {
  border: 1px solid var(--accent);
  color: var(--accent-dark);
  background: var(--paper);
}

.button-link--secondary:hover {
  color: #fff;
  background: var(--accent);
}

.content-panel,
.article,
.source-card,
.contact-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.content-panel,
.source-card,
.contact-card {
  padding: clamp(1.4rem, 4vw, 2.6rem);
}

.content-panel p,
.content-panel li,
.source-card p,
.source-card li {
  color: #42515e;
}

.content-panel ul,
.source-card ul,
.article ul,
.article ol {
  padding-left: 1.35rem;
}

.content-panel li + li,
.source-card li + li,
.article li + li {
  margin-top: 0.45rem;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.25rem;
  align-items: start;
}

.article-layout--single {
  grid-template-columns: minmax(0, 980px);
  justify-content: center;
}

.article {
  min-width: 0;
  padding: clamp(1.4rem, 4vw, 3rem);
}

.article > section + section {
  border-top: 1px solid var(--line);
  margin-top: 2.25rem;
  padding-top: 2.25rem;
}

.article-subsection {
  margin-top: 2rem;
}

.article-subsection + .article-subsection {
  border-top: 1px solid var(--line);
  padding-top: 1.75rem;
}

.article-subsection h3 {
  margin-bottom: 0.65rem;
  color: var(--ink);
  font-size: clamp(1.16rem, 2vw, 1.35rem);
  line-height: 1.3;
}

.article p,
.article li {
  color: #42515e;
}

.article .example {
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  margin: 1.5rem 0;
  padding: 1.1rem 1.2rem;
  background: var(--accent-soft);
}

.article .example h3 {
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.article .example p:last-child {
  margin-bottom: 0;
}

.article-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.article-links a {
  font-weight: 750;
}

.side-note {
  position: sticky;
  top: 1rem;
  border-radius: 16px;
  padding: 1.25rem;
  color: #fff;
  background: var(--ink);
}

.side-note h2 {
  font-size: 1.45rem;
}

.side-note p {
  color: #dbe6ed;
  font-size: 0.92rem;
}

.side-note a {
  color: #fff;
  font-weight: 750;
}

.source-data {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 1.5rem 0;
}

.source-data div {
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 0;
}

.source-data div:nth-child(odd) {
  padding-right: 1rem;
}

.source-data div:nth-child(even) {
  padding-left: 1rem;
}

.source-data strong,
.source-data span {
  display: block;
}

.source-data strong {
  color: var(--muted);
  font-size: 0.79rem;
  text-transform: uppercase;
}

.source-data span {
  margin-top: 0.2rem;
  font-weight: 700;
}

.download-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 14px;
  margin: 1.5rem 0 0;
  padding: 1rem;
  background: var(--blue-soft);
}

.download-box p {
  margin: 0;
  color: #334c5e;
  font-weight: 700;
}

.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  color: #fff;
  background: var(--ink);
}

.contact-card h2 {
  margin-bottom: 0.65rem;
}

.contact-card p {
  max-width: 720px;
  margin-bottom: 0;
  color: #dbe6ed;
}

.contact-details {
  min-width: 220px;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  padding-left: 2rem;
}

.contact-details p + p {
  margin-top: 0.35rem;
}

.contact-card .contact-button {
  margin-top: 1rem;
  background: white;
  color: var(--accent-dark);
}

.contact-card .contact-button:hover {
  background: var(--accent-soft);
}

.review-date {
  color: var(--muted);
  font-size: 0.84rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid #d8c9dc;
  border-radius: 999px;
  margin-bottom: 1rem;
  padding: 0.35rem 0.7rem;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-badge--provisional {
  border-color: #d6be91;
  color: #674817;
  background: #fff7e8;
}

.year-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.25rem 0 0;
}

.year-links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.72rem;
  color: var(--accent-dark);
  background: #fff;
  font-size: 0.88rem;
  font-weight: 750;
  text-decoration: none;
}

.year-links a:hover,
.year-links a[aria-current="page"] {
  border-color: #c7b2cd;
  background: var(--accent-soft);
}

.data-table-wrap {
  max-width: 100%;
  margin: 1.25rem 0 1.5rem;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-variant-numeric: tabular-nums;
}

.data-table caption {
  padding-bottom: 0.7rem;
  color: var(--ink);
  font-weight: 800;
  text-align: left;
}

.data-table th,
.data-table td {
  border: 1px solid var(--line);
  padding: 0.72rem 0.8rem;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--ink);
  background: var(--accent-soft);
  font-size: 0.9rem;
}

.data-table td:not(:first-child),
.data-table th:not(:first-child) {
  white-space: nowrap;
}

.calculation-box {
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  margin: 1.4rem 0;
  padding: 1.1rem 1.2rem;
  background: var(--accent-soft);
}

.calculation-box p:last-child {
  margin-bottom: 0;
}

.law-text {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(1.1rem, 3vw, 1.8rem);
  background: #fbfcfd;
}

.law-text h3 {
  color: var(--accent-dark);
}

.law-text ol {
  margin-bottom: 0;
}

.law-text ol > li + li {
  margin-top: 1rem;
}

.law-text ol ol {
  margin-top: 0.5rem;
  list-style-type: lower-alpha;
}

.explanation-list {
  display: grid;
  gap: 0.8rem;
  margin: 1.25rem 0 0;
}

.explanation-list > div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  background: #fff;
}

.explanation-list dt {
  color: var(--accent-dark);
  font-weight: 800;
}

.explanation-list dd {
  margin: 0.3rem 0 0;
  color: #42515e;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.7rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--aubergine);
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr;
  }

  .site-nav {
    justify-content: flex-start;
  }

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

  .side-note {
    position: static;
  }

  .contact-card {
    grid-template-columns: 1fr;
  }

  .contact-details {
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    border-left: 0;
    padding-top: 1rem;
    padding-left: 0;
  }
}

@media (max-width: 680px) {
  body {
    background: var(--soft);
  }

  .site-header,
  .page-shell,
  .site-footer {
    width: min(100% - 1.25rem, 1180px);
  }

  .site-header {
    padding-bottom: 0.6rem;
  }

  .brand-logo {
    width: min(13.3rem, 58vw);
  }

  .site-nav {
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 0.2rem 0 0.35rem;
  }

  .site-nav a {
    padding: 0.45rem 0.6rem;
  }

  .hero {
    padding-top: 3rem;
  }

  h1 {
    font-size: clamp(2rem, 9.7vw, 3.1rem);
    hyphens: auto;
    overflow-wrap: break-word;
  }

  .hero-long h1 {
    font-size: clamp(2rem, 8.7vw, 2.75rem);
  }

  .card-grid,
  .source-data {
    grid-template-columns: 1fr;
  }

  .card {
    min-height: 0;
  }

  .card-link {
    margin-top: 0.4rem;
  }

  .source-data div:nth-child(odd),
  .source-data div:nth-child(even) {
    padding-inline: 0;
  }

  .download-box,
  .site-footer {
    display: block;
  }

  .download-box .button-link {
    margin-top: 0.8rem;
  }

  .site-footer p + p {
    margin-top: 0.45rem;
  }
}

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