/* Word-card guide (/cards/): a section per episode with the video and the app
 * screens. Loaded after /styles.css: reuses the landing topbar, footer, colours
 * and font; the head of the page follows the key guide (landing/key/key.css). */
body.cards-page{max-width:1000px;opacity:1}
.cards-page .topbar{border-bottom:1px solid var(--line);flex-wrap:nowrap}
.site-logo{color:var(--fg);font-weight:700;font-size:1.05rem;letter-spacing:-0.01em;text-decoration:none}
.site-logo:hover{color:var(--accent)}
.rp-nav-right{display:flex;align-items:center;gap:10px}
.rp-lang{font:inherit;font-size:.85rem;padding:5px 6px;border:1px solid var(--line);border-radius:6px;background:var(--bg);color:var(--fg);max-width:160px}

.guide{padding:28px 0 10px}
.guide h1{font-size:clamp(1.8rem,4vw,2.4rem);letter-spacing:-0.02em;margin:0 0 8px}
.g-kicker{color:var(--accent);font-weight:600;font-size:.85rem;letter-spacing:.06em;text-transform:uppercase;margin-bottom:4px}
.g-intro{color:var(--mute);font-size:1.08rem;margin-bottom:8px;max-width:680px}
.mt-note{color:var(--mute);font-size:.9rem;font-style:italic;margin:6px 0 0}
.c-cta{margin:16px 0 4px}
.c-cta-btn{display:inline-block;padding:11px 22px;background:var(--fg);color:#fff!important;border-radius:8px;font-weight:600;text-decoration:none}
.c-cta-btn:hover{background:var(--accent)}

/* the app's own words: a button as a chip, a label inline */
.kbtn{display:inline-block;padding:0 7px;border:1.5px solid currentColor;border-radius:6px;font-weight:600;font-size:.92em;line-height:1.45;white-space:nowrap}
.kb-wrap{white-space:nowrap}
.lbl{font-weight:600}

/* ---------- episodes ---------- */
.cards-page main>section.ep{padding:28px 0;border-bottom:1px solid var(--line)}
.cards-page main>section.ep:last-child{border-bottom:0}
.ep h2{font-size:1.35rem;letter-spacing:-0.01em;margin:0 0 14px;display:flex;align-items:baseline;gap:10px}
.ep-n{flex:none;display:inline-grid;place-items:center;width:1.7em;height:1.7em;border-radius:50%;background:var(--fg);color:#fff;font-size:.8em}
.ep-soon{color:var(--mute);font-style:italic;margin:-4px 0 14px}
/* the video: a 9:16 box, never wider than a phone screen */
.ep-video{width:100%;max-width:300px;aspect-ratio:9/16;background:#111418;border-radius:14px;overflow:hidden}
.ep-video iframe{width:100%;height:100%;border:0;display:block}
.ep-watch{margin:8px 0 18px;font-size:.95rem}
.ep-watch a{color:var(--accent);font-weight:600;text-decoration:none}
.ep-watch a:hover{text-decoration:underline}

/* the screens: a grid of phone frames, caption under each */
.frames{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:18px 14px}
.frame{min-width:0;display:flex;flex-direction:column;gap:8px}
.shot-btn{border:0;padding:3px;margin:0;background:#111418;border-radius:14px;cursor:zoom-in;width:100%;line-height:0;box-shadow:0 3px 10px rgba(0,0,0,.14)}
.shot-btn img{width:100%;height:auto;border-radius:11px;display:block}
.shot-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.cap{margin:0;font-size:.9rem;line-height:1.4;color:var(--fg);overflow-wrap:anywhere}
.cap .kbtn{font-size:.88em;padding:0 5px}
html[dir=rtl] .cap,html[dir=rtl] .g-intro{unicode-bidi:plaintext}
html[dir=rtl] .cards-page h1,html[dir=rtl] .g-kicker,html[dir=rtl] .ep h2{letter-spacing:0}

/* footer links */
.c-links a{color:var(--accent);text-decoration:none;font-weight:600}
.c-links a:hover{text-decoration:underline}

@media(min-width:900px){
  .ep:has(.ep-video){display:grid;grid-template-columns:280px minmax(0,1fr);column-gap:28px;align-items:start}
  .ep:has(.ep-video) h2{grid-column:1 / -1}
  .ep:has(.ep-video) .ep-video{grid-column:1;grid-row:2}
  .ep:has(.ep-video) .ep-watch{grid-column:1;grid-row:3}
  .ep:has(.ep-video) .frames{grid-column:2;grid-row:2 / span 2;grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:520px){
  body.cards-page{padding:0 16px 48px}
  .rp-lang{max-width:none;width:auto;padding:5px 4px}
  .rp-nav-right{gap:8px}
  .cards-page .open-app-link{white-space:normal;text-align:center;line-height:1.2;font-size:.85rem;padding:5px 8px}
  .site-logo{font-size:1rem}
  .ep-video{max-width:none;margin:0 auto}
  .frames{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 12px}
}

/* ---------- lightbox (as on /key/) ---------- */
dialog.zoom{border:0;padding:max(56px,calc(env(safe-area-inset-top) + 48px)) 12px max(16px,env(safe-area-inset-bottom));background:#0d0c0b;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;overflow-y:auto;overscroll-behavior:contain;color:#fff}
dialog.zoom[open]{display:flex;flex-direction:column;align-items:center;gap:12px}
dialog.zoom::backdrop{background:#0d0c0b}
dialog.zoom img{flex:none;width:min(100%,420px);height:auto;border-radius:14px;display:block}
.zoom-cap{max-width:420px;margin:0;font-size:1rem;line-height:1.45;text-align:center}
.zoom-close{position:fixed;top:max(10px,calc(env(safe-area-inset-top) + 6px));right:max(10px,calc(env(safe-area-inset-right) + 6px));width:44px;height:44px;border-radius:50%;border:1.5px solid rgba(255,255,255,.55);background:rgba(13,12,11,.75);color:#fff;display:grid;place-items:center;cursor:pointer;z-index:2}
.zoom-close svg{width:20px;height:20px;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;fill:none}
.zoom-close:hover,.zoom-close:focus-visible{background:#fff;color:#0d0c0b}
html.zoom-open,html.zoom-open body{overflow:hidden}
