:root {
  --bg:       #ffffff;
  --surface:  #f7f8fa;
  --text:     #15171a;
  --muted:    #5b6270;
  --faint:    #8b93a3;
  --border:   #e3e6ec;
  --accent:   #2f6df6;
  --accent-bg:#eaf1ff;
  --warn-bg:  #fff6e9;
  --warn-brd: #e6a23c;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:       #0e1013;
    --surface:  #171a1f;
    --text:     #e9ecf1;
    --muted:    #a3abb9;
    --faint:    #767e8d;
    --border:   #262a32;
    --accent:   #6b9bff;
    --accent-bg:#17203a;
    --warn-bg:  #2a2213;
    --warn-brd: #b9822e;
  }
}

* { box-sizing: border-box; }

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

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

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 96px;
}

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

header {
  border-bottom: 1px solid var(--border);
  margin-bottom: 44px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.bar {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.logo {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 9px;
}

.logo .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

nav { display: flex; gap: 18px; font-size: 14px; margin-left: auto; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover, nav a[aria-current="page"] { color: var(--accent); }

/* ---- type ---- */

h1 {
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0 0 10px;
}

h2 {
  font-size: 21px;
  letter-spacing: -0.015em;
  margin: 44px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

h2:first-of-type { border-top: none; padding-top: 0; }

h3 { font-size: 17px; margin: 28px 0 8px; }

p, li { color: var(--text); }
li { margin-bottom: 7px; }
ul, ol { padding-left: 22px; }

a { color: var(--accent); }

.updated {
  color: var(--faint);
  font-size: 14px;
  margin: 0 0 40px;
}

.lede {
  font-size: 19px;
  color: var(--muted);
  margin: 0 0 36px;
}

/* ---- blocks ---- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 24px 0;
}

.card p:first-child { margin-top: 0; }
.card p:last-child  { margin-bottom: 0; }

.note {
  background: var(--warn-bg);
  border-left: 3px solid var(--warn-brd);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin: 24px 0;
  font-size: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 15px;
}

th, td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th { font-weight: 600; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }

/* ---- home ---- */

.hero { padding: 40px 0 8px; }
.hero h1 { font-size: 42px; }

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin: 36px 0;
}

.tile {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  text-decoration: none;
  color: var(--text);
}

.tile:hover { border-color: var(--accent); }
.tile strong { display: block; margin-bottom: 4px; font-size: 16px; }
.tile span { color: var(--muted); font-size: 14px; }

footer {
  border-top: 1px solid var(--border);
  margin-top: 72px;
  padding-top: 24px;
  color: var(--faint);
  font-size: 14px;
}

footer a { color: var(--muted); }

@media (max-width: 560px) {
  body { font-size: 16px; }
  h1 { font-size: 28px; }
  .hero h1 { font-size: 32px; }
  nav { margin-left: 0; width: 100%; gap: 14px; }
}
