/* configurehow.com
   Single stylesheet, no external requests, no webfonts, no JS.
   Light and dark via prefers-color-scheme. */

:root {
  --bg:        #fbfbf9;
  --surface:   #ffffff;
  --border:    #e2e0da;
  --text:      #1c1d1a;
  --muted:     #63655f;
  --accent:    #0f5c5c;
  --accent-lo: #e6f0ef;
  --shadow:    0 1px 2px rgba(20,22,20,.05), 0 6px 20px -12px rgba(20,22,20,.25);
  --measure:   68ch;
  --radius:    10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #14161a;
    --surface:   #1b1e23;
    --border:    #2e333a;
    --text:      #e8e9e6;
    --muted:     #9aa0a0;
    --accent:    #6fd0c4;
    --accent-lo: #17302f;
    --shadow:    0 1px 2px rgba(0,0,0,.4), 0 8px 24px -14px rgba(0,0,0,.8);
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { width: min(100% - 2.5rem, 74rem); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px;
  background: var(--accent); color: #fff; padding: .6rem 1rem; border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; top: 0; z-index: 50; }

a { color: var(--accent); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.header-inner {
  display: flex; align-items: center; gap: 2rem;
  min-height: 62px; flex-wrap: wrap;
}
.brand {
  font-weight: 650; font-size: 1.08rem; letter-spacing: -.015em;
  color: var(--text); text-decoration: none; white-space: nowrap;
}
.brand::before {
  content: ""; display: inline-block; width: .55rem; height: .55rem;
  background: var(--accent); border-radius: 2px; margin-right: .5rem;
  transform: translateY(-1px);
}
.site-nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-nav a {
  color: var(--muted); text-decoration: none; font-size: .935rem; padding: .3rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--text); }
.site-nav a.active { color: var(--text); border-bottom-color: var(--accent); }

/* ---------- hero ---------- */

.hero { padding: 3.2rem 0 2rem; max-width: var(--measure); }
.hero h1 {
  font-size: clamp(1.85rem, 4.2vw, 2.7rem);
  line-height: 1.15; letter-spacing: -.025em; margin: 0 0 .8rem;
  text-wrap: balance;
}
.hero p { color: var(--muted); font-size: 1.09rem; margin: 0; text-wrap: pretty; }

.crumbs { font-size: .875rem; color: var(--muted); margin-bottom: .9rem; }
.crumbs a { color: var(--muted); }

/* ---------- cluster + cards ---------- */

.cluster { padding: 2.4rem 0; border-top: 1px solid var(--border); }
.cluster:first-of-type { border-top: 0; }
.cluster-head { max-width: var(--measure); margin-bottom: 1.4rem; }
.cluster-head h2 { font-size: 1.4rem; letter-spacing: -.02em; margin: 0 0 .35rem; }
.cluster-head h2 a { color: var(--text); text-decoration: none; }
.cluster-head h2 a:hover { color: var(--accent); }
.cluster-head p { color: var(--muted); margin: 0; font-size: .97rem; }

.cards {
  list-style: none; padding: 0; margin: 0 0 1rem;
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
}
.card a {
  display: block; height: 100%; padding: 1.15rem 1.25rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); text-decoration: none; color: inherit;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card a:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: var(--shadow); transform: translateY(-1px);
}
.card h3 {
  margin: 0 0 .4rem; font-size: 1.03rem; line-height: 1.35;
  letter-spacing: -.012em; color: var(--text);
}
.card p { margin: 0; font-size: .9rem; color: var(--muted); line-height: 1.55; }

/* ---------- article ---------- */

/* Centered reading column. The measure stays at --measure for legibility; the
   container is centered so wide viewports do not leave a dead zone on one side. */
.article {
  padding: 2.6rem 0 3rem;
  max-width: var(--measure);
  margin-inline: auto;
}
.article > h1 {
  font-size: clamp(1.75rem, 3.8vw, 2.45rem);
  line-height: 1.18; letter-spacing: -.025em; margin: 0 0 .7rem;
  max-width: var(--measure); text-wrap: balance;
}
.byline {
  color: var(--muted); font-size: .89rem; margin: 0 0 2rem;
  padding-bottom: 1.2rem; border-bottom: 1px solid var(--border);
  max-width: var(--measure);
}
.byline .rt::before { content: "· "; }

.toc {
  max-width: var(--measure); margin: 0 0 2rem; padding: 1.1rem 1.3rem;
  background: var(--accent-lo); border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
}
.toc h2 {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .09em;
  color: var(--muted); margin: 0 0 .6rem; font-weight: 600;
}
.toc ul { margin: 0; padding-left: 1.1rem; }
.toc li { margin: .28rem 0; font-size: .935rem; }

.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 {
  font-size: 1.42rem; letter-spacing: -.02em; line-height: 1.3;
  margin-top: 2.4em; margin-bottom: .1em; scroll-margin-top: 5rem;
  text-wrap: balance;
}
.prose h3 {
  font-size: 1.13rem; letter-spacing: -.012em;
  margin-top: 1.9em; margin-bottom: .1em; scroll-margin-top: 5rem;
}
.prose p { text-wrap: pretty; }
.prose ul, .prose ol { padding-left: 1.35rem; }
.prose li { margin: .4em 0; }
.prose li::marker { color: var(--muted); }
.prose strong { font-weight: 640; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: .875em; background: var(--accent-lo); padding: .12em .38em;
  border-radius: 4px; word-break: break-word;
}
.prose blockquote {
  margin-inline: 0; padding: .2rem 0 .2rem 1.1rem;
  border-left: 3px solid var(--accent); color: var(--muted);
}
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }

