:root {
  color-scheme: dark;
  --background: #07111f;
  --background-raised: #0b1626;
  --surface: #111f32;
  --surface-strong: #17283d;
  --border: #2a3d57;
  --border-strong: #405878;
  --text: #f7f9fc;
  --text-muted: #b4c0d2;
  --text-soft: #8fa0b7;
  --accent: #d2d861;
  --accent-hover: #e2e781;
  --accent-ink: #101600;
  --info: #82b8ff;
  --success: #84d6a5;
  --warning: #f6c96b;
  --danger: #ff969f;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  --radius-large: 24px;
  --radius-medium: 16px;
  --content-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(130, 184, 255, 0.12), transparent 34rem),
    radial-gradient(circle at 88% 10%, rgba(210, 216, 97, 0.08), transparent 30rem),
    var(--background);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

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

a:hover {
  color: #acd0ff;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-150%);
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
}

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

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(64, 88, 120, 0.6);
  background: rgba(7, 17, 31, 0.92);
  backdrop-filter: blur(18px);
}

.header-inner,
.page-shell,
.footer-inner {
  width: min(calc(100% - 40px), var(--content-width));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 850;
  letter-spacing: -0.02em;
  text-decoration: none;
}

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

.brand img {
  width: 45px;
  height: 45px;
  object-fit: contain;
}

.brand-copy {
  display: grid;
  line-height: 1.1;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.primary-nav ul,
.footer-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  background: var(--surface);
  color: var(--text);
}

.page-shell {
  padding-block: 64px 96px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 7vw, 74px);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background:
    linear-gradient(135deg, rgba(23, 40, 61, 0.98), rgba(11, 22, 38, 0.96)),
    var(--surface);
  box-shadow: var(--shadow);
}

.hero::after {
  position: absolute;
  right: -90px;
  bottom: -150px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(210, 216, 97, 0.24);
  border-radius: 50%;
  box-shadow:
    0 0 0 42px rgba(210, 216, 97, 0.035),
    0 0 0 84px rgba(130, 184, 255, 0.025);
  content: "";
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.18;
  text-wrap: balance;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.25rem, 6vw, 4.65rem);
  letter-spacing: -0.055em;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--text-muted);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 26px;
}

.meta-chip {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 6px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(7, 17, 31, 0.45);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 46px;
  align-items: start;
  margin-top: 52px;
}

.content {
  min-width: 0;
}

.content section {
  scroll-margin-top: 100px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}

.content section:first-child {
  padding-top: 0;
}

.content section:last-child {
  border-bottom: 0;
}

.content h2 {
  margin: 0 0 16px;
  color: var(--text);
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}

.content h3 {
  margin: 26px 0 8px;
  color: var(--text);
  font-size: 1.05rem;
}

.content p {
  margin: 0 0 16px;
  color: var(--text-muted);
}

.content ul,
.content ol {
  margin: 14px 0 18px;
  padding-left: 1.45rem;
  color: var(--text-muted);
}

.content li {
  margin-bottom: 9px;
  padding-left: 4px;
}

.content strong {
  color: var(--text);
}

.toc {
  position: sticky;
  top: 106px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  background: rgba(17, 31, 50, 0.72);
}

.toc h2 {
  margin: 0 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

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

.toc a {
  display: block;
  padding: 7px 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
}

.toc a:hover {
  color: var(--text);
}

.notice,
.callout {
  margin: 24px 0;
  padding: 20px 22px;
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--info);
  border-radius: 4px var(--radius-medium) var(--radius-medium) 4px;
  background: rgba(23, 40, 61, 0.72);
}

.notice.warning {
  border-left-color: var(--warning);
}

.notice.success {
  border-left-color: var(--success);
}

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

.action-card {
  display: grid;
  gap: 16px;
  margin: 24px 0;
  padding: clamp(22px, 5vw, 34px);
  border: 1px solid rgba(210, 216, 97, 0.38);
  border-radius: var(--radius-large);
  background: linear-gradient(135deg, rgba(210, 216, 97, 0.1), rgba(23, 40, 61, 0.74));
}

.action-card h2,
.action-card h3,
.action-card p {
  margin: 0;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 850;
  text-align: center;
  text-decoration: none;
}

.button:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
}

.button.secondary {
  border-color: var(--border-strong);
  background: var(--surface-strong);
  color: var(--text);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 32px;
}

.resource-card {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  padding: 25px;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: linear-gradient(145deg, var(--surface), var(--background-raised));
  color: var(--text);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.resource-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  color: var(--text);
}

.resource-card span {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.resource-card h2 {
  margin: 16px 0 9px;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.resource-card p {
  margin: 0;
  color: var(--text-muted);
}

.resource-card strong {
  margin-top: auto;
  padding-top: 20px;
  color: var(--info);
}

.steps {
  counter-reset: deletion-step;
  padding: 0 !important;
  list-style: none;
}

.steps li {
  position: relative;
  min-height: 48px;
  margin: 0 0 20px;
  padding: 2px 0 0 62px;
}

.steps li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--accent);
  content: counter(deletion-step);
  counter-increment: deletion-step;
  font-weight: 850;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.help-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  background: rgba(17, 31, 50, 0.66);
}

.help-card h3 {
  margin-top: 0;
}

.help-card p:last-child,
.help-card ul:last-child {
  margin-bottom: 0;
}

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

.footer-inner {
  display: flex;
  min-height: 170px;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  padding-block: 40px;
}

.footer-brand {
  max-width: 420px;
}

.footer-brand strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 1rem;
}

.footer-brand p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.87rem;
}

.footer-links {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 8px 10px;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

@media (max-width: 860px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding-block: 13px;
  }

  .site-header {
    position: static;
  }

  .primary-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .primary-nav ul {
    width: max-content;
  }

  .layout {
    display: block;
  }

  .toc {
    position: static;
    margin-bottom: 38px;
  }

  .resource-grid {
    grid-template-columns: 1fr;
  }

  .resource-card {
    min-height: 190px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .header-inner,
  .page-shell,
  .footer-inner {
    width: min(calc(100% - 28px), var(--content-width));
  }

  .page-shell {
    padding-block: 34px 68px;
  }

  .hero {
    padding: 30px 22px;
    border-radius: 19px;
  }

  h1 {
    font-size: clamp(2rem, 13vw, 3.15rem);
  }

  .layout {
    margin-top: 34px;
  }

  .help-grid {
    grid-template-columns: 1fr;
  }

  .button-row,
  .button {
    width: 100%;
  }

  .steps li {
    padding-left: 54px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

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

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

  .site-header,
  .site-footer,
  .toc,
  .button-row {
    display: none;
  }

  .page-shell {
    width: 100%;
    padding: 0;
  }

  .hero {
    padding: 0 0 24px;
    border: 0;
    background: none;
    box-shadow: none;
  }

  .hero::after {
    display: none;
  }

  .hero-copy,
  .content p,
  .content li {
    color: #222;
  }

  .layout {
    display: block;
    margin: 0;
  }
}
