/* ============================================================================
 *  IntMap · the landing and teacher pages   (about.html · teachers.html · ja/…)
 * ----------------------------------------------------------------------------
 *  Loaded AFTER css/pages.css and built on its palette (--pg-*), so these pages are the same
 *  family as the reading pages in both light and dark, and follow the app's own theme setting
 *  (js/landing-page.js copies it onto <html data-theme>, the attribute pages.css reads).
 *  iOS-style: large type, pill buttons, rounded cards, hairlines, no text shadows, no emoji.
 *  ⚠ Nothing here may make the page wider than the screen: every grid track can shrink to the
 *  viewport, pictures are max-width:100%, and the one table scrolls inside its own box.
 * ========================================================================== */

.lp{ overflow-x:hidden; }
.lp a{ color:var(--pg-accent); }
.lp h1,.lp h2,.lp h3{ color:var(--pg-ink); letter-spacing:-0.02em; overflow-wrap:anywhere; }
.lp p,.lp li,.lp td{ overflow-wrap:anywhere; }

/* ── the bar ──────────────────────────────────────────────────────────────────────────────── */
/* sticky with no z-index: a positioned box paints above the in-flow content after it, and nothing
   below the bar is positioned (the step numbers are grid cells, not absolutely placed) */
.lp-top{
  position:sticky; top:0;
  background:var(--pg-header-bg);
  -webkit-backdrop-filter:saturate(180%) blur(20px); backdrop-filter:saturate(180%) blur(20px);
  border-bottom:1px solid var(--pg-line-soft);
}
.lp-top-in{
  max-width:1120px; margin:0 auto; padding:10px 22px;
  display:flex; align-items:center; gap:6px; min-width:0;
}
.lp-brand{ display:inline-flex; align-items:center; gap:8px; text-decoration:none; color:var(--pg-ink) !important; font-weight:700; font-size:17px; }
.lp-brand img{ width:28px; height:28px; border-radius:7px; }
.lp-top-spacer{ flex:1 1 auto; min-width:4px; }
.lp-top-link,.lp-lang{
  text-decoration:none; font-size:14px; font-weight:500; padding:6px 10px; border-radius:9px; white-space:nowrap;
}
.lp-top-link:hover,.lp-lang:hover{ background:var(--pg-accent-soft); }
.lp-top-link.is-here{ color:var(--pg-ink); }
.lp-lang{ border:1px solid var(--pg-line); border-radius:980px; }

/* ── buttons ──────────────────────────────────────────────────────────────────────────────── */
.lp-btn{
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  min-height:44px; padding:0 22px; border-radius:980px;
  background:var(--pg-accent); color:var(--pg-accent-ink) !important;
  font-weight:600; font-size:16px; text-decoration:none; white-space:nowrap;
  transition:filter .15s ease, transform .08s ease;
}
.lp-btn:hover{ filter:brightness(1.07); }
.lp-btn:active{ transform:scale(0.97); }
.lp-btn-2{ background:var(--pg-accent-soft); color:var(--pg-accent) !important; }
.lp-btn-sm{ min-height:34px; padding:0 14px; font-size:14px; margin-left:4px; }

/* ── layout ───────────────────────────────────────────────────────────────────────────────── */
.lp-main{ max-width:1120px; margin:0 auto; padding:0 22px 72px; }
.lp-sec{ margin-top:72px; }
.lp-sec > h2{ font-size:32px; line-height:1.15; margin:0 0 10px; }
.lp-sub{ color:var(--pg-ink-2); margin:0 0 24px; max-width:760px; }
.lp-note{ color:var(--pg-mut); font-size:14px; margin:14px 0 0; }

.lp-hero{
  display:grid; grid-template-columns:minmax(0,5fr) minmax(0,7fr); gap:40px; align-items:center;
  padding-top:56px;
}
.lp-hero-t{ grid-template-columns:minmax(0,1fr); max-width:820px; }
.lp-hero h1{ font-size:52px; line-height:1.06; margin:0 0 18px; font-weight:700; }
.lp-lede{ font-size:20px; line-height:1.5; color:var(--pg-ink-2); margin:0 0 26px; }
.lp-cta{ display:flex; flex-wrap:wrap; gap:10px; }
.lp-hero-img{ display:block; border-radius:var(--pg-radius); overflow:hidden; box-shadow:var(--pg-shadow); border:1px solid var(--pg-line-soft); }
.lp img{ max-width:100%; height:auto; display:block; }

