:root {
  color-scheme: light dark;
  --page-bg: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #eef2ff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #dbe3f0;
  --accent: #4f46e5;
  --accent-dark: #3730a3;
  --button-bg: #4f46e5;
  --button-hover: #3730a3;
  --button-text: #ffffff;
  --shadow: 0 16px 40px rgb(30 41 59 / 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page-bg: #0f172a;
    --surface: #111827;
    --surface-muted: #1e1b4b;
    --text: #f8fafc;
    --muted: #cbd5e1;
    --border: #334155;
    --accent: #a5b4fc;
    --accent-dark: #c7d2fe;
    --button-bg: #4f46e5;
    --button-hover: #3730a3;
    --button-text: #ffffff;
    --shadow: 0 16px 40px rgb(0 0 0 / 0.2);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
}

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

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.skip-link:focus {
  top: 1rem;
}

.site-header,
.site-footer,
.content-shell {
  width: min(960px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
}

.brand {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
}

.site-nav,
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.site-nav a,
.footer-nav a {
  font-size: 0.9rem;
  text-decoration: none;
}

.site-nav a:hover,
.footer-nav a:hover {
  text-decoration: underline;
}

.content-shell {
  padding: 2rem 0 4rem;
}

.breadcrumb {
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumb a {
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.article {
  padding: clamp(1.5rem, 4vw, 3.5rem);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

h1,
h2,
h3 {
  line-height: 1.2;
}

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

h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

h3 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
}

p,
li {
  color: var(--muted);
}

.lede {
  max-width: 720px;
  margin: 0;
  font-size: 1.2rem;
}

.step-list,
.tip-list {
  display: grid;
  gap: 1rem;
  padding: 0;
  list-style: none;
}

.step-list li,
.tip-list li {
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: color-mix(in srgb, var(--surface-muted) 35%, var(--surface));
}

.step-list strong,
.tip-list strong {
  color: var(--text);
}

.callout {
  margin: 2rem 0 0;
  padding: 1.15rem 1.25rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 0.75rem 0.75rem 0;
  background: var(--surface-muted);
}

.callout p {
  margin: 0;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  margin-top: 2.25rem;
}

.button {
  display: inline-block;
  padding: 0.75rem 1rem;
  border-radius: 0.65rem;
  background: var(--button-bg);
  color: var(--button-text);
  font-weight: 700;
  text-decoration: none;
}

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

.secondary-link {
  font-weight: 600;
}

details {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

details:first-of-type {
  border-top: 1px solid var(--border);
}

summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 700;
}

details p {
  margin-bottom: 0;
}

.site-footer {
  padding: 0 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}

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

  .content-shell {
    padding-top: 1rem;
  }
}
