/* PointerPop docs — shared styles for guide / help / install pages.
   Same Poolside riso tokens and components as index.html. */

@font-face {
  font-family: 'Fredoka';
  src: url('Fredoka.ttf') format('truetype');
  font-weight: 300 700;
  font-display: swap;
}
:root {
  --pp-bg: #F2EDE3; --pp-surface: #FAF7F0;
  --pp-ink: #0078BF; --pp-ink-soft: rgba(0,120,191,.7);
  --pp-blue: #0078BF; --pp-aqua: #5EC8E5; --pp-coral: #FF8E91;
  --pp-well: #DCE3DC; --pp-shadow: #0078BF;
}
[data-theme="ink"] {
  --pp-bg: #143A52; --pp-surface: #1B4763;
  --pp-ink: #F2EDE3; --pp-ink-soft: rgba(242,237,227,.7);
  --pp-blue: #5EC8E5; --pp-aqua: #5EC8E5; --pp-coral: #FF8E91;
  --pp-well: #0E2B3E; --pp-shadow: #0A2233;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--pp-bg);
  color: var(--pp-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-weight: 500;
  line-height: 1.55;
}
h1, h2, h3, h4, .wordmark { font-family: 'Fredoka', sans-serif; font-weight: 600; line-height: 1.15; }
a { color: var(--pp-blue); }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 24px; }

/* header (same as index) */
header { padding: 20px 0; }
header .wrap { display: flex; align-items: center; gap: 14px; }
header img { width: 44px; height: 44px; }
.wordmark { font-size: 26px; letter-spacing: .2px; color: var(--pp-ink); text-decoration: none; display: flex; align-items: center; gap: 14px; }
nav { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 15px; }
nav a { text-decoration: none; font-weight: 600; }
nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; color: var(--pp-coral); }
#themeToggle {
  cursor: pointer; border: 2px solid var(--pp-ink); background: var(--pp-surface);
  color: var(--pp-ink); border-radius: 8px; padding: 5px 12px; font: inherit;
  font-weight: 700; box-shadow: 2px 2px 0 var(--pp-shadow);
}

/* page title block */
.page-head { padding: 30px 0 8px; }
.page-head h1 { font-size: clamp(32px, 5vw, 44px); margin-bottom: 10px; }
.page-head h1 em { font-style: normal; color: var(--pp-coral); }
.page-head p.sub { font-size: 17px; color: var(--pp-ink-soft); max-width: 640px; }

