/* Analit client presentation — shared stylesheet. Self-contained, no CDN. */

:root {
  --bg: #f7f5f1;
  --panel: #ffffff;
  --panel-2: #fbf8f3;
  --border: #e2ddd3;
  --text: #262220;
  --text-dim: #6b645c;
  --accent: #ef8934;
  --accent-dark: #c96b1f;
  --accent-soft: #fdecdc;
  --green: #2f8f5b;
  --green-soft: #e8f6ee;
  --red: #b3402c;
  --red-soft: #fbeae6;
  --blue: #33628f;
  --blue-soft: #e8f0f7;
  --shadow: 0 2px 10px rgba(40, 30, 20, 0.08);
  --radius: 10px;
  --maxw: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-dark); }
a:hover { color: var(--accent); }

/* ---------- top nav ---------- */

.topnav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(1.1);
}

.topnav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.brand {
  font-weight: 800;
  color: var(--accent-dark);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.topnav nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  flex: 1;
}

.topnav nav a {
  font-size: 13.5px;
  text-decoration: none;
  color: var(--text-dim);
  padding: 7px 10px;
  border-radius: 7px;
  white-space: nowrap;
}

.topnav nav a:hover { background: var(--accent-soft); color: var(--accent-dark); }

.notes-toggle {
  margin-left: auto;
  background: var(--text);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.notes-toggle:hover { background: var(--accent-dark); }

body.notes-visible .notes-toggle { background: var(--accent-dark); }

@media (max-width: 600px) {
  .topnav-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .topnav nav {
    flex: none;
    width: 100%;
    gap: 6px;
  }
  .notes-toggle {
    margin-left: 0;
    align-self: flex-start;
  }
}

/* ---------- layout ---------- */

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px 20px 80px;
}

section.slide {
  padding: 56px 0;
  border-bottom: 1px dashed var(--border);
}

section.slide:last-child { border-bottom: none; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-dark);
  margin: 0 0 8px;
}

h1 { font-size: 34px; margin: 0 0 14px; line-height: 1.2; }
h2 { font-size: 26px; margin: 34px 0 14px; line-height: 1.25; }
h3 { font-size: 19px; margin: 26px 0 10px; }
h4 { font-size: 16px; margin: 18px 0 8px; }

p { margin: 0 0 14px; }

.lede {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 760px;
}

/* ---------- cover ---------- */

.cover {
  padding: 70px 0 50px;
  text-align: left;
}

.cover .tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}

.cover h1 { font-size: 42px; max-width: 780px; }

.cover-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 28px;
  font-size: 14px;
  color: var(--text-dim);
}

.cover-meta div strong { display: block; color: var(--text); font-size: 15px; }

/* ---------- cards / boxes ---------- */

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.card-row { display: grid; gap: 16px; }
.card-row.cols-2 { grid-template-columns: 1fr 1fr; }
.card-row.cols-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 760px) {
  .card-row.cols-2, .card-row.cols-3 { grid-template-columns: 1fr; }
}

.callout {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 16px 18px;
  margin: 18px 0;
}

.callout.headline {
  border-left-color: var(--red);
  background: var(--red-soft);
}

.callout.good {
  border-left-color: var(--green);
  background: var(--green-soft);
}

.callout.info {
  border-left-color: var(--blue);
  background: var(--blue-soft);
}

.callout h4 { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

.badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge.pending { background: var(--accent-soft); color: var(--accent-dark); }
.badge.done { background: var(--green-soft); color: var(--green); }
.badge.gap { background: var(--red-soft); color: var(--red); }
.badge.top { background: #262220; color: #fff; }

/* ---------- tables ---------- */

.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }

table { border-collapse: collapse; width: 100%; font-size: 13.5px; min-width: 640px; }

th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }

th { background: var(--panel-2); font-weight: 700; white-space: nowrap; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.02em; color: var(--text-dim); }

tr:last-child td { border-bottom: none; }

tr.excluded td { color: var(--text-dim); background: #fafafa; }

td.num { text-align: right; white-space: nowrap; }

/* ---------- speaker notes ---------- */

.notes {
  display: none;
  margin-top: 14px;
  background: #2a241d;
  color: #f2e9dc;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 13.5px;
  line-height: 1.5;
}

body.notes-visible .notes { display: block; }

.notes .notes-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #e0a95f;
  font-weight: 700;
  margin-bottom: 6px;
  display: block;
}

/* ---------- rehearsal (English coach fallback) ---------- */

.rehearsal {
  border: 1px dashed #a9a196;
  border-radius: 8px;
  padding: 14px 18px;
  margin-top: 14px;
  background: #fcfbf9;
  font-size: 13.5px;
}

.rehearsal .rehearsal-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 6px;
  display: block;
}

.rehearsal p { margin: 0 0 8px; font-style: italic; color: #4a453e; }

.coach-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #9a938a;
  background: #efece6;
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 20px;
  cursor: not-allowed;
  text-decoration: none;
}

/* ---------- funnel diagram (hand-built, no mermaid runtime) ---------- */

.funnel-diagram { overflow-x: auto; padding: 6px 2px 14px; }
.funnel-diagram svg { display: block; margin: 0 auto; }
.funnel-diagram svg[aria-label="Mérési tölcsér, jelenlegi, hiányos állapot"] { min-width: 900px; }
.funnel-diagram svg[aria-label="Mérési tölcsér, tervezett, teljes állapot"] { min-width: 1400px; }

/* ---------- persona / creative grid ---------- */

.creative-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 18px 0;
}

@media (max-width: 760px) {
  .creative-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .creative-grid { grid-template-columns: 1fr; }
}

.creative-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.creative-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

