/* Gündem — data-terminal stili, kırmızı vurgu (kişisel siteyle ortak).
   Izgara: rail 56px + canvas (pad 32). Masaüstü: akış 1fr + yan panel 320px, gap 32. */
:root {
  --ground: #111111;
  --surface: #0a0a0a;   /* kartlar zeminden koyu */
  --raised: #1b1b1d;
  --border: #242426;
  --rule: #1c1c1e;
  --control: #3a3a3e;
  --text: #f2f2f3;
  --muted: #b4b4b8;
  --faint: #8f9096;
  --accent: #f05252;    /* kırmızı: yalnız seçim çizgisi ve veri */
  --accent-data: #c42020;
  --radius: 4px;
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace; /* taste-skill-ignore: data-terminal stilinin kararı, yalnız saat ve sayılarda */
  --rail: 56px;
  --pad: 32px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--text);
  font: 14px/1.5 var(--font); min-height: 100vh;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: #000; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Rail */
.rail {
  position: fixed; inset: 0 auto 0 0; width: var(--rail);
  border-right: 1px solid var(--border); background: var(--ground);
  display: flex; flex-direction: column; align-items: center; padding-top: 16px; gap: 6px; z-index: 5;
}
.mark {
  font: 600 15px/1 var(--mono); text-decoration: none; color: var(--text);
  width: 32px; height: 32px; display: grid; place-items: center; margin-bottom: 22px;
  background: var(--raised); border-radius: var(--radius);
}
.rail-link {
  position: relative; width: 100%; height: 44px; display: grid; place-items: center;
  color: var(--faint); text-decoration: none; transition: color .15s;
}
.rail-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.rail-link:hover { color: var(--text); }
.rail-link[aria-current="page"] { color: var(--text); }
.rail-link[aria-current="page"]::after {
  content: ""; position: absolute; right: -1px; top: 12px; bottom: 12px; width: 1px; background: var(--accent);
}
.badge {
  position: absolute; top: 7px; right: 9px; min-width: 16px; height: 16px; padding: 0 4px;
  font: 500 11px/16px var(--mono); text-align: center; color: var(--text);
  background: var(--raised); border-radius: 8px;
}

/* Canvas */
.canvas { margin-left: var(--rail); padding: 28px var(--pad) 64px; max-width: 1440px; }
.title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
h1 { font-size: 24px; line-height: 1.2; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.finding { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.finding b { color: var(--text); font-weight: 500; }
.num, .finding .num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 400; }
.tools { display: flex; gap: 8px; align-items: center; }
.search {
  display: flex; align-items: center; gap: 8px; height: 36px; width: 320px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--control); border-radius: var(--radius); color: var(--faint);
}
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text); }
.search input::placeholder { color: var(--faint); }
#kaynakSec {
  display: none; height: 36px; padding: 0 10px; background: var(--surface);
  border: 1px solid var(--control); border-radius: var(--radius);
}

/* Tabs: seçili olan, etiket genişliğinde 1px mor çizgi */
.tabs {
  display: flex; gap: 24px; margin-top: 24px; border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; flex: none; background: none; border: 0; padding: 10px 0 11px; cursor: pointer;
  color: var(--muted); white-space: nowrap; transition: color .15s;
}
.tab:hover { color: var(--text); }
.tab .num { color: var(--faint); margin-left: 6px; font-size: 12px; }
.tab[aria-selected="true"] { color: var(--text); }
.tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--accent);
}

/* Layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; margin-top: 8px; align-items: start; }
.feed { min-width: 0; }
.day {
  font-size: 12px; color: var(--faint); margin: 24px 0 4px; display: flex; gap: 8px;
}
.day:first-child { margin-top: 12px; }
.day .num { color: var(--faint); }

.item {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) 40px; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--rule);
}
.item time { font: 400 13px/22px var(--mono); color: var(--faint); font-variant-numeric: tabular-nums; }
.src { font-size: 12px; color: var(--faint); margin: 0 0 2px; }
.src span + span::before { content: "·"; margin: 0 6px; }
.item h3 { margin: 0; font-size: 16px; line-height: 1.4; font-weight: 500; }
.item h3 a { text-decoration: none; }
.item h3 a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.item h3 a .ext { width: 13px; height: 13px; vertical-align: -1px; margin-left: 6px; color: var(--faint); }
.ozet {
  margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.save {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--radius);
  background: none; border: 0; color: var(--faint); cursor: pointer; transition: color .15s, background .15s, transform .1s;
}
.save:hover { color: var(--text); background: var(--raised); }
.save:active { transform: scale(.92); }
.save[aria-pressed="true"] { color: var(--accent); }
.save[aria-pressed="true"] svg { fill: currentColor; }

.more {
  margin: 24px 0 0; height: 40px; padding: 0 18px; border-radius: var(--radius);
  background: none; border: 1px solid var(--control); color: var(--text); cursor: pointer;
}
.more:hover { background: var(--raised); }

.empty { padding: 48px 0; color: var(--muted); max-width: 46ch; }
.empty h3 { color: var(--text); font-size: 16px; margin: 0 0 6px; font-weight: 500; }
.empty p { margin: 0; }

/* Side */
.side { display: grid; gap: 16px; position: sticky; top: 24px; margin-top: 12px; }
.panel { background: var(--surface); border-radius: var(--radius); padding: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
h2 { font-size: 16px; font-weight: 600; margin: 0; }
.meta { color: var(--faint); font-size: 12px; }
.sources { list-style: none; margin: 0; padding: 0; }
.sources button {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 32px; gap: 4px 12px; align-items: center;
  background: none; border: 0; padding: 7px 0; text-align: left; cursor: pointer; color: var(--muted); position: relative;
}
.sources button:hover { color: var(--text); }
.sources button[aria-pressed="true"] { color: var(--text); }
.sources .nm { position: relative; }
.sources button[aria-pressed="true"] .nm::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--accent); }
.sources .nm { justify-self: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sources .num { text-align: right; font-size: 13px; color: var(--muted); }
.sources .bar { grid-column: 1 / -1; height: 3px; background: var(--raised); }
.sources .bar i { display: block; height: 100%; background: var(--accent-data); }
.sources .err { grid-column: 1 / -1; font-size: 12px; color: #e5566f; }
.upd { margin: 0 0 8px; font-size: 14px; }
.note { margin: 0; color: var(--muted); font-size: 13px; }
.note b { color: var(--text); font-weight: 500; }

/* Tablet */
@media (max-width: 1100px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .side .panel:first-child { display: none; }
  #kaynakSec { display: block; }
}

/* Telefon: rail alt çubuğa döner, kaynak paneli seçime iner */
@media (max-width: 640px) {
  :root { --pad: 16px; }
  .rail {
    inset: auto 0 0 0; width: auto; height: 60px; flex-direction: row; justify-content: space-around;
    padding: 0 0 env(safe-area-inset-bottom); border-right: 0; border-top: 1px solid var(--border); gap: 0;
  }
  .mark { display: none; }
  .rail-link { height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
  .rail-link span { position: static; width: auto; height: auto; clip: auto; overflow: visible; font-size: 11px; }
  .rail-link[aria-current="page"]::after { right: 30%; left: 30%; top: -1px; bottom: auto; width: auto; height: 1px; }
  .badge { top: 6px; right: calc(50% - 22px); }
  .canvas { margin-left: 0; padding: 20px var(--pad) 96px; }
  h1 { font-size: 22px; }
  .tools { width: 100%; }
  .search { flex: 1; width: auto; height: 44px; }
  #kaynakSec { height: 44px; width: 40%; min-width: 0; flex: none; }
  .search { min-width: 0; }
  .tabs { margin-top: 16px; gap: 20px; }
  .tab { padding: 12px 0 13px; }
  .item { grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; }
  .item time { display: none; }
  .src .t { display: inline; }
  .save { width: 44px; height: 44px; }
}
.src .t { display: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
