:root {
  --acc: #f97316;
  --acc-d: #ea580c;
  --acc-soft: #fff1e6;
  --bg: #f8f7f5;
  --card: #ffffff;
  --ink: #1c1917;
  --ink2: #57534e;
  --ink3: #a8a29e;
  --line: #e7e5e4;
  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --green: #16a34a;
  --green-soft: #f0fdf4;
  --r: 18px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 24px rgba(28,25,23,.06);
}
* { box-sizing: border-box; }
html { font-size: 18px; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select { font: inherit; }

.container { max-width: 1120px; margin: 0 auto; padding: 32px 28px 80px; min-height: 70vh; }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; background: rgba(255,255,255,.88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { font-size: 1.3rem; font-weight: 600; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.logo b { color: var(--acc); font-weight: 800; }
.logo-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--acc); color: #fff; font-size: .9rem; }
.topbar nav { display: flex; align-items: center; gap: 18px; font-weight: 600; }
.topbar nav a[data-nav="ana"] { color: var(--ink2); }
.topbar nav a.active[data-nav="ana"] { color: var(--ink); }
.footer { text-align: center; color: var(--ink3); font-size: .85rem; padding: 24px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: 10px 18px; border-radius: 12px; font-weight: 600; transition: .15s; }
.btn:hover { border-color: var(--ink3); }
.btn-primary { background: var(--acc); color: #fff; border-color: var(--acc); }
.btn-primary:hover { background: var(--acc-d); border-color: var(--acc-d); }
.btn-lg { padding: 16px 28px; font-size: 1.1rem; border-radius: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-rec { background: #dc2626; color: #fff; border-color: #dc2626; }

/* Hero / search */
.hero { text-align: center; padding: 40px 0 28px; }
.hero h1 { font-size: 3rem; line-height: 1.1; letter-spacing: -.035em; margin: 0 0 12px; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--acc); }
.hero p { color: var(--ink2); font-size: 1.2rem; margin: 0 0 30px; }
.search { display: flex; gap: 10px; max-width: 820px; margin: 0 auto; background: var(--card); padding: 8px; border-radius: 20px;
  box-shadow: var(--shadow); border: 2px solid var(--line); transition: .15s; }
.search:focus-within { border-color: var(--acc); box-shadow: 0 0 0 6px rgba(249,115,22,.12); }
.search input { flex: 1; border: 0; outline: 0; font-size: 1.3rem; padding: 12px 16px; background: transparent; min-width: 0; }
.search.sm { max-width: none; border-radius: 16px; }
.search.sm input { font-size: 1.05rem; padding: 8px 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.chip { background: var(--card); border: 1px solid var(--line); padding: 6px 14px; border-radius: 99px; font-size: .9rem; color: var(--ink2); }
.chip:hover { border-color: var(--acc); color: var(--acc-d); }

/* Section */
.section-title { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; margin: 40px 0 16px; display: flex; align-items: center; gap: 10px; }
.section-title small { font-weight: 500; color: var(--ink3); font-size: .95rem; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; box-shadow: var(--shadow); }
a.card, .card.click { transition: .15s; display: block; cursor: pointer; }
a.card:hover, .card.click:hover { transform: translateY(-2px); border-color: var(--acc); }
.ders-card { position: relative; overflow: hidden; padding-top: 28px; }
.ders-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--c, var(--acc)); }
.ders-card h3 { margin: 0 0 4px; font-size: 1.3rem; letter-spacing: -.01em; }
.muted { color: var(--ink2); }
.faint { color: var(--ink3); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; font-size: .85rem; font-weight: 600;
  background: var(--acc-soft); color: var(--acc-d); }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.gray { background: #f5f5f4; color: var(--ink2); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }

/* Breadcrumb / page head */
.crumb { color: var(--ink3); font-weight: 500; margin-bottom: 10px; font-size: .95rem; }
.crumb a:hover { color: var(--acc); }
.page-h { font-size: 2.4rem; letter-spacing: -.03em; margin: 0 0 6px; font-weight: 800; line-height: 1.15; }

/* Week list */
.hafta-list { display: grid; gap: 14px; }
.hafta-item { display: grid; grid-template-columns: 84px 1fr auto; gap: 20px; align-items: center; }
.hafta-no { width: 84px; height: 84px; border-radius: 18px; background: var(--acc-soft); color: var(--acc-d); display: grid; place-items: center; text-align: center; line-height: 1.05; }
.hafta-no b { font-size: 2rem; display: block; }
.hafta-no span { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.hafta-item h3 { margin: 0 0 4px; font-size: 1.25rem; }
.hafta-item p { margin: 0; color: var(--ink2); }

/* Tabs */
.tabs { display: flex; gap: 6px; background: #efedeb; padding: 5px; border-radius: 14px; width: fit-content; margin: 26px 0 8px; position: sticky; top: 74px; z-index: 10; }
.tab { border: 0; background: transparent; padding: 10px 20px; border-radius: 10px; font-weight: 600; color: var(--ink2); }
.tab.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }

/* Summary */
.ozet { font-size: 1.2rem; line-height: 1.7; }
.ozet-card { border-left: 6px solid var(--acc); }

/* Highlights */
.vurgu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 16px; }
.vurgu { cursor: pointer; transition: .15s; position: relative; }
.vurgu:hover { border-color: var(--acc); transform: translateY(-2px); }
.vurgu .q { font-size: 1.15rem; font-weight: 700; margin: 10px 0 8px; line-height: 1.4; }
.vurgu .neden { color: var(--ink2); font-size: .95rem; margin: 0 0 14px; }
.bar { height: 10px; background: #f1efed; border-radius: 99px; overflow: hidden; flex: 1; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #fdba74, var(--acc)); border-radius: 99px; }
.skor { font-weight: 800; font-size: 1.2rem; color: var(--acc-d); min-width: 52px; text-align: right; }
.sinyaller { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.sig { font-size: .78rem; padding: 3px 10px; border-radius: 99px; background: #f5f5f4; color: var(--ink2); font-weight: 600; }
.sig b { color: var(--ink); }
.zaman { font-variant-numeric: tabular-nums; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .85rem; color: var(--ink3); }

/* Concepts */
.kavram-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 14px; }
.kavram h4 { margin: 0 0 6px; font-size: 1.05rem; color: var(--acc-d); }
.kavram p { margin: 0; color: var(--ink2); font-size: .95rem; }

/* Quiz */
.soru { cursor: pointer; }
.soru .s { font-weight: 700; font-size: 1.08rem; display: flex; justify-content: space-between; gap: 12px; }
.soru .c { display: none; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); color: var(--green); font-weight: 600; }
.soru.open .c { display: block; }
.soru .hint { color: var(--ink3); font-weight: 500; font-size: .85rem; white-space: nowrap; }

/* Transcript */
.legend { display: flex; gap: 16px; flex-wrap: wrap; color: var(--ink2); font-size: .9rem; margin-bottom: 14px; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; }
.bolum-h { font-weight: 800; font-size: 1.15rem; margin: 28px 0 8px; color: var(--acc-d); padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.bolum-h small { display: block; font-weight: 500; font-size: .85rem; color: var(--ink3); margin-top: 2px; }
.bolum-h:first-child { margin-top: 0; }
.seg { display: grid; grid-template-columns: 70px 1fr; gap: 14px; padding: 10px 14px; border-radius: 12px; transition: background .3s, box-shadow .3s; scroll-margin-top: 160px; }
.seg .zaman { padding-top: 3px; }
.seg p { margin: 0; font-size: 1.08rem; }
.seg.tam { background: var(--blue-soft); border-left: 4px solid var(--blue); }
.seg .tam-etiket { display: inline-block; font-size: .75rem; font-weight: 700; color: var(--blue); background: #dbeafe; padding: 2px 10px; border-radius: 99px; margin-bottom: 4px; }
.seg.hot p { font-weight: 600; }
.seg.hot .zaman::after { content: " 🔥"; }
.seg.flash { background: #ffedd5 !important; box-shadow: 0 0 0 3px var(--acc); }
@keyframes flash { 0%, 100% { box-shadow: 0 0 0 3px var(--acc); } 50% { box-shadow: 0 0 0 7px rgba(249,115,22,.25); } }
.seg.flash { animation: flash 1s ease 3; }

/* Upload */
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 700; font-size: .95rem; }
.field input, .field select { padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; outline: 0; font-size: 1.05rem; }
.field input:focus, .field select:focus { border-color: var(--acc); }
.two { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.seg-ctrl { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #efedeb; padding: 5px; border-radius: 14px; margin-bottom: 16px; }
.seg-ctrl button { border: 0; background: transparent; padding: 10px; border-radius: 10px; font-weight: 600; color: var(--ink2); }
.seg-ctrl button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.rec-box { text-align: center; padding: 26px 10px; border: 2px dashed var(--line); border-radius: 16px; }
.rec-btn { width: 96px; height: 96px; border-radius: 50%; border: 0; background: var(--acc); color: #fff; font-size: 2.2rem; box-shadow: 0 8px 24px rgba(249,115,22,.35); transition: .15s; }
.rec-btn.on { background: #dc2626; animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(220,38,38,.5); } 70% { box-shadow: 0 0 0 22px rgba(220,38,38,0); } 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); } }
.rec-time { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 14px; }
.drop { display: block; text-align: center; padding: 34px 10px; border: 2px dashed var(--line); border-radius: 16px; cursor: pointer; color: var(--ink2); }
.drop:hover, .drop.over { border-color: var(--acc); background: var(--acc-soft); }
.file-ok { margin-top: 12px; font-weight: 600; color: var(--green); }
audio { width: 100%; margin-top: 12px; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { display: grid; grid-template-columns: 52px 1fr; gap: 16px; padding-bottom: 26px; position: relative; opacity: .4; transition: opacity .4s; }
.timeline li::before { content: ""; position: absolute; left: 25px; top: 52px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li.active, .timeline li.done, .timeline li.err { opacity: 1; }
.timeline li.done::before { background: var(--green); }
.dot { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; background: #f1efed; border: 2px solid var(--line); position: relative; z-index: 1; }
.active .dot { border-color: var(--acc); background: var(--acc-soft); }
.active .dot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--acc); animation: spin 1s linear infinite; }
.done .dot { background: var(--green-soft); border-color: var(--green); }
.err .dot { background: #fef2f2; border-color: #dc2626; }
@keyframes spin { to { transform: rotate(360deg); } }
.timeline h4 { margin: 4px 0 2px; font-size: 1.12rem; }
.timeline p { margin: 0; color: var(--ink2); font-size: .92rem; }
.timeline .st { font-size: .8rem; font-weight: 700; margin-left: 8px; }
.done .st { color: var(--green); }
.active .st { color: var(--acc-d); }
li.kvkk.done .dot { background: var(--green-soft); border-color: var(--green); }
li.kvkk.done h4 { color: var(--green); }
.kvkk-banner { margin-top: 6px; padding: 10px 14px; background: var(--green-soft); border: 1px solid #bbf7d0; border-radius: 12px; color: #166534; font-weight: 600; font-size: .92rem; display: none; }
li.kvkk.done .kvkk-banner { display: block; }
.ready { text-align: center; padding: 10px 0 0; }

/* Search results */
.tahmin { display: flex; align-items: center; gap: 22px; background: linear-gradient(135deg, #fff7ed, #fff); border: 2px solid #fed7aa; }
.gauge { --p: 0; width: 96px; height: 96px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: conic-gradient(var(--acc) calc(var(--p) * 1%), #f1efed 0); }
.gauge span { width: 74px; height: 74px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.35rem; color: var(--acc-d); }
.tahmin h2 { margin: 0; font-size: 1.5rem; letter-spacing: -.02em; font-weight: 600; }
.tahmin h2 b { color: var(--acc-d); font-weight: 800; }
.ai-ozet { font-size: 1.12rem; line-height: 1.7; }
.ai-tag { display: inline-flex; gap: 6px; align-items: center; font-size: .8rem; font-weight: 700; color: #7c3aed; background: #f5f3ff; padding: 3px 10px; border-radius: 99px; margin-bottom: 10px; }
.sonuc { display: grid; grid-template-columns: 1fr 150px; gap: 20px; align-items: center; }
.sonuc blockquote { margin: 8px 0 0; padding-left: 14px; border-left: 4px solid var(--acc); font-size: 1.05rem; color: var(--ink); font-style: italic; }

/* misc */
.empty { text-align: center; padding: 50px; color: var(--ink3); }
.spinner { width: 40px; height: 40px; border: 4px solid var(--line); border-top-color: var(--acc); border-radius: 50%; animation: spin .8s linear infinite; margin: 60px auto; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(120px); background: var(--ink); color: #fff; padding: 14px 22px; border-radius: 14px; font-weight: 600; transition: .3s; z-index: 50; }
.toast.show { transform: translateX(-50%) translateY(0); }
.mock-badge { position: fixed; bottom: 12px; right: 12px; background: #fde68a; color: #78350f; font-size: .7rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; z-index: 40; }
.fade-in { animation: fi .35s ease; }
@keyframes fi { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 800px) {
  html { font-size: 16px; }
  .container { padding: 18px 14px 60px; }
  .topbar { padding: 10px 14px; }
  .logo { font-size: 1.05rem; gap: 8px; }
  .logo-mark { width: 30px; height: 30px; }
  .topbar nav a[data-nav="ana"] { display: none; }
  .topbar nav .btn { padding: 8px 12px; font-size: .9rem; }
  .upload-grid { grid-template-columns: 1fr; gap: 14px; }
  .two { grid-template-columns: 1.6fr 1fr; gap: 8px; }
  .page-h { font-size: 1.7rem; }
  .page-sub { display: none; }
  .hero { padding: 16px 0 10px; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; margin-bottom: 18px; }
  .search { padding: 6px; border-radius: 16px; }
  .search input { font-size: 1.05rem; padding: 8px 10px; }
  .search .btn-lg { padding: 10px 14px; font-size: 1rem; }
  .card { padding: 16px; }
  .rec-box { padding: 22px 8px; }
  .rec-btn { width: 120px; height: 120px; font-size: 2.8rem; }
  .rec-time { font-size: 2.4rem; }
  .timeline li { grid-template-columns: 44px 1fr; gap: 12px; padding-bottom: 20px; }
  .dot { width: 44px; height: 44px; font-size: 1.2rem; }
  .timeline li::before { left: 21px; top: 44px; }
  .timeline h4 { font-size: 1.05rem; }
  .timeline .st { display: block; margin: 2px 0 0; }
  .tahmin { flex-direction: column; text-align: center; gap: 12px; }
  .tahmin h2 { font-size: 1.25rem; }
  .sonuc { grid-template-columns: 1fr; gap: 10px; }
  .hafta-item { grid-template-columns: 56px 1fr; gap: 14px; }
  .hafta-item > :last-child { display: none; }
  .hafta-no { width: 56px; height: 56px; border-radius: 14px; }
  .hafta-no b { font-size: 1.5rem; }
  .tabs { top: 58px; width: 100%; }
  .tab { flex: 1; padding: 10px 8px; }
  .seg { grid-template-columns: 1fr; gap: 2px; padding: 8px 10px; }
  .seg p { font-size: 1rem; }
  .section-title { font-size: 1.25rem; margin-top: 28px; flex-wrap: wrap; }
  .section-title small { font-size: .8rem; }
  .soru .s { flex-direction: column; gap: 4px; }
  .row.between > .btn { width: 100%; justify-content: center; }
  .footer { font-size: .75rem; padding: 16px; }
}
.card { scroll-margin-top: 80px; }
.upload-grid > *, .two > *, .field, .timeline li > div, .sonuc > div, .hafta-item > div { min-width: 0; }
.field select, .field input { width: 100%; min-width: 0; text-overflow: ellipsis; }
body { overflow-x: hidden; }

.seg-ctrl.three { grid-template-columns: repeat(3, 1fr); }
.seg-ctrl.three button { font-size: .92rem; padding: 10px 4px; }
.progress { position: relative; height: 30px; background: #f1efed; border-radius: 99px; overflow: hidden; margin-bottom: 20px; }
.progress i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #fdba74, var(--acc)); border-radius: 99px; transition: width .6s ease; }
.progress span { position: relative; display: block; text-align: center; line-height: 30px; font-weight: 800; font-size: .9rem; }
.log { max-height: 260px; overflow-y: auto; }
.log-row.son { color: var(--acc-d); font-weight: 600; }
.foto-onizle { display: block; width: 100%; max-height: 260px; object-fit: contain; border-radius: 12px; margin-top: 12px; background: #f5f5f4; }
.uyari { margin-top: 10px; font-size: .88rem; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; padding: 8px 12px; border-radius: 10px; }
/* Tahta */
.tahta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); gap: 16px; }
.tahta { padding: 0; overflow: hidden; }
.tahta img { display: block; width: 100%; max-height: 300px; object-fit: cover; background: #f5f5f4; cursor: zoom-in; }
.tahta .ic { padding: 18px 20px; }
.tahta h4 { margin: 0 0 6px; font-size: 1.15rem; }
.tahta .okunan { white-space: pre-wrap; font-family: ui-monospace, Menlo, monospace; font-size: .9rem; background: #fafaf9; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 10px 0; max-height: 220px; overflow: auto; }
.tahta .git { color: var(--acc-d); font-weight: 600; cursor: pointer; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: grid; place-items: center; z-index: 60; cursor: zoom-out; }
.lightbox img { max-width: 95vw; max-height: 92vh; border-radius: 8px; }
.only-print { display: none; }

@media print {
  @page { margin: 14mm; }
  html { font-size: 11pt; }
  body { background: #fff; }
  .topbar, .footer, .tabs, .no-print, .btn, .toast, .mock-badge, .search, .crumb { display: none !important; }
  .container { max-width: none; padding: 0; }
  [data-pane] { display: block !important; }
  .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .vurgu-grid, .kavram-grid, .tahta-grid { grid-template-columns: 1fr 1fr; }
  .soru .c { display: block !important; }
  .soru .hint { display: none; }
  .seg { break-inside: avoid; padding: 4px 8px; }
  .seg.flash { animation: none; box-shadow: none; }
  .fade-in { animation: none !important; }
  .only-print { display: block; }
  .tahta img { max-height: 200px; }
  .tabs + * { margin-top: 0; }
  [data-pane="metin"] .card { break-inside: auto; }
  .section-title small, .legend + * .zaman::after { display: none; }
  .section-title { break-after: avoid; }
  a { color: inherit; }
}
