/* AdsVisor Pro rapor paneli.
   Düzen: adsvisorpro.com'un dili — sıcak kâğıt zemin, Newsreader başlıklar, ince
   çizgiler. Kutu kutu şablon yerine bir rapor sayfası: bölümler çizgiyle ayrılır,
   rakamlar "defter" şeridinde. Lacivert = sitenin gerçek satışı; platformlar kendi
   kurumsal renklerinde. Açık tema: rapor ve PDF için. */
:root {
  color-scheme: light;
  --paper: #fbfaf7;
  --paper-deep: #f1efe9;
  --ink: #16324f;
  --ink-soft: #2b4a6b;
  --graphite: #5a6472;
  --rule: #dddad1;
  --rule-soft: #ebe8e1;
  --white: #ffffff;
  --meta: #0866ff;       /* Meta kurumsal mavi */
  --google: #fbbc04;     /* Google Ads sarısı */
  --google-text: #9a6b00;/* sarının yazıda okunur koyusu */
  --rival: #c2255c;      /* sitedeki "RAKİP" */
  --good: #1f7a4d;
  --bad: #b4332f;
  --serif: "Newsreader", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 500; text-wrap: balance; }
p { margin: 0; }
.muted { color: var(--graphite); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.wordmark { font: 600 20px/1 var(--serif); letter-spacing: -.01em; color: var(--ink); }
.wordmark em {
  font: 500 10px/1 var(--sans); font-style: normal; letter-spacing: .16em; text-transform: uppercase;
  margin-left: 5px; vertical-align: 3px; color: var(--graphite);
}
.wordmark.small { font-size: 15px; }
.eyebrow { font: 500 11px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--graphite); }

.ghost, .primary {
  border-radius: 6px; padding: 7px 12px; font-size: 13px; border: 1px solid var(--rule); background: var(--white);
}
.primary { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* ---------- giriş ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(400px, 100%); display: grid; gap: 14px; }
.login-card h1 { font-size: 34px; line-height: 1.1; margin-top: 18px; }
.login-card form { display: grid; gap: 8px; margin-top: 8px; }
.login-card label { font-size: 13px; font-weight: 500; }
.login-card input { padding: 11px 12px; border: 1px solid var(--rule); border-radius: 6px; background: var(--white); }
.login-card button[type="submit"] { margin-top: 6px; padding: 11px 14px; border: 0; border-radius: 6px; background: var(--ink); color: var(--white); font-weight: 500; }
.login-card button[disabled] { opacity: .6; cursor: default; }
.msg { font-size: 14px; padding: 10px 12px; border-left: 3px solid var(--ink); background: var(--paper-deep); }
.msg.err { border-left-color: var(--bad); color: var(--bad); }

/* ---------- iskelet ---------- */
.app { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.nav {
  background: var(--paper-deep); border-right: 1px solid var(--rule); padding: 26px 0 20px;
  display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh;
}
.nav-client { padding: 0 22px; font: 500 15px/1.3 var(--serif); }
.nav-client img { max-width: 140px; max-height: 44px; display: block; }
.nav nav { display: grid; }
.nav a {
  color: var(--graphite); text-decoration: none; padding: 8px 22px; font-size: 14px; border-left: 2px solid transparent;
}
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--ink); font-weight: 500; border-left-color: var(--ink); }
.nav-foot { margin-top: auto; padding: 0 22px; display: grid; gap: 12px; justify-items: start; }
.nav-foot select { padding: 5px 6px; border: 1px solid var(--rule); border-radius: 6px; background: var(--white); max-width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--graphite); font-size: 13px; }
.link:hover { color: var(--ink); text-decoration: underline; }

.main { min-width: 0; padding-inline: 40px; padding-block: 28px 36px; display: grid; gap: 30px; align-content: start; max-width: 1280px; }

