/* =========================================================================
   Temel: reset, tipografi, yerleşim ve yardımcı sınıflar
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; scroll-padding-top: calc(var(--header-h) + var(--sp-4)); }

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: var(--lh-base);
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "cv11", "ss01";
}

h1, h2, h3, h4 { margin: 0; line-height: var(--lh-tight); letter-spacing: -.015em; font-weight: 700; }
h1 { font-size: var(--fs-3xl); letter-spacing: -.025em; }
h2 { font-size: var(--fs-lg); }
h3 { font-size: var(--fs-md); }
p { margin: 0 0 var(--sp-3); }
p:last-child { margin-bottom: 0; }

a { color: var(--c-brand-600); text-decoration: none; }
a:hover { color: var(--c-brand-700); }
:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 2px; border-radius: var(--radius-sm); }
/* Blazor sayfa geçişinde h1'e programatik odak verir (erişilebilirlik); görsel çerçeve gösterme. */
h1:focus, h1:focus-visible, [tabindex="-1"]:focus { outline: none; }

img, svg { display: block; max-width: 100%; }
svg.icon { flex-shrink: 0; }
code { font-family: var(--font-mono); font-size: .875em; background: var(--c-surface-2); padding: .1em .4em; border-radius: var(--radius-sm); }
hr { border: 0; border-top: 1px solid var(--c-border); margin: var(--sp-6) 0; }
ul, ol { margin: 0; }

/* ---------- Yerleşim ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.page { padding-block: var(--sp-6) var(--sp-16); }
.stack { display: flex; flex-direction: column; gap: var(--sp-6); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.grid-2 { display: grid; gap: var(--sp-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); align-items: start; }
.layout-aside { display: grid; gap: var(--sp-6); grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
@media (max-width: 1024px) { .layout-aside { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
    body { font-size: var(--fs-md); }
    h1 { font-size: 1.75rem; }
    .page { padding-block: var(--sp-4) var(--sp-12); }
    .stack, .grid-2, .layout-aside { gap: var(--sp-4); }
}

/* ---------- Yardımcılar ---------- */
.muted { color: var(--c-text-2); }
.subtle { color: var(--c-text-3); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up { color: var(--c-success); }
.down { color: var(--c-danger); }
.text-danger { color: var(--c-danger); }
.text-success { color: var(--c-success); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.spacer { flex: 1; }
/* Mobil menü çekmecesi açıkken arka sayfa kaymasın */
body:has(.mobile-menu[open]) { overflow: hidden; }

.skip-link { position: absolute; left: -10000px; top: var(--sp-2); z-index: 100; background: var(--c-surface); padding: var(--sp-2) var(--sp-3); border-radius: var(--radius); box-shadow: var(--shadow-md); }
.skip-link:focus { left: var(--sp-4); }
