/* Fedimint talk theme, extracted from "BTC++ Riga 2025 - Privacy Beyond Bitcoin"
   (Google Slides, 720x405pt; 1pt = 2.6667px at 1920x1080). See THEME.md.
   Layout mechanics (size, scaling, show/hide, print) live in ../engine/deck.css. */
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Caveat:wght@700&display=swap");

:root {
  /* palette: ink/accent/status colours are the exact hex values used in the source deck */
  --bg: #07141a;        /* centre of background.jpg; solid fallback */
  --bg-raised: #0f2229; /* panels / table header tint, sits on the gradient */
  --ink: #eaf5ed;       /* all body + heading text in the source */
  --muted: #93a5a1;     /* ink blended ~60% into bg (not in source) */
  --accent: #4dd0e1;    /* link / e-mail colour in the source */
  --accent2: #0793d5;   /* mid blue of the logo's dots */
  --logo-cyan: #03d9fc; /* logo heptagon */
  --logo-blue: #0c60b7; /* logo dots, dark end */
  --btc: #f7931a;       /* Bitcoin orange, used for the big "?" in the source */
  --good: #93c47d;      /* source deck's green status text */
  --bad: #e06666;       /* source deck's red status text */
  --warn: #f6b26b;      /* source deck's amber annotations */
  --grid: #26363b;      /* chart gridlines: ink at ~15% over bg */

  --font-head: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-hand: "Caveat", cursive; /* hand-written annotations in the source */

  /* type scale (px at 1920x1080), from the source's pt sizes */
  --fs-h1: 139px;      /* 52pt  title slide */
  --fs-sub: 75px;      /* 28pt  title slide subtitle */
  --fs-section: 128px; /* 48pt  section divider */
  --fs-quote: 109px;   /* 41pt  quote slide */
  --fs-lg: 69px;       /* 26pt  large bullets ("call to action" slide) */
  --fs-h2: 67px;       /* 25.2pt content slide title */
  --fs-body: 48px;     /* 18pt  body / bullets */
  --fs-small: 37px;    /* 14pt  sub-bullets */
  --fs-source: 26px;   /* footnotes */

  --pad-x: 83px;       /* left edge of titles, body and footer logo */
}

/* ---------- slide base ---------- */
.slide {
  /* the source stretches a 2500x1363 image to 16:9; reproduce that exactly */
  background: var(--bg) url("background.jpg") 0 0 / 100% 100% no-repeat;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.385;
  padding: 110px var(--pad-x) 120px;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}
.slide aside.notes { display: none; }

/* footer logo: 205x46px at (83, 988) on every slide except the title slide */
.slide::after {
  content: "";
  position: absolute;
  left: var(--pad-x); top: 988px;
  width: 205px; height: 46px;
  background: url("fedimint-logo.png") 0 0 / contain no-repeat;
  pointer-events: none;
}
.slide.title::after, .slide.no-logo::after { display: none; }