.creative-item .cap { padding: 10px 12px; font-size: 12.5px; }
.creative-item .cap .hook { font-weight: 600; display: block; margin-bottom: 4px; }
.creative-item .cap .concept { color: var(--text-dim); }

/* ---------- lists ---------- */

ul.plain, ol.plain { padding-left: 22px; margin: 0 0 14px; }
ul.plain li, ol.plain li { margin-bottom: 6px; }

ul.checklist { list-style: none; padding: 0; margin: 0 0 14px; }
ul.checklist li { padding-left: 26px; position: relative; margin-bottom: 8px; }
ul.checklist li::before { content: "→"; position: absolute; left: 0; color: var(--accent-dark); font-weight: 700; }

/* ---------- footer / crumbs ---------- */

.crumbs {
  font-size: 13px;
  color: var(--text-dim);
  margin: 18px 0;
}

.crumbs a { text-decoration: none; }

footer.page-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 20px 60px;
  color: var(--text-dim);
  font-size: 12.5px;
  border-top: 1px solid var(--border);
}

.pagelinks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.pagelinks a {
  display: inline-block;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 14px 16px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  flex: 1 1 220px;
  box-shadow: var(--shadow);
}

.pagelinks a small { display: block; font-weight: 400; color: var(--text-dim); margin-top: 4px; font-size: 12.5px; }
.pagelinks a:hover { border-color: var(--accent); }

.source-note {
  font-size: 12px;
  color: var(--text-dim);
  font-style: italic;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 18px 0;
}
@media (max-width: 760px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }

.stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.stat .n { font-size: 24px; font-weight: 800; color: var(--accent-dark); display: block; }
.stat .l { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-dim); margin: 10px 0 20px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* ---------- funnel diagram nodes (rendered inside SVG foreignObject) ---------- */

.fnode {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 12.5px;
  line-height: 1.32;
  border-radius: 8px;
  padding: 8px 10px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  border: 1.5px solid;
}

.fnode.ok { background: var(--green-soft); border-color: var(--green); color: #1e5c3c; }
.fnode.broken { background: var(--red-soft); border-color: var(--red); color: #7a2c1d; border-style: dashed; }
.fnode.neutral { background: var(--panel); border-color: var(--border); color: var(--text); }

/* ---------- versenytárs hirdetés-bizonyíték (ad proof) ---------- */
.adproof { display: grid; gap: 20px; margin: 18px 0 8px; }

.adproof-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.adproof-head {
  padding: 12px 16px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}

.adproof-head .t { font-weight: 700; display: block; margin-bottom: 3px; }
.adproof-head .m { color: var(--text-dim); }

.adproof-url {
  display: block;
  padding: 9px 16px;
  border-top: 1px solid var(--border);
  background: var(--blue-soft);
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
  text-decoration: none;
}

.adproof-shots { display: grid; grid-template-columns: 1fr 1fr; }
.adproof-shots figure { margin: 0; border-left: 1px solid var(--border); }
.adproof-shots figure:first-child { border-left: 0; }

.adproof-shots img {
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: cover;
  object-position: top center;
  background: var(--panel-2);
}

.adproof-shots figcaption {
  padding: 8px 14px;
  font-size: 12px;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  background: var(--panel-2);
}

@media (max-width: 760px) {
  .adproof-shots { grid-template-columns: 1fr; }
  .adproof-shots figure { border-left: 0; border-top: 1px solid var(--border); }
  .adproof-shots figure:first-child { border-top: 0; }
  .adproof-shots img { max-height: 420px; }
}

.leadshot {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
  margin: 16px 0;
}

.leadshot img { width: 100%; height: auto; max-height: 640px; object-fit: cover; object-position: top center; }
.leadshot figcaption { padding: 10px 16px; font-size: 12.5px; color: var(--text-dim); border-top: 1px solid var(--border); background: var(--panel-2); }


/* ================= Helyorzok, meg nem kesz tartalom ================= */
.badge.todo { background: #ece4d6; color: #7d5a24; }
.badge.partial { background: var(--blue-soft); color: var(--blue); }

.ph {
  border: 1px dashed #cbc0ad;
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(45deg, transparent, transparent 9px,
      rgba(120, 100, 70, 0.035) 9px, rgba(120, 100, 70, 0.035) 18px),
    var(--panel-2);
  padding: 14px 16px;
  margin: 12px 0 18px;
}
.ph .ph-t {
  font-weight: 700; font-size: 12px; letter-spacing: 0.06em;
  text-transform: uppercase; color: #8a7a5e; margin-bottom: 6px;
}
.ph p { margin: 0 0 6px; color: var(--text-dim); font-size: 14.5px; }
.ph p:last-child { margin-bottom: 0; }
.ph ul { margin: 6px 0 0; padding-left: 18px; color: var(--text-dim); font-size: 14.5px; }

.ph-grid { display: grid; gap: 12px; margin: 12px 0 18px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.ph-shot {
  aspect-ratio: 4 / 3;
  border: 1px dashed #cbc0ad; border-radius: 8px;
  background:
    repeating-linear-gradient(45deg, transparent, transparent 7px,
      rgba(120, 100, 70, 0.045) 7px, rgba(120, 100, 70, 0.045) 14px),
    var(--panel);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 10px; gap: 4px;
}
.ph-shot .k { font-weight: 700; font-size: 11px; letter-spacing: 0.05em;
  text-transform: uppercase; color: #8a7a5e; }
.ph-shot .d { font-size: 12.5px; color: var(--text-dim); line-height: 1.35; }
@media (max-width: 480px) { .ph-grid { grid-template-columns: 1fr 1fr; } }

.legend { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 10px 0 0;
  font-size: 13.5px; color: var(--text-dim); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; font-style: normal; }
.legend i.done { background: var(--green); }
.legend i.todo { background: #c9a24a; }
.legend i.partial { background: var(--blue); }
