/* TRaLIST Kullanim Kilavuzu — bagimsiz stil (PROJECT.md §10.6)
 *
 * Kilavuz ayri bir statik host'ta yayinlaniyor, bu yuzden uygulamanin
 * `style.css`'ine BAGLI DEGIL — renk degiskenleri buraya kopyalandi.
 * Kopya kasitli: kilavuz Render'daki uygulamadan bagimsiz acilabilmeli.
 */

:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-2: #f1f5f9;
    --border: #e2e8f0;
    --text: #0f172a;
    --text-secondary: #64748b;
    --accent: #1e40af;
    --accent-soft: #dbeafe;
    --success: #059669;
    --danger: #dc2626;
    --warning: #b45309;
    --mark: #dc2626;
    --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 8px 24px rgba(15, 23, 42, .04);
    --radius: 10px;
    --nav-w: 250px;
}

:root[data-theme="dark"] {
    --bg: #0b1220;
    --surface: #131c2e;
    --surface-2: #1b2740;
    --border: #263349;
    --text: #e2e8f0;
    --text-secondary: #94a3b8;
    --accent: #60a5fa;
    --accent-soft: #1e3a5f;
    --success: #34d399;
    --danger: #f87171;
    --warning: #fbbf24;
    --mark: #f87171;
    --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.62;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

/* ---------- ust serit ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.brand img { width: 26px; height: 26px; }
.brand .tr { color: #dc2626; } .brand .a { color: #9ca3af; }
.topbar .spacer { flex: 1; }
.topbar .crumb { color: var(--text-secondary); font-size: .88rem; }

.icon-btn {
    width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: 8px;
    background: transparent; color: inherit; cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }

.cta {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 15px; border-radius: 8px;
    background: var(--accent); color: #fff; font-weight: 600;
    text-decoration: none; font-size: .9rem;
}
:root[data-theme="dark"] .cta { color: #0b1220; }

/* ---------- yerlesim ---------- */
.layout { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); gap: 34px; max-width: 1500px; margin: 0 auto; padding: 26px 22px 90px; }

.sidenav { position: sticky; top: 66px; align-self: start; max-height: calc(100vh - 90px); overflow-y: auto; }
.sidenav ol { list-style: none; margin: 0; padding: 0; counter-reset: sec; }
.sidenav a {
    display: flex; gap: 9px; align-items: baseline;
    padding: 7px 10px; border-radius: 7px;
    color: var(--text-secondary); text-decoration: none; font-size: .88rem;
    border-left: 2px solid transparent;
}
.sidenav a::before { counter-increment: sec; content: counter(sec); font-variant-numeric: tabular-nums; opacity: .55; font-size: .8rem; min-width: 14px; }
.sidenav a:hover { background: var(--surface-2); color: var(--text); }
.sidenav a.active { background: var(--accent-soft); color: var(--text); font-weight: 600; border-left-color: var(--accent); }

/* ---------- icerik ---------- */
.content { min-width: 0; }
.content > section { scroll-margin-top: 74px; margin-bottom: 58px; }

h1 { font-size: 1.9rem; line-height: 1.25; margin: 0 0 10px; letter-spacing: -.02em; }
h2 { font-size: 1.35rem; margin: 0 0 12px; letter-spacing: -.01em; }
h3 { font-size: 1.02rem; margin: 26px 0 8px; }
p { margin: 0 0 13px; }
ul, ol.steps { margin: 0 0 14px; padding-left: 20px; }
li { margin-bottom: 6px; }
code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; font-family: 'SF Mono', Consolas, Menlo, monospace; font-size: .87em; }

.lede { font-size: 1.05rem; color: var(--text-secondary); margin-bottom: 22px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }

.note {
    border-left: 3px solid var(--accent);
    background: var(--surface); border: 1px solid var(--border); border-left-width: 3px;
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 13px 17px; margin: 18px 0; font-size: .93rem;
}
.note.warn { border-left-color: var(--warning); }
.note.danger { border-left-color: var(--danger); }
.note strong { display: block; margin-bottom: 3px; }

table.ref { width: 100%; border-collapse: collapse; margin: 14px 0 18px; font-size: .9rem; display: block; overflow-x: auto; }
table.ref th, table.ref td { text-align: left; padding: 8px 11px; border-bottom: 1px solid var(--border); vertical-align: top; white-space: nowrap; }
table.ref td:last-child, table.ref th:last-child { white-space: normal; min-width: 260px; }
table.ref th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-secondary); font-weight: 600; }
table.ref tbody tr:hover { background: var(--surface-2); }
.num { font-variant-numeric: tabular-nums; }
.pos { color: var(--success); font-weight: 600; }
.neg { color: var(--danger); font-weight: 600; }

/* ---------- ekran goruntusu + annotasyon ---------- */
figure.shot { margin: 20px 0 26px; }

.shot-frame {
    position: relative;
    /* Dar kareler ortalanir; genislik `guide.js` tarafindan karenin dogal
       CSS genisligiyle sinirlanir (bkz. annotations._meta.scale). */
    margin-inline: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface-2);
    box-shadow: var(--shadow);
    line-height: 0;
}
.shot-frame img { width: 100%; height: auto; display: block; }
.shot-frame svg.marks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* Isaret rengi TEK: kirmizi. Uygulamanin kendi yesil/kirmizi anlami var
   (§10.3.0 renk butcesi); annotasyon ikinci bir renk dili getirirse kare
   icindeki gercek sinyalle karisir. */
.marks .box { fill: none; stroke: var(--mark); stroke-width: 3; }
.marks .arrow { stroke: var(--mark); stroke-width: 3; fill: none; stroke-linecap: round; }
.marks .head { fill: var(--mark); }
.marks .badge { fill: var(--mark); }
.marks .badge-txt { fill: #fff; font-weight: 700; font-family: 'Inter', system-ui, sans-serif; }

figcaption { font-size: .87rem; color: var(--text-secondary); margin-top: 9px; line-height: 1.5; }

ol.legend { list-style: none; counter-reset: mark; padding: 0; margin: 12px 0 0; }
ol.legend li {
    counter-increment: mark;
    display: grid; grid-template-columns: 22px 1fr; gap: 10px;
    align-items: baseline; margin-bottom: 7px; font-size: .92rem;
}
ol.legend li::before {
    content: counter(mark);
    width: 21px; height: 21px; border-radius: 50%;
    background: var(--mark); color: #fff;
    font-size: .74rem; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- sorumluluk seridi ---------- */
.disclaimer {
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 11px 16px;
    font-size: .84rem; color: var(--text-secondary); margin: 0 0 26px;
}

footer.guide-foot { border-top: 1px solid var(--border); padding: 26px 22px 60px; text-align: center; color: var(--text-secondary); font-size: .87rem; }
footer.guide-foot .cta { margin-top: 12px; }

/* ---------- dar ekran ---------- */
@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; gap: 18px; padding: 16px 14px 70px; }
    .sidenav { position: static; max-height: none; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
    .sidenav ol { display: flex; flex-wrap: wrap; gap: 4px; }
    .sidenav a { border-left: 0; padding: 6px 10px; border: 1px solid var(--border); border-radius: 20px; }
    .sidenav a.active { border-color: var(--accent); }
    h1 { font-size: 1.5rem; }
}
