/* ==========================================================================
   COSIC seminar — "Applied Cryptography for Privacy in Ethereum"
   Theme: "Forest & Brick" — DECIDED by Ali (2026-06-03) from tmp/theme variants.
   Fraunces (serif display) + Source Sans 3 (body) + IBM Plex Mono.
   Three-color discipline:
     --ink     neutral body text on clean background      (use everywhere)
     --accent  primary accent: titles, eyebrows, links     (use freely)
     --ember   RESERVED emphasis: consequential ideas,
               .note caveat blocks                         (use sparingly)
   ========================================================================== */

:root {
  --paper:      #fcfcf9;   /* clean off-white background     */
  --ink:        #232825;   /* near-black body text           */
  --ink-soft:   #67706a;   /* secondary / captions / chrome  */
  --ink-faint:  #b7bdb8;   /* hairlines, disabled chrome     */
  --accent:     #166534;   /* forest green — primary accent  */
  --accent-soft:#e8f3ec;   /* green wash for fills           */
  --ember:      #b91c1c;   /* brick red — RESERVED           */
  --ember-soft: #fbeaea;

  --font-display: "Fraunces", "Georgia", serif;
  --font-body:    "Source Sans 3", "Helvetica Neue", sans-serif;
  --font-mono:    "IBM Plex Mono", "SFMono-Regular", monospace;
}

/* ---------- base ---------- */

.reveal-viewport { background: var(--paper); }

.reveal {
  font-family: var(--font-body);
  font-size: 30px;
  font-weight: 400;
  color: var(--ink);
}

.reveal .slides { text-align: left; }

.reveal h1, .reveal h2, .reveal h3 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  margin-bottom: 0.5em;
}
.reveal h1 { font-size: 1.9em; }
.reveal h2 { font-size: 1.35em; }
.reveal h3 { font-size: 1.05em; }

.reveal p, .reveal li { line-height: 1.45; }
.reveal ul, .reveal ol { display: block; margin-left: 1em; }
.reveal li { margin: 0.35em 0; }
.reveal ul li::marker { color: var(--accent); }

.reveal a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--ink-faint); }
.reveal a:hover { border-bottom-color: var(--accent); }

.reveal code, .reveal .mono {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: #f0efe9;
  padding: 0.05em 0.3em;
  border-radius: 4px;
}

.reveal strong { font-weight: 600; color: var(--ink); }

.reveal .small  { font-size: 0.72em; }
.reveal .tiny   { font-size: 0.58em; }
.reveal .soft   { color: var(--ink-soft); }
.reveal .center { text-align: center; }

/* ---------- semantic classes ---------- */

/* small caps kicker above a title */
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.55em;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4em;
}

/* the one reserved emphasis colour — consequential ideas only */
.em { color: var(--ember); font-weight: 600; }

/* accent highlight — normal highlights, free use */
.hl { color: var(--accent); font-weight: 600; }

/* caveat / hedge / footnote block */
.note {
  border-left: 3px solid var(--ember);
  padding: 0.25em 0 0.25em 0.7em;
  margin-top: 0.9em;
  font-size: 0.66em;
  color: var(--ink-soft);
}
.note .em { font-weight: 600; }

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

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2em; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9em; align-items: stretch; }
.cols  { display: flex; gap: 1.2em; align-items: flex-start; }
.cols > * { flex: 1; min-width: 0; }

/* stat cards (adoption slide) */
.statcard {
  background: #ffffff;
  border: 1px solid #e6e5de;
  border-radius: 10px;
  padding: 0.55em 0.7em;
}
.statcard .v {
  font-family: var(--font-display);
  font-size: 1.25em;
  font-weight: 700;
  color: var(--accent);
  display: block;
  line-height: 1.1;
}
.statcard .k { font-size: 0.6em;  color: var(--ink-soft); display: block; margin-top: 0.25em; line-height: 1.3; }

