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

:root {
  --red:        #8B1A1A;
  --red-dark:   #5C0F0F;
  --gold:       #C9A96E;
  --gold-light: #E8D5A3;
  --gold-faint: rgba(201,169,110,0.12);
  --cream:      #FAF7F2;
  --white:      #FFFFFF;
  --text:       #1C1712;
  --text-muted: #7A6A5A;
  --border:     #DDD0BF;

  --ff-display: 'Playfair Display', Georgia, 'Noto Sans Symbols 2', serif;
  --ff-body:    'Lora', Georgia, 'Inter', 'Noto Sans Symbols 2', serif;
  --ff-ui:      'Inter', system-ui, 'Noto Sans Symbols 2', sans-serif;

  --nav-h:      64px;
  --max-text:   820px;
  --max-wide:   1200px;
  --pad:        clamp(1rem, 4vw, 2rem);
}

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--red); }
img { max-width: 100%; display: block; }

/* ── Language helpers ────────────────────────────────────────── */
.lang-block { display: none; }
.lang-block.active { display: block; }
.lang-span { display: none; }
.lang-span.active { display: inline; }

/* ── Header ──────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  background: var(--red);
  border-bottom: 2px solid var(--gold);
  display: flex;
  align-items: center;
  padding: 0 var(--pad);
}

.header-inner {
  width: 100%;
  max-width: var(--max-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-name {
  font-family: var(--ff-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.01em;
  flex-shrink: 0;
  white-space: nowrap;
}
.site-name em { color: var(--gold); font-style: normal; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}
.nav-links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-family: var(--ff-ui);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.375rem 0.875rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(255,255,255,0.13);
}

.lang-switch {
  display: flex;
  gap: 0.25rem;
  padding-left: 1.25rem;
  margin-left: 1rem;
  border-left: 1px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
}
.lang-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.65);
  font-family: var(--ff-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.45rem;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s;
}
.lang-btn:hover, .lang-btn.active {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(201,169,110,0.1);
}

/* Klavye/erişilebilirlik: içeriğe atlama linki — sadece odaklanınca görünür */
.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  z-index: 400;
  background: var(--gold);
  color: #1a1a1a;
  font-family: var(--ff-ui);
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: 4px;
  text-decoration: none;
  transition: top 0.15s;
}
.skip-link:focus { top: 0.5rem; }

/* Mobil menü butonu — masaüstünde gizli, ≤640px'te görünür (aşağıdaki media) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  padding: 0 9px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  background: var(--red-dark);
  padding: 7rem var(--pad) 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(45deg, rgba(201,169,110,0.05) 25%, transparent 25%),
    linear-gradient(-45deg,rgba(201,169,110,0.05) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(201,169,110,0.05) 75%),
    linear-gradient(-45deg,transparent 75%, rgba(201,169,110,0.05) 75%);
  background-size: 28px 28px;
  background-position: 0 0, 0 14px, 14px -14px, -14px 0;
  pointer-events: none;
}
.hero > * { position: relative; }

.hero-eyebrow {
  display: inline-block;
  color: var(--gold);
  font-family: var(--ff-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-family: var(--ff-display);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.08;
  color: #fff;
  margin-bottom: 1.5rem;
}
.hero-title em { color: var(--gold-light); font-style: normal; }

.hero-sub {
  max-width: 600px;
  margin: 0 auto 3.5rem;
  color: rgba(255,255,255,0.72);
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.25rem;
  max-width: 820px;
  margin: 0 auto;
}
.hero-card {
  display: block;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(201,169,110,0.25);
  border-radius: 10px;
  padding: 2rem 1.5rem;
  text-decoration: none;
  color: #fff;
  text-align: left;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.hero-card:hover {
  background: rgba(255,255,255,0.11);
  border-color: var(--gold);
  transform: translateY(-3px);
}
.hero-card-icon { font-size: 1.75rem; margin-bottom: 0.875rem; }
.hero-card-label {
  font-family: var(--ff-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.375rem;
}
.hero-card-title {
  font-family: var(--ff-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.hero-card-desc {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.58);
  line-height: 1.5;
  font-family: var(--ff-ui);
}

/* ── Article ─────────────────────────────────────────────────── */
.article-layout {
  max-width: var(--max-text);
  margin: 0 auto;
  padding: 4rem var(--pad) 7rem;
}

