/* Yazılıya hazırlık sınav şablonu: MEB "Yazılıya Hazırlanıyorum" örneklerinin düzenini izler (logo ve kurum adı yok). */
:root {
  --lacivert: #17457f;
  --mavi: #2b6cb0;
  --turkuaz: #cfe7ea;
  --turkuaz-koyu: #9fcfd5;
  --zemin: #ffffff;
  --yazi: #1b1b1b;
  --soluk: #5b6470;
  --cizgi: #8aa0b8;
}
* { box-sizing: border-box; }
html { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
body {
  margin: 0; background: var(--zemin); color: var(--yazi);
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 10.5pt; line-height: 1.45;
}
img { max-width: 100%; }

/* ---------- kapak başlığı ---------- */
.kapak { margin: 0 0 7mm; }
.kapak .ders {
  text-align: center; font-weight: 900; font-size: 26pt; letter-spacing: .04em; color: var(--lacivert);
  margin: 0 0 2mm;
}
.kapak .serit {
  position: relative; display: flex; align-items: stretch; height: 15mm;
  background: linear-gradient(90deg, #dbeef0 0%, #b9dfe4 55%, #e7f3f5 100%);
  border-top: 1.2mm solid var(--lacivert);
}
.kapak .sinif {
  flex: 0 0 auto; display: flex; align-items: center; padding: 0 9mm 0 5mm; color: #fff; font-weight: 800; font-size: 14pt;
  background: var(--lacivert); clip-path: polygon(0 0, 100% 0, 82% 100%, 0 100%);
}
.kapak .baslik { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; color: #fff; }
.kapak .baslik b { font-size: 13pt; letter-spacing: .03em; color: var(--lacivert); }
.kapak .baslik span { font-size: 9.5pt; font-weight: 700; color: var(--lacivert); }
.kapak .rozet {
  flex: 0 0 auto; margin: 1.2mm 4mm 1.2mm 0; width: 26mm; display: flex; align-items: center; justify-content: center;
  border: .5mm solid var(--lacivert); border-radius: 2mm; color: var(--lacivert); font-weight: 800; font-size: 9pt; text-align: center; line-height: 1.15; background: #fff;
}
.kapak .tekrar {
  display: flex; justify-content: space-between; padding: .6mm 3mm; background: var(--lacivert);
  color: #c9daf0; font-style: italic; font-size: 7pt;
}
.kapak .imza { margin-top: 2.5mm; font-size: 8.5pt; color: var(--soluk); display: flex; justify-content: space-between; gap: 6mm; }
.kapak .imza b { color: var(--lacivert); }

/* ---------- sorular ---------- */
.soru { display: grid; grid-template-columns: 8mm 1fr; column-gap: 1mm; margin: 0 0 4mm; break-inside: avoid; page-break-inside: avoid; }
.soru > .no { font-weight: 700; padding-top: .1em; }
.soru .govde > :first-child { margin-top: 0; }
.soru p { margin: 0 0 2.2mm; text-align: justify; }
.soru p.komut, .soru li.komut { font-weight: 700; }
.soru p.soru-puan { font-weight: 700; text-align: right; margin-top: 1mm; }
.bosluk { grid-column: 2; height: var(--bosluk, 30mm); }
.govde table, .cozum table { border-collapse: collapse; margin: 2mm 0 3mm; width: 100%; font-size: 9.5pt; }
.govde th, .govde td, .cozum th, .cozum td { border: .25mm solid #7d8fa3; padding: 1.4mm 2mm; vertical-align: top; text-align: left; }
.govde th, .cozum th { background: var(--turkuaz); color: #13355f; font-weight: 700; }
.govde td:empty::after { content: "\00a0"; }
.govde table, .cozum table, .govde img, .cozum img, table.oc tr { break-inside: avoid; }
.govde img, .cozum img { display: block; margin: 2mm auto 3mm; max-height: 165mm; width: auto; max-width: 92%; }
.govde ul, .govde ol, .cozum ul, .cozum ol { margin: 0 0 2.5mm; padding-left: 6mm; }
.govde li, .cozum li { margin: 0 0 1mm; }
.govde blockquote { margin: 0 0 2.5mm; padding: 0 0 0 4mm; border-left: .8mm solid var(--turkuaz-koyu); font-style: italic; }

/* ---------- tablolar sayfası ---------- */
.bolum { break-before: page; }
.bolum-baslik { break-after: avoid; page-break-after: avoid; text-align: center; font-weight: 800; font-size: 11pt; margin: 0 0 4mm; letter-spacing: .02em; }
table.oc { border-collapse: collapse; width: 100%; font-size: 9pt; }
table.oc th { background: var(--turkuaz); color: #13355f; border: .25mm solid #7d8fa3; padding: 2mm; text-align: center; }
table.oc td { border: .25mm solid #7d8fa3; padding: 1.8mm 2mm; vertical-align: middle; }
table.oc tr:nth-child(even) td { background: #eef7f8; }
table.oc td.n { text-align: center; width: 12mm; }
table.puan { border-collapse: collapse; margin: 7mm auto 0; font-size: 9.5pt; break-inside: avoid; page-break-inside: avoid; }
table.puan caption { background: var(--turkuaz); border: .25mm solid #7d8fa3; border-bottom: 0; font-weight: 800; padding: 1.5mm; }
table.puan th, table.puan td { border: .25mm solid #7d8fa3; padding: 1.5mm 3.2mm; text-align: center; }
table.puan th { background: var(--turkuaz); }
table.puan td { font-style: italic; }
table.puan td.top { font-weight: 800; }

/* ---------- çözümler ---------- */
.cozum { display: grid; grid-template-columns: 8mm 1fr; column-gap: 1mm; margin: 0 0 6mm; break-inside: avoid; page-break-inside: avoid; }
.cozum > .no { font-weight: 700; }
.cozum p { margin: 0 0 2mm; text-align: justify; }
.cozum strong { color: #10325c; }
.puanetiketi { font-weight: 700; white-space: nowrap; }
.not-kutu { margin-top: 8mm; padding: 3mm 4mm; border: .3mm dashed var(--cizgi); font-size: 8.5pt; color: var(--soluk); }

/* ---------- yazdırma ---------- */
@page {
  size: A4;
  margin: 20mm 15mm 18mm 15mm;
  @top-center {
    content: "YAZILIYA HAZIRLIK (1. DÖNEM - 1. YAZILI)";
    background: #17457f; color: #ffffff; font: 700 9.5pt Arial, sans-serif; text-align: left; padding-left: 4mm;
    margin-top: 8mm; height: 7mm; vertical-align: middle;
  }
  @bottom-left { content: "10. SINIF"; font: 700 7.3pt/1.45 Arial, sans-serif; color: #17457f; border-top: .3mm solid #17457f; white-space: pre; text-align: left; vertical-align: middle; }
  @bottom-right { content: counter(page); font: 800 9pt Arial, sans-serif; color: #ffffff; background: #17457f; text-align: center; width: 8mm; border-top: .3mm solid #17457f; }
}
@page :first {
  margin-top: 12mm;
  @top-center { content: none; background: none; }
}
.dersadi { string-set: dersadi content(); display: none; }

@media print {
  .ekran { display: none !important; }
}

/* ---------- ekran (web) ---------- */
@media screen {
  body { background: #eef2f7; }
  .sayfa { max-width: 205mm; margin: 0 auto 12mm; background: #fff; padding: 12mm 14mm 14mm; box-shadow: 0 2px 14px rgba(20, 40, 80, .12); }
  .bosluk { height: 6mm; }
  .bolum { margin-top: 12mm; padding-top: 10mm; border-top: .4mm dashed #b8c6d6; }
  .ust-cubuk { position: sticky; top: 0; z-index: 5; background: var(--lacivert); color: #fff; }
  .ust-cubuk .ic { max-width: 205mm; margin: 0 auto; padding: 10px 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
  .ust-cubuk a { color: #fff; text-decoration: none; font-weight: 700; }
  .ust-cubuk .dugme { background: #fff; color: var(--lacivert); padding: 6px 12px; border-radius: 6px; }
  .cevap-ac { margin: 0 0 4mm; }
  details.cevaplar > summary { cursor: pointer; font-weight: 800; color: var(--lacivert); font-size: 12pt; margin: 0 0 4mm; }
}
@media screen and (max-width: 640px) {
  .sayfa { padding: 16px; margin: 0 0 16px; box-shadow: none; }
  .kapak .ders { font-size: 20pt; }
  .kapak .rozet { display: none; }
  .kapak .serit { height: auto; min-height: 15mm; }
  .kapak .sinif { font-size: 11pt; padding: 0 7mm 0 3mm; }
  .kapak .baslik { padding: 6px 4px; text-align: center; }
  .kapak .baslik b { font-size: 11.5pt; }
  .kapak .baslik span { font-size: 8pt; }
  .kapak .tekrar { overflow: hidden; white-space: nowrap; }
  .kapak .tekrar span:nth-child(n+4) { display: none; }
  .kapak .imza { flex-direction: column; gap: 2px; }
  .soru p, .cozum p { text-align: left; }
  .ust-cubuk .ic span { display: none; }
  .soru, .cozum { grid-template-columns: 26px 1fr; }
  .govde table, .cozum table, table.oc { display: block; overflow-x: auto; }
}

/* Baskıda dipnot kutusu bölünmesin; paragraf ve maddelerin tek satırı sayfa başında/sonunda kalmasın */
.not-kutu { break-inside: avoid; page-break-inside: avoid; }
.govde p, .govde li, .cozum p, .cozum li { orphans: 3; widows: 3; }
/* Puanlama tablosu tek başına sayfaya düşmesin: ÖÇ tablosunun son satırlarıyla birlikte geçsin */
table.oc { break-after: avoid; page-break-after: avoid; }