.lp-grid3{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.lp-grid2{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.lp-tile{
  background:var(--pg-surface); border:1px solid var(--pg-line-soft); border-radius:var(--pg-radius);
  padding:22px 22px 20px; box-shadow:var(--pg-shadow); min-width:0;
}
.lp-tile h3{ font-size:20px; margin:0 0 8px; line-height:1.25; }
.lp-tile p{ margin:0 0 10px; color:var(--pg-ink-2); font-size:16px; }
.lp-open{ font-weight:600; font-size:15px; text-decoration:none; }
.lp-open:hover{ text-decoration:underline; }

/* ── the examples ─────────────────────────────────────────────────────────────────────────── */
.lp-cards{ display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr)); gap:18px; }
.lp-card{
  background:var(--pg-surface); border:1px solid var(--pg-line-soft); border-radius:var(--pg-radius);
  overflow:hidden; box-shadow:var(--pg-shadow); display:flex; flex-direction:column; min-width:0;
}
.lp-card-img{ display:block; aspect-ratio:16/10; overflow:hidden; background:var(--pg-surface-2); }
.lp-card-img img{ width:100%; height:100%; object-fit:cover; object-position:70% 50%; }
.lp-card-body{ padding:16px 18px 18px; display:flex; flex-direction:column; gap:8px; flex:1 1 auto; }
.lp-card h3{ font-size:18px; margin:0; line-height:1.3; }
.lp-card p{ margin:0; font-size:15px; color:var(--pg-ink-2); line-height:1.55; }
.lp-card .lp-open{ margin-top:auto; padding-top:4px; }
.lp-q,.lp-fits{ background:var(--pg-accent-soft); border-radius:12px; padding:10px 12px; color:var(--pg-ink) !important; }
.lp-fits{ background:transparent; padding:0; color:var(--pg-mut) !important; font-size:13px !important; }
.lp-q-h{ display:block; font-size:12px; font-weight:600; color:var(--pg-mut); text-transform:uppercase; letter-spacing:0.04em; margin-bottom:2px; }

/* ── the lesson plan ──────────────────────────────────────────────────────────────────────── */
.lp-steps{ list-style:none; counter-reset:step; padding:0; margin:0; display:grid; gap:12px; }
.lp-steps li{
  counter-increment:step; padding:16px 18px;
  display:grid; grid-template-columns:30px minmax(0,1fr); column-gap:14px;
  background:var(--pg-surface); border:1px solid var(--pg-line-soft); border-radius:16px;
}
.lp-steps li::before{
  content:counter(step); grid-row:1 / span 2; width:30px; height:30px; border-radius:50%;
  background:var(--pg-accent); color:var(--pg-accent-ink); font-weight:700; font-size:15px;
  display:flex; align-items:center; justify-content:center;
}
.lp-steps h3{ font-size:17px; margin:2px 0 4px; }
.lp-steps p{ margin:0; color:var(--pg-ink-2); font-size:15.5px; }

/* ── table, FAQ, support ──────────────────────────────────────────────────────────────────── */
.lp-tablewrap{ overflow-x:auto; -webkit-overflow-scrolling:touch; border:1px solid var(--pg-line-soft); border-radius:16px; background:var(--pg-surface); }
.lp-tablewrap table{ border-collapse:collapse; width:100%; font-size:15px; }
.lp-tablewrap th,.lp-tablewrap td{ text-align:left; vertical-align:top; padding:12px 16px; border-bottom:1px solid var(--pg-line-soft); }
.lp-tablewrap th{ font-size:13px; color:var(--pg-mut); font-weight:600; }
.lp-tablewrap tr:last-child td{ border-bottom:none; }

.lp-faq{ display:grid; gap:10px; max-width:820px; }
.lp-faq details{ background:var(--pg-surface); border:1px solid var(--pg-line-soft); border-radius:14px; padding:0 18px; }
.lp-faq summary{ cursor:pointer; font-weight:600; padding:15px 0; list-style:none; }
.lp-faq summary::-webkit-details-marker{ display:none; }
.lp-faq summary::after{ content:'+'; float:right; color:var(--pg-mut); font-weight:400; }
.lp-faq details[open] summary::after{ content:'\2212'; }
.lp-faq p{ margin:0 0 16px; color:var(--pg-ink-2); }

.lp-support{ background:var(--pg-surface); border:1px solid var(--pg-line-soft); border-radius:var(--pg-radius); padding:32px; box-shadow:var(--pg-shadow); }
.lp-support p{ max-width:680px; color:var(--pg-ink-2); margin:0 0 18px; }

.lp-foot{ border-top:1px solid var(--pg-line-soft); }
.lp-foot-in{ max-width:1120px; margin:0 auto; padding:22px; display:flex; flex-wrap:wrap; gap:8px 20px; font-size:14px; }
.lp-foot-in a{ text-decoration:none; }
.lp-foot-mark{ margin-left:auto; color:var(--pg-mut); }

/* ── narrow screens ───────────────────────────────────────────────────────────────────────── */
@media (max-width:900px){
  .lp-hero{ grid-template-columns:minmax(0,1fr); gap:28px; padding-top:36px; }
  .lp-hero h1{ font-size:40px; }
  .lp-grid3{ grid-template-columns:minmax(0,1fr); }
}
@media (max-width:640px){
  .lp-main{ padding:0 16px 56px; }
  .lp-top-in{ padding:8px 12px; gap:2px; }
  .lp-top-link{ padding:6px 6px; font-size:13px; }
  .lp-lang{ padding:5px 8px; font-size:13px; }
  .lp-btn-sm{ display:none; }            /* the hero's own button opens the map one screen down */
  .lp-brand span{ display:none; }        /* the icon stays; the four links keep their room */
  .lp-hero h1{ font-size:32px; }
  .lp-lede{ font-size:17px; }
  .lp-sec{ margin-top:52px; }
  .lp-sec > h2{ font-size:26px; }
  .lp-grid2{ grid-template-columns:minmax(0,1fr); }
  .lp-support{ padding:22px; }
}