/* slide number, bottom right, on the logo's baseline */
.slide::before {
  content: attr(data-num);
  position: absolute;
  right: var(--pad-x); top: 988px;
  height: 46px; line-height: 46px;
  font-size: 28px; color: var(--muted);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.slide.title::before { display: none; }

.slide * { box-sizing: border-box; }
.slide a { color: var(--accent); text-decoration: underline; text-underline-offset: .12em; text-decoration-thickness: .06em; }
.slide strong, .slide b { font-weight: 700; }
.slide em { font-style: normal; color: var(--accent); }
.slide code, .slide .mono { font-family: var(--font-mono); font-size: .86em; }
.slide p { margin: 0 0 .45em; }
.slide .muted { color: var(--muted); }
.slide .accent { color: var(--accent); }
.slide .hand { font-family: var(--font-hand); font-weight: 700; color: var(--warn); }

/* ---------- content slide ---------- */
.slide h2 {
  font-family: var(--font-head);
  font-size: var(--fs-h2);
  font-weight: 400;
  line-height: 1.28;           /* box top = 110px, baseline ~176px as in the source */
  letter-spacing: 0;
  margin: 0 0 60px;            /* first body line box starts ~256px */
  color: var(--ink);
}

.slide ul, .slide ol { margin: 0 0 .3em; padding: 0 0 0 96px; list-style: none; }
.slide li { position: relative; margin: 0; }
.slide ul > li::before {
  content: "\25CF";            /* ● (Arial in the source) */
  font-family: Arial, "Liberation Sans", sans-serif;
  position: absolute; left: -77px; top: 0;
  font-size: 1em; line-height: inherit;
}
.slide ol { counter-reset: li; }
.slide ol > li { counter-increment: li; }
.slide ol > li::before {
  content: counter(li) ".";
  position: absolute; left: -77px; color: var(--accent);
}
.slide li ul, .slide li ol { font-size: var(--fs-small); padding-left: 96px; margin: 0; }
.slide li ul > li::before { content: "\25CB"; left: -70px; }  /* ○ */
.slide ul.lg { font-size: var(--fs-lg); }
.slide ul.lg > li + li { margin-top: 26px; }
.slide ul.lg > li::before { left: -89px; }

.slide .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.slide .cols > * { min-width: 0; }
/* side-by-side comparison: two columns of +/− rows, a narrow middle column for arrows between paired rows */
.slide .vs { display: grid; grid-template-columns: 1fr 120px 1fr; column-gap: 24px; row-gap: 34px; align-items: center; margin-top: 20px; }
.slide .vs > .h { font-family: var(--font-head); font-size: var(--fs-lg); font-weight: 700; padding-bottom: 6px; border-bottom: 2px solid var(--muted); }
.slide .vs > .pro, .slide .vs > .con { position: relative; padding-left: 56px; }
.slide .vs > .pro::before, .slide .vs > .con::before { position: absolute; left: 0; top: 0; width: 40px; text-align: center; font-weight: 700; }
.slide .vs > .pro::before { content: "+"; color: var(--good); }
.slide .vs > .con::before { content: "\2212"; color: var(--bad); }
.slide .vs > .arrow { display: block; width: 100%; height: 40px; }
/* diagram on the left, text on the right */
.slide .fig-left { display: grid; grid-template-columns: .8fr 1fr; gap: 80px; align-items: center; }
.slide .fig-left > * { min-width: 0; }
.slide .fig-left > svg { display: block; width: 100%; height: auto; max-height: 690px; }
/* screenshot on the right, a few words on the left */
.slide .shot-right { display: grid; grid-template-columns: 1fr auto; gap: 80px; align-items: center; }
.slide .shot { display: block; max-height: 740px; max-width: 100%; border-radius: 14px; border: 2px solid var(--grid); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.slide .lead { font-size: var(--fs-lg); line-height: 1.2; margin: 0; }
.slide .url { font-family: var(--font-mono); font-size: var(--fs-body); color: var(--accent); margin: 40px 0 0; }

.slide figure, .slide .fig { margin: 0; display: flex; flex-direction: column; align-items: center; }
.slide figure svg, .slide .fig svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.slide figure > img, .slide .fig > img { max-width: 100%; display: block; }
.slide figcaption {
  font-size: 30px; line-height: 1.35; color: var(--muted);
  margin-top: 18px; text-align: center; max-width: 1500px;
}
/* SVG defaults so charts inherit the brand. Set via inheritance on <svg> (not on
   <text>) so fill="..." attributes on individual elements still win. */
.slide svg { fill: var(--ink); font-family: var(--font-body); }

.slide .big {
  font-family: var(--font-head);
  font-size: 200px; line-height: 1; font-weight: 500; white-space: nowrap;
  letter-spacing: -.02em; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.slide .grid4 .big { font-size: 150px; }
.slide .big-label { font-size: var(--fs-body); color: var(--muted); margin-top: 12px; line-height: 1.3; }
/* block centred in the space between the title and the footer */
.slide .vcenter { position: absolute; left: var(--pad-x); right: var(--pad-x); top: 50%; transform: translateY(-40%); }
.slide .big-sub { font-size: var(--fs-small); color: var(--muted); opacity: .75; margin-top: 20px; line-height: 1.3; }

.slide .source {
  position: absolute;
  left: 340px; right: 340px; bottom: 46px;  /* baseline row of the footer logo; symmetric so it centres on the slide */
  font-size: var(--fs-source); line-height: 1.3; color: var(--muted);
  margin: 0; text-align: center;
}
.slide .source a { color: var(--muted); }

.slide table {
  border-collapse: collapse;
  font-size: var(--fs-small);
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.slide th, .slide td { padding: 10px 28px; text-align: left; border-bottom: 2px solid var(--grid); }
.slide th { font-weight: 700; color: var(--ink); border-bottom-color: var(--muted); }
.slide td.num, .slide th.num { text-align: right; }
/* roomy table: every body row as tall as a two-line cell */
.slide table.roomy tbody th, .slide table.roomy tbody td { height: 118px; }
.slide tbody tr:last-child td { border-bottom: 0; }

/* status chips */
.slide .works, .slide .leaks, .slide .open {
  display: inline-block;
  font-size: .78em; font-weight: 600; line-height: 1.25;
  padding: .06em .42em .1em;
  border-radius: .3em;
  border: .08em solid currentColor;
  vertical-align: .08em;
  white-space: nowrap;
}
.slide .works { color: var(--good); background: color-mix(in srgb, var(--good) 16%, transparent); }
.slide .leaks { color: var(--bad);  background: color-mix(in srgb, var(--bad) 16%, transparent); }
.slide .open  { color: var(--warn); background: color-mix(in srgb, var(--warn) 16%, transparent); }

/* large Fedimint wordmark as used as a hero on slide 2 of the source (1088x247 at 416,112) */
.slide .brand-logo {
  display: block; width: 1088px; height: 247px; margin: 0 auto;
  background: url("fedimint-logo.png") center / contain no-repeat;
}

/* ---------- title slide ---------- */
.slide.title {
  display: none;
  text-align: center;
  padding: 400px 60px 88px;
  flex-direction: column; align-items: center;
}
.slide.title.current, body.all .slide.title, .theme-sample .slide.title { display: flex; }
@media print { .slide.title { display: flex !important; } }
.slide.title h1 {
  font-family: var(--font-head);
  font-size: var(--fs-h1); font-weight: 400;
  line-height: 1.28; margin: 0;   /* box 400-577, baseline ~536 */
}
.slide.title .subtitle { font-size: var(--fs-sub); line-height: 1.28; margin: 34px 0 0; }
/* closing slide: small lead-in, large takeaway */
.slide.title.closing { padding-top: 250px; }
.slide.title.closing h1 { font-size: var(--fs-sub); color: var(--muted); }
.slide.title.closing .subtitle { font-size: var(--fs-h1); line-height: 1.2; margin-top: 60px; }
.slide.title .speaker {
  margin: auto 0 0; font-size: 53px; line-height: 1.28; color: var(--accent);
}
.slide.title .event { margin: 10px 0 -57px; /* hangs below so .speaker keeps the source position */ font-size: var(--fs-small); line-height: 1.28; color: var(--muted); }

/* ---------- section divider ---------- */
.slide.section {
  display: none;
  flex-direction: column; justify-content: center;
  padding: 0 89px 30px;           /* h2 box centred ~525px as in the source */
}
.slide.section.current, body.all .slide.section, .theme-sample .slide.section { display: flex; }
@media print { .slide.section { display: flex !important; } }
.slide.section h2 { font-size: var(--fs-section); line-height: 1.28; margin: 0; }
.slide.section .kicker {
  font-size: var(--fs-body); line-height: 1.28; color: var(--muted);
  text-transform: uppercase; letter-spacing: .12em;
  /* negative top margin = own height + gap, so the h2 stays where the source puts it */
  margin: -77px 0 16px;
}
.slide.section p:not(.kicker) { margin: 24px 0 0; color: var(--muted); }

/* ---------- quote ---------- */
.slide.quote {
  display: none;
  flex-direction: column; justify-content: center;
  padding: 0 160px 30px 89px;
}
.slide.quote.current, body.all .slide.quote, .theme-sample .slide.quote { display: flex; }
@media print { .slide.quote { display: flex !important; } }
.slide.quote blockquote {
  margin: 0; font-size: var(--fs-quote); line-height: 1.2; font-weight: 400;
}
.slide.quote cite {
  display: block; margin: 48px 0 -110px;  /* keeps the quote itself centred as in the source */
  font-style: normal; font-size: var(--fs-body); line-height: 1.3; color: var(--muted);
}
.slide.quote cite::before { content: "\2014\2002"; }
/* centred statement: symmetric padding, centred text */
.slide.quote.centered { padding: 0 120px 30px; }
.slide.quote.centered blockquote { text-align: center; }
/* quote on the left, figure on the right */
.slide.quote .split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: center; }
.slide.quote .split blockquote { font-size: 88px; }
.slide.quote .kicker { font-size: var(--fs-body); color: var(--muted); text-transform: uppercase; letter-spacing: .12em; margin: 0 0 32px; }
.slide.quote .split svg { display: block; width: 100%; height: auto; }

/* ---------- math (KaTeX) ---------- */
.slide .katex { font-size: 1.02em; }
.slide .katex-display { margin: 24px 0 40px; }
.slide .katex-display > .katex { font-size: 1.45em; }
.slide .fig.compact svg { height: 340px; width: auto; max-width: 100%; margin-top: 40px; }
/* math placed inside SVG diagrams via <foreignObject> */
.slide svg .svgmath { font-family: var(--font-body); font-size: 40px; line-height: 1.2; color: var(--ink); text-align: center; }
.slide svg .svgmath.bad { color: var(--bad); }
.slide svg .svgmath.warn { color: var(--warn); }
.slide svg .svgmath.accent { color: var(--accent); }
