/* The guides: the home page's colours, type and header, set as one column of reading width. */
:root {
  --bg: #f3f7f6; --surface: #ffffff; --ink: #10302c; --muted: #4a6561; --line: #d3e2df;
  --accent: #0d6d65; --on-accent: #ffffff; --accent-soft: #d9f0eb; --ok: #15803d; --warn: #9a5b00;

  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;

  --step--1: .875rem; --step-0: 1.0625rem; --step-1: 1.25rem; --step-2: 1.6rem; --step-3: clamp(1.9rem, 4vw, 2.5rem);
  --read: 42rem; --wide: 72rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1615; --surface: #13211f; --ink: #e3f1ee; --muted: #9bb5b0; --line: #24403c;
    --accent: #6ee7d4; --on-accent: #052b26; --accent-soft: #143a35; --ok: #4ade80; --warn: #fbbf24;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c1615; --surface: #13211f; --ink: #e3f1ee; --muted: #9bb5b0; --line: #24403c;
  --accent: #6ee7d4; --on-accent: #052b26; --accent-soft: #143a35; --ok: #4ade80; --warn: #fbbf24;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--step-0)/1.65 var(--body);
  padding-inline: max(16px, env(safe-area-inset-left, 0px));
}
a { color: var(--accent); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; text-wrap: balance; margin: 0; letter-spacing: -.015em; }
h1 { font-size: var(--step-3); font-weight: 800; }
h2 { font-size: var(--step-2); font-weight: 800; margin-top: 2.6rem; }
h3 { font-size: var(--step-1); font-weight: 600; margin-top: 1.8rem; }
p, ul, ol { margin: .9rem 0 0; }
li + li { margin-top: .35rem; }
.wrap { max-width: var(--wide); margin-inline: auto; }
.read { max-width: var(--read); }
.eyebrow { font: 500 var(--step--1)/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin: 0 0 .8rem; }
.lede { font-size: var(--step-1); color: var(--muted); margin-top: 1rem; }
.updated { font-size: var(--step--1); color: var(--muted); margin-top: .8rem; }
code { font-family: var(--mono); font-size: .88em; background: var(--accent-soft); padding: .1em .35em; border-radius: 4px; overflow-wrap: anywhere; }
kbd { font-family: var(--mono); font-size: .85em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: .05em .35em; background: var(--surface); }

/* header and footer, as on the home page */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .6rem; font: 800 1.35rem/1 var(--display); color: var(--ink); text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.top nav { display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: var(--step--1); }
.top nav a:hover { color: var(--accent); }
.btn {
  display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.3rem; border-radius: 8px;
  font: 700 var(--step-0)/1 var(--body); text-decoration: none; border: 2px solid var(--accent);
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-small { padding: .55rem .9rem; font-size: var(--step--1); }
.top nav a.btn-primary { color: var(--on-accent); }
main { padding-block: clamp(2rem, 6vw, 4rem) clamp(3rem, 7vw, 5rem); }
footer { border-top: 1px solid var(--line); padding-block: 2rem 2.5rem; font-size: var(--step--1); color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; }
footer a { color: var(--muted); }

/* a note set apart from the text, and the box about CopyHaven */
.note { border-left: 4px solid var(--accent); background: var(--surface); padding: .9rem 1.1rem; border-radius: 0 8px 8px 0; margin-top: 1.3rem; }
.note.warn { border-left-color: var(--warn); }
.cta { background: var(--accent-soft); border-radius: 12px; padding: 1.4rem 1.5rem; margin-top: 3rem; }
.cta h2 { margin-top: 0; font-size: var(--step-1); }
.cta .btn { margin-top: 1.1rem; }
.cta .small { font-size: var(--step--1); color: var(--muted); margin-top: .7rem; }

/* comparisons */
.table-wrap { overflow-x: auto; margin-top: 1.3rem; }
table { border-collapse: collapse; width: 100%; min-width: 34rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: var(--step--1); }
th, td { text-align: left; vertical-align: top; padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
thead th { font-family: var(--display); font-size: var(--step-0); }
tbody th { font-weight: 700; }
tr:last-child > * { border-bottom: 0; }

/* the guides list */
.guides { list-style: none; padding: 0; display: grid; gap: 1rem; margin-top: 2rem; }
.guides li { margin: 0; }
.guides a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.2rem; text-decoration: none; color: var(--ink); }
.guides a:hover { border-color: var(--accent); }
.guides strong { display: block; font-family: var(--display); font-size: var(--step-1); color: var(--accent); }
.guides span { color: var(--muted); }