/* Wide content scrolls inside its own container so the page never scrolls sideways.
   Comparison tables carry a lot of these articles, so on wide viewports they are
   allowed to break out of the reading measure a little. */
.table-wrap { overflow-x: auto; margin-block: 1.6em; }

@media (min-width: 60rem) {
  .table-wrap {
    width: calc(100% + 8rem);
    margin-inline: -4rem;
    padding-inline: 4rem;
  }
}
.prose table {
  border-collapse: collapse; width: 100%; font-size: .92rem;
  min-width: 30rem;
}
.prose th, .prose td {
  text-align: left; padding: .62rem .85rem;
  border-bottom: 1px solid var(--border); vertical-align: top;
}
.prose thead th {
  font-weight: 620; font-size: .8rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted);
  border-bottom: 2px solid var(--border); white-space: nowrap;
}
.prose tbody tr:last-child td { border-bottom: 0; }

.sources {
  max-width: var(--measure); margin-top: 3rem; padding-top: 1.4rem;
  border-top: 1px solid var(--border);
}
.sources h2 {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .09em;
  color: var(--muted); margin: 0 0 .7rem; font-weight: 600;
}
.sources ul { margin: 0; padding-left: 1.1rem; }
.sources li { margin: .3rem 0; font-size: .845rem; }
.sources a { color: var(--muted); word-break: break-all; }
.sources a:hover { color: var(--accent); }

/* ---------- figures ----------
   Diagrams are inlined SVG so they inherit these custom properties and follow
   the page theme. Palette validated with the dataviz validator against both
   surfaces (#fbfbf9 light / #14161a dark): all five checks pass in each mode. */

:root {
  --fig-surface: #ffffff;
  --fig-ink:     #1c1d1a;
  --fig-muted:   #63655f;
  --fig-line:    #c9c7c0;
  --fig-1:       #0d8f80;  /* teal   */
  --fig-2:       #e05a2b;  /* orange */
  --fig-3:       #4a3aa7;  /* violet */
  --fig-wash:    #eef4f3;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fig-surface: #1b1e23;
    --fig-ink:     #e8e9e6;
    --fig-muted:   #9aa0a0;
    --fig-line:    #3a4048;
    --fig-1:       #1fa896;
    --fig-2:       #dd6a36;
    --fig-3:       #9085e9;
    --fig-wash:    #18302f;
  }
}

.fig {
  margin: 2em 0;
  padding: 1.15rem 1.2rem .9rem;
  background: var(--fig-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.fig svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.fig figcaption {
  margin-top: .85rem;
  padding-top: .7rem;
  border-top: 1px solid var(--border);
  font-size: .845rem;
  line-height: 1.5;
  color: var(--muted);
}

/* Wide diagrams scroll rather than squashing below legibility. */
@media (max-width: 30rem) {
  .fig { padding-inline: .8rem; }
  .fig svg { min-width: 20rem; }
  .fig { overflow-x: auto; }
}

/* ---------- related guides ---------- */

.related {
  max-width: var(--measure); margin-top: 2.6rem; padding: 1.3rem 1.4rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.related h2 {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .09em;
  color: var(--muted); margin: 0 0 .75rem; font-weight: 600;
}
.related ul { margin: 0; padding-left: 1.1rem; }
.related li { margin: .4rem 0; font-size: .95rem; line-height: 1.45; }
.related li::marker { color: var(--muted); }
.related-all {
  margin: .95rem 0 0; padding-top: .8rem; font-size: .875rem;
  border-top: 1px solid var(--border);
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border); margin-top: 3rem;
  padding: 2rem 0 2.6rem; color: var(--muted); font-size: .88rem;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.3rem; margin-bottom: .9rem; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--accent); text-decoration: underline; }
.copyright { margin: 0; }

@media (max-width: 34rem) {
  body { font-size: 16.5px; }
  .header-inner { min-height: 56px; gap: .9rem 1.2rem; padding-block: .6rem; }
  .site-nav { gap: 1rem; width: 100%; }
  .hero { padding-top: 2.2rem; }
}

@media print {
  .site-header, .site-footer, .toc, .skip { display: none; }
  body { font-size: 11pt; }
  .prose { max-width: none; }
}
