/* Reset & base elements */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/1.55 var(--font);
  background-image: radial-gradient(circle at 88% -4%, var(--brand-soft) 0, transparent 30%), radial-gradient(circle at 6% 104%, var(--bg-2) 0, transparent 34%);
  background-attachment: fixed; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.modal-open { overflow: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; letter-spacing: -.025em; line-height: 1.15; color: var(--ink); }
h1 { font-size: clamp(28px, 3vw, 44px); font-weight: 800; }
h2 { font-size: 21px; font-weight: 800; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
small { font-size: 12px; }
code, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
kbd { display: inline-block; min-width: 22px; padding: 2px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); font-size: 11px; text-align: center; line-height: 1.4; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--brand-soft-2); }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.i { width: 18px; height: 18px; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--brand); color: #fff; padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.skip-link:focus { top: 12px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 700; font-size: 13px; letter-spacing: -.005em; white-space: nowrap; transition: transform .15s, background .2s, border-color .2s, box-shadow .2s, color .2s; }
.btn:hover { border-color: var(--brand-3); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0) scale(.98); }
.btn .i { width: 16px; height: 16px; }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 30%, transparent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.soft { background: var(--brand-soft); border-color: transparent; color: var(--brand-ink); }
.btn.ghost { background: transparent; border-color: var(--line-2); color: var(--ink-2); }
.btn.danger { background: var(--bad); border-color: transparent; color: #fff; }
.btn.ok { background: var(--ok); border-color: transparent; color: #fff; }
.btn.dark { background: var(--ink); color: var(--bg); border-color: transparent; }
.btn.sm { min-height: 32px; padding: 0 11px; border-radius: 10px; font-size: 12px; }
.btn.lg { min-height: 50px; padding: 0 22px; font-size: 15px; border-radius: 14px; }
.btn.block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); transition: background .2s, color .2s, border-color .2s, transform .15s; }
.icon-btn:hover { color: var(--brand); border-color: var(--brand-3); background: var(--brand-soft); }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 9px; }
.icon-btn.sm .i { width: 15px; height: 15px; }
.icon-btn.on, .icon-btn[aria-pressed="true"] { color: var(--brand); background: var(--brand-soft); border-color: var(--brand-3); }
.icon-btn.fav.on .i { fill: var(--gold); color: var(--gold); }
.link { color: var(--brand); font-weight: 700; border: 0; background: none; padding: 0; display: inline-flex; align-items: center; gap: 5px; }
.link:hover { text-decoration: underline; }
.link .i { width: 14px; height: 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn-row.end { justify-content: flex-end; }
.btn-row.center { justify-content: center; }

/* Forms */
.input, select.input, textarea.input { width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 11px; background: var(--surface); color: var(--ink); outline: none; transition: border-color .2s, box-shadow .2s; }
textarea.input { resize: vertical; min-height: 70px; line-height: 1.5; }
.input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 22%, transparent); }
.input.sm { min-height: 32px; padding: 4px 9px; border-radius: 9px; font-size: 13px; }
input[type="number"].input { font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; margin-inline: 0; accent-color: var(--brand); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); width: 16px; height: 16px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.field small { color: var(--ink-3); }
.field-row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.field-row > .field { flex: 1 1 140px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch input { appearance: none; width: 40px; height: 22px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .2s; flex: none; cursor: pointer; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(18px); }
.search-box { position: relative; display: flex; align-items: center; }
.search-box .i { position: absolute; left: 12px; color: var(--ink-3); pointer-events: none; }
.search-box .input { padding-left: 38px; }
.search-box.big .input { min-height: 50px; font-size: 16px; border-radius: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* Accessibility preferences (Ayarlar → Erişilebilirlik) */
:root[data-font="l"] .page, :root[data-font="l"] #overlays .modal { zoom: 1.1; }
:root[data-font="xl"] .page, :root[data-font="xl"] #overlays .modal { zoom: 1.22; }
:root[data-motion="reduce"] *, :root[data-motion="reduce"] *::before, :root[data-motion="reduce"] *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
:root[data-contrast="high"] { --ink: #120a0c; --ink-2: #24181a; --ink-3: #4a3a3d; --muted: #5a484b; --line: #cbb4ae; --line-2: #9c837e; --focus: #0b57d0; --brand-ink: #5c1019; }
:root[data-contrast="high"][data-theme="dark"] { --ink: #fff; --ink-2: #f6ecea; --ink-3: #dccac7; --muted: #cbb7b4; --line: #6d4b53; --line-2: #95707a; --focus: #7cb3ff; --brand-ink: #ffd4cc; }
:root[data-contrast="high"] :focus-visible { outline-width: 4px; outline-offset: 3px; }
:root[data-contrast="high"] .chip, :root[data-contrast="high"] .btn.ghost, :root[data-contrast="high"] .card { border-color: var(--line-2); }
:root[data-readable="1"] body { letter-spacing: .012em; word-spacing: .08em; }
:root[data-readable="1"] p, :root[data-readable="1"] li { line-height: 1.85; }