/* buttons (same as index) */
.btn {
  display: inline-block; text-decoration: none; font-family: 'Fredoka', sans-serif;
  font-weight: 600; font-size: 17px; padding: 13px 26px; border-radius: 10px;
  border: 2px solid var(--pp-ink); box-shadow: 3px 3px 0 var(--pp-shadow);
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--pp-shadow); }
.btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--pp-shadow); }
.btn-primary { background: var(--pp-blue); color: var(--pp-bg); }
[data-theme="ink"] .btn-primary { color: #143A52; }
.btn-secondary { background: var(--pp-surface); color: var(--pp-ink); }

/* sections + cards */
section { padding: 36px 0 4px; }
section h2 { font-size: clamp(24px, 4vw, 30px); margin-bottom: 8px; }
section > .wrap > p.lead, .lead { color: var(--pp-ink-soft); font-size: 16px; margin-bottom: 20px; max-width: 640px; }
.card {
  background: var(--pp-surface); border: 2px solid var(--pp-ink); border-radius: 12px;
  box-shadow: 3px 3px 0 var(--pp-shadow); padding: 24px; margin-bottom: 20px;
}
.card h3 { font-size: 20px; margin-bottom: 8px; }
.card h4 { font-size: 16px; margin: 16px 0 6px; }
.card p, .card li { font-size: 15px; color: var(--pp-ink-soft); margin-bottom: 8px; }
.card ul, .card ol { padding-left: 22px; margin-bottom: 8px; }
.card .emoji { font-size: 26px; display: block; margin-bottom: 8px; }
.card strong { color: var(--pp-ink); }

/* mini table of contents chips */
.toc { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 6px; }
.toc a {
  background: var(--pp-surface); border: 2px solid var(--pp-ink); border-radius: 999px;
  padding: 7px 16px; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 14px;
  box-shadow: 2px 2px 0 var(--pp-shadow); text-decoration: none; color: var(--pp-ink);
}
.toc a:hover { background: var(--pp-aqua); color: #143A52; }

/* kbd (same as index) */
kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 30px; padding: 0 8px;
  background: var(--pp-surface); border: 2px solid var(--pp-ink); border-radius: 8px;
  box-shadow: 0 3px 0 var(--pp-shadow);
  font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 14px; color: var(--pp-ink);
  vertical-align: middle;
}
kbd.c-r { color: #D9534F; } kbd.c-o { color: #E8853D; } kbd.c-y { color: #C9A227; }
kbd.c-g { color: #3E8E5A; } kbd.c-b { color: #0078BF; } kbd.c-p { color: #9B59B6; }
[data-theme="ink"] kbd.c-b { color: #5EC8E5; }

/* callouts */
.tip, .note, .warn {
  border: 2px solid var(--pp-ink); border-left-width: 10px; border-radius: 12px;
  background: var(--pp-surface); box-shadow: 3px 3px 0 var(--pp-shadow);
  padding: 16px 20px; font-size: 15px; margin: 16px 0; color: var(--pp-ink-soft);
}
.tip strong, .note strong, .warn strong { font-family: 'Fredoka', sans-serif; color: var(--pp-ink); }
.note { border-left-color: var(--pp-aqua); }
.warn { border-left-color: var(--pp-coral); }

/* numbered step list */
.steps { list-style: none; counter-reset: step; margin: 10px 0; padding: 0; }
.steps > li {
  counter-increment: step; position: relative; padding: 0 0 18px 56px;
  font-size: 15px; color: var(--pp-ink-soft);
}
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  background: var(--pp-coral); color: #143A52; border: 2px solid var(--pp-ink);
  border-radius: 50%; box-shadow: 2px 2px 0 var(--pp-shadow);
  font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 17px;
}
.steps > li:not(:last-child)::after {
  content: ""; position: absolute; left: 18px; top: 40px; bottom: 2px;
  border-left: 2px dashed var(--pp-ink-soft);
}
.steps h3 { font-size: 17px; margin-bottom: 4px; color: var(--pp-ink); }
.steps p { margin-bottom: 6px; }
.steps ul { padding-left: 20px; margin: 4px 0 6px; }

/* tables */
.tablewrap { overflow-x: auto; margin: 14px 0; }
table.keys {
  border-collapse: separate; border-spacing: 0; width: 100%; min-width: 420px;
  background: var(--pp-surface); border: 2px solid var(--pp-ink); border-radius: 12px;
  box-shadow: 3px 3px 0 var(--pp-shadow); overflow: hidden;
}
table.keys th, table.keys td {
  text-align: left; padding: 10px 16px; font-size: 14px;
  border-bottom: 2px solid var(--pp-well);
}
table.keys th {
  font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 15px;
  color: var(--pp-ink); border-bottom: 2px solid var(--pp-ink);
}
table.keys td { color: var(--pp-ink-soft); }
table.keys tr:last-child td { border-bottom: none; }

/* faq details (same as index) */
details {
  background: var(--pp-surface); border: 2px solid var(--pp-ink); border-radius: 12px;
  box-shadow: 3px 3px 0 var(--pp-shadow); padding: 16px 22px; margin-bottom: 14px;
}
details summary {
  cursor: pointer; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 17px;
  list-style: none;
}
details summary::before { content: "✦ "; color: var(--pp-coral); }
details p, details li { margin-top: 10px; font-size: 15px; color: var(--pp-ink-soft); }
details ul, details ol { padding-left: 22px; }
details code { font-size: 13px; }

code {
  background: var(--pp-well); border-radius: 6px; padding: 1px 6px;
  font-size: 13px; color: var(--pp-ink);
}

/* prev/next cross links */
.crosslinks { display: flex; flex-wrap: wrap; gap: 14px; margin: 34px 0 0; }
.crosslinks a { flex: 1 1 220px; text-decoration: none; }
.crosslinks .card { margin-bottom: 0; height: 100%; }
.crosslinks .card p { margin-bottom: 0; }

footer { margin-top: 70px; border-top: 2px solid var(--pp-ink); padding: 26px 0 40px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center; font-size: 14px; color: var(--pp-ink-soft); }
footer a { color: var(--pp-ink); }

@media (max-width: 640px) {
  nav a.navlink { display: none; }
  .steps > li { padding-left: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .btn:hover { transition: none; transform: none; }
}
