/* ============================================================
   GRK Gereke — Leitfaden / PDF print layout
   Builds on colors_and_type.css tokens. A4 paper pages on screen,
   clean one-page-per-section breaks on print.
   ============================================================ */

* { box-sizing: border-box; }

html { font-size: 100%; }
body {
  margin: 0;
  font-family: var(--grk-font-sans);
  color: var(--grk-fg-2);
  background: #54657a;            /* neutral studio grey behind the paper */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* ---------- Floating toolbar (screen only) ---------- */
.guide-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 24px; background: rgba(13, 27, 46, 0.92);
  backdrop-filter: blur(8px); border-bottom: 1px solid rgba(255,255,255,0.08);
}
.guide-bar__label { display: flex; align-items: center; gap: 11px; color: #fff; font-size: 13px; font-weight: 600; letter-spacing: 0.01em; }
.guide-bar__label img { height: 22px; width: auto; display: block; }
.guide-bar__actions { display: flex; gap: 10px; }
.guide-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 4px;
  font-family: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: all 200ms ease;
}
.guide-btn--solid { background: var(--grk-blue-mid); color: #fff; }
.guide-btn--solid:hover { background: #5d8bd6; }
.guide-btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.28); }
.guide-btn--ghost:hover { background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.55); }

/* ---------- Document + page ---------- */
.doc { padding: 78px 0 60px; }
.page {
  width: 210mm; min-height: 297mm; margin: 0 auto 26px; background: #fff;
  box-shadow: 0 18px 50px rgba(0,0,0,0.34); position: relative;
  padding: 22mm 20mm 18mm; display: flex; flex-direction: column;
}

/* running header / footer */
.page__head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 9px; border-bottom: 1px solid var(--grk-border);
  margin-bottom: 26px; flex-shrink: 0;
}
.page__head .ph-brand { display: flex; align-items: center; gap: 9px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: var(--grk-navy); text-transform: uppercase; }
.page__head .ph-brand img { height: 16px; width: auto; }
.page__head .ph-meta { font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grk-fg-4); }
.page__foot {
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--grk-border);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 9.5px; color: var(--grk-fg-4); letter-spacing: 0.02em; flex-shrink: 0;
}
.page__body { flex: 1; }

/* ---------- Typography ---------- */
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--grk-blue-mid); margin: 0 0 14px; }
.guide-h1 { font-family: var(--grk-font-display); font-size: 30px; font-weight: 600; color: var(--grk-navy); letter-spacing: -0.02em; line-height: 1.14; margin: 0 0 14px; }
.guide-h2 { font-family: var(--grk-font-display); font-size: 21px; font-weight: 600; color: var(--grk-navy); letter-spacing: -0.015em; line-height: 1.2; margin: 0 0 12px; }
.guide-h3 { font-size: 13.5px; font-weight: 700; color: var(--grk-navy); letter-spacing: 0.01em; margin: 0 0 6px; }
.guide-p  { font-size: 11.5px; line-height: 1.72; color: var(--grk-fg-2); margin: 0 0 12px; }
.guide-p--lead { font-size: 13px; line-height: 1.7; color: var(--grk-fg-3); }
.guide-p sup { color: var(--grk-blue-mid); font-weight: 700; font-size: 8.5px; padding-left: 1px; }
.chapter-no { font-family: var(--grk-font-display); font-size: 12px; font-weight: 700; color: var(--grk-blue-mid); letter-spacing: 0.12em; }

.guide-section { margin-bottom: 22px; }
.guide-section:last-child { margin-bottom: 0; }

/* lists */
.guide-list { list-style: none; margin: 0 0 12px; padding: 0; }
.guide-list li { position: relative; padding: 0 0 8px 20px; font-size: 11.5px; line-height: 1.6; color: var(--grk-fg-2); }
.guide-list li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--grk-blue-mid); }
.guide-list--check li::before { content: "✓"; background: none; color: var(--grk-blue-mid); font-size: 11px; font-weight: 700; top: 0; left: 0; width: auto; height: auto; }

/* two-column */
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 26px; }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* callout / fact box */
.callout {
  background: var(--grk-bg-subtle); border: 1px solid var(--grk-border);
  border-left: 3px solid var(--grk-blue-mid); border-radius: 8px; padding: 15px 18px; margin: 0 0 16px;
}
.callout__label { font-size: 9.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grk-blue-mid); margin: 0 0 6px; }
.callout p { margin: 0; font-size: 11px; line-height: 1.65; color: var(--grk-fg-2); }

/* metal / fact cards */
.fact-card { background: #fff; border: 1px solid var(--grk-border); border-radius: 10px; padding: 16px 16px 14px; position: relative; overflow: hidden; }
.fact-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent, var(--grk-blue-mid)); }
.fact-card h4 { font-family: var(--grk-font-display); font-size: 15px; font-weight: 600; color: var(--grk-navy); margin: 4px 0 4px; }
.fact-card .fc-sym { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent, var(--grk-blue-mid)); }
.fact-card dl { margin: 8px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; }
.fact-card dt { font-size: 9.5px; color: var(--grk-fg-4); }
.fact-card dd { margin: 0; font-size: 9.5px; font-weight: 600; color: var(--grk-navy); text-align: right; }

