:root {
  --bg: #fbfcf9;
  --surface: #ffffff;
  --text: #1a1f16;
  --text-secondary: #3b4436;
  --border: #d9e0d2;
  --link: #2c6a0c;
  --accent: #9be15d;
  --accent-text: #132006;
  --note-bg: #f0f8e6;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121510;
    --surface: #1a1e17;
    --text: #e9ede5;
    --text-secondary: #c9d1c2;
    --border: #343c2f;
    --link: #9be15d;
    --accent: #9be15d;
    --accent-text: #132006;
    --note-bg: #1f2a17;
  }
}

* { 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: 1.0625rem;
  line-height: 1.65;
}

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

header.site {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
header.site .wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  padding-bottom: 14px;
}
header.site a.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}

main { padding: 32px 0 48px; }

h1 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 0.6em; letter-spacing: -0.015em; }
h2 { font-size: 1.3rem; line-height: 1.3; margin: 2em 0 0.5em; }
h3 { font-size: 1.08rem; margin: 1.5em 0 0.4em; }
p, ul, ol, dl { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.35em; }

a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.lead { font-size: 1.15rem; color: var(--text-secondary); }
.meta { color: var(--text-secondary); font-size: 0.95rem; }

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 10px;
  margin: 8px 0 16px;
}
.button:hover { filter: brightness(0.95); }

.note {
  background: var(--note-bg);
  border-left: 4px solid var(--accent);
  padding: 14px 16px;
  border-radius: 6px;
  margin: 1.2em 0;
}
.note > :last-child { margin-bottom: 0; }

.english {
  margin-top: 2.5em;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.english h2:first-child { margin-top: 0; }
.english > :last-child { margin-bottom: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1em;
  font-size: 0.96rem;
}
th, td {
  text-align: left;
  vertical-align: top;
  border: 1px solid var(--border);
  padding: 8px 10px;
}
th { background: var(--note-bg); }
.table-scroll { overflow-x: auto; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--note-bg);
  padding: 1px 5px;
  border-radius: 4px;
  overflow-wrap: anywhere;
}

address { font-style: normal; margin-bottom: 1em; }

footer.site {
  border-top: 1px solid var(--border);
  padding: 20px 0 32px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}
footer.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 8px;
}
footer.site p { margin: 0; }
