:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --ink-soft: #56544f;
  --ink-faint: #8a877f;
  --line: #e5e2dc;
  --accent: #9c2a2f;
  --accent-wash: #fff7f3;
  --radius: 10px;
  --max: 880px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---- bağımsızlık şeridi ---- */
.indie-bar {
  background: var(--accent-wash);
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
}
.indie-bar .container { padding-top: 7px; padding-bottom: 7px; }

/* ---- header ---- */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-logo {
  width: 42px;
  height: 42px;
  display: block;
}
.brand-text { font-size: 17px; font-weight: 500; }
.brand-text strong { font-weight: 700; }
.site-nav { display: flex; gap: 22px; }
.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
}
.site-nav a:hover { color: var(--accent); }

/* ---- hero / empty ---- */
.hero { padding: 72px 0 24px; }
.hero h1 { font-size: 38px; line-height: 1.2; font-weight: 700; letter-spacing: -0.5px; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-sub { margin-top: 16px; font-size: 18px; color: var(--ink-soft); max-width: 620px; }

.empty-state {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin: 24px 0 56px;
}
.empty-state.big { padding: 56px 28px; text-align: center; margin-top: 64px; }
.empty-state h2 { font-size: 20px; }
.empty-state p { color: var(--ink-soft); margin-top: 6px; }

/* ---- digest head ---- */
.digest-head { padding: 52px 0 28px; border-bottom: 1px solid var(--line); }
.kicker {
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}
.digest-head h1 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.6px;
  margin-top: 6px;
}
.digest-meta { margin-top: 8px; color: var(--ink-soft); font-size: 16px; }
.day-nav {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
}
.day-nav a { text-decoration: none; font-weight: 500; }
.day-nav a:hover { text-decoration: underline; }

/* ---- filter bar ---- */
.filter-bar { padding: 16px 0; border-bottom: 1px solid var(--line); }
.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.filter-toggle:hover { border-color: var(--accent); color: var(--accent); }
.filter-toggle .caret { font-size: 11px; transition: transform 0.2s; }
.filter-bar.open .filter-toggle .caret { transform: rotate(180deg); }
.filter-count {
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 600;
}
.filter-panel { display: none; margin-top: 16px; }
.filter-bar.open .filter-panel { display: block; }
.filter-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip:has(input:checked) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.filter-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 22px;
}
#filter-status { font-size: 13px; color: var(--accent); font-weight: 600; }
#filter-clear {
  border: none;
  background: none;
  color: var(--ink-faint);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}
#filter-clear:hover { color: var(--accent); }

/* ---- digest body ---- */
.division { margin-top: 36px; }
.division-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
}
.section-title {
  margin-top: 26px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.item {
  padding: 22px 18px;
  margin: 0 -18px;
  border-bottom: 1px solid var(--line);
  border-radius: 6px;
  transition: opacity 0.15s, background 0.15s;
}
.item-title { font-size: 17px; font-weight: 650; line-height: 1.4; color: var(--ink); }
.item-summary {
  margin-top: 9px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.72;
}
.item-bullets {
  margin: 11px 0 0;
  padding-left: 20px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.62;
}
.item-bullets li { margin: 4px 0; }
.item-areas { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.item-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.item-link:hover { text-decoration: underline; }

/* badge (madde türü) */
.badge {
  display: inline-block;
  margin-bottom: 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 5px;
}
.badge-yeni { background: #e3f1e6; color: #2f6a3c; }
.badge-değişiklik { background: #fbeed7; color: #8a5a16; }
.badge-kaldırma { background: #f7e0e0; color: #a13030; }
.badge-diğer { background: #e8e8ea; color: #5a5a63; }

/* mevzuat alanı etiketi */
.area-tag {
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f0eee9;
  color: var(--ink-faint);
  border: 1px solid var(--line);
}
.area-tag.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---- filtreleme durumu ---- */
#digest.filtering .item.dim { opacity: 0.32; }
#digest.filtering .item.match { background: var(--accent-wash); box-shadow: inset 3px 0 0 var(--accent); }

/* ---- arşiv ---- */
.archive-list { list-style: none; margin: 8px 0 56px; }
.archive-list li { border-bottom: 1px solid var(--line); }
.archive-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 16px 4px;
  text-decoration: none;
  color: var(--ink);
}
.archive-list a:hover { color: var(--accent); }
.archive-date { font-size: 16px; font-weight: 600; }
.archive-meta { font-size: 13px; color: var(--ink-faint); }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 28px 0; }
.site-footer p { font-size: 13px; color: var(--ink-faint); }

/* ---- abonelik ---- */
.subscribe { margin: 52px 0; }
.subscribe h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
}
.subscribe-lead {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 16px;
  max-width: 560px;
}
.email-input {
  display: block;
  margin-top: 22px;
  width: 100%;
  max-width: 360px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
}
.email-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: var(--accent);
}
.subscribe-areas-label {
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.subscribe-btn {
  margin-top: 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.subscribe-btn:hover { background: #84232a; }
.subscribe-btn:disabled { opacity: 0.55; cursor: default; }
.kvkk { margin-top: 14px; font-size: 12px; color: var(--ink-faint); max-width: 460px; }
.form-msg {
  margin-top: 16px;
  padding: 11px 15px;
  border-radius: 8px;
  font-size: 14px;
}
.form-ok { background: #e3f1e6; color: #2f6a3c; }
.form-error { background: #f7e0e0; color: #a13030; }

/* ---- üstteki kompakt abonelik çubuğu ---- */
.subscribe-bar {
  display: flex;
  align-items: center;
  gap: 14px 18px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding: 14px 18px;
  background: var(--accent-wash);
  border: 1px solid #f1dada;
  border-radius: 10px;
}
.subscribe-bar-text { flex: 1 1 220px; font-size: 14px; color: var(--ink-soft); }
.subscribe-bar-text strong { color: var(--ink); }
.subscribe-bar-form { display: flex; gap: 8px; flex: 1 1 300px; }
.subscribe-bar-form input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 14px;
  font-family: inherit;
}
.subscribe-bar-form input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: var(--accent);
}
.subscribe-bar-form button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.subscribe-bar-form button:hover { background: #84232a; }
.subscribe-bar-form button:disabled { opacity: 0.55; cursor: default; }
.subscribe-bar-result { flex-basis: 100%; }
.subscribe-bar-result:empty { display: none; }
.subscribe-bar-result .form-msg { margin-top: 0; }

@media (max-width: 560px) {
  .digest-head h1 { font-size: 30px; }
  .hero h1 { font-size: 30px; }
  .day-nav { flex-direction: column; gap: 6px; }
  .subscribe-bar-form { flex-direction: column; }
  .subscribe-bar-form input,
  .subscribe-bar-form button { width: 100%; }
}
