/* Not the Wrong Way website. Colours and type follow docs/brand/style-guide.html. */
@font-face { font-family: "Fredoka"; font-weight: 500; font-display: swap; src: url("/fonts/Fredoka_500Medium.ttf") format("truetype"); }
@font-face { font-family: "Fredoka"; font-weight: 600; font-display: swap; src: url("/fonts/Fredoka_600SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Nunito Sans"; font-weight: 400; font-display: swap; src: url("/fonts/NunitoSans_400Regular.ttf") format("truetype"); }
@font-face { font-family: "Nunito Sans"; font-weight: 700; font-display: swap; src: url("/fonts/NunitoSans_700Bold.ttf") format("truetype"); }

:root {
  --bg: #F7F3F0;
  --surface: #FEFCFB;
  --sunken: #F0EBE7;
  --line: #E3DDD9;
  --fg: #272838;
  --muted: #5E5F70;
  --brand: #047B69;
  --teal: #05907B;
  --coral: #FF6666;
  --ok-bg: #E3F4F0;
  --display: "Fredoka", "Nunito Sans", ui-rounded, system-ui, sans-serif;
  --body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1B1C28; --surface: #272838; --sunken: #20212F; --line: #3D3E54;
    --fg: #FEFCFB; --muted: #A9AABD; --brand: #2EC4A8; --ok-bg: #163F3A;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 17px/1.65 var(--body); }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin: 0 0 .4em; }
h2 { font-size: 1.45rem; margin: 2.2em 0 .5em; }
h3 { font-size: 1.1rem; font-weight: 500; margin: 1.6em 0 .4em; }
p, ul, ol { margin: 0 0 1em; }
li { margin-bottom: .35em; }
strong { font-weight: 700; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 1.15rem; }
.brand img { height: 36px; width: auto; }
.site-nav { display: flex; gap: 4px 16px; flex-wrap: wrap; font-size: .95rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--brand); }

main { padding-block: 40px 64px; }
.updated { color: var(--muted); font-size: .95rem; margin-top: -.2em; }

/* Content blocks */
.summary { background: var(--ok-bg); border-radius: var(--r); padding: 18px 22px; margin: 24px 0 8px; }
.summary h2 { margin-top: 0; font-size: 1.15rem; }
.summary ul { margin-bottom: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 22px; margin: 16px 0; }
.card > :last-child { margin-bottom: 0; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 22px; margin: 24px 0; }
.toc ol { margin: 0; padding-left: 1.2em; columns: 2 220px; }
.toc li { margin: 0 0 .2em; break-inside: avoid; }

.table-scroll { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; background: var(--surface); }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--sunken); font-weight: 700; }
tr:last-child td { border-bottom: 0; }

/* Home */
.hero { text-align: center; padding: 24px 0 8px; }
.hero img { height: 140px; width: auto; }
.hero h1 { font-size: clamp(2.2rem, 7vw, 3.4rem); margin-top: 16px; }
.hero p { color: var(--muted); font-size: 1.15rem; max-width: 34em; margin-inline: auto; }
.pill { display: inline-block; background: var(--sunken); color: var(--muted); border-radius: 999px; padding: 6px 14px; font-size: .95rem; font-weight: 700; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 36px 0; }
.features .card { margin: 0; }
.features h3 { margin-top: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; padding-block: 24px 40px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 12px; }
.site-footer a { color: var(--muted); }
.site-footer p { margin: 0 0 .3em; }