.lang-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.lang-bar-label {
  font-family: var(--ff-ui);
  font-size: 0.73rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-right: 0.25rem;
}
.lang-tab {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--ff-ui);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.85rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}
.lang-tab:hover, .lang-tab.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.art-tag {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-family: var(--ff-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 3px;
  margin-bottom: 1.25rem;
}

.art-title {
  font-family: var(--ff-display);
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 0.875rem;
}

.art-subtitle {
  font-size: 1.08rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.6;
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
  margin-bottom: 3rem;
}

.art-body h2 {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--red);
  margin: 3rem 0 1rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.art-body h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }

.art-body h3 {
  font-family: var(--ff-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin: 2rem 0 0.75rem;
}

.art-body p { margin-bottom: 1.25rem; }

.art-body blockquote {
  border-left: 3px solid var(--gold);
  padding: 1rem 1.5rem;
  margin: 2.5rem 0;
  background: var(--gold-faint);
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.art-body .callout {
  background: var(--gold-faint);
  border: 1px solid rgba(201,169,110,0.3);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 2.5rem 0;
  font-size: 0.95rem;
}
.art-body .callout strong { color: var(--red); }

.timeline {
  list-style: none;
  margin: 1.5rem 0;
  border-left: 2px solid var(--border);
  padding-left: 0;
}
.timeline li {
  display: flex;
  gap: 1.25rem;
  padding: 0.6rem 0 0.6rem 1.25rem;
  position: relative;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 1rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--red);
}
.timeline .yr {
  font-family: var(--ff-ui);
  font-weight: 700;
  color: var(--red);
  min-width: 3.5rem;
  flex-shrink: 0;
  font-size: 0.9rem;
  padding-top: 0.1rem;
}
.timeline .evt { line-height: 1.5; }
.timeline .evt em { font-style: normal; color: var(--text-muted); font-size: 0.9rem; }

.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.88rem;
  font-family: var(--ff-ui);
}
.compare-table th {
  background: var(--red);
  color: #fff;
  padding: 0.6rem 1rem;
  text-align: left;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.compare-table td {
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.compare-table tr:nth-child(even) td { background: var(--gold-faint); }
.compare-table td:first-child { color: var(--text-muted); font-size: 0.82rem; }

/* ── Markdown'dan üretilen öğeler (build_site.py) ─────────────── */
.art-body h4 {
  font-family: var(--ff-ui);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--red);
  margin: 2.25rem 0 0.6rem;
}
.art-body h5 {
  font-family: var(--ff-ui);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
  margin: 1.6rem 0 0.5rem;
}

.art-body ul:not(.timeline),
.art-body ol {
  margin: 0 0 1.25rem 1.35rem;
  padding: 0;
}
.art-body ul:not(.timeline) > li,
.art-body ol > li { margin-bottom: 0.55rem; }
.art-body ul:not(.timeline) > li::marker { color: var(--gold); }
.art-body ol > li::marker { color: var(--red); font-weight: 600; }
.art-body li > ul, .art-body li > ol { margin-top: 0.55rem; margin-bottom: 0.25rem; }
.art-body li em { color: var(--text-muted); }

/* Markdown tabloları .compare-table görünümünü miras alır */
.table-wrap { overflow-x: auto; margin: 1.75rem 0; }
.art-body table {
  width: 100%;
  min-width: 30rem;
  border-collapse: collapse;
  font-size: 0.88rem;
  font-family: var(--ff-ui);
}
.art-body th {
  background: var(--red);
  color: #fff;
  padding: 0.6rem 1rem;
  text-align: left;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.art-body td {
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.art-body tbody tr:nth-child(even) td { background: var(--gold-faint); }
.art-body td:first-child { color: var(--text-muted); font-size: 0.82rem; }

/* İçindekiler */
.art-toc {
  margin: 0 0 3rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 0 6px 6px 0;
  background: var(--gold-faint);
}
.art-toc-title {
  font-family: var(--ff-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.art-toc ul { list-style: none; margin: 0; padding: 0; }
.art-toc li { margin: 0.3rem 0; }
.art-toc a {
  font-family: var(--ff-ui);
  font-size: 0.88rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.art-toc a:hover { color: var(--red); border-bottom-color: var(--red); }

/* Dipnotlar (Markdown [^1] sözdizimi) */
.art-body sup[id^="tr-fnref"] a,
.art-body sup[id^="en-fnref"] a,
.art-body sup[id^="de-fnref"] a,
.art-body .footnote-ref { color: var(--red); text-decoration: none; font-weight: 600; }
.art-body .footnote {
  margin-top: 4rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.art-body .footnote hr { display: none; }
.art-body .footnote ol { margin-left: 1.25rem; }
.art-body .footnote li { margin-bottom: 0.5rem; }
.art-body .footnote-backref { text-decoration: none; }

.art-note {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-family: var(--ff-ui);
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.6;
}

/* ── Map page ────────────────────────────────────────────────── */
.map-wrap {
  height: calc(100vh - var(--nav-h));
  height: calc(100dvh - var(--nav-h));  /* mobil: adres çubuğu yüksekliği hesaba katılır */
  display: flex;
  flex-direction: column;
}
.map-wrap iframe {
  flex: 1;
  width: 100%;
  border: none;
  display: block;
}

/* ── Tribute (anısına) ───────────────────────────────────────── */
.tribute {
  background: var(--red-dark);
  border-top: 2px solid rgba(201,169,110,0.25);
  padding: 4.5rem var(--pad);
  text-align: center;
}
.tribute-page {
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100dvh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: none;
}
.tribute-inner {
  max-width: 38rem;
  margin: 0 auto;
}
.tribute-label {
  font-family: var(--ff-ui);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.tribute-name {
  font-family: var(--ff-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.75rem;
}
.tribute-text {
  font-family: var(--ff-body);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.78);
}

/* ── Simple pages (about, contact) ──────────────────────────── */
.simple-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 5rem var(--pad) 8rem;
}
.page-title {
  font-family: var(--ff-display);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--gold);
}
.simple-wrap p { margin-bottom: 1.25rem; }
.simple-wrap h2 {
  font-family: var(--ff-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--red);
  margin: 2rem 0 0.75rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  padding: 0.8rem 1.6rem;
  border-radius: 6px;
  font-family: var(--ff-ui);
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 1.5rem;
  transition: background 0.15s;
}
.contact-link:hover { background: var(--red-dark); color: #fff; }

/* ── About photo ─────────────────────────────────────────────── */
.about-photo {
  margin: 2.5rem auto 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 10rem;
}
.about-photo img {
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  transition: box-shadow 0.2s;
}
.about-photo img:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}
.about-photo figcaption {
  margin-top: 0.6rem;
  font-size: 0.75rem;
  font-style: italic;
  color: rgba(0,0,0,0.5);
  text-align: center;
}

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  background: var(--red-dark);
  border-top: 2px solid rgba(201,169,110,0.2);
  padding: 2.5rem var(--pad);
  text-align: center;
  color: rgba(255,255,255,0.45);
  font-family: var(--ff-ui);
  font-size: 0.8rem;
  line-height: 1.7;
}
.site-footer a { color: var(--gold); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.sep { margin: 0 0.5rem; opacity: 0.35; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  :root { --nav-h: 56px; }

  /* Mobilde: hamburger görünür, menü açılır panel olur (gizlenip erişilemez değil) */
  .nav-toggle { display: flex; order: 2; margin-left: auto; }
  nav { order: 3; }
  .lang-switch { padding-left: 0.75rem; margin-left: 0.6rem; }

  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--red);
    border-bottom: 2px solid var(--gold);
    padding: 0.4rem var(--pad) 0.6rem;
    box-shadow: 0 8px 16px rgba(0,0,0,0.25);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 0.75rem 0.5rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .hero { padding: 4rem var(--pad) 3.5rem; }
  .hero-cards { grid-template-columns: 1fr; max-width: 340px; }
  .article-layout { padding: 2.5rem var(--pad) 5rem; }
  .simple-wrap { padding: 3rem var(--pad) 5rem; }
}

/* ── Model sayfası grafikleri (model_grafik.py) ── */
.art-body .model-fig { margin: 2rem 0; padding: 1rem; background: var(--white); border: 1px solid var(--border); border-radius: 6px; }
.art-body .model-fig img { display: block; width: 100%; height: auto; }
.art-body .model-fig figcaption { font-family: var(--ff-ui); font-size: 0.85rem; color: var(--text-muted); margin-top: 0.75rem; line-height: 1.5; }
.tribute-name + .tribute-name { margin-top: -1rem; }

/* ── PDF indir düğmesi + yazdırma/PDF görünümü (web/pdf_uret.py) ── */
.pdf-indir { margin: 0.25rem 0 1.5rem; }
.pdf-btn {
  display: inline-block; font-family: var(--ff-ui); font-size: 0.85rem; font-weight: 600;
  color: var(--red); border: 1px solid var(--red); border-radius: 4px; padding: 0.4rem 0.9rem;
  text-decoration: none; transition: background 0.15s, color 0.15s;
}
.pdf-btn:hover { background: var(--red); color: #fff; }
@media print {
  .site-header, .site-footer, .lang-bar, .pdf-indir, .skip-link, .nav-toggle { display: none !important; }
  html, body { background: #fff !important; }
  .article-layout { padding: 0 !important; max-width: none !important; }
  .art-body { font-size: 10.5pt; line-height: 1.55; }
  .art-body h2, .art-body h3, .art-body h4, .art-body h5,
  .art-body p:has(> strong:only-child), .art-body p:has(+ ul), .art-body p:has(+ .table-wrap) { break-after: avoid; }
  @page { size: A4; }
  .art-body figure, .art-body .model-fig, blockquote, .callout { break-inside: avoid; }
  .art-body .model-fig img { max-height: 190mm; object-fit: contain; }
  /* uzun tablolar sayfalar arasında bölünür; satır bölünmez, başlık her sayfada tekrar eder */
  .table-wrap { overflow: visible !important; }
  .art-body table { width: 100% !important; table-layout: auto; font-size: 8.5pt; }
  .art-body thead { display: table-header-group; }
  .art-body tr, .art-body td, .art-body th { break-inside: avoid; }
  /* sözcük ortasından bölme yok: sütun en az en uzun sözcük kadar geniş olur (P21, "Karar" bölünmez) */
  .art-body td, .art-body th { overflow-wrap: normal; word-break: normal; hyphens: manual; }
  .art-body pre, .art-body code { white-space: pre-wrap; overflow-wrap: anywhere; }
  .art-body img, .art-body svg { max-width: 100% !important; height: auto; }
  .art-body p, .art-body li { orphans: 3; widows: 3; overflow-wrap: break-word; }
  .art-body a { color: inherit; text-decoration: underline; overflow-wrap: anywhere; }
  .art-toc { break-inside: avoid; margin-bottom: 1.5rem; }
  /* PDF metin katmanı temiz kalsın: büyük harf etiketlerde harf aralığı kopyalamayı bozar */
  .art-tag, .art-toc-title, .tribute-label { letter-spacing: 0 !important; }
}

/* ── Mobil başlık ve uzun kod/yol satırları (28.11.2026 QA) ── */
.art-body code { overflow-wrap: anywhere; }
@media (max-width: 420px) {
  .header-inner { gap: 0.5rem; }
  .site-name { font-size: 1.15rem; }
  .lang-switch { padding-left: 0.5rem; margin-left: 0.4rem; gap: 0.2rem; }
  .lang-btn { padding: 0.18rem 0.35rem; }
  .nav-toggle { margin-left: 0.5rem; width: 38px; height: 38px; }
}

/* ── Simgeler, ana sayfa kartları, altbilginin sayfa dibine oturması (28.11.2026 QA) ── */
.hero-card-icon { color: var(--gold); line-height: 0; }
.hero-card-icon svg { display: block; }
@media (min-width: 900px) { .hero-cards { grid-template-columns: repeat(4, 1fr); max-width: 1040px; } }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > * { flex-shrink: 0; }
.site-footer { margin-top: auto; }
body > main { flex: 1 0 auto; display: flex; flex-direction: column; }
body > main > .hero { flex: 1 0 auto; }

/* ── İletişim formu ── */
.iletisim-formu { margin-top: 1.75rem; }
.iletisim-formu .alan { margin-bottom: 1.1rem; }
.iletisim-formu label { display: block; font-family: var(--ff-ui); font-size: 0.85rem; font-weight: 600; color: var(--text); margin-bottom: 0.35rem; }
.iletisim-formu .ipucu { font-weight: 400; color: var(--text-muted); }
.iletisim-formu .gizlilik-bag { font-family: var(--ff-ui); font-size: 0.78rem; line-height: 1.55; color: var(--text-muted); margin: 0.25rem 0 1rem; }
.iletisim-formu .gizlilik-bag a { color: inherit; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 2px; }
.gizlilik .gizlilik-tarih { font-family: var(--ff-ui); font-size: 0.8rem; color: var(--text-muted); margin-top: -0.75rem; }
.gizlilik ul { margin: 0 0 1.25rem 1.2rem; padding: 0; }
.gizlilik li { margin-bottom: 0.5rem; line-height: 1.6; }
.iletisim-formu .alan-not { font-family: var(--ff-ui); font-size: 0.8rem; line-height: 1.45; min-height: 1.2em; margin: 0.35rem 0 0; color: var(--text-muted); }
.iletisim-formu .alan-not.hata { color: var(--red); }
.iletisim-formu .oneri-dugme { font: inherit; font-weight: 600; color: var(--text); background: none; border: 0; border-bottom: 1px dotted var(--gold); padding: 0; cursor: pointer; }
.iletisim-formu .oneri-dugme:hover, .iletisim-formu .oneri-dugme:focus-visible { color: var(--red); border-bottom-style: solid; outline: none; }
.iletisim-formu input, .iletisim-formu textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text); background: var(--white, #fff);
  border: 1px solid var(--border); border-radius: 6px; padding: 0.65rem 0.8rem; transition: border-color .15s, box-shadow .15s;
}
.iletisim-formu textarea { resize: vertical; min-height: 9rem; line-height: 1.6; }
.iletisim-formu input:focus, .iletisim-formu textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,169,110,.25); }
.iletisim-formu [aria-invalid="true"] { border-color: var(--red); }
.iletisim-formu .tuzak { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.iletisim-formu .gizlilik { font-family: var(--ff-ui); font-size: 0.78rem; line-height: 1.55; color: var(--text-muted); margin: 0.25rem 0 1.1rem; }
.form-gonder { font-family: var(--ff-ui); font-size: 0.9rem; font-weight: 600; color: #fff; background: var(--red); border: 1px solid var(--red); border-radius: 6px; padding: 0.65rem 1.6rem; cursor: pointer; transition: opacity .15s; }
.form-gonder:hover { opacity: .9; }
.form-gonder:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.form-gonder:disabled { opacity: .55; cursor: default; }
.form-durum { font-family: var(--ff-ui); font-size: 0.88rem; margin-top: 0.9rem; min-height: 1.4em; }
.form-durum.ok { color: #2E6E6A; }
.form-durum.hata { color: var(--red); }

/* ── Atıflar ve künye balonu ── */
a.atif { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--gold); }
a.atif:hover, a.atif:focus-visible { color: var(--red); border-bottom-style: solid; outline: none; }
.atif-balon { position: absolute; z-index: 5000; display: none; background: var(--white, #fff); color: var(--text); border: 1px solid var(--gold);
  border-radius: 8px; padding: 0.7rem 0.85rem; font-family: var(--ff-body); font-size: 0.86rem; line-height: 1.5; box-shadow: 0 6px 24px rgba(40,30,20,.18); }
.atif-balon em { font-style: italic; }
.k-vurgu { background: rgba(201,169,110,.18); outline: 1px solid var(--gold); border-radius: 4px; transition: background 1s; }
@media print { a.atif { border: 0; } .atif-balon { display: none !important; } }

/* İçindekiler: uzun başlıklar düzgün kırılsın (asılı girinti) */
.art-toc li { line-height: 1.4; margin-bottom: 0.35rem; padding-left: 0.9em; text-indent: -0.9em; }
.art-toc li a { overflow-wrap: break-word; }

/* ══ Denklem kutusu (web/formul.py) — mühendislik kitabı biçimi: numaralı denklem, terim tablosu, örnek hesap ══ */
.art-body .denklem-kutu, .art-body .ornek-kutu, .art-body .isabet-kutu {
  margin: 1.6rem 0; padding: 1.1rem 1.4rem; background: var(--white);
  border: 1px solid var(--border); border-radius: 6px;
}
.art-body .denklem-kutu { border-top: 3px solid var(--red); }
.art-body .ornek-kutu { border-left: 4px solid var(--gold); background: #FFFDF8; }
.art-body .denklem-baslik, .art-body .ornek-baslik {
  font-family: var(--ff-ui); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--red); margin-bottom: 0.8rem;
}
.art-body .denklem {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0.7rem 0;
  font-family: 'STIX Two Math', 'Cambria Math', 'Latin Modern Math', 'Times New Roman', 'DejaVu Serif', serif;
  font-size: 1.12rem; font-variant-numeric: lining-nums tabular-nums; line-height: 1.6;
}
.art-body .denklem .ifade { flex: 1; text-align: center; }
.art-body .denklem .no { font-family: var(--ff-ui); font-size: 0.85rem; color: var(--text-muted); white-space: nowrap; }
.art-body .denklem.sayisal { font-size: 1.02rem; background: var(--gold-faint); border-radius: 4px; padding: 0.4rem 0.6rem; }
.art-body .denklem i { font-style: italic; }
.art-body .kesir { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 0.25em; }
.art-body .kesir .pay { padding: 0 0.3em 0.1em; }
.art-body .kesir .payda { border-top: 1px solid var(--text); padding: 0.1em 0.3em 0; }
.art-body .denklem-alt { font-family: var(--ff-ui); font-size: 0.8rem; font-weight: 600; color: var(--text-muted); margin-top: 1rem; }
.art-body .denklem-not { font-size: 0.9rem; color: var(--text); margin: 0.6rem 0 0; }
.art-body .adim { font-family: var(--ff-ui); font-size: 0.82rem; font-weight: 700; color: var(--text); margin: 1.1rem 0 0.4rem; }
.art-body table.terim-tablosu, .art-body table.ornek-tablo { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin: 0.6rem 0; }
.art-body .terim-tablosu th, .art-body .ornek-tablo th { font-family: var(--ff-ui); font-size: 0.75rem; text-align: left; border-bottom: 1.5px solid var(--text); padding: 0.3rem 0.5rem; }
.art-body .terim-tablosu td, .art-body .ornek-tablo td { border-bottom: 1px solid var(--border); padding: 0.3rem 0.5rem; vertical-align: top; }
.art-body .terim-tablosu td.sembol { font-family: 'STIX Two Math', 'Cambria Math', 'Times New Roman', serif; font-size: 1.02rem; white-space: nowrap; }
.art-body td.sayi { text-align: right; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.art-body .ornek-tablo tr.secilen td { background: rgba(139,26,26,0.08); font-weight: 600; }
.art-body .ornek-tablo tr.toplam td { border-top: 1.5px solid var(--text); border-bottom: 0; font-weight: 700; }
.art-body .isabet-kutu ul { margin: 0.4rem 0 0.4rem 1.2rem; }

/* ══ Sayfa düzeni — TEK MERKEZ (bütün içerik sayfalarının PDF/baskı çıktısı; web/pdf_uret.py) ══
   1) Her ana bölüm (##) yeni sayfada başlar; içindekiler ilk sayfada kalır.
   2) Tablo, şekil, kutu, denklem ve örnek hesap sayfa arasında bölünmez (bir sayfadan uzunsa tarayıcı yine böler).
   3) Başlıklar ve bir tabloyu/listeyi tanıtan cümle, ardından gelen içerikten ayrılmaz.
   4) İstisna: yarım sayfadan uzun tablolar (pdf_uret.py .bolunebilir sınıfını ekler) satır arasından bölünür, başlık satırı her sayfada tekrar eder;
      böylece uzun bir tablo, önünde boş bir sayfa bırakarak bütünüyle sonraki sayfaya itilmez.  */
@media print {
  .art-body > h2 { break-before: page; page-break-before: always; margin-top: 0; }
  .art-body > h2:first-child { break-before: auto; }
  .art-body h2, .art-body h3, .art-body h4, .art-body h5 { break-after: avoid; page-break-after: avoid; break-inside: avoid; }
  .art-body .table-wrap, .art-body table, .art-body figure, .art-body .model-fig, .art-body .callout, .art-body blockquote,
  .art-body .denklem-kutu, .art-body .ornek-kutu, .art-body .isabet-kutu, .art-body .denklem, .art-body pre,
  .art-body ul, .art-body ol { break-inside: avoid; page-break-inside: avoid; }
  .art-body p:has(+ .table-wrap), .art-body p:has(+ table), .art-body p:has(+ ul), .art-body p:has(+ ol),
  .art-body p:has(+ .denklem-kutu), .art-body p:has(+ .ornek-kutu), .art-body p:has(+ figure) { break-after: avoid; page-break-after: avoid; }
  .art-body .denklem-kutu, .art-body .ornek-kutu, .art-body .isabet-kutu { background: #fff; }
  .art-body .denklem { font-size: 11.5pt; }
  .art-body .table-wrap.bolunebilir, .art-body table.bolunebilir { break-inside: auto; page-break-inside: auto; }
  .art-body table.bolunebilir thead { display: table-header-group; }
  .art-body table.bolunebilir tr { break-inside: avoid; page-break-inside: avoid; }
  .art-body .callout.bolunebilir, .art-body .callout.bolunebilir ul, .art-body .callout.bolunebilir ol { break-inside: auto; page-break-inside: auto; }
  .art-body .callout.bolunebilir li { break-inside: avoid; page-break-inside: avoid; }
}

/* ══ PDF başlık bloğu (build_site.py PDF_KAPAK) — yalnız baskıda ══ */
.pdf-kapak { display: none; }
@media print {
  .lang-block.kapakli .pdf-kapak { display: block; margin: 0 0 1.4rem; padding-bottom: 0.9rem; border-bottom: 1.5px solid var(--red); }
  .lang-block.kapakli .art-tag, .lang-block.kapakli .art-title, .lang-block.kapakli .art-subtitle { display: none !important; }
  .pdf-seri { font-family: var(--ff-ui); font-size: 8.5pt; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--red); }
  .pdf-baslik { font-family: var(--ff-display); font-size: 20pt; line-height: 1.2; margin: 0.4rem 0 0.3rem; color: var(--text); }
  .pdf-altbaslik { font-family: var(--ff-body); font-style: italic; font-size: 11pt; color: var(--text-muted); margin: 0; }
  .pdf-kunye { font-family: var(--ff-ui); font-size: 8.5pt; color: var(--text-muted); margin: 0.5rem 0 0; }
}
@media print {
  /* Örnek hesap kutusu bir sayfadan uzun olabilir: kutu bölünebilir, ama her adım (başlık + tablosu/denklemi) birlikte kalır */
  .art-body .ornek-kutu { break-inside: auto; page-break-inside: auto; }
  .art-body .ornek-kutu .adim, .art-body .ornek-kutu .ornek-baslik { break-after: avoid; page-break-after: avoid; }
  .art-body .ornek-kutu table, .art-body .ornek-kutu .denklem { break-inside: avoid; page-break-inside: avoid; }
  .art-body p:has(+ .ornek-kutu) { break-after: auto; }
}
@media print {
  /* Kutuların içindeki her adım (başlık + tablo/denklem + açıklama) bölünmez; sığmazsa bütünüyle sonraki sayfaya geçer */
  .art-body .adim-blok, .art-body .denklem-kutu p, .art-body .isabet-kutu, .art-body .callout p { break-inside: avoid; page-break-inside: avoid; }
}

/* Formül açıklama kutusu ve hizalama (web/formul.py) */
.art-body .terim-tablosu th.sayi, .art-body .ornek-tablo th.sayi { text-align: right; }
.art-body .okuma-kutu { margin: 1.2rem 0 1.6rem; padding: 1rem 1.4rem; border: 1px dashed var(--border); border-radius: 6px; background: var(--white); }
.art-body .okuma-kutu p { margin: 0.55rem 0; font-size: 0.95rem; }
.art-body .okuma-kutu .mini { background: var(--gold-faint); border-radius: 4px; padding: 0.5rem 0.7rem; }
.art-body .ornek-tablo td.anlam { font-size: 0.82rem; color: var(--text-muted); }
@media print { .art-body .okuma-kutu p { break-inside: avoid; } .art-body .okuma-kutu { break-inside: auto; } }

/* Altbilgi sürüm satırı (build_site.py footer_surum; tek kaynak SURUM.json) */
.site-footer .footer-surum { margin-top: 0.35rem; font-size: 0.78rem; opacity: 0.8; }


/* ── Başlık çubuğu (1.16 yeniden tasarım) ─────────────────────────
   İki grup: ana bölümler öne çıkar, ikincil sayfalar sadedir. Seçili sayfa alt çizgiyle
   gösterilir; dil seçimi tek bir segmentli kontroldür. Hamburger yalnız sığmayan genişlikte. */
.site-header nav { display: flex; align-items: center; flex-wrap: nowrap; margin-left: auto; gap: 1.25rem; }
.nav-links { display: flex; align-items: center; gap: 0; }
.nav-grup { display: flex; align-items: center; gap: 0.1rem; }
.nav-ikincil { margin-left: 0.85rem; padding-left: 0.85rem; border-left: 1px solid rgba(255,255,255,0.18); }
.nav-links a {
  position: relative;
  color: rgba(255,255,255,0.82);
  background: none;
  border-radius: 6px;
  padding: 0.45rem 0.7rem;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  transition: color 0.15s, background 0.15s;
}
.nav-ikincil a { font-size: 0.84rem; color: rgba(255,255,255,0.72); padding: 0.45rem 0.6rem; }
.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-links a.active { color: #fff; background: none; font-weight: 600; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0.7rem; right: 0.7rem; bottom: 0.12rem;
  height: 2px; border-radius: 2px; background: var(--gold);
}
.nav-ikincil a.active::after { left: 0.6rem; right: 0.6rem; }
.nav-links a:focus-visible, .lang-btn:focus-visible, .nav-toggle:focus-visible, .site-name:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}

/* Dil seçimi: tek parça, hap biçimli segmentli kontrol */
.lang-switch {
  display: inline-flex; gap: 0; padding: 2px; margin: 0;
  border: 1px solid rgba(255,255,255,0.22); border-left: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px; background: rgba(0,0,0,0.12); flex-shrink: 0;
}
.lang-btn {
  border: 0; border-radius: 999px; background: transparent;
  color: rgba(255,255,255,0.7); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  padding: 0.28rem 0.6rem; line-height: 1.2;
}
.lang-btn:hover { color: #fff; background: rgba(255,255,255,0.08); border: 0; }
.lang-btn.active { color: var(--red-dark, #5a1414); background: var(--gold); border: 0; }

.nav-toggle { flex-shrink: 0; border-color: rgba(255,255,255,0.22); border-radius: 8px; }

/* Tablet ve altı: menü sağda açılan bir panele geçer; gruplar korunur */
@media (max-width: 1023px) {
  .nav-toggle { display: flex; order: 3; margin-left: 0.75rem; }
  .site-header nav { order: 2; gap: 0; }
  .nav-links {
    position: absolute; top: var(--nav-h); right: 0; left: auto; min-width: 260px;
    flex-direction: column; align-items: stretch;
    background: var(--red); border-bottom: 2px solid var(--gold); border-left: 2px solid var(--gold);
    border-bottom-left-radius: 10px;
    padding: 0.5rem 0.75rem 0.75rem; box-shadow: 0 12px 28px rgba(0,0,0,0.28); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-grup { flex-direction: column; align-items: stretch; gap: 0.1rem; }
  .nav-ikincil { margin: 0.4rem 0 0; padding: 0.4rem 0 0; border-left: 0; border-top: 1px solid rgba(255,255,255,0.15); }
  .nav-links a { padding: 0.7rem 0.75rem; font-size: 1rem; border-bottom: 0; }
  .nav-ikincil a { font-size: 0.92rem; padding: 0.6rem 0.75rem; }
  .nav-links a.active { background: rgba(255,255,255,0.1); }
  .nav-links a.active::after { left: 0; right: auto; top: 0.55rem; bottom: 0.55rem; width: 3px; height: auto; }
}
@media (max-width: 640px) {
  .nav-links { left: 0; right: 0; min-width: 0; border-left: 0; border-bottom-left-radius: 0; }
}
@media (max-width: 420px) {
  .lang-btn { padding: 0.24rem 0.45rem; }
}
