:root {
  --bg: #f4f8f5; --surface: #ffffff; --surface-2: #eef6f1; --text: #172321; --muted: #5c6f66;
  --line: #dbe7df; --brand: #063f38; --accent: #0d755b; --accent-2: #18a77b; --warn-bg: #fff0da; --warn-text: #7a4b00;
  --ok-bg: #e0f5ea; --ok-text: #066b46; --muted-bg: #edf0f2; --muted-text: #56646d; --danger: #b3261e;
  --radius: 14px; --nav-h: 62px;
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1613; --surface: #16211d; --surface-2: #1b2a25; --text: #e6efeb; --muted: #9bb0a6; --line: #263630;
    --brand: #0a2f2a; --accent: #3fc79d; --accent-2: #2aa981; --warn-bg: #3b2d12; --warn-text: #f0c879;
    --ok-bg: #153828; --ok-text: #7fe0b3; --muted-bg: #222d2a; --muted-text: #a9b9b1; --danger: #ff8a80;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
[hidden] { display: none !important; }

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--brand); color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.brand { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
.brand-logo { grid-row: 1 / 3; width: 34px; height: 34px; border-radius: 9px; background: #fff; }
.brand strong { display: block; font-size: 19px; letter-spacing: -.02em; }
.brand { min-width: 0; }
.brand small { display: block; color: #bfe1d6; font-size: 12px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid #ffffff33; background: #ffffff1a; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.brand strong { white-space: nowrap; }
@media (max-width: 430px) { .top-actions { gap: 6px; } .top-actions .icon-btn { width: 40px; height: 40px; } }
@media (max-width: 380px) { .top-actions .icon-btn { width: 35px; } }
@media (max-width: 340px) { .brand-logo { display: none; } .brand { grid-template-columns: 1fr; } }
a.icon-btn { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; text-decoration: none; }
.icon-btn.spin { animation: spin 1s linear infinite; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.guide-link { color: #fff; text-decoration: none; font-size: 15px; font-weight: 650; min-height: 44px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 12px; border: 1px solid #ffffff33; background: #ffffff1a; }
.guide-link:hover { background: #ffffff2e; }
@keyframes spin { to { transform: rotate(360deg); } }

.banner { margin: 12px 16px 0; padding: 12px 14px; border-radius: var(--radius); background: var(--warn-bg); color: var(--warn-text); font-size: 14px; }
.banner button { margin-top: 8px; }

main { padding: 12px 16px 0; max-width: 720px; margin: 0 auto; }
.tab { display: none; }
.tab.active { display: block; }

label { display: block; font-size: 13px; font-weight: 650; color: var(--muted); margin: 12px 0 4px; }
select, input:not([type=checkbox]):not([type=file]) { display: block; width: 100%; min-height: 44px; margin-top: 4px; padding: 10px 12px;
  font: inherit; font-size: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
input[readonly] { background: var(--surface-2); color: var(--muted); }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.filters .wide { grid-column: 1 / -1; }
.filters.single label:not(.wide) { grid-column: 1 / -1; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; font-weight: 500; color: var(--text); }
.check input { width: 22px; height: 22px; margin: 0; }

h2 { margin: 22px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 8px; }

button, .btn { font: inherit; font-size: 15px; min-height: 44px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--accent); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
button.primary { background: var(--accent-2); border-color: var(--accent-2); color: #fff; font-weight: 700; }
button.danger { color: var(--danger); }
button:disabled { opacity: .5; cursor: not-allowed; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 6px; }

.help, .note { color: var(--muted); font-size: 13px; line-height: 1.4; margin: 8px 0; }
.help:empty, .note:empty { display: none; }
.summary { font-size: 13px; color: var(--muted); margin: 10px 0 2px; }
.health { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--ok-bg); color: var(--ok-text); font-size: 14px; }
.health.warn { background: var(--warn-bg); color: var(--warn-text); }
.box { margin: 18px 0 0; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); }
.box summary { cursor: pointer; font-weight: 700; color: var(--accent); min-height: 32px; }
.box button { margin: 8px 8px 0 0; }
/* Telefonda arama kutusu süzgeçlerin üstünde: kullanıcılar çoğunlukla önce arar. */
#tab-ilanlar .filters > .search { order: -1; }
/* Telefonda süzgeçler "Filtreler" düğmesinin arkasında: ilk kart ekranın üstünde başlasın. Masaüstünde hepsi açık kalır. */
.filter-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; margin: 6px 0 4px; }
.filter-actions .link-btn { margin: 0 0 8px; }
@media (max-width: 1023px) {
  #tab-ilanlar .filters:not(.open) > label { display: none; }
  #tab-ilanlar .filters:not(.open) ~ #filterHelp { display: none; }
}
@media (min-width: 1024px) { #filterToggle { display: none; } }
.site-footer { margin: 28px auto 20px; max-width: 720px; padding: 0 16px; font-size: 12px; text-align: center; color: var(--muted); }
/* "?" yardım penceresi */
.help-dialog { width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--text); overflow: hidden; }
.help-dialog[open] { display: flex; flex-direction: column; }
.help-dialog::backdrop { background: #000a; }
.help-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.help-head h2 { margin: 0; font-size: 18px; }
.icon-btn.dark { border-color: var(--line); background: var(--surface); color: var(--text); width: 40px; height: 40px; font-size: 24px; }
#helpBody { overflow-y: auto; padding: 4px 16px 18px; -webkit-overflow-scrolling: touch; }
.help-section h3 { margin: 18px 0 6px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.help-list { margin: 0; }
.help-list dt { margin-top: 10px; font-weight: 700; color: var(--accent); }
.help-list dd { margin: 2px 0 0; font-size: 14.5px; color: var(--text); }
.related-heading { margin: 18px 0 2px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 14px; font-weight: 650; color: var(--accent); }
.source-links { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.source-links a { font-weight: 650; color: var(--accent); }
.source-links span { display: block; font-size: 13.5px; color: var(--muted); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 2px; margin: 0 -16px; padding-inline: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; border-radius: 99px; padding: 8px 16px; min-height: 40px; }
.chip.active { background: var(--accent-2); border-color: var(--accent-2); color: #fff; font-weight: 700; }

.list { margin-top: 8px; }
.searchbox { display: flex; gap: 8px; }
.searchbox input { flex: 1; min-width: 0; }
.searchbox button { flex: 0 0 auto; min-width: 72px; }
#ilanList { scroll-margin-top: 90px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 10px 0; }
.card h3 { margin: 6px 0; font-size: 16px; line-height: 1.35; }
.card .meta { font-size: 12px; color: var(--muted); }
.reason { margin: 8px 0; font-size: 14px; line-height: 1.45; color: var(--text); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.tag.ok { background: var(--ok-bg); color: var(--ok-text); }
.tag.review { background: var(--warn-bg); color: var(--warn-text); }
.tag.muted { background: var(--muted-bg); color: var(--muted-text); }
.tag.new { background: var(--accent-2); color: #fff; }
.tag.source { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.small { font-size: 12px; color: var(--muted); }
.points { margin: 10px 0 4px; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; font-size: 14px; }
.points ul { list-style: none; margin: 0; padding: 0; }
.points li { margin: 6px 0; line-height: 1.4; }
.points b { color: var(--accent); }
.points details summary { cursor: pointer; color: var(--accent); font-weight: 650; padding: 4px 0; }
.card .actions { margin: 10px 0 0; }
.card .actions a.go { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.more { width: 100%; margin: 10px 0 4px; font-weight: 700; }
.empty { text-align: center; color: var(--muted); padding: 32px 12px; }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }

.bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); }
.bottom button { flex-direction: column; gap: 2px; border: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 650; min-height: var(--nav-h); padding: 6px 2px; }
.bottom a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: 12px; font-weight: 650; min-height: var(--nav-h); padding: 6px 2px; text-decoration: none; }
.bottom button span, .bottom a span { font-size: 20px; line-height: 1; }
.bottom a.opening { color: var(--accent); animation: rehber-aciliyor 0.9s ease-in-out infinite; }
@keyframes rehber-aciliyor { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .bottom a.opening { animation: none; } }
.bottom button.active, .bottom a.active { color: var(--accent); box-shadow:inset 0 3px 0 var(--accent-2); }
.disclaimer { margin: 18px auto 20px; max-width: 720px; padding: 0 16px; font-size: 12px; text-align: center; color: var(--muted); }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(var(--nav-h) + 14px + env(safe-area-inset-bottom)); z-index: 30; padding: 12px 14px; border-radius: 12px; background: #172321; color: #fff; text-align: center; font-size: 14px; box-shadow: 0 6px 20px #0004; }
@media (min-width: 720px) { .bottom { max-width: 720px; margin: 0 auto; border-radius: 14px 14px 0 0; border: 1px solid var(--line); } }
/* Masaüstü (geniş ekran): menü üst çubukta, İlanlar iki sütun (solda filtreler, sağda ilanlar), kartlar ızgara. Telefon düzeni değişmez. */
.side, .results { display: contents; }
@media (min-width: 1024px) {
  :root { --nav-h: 66px; }
  body { padding-bottom: 32px; }
  main { max-width: 1180px; padding: 24px 28px 0; }
  .banner { max-width: 1124px; margin: 14px auto 0; }
  .top { padding-inline: 28px; min-height: 66px; box-sizing: border-box; }
  .bottom { top: 0; bottom: auto; left: 50%; right: auto; width: 600px; max-width: none; margin: 0; transform: translateX(-50%); height: 66px; padding: 0;
    background: transparent; border: 0; border-radius: 0; }
  .bottom button, .bottom a { flex-direction: row; justify-content: center; gap: 8px; min-height: 66px; color: #cfe8df; font-size: 14px; }
  .bottom button:hover, .bottom a:hover { color: #fff; background: #ffffff14; }
  .bottom button.active, .bottom a.active { color: #fff; box-shadow: inset 0 -3px 0 var(--accent-2); }
  .bottom button span, .bottom a span { font-size: 18px; }
  .toast { bottom: 24px; left: 50%; right: auto; width: max-content; max-width: 520px; transform: translateX(-50%); }
  .disclaimer { max-width: 1124px; }
  /* İlanlar: üstte tek satır araç çubuğu (Ara, Hangi ilanlar, Şehir, Profil), altında alan çipleri, sonra eşit yükseklikte kart ızgarası. */
  .side, .results { display: block; min-width: 0; }
  .side .filters { display: flex; flex-wrap: wrap; gap: 0 14px; align-items: flex-end; }
  .side .filters > label { flex: 1 1 170px; min-width: 0; margin-top: 0; }
  .side .filters > label.wide { flex: 1.5 1 230px; }
  .side .filters > .search { flex: 2.4 1 380px; order: -1; }
  .side .filters .search label { margin-top: 0; }
  .side #studentInfo { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
  .side #studentInfo button, .side #studentInfo a { margin: 0; }
  .side #discover .help { margin: 4px 0 8px; }
  .side .chips { flex-wrap: wrap; overflow: visible; margin: 0; padding-inline: 0; }
  .list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; align-items: stretch; }
  .list > .card { margin: 0; display: flex; flex-direction: column; }
  .list > .card .actions { margin-top: auto; padding-top: 10px; }
  .list > :not(.card) { grid-column: 1 / -1; }
  #tab-ozel .filters { grid-template-columns: repeat(3, 1fr); }
  #tab-ozel .filters .wide { grid-column: auto; }
  #tab-profil { max-width: 760px; margin: 0 auto; }
}
/* Veri gelene kadar gösterilen kart iskeleti */
.skeleton { pointer-events: none; }
.sk { display: block; height: 12px; margin: 10px 0; border-radius: 6px; background: var(--muted-bg); animation: sk-pulse 1.4s ease-in-out infinite; }
.sk-tag { width: 96px; height: 22px; border-radius: 99px; }
.sk-title { width: 78%; height: 20px; }
.sk-line.short { width: 55%; }
@keyframes sk-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .icon-btn.spin, .busy-spinner, .sk { animation: none; } }
.busy-note { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 36px 16px; color: var(--text); font-weight: 600; }
.busy-spinner { width: 20px; height: 20px; border: 3px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin 1s linear infinite; }
.discover { margin: 16px 0 6px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); }
.discover h2 { margin: 0; padding: 0; border: 0; font-size: 15px; text-transform: none; letter-spacing: 0; color: var(--text); }
.discover .chips { margin: 8px -14px 0; padding-inline: 14px; }
.discover .chip { min-height: 38px; padding: 6px 14px; font-size: 14px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.fact { display: inline-block; padding: 4px 10px; border-radius: 8px; font-size: 13px; font-weight: 650; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); }
.fact.kpss { background: var(--warn-bg); color: var(--warn-text); border-color: transparent; }
.fact.egitim { background: var(--ok-bg); color: var(--ok-text); border-color: transparent; }
.fact.tarih { color: var(--muted); font-weight: 600; }
/* Telefonda sekme geçişi ve liste çizimi yavaş işlemcide takılıyordu (13 Ekim 2026 ölçümü, 4× yavaşlatılmış işlemci: Özel/Haberler/İlanlar
   sekmeleri 70-100 ms, soğuk Özel 570 ms): kartların hepsi her geçişte yeniden yerleşiyordu. Ekran dışındaki kartlar çizilmesin/yerleşmesin;
   başlık dengeleme (text-wrap: balance) de telefonda yerleşimi pahalılaştırıyordu. Masaüstünde (ızgara) hiçbiri değişmez. */
@media (min-width: 720px) { .card h3 { text-wrap: balance; } }
@media (max-width: 719px) { .card { content-visibility: auto; contain-intrinsic-size: auto 700px; } }
.card .who { font-size: 15px; font-weight: 650; line-height: 1.35; color: var(--accent); margin: 2px 0 2px; }
.card .meta { margin: 0 0 2px; }
.card h3 { font-size: 18px; margin: 8px 0 2px; }

/* Kart başlığı: unvan ve kurum adı aynı hizada, okunaklı bir blok olarak durur. */
.card h3 { font-size: 19px; line-height: 1.3; margin: 10px 0 6px; }
.card .who { font-size: 16.5px; font-weight: 700; line-height: 1.35; margin: 0 0 8px; padding-left: 10px; border-left: 3px solid var(--accent-2); }
.card .meta { padding-left: 13px; margin: 0 0 4px; }
/* Kamu ilanı kartı: kurum adı kalın başlık (h3), altında ne alındığı ("2 memur alınacak", unvan) vurgulu satır. Özel ilan kartında .who işveren adı olarak kalır. */
.card .role { font-size: 16px; font-weight: 650; line-height: 1.35; color: var(--accent); margin: 0 0 8px; padding-left: 10px; border-left: 3px solid var(--accent-2); }
@media (min-width: 720px) { .card h3 { font-size: 20px; } .card .who { font-size: 17px; } .card .role { font-size: 17px; } }
.reason.soft { font-size: 13px; color: var(--muted); }
.fact.maas { background: var(--ok-bg); color: var(--ok-text); border-color: transparent; }
.points details { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 4px; }
.points details summary { min-height: 40px; display: flex; align-items: center; }
.points details ul { margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.link-btn { display: inline-flex; align-items: center; margin: 0 0 10px; min-height: 44px; padding: 0 16px; background: var(--surface); border: 1px solid var(--accent); border-radius: var(--radius); color: var(--accent); font-weight: 700; font-size: 15px; text-decoration: none; }
.button-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--accent); font-weight: 650; text-decoration: none; margin: 8px 8px 0 0; }

/* Ana ekrana ekle şeridi ve adım penceresi */
.install-bar { display: flex; align-items: center; gap: 8px; margin: 12px 16px 0; padding: 8px 8px 8px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); font-size: 14px; }
.install-bar[hidden] { display: none; }
.install-bar span { flex: 1; min-width: 0; }
.install-bar #installOpen { flex: none; padding: 8px 12px; min-height: 40px; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.install-bar .icon-btn.dark { flex: none; }
.install-steps { padding: 4px 16px 16px; overflow-y: auto; }
.install-steps h3 { margin: 14px 0 4px; font-size: 15px; }
.install-steps ol { margin: 0; padding-left: 20px; }
.install-steps li { margin: 3px 0; }
#installNow { margin-top: 14px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
@media (min-width: 900px) { .install-bar { max-width: 1124px; margin: 14px auto 0; } }
