:root {
  --bg: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #1d4ed8;
  --soft: #f3f4f6;
  --note-bg: #fef9c3;
  --note-line: #facc15;
}

* { 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.65;
}

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

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

header.site .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}

.brand {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
}

nav.site a {
  color: var(--muted);
  text-decoration: none;
  margin-right: 14px;
  font-size: 0.95rem;
}

nav.site a:last-child { margin-right: 0; }

nav.site a:hover,
nav.site a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
}

main { padding: 28px 0 40px; }

h1 { font-size: 1.9rem; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 1.25rem; margin: 2rem 0 0.5rem; }
h3 { font-size: 1.05rem; margin: 1.4rem 0 0.4rem; }

p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-left: 1.3rem; }
li { margin-bottom: 0.35rem; }

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

.lead { font-size: 1.1rem; color: var(--text); }
.meta { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.5rem; }

.draft {
  background: var(--note-bg);
  border: 1px solid var(--note-line);
  border-radius: 6px;
  padding: 6px 12px;
  margin: 0 0 18px;
  font-size: 0.85rem;
  font-weight: 600;
}

.card {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 0 0 1.2rem;
}

.card p { margin: 0 0 0.3rem; }
.card p:last-child { margin-bottom: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.2rem;
  font-size: 0.93rem;
}

th, td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

th { background: var(--soft); }

.table-scroll { overflow-x: auto; }

footer.site {
  border-top: 1px solid var(--line);
  padding: 18px 0 28px;
  color: var(--muted);
  font-size: 0.9rem;
}

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

@media (max-width: 480px) {
  body { font-size: 16px; }
  h1 { font-size: 1.55rem; }
  nav.site a { margin-right: 10px; }
}
