/* Public pages (landing, guide, legal): same pixel look as the app, laid out for reading. */
body.site { padding-bottom: 0; }
/* Visible focus everywhere on the public pages (some controls reset their outline with all: unset). */
body.site a:focus-visible, body.site button:focus-visible, body.site summary:focus-visible, body.site select:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Shared header (markup: siteNav() in server.js). Every control is at least 44px tall. */
.site-nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap;
  padding: calc(8px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
  background: var(--bar); border-bottom: 4px solid var(--deep); }
.site-nav a[aria-current="page"]:not(.pt-btn) { box-shadow: inset 0 -3px 0 var(--hi); }
.site-nav .brand { -webkit-text-stroke: .35px currentColor; display: flex; align-items: center; gap: 8px; min-height: 44px; flex: none; color: var(--on-bar); text-decoration: none;
  font-family: "PressStart"; font-size: 12px; text-shadow: 2px 2px 0 var(--deep); border-radius: 6px; }
.site-nav .brand img { width: 28px; height: 28px; border-radius: 6px; }
.site-nav .links { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.site-nav .links a:not(.pt-btn) { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; white-space: nowrap; color: var(--on-bar); font-weight: 600;
  text-decoration: none; font-size: 16px; border-radius: 6px; }
.site-nav .links a:not(.pt-btn):hover { background: rgba(255,255,255,.1); }
.site-nav .pt-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 12px; white-space: nowrap; text-decoration: none; color: var(--ink); }
.site-nav .pt-btn.primary { color: var(--on-accent) !important; } /* the markup sets #fff inline; themes pick their own readable colour */
/* Phones and small tablets: one row — logo, a MENU button with the page links, and the sign-in / home buttons. */
.nav-menu { display: none; position: relative; margin-left: auto; }
.nav-menu summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; color: var(--on-bar); font-weight: 600;
  font-size: 15px; border: 2px solid rgba(255,255,255,.35); border-radius: 6px; cursor: pointer; white-space: nowrap; user-select: none; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary::after { content: "▾"; font-size: 12px; }
.nav-menu[open] summary::after { content: "▴"; }
.nav-menu summary:focus-visible, .nav-drop a:focus-visible { outline: 3px solid var(--hi); outline-offset: 2px; }
.nav-drop { position: absolute; left: 0; top: calc(100% + 8px); min-width: 210px; max-width: calc(100vw - 20px); display: grid; gap: 2px; padding: 6px;
  background: var(--bar); border: 3px solid var(--deep); border-radius: 8px; box-shadow: 0 8px 20px rgba(0,0,0,.35); z-index: 30; }
.nav-drop a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--on-bar); text-decoration: none; font-weight: 600; font-size: 16px; border-radius: 6px; }
.nav-drop a:hover { background: rgba(255,255,255,.12); }
.nav-drop a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--hi); }
@media (max-width: 760px) {
  .site-nav { flex-wrap: nowrap; gap: 8px; padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); }
  .nav-menu { display: block; }
  .site-nav .links { margin-left: 0; flex-wrap: nowrap; gap: 6px; flex: none; }
  .site-nav .links a:not(.pt-btn) { display: none; }
  .site-nav .links .pt-btn { padding: 0 10px; }
}
@media (max-width: 520px) {
  .site-nav .brand { font-size: 0; gap: 0; text-shadow: none; } /* keeps the name for screen readers; shows just the icon */
  .site-nav .brand img { width: 34px; height: 34px; }
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 24px 16px; }
.narrow { max-width: 780px; }
/* Page headings on the page background (guide, leaderboards) */
.page-h { font-size: 16px; line-height: 1.5; margin: 10px 0 8px; }
.page-lead { color: var(--on-bg2); margin: 0 0 12px; font-size: 17px; max-width: 42em; }
/* Links sitting on the page background (not in a white box) use the theme's highlight colour */
.page-lead a, .guide-sec > p.intro a, .lb .intro a { color: var(--hi); }
/* Classic's link blue (#4880d8) is 3.7:1 on the white boxes; the public pages are mostly reading, so they use a darker blue (5.5:1).
   Themes already pick a readable --link of their own (themes.js), so this only applies when no theme is set. */
