/* Styles for the PDF viewer pages in view/.

   Desktop browsers render an iframed PDF with a full multi-page viewer, so the
   iframe is the default. Mobile WebKit and Chrome for Android do not: they draw
   a static preview of page 1 only. On those devices the iframe is hidden and a
   hand-off card takes over, linking straight at the PDF so the browser's own
   viewer opens it with every page. */

:root{
  --bg:#ffffff;
  --surface:#ffffff;
  --text:#232021;
  --muted:#6d6055;
  --border:rgba(35,32,33,.12);
  --shadow: 0 18px 50px rgba(35,32,33,.09);
  --link:#c41230;
  --accent:#e21833;
  --accent-soft: rgba(226,24,51,.09);
  --glow: rgba(255,213,32,.16);
  --radius: 18px;
  color-scheme: light;
}

html.dark{
  --bg:#1c2128;
  --surface:#242b33;
  --text:#d1d5db;
  --muted:#8b949e;
  --border:#353d47;
  --shadow: 0 18px 50px rgba(0,0,0,.4);
  --link:#ef4444;
  --accent:#ef4444;
  --accent-soft: rgba(239,68,68,.12);
  --glow: rgba(255,213,32,.05);
  color-scheme: dark;
}

*{ box-sizing:border-box; }
html,body{ margin:0; height:100%; }
body{ background:#525659; }

.pdfframe{ border:0; width:100%; height:100vh; display:block; }

/* Hidden until a device that cannot embed PDFs asks for it. */
.handoff{ display:none; }

@media (hover: none) and (pointer: coarse), (max-width: 820px){
  .pdfframe{ display:none; }

  body{
    background:
      radial-gradient(1000px 640px at 12% -8%, var(--glow), transparent 60%),
      radial-gradient(900px 560px at 100% 0%, var(--accent-soft), transparent 55%),
      var(--bg);
    background-attachment: fixed;
    color:var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height:1.65;
    -webkit-font-smoothing: antialiased;
  }

  a{ color:var(--link); text-decoration:none; }

  .handoff{
    display:block;
    max-width: 620px;
    margin:0 auto;
    padding: 30px 20px 60px;
  }

  .handoff .backlink{ margin:0 0 22px; }
  .handoff .backlink a{ color:var(--muted); }

  .handoff h1{
    font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, ui-serif, serif;
    font-size: clamp(1.5rem, 6vw, 2rem);
    letter-spacing:-.01em;
    line-height:1.2;
    margin:0;
  }

  .handoff .meta{ margin:8px 0 0; color:var(--muted); font-size:.94rem; }

  .handoff .btnrow{ margin:26px 0 0; }

  .handoff .btn{
    display:inline-block;
    padding: 14px 24px;
    border-radius: 999px;
    background: var(--accent);
    color:#fff;
    font-weight:600;
    box-shadow: var(--shadow);
  }

  .handoff .tip{
    margin:22px 0 0;
    padding-top:16px;
    border-top:1px solid var(--border);
    color:var(--muted);
    font-size:.9rem;
  }
}
