/* Yazdırılabilir yazılı kâğıdı (A4) */
:root { --ink: #111827; --muted: #4b5563; --line: #d1d5db; --accent: #2563eb; }
* { box-sizing: border-box; }
body { margin: 0; background: #e5e7eb; color: var(--ink); font: 15px/1.5 "Segoe UI", Arial, sans-serif; }
img { max-width: 100%; }

.toolbar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 18px; background: #0f172a; color: #fff; }
.toolbar a { color: #bfdbfe; text-decoration: none; font-weight: 600; }
.tb-title { flex: 1; font-weight: 700; min-width: 200px; }
.tb-key { display: flex; align-items: center; gap: 6px; font-size: .9rem; }
.toolbar button { font: 700 .95rem inherit; font-family: inherit; background: #2563eb; color: #fff; border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer; }
.toolbar button:hover { background: #1d4ed8; }
.tb-hint { text-align: center; color: var(--muted); font-size: .85rem; margin: 10px 0 0; }

.sheet { width: 210mm; max-width: 100%; min-height: 297mm; margin: 14px auto 40px; background: #fff; padding: 14mm 15mm 16mm; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); }
.exam-head { border: 2px solid var(--ink); border-radius: 6px; padding: 10px 14px; margin-bottom: 14px; text-align: center; position: relative; }
.eh-brand { position: absolute; top: 8px; left: 12px; font-weight: 800; font-size: .85rem; text-align: left; line-height: 1.1; }
.eh-brand small { display: block; font-weight: 400; color: var(--muted); font-size: .7rem; }
.exam-head h1 { font-size: 1.25rem; margin: 4px 0 2px; }
.eh-sub { margin: 0 0 8px; color: var(--muted); font-size: .85rem; }
.eh-info { width: 100%; border-collapse: collapse; font-size: .85rem; }
.eh-info td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.eh-info td:nth-child(odd) { width: 1%; white-space: nowrap; font-weight: 700; background: #f3f4f6; }
.eh-topics { margin: 8px 0 0; font-size: .82rem; text-align: left; }

.sec { font-size: 1rem; margin: 18px 0 8px; padding: 4px 10px; background: #f3f4f6; border-left: 4px solid var(--accent); display: flex; flex-direction: column; }
.sec small { font-weight: 400; font-size: .8rem; color: var(--muted); }
.passage { border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px; margin: 8px 0 10px; font-size: .92rem; background: #fafafa; break-inside: avoid; }
.passage h3 { margin: 0 0 6px; font-size: .95rem; }
.passage table, .q-b table { border-collapse: collapse; margin: 6px 0; }
.passage th, .passage td, .q-b th, .q-b td { border: 1px solid var(--line); padding: 3px 9px; }
.pref { font-size: .82rem; font-style: italic; color: var(--muted); margin: 6px 0 2px; }
.q { margin: 0 0 10px; break-inside: avoid; }
.q-row { display: flex; gap: 8px; }
.q-n { min-width: 22px; }
.q-b { flex: 1; }
.q-b p { margin: 0; }
.tf { float: right; white-space: nowrap; font-weight: 700; margin-left: 12px; }
.blank { display: inline-block; min-width: 140px; border-bottom: 1.5px dotted var(--ink); margin: 0 4px; height: 1.1em; vertical-align: bottom; }
.q figure { margin: 6px 0 6px 30px; }
.q figure img { max-height: 200px; border: 1px solid var(--line); }
.opts { list-style: none; padding: 0 0 0 30px; margin: 4px 0 0; display: grid; gap: 2px 18px; }
.opts.two { grid-template-columns: 1fr 1fr; }
.opts p { display: inline; margin: 0; }
.lines { margin: 6px 0 0 30px; }
.lines i { display: block; height: 24px; border-bottom: 1px solid var(--line); }
.good-luck { text-align: center; font-weight: 700; margin-top: 20px; }
.key { margin-top: 20px; border-top: 2px dashed var(--ink); padding-top: 10px; }
.key h2 { font-size: 1rem; }
.key ol { list-style: none; padding: 0; columns: 2; font-size: .85rem; }
.key li { margin-bottom: 3px; break-inside: avoid; }
.key-cta { text-align: center; background: #eff6ff; border: 1px solid #bfdbfe; padding: 10px; border-radius: 8px; font-size: .9rem; }
.sheet-foot { margin-top: 24px; padding-top: 6px; border-top: 1px solid var(--line); font-size: .72rem; color: var(--muted); text-align: center; }

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; font-size: 12.5pt; }
  .toolbar, .tb-hint, .noprint { display: none !important; }
  .sheet { width: auto; min-height: 0; margin: 0; padding: 0; box-shadow: none; }
  .key:not([hidden]) { break-before: page; }
  a { color: inherit; text-decoration: none; }
}
@media (max-width: 700px) {
  .sheet { padding: 16px; }
  .opts.two { grid-template-columns: 1fr; }
  .eh-brand { position: static; text-align: center; margin-bottom: 4px; }
}