/* ── the share pages (s/<id>.html): a card for the crawler, a one-line stop for a person on the way to the map ── */
.lp-share-main{ max-width:720px; padding-top:72px; }
.lp-share-main h1{ font-size:36px; line-height:1.15; margin:0 0 14px; }

/* (classroom-tours) a tour's steps, listed on its card (scripts/landing.mjs toursSection) */
.lp-tour-steps{ margin:0; padding-left:22px; font-size:14px; color:var(--pg-ink-2); line-height:1.5; }
.lp-tour-steps li{ margin:1px 0; }

/* (showcase-gallery) embed-map.html: the code the Embed tab writes, shown as text — it wraps rather than scrolling
   sideways, so a phone reads the whole line; and the picture of the map that code shows, below it */
.lp-code{
  margin:0 0 18px; padding:14px 16px; border-radius:14px; background:var(--pg-code-bg); border:1px solid var(--pg-line-soft);
  font:13px/1.55 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; color:var(--pg-ink);
  white-space:pre-wrap; overflow-wrap:anywhere; word-break:break-word;
}
.lp-code code{ font:inherit; background:none; padding:0; }
.lp-code-pic{ max-width:720px; margin-top:6px; }

/* (spacetime-positioning) about.html's hero: the brand's category over the headline, its line of trust under the lede,
   and the clock — the same map at the dates of the border-only examples, one at a time, with a slider and the years
   under it (scripts/landing.mjs heroStrip; the controls are `hidden` until its script shows them). Frames that are not
   shown are display:none, so their lazy pictures are not fetched until a reader asks for that date. */
.lp-eyebrow{ margin:0 0 10px; font-size:14px; font-weight:600; letter-spacing:0.04em; text-transform:uppercase; color:var(--pg-accent); }
.lp-trust{ margin:-10px 0 24px; padding-left:12px; border-left:3px solid var(--pg-accent); font-size:15px; line-height:1.5; color:var(--pg-ink); }
.st-scrub{ margin:0; min-width:0; }
.st-scrub [hidden]{ display:none !important; }
.st-frames{
  aspect-ratio:16/10; overflow:hidden; border-radius:var(--pg-radius); background:var(--pg-surface-2);
  border:1px solid var(--pg-line-soft); box-shadow:var(--pg-shadow);
}
.st-frame{ display:block; height:100%; }
.st-frame img{ width:100%; height:100%; object-fit:cover; animation:st-in .28s ease; }
@keyframes st-in{ from{ opacity:.3; } to{ opacity:1; } }
.st-caps{ margin-top:12px; }
.st-cap{ display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 14px; margin:0; font-size:15px; }
.st-cap-t{ font-weight:600; color:var(--pg-ink); }
.st-ctl{ margin-top:14px; padding:14px 16px 8px; background:var(--pg-surface); border:1px solid var(--pg-line-soft); border-radius:16px; }
.st-hint{ margin:0 0 8px; font-size:13px; color:var(--pg-mut); }
.st-range{ display:block; width:100%; margin:0; accent-color:var(--pg-accent); cursor:pointer; }
.st-ticks{ list-style:none; margin:4px 0 0; padding:0; display:flex; justify-content:space-between; gap:2px; overflow-x:auto; -webkit-overflow-scrolling:touch; }
.st-tick{
  min-height:32px; padding:6px 5px; border:0; border-radius:8px; background:none; cursor:pointer;
  font:inherit; font-size:12px; font-variant-numeric:tabular-nums; white-space:nowrap; color:var(--pg-mut);
}
.st-tick:hover{ background:var(--pg-accent-soft); }
.st-tick[aria-current="true"]{ color:var(--pg-accent); font-weight:700; }

/* the three ways in (scripts/landing.mjs entrancesSection): a mark, a sentence, the button that opens that state */
.lp-way{ display:flex; flex-direction:column; align-items:flex-start; gap:10px; }
.lp-way h3,.lp-way p{ margin:0; }
.lp-way p{ flex:1 1 auto; }
.lp-way p.lp-way-ex{ flex:0 0 auto; font-size:14px; font-weight:600; color:var(--pg-ink); }
.lp-way .lp-btn{ white-space:normal; text-align:center; min-height:44px; padding:10px 20px; }
.lp-way-i{
  display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; border-radius:12px;
  background:var(--pg-accent-soft); color:var(--pg-accent);
}
@media (prefers-reduced-motion:reduce){ .st-frame img{ animation:none; } }
@media (max-width:640px){
  .lp-eyebrow{ font-size:12px; }
  .st-tick{ font-size:11px; padding:6px 3px; }
  /* seven years do not fit one phone row without scrolling: on a phone the years wrap under the slider as buttons */
  .st-ticks{ flex-wrap:wrap; justify-content:flex-start; gap:2px 6px; overflow-x:visible; }
}