/* data table */
.guide-table { width: 100%; border-collapse: collapse; margin: 0 0 14px; }
.guide-table th, .guide-table td { text-align: left; padding: 8px 10px; font-size: 10.5px; border-bottom: 1px solid var(--grk-border); }
.guide-table th { font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grk-fg-4); background: var(--grk-bg-subtle); }
.guide-table td:first-child { font-weight: 600; color: var(--grk-navy); }

/* numbered steps */
.steps { counter-reset: step; display: flex; flex-direction: column; gap: 12px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step__n { counter-increment: step; flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--grk-navy); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; font-family: var(--grk-font-display); }
.step__n::before { content: counter(step); }

/* sources */
.source-list { list-style: none; margin: 0; padding: 0; counter-reset: src; }
.source-list li { position: relative; padding: 9px 0 9px 30px; border-bottom: 1px solid var(--grk-border); font-size: 10.5px; line-height: 1.5; color: var(--grk-fg-2); }
.source-list li::before { counter-increment: src; content: counter(src); position: absolute; left: 0; top: 9px; width: 18px; height: 18px; border-radius: 4px; background: var(--grk-bg-subtle); color: var(--grk-blue-mid); font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.source-list strong { color: var(--grk-navy); font-weight: 700; }

/* ---------- Cover page ---------- */
.cover { background: linear-gradient(158deg, var(--grk-navy) 0%, var(--grk-navy-2) 100%); color: #fff; padding: 26mm 22mm; justify-content: space-between; }
.cover::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: linear-gradient(90deg, var(--grk-gold), var(--grk-blue-mid)); }
.cover__top { display: flex; align-items: center; justify-content: space-between; }
.cover__brand { display: flex; align-items: center; gap: 12px; }
.cover__brand img { height: 30px; width: auto; }
.cover__brand span { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; color: rgba(255,255,255,0.86); }
.cover__seal { font-size: 10px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--grk-navy); background: linear-gradient(150deg, var(--grk-gold), #b2935a); padding: 7px 14px; border-radius: 999px; }
.cover__mid { }
.cover__eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; color: var(--grk-blue-light); margin: 0 0 20px; }
.cover__title { font-family: var(--grk-font-display); font-size: 46px; font-weight: 300; letter-spacing: -0.03em; line-height: 1.08; margin: 0 0 20px; color: #fff; }
.cover__title strong { font-weight: 600; }
.cover__sub { font-size: 15px; line-height: 1.7; color: rgba(255,255,255,0.7); max-width: 130mm; margin: 0; font-weight: 300; }
.cover__rule { height: 1px; background: rgba(255,255,255,0.16); margin: 26px 0; }
.cover__bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.cover__toc { display: flex; flex-direction: column; gap: 7px; }
.cover__toc span { font-size: 11.5px; color: rgba(255,255,255,0.74); display: flex; gap: 10px; }
.cover__toc span b { color: var(--grk-blue-light); font-weight: 700; min-width: 16px; }
.cover__meta { text-align: right; font-size: 11px; color: rgba(255,255,255,0.55); line-height: 1.7; }

/* ---------- Closing CTA page ---------- */
.cta-page { background: linear-gradient(158deg, var(--grk-navy) 0%, var(--grk-navy-2) 100%); color: #fff; justify-content: center; align-items: flex-start; }
.cta-page::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: linear-gradient(90deg, var(--grk-gold), var(--grk-blue-mid)); }
.cta-page .eyebrow { color: var(--grk-blue-light); }
.cta-page h2 { font-family: var(--grk-font-display); font-size: 34px; font-weight: 300; letter-spacing: -0.025em; line-height: 1.15; margin: 0 0 18px; color: #fff; max-width: 150mm; }
.cta-page p { font-size: 13px; line-height: 1.75; color: rgba(255,255,255,0.72); max-width: 150mm; margin: 0 0 28px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 34px; }
.cta-solid { display: inline-flex; align-items: center; gap: 9px; padding: 14px 28px; background: var(--grk-blue-mid); color: #fff; border-radius: 4px; font-size: 14px; font-weight: 700; letter-spacing: 0.01em; text-decoration: none; }
.cta-ghost { display: inline-flex; align-items: center; gap: 9px; padding: 14px 28px; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.3); border-radius: 4px; font-size: 14px; font-weight: 600; text-decoration: none; }
.cta-contact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; width: 100%; max-width: 150mm; border-top: 1px solid rgba(255,255,255,0.14); padding-top: 22px; }
.cta-contact div span { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grk-blue-light); margin-bottom: 5px; }
.cta-contact div b { font-size: 13px; font-weight: 600; color: #fff; }

/* ---------- Print ---------- */
@page { size: A4; margin: 0; }
@media print {
  body { background: #fff; }
  .guide-bar { display: none !important; }
  .doc { padding: 0; }
  .page { box-shadow: none; margin: 0; width: 210mm; min-height: 297mm; page-break-after: always; break-after: page; }
  .page:last-child { page-break-after: auto; }
  .fact-card, .callout, .cover, .cta-page { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  .page { width: 100%; min-height: 0; padding: 28px 22px; margin-bottom: 14px; }
  .cover { padding: 40px 24px; }
  .cover__title { font-size: 34px; }
  .cols-2, .cols-3, .cta-contact { grid-template-columns: 1fr !important; }
}
