:root {
  --bg: #f8f4ee;
  --surface: #ffffff;
  --ink: #2a2622;
  --sub: #6f675d;
  --line: #e8e0d4;
  --accent: #c4a17a;
  --chip: #fbe9d7;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1916;
    --surface: #26221e;
    --ink: #f3ede4;
    --sub: #b3a99c;
    --line: #3a342d;
    --accent: #d8b48a;
    --chip: #3a2d22;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  text-decoration: none;
}
.brand img { width: 36px; height: 36px; border-radius: 9px; }

nav.site { display: flex; gap: 18px; flex-wrap: wrap; font-weight: 700; font-size: 15px; }
nav.site a { text-decoration: none; color: var(--sub); }
nav.site a[aria-current="page"], nav.site a:hover { color: var(--ink); }

main { padding: 12px 0 48px; }

h1 { font-size: 40px; line-height: 1.1; letter-spacing: -0.02em; margin: 24px 0 8px; font-weight: 900; }
h2 { font-size: 22px; margin: 36px 0 8px; font-weight: 800; }
h3 { font-size: 18px; margin: 24px 0 4px; font-weight: 800; }
p, li { color: var(--ink); }
.lede { font-size: 19px; color: var(--sub); margin-top: 0; }
.meta { color: var(--sub); font-size: 15px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px 22px;
  margin: 16px 0;
}

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

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--sub); font-weight: 700; }
.table-scroll { overflow-x: auto; }

details { border-bottom: 1px solid var(--line); padding: 12px 0; }
summary { cursor: pointer; font-weight: 800; }
details p { margin: 8px 0 0; }

.button {
  display: inline-block;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 800;
  text-decoration: none;
}

.hero { text-align: center; padding: 32px 0 8px; }
.hero img { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.hero h1 { font-size: 48px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.grid .card { margin: 0; }
.grid h3 { margin-top: 0; }
.grid p { margin: 4px 0 0; color: var(--sub); font-size: 15px; }

footer.site {
  border-top: 1px solid var(--line);
  padding: 20px 0 40px;
  color: var(--sub);
  font-size: 14px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: space-between;
}
footer.site nav { display: flex; gap: 16px; flex-wrap: wrap; }

@media (max-width: 480px) {
  h1 { font-size: 32px; }
  .hero h1 { font-size: 38px; }
  header.site { flex-direction: column; align-items: flex-start; }
}
