:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f2f2f4;
  --text: #1e1d1b;
  --muted: #5a5852;
  --line: #d9d7d1;
  --staff: #c9c6be;
  --link: #8a5600;
  --amber: #d99b26;
  --serif: Charter, "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --measure: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161618;
    --surface: #212124;
    --text: #ecebe7;
    --muted: #a8a59e;
    --line: #36363a;
    --staff: #47474c;
    --link: #e8b04a;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}

a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 4px; }

.site-header {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.1rem 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.staff {
  position: relative;
  height: 25px;
  max-width: calc(var(--measure) - 2.5rem);
  width: calc(100% - 2.5rem);
  margin: 0.9rem auto 0;
  background: repeating-linear-gradient(to bottom, var(--staff) 0 1px, transparent 1px 6px);
}

.staff::before {
  content: "";
  position: absolute;
  left: 1.6rem;
  top: 8px;
  width: 11px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  transform: rotate(-20deg);
}

.lang-toggle {
  display: none;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--sans);
}
html.js .lang-toggle { display: inline-flex; }

.lang-toggle button {
  min-height: 2.5rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}
.lang-toggle button[aria-pressed="true"] { background: var(--text); color: var(--bg); }

.page { max-width: var(--measure); margin: 0 auto; padding: 1.75rem 1.25rem 3.5rem; }

html.js[data-lang="en"] .doc[lang="tr"],
html.js[data-lang="tr"] .doc[lang="en"] { display: none; }

html:not(.js) .doc + .doc { margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid var(--line); }

h1, h2 { font-family: var(--sans); color: var(--text); }
h1 { font-size: clamp(1.9rem, 5.5vw, 2.5rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 1rem; }
h2 { font-size: 1.2rem; line-height: 1.3; font-weight: 650; margin: 2.4rem 0 0.6rem; }

p { margin: 0.9rem 0; }
.meta { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); margin-bottom: 1.5rem; }

ul { padding-left: 1.3rem; margin: 0.9rem 0; }
li { margin: 0.4rem 0; padding-left: 0.2rem; }

code { font-family: var(--mono); font-size: 0.9em; background: var(--surface); padding: 0.1em 0.35em; border-radius: 4px; }

.table-wrap { overflow-x: auto; margin: 1.25rem 0; }
table { border-collapse: collapse; width: 100%; min-width: 30rem; font-size: 0.97rem; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--line); }
th { font-family: var(--sans); font-size: 0.9rem; font-weight: 650; background: var(--surface); }

.doc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.95rem;
}
.doc-nav a[aria-current="page"] { color: var(--text); font-weight: 650; text-decoration: none; }

.home-links { list-style: none; padding: 0; }
.home-links li { padding: 0; margin: 0.6rem 0; font-family: var(--sans); font-size: 1.05rem; }

@media print {
  .lang-toggle, .staff, .doc-nav { display: none !important; }
  body { font-size: 11pt; background: #fff; color: #000; }
  a { color: inherit; }
}
