/* ══════════════════════════════════════════════════════════════════════════
   RoLearn Guides — shared stylesheet
   guides.rolearn.dev

   Horizontal deck. Each guide is a row of full-viewport slides you move
   through with arrow keys, on-screen controls, or a swipe. Visual language
   carries over from the OMNI-EMV onboarding sheet (light paper, Plus Jakarta
   Sans, accent-gradient hero, numbered section tags), rescaled from a print
   document to a presentation.

   Type is sized for reading at a distance, not for a printed A4 sheet: body
   copy is 17px rather than 13.5px, slide titles 46px rather than 30px.

   @media print flattens the deck back into stacked pages so File > Print
   still produces a clean PDF handout.
   ══════════════════════════════════════════════════════════════════════════ */

:root {
  --accent: #0a5eff;
  --ink: #12151c;
  --ink-2: #39404e;
  --muted: #667085;
  --muted-2: #98a1b2;
  --faint: #aeb4c2;
  --line: #eaedf3;
  --line-2: #e2e7f0;
  --panel: #f7f9fc;
  --field: #eceef4;
  --slide-max: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; overflow: hidden; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--field);
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

/* ── site header ───────────────────────────────────────────────────────── */
.site {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 64px;
  background: rgba(236, 238, 244, .86);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid #dfe3ec;
}
.site-in {
  height: 100%; max-width: 1400px; margin: 0 auto;
  padding: 0 28px; display: flex; align-items: center; gap: 18px;
}
.site-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 16px; letter-spacing: -.01em;
  color: var(--ink); text-decoration: none;
}
.site-logo img { width: 28px; height: 28px; object-fit: contain; display: block; }
.site-logo .sep { color: var(--muted-2); font-weight: 500; }
.site-nav { margin-left: auto; display: flex; gap: 4px; }
.site-nav a {
  font-size: 14.5px; font-weight: 600; color: var(--muted);
  text-decoration: none; padding: 8px 14px; border-radius: 9px;
}
.site-nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .75); }
.site-nav a[aria-current="page"] { color: var(--accent); background: #fff; }

/* ── deck ──────────────────────────────────────────────────────────────── */
/* The deck starts BELOW the fixed header rather than under it. A slide whose
   content overflows scrolls inside its own box, so tall slides can no longer
   push their eyebrow and title up behind the header bar. */
.deck {
  display: flex; width: 100%;
  height: calc(100dvh - 64px); margin-top: 64px;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none;
}
.deck::-webkit-scrollbar { display: none; }

.slide {
  flex: 0 0 100%; height: calc(100dvh - 64px);
  scroll-snap-align: center; scroll-snap-stop: always;
  display: flex; justify-content: center;
  /* `safe center` centres a slide that fits, but falls back to top alignment
     the moment content is taller than the slide. Plain `center` would push
     the overflow equally in both directions, putting the eyebrow and title
     above the scroll origin where they can never be scrolled back into view. */
  align-items: safe center;
  padding: 40px 56px 84px; overflow-y: auto; overflow-x: hidden;
}
.slide-in { width: 100%; max-width: var(--slide-max); }

/* cover slides centre their content and drop the panel look */
.slide.cover .slide-in { max-width: 980px; }

/* ── deck controls ─────────────────────────────────────────────────────── */
.ctl {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: 68px;
  display: flex; align-items: center; gap: 16px;
  padding: 0 28px;
  background: linear-gradient(to top, rgba(236, 238, 244, .96), rgba(236, 238, 244, 0));
}
.ctl-bar { flex: 1; height: 3px; background: #d8dde8; border-radius: 99px; overflow: hidden; }
.ctl-bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .25s ease; }
.ctl-count {
  font-size: 13px; font-weight: 800; color: var(--muted);
  font-variant-numeric: tabular-nums; min-width: 58px; text-align: center;
}
.ctl-btn {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 11px; cursor: pointer;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink);
  display: grid; place-items: center; font-size: 17px; line-height: 1;
  box-shadow: 0 2px 8px rgba(20, 30, 56, .07);
}
.ctl-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.ctl-btn:disabled { opacity: .32; cursor: default; }
.ctl-hint { font-size: 12.5px; color: var(--muted-2); }

