*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; font: 400 15px/1.6 var(--font-sans); color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-variant-ligatures: no-contextual;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
/* lofi grain dokusu */
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 999; background-image: var(--grain); opacity: var(--grain-opacity); mix-blend-mode: multiply; }
:root[data-theme="dark"] body::after { mix-blend-mode: screen; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body::after { mix-blend-mode: screen; } }

h1, h2, h3, h4 { margin: 0 0 var(--s3); line-height: 1.15; color: var(--ink); }
h1, h2, .display { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; font-optical-sizing: auto; }
h1 { font-size: clamp(1.75rem, 2.6vw, 2.25rem); }
h2 { font-size: 1.4rem; }
h3 { font-size: 1rem; font-weight: 700; letter-spacing: -.005em; }
p { margin: 0 0 var(--s4); }
a { color: var(--brand-ink); text-decoration: none; transition: color .2s; }
a:hover { color: var(--ink); }
img, svg { max-width: 100%; }
code, pre, kbd { font-family: var(--font-mono); font-size: .84em; }
code { background: var(--surface-2); padding: 2px 7px; border-radius: 6px; word-break: break-word; }
pre { background: var(--surface-2); padding: var(--s4) var(--s5); border-radius: var(--r); overflow: auto; margin: 0 0 var(--s4); line-height: 1.6; }
pre code { background: none; padding: 0; word-break: normal; }
::selection { background: var(--lavender-bg); color: var(--lavender-ink); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 10px; }
hr { border: 0; height: 1px; background: var(--line); margin: var(--s5) 0; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-2); }
.subtle { color: var(--ink-3); font-size: .86rem; }
.mono { font-family: var(--font-mono); font-size: .82em; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.nowrap { white-space: nowrap; }
.right { text-align: right; } .center { text-align: center; }
.row { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.tight { gap: 6px; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack > * + * { margin-top: var(--s4); }
.stack-l > * + * { margin-top: var(--s6); }
.grid { display: grid; gap: var(--s4); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .cols-3, .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }
.mt-0{margin-top:0}.mt-2{margin-top:var(--s2)}.mt-4{margin-top:var(--s4)}.mt-6{margin-top:var(--s6)}.mt-8{margin-top:var(--s8)}
.mb-0{margin-bottom:0}.mb-2{margin-bottom:var(--s2)}.mb-4{margin-bottom:var(--s4)}.mb-6{margin-bottom:var(--s6)}
svg[aria-hidden="true"] { width: 1em; height: 1em; flex: none; vertical-align: -0.125em; }
.flip { transform: scaleX(-1); }
