:root {
  --ink: #06111b;
  --surface: #0b1a27;
  --line: rgba(188, 215, 230, .24);
  --paper: #f3f0e9;
  --muted: #b4c1c9;
  --orange: #ff6519;
  --cyan: #6ed7df;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--paper); font-family: Arial, Helvetica, sans-serif; }

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(130px, 260px) minmax(262px, 1fr);
  gap: 20px;
  align-items: center;
  padding: 12px clamp(16px, 4vw, 56px);
  background: rgba(6, 17, 27, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand { display: inline-flex; flex-direction: column; width: max-content; color: var(--paper); text-decoration: none; font-size: 9px; font-weight: 700; letter-spacing: .32em; line-height: .95; }
.brand-mark { color: var(--paper); font-size: 16px; letter-spacing: .06em; }
.brand span:last-child { color: var(--orange); padding-left: 2px; }
.progress-wrap { justify-self: center; width: 100%; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-align: center; }
.progress-track { height: 2px; margin-top: 7px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.progress-track i { display: block; width: 4%; height: 100%; background: linear-gradient(90deg, var(--orange), var(--cyan)); transition: width .22s ease; }
nav { justify-self: end; display: flex; align-items: center; }
.courses-cta { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 18px; border: 1px solid var(--orange); background: var(--orange); color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 800; letter-spacing: .015em; white-space: nowrap; box-shadow: 0 8px 20px rgba(255, 101, 25, .18); transition: background .16s ease, color .16s ease, transform .16s ease; }
.courses-cta span { font-size: 18px; line-height: .8; }
.courses-cta:hover { background: transparent; color: var(--orange); transform: translateY(-1px); }

main { padding: 20px clamp(12px, 3vw, 36px) 42px; }
.pages { max-width: 920px; margin: 0 auto; display: grid; gap: clamp(14px, 2vw, 26px); }
.guide-page { position: relative; width: 100%; overflow: hidden; background: var(--surface); box-shadow: 0 16px 42px rgba(0, 0, 0, .28); }
.guide-page img { display: block; width: 100%; height: auto; background: var(--surface); }
.page-hotspot { position: absolute; z-index: 2; display: block; border: 0; outline: 0; }
.page-hotspot:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.page-number { position: absolute; right: 12px; bottom: 10px; padding: 5px 7px; background: rgba(6, 17, 27, .76); color: var(--muted); font-size: 11px; letter-spacing: .08em; }
footer { max-width: 920px; margin: 0 auto; padding: 32px clamp(16px, 3vw, 36px) 46px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 13px; }
footer a { color: var(--orange); font-weight: 700; text-decoration: none; }

.scroll-cue {
  position: fixed;
  z-index: 9;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid rgba(110, 215, 223, .28);
  border-radius: 999px;
  background: rgba(6, 17, 27, .90);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .05);
  color: var(--paper);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1;
  pointer-events: none;
  transform: translateX(-50%);
  opacity: 1;
  backdrop-filter: blur(14px);
  transition: opacity .22s ease, transform .22s ease;
}
.scroll-cue::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 10px rgba(255, 101, 25, .7); }
.scroll-cue-arrow { color: var(--orange); font-size: 17px; line-height: .8; animation: scroll-cue-nudge 1.35s ease-in-out 2; }
.scroll-cue.is-hidden { opacity: 0; transform: translate(-50%, 8px); }

@keyframes scroll-cue-nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

@media (max-width: 680px) {
  .topbar { grid-template-columns: 1fr auto; gap: 9px; min-height: 60px; padding: 9px max(14px, env(safe-area-inset-right)) 9px max(14px, env(safe-area-inset-left)); }
  .progress-wrap { display: none; }
  .courses-cta { min-height: 42px; padding: 8px 11px; font-size: 12px; }
  .courses-cta span { font-size: 16px; }
  main { padding: 0 0 28px; }
  .pages { width: 100%; max-width: none; gap: 10px; }
  .guide-page { box-shadow: none; }
  .page-number { right: 8px; bottom: 8px; }
  footer { flex-direction: column; gap: 12px; padding-top: 24px; }
  .scroll-cue { bottom: max(13px, env(safe-area-inset-bottom)); min-height: 40px; padding: 8px 13px; font-size: 11px; }
}

@media (min-width: 681px) and (max-width: 900px) and (orientation: landscape) {
  main { padding: 0 0 34px; }
  .pages { width: 100%; max-width: none; gap: 10px; }
  .guide-page { box-shadow: none; }
  .page-number { right: 8px; bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue, .scroll-cue-arrow { animation: none; transition: none; }
}

/* DDS adapter: retain accepted R3 reading surface and mobile full-width pages. */
.topbar { grid-template-columns: auto minmax(100px, 1fr) auto; }
nav { gap: 12px; }
.download-cta { color: var(--paper); font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; padding: 12px 2px; }
.draft-note { padding: 9px 16px; text-align: center; background: #142631; color: var(--muted); font-size: 11px; }
.noscript-note { padding: 24px; text-align: center; }
.noscript-note a { color: var(--orange); }
@media (max-width: 680px) { .topbar { grid-template-columns: auto 1fr; gap: 10px; } nav { gap: 10px; } .download-cta { font-size: 11px; } .courses-cta { padding: 9px; font-size: 11px; } .brand-mark { font-size: 14px; } .brand { font-size: 8px; } }
@media (max-width: 360px) { nav { gap: 6px; } .download-cta { font-size: 10px; } .courses-cta { padding: 8px 6px; font-size: 10px; } }

/* Founder revision17Oct: equal-height, high-contrast PDF action. */
.download-cta { display:inline-flex; align-items:center; justify-content:center; min-height:44px; min-width:180px; padding:10px 18px; border:1px solid #f3f0e9; background:#f3f0e9; color:#06111b; font-size:13px; font-weight:800; letter-spacing:.015em; box-shadow:0 5px 16px rgba(0,0,0,.16); }
.download-cta:hover { background:#fff; border-color:#fff; }
.download-cta:focus-visible { outline:3px solid #6ed7df; outline-offset:3px; }
@media (max-width:680px) {
 .topbar { grid-template-columns:1fr; gap:9px; }
 .topbar nav { width:100%; display:grid; grid-template-columns:1fr 1fr; gap:10px; justify-self:stretch; }
 .download-cta,.courses-cta { min-height:44px; min-width:0; padding:10px 8px; font-size:12px; justify-content:center; }
}
@media (max-width:360px) { .download-cta,.courses-cta { font-size:11px; } }
