/* ---------- tokens ---------- */
:root {
  --bg: #0e0f11; --surface: #18191c; --surface-2: #212328; --border: #2a2c31; --line: #26282d;
  --text: #f2f3f5; --muted: #9a9ea8; --faint: #6c707a;
  --accent: #f97316; --accent-2: #ef4444; --ai: #a855f7; --ai-2: #22d3ee; --ok: #34d399;
  --pill-active-bg: #ffffff; --pill-active-fg: #0e0f11;
  --radius: 12px; --maxw: 1240px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f5f7; --surface: #ffffff; --surface-2: #eceef2; --border: #dfe2e8; --line: #e3e5ea;
  --text: #111317; --muted: #5c6270; --faint: #8a8f99;
  --pill-active-bg: #111317; --pill-active-fg: #ffffff;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]):not([data-theme="light"]) {
    --bg: #f4f5f7; --surface: #ffffff; --surface-2: #eceef2; --border: #dfe2e8; --line: #e3e5ea;
    --text: #111317; --muted: #5c6270; --faint: #8a8f99;
    --pill-active-bg: #111317; --pill-active-fg: #ffffff;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
[hidden] { display: none !important; }

/* ---------- header ---------- */
header.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); }
.bar-row { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; white-space: nowrap; }
.brand .bar { width: 4px; height: 22px; background: var(--accent); border-radius: 2px; }
.brand .dot { color: var(--accent); }
.brand.small { font-size: 16px; margin-bottom: 8px; }
.nav { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.pill:hover { color: var(--text); }
.pill.active { background: var(--pill-active-bg); color: var(--pill-active-fg); font-weight: 600; }
.pill .ico { font-size: 12px; opacity: .8; }
.dropdown { position: relative; }
.menu { position: fixed; margin-top: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 6px; min-width: 200px; box-shadow: 0 12px 30px rgba(0,0,0,.35); z-index: 30; }
.menu-item { display: flex; width: 100%; justify-content: space-between; gap: 12px; padding: 8px 10px; font: inherit; font-size: 14px; color: var(--text); border-radius: 6px; border: 0; background: none; cursor: pointer; text-align: left; }
.menu-item:hover { background: var(--surface-2); }
.menu-item.on { color: var(--accent); font-weight: 600; }
.menu-item.dim { color: var(--muted); cursor: default; }
.menu-item.dim:hover { background: none; }
.menu-item small { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--border); background: transparent; cursor: pointer; font-size: 16px; display: grid; place-items: center; }
.ai-pill { border: 1px solid color-mix(in srgb, var(--ai) 60%, transparent); color: var(--text); font-weight: 700; background: linear-gradient(90deg, color-mix(in srgb, var(--ai) 22%, transparent), color-mix(in srgb, var(--ai-2) 18%, transparent)); }
.ai-pill.active { background: linear-gradient(90deg, var(--ai), var(--ai-2)); color: #fff; border-color: transparent; }
.searchbar { padding-bottom: 10px; }
.searchbar input { width: 100%; background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 11px 14px; font: inherit; }

/* ---------- tabs, chips, filters ---------- */
.kinds { display: flex; gap: 6px; padding: 10px 0 4px; overflow-x: auto; scrollbar-width: none; }
.tab { border: 1px solid var(--border); background: var(--surface); padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tab span { margin-left: 6px; font-weight: 500; color: var(--faint); }
.tab.active { color: var(--text); border-color: var(--text); }
.subnav { display: flex; gap: 6px; padding: 8px 0; overflow-x: auto; scrollbar-width: none; }
.chip { border: 0; background: var(--surface-2); color: var(--muted); padding: 5px 11px; border-radius: 999px; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.chip.active { background: var(--accent); color: #fff; }
.chip.os { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--text); }
.chip.std { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--text); }
.filters { margin: 2px 0 6px; font-size: 13px; color: var(--muted); }
.filters summary { cursor: pointer; width: max-content; padding: 4px 0; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 0; }
.filter-row select { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 7px 9px; font: inherit; font-size: 13px; max-width: 100%; }
.filter-row label { display: flex; gap: 6px; align-items: center; }

/* ---------- covers & overlay cards ---------- */
.cover { position: relative; background: #111 center / cover no-repeat; }
.ocard { position: relative; display: block; border-radius: var(--radius); overflow: hidden; min-height: 180px; background: var(--surface); }
.ocard .cover { position: absolute; inset: 0; transition: transform .5s ease; }
.ocard:hover .cover { transform: scale(1.04); }
.ocard .overlay { position: absolute; inset: auto 0 0 0; padding: 16px 18px; background: linear-gradient(180deg, transparent, rgba(6,7,9,.78) 38%, rgba(6,7,9,.94)); color: #fff; }
.ocard h3 { margin: 6px 0 6px; font-size: 15px; line-height: 1.3; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ocard p { margin: 0 0 8px; color: rgba(255,255,255,.78); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ocard .meta { color: rgba(255,255,255,.62); }
.cat { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.hero-main .cat, .feature-main .cat { display: inline-block; background: var(--accent-2); color: #fff; padding: 3px 8px; border-radius: 4px; letter-spacing: .05em; }
.credit { position: absolute; right: 6px; bottom: 6px; z-index: 2; max-width: 70%; font-size: 9.5px; line-height: 1.3; color: rgba(255,255,255,.75); background: rgba(0,0,0,.45); padding: 2px 6px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ocard .credit { top: 8px; bottom: auto; right: auto; left: 8px; }
.ocard .ai-badge ~ .credit { left: 8px; }
.art-figure { margin: 0 0 22px; }
.art-figure .cover-hero { margin-bottom: 6px; }
.art-figure figcaption { font-size: 12px; color: var(--faint); }
.art-figure figcaption a { color: var(--muted) !important; }
.ai-badge { position: absolute; top: 10px; right: 10px; z-index: 2; font-size: 11px; font-weight: 800; color: #fff; padding: 3px 8px; border-radius: 999px; background: linear-gradient(90deg, var(--ai), var(--ai-2)); box-shadow: 0 2px 10px rgba(168,85,247,.45); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1fr 3fr; gap: 16px; margin: 10px 0 8px; height: 380px; }
.hero-side { display: grid; grid-template-rows: 1fr 1fr; gap: 16px; min-height: 0; }
.hero-side .ocard, .feature-side .ocard { min-height: 0; }
.hero-main h3 { font-size: 28px; line-height: 1.18; letter-spacing: -0.015em; -webkit-line-clamp: 2; }
.hero-main .overlay { padding: 24px 26px; }

/* ---------- story bubbles ---------- */
.stories { display: flex; gap: 18px; overflow-x: auto; padding: 22px 2px 10px; scrollbar-width: none; justify-content: flex-start; scroll-behavior: smooth; }
.stories::-webkit-scrollbar { display: none; }
/* Centre when everything fits, but never clip the start when it overflows ("safe" centring). */
.stories > :first-child { margin-left: auto; }
.stories > :last-child { margin-right: auto; }
/* Scroll arrows for horizontal rails */
.rail-wrap { position: relative; }
.rail-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--text); font-size: 18px; line-height: 1; cursor: pointer; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.35); transition: opacity .2s; }
.rail-btn.left { left: -6px; }
.rail-btn.right { right: -6px; }
.rail-btn[hidden] { display: none; }
.rail-wrap::before, .rail-wrap::after { content: ""; position: absolute; top: 0; bottom: 0; width: 36px; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .2s; }
.rail-wrap::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.rail-wrap::after { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.rail-wrap.can-left::before, .rail-wrap.can-right::after { opacity: 1; }
.rail-wrap .stories { padding-left: 4px; padding-right: 4px; }
.story { flex: 0 0 auto; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 76px; }
.ring { width: 64px; height: 64px; border-radius: 50%; padding: 2.5px; background: conic-gradient(from 210deg, var(--accent), var(--accent-2), #8b5cf6, var(--accent)); display: block; }
.story.ai .ring { background: conic-gradient(from 0deg, var(--ai), var(--ai-2), var(--ai)); }
.bubble { width: 100%; height: 100%; border-radius: 50%; border: 2.5px solid var(--bg); display: grid; place-items: center; background: #222 center / cover; }
.bubble b { font-size: 17px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.8); }
.story-label { font-size: 11.5px; color: var(--muted); max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story:hover .story-label { color: var(--text); }

/* ---------- section header ---------- */
.section-h { display: flex; align-items: center; gap: 14px; font-size: 20px; margin: 22px 0 16px; }
.section-h::after { content: ""; flex: 1; height: 1px; background: var(--line); order: 2; }
.section-h small { order: 3; font-size: 12.5px; font-weight: 500; color: var(--faint); }

/* ---------- grid cards ---------- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid transparent; transition: border-color .2s, transform .2s; }
.card:hover { border-color: var(--border); transform: translateY(-2px); }
.card .cover { aspect-ratio: 16 / 9.5; }
.kind-badge { position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 600; color: #fff; background: rgba(10,11,14,.78); padding: 3px 9px; border-radius: 6px; }
.card-body { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.meta { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--faint); }
.card h3 { margin: 8px 0 8px; font-size: 18.5px; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; padding-top: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.read { margin-left: auto; font-size: 13px; font-weight: 700; }
.sum-badge, .os-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.sum-badge { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.os-badge { color: var(--text); background: color-mix(in srgb, var(--ok) 22%, transparent); }

/* feature row: one big + two stacked, spans the full grid width */
.feature-row { grid-column: 1 / -1; display: grid; grid-template-columns: 2fr 1fr; gap: 18px; height: 420px; }
.feature-side { display: grid; grid-template-rows: 1fr 1fr; gap: 18px; min-height: 0; }
.feature-main h3 { font-size: 26px; line-height: 1.2; -webkit-line-clamp: 3; }
.feature-main .overlay { padding: 24px 26px; }

.more { display: block; margin: 26px auto 8px; border: 1px solid var(--border); color: var(--text); }
.empty { padding: 50px; text-align: center; color: var(--muted); }
.updated { text-align: center; color: var(--faint); font-size: 12px; }

/* ---------- article page ---------- */
article.paper { max-width: 780px; margin: 0 auto; padding: 20px 0 60px; }
.cover-hero { height: 300px; border-radius: var(--radius); background: #111 center / cover no-repeat; margin-bottom: 22px; }
.art-kicker { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { display: inline-block; background: var(--accent-2); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; }
.badge.ai { background: linear-gradient(90deg, var(--ai), var(--ai-2)); text-transform: none; }
article.paper h1 { font-size: 32px; line-height: 1.2; letter-spacing: -0.02em; margin: 14px 0 10px; }
.art-meta { font-size: 13px; color: var(--muted); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 22px; }
.chips .chip { cursor: default; }
article.paper h2 { font-size: 21px; margin: 34px 0 10px; }
article.paper p, article.paper li { font-size: 16.5px; line-height: 1.75; color: color-mix(in srgb, var(--text) 88%, var(--muted)); }
article.paper a { color: var(--accent); }
.tldr-box { background: var(--surface); border-left: 4px solid var(--accent); padding: 16px 20px; border-radius: 8px; font-size: 16px; line-height: 1.65; }
.method-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin: 24px 0; overflow: hidden; }
.method-card h3 { margin: 0; padding: 12px 18px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; background: var(--surface-2); color: var(--muted); }
.method-card dl { margin: 0; display: grid; grid-template-columns: 190px 1fr; }
.method-card dt, .method-card dd { margin: 0; padding: 10px 18px; border-top: 1px solid var(--border); font-size: 14px; line-height: 1.55; }
.method-card dt { color: var(--muted); font-weight: 600; }
.cite { background: var(--surface); border-radius: 10px; padding: 16px 18px; font-size: 14px; line-height: 1.7; }
.disclaimer { font-size: 13px !important; color: var(--faint) !important; margin-top: 28px; }

.site-footer { border-top: 1px solid var(--line); color: var(--faint); font-size: 12.5px; padding: 26px 0 44px; margin-top: 40px; }
.site-footer p { max-width: 760px; margin: 0; line-height: 1.6; }

/* ---------- language blocks, zoom (font size setting) ---------- */
html[lang="tr"] .lang-en, html:not([lang="tr"]) .lang-tr { display: none !important; }
.zoom { zoom: var(--zoom, 1); }
.muted { color: var(--muted); }
.tiny { font-size: 11.5px; color: var(--faint); }

/* ---------- header actions ---------- */
.pill.outline { border: 1px solid var(--border); color: var(--text); }
.pill.lang { border: 0; color: var(--muted); font-size: 13px; }
a.icon-btn { color: var(--text); }
.btn-signin { background: #fff; color: #111; border: 0; border-radius: 999px; padding: 7px 16px; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; }
@media (max-width: 640px) { .actions { gap: 6px; } .actions .pill.lang { padding: 6px 4px; } .btn-signin { padding: 7px 12px; font-size: 13px; } }
.avatar { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--accent); padding: 0; overflow: hidden; background: var(--surface-2); color: var(--text); font-weight: 700; cursor: pointer; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- buttons ---------- */
.btn-white, .btn-dark, .btn-blue { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 11px 16px; border-radius: 999px; font: inherit; font-weight: 600; font-size: 14.5px; cursor: pointer; border: 1px solid transparent; margin: 8px 0; }
.btn-white { background: #fff; color: #111; }
.btn-dark { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-blue { background: #2563eb; color: #fff; width: auto; margin: 0; }
.mini { border: 1px solid var(--border); background: transparent; color: var(--text); border-radius: 999px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.mini.on { background: var(--text); color: var(--bg); }

/* ---------- modal, sheet, sign-in ---------- */
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.6); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; }
.modal { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; width: min(640px, 100%); max-height: 86vh; overflow: auto; padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.modal.small { width: min(400px, 100%); }
.modal .x { position: absolute; top: 12px; right: 12px; border: 0; background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: 4px 10px; cursor: pointer; font-size: 12px; }
.noscroll { overflow: hidden; }
.signin { text-align: center; padding: 8px 6px; }
.signin h2 { margin: 10px 0 4px; font-size: 22px; }
.signin .muted { margin: 0 0 16px; font-size: 14px; }
.logo-mark { width: 44px; height: 44px; border-radius: 10px; background: #111; margin: 0 auto; display: grid; place-items: center; border: 1px solid var(--border); }
.logo-mark .bar { width: 6px; height: 26px; background: var(--accent); border-radius: 2px; }
.signin-brand { font-weight: 800; font-size: 12px; letter-spacing: .12em; margin-top: 6px; }
.signin-brand .dot, .brand .dot { color: var(--accent); }
.notice-box { background: var(--surface-2); padding: 14px; border-radius: 10px; color: var(--muted); font-size: 14px; }
.big-avatar { width: 72px; height: 72px; border-radius: 50%; }
.modal.sheet { align-self: end; width: min(720px, 100%); border-radius: 18px 18px 0 0; margin-bottom: -16px; padding-top: 30px; }
.modal.sheet::before { content: ""; position: absolute; top: 10px; left: 50%; width: 44px; height: 4px; border-radius: 4px; background: var(--border); transform: translateX(-50%); }
.sheet-body h2 { margin: 0 0 14px; font-size: 20px; }
.sheet-body h4 { margin: 18px 0 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.sheet-body textarea { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 12px; font: inherit; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.seg button { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 10px; padding: 9px; font: inherit; font-size: 14px; cursor: pointer; }
.seg button.on { background: #2563eb; border-color: #2563eb; color: #fff; font-weight: 600; }
.tgl { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--border); cursor: pointer; }
.tgl span { display: flex; flex-direction: column; font-size: 14px; }
.tgl small { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.tgl input { display: none; }
.tgl i { flex: 0 0 auto; width: 42px; height: 24px; border-radius: 999px; background: var(--border); position: relative; transition: background .2s; }
.tgl i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.tgl input:checked + i { background: #2563eb; }
.tgl input:checked + i::after { transform: translateX(18px); }
.preview { margin-top: 16px; background: var(--bg); border: 1px dashed var(--border); border-radius: 12px; padding: 14px 16px; zoom: var(--zoom, 1); }
.preview p { margin: 6px 0 0; color: var(--muted); }
.acct { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.acct img { width: 48px; height: 48px; border-radius: 50%; }
.acct small { display: block; color: var(--muted); }
.hidden-list > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.chips .chip.on { background: var(--surface-2); color: var(--text); }
.chips .chip button { border: 0; background: none; color: var(--muted); cursor: pointer; }

/* ---------- search overlay ---------- */
.modal.search { width: min(720px, 100%); padding: 0; align-self: start; margin-top: 6vh; }
.search-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.search-head input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 17px; }
.search-head .x { position: static; }
.s-ico { font-size: 20px; color: var(--muted); }
.search-kinds { display: flex; gap: 6px; padding: 10px 16px 0; overflow-x: auto; scrollbar-width: none; }
.search-results { padding: 8px; max-height: 60vh; overflow: auto; }
.s-row { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 10px; }
.s-row:hover { background: var(--surface-2); }
.s-thumb { flex: 0 0 64px; height: 44px; border-radius: 6px; background: var(--surface-2) center / cover; }
.s-text { display: flex; flex-direction: column; min-width: 0; }
.s-title { font-weight: 600; font-size: 14.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.s-title mark { background: color-mix(in srgb, var(--accent) 40%, transparent); color: inherit; border-radius: 3px; }
.s-meta { font-size: 12px; color: var(--faint); }
.s-sub { font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; padding: 8px 8px 4px; }
.s-recent { display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--text); padding: 8px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 14px; }
.s-recent:hover { background: var(--surface-2); }
.s-empty { padding: 30px; text-align: center; color: var(--muted); }
.search-foot { padding: 10px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--faint); }
.ai-txt { color: var(--ai); font-weight: 700; }

/* ---------- toast & privacy notice ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; z-index: 200; transition: .25s; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.cookie { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 90; width: min(620px, calc(100% - 32px)); display: flex; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; box-shadow: 0 20px 50px rgba(0,0,0,.45); font-size: 13px; }
.cookie p { margin: 4px 0 0; color: var(--muted); }
.cookie a { color: var(--text); text-decoration: underline; }

/* ---------- card extras: actions, badges, rows ---------- */
.card-link { display: flex; flex-direction: column; flex: 1; color: inherit; }
.card { position: relative; }
.card-foot { padding: 0 18px 14px; margin-top: 0; }
.acts { display: inline-flex; gap: 2px; }
.act { border: 0; background: none; color: var(--faint); padding: 5px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.act:hover { color: var(--text); background: var(--surface-2); }
.act.on { color: var(--accent); }
.new-badge { font-size: 10px; font-weight: 800; color: #111; background: #facc15; padding: 1px 6px; border-radius: 4px; letter-spacing: .04em; }
.play { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; font-size: 20px; padding-left: 4px; border: 2px solid rgba(255,255,255,.8); }
.rows { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: var(--radius); padding: 10px 12px 10px 10px; }
.row-link { display: flex; gap: 14px; align-items: center; flex: 1; min-width: 0; }
.row .cover { flex: 0 0 150px; height: 96px; border-radius: 8px; overflow: hidden; }
.row .credit, .row .play { display: none; }
.row h3 { margin: 4px 0; font-size: 16px; line-height: 1.3; }
.row p { margin: 0; color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cat-inline { color: var(--accent); font-weight: 700; }
.section-h .follow { margin-left: 4px; font-size: 12.5px; padding: 5px 12px; }
.section-h { flex-wrap: wrap; }
.sentinel { display: grid; place-items: center; padding: 30px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--border); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- feed mode ---------- */
.fm { display: grid; grid-template-columns: 250px minmax(0, 620px) 330px; justify-content: center; gap: 0; min-height: 100vh; }
.fm-left, .fm-right { position: sticky; top: 0; height: 100vh; padding: 16px; overflow: auto; }
.fm-left { display: flex; flex-direction: column; gap: 18px; border-right: 1px solid var(--line); }
.fm-nav { display: flex; flex-direction: column; gap: 2px; }
.fm-nav button, .fm-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 0; background: none; color: var(--text); font: inherit; font-size: 16px; font-weight: 600; border-radius: 999px; cursor: pointer; text-align: left; }
.fm-nav button:hover, .fm-nav a:hover { background: var(--surface-2); }
.fm-nav button.active { background: var(--surface-2); }
.fm-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.fm-actions .ai-pill, .fm-actions .outline[href*="feed"] { display: none; }
.fm-center { border-right: 1px solid var(--line); min-width: 0; }
.fm-top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); padding: 14px 18px 6px; }
.fm-top h1 { margin: 0; font-size: 20px; }
.stories.small { justify-content: flex-start; padding: 8px 14px 10px; gap: 12px; }
.stories.small .story { width: 64px; }
.stories.small .ring { width: 54px; height: 54px; }
.fm-tabs { display: flex; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); position: sticky; top: 50px; z-index: 4; background: var(--bg); }
.fm-tab { flex: 0 0 auto; border: 0; background: none; color: var(--muted); padding: 14px 16px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; border-bottom: 3px solid transparent; }
.fm-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.post { display: flex; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.p-avatar { flex: 0 0 40px; height: 40px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 18px; }
.p-main { flex: 1; min-width: 0; }
.p-head { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: 13.5px; color: var(--faint); }
.p-head b { color: var(--text); }
.p-outlet { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-badge.inline { position: static; font-size: 10px; padding: 1px 7px; box-shadow: none; }
.p-text { display: block; margin: 6px 0 10px; font-size: 15px; line-height: 1.55; color: var(--text); }
.p-text b { display: block; margin-bottom: 3px; }
.p-text span { color: color-mix(in srgb, var(--text) 80%, var(--muted)); }
.p-sum { display: inline-block; font-size: 12.5px; font-weight: 600; color: var(--ok); margin-bottom: 10px; }
.p-media { display: block; position: relative; aspect-ratio: 16 / 9; border-radius: 16px; border: 1px solid var(--border); background: var(--surface-2) center / cover; overflow: hidden; cursor: pointer; }
.p-media iframe { width: 100%; height: 100%; border: 0; }
.p-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.fm-search { width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; color: var(--muted); padding: 11px 16px; font: inherit; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.fm-search kbd { margin-left: auto; font-size: 11px; border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; }
.fm-box { background: var(--surface); border-radius: 16px; padding: 14px 0 6px; margin: 16px 0; }
.fm-box h3 { margin: 0 16px 6px; font-size: 17px; }
.trend { display: flex; flex-direction: column; padding: 9px 16px; }
.trend:hover { background: var(--surface-2); }
.trend small { color: var(--faint); font-size: 12px; }
.trend b { font-size: 15px; }
.fm-links { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 0 6px; font-size: 12px; color: var(--faint); }
.fm-links a:hover { text-decoration: underline; }
.fm-bottom { display: none; }
.explore { padding: 8px 18px 30px; }
.explore h3 { font-size: 15px; margin: 22px 0 10px; color: var(--muted); }
.explore-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.xtag { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 13.5px; }
.xtag small { color: var(--faint); }

/* ---------- settings, archive, legal ---------- */
.narrow { max-width: 760px; }
.page-h { font-size: 24px; margin: 22px 0 16px; }
.settings-list { display: flex; flex-direction: column; gap: 8px; padding-bottom: 30px; }
.srow { display: flex; align-items: center; gap: 14px; width: 100%; background: var(--surface); border: 0; border-radius: 12px; padding: 14px 16px; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.srow:hover { background: var(--surface-2); }
.sicon { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 15px; flex: 0 0 auto; }
.stext { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.stext b { font-size: 14.5px; font-weight: 600; }
.stext small { font-size: 12px; color: var(--faint); margin-top: 2px; }
.chev { color: var(--faint); font-size: 20px; }
.arch-month h2 { font-size: 18px; margin: 26px 0 8px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.arch-month h2 small { color: var(--faint); font-weight: 500; font-size: 13px; }
.arch-month ul { list-style: none; margin: 0; padding: 0; }
.arch-month li { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; font-size: 14px; border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent); }
.arch-date { color: var(--faint); font-variant-numeric: tabular-nums; flex: 0 0 22px; }
.arch-kind { flex: 0 0 76px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.arch-month li a { flex: 1; min-width: 0; }
.arch-month li a:hover { color: var(--accent); }
.arch-src { color: var(--faint); font-size: 12px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legal { padding-bottom: 40px; }
.legal h1 { font-size: 28px; margin: 24px 0 8px; }
.legal h2 { font-size: 19px; margin: 26px 0 8px; }
.legal p, .legal li { line-height: 1.75; color: color-mix(in srgb, var(--text) 88%, var(--muted)); }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--surface); }
.foot-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.foot-links a:hover { color: var(--text); }
.copy { margin-top: 10px !important; }
.tr-title { color: var(--muted); margin: -4px 0 8px; font-size: 16px; }
.art-actions { margin: 12px 0 0; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .fm { grid-template-columns: 220px minmax(0, 1fr); }
  .fm-right { display: none; }
}
@media (max-width: 760px) {
  .fm { grid-template-columns: 1fr; }
  .fm-left { display: none; }
  .fm-center { border: 0; padding-bottom: 64px; }
  .fm-bottom { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; justify-content: space-around; background: var(--surface); border-top: 1px solid var(--border); padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); }
  .fm-bottom button, .fm-bottom a { border: 0; background: none; color: var(--text); font-size: 20px; padding: 6px 12px; cursor: pointer; }
  .hide-sm { display: none !important; }
  .row .cover { flex-basis: 96px; height: 72px; }
  .cookie { flex-direction: column; align-items: stretch; }
}
@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; height: auto; }
  .hero-main { min-height: 300px; order: -1; }
  .hero-side { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .hero-side .ocard { min-height: 190px; }
  .feature-row { grid-template-columns: 1fr; height: auto; }
  .feature-main { min-height: 320px; }
  .feature-side { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .feature-side .ocard { min-height: 200px; }
  .stories { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .bar-row { gap: 10px; height: 58px; }
  .brand { font-size: 17px; }
  .ai-pill { padding: 6px 10px; }
  .grid { grid-template-columns: 1fr; }
  .hero-side, .feature-side { grid-template-columns: 1fr; }
  .hero-main h3, .feature-main h3 { font-size: 21px; }
  article.paper h1 { font-size: 24px; }
  .method-card dl { grid-template-columns: 1fr; }
  .method-card dd { border-top: 0; padding-top: 0; }
  .cover-hero { height: 190px; }
}
