/* HIFASA hukuki doküman sayfaları için ortak stil.
   Tek aksan rengi (--accent), tek köşe yarıçapı ölçeği (yapısal 0, etkileşimli 6px). */

:root {
  --bg: #ffffff;
  --surface: #fafafa;
  --text: #18181b;
  --body: #3f3f46;
  --muted: #71717a;
  --line: #e4e4e7;
  --accent: #4f46e5;
  --measure: 68ch;
}

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

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

body {
  background: var(--bg);
  color: var(--body);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
a:focus-visible, .home:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* Üst bar */
.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  padding: 0 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.home {
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.home:hover { text-decoration: none; }
.masthead-right { display: flex; align-items: center; gap: 18px; }
.back { color: var(--muted); font-size: 0.875rem; }
.back:hover { color: var(--text); text-decoration: none; }

/* Dil seçici */
.langs { display: flex; align-items: center; gap: 2px; }
.lang-btn {
  appearance: none;
  border: 0;
  background: none;
  padding: 6px 8px;
  border-radius: 4px;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active { color: var(--text); font-weight: 700; }
.lang-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

[data-lang] { display: none; }
[data-lang].visible { display: block; }

/* Doküman gövdesi */
.doc { max-width: 900px; margin: 0 auto; padding: 72px 24px 112px; }

.doc-header { padding-bottom: 36px; border-bottom: 1px solid var(--line); }
h1 {
  color: var(--text);
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.14;
}
.doc-meta { margin-top: 14px; font-size: 0.8125rem; color: var(--muted); }
.lead { max-width: var(--measure); margin-top: 20px; font-size: 1.0625rem; color: var(--body); }

/* Numaralı maddeler: solda madde no, sağda içerik */
.clause {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 0 24px;
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}
.clause-no {
  padding-top: 0.3rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.clause h2 {
  margin-bottom: 14px;
  color: var(--text);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.45;
}
.clause p { max-width: var(--measure); }
.clause p + p { margin-top: 14px; }
.clause p + .list,
.clause p + .olist { margin-top: 14px; }
.clause p + .deflist,
.clause p + .pairs { margin-top: 16px; }

/* Madde içi listeler */
.list { list-style: none; display: grid; gap: 12px; max-width: var(--measure); }
.list li { position: relative; padding-left: 22px; }
.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 8px;
  height: 1px;
  background: var(--muted);
}

/* İki sütunlu liste. Yalnızca kısa maddelerden oluşan uzun listeler için. */
.list--cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; max-width: none; }

/* Numaralı liste */
.olist { list-style: none; counter-reset: olist; display: grid; gap: 12px; max-width: var(--measure); }
.olist li { counter-increment: olist; position: relative; padding-left: 28px; }
.olist li::before {
  content: counter(olist) ".";
  position: absolute;
  left: 0;
  color: var(--muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Terim ve açıklama listesi */
.deflist { display: grid; gap: 16px; max-width: var(--measure); }
.deflist > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 4px 20px; }
.deflist dt { color: var(--text); font-size: 0.9375rem; font-weight: 600; }
.deflist dd { color: var(--body); }

/* İkincil açıklama */
.note { max-width: var(--measure); margin-top: 16px; font-size: 0.9375rem; color: var(--muted); }

/* Vurgulu paragraf. Sayfa başına en fazla bir kez. */
.callout {
  max-width: var(--measure);
  margin-top: 18px;
  padding: 16px 20px;
  background: var(--surface);
  border-left: 2px solid var(--accent);
}
.callout-title { margin-bottom: 8px; color: var(--text); font-size: 0.9375rem; font-weight: 700; }

/* Etiket/değer çiftleri */
.pairs { display: grid; gap: 14px; max-width: var(--measure); }
.pair { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 8px 20px; }
.pair dt { color: var(--muted); font-size: 0.9375rem; }
.pair dd { color: var(--body); }
.nowrap { white-space: nowrap; }

/* Diğer belgeler */
.related { padding-top: 40px; }
.related p { color: var(--muted); font-size: 0.8125rem; margin-bottom: 14px; }
.related ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.related a { font-size: 0.9375rem; }

@media (max-width: 720px) {
  .doc { padding: 48px 20px 80px; }
  .clause { grid-template-columns: 1fr; padding: 32px 0; }
  .clause-no { padding-top: 0; margin-bottom: 8px; }
  .pair { grid-template-columns: 1fr; gap: 2px; }
  .deflist > div { grid-template-columns: 1fr; }
  .list--cols { grid-template-columns: 1fr; }
  .masthead { padding: 0 16px; }
  .masthead-right { gap: 10px; }
}

@media print {
  .masthead { position: static; border-bottom: 1px solid #000; }
  .related { display: none; }
  body { font-size: 11pt; color: #000; }
  a { color: #000; text-decoration: none; }
  .callout { border-left: 2px solid #000; background: transparent; }
}