/* PQ replacement columns (slide M — decided variant B, 2026-06-04) */
.pqcol { display: flex; flex-direction: column; align-items: center; text-align: center; }
.pqcol-layer {
  font-family: var(--font-display); font-weight: 600; font-size: 0.85em;
}
.pqcol-layer small {
  display: block; font-family: var(--font-body); font-weight: 500;
  font-size: 0.5em; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0.2em 0 1em;
}
.pqcol-old {
  width: 100%; box-sizing: border-box;
  background: #f1f0ea; border: 1px solid #e0dfd7; border-radius: 9px;
  padding: 0.5em 0.45em; font-size: 0.62em; font-weight: 600; color: #6a736d;
  text-decoration: line-through; text-decoration-color: var(--ink-faint);
}
.pqcol-down { font-size: 1.1em; color: var(--accent); font-weight: 700; line-height: 1; margin: 0.35em 0; }
.pqcol-new {
  width: 100%; box-sizing: border-box;
  background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 9px;
  padding: 0.5em 0.45em;
}
.pqcol-new .p { display: block; font-weight: 700; font-size: 0.66em; color: var(--accent); }
.pqcol-new .d { display: block; font-size: 0.5em; color: #3f5e4c; margin-top: 0.15em; line-height: 1.35; }

/* EIP value cards (slide U — decided variant A, 2026-06-04) */
.eipcard {
  background: #fff; border: 1px solid #e6e5de; border-radius: 12px;
  padding: 0.7em 0.8em;
}
.eipcard .eip { display: block; font-family: var(--font-mono); font-size: 0.5em; color: var(--ink-soft); }
.eipcard .eip a { color: inherit; border-bottom-color: transparent; }
.eipcard .eip a:hover { color: var(--accent); }
.eipcard .nick { display: block; font-family: var(--font-display); font-weight: 600; font-size: 0.85em; margin: 0.1em 0 0.35em; }
.eipcard .nick a { color: var(--accent); border-bottom: none; }
.eipcard .val { display: block; font-size: 0.62em; line-height: 1.45; }

/* small status chip beside a title */
.chip {
  font-family: var(--font-mono); font-size: 0.42em; color: var(--ink-soft);
  border: 1px solid #e6e5de; background: #f4f3ee;
  padding: 0.25em 0.9em; border-radius: 99px; white-space: nowrap;
}

/* ---------- slide LL · state-trie scale line ---------- */
.reveal .vs-scale { font-family: var(--font-mono); font-size: 0.5em; color: var(--ink-soft); margin: 0 0 0.9em; line-height: 1.4; }
.reveal .vs-scale b { color: var(--ink); font-weight: 500; }

/* simple clean table */
.reveal table.clean { border-collapse: collapse; font-size: 0.66em; width: 100%; }
.reveal table.clean th {
  font-family: var(--font-display); font-weight: 600; text-align: left;
  color: var(--ink-soft); font-size: 0.85em; letter-spacing: 0.06em; text-transform: uppercase;
  border-bottom: 2px solid var(--ink-faint); padding: 0.4em 0.6em;
}
.reveal table.clean td { border-bottom: 1px solid #eceae4; padding: 0.45em 0.6em; vertical-align: top; }
.reveal table.clean tr.em-row td { color: var(--ember); }

/* ---------- top-aligned layout (center:false) ----------
   Slides are top-aligned so every .eyebrow sits at the same y on every
   slide (no flicker between slides). Title/divider slides get their own
   offsets to sit comfortably lower. */

.reveal .slides > section { padding-top: 30px; }

/* ---------- interstitials (one centered phrase) ----------
   Reveal sets inline display:block on the *active* on-screen section, which
   would kill flex on the section itself; and a padding-top centering hack
   breaks in print-pdf mode (content jumps to the top-left). So we center with
   a flex INNER wrapper sized to the full 800px slide — robust on screen AND
   in the PDF. The section keeps no top padding so the inner fills the slide. */

.reveal .slides > section.interstitial { padding-top: 0; text-align: center; }
.interstitial-inner {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 800px;   /* full logical slide height → content lands at the middle */
}
.interstitial h2 { font-size: 1.7em; margin: 0; color: var(--accent); }
.interstitial .sub { font-family: var(--font-body); font-size: 0.7em; color: var(--ink-soft); margin: 0.6em 0 0; font-weight: 400; }

/* ---------- part dividers ---------- */

.reveal .slides > section.divider { text-align: left; padding-top: 180px; }
.divider .part-no {
  font-family: var(--font-display);
  font-size: 5.5em;
  font-weight: 700;
  color: var(--accent-soft);
  -webkit-text-stroke: 2px var(--accent);
  line-height: 1;
  display: block;
}
.divider h2 { font-size: 1.8em; margin-top: 0.25em; }
.divider .sub { color: var(--ink-soft); font-size: 0.78em; max-width: 26em; }

/* ---------- title slide ---------- */

.reveal .slides > section.title-slide { text-align: left; padding-top: 150px; }
.title-slide h1 { font-size: 1.62em; line-height: 1.18; margin-bottom: 0.35em; }
.title-slide .speaker { margin-top: 1.6em; font-size: 0.72em; color: var(--ink-soft); line-height: 1.5; }
.title-slide .speaker strong { color: var(--ink); }

/* ---------- QR blocks ---------- */

.qr-block { text-align: center; }
.qr-block img { width: 150px; height: 150px; border: 1px solid #e6e5de; border-radius: 8px; background: #fff; padding: 6px; }
.qr-block .qr-url {
  display: block; margin-top: 0.4em;
  font-family: var(--font-mono); font-size: 0.45em; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- figures ---------- */

.fig { display: block; margin: 0 auto; width: 100%; height: auto; }
.fig-caption { font-size: 0.55em; color: var(--ink-soft); text-align: center; margin-top: 0.5em; }

/* ---------- chrome: back arrow ---------- */

#chrome-back {
  position: fixed; top: 14px; left: 16px; z-index: 40;
  font-family: var(--font-display); font-size: 22px; line-height: 1;
  color: var(--ink-faint); text-decoration: none; border: none;
  transition: color 0.15s;
}
#chrome-back:hover { color: var(--accent); }

/* ---------- chrome: bottom slide nav ---------- */

#chrome-nav {
  position: fixed; bottom: 10px; left: 50%; transform: translateX(-50%);
  z-index: 40; display: flex; gap: 5px; flex-wrap: wrap; justify-content: center;
  max-width: 92vw;
}
#chrome-nav button {
  width: 21px; height: 21px; border-radius: 4px;
  border: 1px solid var(--ink-faint); background: transparent;
  color: var(--ink-soft); font-family: var(--font-mono); font-size: 10px;
  line-height: 1; cursor: pointer; padding: 0;
  transition: all 0.12s;
}
#chrome-nav button:hover { border-color: var(--accent); color: var(--accent); }
#chrome-nav button.active {
  background: var(--accent); border-color: var(--accent); color: #fff;
}

