:root {
  --bg: #fbf7f3;
  --surface: #ffffff;
  --text: #2b2522;
  --muted: #6c625c;
  --border: #ebe2da;
  --accent: #c4583c;
  --accent-soft: #fbe9e3;
  --sage: #3f7a5a;
  --sage-soft: #e4f1e9;
  --todo: #fff1c2;
  --todo-text: #6b4e00;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171412;
    --surface: #211c19;
    --text: #efe8e3;
    --muted: #b0a59d;
    --border: #3a322d;
    --accent: #f09a7f;
    --accent-soft: #3a2620;
    --sage: #8fcfaa;
    --sage-soft: #1f3128;
    --todo: #4a3a0c;
    --todo-text: #ffe08a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 16px 48px;
}

header.page { margin-bottom: 24px; }
.eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--sage); background: var(--sage-soft);
  padding: 4px 10px; border-radius: 99px;
}
h1 { font-size: 28px; line-height: 1.25; margin: 12px 0 8px; letter-spacing: -0.01em; }
.updated { color: var(--muted); font-size: 14px; margin: 0; }

h2 {
  font-size: 19px; line-height: 1.35;
  margin: 32px 0 10px; padding-top: 20px;
  border-top: 1px solid var(--border);
}
h2 .num { color: var(--accent); margin-right: 6px; }
h3 { font-size: 16px; margin: 20px 0 6px; }

p, li { margin: 0 0 10px; }
ul, ol { padding-left: 22px; margin: 0 0 12px; }
a { color: var(--accent); text-underline-offset: 2px; }
strong { font-weight: 650; }

.lead { font-size: 17px; }

.note {
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 16px 0;
}
.note.calm { background: var(--sage-soft); }
.note p:last-child { margin-bottom: 0; }

.table-wrap {
  overflow-x: auto;
  margin: 12px 0 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
th { font-size: 13px; color: var(--muted); font-weight: 600; background: color-mix(in srgb, var(--surface) 92%, var(--text)); }
td:first-child { font-weight: 600; min-width: 92px; }

/* Üç sütunlu tablolar dar ekranda kart görünümüne geçer: her satır alt alta, sütun adı etiket olarak */
@media (max-width: 600px) {
  table.stack tr:first-child { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { padding: 12px 14px; border-bottom: 1px solid var(--border); }
  table.stack tr:last-child { border-bottom: 0; }
  table.stack td { border: 0; padding: 2px 0; min-width: 0; }
  table.stack td:first-child { font-size: 16px; margin-bottom: 4px; }
  table.stack td[data-label]::before {
    content: attr(data-label) ": ";
    color: var(--muted); font-size: 13px; font-weight: 600;
  }
}

mark.todo {
  background: var(--todo);
  color: var(--todo-text);
  padding: 1px 6px;
  border-radius: 6px;
  font-weight: 600;
}
.draft {
  background: var(--todo);
  color: var(--todo-text);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 14px;
}

footer.page {
  margin-top: 40px; padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted); font-size: 14px;
}
footer.page nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 8px; }
