:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #14181f;
  --muted: #5b6472;
  --line: #e4e7ec;
  --brand: #0f766e;
  --brand-ink: #ffffff;
  --brand-soft: #e6f4f2;
  --accent: #b45309;
  --danger: #b42318;
  --news: #1d4ed8;
  --social: #7c3aed;
  --video: #c2410c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --tabbar-h: 62px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --card: #161b22;
    --text: #e8ecf1;
    --muted: #9aa4b2;
    --line: #2a313c;
    --brand: #2dd4bf;
    --brand-ink: #062a27;
    --brand-soft: #0f2e2b;
    --accent: #f59e0b;
    --danger: #f97066;
    --news: #7aa2ff;
    --social: #b794f6;
    --video: #fb923c;
    --shadow: none;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
body.guest { padding-bottom: 0; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- düzen ---------- */
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
header.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
header.top .row { display: flex; align-items: center; gap: 10px; height: 54px; }
header.top h1 { font-size: 19px; margin: 0; flex: 1; letter-spacing: -.01em; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 750; }
.logo i { width: 26px; height: 26px; border-radius: 8px; background: var(--brand); display: inline-grid; place-items: center; color: var(--brand-ink); font-style: normal; font-size: 15px; }
.icon-btn { background: none; border: 0; padding: 8px; border-radius: 10px; cursor: pointer; color: var(--muted); display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--line); color: var(--text); }
.icon-btn.spin svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- alt sekme çubuğu ---------- */
#tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 30;
  display: flex; justify-content: space-around;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--card); border-top: 1px solid var(--line);
}
#tabbar[hidden] { display: none; }
#tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: 11.5px; font-weight: 550; }
#tabbar a.on { color: var(--brand); }
#tabbar a.on svg { stroke-width: 2.4; }

/* ---------- öğeler ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 6px 12px; font-size: 13.5px; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center;
}
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .n { font-size: 11.5px; opacity: .7; }
.seg { display: inline-flex; background: var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 5px 11px; border-radius: 8px; font-size: 13px; cursor: pointer; color: var(--muted); font-weight: 550; }
.seg button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.toolbar { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding-bottom: 8px; flex-wrap: wrap; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 16px; }
.stack > * + * { margin-top: 12px; }

.item { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.item:last-child { border-bottom: 0; }
.item.read .ttl { color: var(--muted); font-weight: 500; }
.item .meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.item .ttl { font-weight: 650; font-size: 15.5px; line-height: 1.35; margin: 0; }
.item .sum { color: var(--muted); font-size: 13.5px; margin: 4px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item .thumb { width: 84px; height: 84px; border-radius: 10px; object-fit: cover; background: var(--line); }
.item .acts { grid-column: 1 / -1; display: flex; gap: 4px; margin: -4px 0 -6px -8px; }
.item .acts button { background: none; border: 0; color: var(--muted); padding: 6px 8px; border-radius: 8px; cursor: pointer; display: inline-flex; gap: 5px; align-items: center; font-size: 12.5px; }
.item .acts button svg { width: 17px; height: 17px; }
.item .acts button.on { color: var(--accent); }
.item .acts button.on svg { fill: currentColor; }
.badge { font-size: 11px; font-weight: 650; padding: 1px 7px; border-radius: 999px; background: var(--line); color: var(--muted); }
.badge.news { color: var(--news); background: color-mix(in srgb, var(--news) 12%, transparent); }
.badge.social { color: var(--social); background: color-mix(in srgb, var(--social) 12%, transparent); }
.badge.video { color: var(--video); background: color-mix(in srgb, var(--video) 12%, transparent); }
.badge.pro { color: var(--brand-ink); background: var(--brand); }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  padding: 10px 16px; border-radius: 11px; font-weight: 600; cursor: pointer; text-decoration: none; font-size: 14.5px;
}
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn.danger { color: var(--danger); }
.btn.block { width: 100%; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn svg { width: 18px; height: 18px; }

label.f { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg); outline: none;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.help { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--brand); }

.toggle-list { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle-list label { border: 1px solid var(--line); border-radius: 10px; padding: 7px 11px; font-size: 13.5px; cursor: pointer; display: inline-flex; gap: 7px; align-items: center; background: var(--bg); }
.toggle-list input { accent-color: var(--brand); }
.toggle-list label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }

.kw-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 7px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg); }
.kw-input input { border: 0; outline: none; background: none; flex: 1; min-width: 120px; padding: 4px; }
.kw-input .k { background: var(--brand-soft); color: var(--brand); border-radius: 7px; padding: 3px 4px 3px 9px; font-size: 13.5px; display: inline-flex; align-items: center; gap: 2px; }
.kw-input.ex .k { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.kw-input .k button { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 4px; font-size: 15px; line-height: 1; }

.topic-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px; }
.topic-card .em { font-size: 26px; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); display: grid; place-items: center; flex: none; }
.topic-card h3 { margin: 0 0 4px; font-size: 16px; }
.topic-card .kws { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.src-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.src-row:last-child { border-bottom: 0; }
.src-row .t { flex: 1; min-width: 0; }
.src-row .t b { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-row .t small { color: var(--muted); }
.src-row .err { color: var(--danger); }

.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty h3 { color: var(--text); margin: 0 0 6px; }
.skeleton { height: 92px; margin: 8px 16px; border-radius: 10px; background: linear-gradient(90deg, var(--line), color-mix(in srgb, var(--line) 50%, var(--card)), var(--line)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- alt sayfa (sheet) ---------- */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.42); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { background: var(--card); width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 8px 18px calc(22px + env(safe-area-inset-bottom)); animation: up .2s ease-out; }
.sheet .grip { width: 40px; height: 5px; border-radius: 9px; background: var(--line); margin: 4px auto 10px; }
.sheet h2 { margin: 0 0 14px; font-size: 19px; display: flex; align-items: center; justify-content: space-between; }
@media (min-width: 700px) { .sheet-bg { align-items: center; } .sheet { border-radius: 20px; } }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }

#toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; z-index: 80; max-width: calc(100% - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------- karşılama ---------- */
.hero { padding: 40px 0 24px; }
.hero h1 { font-size: clamp(28px, 7vw, 42px); line-height: 1.12; letter-spacing: -.02em; margin: 14px 0 12px; }
.hero p.lead { font-size: 17px; color: var(--muted); margin: 0 0 22px; }
.feat { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 26px 0; }
.feat .card { padding: 16px; }
.feat b { display: block; margin-bottom: 4px; }
.feat p { margin: 0; color: var(--muted); font-size: 14px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.plan { padding: 20px; position: relative; }
.plan.hl { border: 2px solid var(--brand); }
.plan .price { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.plan .price small { font-size: 14px; color: var(--muted); font-weight: 500; }
.plan ul { padding: 0; margin: 14px 0 18px; list-style: none; }
.plan li { padding: 4px 0 4px 24px; position: relative; font-size: 14px; }
.plan li::before { content: "✓"; position: absolute; left: 2px; color: var(--brand); font-weight: 800; }
.plan li.no { color: var(--muted); }
.plan li.no::before { content: "–"; color: var(--muted); }
.ribbon { position: absolute; top: -11px; right: 16px; background: var(--brand); color: var(--brand-ink); font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.auth-box { max-width: 420px; margin: 0 auto; }
footer.legal { text-align: center; font-size: 12.5px; color: var(--muted); padding: 30px 0 20px; }
footer.legal a { color: var(--muted); margin: 0 6px; }

.digest { padding: 18px; }
.digest h3 { margin: 0 0 4px; font-size: 16px; display: flex; gap: 8px; align-items: center; }
.digest .hl { font-weight: 600; margin: 8px 0 10px; }
.digest ul { margin: 0; padding-left: 18px; }
.digest li { margin: 8px 0; }
.digest .refs { display: inline-flex; gap: 4px; margin-left: 4px; }
.digest .refs a { font-size: 11.5px; text-decoration: none; background: var(--line); color: var(--muted); border-radius: 5px; padding: 0 5px; }

.upsell { background: linear-gradient(135deg, var(--brand-soft), var(--card)); border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line)); }
.kv { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; gap: 12px; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stats .card { padding: 12px; }
.stats b { font-size: 22px; display: block; }
.stats span { font-size: 12.5px; color: var(--muted); }
iframe.paytr { width: 100%; height: 640px; border: 0; border-radius: 12px; background: #fff; }
.sec-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 24px 0 8px; }
.banner { padding: 12px 14px; border-radius: 12px; font-size: 14px; margin: 10px 0; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.banner.warn { background: color-mix(in srgb, var(--accent) 14%, var(--card)); }
.muted { color: var(--muted); }
.mt { margin-top: 16px; }
.center { text-align: center; }