/* ---------- chrome: hardlink copy ---------- */

#chrome-link {
  position: fixed; bottom: 12px; right: 16px; z-index: 40;
  background: none; border: none; cursor: pointer; padding: 4px;
  color: var(--ink-faint); transition: color 0.15s;
}
#chrome-link:hover { color: var(--accent); }
#chrome-link svg { width: 17px; height: 17px; display: block; }

#chrome-toast {
  position: fixed; bottom: 48px; right: 16px; z-index: 41;
  background: var(--ink); color: var(--paper);
  font-family: var(--font-body); font-size: 13px;
  padding: 7px 13px; border-radius: 6px;
  opacity: 0; transform: translateY(4px); pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
#chrome-toast.show { opacity: 1; transform: translateY(0); }

/* ---------- fragments ---------- */

.reveal .fragment.fade-in-then-semi-out.visible:not(.current-fragment) { opacity: 0.45; }

/* ---------- print / PDF ---------- */

@media print {
  #chrome-back, #chrome-nav, #chrome-link, #chrome-toast { display: none !important; }
  /* clip the hairline bleed of the next page at the bottom edge */
  .reveal .slides .pdf-page { overflow: hidden !important; }
}

/* ---------- mobile ---------- */

@media (max-width: 640px) {
  #chrome-nav button { width: 17px; height: 17px; font-size: 8px; }
  .reveal { font-size: 26px; }
}
