:root {
  color-scheme: dark;
  --bg: #071018;
  --panel: #0d1924;
  --panel-strong: #101f2c;
  --panel-soft: #122331;
  --text: #eef5fb;
  --muted: #a8bac8;
  --line: #263b4b;
  --line-strong: #365367;
  --accent: #65d6c2;
  --accent-dark: #04110f;
  --warning: #ffb36b;
  --warning-bg: #241b14;
  --info-bg: #0b2530;
  --code-bg: #03080c;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.68;
}

a {
  color: var(--accent);
}

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

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(7, 16, 24, 0.97);
}

.header-inner,
.page-shell,
.site-footer-inner {
  width: min(1160px, calc(100% - 32px));
  margin: auto;
}

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

.brand {
  color: var(--text);
  font-size: 1.3rem;
  font-weight: 850;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-nav a {
  font-weight: 700;
  text-decoration: none;
}

.scan-link,
.button,
.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-dark);
  font-weight: 850;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.scan-link:hover,
.button:hover,
.hero-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(101, 214, 194, 0.18);
}

.hero,
.article-header {
  padding: 64px 0;
  background:
    radial-gradient(circle at 78% 10%, rgba(101, 214, 194, 0.10), transparent 35%),
    linear-gradient(180deg, #0d1d29, #071018);
}

.hero .header-inner,
.article-header .header-inner {
  display: block;
  min-height: 0;
}

.eyebrow,
.category,
.check-id,
.review-status,
.sidebar-kicker,
.quick-fix-label {
  color: var(--accent);
  font-size: 0.77rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1 {
  max-width: 900px;
  margin: 0.22em 0;
  font-size: clamp(2.2rem, 5vw, 4.3rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(1.55rem, 3vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

h3 {
  margin: 30px 0 10px;
  font-size: 1.12rem;
}

.lede,
.hero p {
  max-width: 850px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.14rem;
}

.hero-cta {
  margin-top: 26px;
}

.page-shell {
  padding: 34px 0 72px;
}

.breadcrumbs {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumbs a {
  font-weight: 700;
  text-decoration: none;
}

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

.article,
.sidebar-card,
.guide-index-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.article {
  overflow: hidden;
}

.article-body,
.guide-index-panel {
  padding: clamp(24px, 4vw, 46px);
}

.guide-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.check-id,
.review-status {
  display: inline-flex;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
}

.review-status {
  color: var(--muted);
}

.quick-fix {
  margin: 0 0 24px;
  padding: 22px;
  border: 1px solid rgba(101, 214, 194, 0.42);
  border-left: 5px solid var(--accent);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(101, 214, 194, 0.10), rgba(101, 214, 194, 0.03));
}

.quick-fix p {
  margin: 0;
}

.quick-fix .quick-fix-label {
  margin-bottom: 7px;
}

.on-page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
}

.on-page-nav a {
  padding: 6px 9px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
  text-decoration: none;
}

.on-page-nav a:hover {
  background: var(--panel-strong);
  color: var(--accent);
}

.guide-section {
  padding-top: 38px;
}

.guide-section p {
  margin: 0 0 16px;
}

.section-intro {
  color: var(--muted);
}

.scope-note,
.risk-callout {
  display: grid;
  gap: 7px;
  margin-top: 22px;
  padding: 18px 20px;
  border-radius: 10px;
  background: var(--panel-soft);
}

.scope-note {
  border-left: 4px solid #70b7ff;
}

.scope-note strong {
  color: #a9d4ff;
}

.risk-callout {
  border-left: 4px solid var(--warning);
  background: var(--warning-bg);
}

.risk-callout strong {
  color: var(--warning);
}

.location-list,
.gotcha-list,
.references {
  padding-left: 22px;
}

.location-list li,
.procedure-list li,
.gotcha-list li,
.references li {
  margin: 10px 0;
}

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

.procedure-list li {
  position: relative;
  min-height: 36px;
  padding-left: 48px;
  counter-increment: procedure;
}

.procedure-list li::before {
  content: counter(procedure);
  position: absolute;
  top: -2px;
  left: 0;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(101, 214, 194, 0.45);
  border-radius: 50%;
  background: rgba(101, 214, 194, 0.08);
  color: var(--accent);
  font-weight: 850;
}

.code-block {
  margin: 18px 0 24px;
}

.code-toolbar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: var(--panel-soft);
}

.code-label {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.copy-command-button {
  display: inline-flex;
  min-width: 88px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0 9px 0 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 850;
}

.copy-command-button:hover {
  background: rgba(101, 214, 194, 0.08);
}

.copy-command-button:focus-visible {
  outline: 3px solid var(--warning);
  outline-offset: -4px;
}

.copy-command-button.is-copied {
  background: rgba(101, 214, 194, 0.12);
  color: #a8f3e6;
}

.copy-command-icon {
  font-size: 1rem;
  line-height: 1;
}

.code-block pre {
  max-width: 100%;
  overflow-x: auto;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 0 0 10px 10px;
  background: var(--code-bg);
  color: #d7e7f2;
  font: 0.84rem/1.58 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
}

.copy-command-status {
  min-height: 1.25rem;
  margin: 6px 2px 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.verify-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin-top: 26px;
  padding: 22px;
  border: 1px solid rgba(101, 214, 194, 0.35);
  border-radius: 12px;
  background: var(--info-bg);
}

.verify-cta p {
  margin: 6px 0 0;
  color: var(--muted);
}

.gotcha-list li::marker {
  color: var(--warning);
}

.references {
  list-style: none;
  padding: 0;
}

.references li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.references a {
  font-weight: 750;
  overflow-wrap: anywhere;
}

.sidebar {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar-card {
  padding: 22px;
}

.sidebar-card h2 {
  font-size: 1.15rem;
}

.sidebar-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

.sidebar-primary {
  border-color: rgba(101, 214, 194, 0.32);
}

.sidebar .button {
  width: 100%;
}

.button.secondary {
  border-color: var(--accent);
  background: transparent;
  color: var(--accent);
}

.metadata-list {
  margin: 0 0 20px;
}

.metadata-list div {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.metadata-list dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.metadata-list dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

.index-intro,
.category-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 26px;
}

.index-intro {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.index-intro p {
  max-width: 620px;
  color: var(--muted);
}

.category-section {
  margin-top: 42px;
}

.category-heading {
  margin-bottom: 17px;
}

.category-heading span {
  color: var(--muted);
  font-size: 0.86rem;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.guide-card {
  display: flex;
  min-height: 215px;
  flex-direction: column;
  gap: 9px;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
  color: var(--muted);
  text-decoration: none;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.guide-card strong {
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1.3;
}

.guide-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.card-action {
  margin-top: auto;
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 800;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer-inner {
  padding: 30px 0;
  font-size: 0.86rem;
}

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

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 680px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 0;
  }

  .header-nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero,
  .article-header {
    padding: 48px 0;
  }

  .verify-cta,
  .index-intro,
  .category-heading {
    grid-template-columns: 1fr;
    display: grid;
    align-items: start;
  }

  .verify-cta .button {
    width: 100%;
  }

  .guide-grid,
  .sidebar {
    grid-template-columns: 1fr;
  }
}
