:root {
  color-scheme: dark;
  --ink: #f8f4ea;
  --muted: #b9c0c5;
  --night: #07100f;
  --panel: rgba(16, 28, 26, 0.92);
  --panel-strong: #13201d;
  --line: rgba(238, 178, 78, 0.3);
  --ochre: #eea93d;
  --ochre-soft: #ffd38a;
  --cyan: #69e6dc;
  --green: #7edb91;
  --danger: #ff8e78;
  --focus: #fff2b8;
  --radius: 22px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 280px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(238, 169, 61, 0.16), transparent 30rem),
    radial-gradient(circle at 88% 24%, rgba(105, 230, 220, 0.1), transparent 28rem),
    linear-gradient(145deg, #07100f 0%, #0a1514 48%, #111711 100%);
  line-height: 1.65;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 32px 32px;
  content: "";
  pointer-events: none;
}

a {
  color: var(--ochre-soft);
  text-underline-offset: 0.2em;
}

a:hover {
  color: #fff1c8;
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  color: #10130d;
  background: var(--focus);
  border-radius: 10px;
  font-weight: 800;
  transform: translateY(-160%);
}

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

.phase-banner {
  position: fixed;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  max-width: calc(100vw - 1.5rem);
  padding: 0.48rem 0.68rem;
  color: #fff7e7;
  background: rgba(10, 17, 16, 0.94);
  border: 1px solid rgba(238, 169, 61, 0.7);
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.42);
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.phase-banner strong {
  display: grid;
  width: 1.45rem;
  height: 1.45rem;
  place-items: center;
  color: #151107;
  background: var(--ochre);
  border-radius: 50%;
  font-size: 0.78rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  color: #171208;
  background: linear-gradient(145deg, var(--ochre-soft), #bf6c22);
  border: 1px solid #ffd899;
  border-radius: 13px 5px 13px 5px;
  box-shadow: 0 0 28px rgba(238, 169, 61, 0.22);
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.brand > span:last-child {
  display: grid;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.brand small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.site-header nav a {
  min-height: 44px;
  padding: 0.62rem 0.9rem;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 750;
}

.site-header nav a[aria-current="page"],
.site-header nav a:hover {
  color: var(--ink);
  background: rgba(238, 169, 61, 0.1);
  border-color: var(--line);
}

.page-shell {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.2rem 0 7rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(1.5rem, 5vw, 3.8rem);
  background:
    linear-gradient(120deg, rgba(238, 169, 61, 0.13), rgba(105, 230, 220, 0.05)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: clamp(22px, 4vw, 34px);
  box-shadow: var(--shadow);
}

.hero::after {
  position: absolute;
  right: -5rem;
  bottom: -7rem;
  width: 18rem;
  height: 18rem;
  background: radial-gradient(circle, rgba(238, 169, 61, 0.18), transparent 68%);
  border: 1px solid rgba(238, 169, 61, 0.15);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.eyebrow,
.status-pill {
  color: var(--ochre-soft);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 19ch;
  margin: 0.4rem 0 0.8rem;
  font-size: clamp(2rem, 8vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero .lead {
  max-width: 68ch;
  margin: 0;
  color: #d6ddd9;
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.3rem;
}

.status-pill {
  padding: 0.42rem 0.68rem;
  background: rgba(105, 230, 220, 0.08);
  border: 1px solid rgba(105, 230, 220, 0.26);
  border-radius: 999px;
}

.content-section {
  margin-top: 2rem;
  padding: clamp(1.15rem, 3vw, 2rem);
  background: rgba(12, 23, 21, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
}

.content-section > :first-child,
.card > :first-child,
.notice > :first-child {
  margin-top: 0;
}

.content-section > :last-child,
.card > :last-child,
.notice > :last-child {
  margin-bottom: 0;
}

h2,
h3 {
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.45rem, 3vw, 2.15rem);
}

h3 {
  font-size: 1.08rem;
}

p,
li {
  color: #d6ddd9;
}

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

.card,
.topic-card {
  min-width: 0;
  padding: 1.15rem;
  color: inherit;
  background: linear-gradient(145deg, rgba(26, 40, 36, 0.86), rgba(12, 23, 21, 0.86));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 17px;
}

a.topic-card {
  display: block;
  text-decoration: none;
}

.topic-card:hover {
  border-color: rgba(238, 169, 61, 0.58);
  transform: translateY(-2px);
}

.topic-card strong,
.topic-card span {
  display: block;
}

.topic-card strong {
  color: var(--ink);
  font-size: 1.04rem;
}

.topic-card span {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.steps li {
  position: relative;
  min-height: 3.4rem;
  margin: 0 0 0.8rem;
  padding: 0.82rem 0.9rem 0.82rem 3.6rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  counter-increment: steps;
}

.steps li::before {
  position: absolute;
  top: 0.72rem;
  left: 0.8rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: #181208;
  background: var(--ochre);
  border-radius: 10px;
  content: counter(steps, decimal-leading-zero);
  font-size: 0.72rem;
  font-weight: 900;
}

.check-list,
.plain-list {
  padding-left: 1.25rem;
}

.check-list li,
.plain-list li {
  margin-bottom: 0.55rem;
}

.check-list li::marker {
  color: var(--green);
}

.notice {
  margin: 1rem 0;
  padding: 1rem 1.1rem;
  background: rgba(105, 230, 220, 0.075);
  border: 1px solid rgba(105, 230, 220, 0.28);
  border-left: 4px solid var(--cyan);
  border-radius: 14px;
}

.notice.warning {
  background: rgba(238, 169, 61, 0.08);
  border-color: rgba(238, 169, 61, 0.3);
  border-left-color: var(--ochre);
}

.notice.danger {
  background: rgba(255, 142, 120, 0.08);
  border-color: rgba(255, 142, 120, 0.3);
  border-left-color: var(--danger);
}

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

.quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1rem 0;
}

.quick-nav a {
  min-height: 44px;
  padding: 0.58rem 0.8rem;
  color: #181208;
  background: var(--ochre-soft);
  border-radius: 12px;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 850;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 0.8rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table th {
  color: var(--ochre-soft);
}

details {
  margin-bottom: 0.75rem;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
}

summary {
  min-height: 44px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.source-links a {
  display: inline-block;
  margin: 0.25rem 0.65rem 0.25rem 0;
}

.site-footer {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 5.5rem;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 0.82rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.5rem;
}

.legal-theme .hero {
  background:
    linear-gradient(120deg, rgba(238, 169, 61, 0.11), rgba(126, 219, 145, 0.055)),
    var(--panel);
}

.manual-theme .hero {
  background:
    linear-gradient(120deg, rgba(105, 230, 220, 0.09), rgba(238, 169, 61, 0.1)),
    var(--panel);
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header nav {
    width: 100%;
    justify-content: flex-start;
  }

  .card-grid,
  .topic-grid,
  .legal-grid {
    grid-template-columns: 1fr;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td {
    display: block;
  }

  .data-table th {
    padding-bottom: 0.25rem;
    border-bottom: 0;
  }

  .data-table td {
    padding-top: 0.25rem;
  }
}

@media (max-width: 420px) {
  .page-shell,
  .site-header,
  .site-footer {
    width: min(100% - 1rem, 1080px);
  }

  .hero,
  .content-section {
    padding: 1rem;
    border-radius: 18px;
  }

  .brand-mark {
    width: 2.65rem;
    height: 2.65rem;
  }

  .phase-banner span {
    max-width: 16rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

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

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

@media print {
  :root {
    color-scheme: light;
  }

  body {
    color: #111;
    background: #fff;
  }

  body::before,
  .phase-banner,
  .site-header nav,
  .skip-link {
    display: none;
  }

  .hero,
  .content-section,
  .card,
  .topic-card,
  .notice {
    color: #111;
    background: #fff;
    border-color: #777;
    box-shadow: none;
  }

  p,
  li,
  .topic-card span {
    color: #222;
  }

  a {
    color: #111;
  }
}
