:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --panel-2: #f8f9fb;
  --line: #e2e5ea;
  --text: #1c2027;
  --muted: #687080;
  --accent: #f5b800;
  --accent-ink: #1c2027;
  --accent-soft: #fff4cc;
  --link: #1f5fbf;
  --ok: #1d8a4e;
  --ok-soft: #e3f4ea;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 2px 8px rgba(16, 24, 40, .06);
  --radius: 10px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --panel: #1a1d23;
    --panel-2: #20242b;
    --line: #2d323b;
    --text: #e8eaee;
    --muted: #98a0ad;
    --accent-soft: #3a3214;
    --link: #7fb0ff;
    --ok: #4cc283;
    --ok-soft: #173326;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }

/* ---------- ortak bileşenler ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--panel);
  padding: 6px 12px; border-radius: 8px; cursor: pointer;
  white-space: nowrap; color: var(--text); font-size: 14px;
}
.btn:hover { border-color: var(--muted); text-decoration: none; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.big { padding: 10px 18px; font-size: 16px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; cursor: pointer; font-size: 18px; line-height: 1;
}
.icon-btn:hover { background: var(--panel-2); border-color: var(--line); }
.chip {
  display: inline-block; padding: 1px 7px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line);
  font: 12px/1.6 var(--mono); color: var(--muted); white-space: nowrap;
}
.chip.hit { background: var(--ok-soft); border-color: transparent; color: var(--ok); font-weight: 600; }
.chip.lang { font-family: var(--sans); }
.chip.tr { background: var(--accent-soft); border-color: transparent; color: var(--text); }
.badge {
  display: inline-block; min-width: 46px; text-align: center;
  padding: 1px 6px; border-radius: 6px; font: 600 12px/1.6 var(--mono);
  background: var(--panel-2); border: 1px solid var(--line);
}
.t-o { --tc: #1f6feb; } .t-l { --tc: #b35900; } .t-f { --tc: #8250df; } .t-g { --tc: #1d8a4e; }
.badge.t-o, .badge.t-l, .badge.t-f, .badge.t-g { color: var(--tc); border-color: color-mix(in srgb, var(--tc) 35%, transparent); }
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ---------- giriş sayfası ---------- */
.home { max-width: 1080px; margin: 0 auto; padding: 32px 20px 60px; }
.hero { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.hero-logo {
  width: 52px; height: 52px; border-radius: 14px; background: var(--accent);
  display: grid; place-items: center; flex: none;
}
.hero h1 { margin: 0; font-size: 26px; letter-spacing: -.01em; }
.hero p { margin: 2px 0 0; color: var(--muted); }
.car { padding: 22px; margin-bottom: 28px; }
.car h2, .home h2 { margin: 0 0 4px; font-size: 18px; }
.car .hint { color: var(--muted); margin: 0 0 16px; font-size: 14px; }
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button {
  border: 1px solid var(--line); background: var(--panel-2);
  border-radius: 9px; padding: 8px 12px; cursor: pointer; text-align: left;
}
.seg button small { display: block; color: var(--muted); font: 11px var(--mono); }
.seg button.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.row { display: flex; flex-wrap: wrap; gap: 24px; }
.row > .field { flex: 1 1 220px; }
input[type=month], select.inp {
  border: 1px solid var(--line); background: var(--panel-2);
  border-radius: 9px; padding: 8px 10px; min-width: 180px;
}
.reco {
  margin-top: 6px; padding: 16px; border-radius: var(--radius);
  background: var(--accent-soft); display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px;
}
.reco .what { flex: 1 1 320px; }
.reco .what b { font-size: 17px; }
.reco .what div { color: var(--muted); font-size: 14px; }
.reco .alt { font-size: 13px; color: var(--muted); width: 100%; }

.lanes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 12px; }
@media (max-width: 760px) { .lanes { grid-template-columns: 1fr; } }
.lane h3 { margin: 0 0 10px; font-size: 14px; color: var(--muted); font-weight: 600; }
.nt {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 14px;
  padding: 12px 14px; margin-bottom: 10px; position: relative;
}
.nt.reco-mark { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.nt .when { grid-row: span 3; text-align: center; min-width: 74px; border-right: 1px solid var(--line); padding-right: 12px; }
.nt .when b { display: block; font-size: 18px; }
.nt .when span { font-size: 12px; color: var(--muted); }
.nt .id { font: 600 15px var(--mono); }
.nt .id small { font: 12px var(--sans); color: var(--muted); margin-left: 6px; }
.nt .chips { display: flex; flex-wrap: wrap; gap: 4px; }
.nt .langs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.nt .langs a { font-size: 13px; }
.nt .classic { font-size: 12px; color: var(--muted); margin-left: auto; }
.foot { margin-top: 30px; font-size: 12px; color: var(--muted); }

/* ---------- tarayıcı (ana ekran) ---------- */
.shell { display: grid; grid-template-rows: auto 1fr; height: 100vh; height: 100dvh; }
.top {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px;
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.top .home-link { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; }
.top .home-link i { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; }
.top .ctx { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.search {
  flex: 1; max-width: 560px; margin-left: auto; position: relative;
}
.search input {
  width: 100%; border: 1px solid var(--line); background: var(--panel-2);
  border-radius: 10px; padding: 8px 12px 8px 34px;
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: -1px; background: var(--panel); }
.search::before { content: "⌕"; position: absolute; left: 11px; top: 50%; transform: translateY(-52%); color: var(--muted); font-size: 18px; }
.search kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font: 11px var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }
.main { display: grid; grid-template-columns: 340px 1fr; min-height: 0; }
.side { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--panel); }
.tabs { display: flex; flex-wrap: wrap; gap: 0 2px; padding: 6px 8px 0; border-bottom: 1px solid var(--line); }
.tabs button {
  border: 0; background: transparent; padding: 7px 8px 8px; cursor: pointer;
  border-bottom: 2px solid transparent; color: var(--muted); white-space: nowrap; font-size: 14px;
}
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.tabs button span { font-size: 11px; color: var(--muted); margin-left: 3px; }
.list { overflow-y: auto; flex: 1; padding: 4px 0; }
.list a {
  display: flex; gap: 10px; align-items: baseline; padding: 6px 14px; color: var(--text);
  border-left: 3px solid transparent;
}
.list a:hover { background: var(--panel-2); text-decoration: none; }
.list a.on { background: var(--accent-soft); border-left-color: var(--accent); }
.list a .badge { flex: none; }
.list a .nm { font-size: 13.5px; }
.list .empty { padding: 20px 14px; color: var(--muted); }
.list .sec { padding: 10px 14px 4px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.content { overflow-y: auto; min-height: 0; }
.detail { max-width: 1000px; padding: 22px 26px 60px; }
.back-mobile { display: none; }
.d-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.d-head .badge { font-size: 15px; padding: 4px 10px; }
.d-head h2 { margin: 0; font-size: 21px; line-height: 1.25; }
.d-head .kind { font-size: 13px; color: var(--muted); }
.section { margin-bottom: 22px; }
.section > h3 { font-size: 15px; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.section > h3 .n { font-size: 12px; color: var(--muted); font-weight: 500; }
.section > h3 .tools { margin-left: auto; font-weight: 400; font-size: 13px; }
.grp { padding: 10px 14px; margin-bottom: 8px; }
.grp-t { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.ents { display: flex; flex-direction: column; gap: 4px; }
.ent {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 6px 8px; border-radius: 8px; cursor: pointer; border: 1px solid transparent;
  background: transparent; text-align: left; width: 100%;
}
.ent:hover { background: var(--panel-2); border-color: var(--line); }
.ent .go { margin-left: auto; color: var(--muted); font-size: 13px; }
.ent.miss { opacity: .45; }
.ent .pin { font: 11px var(--mono); color: var(--muted); }
.more { font-size: 13px; color: var(--link); background: none; border: 0; padding: 4px 8px; cursor: pointer; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.thumb {
  padding: 8px; text-align: center; cursor: pointer; width: 150px;
  border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius);
}
.thumb:hover { border-color: var(--accent); }
.thumb img { max-width: 100%; height: 96px; object-fit: contain; display: block; margin: 0 auto 6px; background: #fff; border-radius: 4px; }
.thumb span { font: 12px var(--mono); color: var(--muted); }
.welcome { padding: 34px 30px; max-width: 760px; }
.welcome h2 { margin: 0 0 6px; }
.tips { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin: 18px 0 26px; }
.tips .card { padding: 12px 14px; font-size: 14px; }
.tips .card b { display: block; margin-bottom: 2px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; user-select: none; }
.toggle input { accent-color: var(--accent); }

@media (max-width: 860px) {
  .main { grid-template-columns: 1fr; }
  .side { border-right: 0; }
  .shell.show-item .side { display: none; }
  .shell:not(.show-item) .content { display: none; }
  .back-mobile { display: inline-flex; margin-bottom: 12px; }
  .detail { padding: 16px 14px 60px; }
  .top { flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .search kbd { display: none; }
}

/* ---------- görüntüleyici ---------- */
.viewer {
  position: fixed; inset: 0; z-index: 50; background: var(--bg);
  display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr);
}
.vw-bar {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.vw-title { min-width: 0; flex: 1 1 200px; }
.vw-title b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vw-title span { font-size: 13px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vw-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vw-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.vw-pages { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--muted); }
.vw-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-height: 0; min-width: 0; }
.vw-scroll {
  overflow: auto; position: relative; min-height: 0; background: #8a8f98;
  cursor: grab; touch-action: none;
}
@media (prefers-color-scheme: dark) { .vw-scroll { background: #2a2e35; } }
.vw-scroll.drag { cursor: grabbing; }
.vw-stage { position: relative; margin: 0 auto; }
.vw-stage canvas { display: block; background: #fff; box-shadow: 0 2px 14px rgba(0,0,0,.25); }
.vw-mark {
  position: absolute; border: 3px solid #ff3b30; border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.18); pointer-events: none;
  animation: pulse 1.6s ease-out 2;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 9999px rgba(0,0,0,.18), 0 0 0 0 rgba(255,59,48,.7); } 100% { box-shadow: 0 0 0 9999px rgba(0,0,0,.18), 0 0 0 18px rgba(255,59,48,0); } }
.vw-loading { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); background: var(--panel); padding: 6px 14px; border-radius: 999px; font-size: 13px; box-shadow: var(--shadow); }
.vw-side {
  width: min(560px, 46vw); border-left: 1px solid var(--line); background: var(--panel);
  overflow-y: auto; padding: 16px 18px;
}
.vw-side h3 { margin: 0 0 4px; font-size: 17px; }
.vw-side .meta { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.vw-side .pn { display: inline-flex; gap: 8px; align-items: center; background: var(--accent-soft); padding: 6px 10px; border-radius: 8px; margin-bottom: 12px; font-size: 14px; }
.pins { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pins th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); position: sticky; top: -16px; background: var(--panel); }
.pins td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.pins td.p { font: 600 13px var(--mono); }
.pins tr:hover td { background: var(--panel-2); }
.pins a.wire { font: 600 13px var(--mono); }
@media (max-width: 860px) {
  .vw-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: 42% 58%; }
  .pins th:nth-child(5), .pins td:nth-child(5) { display: none; }
  .vw-title { flex-basis: calc(100% - 50px); }
  .vw-body:has(.vw-side[hidden]) { grid-template-rows: 1fr; }
  .vw-side { width: auto; border-left: 0; border-top: 1px solid var(--line); }
  .vw-tools .btn { padding: 5px 9px; }
  .vw-sep { display: none; }
}
@media print {
  .top, .side, .vw-bar { display: none !important; }
}

details.grp.off { padding: 8px 14px; }
details.grp.off summary { cursor: pointer; list-style: none; font-size: 14px; }
details.grp.off summary::-webkit-details-marker { display: none; }
details.grp.off summary::before { content: "▸ "; color: var(--muted); }
details.grp.off[open] summary::before { content: "▾ "; }
details.grp.off summary .grp-t { display: inline; color: var(--muted); }
details.grp.off[open] .ents { margin-top: 8px; }

.mt { color: #b26b00; font-weight: 700; cursor: help; }
.chip.tl { border-style: dashed; }
.tlnote { padding: 12px 14px; margin: 14px 0 0; font-size: 14px; border-left: 3px solid var(--accent); }
.tlnote b { display: block; margin-bottom: 4px; }

.legend { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.vw-side .legend { padding: 8px 10px; }
.lg-t { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.legend dl { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; margin: 0; font-size: 13.5px; }
.legend dt { font: 600 12.5px/1.6 var(--mono); }
.legend dt.hit { color: var(--ok); }
.legend dd { margin: 0; }
.colors { margin-top: 12px; }
.colors summary { cursor: pointer; margin: 0; list-style-position: inside; }
.colors[open] summary { margin-bottom: 8px; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 4px 12px; font-size: 13.5px; }
.cgrid > div { display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; }
.cgrid .muted { font-size: 12px; }
.sw { width: 18px; height: 12px; border-radius: 3px; border: 1px solid rgba(128,128,128,.6); flex: none; }
.sw.cy { background: repeating-conic-gradient(#ccc 0 25%, #fff 0 50%) 0 0 / 6px 6px; }
.cnote { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
table.fz { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.fz th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.fz td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.fz tr:last-child td { border-bottom: 0; }
table.fz td.p { font-weight: 700; font-size: 14px; }
table.fz td.desc { color: var(--muted); font-size: 13px; }
.fzi { display: inline-block; margin: 0 10px 2px 0; color: var(--text); }
.btn.sm { padding: 3px 8px; font-size: 12.5px; }
.plist { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.plist a { color: var(--text); padding: 3px 0; }
.plist .badge { min-width: 44px; }
.vw-side .thumbs .thumb { width: 120px; }
@media (max-width: 860px) {
  table.fz th:nth-child(5), table.fz td.desc:nth-child(5) { display: none; }
  #fusebtn { order: 2; }
}

.chip.no { background: transparent; border-style: dashed; color: #c0392b; text-decoration: line-through; }
.ent.best { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.reco-b { font-size: 11px; font-weight: 700; color: #fff; background: var(--ok); border-radius: 6px; padding: 1px 7px; }
.fams { padding: 4px 16px; }
.fam { display: grid; grid-template-columns: 220px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: start; }
.fam:last-child { border-bottom: 0; }
.fam-n { font-weight: 600; font-size: 14px; padding-top: 6px; }
.fam .seg button { padding: 5px 10px; font-size: 13px; }
.fam .seg button.unk { min-width: 34px; text-align: center; color: var(--muted); }
#carbtn .chip { margin-left: 2px; }
@media (max-width: 860px) { .fam { grid-template-columns: 1fr; gap: 4px; } }

.or { font-size: 11px; color: var(--muted); margin: 0 2px; }