/* ---------- başlık ---------- */
.head { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: flex-end; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.head-title { display: grid; gap: 8px; }
.client-logo { font: 500 34px/1.05 var(--serif); letter-spacing: -.015em; }
.client-logo img { max-height: 52px; max-width: 260px; display: block; }
.head-tools { display: flex; gap: 10px; align-items: center; }
.picker { position: relative; }
.range-btn {
  display: grid; justify-items: end; gap: 1px; text-align: right; background: var(--white);
  border: 1px solid var(--rule); border-radius: 6px; padding: 7px 12px; min-width: 230px;
}
.range-btn #range-main { font-weight: 500; font-size: 14px; }
.range-cmp { font-size: 12px; color: var(--graphite); }
.range-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 360px; max-width: calc(100vw - 32px);
  background: var(--white); border: 1px solid var(--rule); border-radius: 8px; padding: 16px;
  box-shadow: 0 12px 32px rgba(22, 50, 79, .12); display: grid; gap: 14px;
}
.range-pop fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.range-pop legend { font: 500 11px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--graphite); margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1px solid var(--rule); background: var(--paper); border-radius: 999px; padding: 5px 11px; font-size: 13px; }
.chips button.on { background: var(--ink); color: var(--white); border-color: var(--ink); }
.dates { display: flex; align-items: center; gap: 6px; }
.dates input { flex: 1; min-width: 0; padding: 6px 8px; border: 1px solid var(--rule); border-radius: 6px; background: var(--white); }
.pop-err { font-size: 13px; color: var(--bad); }
.pop-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- sayfa ---------- */
.page { display: grid; gap: 34px; min-width: 0; }
.section { display: grid; gap: 14px; min-width: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-head h2 { font-size: 22px; }
.section-head .eyebrow { white-space: nowrap; }
.sub-head { font-size: 15px; margin: 14px 0 6px; }
.name-wrap.ad-text { max-width: 560px; font-weight: 400; }

/* Defter şeridi: tek kâğıt, hücreler ince çizgiyle ayrılır. */
.ledger {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--white); border: 1px solid var(--rule); border-radius: 8px;
}
.ledger.truth { border-top: 3px solid var(--ink); }
.cell { padding: 16px 20px 15px; display: grid; gap: 6px; min-width: 0; }
.cell + .cell { border-left: 1px solid var(--rule-soft); }
.cell .label { font-size: 12.5px; color: var(--graphite); display: flex; align-items: center; gap: 7px; }
.cell .value { font: 500 30px/1.05 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.cell .delta { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.swatch { width: 9px; height: 9px; border-radius: 2px; flex: none; }
/* 8 kartlık şerit (platform sayfaları): ikinci sıra üst çizgiyle ayrılır. */
.ledger .cell:nth-child(4n + 1) { border-left: 0; }
.ledger .cell:nth-child(n + 5) { border-top: 1px solid var(--rule-soft); }
.tone-good { color: var(--good); }
.tone-bad { color: var(--bad); }
.tone-flat, .tone-none { color: var(--graphite); }

.why { font-size: 13.5px; color: var(--ink-soft); border-left: 2px solid var(--rule); padding: 2px 0 2px 14px; }
.why summary { cursor: pointer; color: var(--ink); font-weight: 500; list-style: none; }
.why summary::-webkit-details-marker { display: none; }
.why summary::before { content: "+ "; color: var(--graphite); }
.why[open] summary::before { content: "– "; }
.why p { margin-top: 8px; max-width: 78ch; }

.figure { background: var(--white); border: 1px solid var(--rule); border-radius: 8px; padding: 18px 20px 14px; min-width: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--graphite); margin-bottom: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend .line { width: 16px; height: 2px; background: var(--ink); }
.chart-wrap { position: relative; height: 300px; }
.chart-print { display: none; width: 100%; height: auto; }

/* Tablolar kaydırmasız (D-082): geniş kapta tablo, dar kapta her satır bir kart.
   Kap sorgusu (container query) tablonun kendi genişliğine bakar; çok sütunlu (.wide)
   tablolar daha erken karta döner. */
.tbl { container-type: inline-size; background: var(--white); border: 1px solid var(--rule); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
th { text-align: right; vertical-align: bottom; font: 500 10.5px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--graphite); padding: 11px 10px 9px; border-bottom: 1px solid var(--rule); }
td { text-align: right; vertical-align: top; padding: 10px; border-bottom: 1px solid var(--rule-soft); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; padding-left: 16px; }
/* Sıralama (D-083): başlık bir düğme; seçili sütunda ▲/▼. */
th .sort { all: unset; cursor: pointer; display: inline-flex; align-items: flex-end; gap: 4px; text-align: inherit; }
th .sort:hover { color: var(--ink); }
th .sort:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
th .sort.on { color: var(--ink); }
th .sort.on::after { content: "▼"; font-size: 8px; line-height: 1.6; }
th .sort.on.asc::after { content: "▲"; }
.heat-note { margin-top: -4px; }
th:last-child, td:last-child { padding-right: 16px; }
tr:last-child td { border-bottom: 0; }
/* Toplam satırı: sabit, sıralamaya girmez. */
tfoot td { border-top: 1px solid var(--rule); border-bottom: 0; font-weight: 600; background: var(--paper-deep); }
tfoot td:first-child { border-bottom-left-radius: 8px; }
tfoot td:last-child { border-bottom-right-radius: 8px; }
td .v { display: inline-grid; justify-items: end; gap: 2px; }
td:first-child .v { display: block; justify-items: normal; }
.name-cell { display: inline-flex; align-items: center; gap: 9px; font-weight: 500; }
.bar { display: block; height: 3px; border-radius: 2px; max-width: 100%; justify-self: stretch; }
.name-wrap { text-align: left; font-weight: 500; white-space: normal; min-width: 150px; max-width: 300px; overflow-wrap: anywhere; }
.name-wrap .sub { display: block; font-weight: 400; font-size: 12px; color: var(--graphite); margin-top: 2px; }
.tag {
  display: inline-block; margin-left: 8px; padding: 1px 7px; vertical-align: 1px; white-space: nowrap;
  font: 500 10px/1.5 var(--sans); letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid var(--ink); border-radius: 999px; color: var(--ink);
}
.tag.muted-tag { border-color: var(--rule); color: var(--graphite); }
.row-delta { font-size: 11px; }
.ad-cell { display: flex; gap: 10px; align-items: flex-start; }
.thumb { width: 44px; height: 44px; flex: none; border-radius: 4px; object-fit: cover; background: var(--paper-deep); border: 1px solid var(--rule-soft); }
.links { display: flex; gap: 12px; margin-top: 4px; font-weight: 400; font-size: 12px; }
.links a { color: var(--meta); text-decoration: none; }
.links a:hover { text-decoration: underline; }
.cov-note { font-size: 13px; color: var(--ink-soft); background: var(--paper-deep); border-left: 3px solid var(--google); padding: 9px 14px; border-radius: 0 6px 6px 0; }

@container (max-width: 920px) {
  .tbl.wide :is(table, tbody, tfoot, tr, td) { display: block; }
  .tbl.wide thead { display: none; }
  .tbl.wide tr { padding: 12px 16px; border-bottom: 1px solid var(--rule-soft); }
  .tbl.wide td { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; border: 0; white-space: normal; }
  .tbl.wide td::before { content: attr(data-label); color: var(--graphite); font-size: 12px; text-align: left; }
  .tbl.wide td:first-child { display: block; padding: 0 0 8px; }
  .tbl.wide :is(td:first-child, .empty-row td)::before { content: none; }
  .tbl.wide .name-wrap { max-width: none; }
  .tbl.wide .bar { width: 64px !important; }
}
@container (max-width: 640px) {
  .tbl :is(table, tbody, tfoot, tr, td) { display: block; }
  .tbl thead { display: none; }
  .tbl tr { padding: 12px 16px; border-bottom: 1px solid var(--rule-soft); }
  .tbl td { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; border: 0; white-space: normal; }
  .tbl td::before { content: attr(data-label); color: var(--graphite); font-size: 12px; text-align: left; }
  .tbl td:first-child { display: block; padding: 0 0 8px; }
  .tbl :is(td:first-child, .empty-row td)::before { content: none; }
  .tbl .name-wrap { max-width: none; }
  .tbl .bar { width: 64px !important; }
}
.note { font-size: 12.5px; color: var(--graphite); max-width: 80ch; }

.empty, .error { border: 1px dashed var(--rule); border-radius: 8px; padding: 32px; text-align: center; color: var(--graphite); background: var(--white); }
.error { border-style: solid; color: var(--bad); }
.loading { color: var(--graphite); }

/* ---------- demo mağaza (D-084) ---------- */
.demo-banner { font-size: 12.5px; color: var(--ink-soft); background: var(--paper-deep); border: 1px dashed var(--rule); border-radius: 6px; padding: 7px 12px; }
.demo-mark { font-weight: 600; letter-spacing: .02em; }
.nav a.soon { opacity: .55; }
.nav a.soon::after { content: " · yakında"; font-size: 11px; }
.filter { display: grid; gap: 2px; font-size: 11px; color: var(--graphite); }
.filter select { padding: 6px 8px; border: 1px solid var(--rule); border-radius: 6px; background: var(--white); font-size: 13px; color: var(--ink); }
.cell .hint { font-size: 11.5px; color: var(--graphite); }
.highlights { margin: 0; padding: 14px 18px 14px 34px; background: var(--white); border: 1px solid var(--rule); border-radius: 8px; display: grid; gap: 8px; font-size: 14px; }
.chart-wrap.tall { height: 380px; }
.funnel { display: grid; gap: 10px; }
.funnel-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 90px 170px; gap: 12px; align-items: center; font-size: 13.5px; }
.funnel-label { font-weight: 500; }
.funnel-track { height: 22px; background: var(--paper-deep); border-radius: 4px; overflow: hidden; }
.funnel-track span { display: block; height: 100%; background: var(--ink); border-radius: 4px; }
.funnel-val { text-align: right; font-variant-numeric: tabular-nums; }
.funnel-rate { color: var(--graphite); font-variant-numeric: tabular-nums; }
.funnel-rate small { font-size: 11.5px; }
@media screen and (max-width: 720px) {
  .funnel-row { grid-template-columns: 1fr auto; }
  .funnel-track { grid-column: 1 / -1; order: 3; }
  .funnel-rate { grid-column: 1 / -1; order: 4; }
  .head-tools { flex-wrap: wrap; }
}
.print-report .chart-wrap.tall { height: 230px; }
/* PDF yoğunluğu (D-086): satırlar ve bölüm aralıkları ekrandan sık. */
.print-report table { font-size: 12px; }
.print-report td { padding-top: 5px; padding-bottom: 5px; }
.print-report th { padding-top: 7px; padding-bottom: 6px; }
.print-report .name-wrap .sub, .print-report .links { font-size: 11px; margin-top: 0; }
.print-report .row-delta { font-size: 10.5px; }
.print-report .section { gap: 8px; }
.print-report .section-head h2 { font-size: 19px; }
.print-report .sheet-staging > * + *, .print-report .sheet-body > * + * { margin-top: 10px; }
.print-report .note { font-size: 11px; }
/* Durdur · Başla · Devam et */
.actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.action-col { display: grid; gap: 10px; align-content: start; }
.action-col h3 { font-size: 19px; padding-bottom: 6px; border-bottom: 3px solid; display: grid; gap: 2px; }
.action-col h3 span { font: 400 12px var(--sans); color: var(--graphite); }
.action { background: var(--white); border: 1px solid var(--rule); border-radius: 8px; padding: 12px 14px; display: grid; gap: 6px; font-size: 13px; break-inside: avoid; }
.action-title { font-weight: 600; font-size: 14px; }
.action .tag { margin-left: 4px; }
@media screen and (max-width: 960px) { .actions { grid-template-columns: 1fr; } }
.actions.print-bucket { grid-template-columns: 1fr; }
.print-bucket .action-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.print-bucket .action-col h3 { grid-column: 1 / -1; }

/* ---------- uzman yorumu ---------- */
.comment-box {
  background: var(--white); border: 1px solid var(--rule); border-left: 3px solid var(--ink);
  border-radius: 8px; padding: 18px 22px; font: 400 17px/1.55 var(--serif);
}
.comment-box p + p { margin-top: 10px; }
.empty-comment .comment-box { border-style: dashed; border-left-style: solid; font-size: 15px; }
.comment-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.comment-box textarea {
  width: 100%; min-height: 180px; resize: vertical; padding: 12px; border: 1px solid var(--rule);
  border-radius: 6px; font: 400 16px/1.55 var(--serif); color: var(--ink); background: var(--paper);
}
.comment-box .note { margin-top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- alt bilgi ---------- */
.foot { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; border-top: 1px solid var(--rule); padding-top: 14px; font-size: 12.5px; color: var(--graphite); }
.fresh details summary { cursor: pointer; list-style: none; }
.fresh details summary::-webkit-details-marker { display: none; }
.fresh details summary b { color: var(--ink); font-weight: 500; }
.fresh details summary .more { text-decoration: underline; text-underline-offset: 2px; margin-left: 6px; }
.fresh ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.generated { white-space: nowrap; }

.print-head { display: none; }
/* ---------- PDF kâğıtları (D-083) ----------
   Ekran dışında gerçek boyutta çizilir; ölçüm ve baskı aynı düzende olsun diye kâğıt içi stiller
   ortama (ekran/baskı) bağlı değil. A4 yatay: 297 × 210 mm, iç boşluk 10 × 14 mm. */
.print-report { position: absolute; left: -12000px; top: 0; }
.print-report:empty { display: none; }
.print-report .chart-print { display: block; }
.print-report.charts-done .chart-wrap { display: none; }
.print-report .cell { padding: 11px 18px 10px; gap: 4px; }
.print-report .cell .value { font-size: 22px; }
/* Kart şeridi + günlük grafik aynı kâğıda sığsın. */
.print-report .chart-wrap { height: 210px; }
.print-report .figure { padding: 12px 16px 10px; }
.print-report .legend { margin-bottom: 6px; }
.print-report td { padding-top: 7px; padding-bottom: 7px; }
.print-report .thumb { width: 34px; height: 34px; }
.print-report .why p { display: block; }
.print-report .comment-actions, .print-report .commentary.empty-comment { display: none !important; }
.sheet-staging, .sheet-body { width: calc(297mm - 28mm); }
.sheet-staging > * + *, .sheet-body > * + * { margin-top: 14px; }
.sheet {
  width: 297mm; height: 210mm; padding: 10mm 14mm 8mm; background: var(--paper); overflow: hidden;
  display: flex; flex-direction: column; gap: 6mm; break-after: page;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.sheet:last-child { break-after: auto; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-end; padding-bottom: 3mm; border-bottom: 1px solid var(--rule); flex: none; }
.sheet-logo { font: 500 18px/1 var(--serif); }
.sheet-logo img { max-height: 30px; max-width: 180px; display: block; }
.sheet-meta { display: grid; justify-items: end; gap: 2px; font-size: 11px; color: var(--graphite); }
.sheet-meta b { font: 500 16px/1.1 var(--serif); color: var(--ink); }
.sheet-body { flex: 1; min-height: 0; overflow: hidden; }
.sheet-foot { flex: none; display: flex; justify-content: space-between; font-size: 10px; color: var(--graphite); border-top: 1px solid var(--rule-soft); padding-top: 2mm; }
.sheet .tbl { break-inside: auto; }
.cover { justify-content: space-between; }
.cover-body { display: grid; align-content: center; gap: 10px; flex: 1; padding: 0 10mm; }
.cover-logo img { max-height: 64px; max-width: 320px; display: block; margin-bottom: 18mm; }
.cover-logo { font: 500 40px/1.1 var(--serif); }
.cover h1 { font-size: 44px; line-height: 1.05; letter-spacing: -.01em; }
.cover-sub { font-size: 14px; color: var(--graphite); }
.toc { list-style: none; margin: 14mm 0 0; padding: 0; display: grid; gap: 8px; max-width: 120mm; font-size: 14px; }
.toc li { display: flex; align-items: baseline; gap: 8px; }
.toc i { flex: 1; border-bottom: 1px dotted var(--rule); }
.toc b { font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------- dar ekran ---------- */
@media screen and (max-width: 960px) {   /* yalnız ekran: PDF kâğıdına karışmasın */
  .app { grid-template-columns: minmax(0, 1fr); }   /* 1fr içerikle genişleyip sayfayı taşırıyordu */
  .nav { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 16px; gap: 10px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .nav-client { padding: 0; }
  .nav nav { display: flex; overflow-x: auto; width: 100%; order: 3; }
  .nav a { border-left: 0; border-bottom: 2px solid transparent; padding: 6px 10px; white-space: nowrap; }
  .nav a.on { border-bottom-color: var(--ink); }
  .nav-foot { margin: 0 0 0 auto; padding: 0; grid-auto-flow: column; align-items: center; }
  .nav-foot .wordmark { display: none; }
  .main { padding-inline: 16px; }
  .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger .cell:nth-child(odd) { border-left: 0; }
  .ledger .cell:nth-child(n + 3) { border-top: 1px solid var(--rule-soft); }
  .range-btn { min-width: 0; }
  .head { align-items: flex-start; }
  .head-tools { width: 100%; justify-content: space-between; }
  .picker { position: static; }
  .range-pop { position: fixed; left: 16px; right: 16px; top: 72px; width: auto; max-height: calc(100vh - 96px); overflow-y: auto; }
  .client-logo { font-size: 28px; }
  .client-logo img { max-height: 40px; max-width: 200px; }
  .section-head .eyebrow { white-space: normal; }
  .chart-wrap { height: 240px; }
  .comment-box { font-size: 16px; padding: 14px 16px; }
}
@media screen and (max-width: 480px) {
  .cell { padding: 12px 14px; }
  .cell .value { font-size: 24px; }
  .foot { flex-direction: column; }
}

/* ---------- PDF (yazdır → PDF olarak kaydet) ---------- */
@page { size: A4 landscape; margin: 0; }   /* margin 0: tarayıcının kendi üst/alt bilgisi basılmaz */
@media print {
  body { background: var(--white); font-size: 11.5px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .app { display: block; }
  .nav, .head, .range-pop, .foot { display: none !important; }   /* alt bilgi PDF başlığında (print-stamp) */
  .main { padding: 12mm 14mm 10mm; max-width: none; gap: 18px; }
  .print-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 1px solid var(--rule); padding-bottom: 8px; }
  #print-client { font: 500 24px/1 var(--serif); }
  #print-client img { max-height: 40px; max-width: 220px; }
  .print-meta { text-align: right; display: grid; gap: 4px; justify-items: end; font-size: 11px; color: var(--graphite); }
  .page { gap: 18px; }
  .section, .figure, .ledger { break-inside: avoid; }
  .tbl { overflow: visible; }   /* uzun tablo sayfaya bölünebilir, satır bölünmez */
  tr { break-inside: avoid; }
  thead { display: table-header-group; }
  .ledger { grid-template-columns: repeat(4, 1fr); }
  /* A4 yatay, dar ekran kuralına (≤960 px) düşüyor; şerit çizgileri 4 sütuna göre. */
  .ledger .cell:nth-child(n) { border-top: 0; border-left: 1px solid var(--rule-soft); }
  .ledger .cell:nth-child(4n + 1) { border-left: 0; }
  .ledger .cell:nth-child(n + 5) { border-top: 1px solid var(--rule-soft); }
  .cell .value { font-size: 22px; }
  .why[open] p, .why p { display: block; }
  .chart-wrap { display: none !important; }
  .chart-print { display: block; }
  .fresh details ul { display: flex; }
  /* margin 0 olduğu için yeni sayfa en üstten başlar: bölüm kendi boşluğunu taşır. */
  .print-break { break-before: page; padding-top: 12mm; }
  .commentary.empty-comment, .comment-actions { display: none !important; }
  /* Rapor dosyası (D-083): yalnız kâğıtlar basılır, kenar boşluğunu kâğıt taşır. */
  body:not(.print-all) .print-report { display: none; }
  body.print-all .main > :not(.print-report) { display: none !important; }
  body.print-all .main { padding: 0; display: block; }
  body.print-all .print-report { position: static; }
  .why summary::before { content: ""; }
}