html:not([data-themed]) body.site { --link: #2f62b8; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: center; padding: 34px 0 10px; }
.hero h1 { font-size: clamp(18px, 3.4vw, 28px); line-height: 1.5; margin-bottom: 14px; }
.hero p.lead { color: var(--on-bg2); font-size: 20px; margin: 0 0 20px; max-width: 34em; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.cta .pt-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; font-size: 10px; padding: 12px 14px; text-decoration: none; color: var(--ink); }
.cta .pt-btn.primary { color: var(--on-accent); }
.chip { display: inline-block; background: var(--hi); color: var(--hi-ink); font-family: "PressStart"; font-size: 8px; padding: 5px 7px; border-radius: 5px; border: 2px solid var(--deep); margin-bottom: 14px; }

/* Mock "screens" built from the app's own pieces */
.mock { background: #16264a; border: 4px solid #0b1428; border-radius: 14px; padding: 12px; box-shadow: 0 6px 0 #0b1428, 0 18px 40px rgba(0,0,0,.35); color: #fff; }
.mock .bar { display: flex; gap: 6px; margin-bottom: 10px; } .mock .bar i { width: 10px; height: 10px; border-radius: 50%; background: #e05048; } .mock .bar i:nth-child(2) { background: #f8b030; } .mock .bar i:nth-child(3) { background: #48a058; }
.mock .mons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mon { background: #f4f1e8; color: #1d2340; border: 3px solid #0b1428; border-radius: 8px; padding: 6px 8px; display: grid; grid-template-columns: 40px 1fr; gap: 0 6px; align-items: center; font-size: 14px; }
.mon img { width: 40px; height: 40px; image-rendering: pixelated; grid-row: span 2; }
.mon b { font-size: 14px; } .mon small { color: #5b6280; font-size: 12px; }
.mon .hp { grid-column: 2; height: 6px; background: #d6cfb9; border-radius: 3px; overflow: hidden; margin-top: 3px; } .mon .hp i { display: block; height: 100%; background: #3fae4a; }
.tier { font-family: "PressStart"; font-size: 7px; color: #fff; padding: 3px 4px; border-radius: 3px; }

/* Feature grid */
.section-title { color: var(--on-bg); text-shadow: 2px 2px 0 var(--title-shadow); font-size: 13px; margin: 38px 0 16px; text-align: center; }
.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.feature { background: var(--panel); border: 4px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: inset 0 0 0 3px var(--ring), 0 4px 0 var(--deep); }
.feature .ic { font-size: 28px; line-height: 1; margin-bottom: 8px; }
.feature h3 { color: var(--ink); font-size: 10px; margin-bottom: 8px; line-height: 1.5; }
.feature p { margin: 0; font-size: 16px; color: #444; }
.more-link { text-align: center; margin: 18px 0 0; color: var(--on-bg2); }
.more-link a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; color: var(--hi); }

/* Steps (guide) */
.toc { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 22px; }
.toc a { display: inline-flex; align-items: center; min-height: 44px; background: var(--panel); border: 3px solid var(--line); border-radius: 8px; padding: 4px 12px; text-decoration: none;
  color: var(--ink); font-size: 15px; box-shadow: 0 3px 0 var(--deep); }
.toc a:hover { background: var(--selbg); }
/* Anchored sections land below the sticky header */
body.site [id] { scroll-margin-top: 88px; }
.guide-sec { margin: 0 0 30px; }
.guide-sec > h2 { color: var(--on-bg); text-shadow: 2px 2px 0 var(--title-shadow); font-size: 12px; line-height: 1.6; margin: 0 0 6px; }
.guide-sec > p.intro { color: var(--on-bg2); margin: 0 0 14px; font-size: 17px; }
.steps { display: grid; gap: 12px; counter-reset: step; }
.step { background: var(--panel); border: 4px solid var(--line); border-radius: var(--radius); padding: 14px 16px 14px 62px; position: relative; box-shadow: inset 0 0 0 3px var(--ring), 0 4px 0 var(--deep); counter-increment: step; }
.step::before { content: counter(step); position: absolute; left: 14px; top: 14px; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
  font-family: "PressStart"; font-size: 12px; display: grid; place-items: center; border: 3px solid var(--line); }
.step h3 { color: var(--ink); font-size: 10px; margin: 6px 0 8px; line-height: 1.5; }
.step p, .step li { font-size: 16px; color: #333; margin: 0 0 6px; }
.step li { font-weight: 500; padding: 0; border-radius: 0; background: none; } /* style.css styles the app's ".steps li" as pills */
.step ul, .step ol { margin: 4px 0 0; padding-left: 20px; }
.ui { display: inline-block; font-family: "PressStart"; font-size: 8px; background: #fff; color: var(--ink); border: 2px solid var(--line); border-radius: 5px; padding: 3px 5px; box-shadow: 0 2px 0 var(--line); white-space: nowrap; vertical-align: 1px; }
.ui.green { background: var(--accent); color: var(--on-accent); } .ui.red { background: #c0392b; color: #fff; } .ui.gold { background: var(--accent2); }
.path { font-family: ui-monospace, monospace; font-size: 14px; background: #eef2fb; border: 2px solid #c8d8f0; border-radius: 5px; padding: 1px 5px; }
.tip, .warn-box { border-radius: 8px; padding: 10px 12px; margin-top: 10px; font-size: 15px; border: 3px solid; }
.tip { background: #eaf7ec; border-color: #48a058; } .warn-box { background: #fff4e5; border-color: #e09a28; }
/* Tiny phone mockups for the iPhone steps */
.phone { float: right; width: 150px; margin: -2px 0 8px 14px; background: #111; border-radius: 22px; padding: 10px 7px; box-shadow: 0 4px 0 #101c34; }
.phone .scr { background: #f2f2f7; border-radius: 14px; padding: 8px 6px; font-family: system-ui, sans-serif; font-size: 10px; color: #111; min-height: 150px; }
.phone .scr .h { font-weight: 700; font-size: 12px; margin-bottom: 6px; }
.phone .scr .cell { background: #fff; border-radius: 6px; padding: 6px; margin-bottom: 4px; display: flex; justify-content: space-between; align-items: center; }
.phone .scr .sw { width: 22px; height: 13px; border-radius: 7px; background: #34c759; position: relative; } .phone .scr .sw::after { content: ""; position: absolute; right: 1px; top: 1px; width: 11px; height: 11px; border-radius: 50%; background: #fff; }
.phone .scr .hl { outline: 2px solid #e05048; outline-offset: 1px; }
@media (max-width: 640px) { .phone { float: none; margin: 8px auto; } .step { padding-left: 16px; padding-top: 58px; } }
/* Troubleshooting: questions, not numbered steps */
.steps.qa .step { padding: 14px 16px; } .steps.qa .step::before { display: none; }
.steps.qa .step h3 { margin-top: 0; }
.toc-sub { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.toc-sub a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--on-bg); font-size: 15px; border-radius: 6px; }

/* Legal */
.legal { background: var(--panel); border: 4px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: inset 0 0 0 3px var(--ring), 0 4px 0 var(--deep); font-family: system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; font-size: 16px; line-height: 1.6; }
.legal h1 { color: var(--ink); text-shadow: none; font-size: 14px; margin-bottom: 4px; }
.legal h2 { font-size: 10px; margin: 24px 0 8px; line-height: 1.6; }
.legal p, .legal li { color: #333; max-width: 34em; } /* 45–75 characters a line reads best */
.legal ul, .legal ol { padding-left: 22px; } .legal li { margin-bottom: 4px; }
.legal .updated { color: var(--ink2); font-size: 14px; margin-bottom: 16px; }

/* Sign-up box + footer */
.signup { background: var(--panel); border: 4px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: inset 0 0 0 3px #f0d890, 0 4px 0 var(--deep); text-align: center; margin-top: 38px; }
.signup form { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.signup input { max-width: 300px; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } }

/* Guide screenshots with numbered callouts */
.shot { float: right; margin: 0 0 10px 16px; width: 210px; }
.shot.wide { float: none; width: 100%; margin: 0 0 12px; }
.shot .frame { position: relative; border: 4px solid var(--deep); border-radius: 16px; overflow: hidden; background: var(--deep); box-shadow: 0 4px 0 var(--deep); }
.shot.wide .frame { border-radius: 10px; }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { font-size: 13px; color: #4b4f66; margin-top: 6px; text-align: center; }
.pin { position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; background: #c4381f; color: #fff; font: 700 14px/26px system-ui, sans-serif;
  font-style: normal; text-align: center; border: 2px solid #fff; box-shadow: 0 0 0 2px #c4381f, 0 2px 6px rgba(0,0,0,.5); animation: pinpop .6s ease-out; }
@keyframes pinpop { from { transform: translate(-50%, -50%) scale(.3); } }
b.n { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #c4381f; color: #fff; font: 700 12px system-ui, sans-serif; vertical-align: 1px; }
.step::after { content: ""; display: table; clear: both; }
.guide-sec h3.sub { color: var(--hi); font-size: 10px; line-height: 1.6; margin: 18px 0 8px; }
.pathways { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 6px; }
.pathways a { display: grid; gap: 4px; text-decoration: none; background: var(--card); color: #1d2340; border: 4px solid var(--deep); border-radius: 12px; padding: 12px 14px; box-shadow: 0 4px 0 var(--deep); }
.pathways a:hover { background: #fbf8ef; } .pathways b { font-size: 16px; } .pathways span { font-size: 14px; color: #4b4f66; }
@media (max-width: 640px) { .shot { float: none; width: min(260px, 100%); margin: 6px auto 12px; } .shot.wide { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .pin { animation: none; } }
