/* PV2UP – responsive additions only (safe, non-destructive) */

/* Safety: never overflow the viewport */
html, body { max-width: 100%; overflow-x: hidden; }
img, svg, video { max-width: 100%; height: auto; }

/* ---------- Header & language/menu row ---------- */
header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand img { height: 64px; width: auto; object-fit: contain; }
.brand .sub { color: #64748b; font-size: 14px; }

/* on smaller screens, shrink logo + hide the long subtitle to prevent overlap */
@media (max-width: 560px) {
  .brand img { height: 52px; }
  .brand .sub { display: none !important; }
}

/* language + menu cluster */
.lang { display: flex; align-items: center; gap: 8px; }
.lang select { border-radius: 10px; padding: 8px 10px; border: 1px solid #e5e7eb; background: #fff; }

/* details.menu is used across pages */
details.menu > summary { cursor: pointer; list-style: none; font-weight: 800; border: 1px solid #e5e7eb; background: #fff; border-radius: 10px; padding: 9px 12px; }
details.menu[open] > summary { background: #eef2ff; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.08); min-width: 220px; padding: 8px; z-index: 50; }
.menu-panel a { display: block; padding: 10px 12px; border-radius: 8px; color: #0f172a; font-weight: 600; text-decoration: none; }
.menu-panel a:hover { background: #f3f4f6; }

/* keep menu usable on very narrow phones (e.g., Fold 2 outer screen) */
@media (max-width: 420px) {
  .menu-panel { width: min(92vw, 320px); }
}

/* ---------- Cards / grids used throughout pages ---------- */
.card { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.05); }
.hgrid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
@media (max-width: 980px) { .hgrid { grid-template-columns: 1fr; } }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 980px) { .steps { grid-template-columns: 1fr; } }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 980px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Book covers (home/pamphlet) ---------- */
/* Many source images are tall/narrow. Use contain so the whole cover is visible (no cropping) */
.book-covers img, .cover img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; background: #fff; border-radius: 8px; }

/* Grid that holds covers (used in index & pamphlet) */
.cover-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
@media (max-width: 1100px) { .cover-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .cover-grid { grid-template-columns: repeat(2, 1fr); } }

.cover { border: 1px solid #e5e7eb; border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 8px; align-items: center; background: #fff; }
.cover figcaption { font-size: 12px; color: #111827; text-align: center; }

/* ---------- Tables (faq/terms/privacy sometimes) ---------- */
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { padding: 10px 12px; vertical-align: top; }

/* ---------- Buttons & pills (shared) ---------- */
.btn { border: 1px solid #e5e7eb; background: #fff; border-radius: 12px; padding: 12px 16px; font-weight: 800; cursor: pointer; }
.btn.primary { background: linear-gradient(135deg, #2563eb, #7c3aed); color: #fff; border: 0; }
.pill { background: #f1f5f9; border: 1px solid #e5e7eb; padding: 6px 10px; border-radius: 999px; font-weight: 700; }

/* ---------- Small polish ---------- */
.wrap { max-width: 1100px; margin: 0 auto; padding: 18px 14px; }
.muted { color: #64748b; }
.hr { height: 1px; background: #e5e7eb; margin: 12px 0; }
footer { display: flex; gap: 12px; flex-wrap: wrap; margin: 16px 0; }

/* === PV2UP: ultra-conservative mobile patch (Fold 2-friendly) === */

/* prevent any accidental horizontal scroll */
html, body { max-width: 100%; overflow-x: hidden; }

/* header: stack brand; hide long subtitle on small screens; keep lang/menu tidy */
@media (max-width: 560px){
  header{ display:flex; flex-wrap:wrap; align-items:center; gap:10px; }

  /* catch most brand containers without changing HTML */
  header [class*="brand"], .brand { flex:1 1 100%; min-width:0; }
  header [class*="brand"] img, .brand img { height:52px; width:auto; object-fit:contain; }

  /* hide any subtitle variants used across pages */
  header [class*="brand"] .sub,
  header [class*="brand"] small { display:none !important; }

  /* language + menu row stays compact */
  header .lang,
  header details.menu { margin-left:auto; }
  header details.menu > summary { padding:9px 12px; }
}

/* hero headings get too large on narrow phones -> scale down safely */
@media (max-width: 420px){
  h1{ font-size:32px; line-height:1.15; word-break:break-word; }
}

/* book covers: show full cover (no cropping) */
.cover-grid img, .book-covers img, .cover img{
  width:100%;
  aspect-ratio:3/4;
  object-fit:contain;
  background:#fff;
  border-radius:8px;
}