:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --text: #22252a;
  --muted: #6b7078;
  --border: #e3e1dc;
  --accent: #5b7c99;
  --accent-text: #ffffff;
  --danger: #a8443a;
  --ok: #3f7a55;
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16181c; --surface: #1f2228; --text: #e6e7e9; --muted: #9aa0a8;
    --border: #2e323a; --accent: #8fb0cc; --accent-text: #11161b; --danger: #e08a80; --ok: #8cc79f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #16181c; --surface: #1f2228; --text: #e6e7e9; --muted: #9aa0a8;
  --border: #2e323a; --accent: #8fb0cc; --accent-text: #11161b; --danger: #e08a80; --ok: #8cc79f;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }

.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.brand { font-weight: 700; text-decoration: none; color: var(--text); }
.nav { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.nav .rumuz { color: var(--muted); }

main { padding: 24px 0 48px; }
h1 { font-size: 1.5rem; line-height: 1.3; margin: 0 0 12px; }
.muted { color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.notice { font-size: 14px; color: var(--muted); border-left: 3px solid var(--accent); padding: 8px 12px; background: var(--surface); border-radius: 0 8px 8px 0; }

button, .btn {
  font: inherit; cursor: pointer; border-radius: 10px; padding: 10px 16px;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-text);
  text-decoration: none; display: inline-block;
}
button.ghost, .btn.ghost { background: transparent; color: var(--accent); }
button:disabled { opacity: .6; cursor: default; }
.icon-btn { background: transparent; color: var(--text); border-color: var(--border); padding: 6px 10px; }

label { display: block; font-size: 14px; margin: 14px 0 6px; }
input[type="text"], input[type="password"], textarea {
  width: 100%; font: inherit; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin: 14px 0 0; }
.check input { margin-top: 5px; }
.hint { font-size: 13px; color: var(--muted); margin: 4px 0 0; }

.tabs { display: flex; gap: 8px; margin-bottom: 8px; }
.tabs button { flex: 1; }
.tabs button[aria-selected="false"] { background: transparent; color: var(--accent); }

.msg { min-height: 1.5em; margin: 12px 0 0; font-size: 15px; }
.msg.error { color: var(--danger); }
.msg.ok { color: var(--ok); }
#turnstile { margin: 16px 0 0; min-height: 65px; }
.actions { margin-top: 16px; }
.actions button { width: 100%; }
[hidden] { display: none !important; }

.site-footer { border-top: 1px solid var(--border); padding: 20px 0 32px; font-size: 13px; color: var(--muted); }

/* --- Liste, entry, destek --- */
h2 { font-size: 1.15rem; }
.section-title { font-size: 1rem; color: var(--muted); font-weight: 600; margin: 24px 0 8px; }
.counter { text-align: right; }
.counter.over { color: var(--danger); }
.meta { font-size: 13px; color: var(--muted); }

.topic-list { list-style: none; margin: 0; padding: 0; }
.topic-list li { padding: 12px 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.topic-list a { text-decoration: none; color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.topic-list a:hover { color: var(--accent); }

#topic-title { overflow-wrap: anywhere; }
.entries { list-style: none; margin: 0 0 16px; padding: 0; }
.entry { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; scroll-margin-top: 16px; }
.entry:target { border-color: var(--accent); }
.entry-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.entry-support { font-size: 14px; margin: 10px 0 0; color: var(--muted); }

.heard { padding: 6px 12px; font-size: 14px; background: transparent; color: var(--text); border-color: var(--border); }
.heard[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.heard:disabled { opacity: .7; }
.link-btn { background: none; border: 0; padding: 4px; color: var(--muted); font-size: 13px; text-decoration: underline; margin-left: auto; }

.support { border: 1px solid var(--accent); background: var(--surface); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 16px; }
.support p { margin: 6px 0 8px; }

.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 8px 0 20px; }

dialog { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 20px; width: min(420px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0, 0, 0, .45); }
dialog h2 { margin: 0 0 4px; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* --- Statik sayfalar --- */
.prose h2 { margin: 28px 0 8px; }
.prose li { margin: 4px 0; }
.big-number { font-size: 2.5rem; font-weight: 700; margin: 4px 0; }
.footer-links { margin-bottom: 6px; }
.footer-links a { color: var(--muted); }

/* --- Yönetim --- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; }
.stat-value { font-size: 1.5rem; font-weight: 700; }
.stat-label { font-size: 13px; color: var(--muted); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--border); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: 12px; border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; color: var(--muted); }
.badge.crisis { border-color: var(--danger); color: var(--danger); font-weight: 700; }
.entry.is-crisis { border-color: var(--danger); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.admin-actions button { padding: 6px 12px; font-size: 14px; }
button.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
