@font-face { font-family: "Bricolage"; src: url("./bricolage-latin.woff2") format("woff2"); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: Inter; src: url("./inter-latin.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

:root {
  color-scheme: light;
  --astra: #ff5a1f; --astra-deep: #c2380a; --night: #0c0b10;
  --paper: #f7f3eb; --card: #fffdf9; --ink: #15130f; --muted: #5f5a51; --subtle: #8a847a; --line: #e4ddd0;
  --gutter: clamp(20px, 5vw, 64px);
  font: 400 100%/1.7 Inter, system-ui, sans-serif;
  color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); }
a { color: var(--astra-deep); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--astra); outline-offset: 3px; border-radius: 4px; }
[id] { scroll-margin-top: 90px; }

.top { position: sticky; top: 0; z-index: 10; background: rgba(12, 11, 16, .92); backdrop-filter: blur(12px); color: #f3eee4; padding-top: env(safe-area-inset-top, 0px); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: min(calc(100% - var(--gutter) * 2), 1100px); margin-inline: auto; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; font-family: "Bricolage", Inter, sans-serif; font-size: 1.4rem; font-weight: 700; letter-spacing: -.055em; }
.brand svg { width: 22px; height: 22px; color: var(--astra); }
.top nav { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .86rem; }
.top nav a { color: #b9b3c4; text-decoration: none; }
.top nav a:hover, .top nav a[aria-current="page"] { color: #fff; }

main { width: min(calc(100% - var(--gutter) * 2), 1100px); margin-inline: auto; padding-block: clamp(48px, 7vw, 96px) 80px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.toc { position: sticky; top: 96px; font-size: .86rem; }
.toc p { margin: 0 0 10px; font-weight: 650; color: var(--subtle); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: t; }
.toc li { counter-increment: t; }
.toc a { color: var(--muted); text-decoration: none; display: block; }
.toc a::before { content: counter(t, decimal-leading-zero) "  "; color: var(--astra); font-variant-numeric: tabular-nums; }
.toc a:hover { color: var(--ink); }

article { max-width: 72ch; }
.eyebrow { margin: 0; font-size: .82rem; color: var(--subtle); }
h1 { margin: 10px 0 0; font-family: "Bricolage", Inter, sans-serif; font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1; font-weight: 650; font-stretch: 88%; letter-spacing: -.045em; }
.updated { margin: 16px 0 0; color: var(--muted); font-size: .9rem; }
.summary { margin: 32px 0 8px; padding: 20px 22px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.summary h2 { margin: 0 0 8px; font-size: 1rem; }
.summary ul { margin: 0; padding-left: 1.1em; }
.summary li + li { margin-top: 4px; }
article h2 { margin: 48px 0 10px; font-family: "Bricolage", Inter, sans-serif; font-size: 1.55rem; line-height: 1.15; font-weight: 650; letter-spacing: -.03em; }
article h3 { margin: 26px 0 6px; font-size: 1.02rem; }
article p, article li { color: #2c2924; }
article ul, article ol { padding-left: 1.2em; }
article li + li { margin-top: 6px; }
.table-wrap { overflow-x: auto; margin: 14px 0; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
th { font-weight: 650; background: #f3ede2; }
tr:last-child td { border-bottom: 0; }
.todo { background: #ffe1cf; color: #8a2a06; border-radius: 4px; padding: 0 4px; font-weight: 650; }
.note { padding: 14px 16px; border-left: 3px solid var(--astra); background: var(--card); border-radius: 0 12px 12px 0; }

footer { border-top: 1px solid var(--line); }
.foot { width: min(calc(100% - var(--gutter) * 2), 1100px); margin-inline: auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; padding-block: 28px; font-size: .86rem; color: var(--subtle); }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }

@media (max-width: 860px) {
  main { grid-template-columns: 1fr; }
  .toc { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
