/* Halve website. Colours and type follow DESIGN.md (Thread). Fonts are self-hosted: no third-party requests. */
@font-face { font-family: Onest; src: url("/fonts/Onest_400Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Onest; src: url("/fonts/Onest_600SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --canvas: #f5f4ef;
  --sheet: #ffffff;
  --ink: #1c1c1c;
  --ink-2: #4a4a45;
  --ink-3: #6b6b65;
  --hairline: #dedcd5;
  --sage: #8fa68e;
  --sage-text: #4d6a4c;
  --note: #ebeae4;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #1c1c1c;
    --sheet: #262626;
    --ink: #f1f1ef;
    --ink-2: #c9c9c4;
    --ink-3: #a3a39e;
    --hairline: #2f2f2f;
    --sage-text: #a9bfa8;
    --note: #262626;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 17px/1.6 Onest, system-ui, -apple-system, "Segoe UI", sans-serif;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 32px 20px 64px; }

header.site { display: flex; align-items: center; gap: 12px; margin-bottom: 40px; }
header.site a { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 20px; }
.tile { width: 36px; height: 36px; border-radius: 9px; background: var(--sage); display: grid; place-items: center; }
.tile img { width: 18px; height: 18px; }

h1 { font-size: 32px; line-height: 1.15; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.01em; }
h2 { font-size: 22px; line-height: 1.3; font-weight: 600; margin: 40px 0 8px; }
h3 { font-size: 18px; font-weight: 600; margin: 24px 0 4px; }
p, ul, ol { margin: 0 0 14px; color: var(--ink-2); }
li { margin-bottom: 6px; }
strong { color: var(--ink); font-weight: 600; }
a { color: var(--sage-text); text-underline-offset: 3px; }
.meta { color: var(--ink-3); font-size: 15px; margin-bottom: 28px; }

.note { background: var(--note); border-radius: 14px; padding: 16px 18px; margin: 18px 0; }
.note p:last-child { margin-bottom: 0; }

table { width: 100%; border-collapse: collapse; margin: 8px 0 18px; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 10px 8px 10px 0; border-bottom: 1px solid var(--hairline); color: var(--ink-2); }
th { color: var(--ink); font-weight: 600; }

footer.site { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--hairline); font-size: 15px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer.site a { color: var(--ink-3); }

@media (max-width: 520px) {
  body { font-size: 16px; }
  h1 { font-size: 28px; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tr { border-bottom: 1px solid var(--hairline); padding: 8px 0; }
  td { border: 0; padding: 2px 0; }
  td:first-child { color: var(--ink); font-weight: 600; }
}
