/*
 * Hukuki metinler: panel ile aynı IBM Carbon belirteçleri (açık g10, koyu g100);
 * WCAG 2.2 AA (bkz. assets/panel.css). A4 olarak yazdırılır.
 * Uzun okuma metni olduğu için gövde 16px (GOV.UK gövde metni boyutu).
 */
:root {
  --brand: #0f62fe;
  --brand-2: #0043ce;
  --ink: #161616;
  --muted: #525252;
  --line: #e0e0e0;
  --line-strong: #8d8d8d;
  --soft: #f4f4f4;
  --surface: #ffffff;
  --bg: #f4f4f4;
  --accent: var(--brand);
  --fill-bg: #fcf4d6;
  --focus: #0f62fe;
  --focus-inset: #ffffff;
}
html.dark {
  color-scheme: dark;
  --brand: #78a9ff;
  --brand-2: #a6c8ff;
  --ink: #f4f4f4;
  --muted: #c6c6c6;
  --line: #393939;
  --line-strong: #8d8d8d;
  --soft: #393939;
  --surface: #262626;
  --bg: #161616;
  --fill-bg: #3a2f05;
  --focus: #ffffff;
  --focus-inset: #161616;
}

* { box-sizing: border-box; font-family: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif; }

body {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  background: var(--bg);
}

a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--brand-2); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
main:focus { outline: none; }

.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.skip-link:focus { top: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  /* Carbon UI Shell üst çubuğu: her temada koyu */
  --focus: #ffffff;
  --focus-inset: #161616;
  background: #161616;
  border-bottom: 1px solid #393939;
  color: #f4f4f4;
}
.brand { display: flex; align-items: center; gap: 10px; color: #f4f4f4; text-decoration: none; font-weight: 600; font-size: 14px; }
.brand:hover { color: #ffffff; }
.brand img { width: 32px; height: 32px; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-sub { font-size: 12px; font-weight: 400; color: #c6c6c6; }
.toolbar .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0 1rem;
  border: 1px solid transparent;
  border-radius: 0;
  background: #0f62fe;
  color: #fff;
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: 0.16px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 70ms cubic-bezier(0.2, 0, 0.38, 0.9);
}
.btn:hover { background: #0050e6; color: #fff; }
.btn:focus-visible { outline-offset: -2px; box-shadow: inset 0 0 0 3px var(--focus-inset); }
/* Koyu üst çubukta ikincil düğmeler: Carbon header action (ghost) */
.btn.outline { background: transparent; border-color: transparent; color: #c6c6c6; }
.btn.outline:hover { background: #353535; color: #f4f4f4; }
.hint { flex-basis: 100%; margin: 0; font-size: 13px; color: #c6c6c6; }

.page {
  max-width: 860px;
  margin: 24px auto 48px;
  padding: 48px 56px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
}
@media (max-width: 640px) {
  .toolbar { padding: 10px 16px; }
  .page { margin: 12px; padding: 24px 16px; }
}

h1 { font-size: 28px; font-weight: 400; line-height: 1.29; text-align: center; margin: 0 0 8px; }
h1 + p, .subtitle { text-align: center; color: var(--muted); margin: 0 0 32px; font-size: 14px; }
h2 { font-size: 20px; font-weight: 600; line-height: 1.4; margin: 32px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
h3 { font-size: 16px; font-weight: 600; margin: 20px 0 8px; }
/* İki yana yaslama kelime aralarında boşluk "nehirleri" açar, disleksili okuru zorlar (GOV.UK: sola yaslı). */
p, li { text-align: left; }
ol, ul { padding-left: 22px; }
li { margin: 3px 0; }
.small { font-size: 14px; color: var(--muted); }

table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 12px 0 16px; font-size: 14px; border: 1px solid var(--line); border-radius: 0; overflow: hidden; }
th, td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 8px 10px; vertical-align: top; text-align: left; }
th:last-child, td:last-child { border-right: 0; }
tr:last-child td { border-bottom: 0; }
th { background: var(--soft); font-weight: 600; }
html:not(.dark) th { background: #e0e0e0; }
@media screen and (max-width: 640px) { table { display: block; overflow-x: auto; } }


/* Ekranda doldurulan, boşsa elle yazılacak alanlar */
.fill {
  display: inline-block;
  width: 200px;
  max-width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: var(--fill-bg);
  font: inherit;
  color: inherit;
  padding: 1px 2px;
}
td .fill { width: 100%; }
.blank {
  display: inline-block;
  min-width: 180px;
  border-bottom: 1px dotted #8a929c;
  height: 1.1em;
  vertical-align: bottom;
}

.signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 32px; break-inside: avoid; page-break-inside: avoid; }
@media screen and (max-width: 640px) { .signatures { grid-template-columns: 1fr; } }
.sign-box { border: 1px solid var(--line); border-radius: 0; padding: 12px 14px; min-height: 210px; }
.sign-box h3 { margin: 0 0 10px; text-align: center; }
.sign-line { display: grid; grid-template-columns: 110px 1fr; gap: 6px; margin: 10px 0; font-size: 13.5px; align-items: end; }
.sign-line .line { border-bottom: 1px solid #555; min-height: 22px; }
.sign-area { margin-top: 14px; height: 70px; border: 1px dashed var(--line-strong); border-radius: 0; display: flex; align-items: flex-end; justify-content: center; font-size: 12px; color: var(--muted); padding-bottom: 4px; }

.callout { background: #edf5ff; border-left: 3px solid var(--accent); border-radius: 0; padding: 12px 16px; margin: 12px 0; font-size: 14px; }
html.dark .callout { background: #0d1f42; }
/* Carbon tıklanabilir kutu listesi */
.doc-list { list-style: none; padding: 0; }
.doc-list li { border: 1px solid var(--line); border-radius: 0; padding: 16px; margin: 8px 0; text-align: left; background: var(--soft); transition: background-color 70ms cubic-bezier(0.2, 0, 0.38, 0.9); }
.doc-list li:hover { background: var(--line); }
.doc-list a { color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.doc-list .small { margin-top: 4px; }

.paraf { display: none; }
.page-break { break-before: page; page-break-before: always; }

@page { size: A4; margin: 16mm 15mm 20mm; }

@media print {
  html, body, html.dark body { background: #fff; color: #000; }
  :root, html.dark { --ink: #000; --muted: #444; --line: #999; --soft: #f0f0f0; --fill-bg: transparent; }
  table { border-radius: 0; }
  body { font-size: 11pt; line-height: 1.45; }
  .no-print, .toolbar { display: none !important; }
  .page, html.dark .page { margin: 0; padding: 0; max-width: none; background: #fff; border: 0; border-radius: 0; box-shadow: none; }
  .fill { background: transparent; }
  .fill::placeholder { color: transparent; }
  h2 { break-after: avoid; page-break-after: avoid; }
  tr { break-inside: avoid; page-break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  /* Her sayfanın altında tekrar eden paraf satırı */
  .paraf {
    display: flex;
    justify-content: space-between;
    position: fixed;
    bottom: -12mm;
    left: 0;
    right: 0;
    font-size: 8.5pt;
    color: #555;
  }
}