/* ── type ──────────────────────────────────────────────────────────────── */
h1 { font-weight: 800; font-size: 46px; letter-spacing: -.025em; line-height: 1.06; }
h2 { font-weight: 800; font-size: 30px; letter-spacing: -.02em; line-height: 1.15; }
.sec-tag {
  font-size: 12px; font-weight: 800; letter-spacing: .14em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 14px;
}
.block-h { font-size: 21px; font-weight: 800; letter-spacing: -.01em; margin: 26px 0 12px; }
.block-h:first-child { margin-top: 0; }
.sub { font-size: 16px; color: var(--muted); margin: 10px 0 18px; line-height: 1.5; }
.prose { font-size: 17px; line-height: 1.62; color: var(--ink-2); }
.prose + .prose { margin-top: 12px; }
.lead { font-size: 27px; line-height: 1.4; font-weight: 600; color: var(--ink); letter-spacing: -.015em; }
.lead .hl { background: color-mix(in srgb, var(--accent) 20%, #fff); padding: 0 6px; border-radius: 5px; }
.sec-div { height: 1px; background: var(--line); margin: 26px 0; }
b, strong { font-weight: 700; color: var(--ink); }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .86em; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, #fff);
  border-radius: 6px; padding: 1px 6px;
  /* Never break a UI label across lines: a wrapped chip renders as a tall
     two-line box that shoves the surrounding sentence out of alignment. */
  white-space: nowrap;
}
a { color: var(--accent); }

/* ── hero ──────────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 26px;
  padding: 42px 44px; border-radius: 22px; color: var(--ink);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 58%, #fff), color-mix(in srgb, var(--accent) 86%, #fff));
  box-shadow: 0 20px 46px color-mix(in srgb, var(--accent) 26%, transparent);
}
.hero::before {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 290px; height: 290px; border-radius: 50%; background: rgba(255, 255, 255, .20);
}
.hero::after {
  content: ""; position: absolute; right: 96px; bottom: -120px;
  width: 240px; height: 240px; border-radius: 50%; background: rgba(255, 255, 255, .15);
}
.hero > * { position: relative; z-index: 1; }
.hero-mark {
  width: 86px; height: 86px; border-radius: 22px; flex-shrink: 0;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .55); box-shadow: 0 6px 18px rgba(0, 0, 0, .10);
}
.hero-mark img { width: 52px; height: 52px; object-fit: contain; display: block; }
.hero-eyebrow {
  font-size: 13px; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(18, 21, 28, .70); margin-bottom: 10px;
}
.hero-sub { font-size: 17px; color: rgba(18, 21, 28, .82); margin-top: 14px; max-width: 660px; line-height: 1.55; }

/* ── cards / grids ─────────────────────────────────────────────────────── */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.ch {
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px;
  padding: 20px; display: flex; align-items: flex-start; gap: 16px;
}
.ch .emo {
  font-size: 15px; font-weight: 800; width: 50px; height: 50px; flex-shrink: 0;
  display: grid; place-items: center; background: #fff;
  border: 1px solid var(--line-2); border-radius: 13px; color: var(--accent);
}
.ch .cn { font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.ch .cs { font-size: 14.5px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.ch .cv { margin-left: auto; text-align: right; flex-shrink: 0; }
.ch .cv b { font-size: 22px; font-weight: 800; display: block; letter-spacing: -.02em; }
.ch .cv span { font-size: 12px; color: var(--muted-2); }

/* a named feature: title, one-line promise, then prose */
.tool { padding: 20px 0; border-bottom: 1px solid var(--line); }
.tool:last-child { border-bottom: 0; }
.tool .tn { font-size: 21px; font-weight: 800; letter-spacing: -.015em; }
.tool .tp { font-size: 16px; font-weight: 700; color: var(--accent); margin: 5px 0 9px; }

/* ── callouts ──────────────────────────────────────────────────────────── */
.callout {
  background: color-mix(in srgb, var(--accent) 8%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, #fff);
  border-radius: 14px; padding: 20px 22px; margin: 18px 0;
}
.callout .ct { font-weight: 800; font-size: 17px; margin-bottom: 6px; }
.callout .cd { font-size: 16px; color: var(--ink-2); line-height: 1.58; }
.callout.warn { background: #fff8ec; border-color: #f2d6a0; }
.callout.warn .ct { color: #8a5400; }

/* ── lists ─────────────────────────────────────────────────────────────── */
/* The bullet is an absolutely-positioned pseudo-element, NOT a flex item.
   With `display:flex` on the li, every inline child (a <b>, a <code>, each
   text node) becomes its own flex item and picks up the row gap, which
   scattered gaps mid-sentence and forced chips onto their own line. */
.reclist { list-style: none; margin-top: 6px; }
.reclist li {
  position: relative; padding-left: 26px;
  font-size: 17px; line-height: 1.6; color: var(--ink-2);
}
.reclist li + li { margin-top: 13px; }
.reclist li::before {
  content: ""; position: absolute; left: 0; top: .66em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}

.steps { list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.steps li {
  counter-increment: s; position: relative; padding-left: 44px;
  font-size: 17px; line-height: 1.55; color: var(--ink-2);
}
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -1px;
  width: 29px; height: 29px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  color: var(--accent); font-size: 14px; font-weight: 800;
  display: grid; place-items: center;
}

/* ── table ─────────────────────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; margin-top: 20px; }
.tbl {
  width: 100%; font-size: 16.5px; background: #fff;
  border: 1px solid var(--line-2); border-radius: 14px;
  border-collapse: separate; border-spacing: 0; overflow: hidden;
}
.tbl th {
  text-align: left; background: var(--panel);
  font-size: 11.5px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase;
  color: var(--muted-2); padding: 13px 20px; border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
.tbl td {
  padding: 16px 20px; border-bottom: 1px solid var(--line);
  vertical-align: top; line-height: 1.5; color: var(--ink-2);
}
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:nth-child(even) td { background: #fbfcfe; }
/* label column: the row's name, held on one line so the prose column wraps */
.tbl td.k { font-weight: 800; color: var(--ink); white-space: nowrap; width: 205px; }
/* day column: the checklist marker, centred against a multi-line task */
.tbl td.day {
  width: 104px; white-space: nowrap; vertical-align: middle;
  font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent);
}
.tbl td.task { vertical-align: middle; color: var(--ink); }

/* ── layer strip ───────────────────────────────────────────────────────── */
.layers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.layer { background: var(--panel); border: 1px solid var(--line-2); border-radius: 13px; padding: 18px; text-align: center; }
.layer .ll { font-size: 22px; font-weight: 800; color: var(--accent); letter-spacing: -.02em; }
.layer .ld { font-size: 14px; color: var(--muted); margin-top: 5px; line-height: 1.4; }

/* ── stats ─────────────────────────────────────────────────────────────── */
.stats { display: flex; gap: 46px; flex-wrap: wrap; margin-top: 30px; }
.stat .sv { font-size: 44px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.stat .sl {
  font-size: 11.5px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted-2); margin-top: 7px;
}

/* ── hub cards ─────────────────────────────────────────────────────────── */
.hub { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 8px; }
.hubcard {
  display: block; text-decoration: none; color: inherit;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px;
  padding: 30px; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.hubcard:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, #fff);
  box-shadow: 0 10px 28px rgba(20, 30, 56, .09); transform: translateY(-3px);
}
.hubcard .hc-tag { font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.hubcard .hc-t { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 12px 0 10px; }
.hubcard .hc-d { font-size: 16px; color: var(--muted); line-height: 1.58; }
.hubcard .hc-go { font-size: 16px; font-weight: 700; color: var(--accent); margin-top: 20px; }

/* the hub is a single scrollable page, not a deck */
.solo { height: 100dvh; overflow-y: auto; padding: 96px 28px 56px; }
.solo-in { max-width: var(--slide-max); margin: 0 auto; }

.tag {
  display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; padding: 4px 11px; border-radius: 99px;
  background: var(--line); color: var(--muted);
}

/* ── responsive ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  body { font-size: 16px; }
  .slide { padding: 84px 24px 88px; }
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
  .lead { font-size: 21px; }
  .prose, .reclist li, .steps li { font-size: 16px; }
  .tbl { font-size: 15.5px; }
  .tbl th, .tbl td { padding: 13px 14px; }
  .tbl td.k, .tbl td.day { width: auto; }
  .hero { flex-direction: column; align-items: flex-start; padding: 28px; gap: 18px; }
  .hero-mark { width: 64px; height: 64px; border-radius: 17px; }
  .hero-mark img { width: 38px; height: 38px; }
  .hero-sub { font-size: 15.5px; }
  .pair, .trio, .hub { grid-template-columns: 1fr; }
  .layers { grid-template-columns: 1fr 1fr; }
  .stats { gap: 26px; }
  .stat .sv { font-size: 34px; }
  .site-logo .full { display: none; }
  .ctl-hint { display: none; }
  .tbl td.k { width: auto; }
}

/* ── print: flatten the deck into pages ────────────────────────────────── */
@media print {
  html, body { height: auto; overflow: visible; background: #fff; }
  .site, .ctl, .no-print { display: none !important; }
  .deck {
    display: block; height: auto; overflow: visible;
  }
  .slide {
    display: block; height: auto; min-height: 0;
    padding: 24px 26px; page-break-after: always; overflow: visible;
  }
  .slide:last-child { page-break-after: auto; }
  .slide-in { max-width: none; }
  .solo { height: auto; overflow: visible; padding: 24px 26px; }
  .hero { box-shadow: none; }
  h1 { font-size: 30px; }
  .lead { font-size: 19px; }
  .prose, .reclist li, .steps li, .callout .cd { font-size: 12.5px; }
  .tbl { font-size: 12px; }
  .tbl th, .tbl td { padding: 8px 10px; }
  a { color: var(--ink); text-decoration: none; }
}
