/* ==========================================================================
   Low Key Comics — Base / Reset / Elements
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--leading-normal);
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, picture, svg, video, canvas { display: block; max-width: 100%; height: auto; }
img { background: var(--wash-50); }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text);
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p, ul, ol, blockquote, figure, table { margin: 0; }
p { text-wrap: pretty; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-hover); }

strong, b { font-weight: 700; }
small { font-size: var(--step--1); }

ul, ol { padding-inline-start: 1.25em; }

blockquote {
  border-inline-start: 3px solid var(--brand);
  padding-inline-start: var(--space-md);
  font-style: italic;
  color: var(--text-soft);
}

code, pre, kbd { font-family: var(--font-mono); font-size: 0.9em; }
pre { overflow-x: auto; background: var(--bg-section); padding: var(--space-md); border-radius: var(--radius-sm); }
code { background: var(--bg-section); padding: 0.1em 0.35em; border-radius: 4px; }
pre code { background: none; padding: 0; }

hr { border: 0; border-top: 1px solid var(--border); margin: var(--space-xl) 0; }

button, input, select, textarea { font: inherit; color: inherit; }

table { border-collapse: collapse; width: 100%; }
th, td { text-align: start; padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--border); }
th { font-family: var(--font-display); font-size: var(--step--1); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--text-soft); }

/* --- Accessibility --- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--space-md); top: -100px; z-index: 999;
  background: var(--text); color: var(--paper-0); padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm); transition: top var(--transition);
}
.skip-link:focus { top: var(--space-md); color: var(--paper-0); }

/* --- Article prose (post body) --- */
.prose { max-width: var(--container-narrow); }
.prose > * + * { margin-top: var(--space-md); }
.prose > h2 { margin-top: var(--space-xl); font-size: var(--step-2); }
.prose > h3 { margin-top: var(--space-lg); font-size: var(--step-1); }
.prose li + li { margin-top: 0.35em; }
.prose img, .prose figure { border-radius: var(--radius); margin-block: var(--space-lg); }
.prose figcaption { font-size: var(--step--1); color: var(--text-muted); text-align: center; margin-top: var(--space-xs); }
.prose a { font-weight: 500; }
