:root {
  --bg: #ffffff;
  --surface: #f7f7f7;
  --text: #1a1a1a;
  --muted: #585858;
  --line: #e0e0e0;
  --accent: #fff100;
  --accent-ink: #4a4600;
  --link: #1a1a1a;
  --todo-bg: #ffe8d9;
  --todo-ink: #9e4f16;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a1a;
    --surface: #222222;
    --text: #f2f2f2;
    --muted: #cccccc;
    --line: #3f3f3f;
    --accent: #fff100;
    --accent-ink: #1a1a1a;
    --link: #fff9b3;
    --todo-bg: #4d2a10;
    --todo-ink: #ffe8d9;
  }
}

* { 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", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

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

header.site {
  border-bottom: 1px solid var(--line);
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.lang {
  color: var(--muted);
  font-size: 15px;
}

main { padding: 32px 0 48px; }

h1 {
  font-size: 30px;
  line-height: 1.25;
  margin: 0 0 8px;
}

h2 {
  font-size: 21px;
  line-height: 1.3;
  margin: 36px 0 8px;
}

h3 {
  font-size: 18px;
  margin: 24px 0 6px;
}

p, ul, ol { margin: 0 0 14px; }

li { margin-bottom: 6px; }

a { color: var(--link); text-underline-offset: 3px; }

.meta {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 28px;
}

.box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 20px 0;
}

.box > :last-child { margin-bottom: 0; }

.cards {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.cards a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 20px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.cards a span {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 15px;
}

.hero-mark {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 8px;
  padding: 2px 10px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
}

mark.todo {
  background: var(--todo-bg);
  color: var(--todo-ink);
  border-radius: 4px;
  padding: 0 4px;
}

footer.site {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding-top: 20px;
  padding-bottom: 28px;
}

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