/* Pip Explains: sticker / paper look. Cream cards, thick ink outlines, hard offset shadows. Grandstander + Lexend. */
@font-face { font-family: 'Grandstander'; font-weight: 700; font-display: swap; src: url(/fonts/grandstander-700.woff2) format('woff2'); }
@font-face { font-family: 'Grandstander'; font-weight: 800; font-display: swap; src: url(/fonts/grandstander-800.woff2) format('woff2'); }
@font-face { font-family: 'Lexend'; font-weight: 400; font-display: swap; src: url(/fonts/lexend-400.woff2) format('woff2'); }
@font-face { font-family: 'Lexend'; font-weight: 600; font-display: swap; src: url(/fonts/lexend-600.woff2) format('woff2'); }
@font-face { font-family: 'Lexend'; font-weight: 700; font-display: swap; src: url(/fonts/lexend-700.woff2) format('woff2'); }

:root {
  --ink: #1B2E35; --ink-soft: #3d5560; --cream: #FFF8EA; --paper: #FFFDF8; --mari: #F5B841; --mari-deep: #e39f1f;
  --coral: #FF7B5C; --sky: #7FD6EA; --sky-soft: #c9f0f8; --sky-deep: #2a9fbe; --mint: #9fe0b5; --red: #d9483b;
  --display: 'Grandstander', 'Trebuchet MS', system-ui, sans-serif; --body: 'Lexend', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 20px; --line: 3px; --shadow: 5px 5px 0 var(--ink); --shadow-sm: 3px 3px 0 var(--ink);
  --max: 1120px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 17px/1.6 var(--body); }
img { max-width: 100%; height: auto; }
a { color: var(--sky-deep); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.12; margin: 0 0 .4em; letter-spacing: .2px; }
h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 4px solid var(--coral); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--mari); padding: 8px 14px; border: var(--line) solid var(--ink); border-radius: 12px; z-index: 10; }
.skip:focus { left: 12px; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.mini { font-size: .86rem; color: var(--ink-soft); }
.lede { font-size: 1.15rem; }
.hp { position: absolute !important; left: -9999px !important; }

.devbar { background: var(--coral); color: #fff; text-align: center; font-weight: 700; font-size: .9rem; padding: 6px 12px; border-bottom: 3px solid var(--ink); }
/* header */
.top { background: var(--sky); border-bottom: var(--line) solid var(--ink); position: sticky; top: 0; z-index: 5; }
.top-in { max-width: var(--max); margin: 0 auto; display: flex; align-items: center; gap: 12px 18px; padding: 10px 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 800 1.45rem var(--display); }
.brand img { border-radius: 50%; border: var(--line) solid var(--ink); background: #fff; }
.nav { display: flex; gap: 4px 6px; flex-wrap: wrap; flex: 1; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 2px solid transparent; }
.nav a:hover { background: rgba(255,255,255,.5); }
.nav a[aria-current="page"] { background: #fff; border-color: var(--ink); }
.who { display: flex; gap: 8px; align-items: center; }
.pill { color: var(--ink); font-weight: 600; text-decoration: none; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--ink); background: rgba(255,255,255,.6); }
@media (max-width: 760px) { .nav { order: 3; flex-basis: 100%; justify-content: space-between; flex-wrap: nowrap; overflow-x: auto; gap: 2px; } .nav a { padding: 4px 6px; font-size: .86rem; white-space: nowrap; } .brand { font-size: 1.15rem; gap: 8px; } .brand img { width: 34px; height: 34px; } .top { position: static; } .who { margin-left: auto; gap: 6px; } .who .pill, .who .btn-sm { font-size: .85rem; padding: 4px 10px; } }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font: 700 1rem var(--body); color: var(--ink); background: var(--mari); border: var(--line) solid var(--ink); border-radius: 14px; padding: 10px 18px; text-decoration: none; box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .08s, box-shadow .08s; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); color: var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-big { font-size: 1.12rem; padding: 13px 22px; }
.btn-sm { font-size: .92rem; padding: 7px 13px; border-radius: 12px; }
.btn-sky { background: var(--sky); }
.btn-ghost { background: #fff; }
.btn-danger { background: #ffd3cb; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* layout */
main { display: block; }
.band { max-width: var(--max); margin: 0 auto; padding: 40px 16px; }
.band.narrow { max-width: 760px; }
.card { background: var(--paper); border: var(--line) solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.grid-sm { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; }
@media (max-width: 700px) { .two { grid-template-columns: 1fr; } }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head { display: flex; align-items: center; gap: 22px; margin-bottom: 18px; }
.page-head .head-art { flex: none; width: 130px; height: auto; }
@media (max-width: 560px) { .page-head { flex-direction: column; text-align: center; } .page-head .head-art { width: 110px; } }
h2.sub { margin-top: 1.6em; }

/* hero */
.hero { background: repeating-conic-gradient(from 0deg at 72% 58%, var(--sky) 0 7.5deg, #9be0ef 7.5deg 15deg); border-bottom: var(--line) solid var(--ink); overflow: hidden; }
.hero-in { max-width: var(--max); margin: 0 auto; padding: 34px 16px 0; display: grid; grid-template-columns: 1.2fr .8fr; gap: 10px; align-items: end; }
.hero-text { background: var(--paper); border: var(--line) solid var(--ink); border-radius: 26px; box-shadow: 7px 7px 0 var(--ink); padding: 28px 28px 22px; margin-bottom: 40px; }
.kicker { display: inline-block; background: var(--coral); color: #fff; font-weight: 700; padding: 3px 12px; border-radius: 999px; border: 2px solid var(--ink); font-size: .9rem; }
.hero-pip img { display: block; width: 100%; max-width: 440px; margin: 0 auto -8px; filter: drop-shadow(6px 6px 0 rgba(27,46,53,.25)); }
@media (max-width: 820px) { .hero-in { grid-template-columns: 1fr; } .hero-pip { order: -1; } .hero-pip img { max-width: 230px; margin-bottom: -26px; } .hero-text { margin-bottom: 26px; padding: 22px 18px; } }
@media (prefers-reduced-motion: no-preference) { .hero-pip img.wave { animation: bob 3.5s ease-in-out infinite; } @keyframes bob { 50% { transform: translateY(-8px); } } }

/* episode cards */
.ep-card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); overflow: hidden; height: 100%; transition: transform .1s, box-shadow .1s; }
.ep-card:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); color: var(--ink); }
.thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: var(--line) solid var(--ink); background: var(--sky-soft); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ep-meta { display: flex; gap: 8px; align-items: center; padding: 12px 14px 0; flex-wrap: wrap; }
.ep-title { font: 800 1.2rem/1.2 var(--display); padding: 6px 14px 16px; }
.chip { display: inline-block; background: var(--sky-soft); border: 2px solid var(--ink); border-radius: 999px; padding: 1px 10px; font-size: .82rem; font-weight: 600; }
.ep-num { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.feature { display: grid; grid-template-columns: 1.25fr 1fr; overflow: hidden; margin-bottom: 26px; }
.feature .thumb { border-bottom: 0; border-right: var(--line) solid var(--ink); height: 100%; aspect-ratio: auto; }
.feature-text { padding: 22px 24px; }
.feature-text h3 { font-size: 1.7rem; }
.feature-text h3 a { color: var(--ink); text-decoration: none; }
@media (max-width: 820px) { .feature { grid-template-columns: 1fr; } .feature .thumb { border-right: 0; border-bottom: var(--line) solid var(--ink); aspect-ratio: 16/9; } }

/* trust stickers */
.trust h2 { text-align: center; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 18px 0; }
@media (max-width: 820px) { .trio { grid-template-columns: 1fr; } }
.sticker { background: var(--paper); border: var(--line) solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; transform: rotate(-.6deg); }
.sticker:nth-child(2) { transform: rotate(.7deg); background: #fff3d6; }
.sticker:nth-child(3) { transform: rotate(-.3deg); background: #e6f8fc; }
.sticker .ico { font-size: 2rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.promo { display: flex; gap: 18px; align-items: center; padding: 20px; }
.promo-art { width: 140px; flex: none; border-radius: 14px; }
@media (max-width: 480px) { .promo { flex-direction: column; text-align: center; } }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 20px; align-items: center; }
.chip-btn { font: 600 .92rem var(--body); color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 5px 13px; cursor: pointer; text-decoration: none; }
.chip-btn[aria-pressed="true"] { background: var(--mari); box-shadow: var(--shadow-sm); }

/* episode page */
.episode { max-width: var(--max); margin: 0 auto; padding: 22px 16px 50px; }
.crumbs a { font-weight: 600; text-decoration: none; }
.ep-head h1 { margin-bottom: 14px; }
.video { margin-bottom: 26px; }
.yt { display: block; position: relative; width: 100%; aspect-ratio: 16/9; padding: 0; border: var(--line) solid var(--ink); border-radius: var(--r); overflow: hidden; background: #000; box-shadow: var(--shadow); cursor: pointer; }
.yt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt .play { position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; margin: -46px 0 0 -46px; border-radius: 50%; background: var(--coral); border: 4px solid var(--ink); box-shadow: var(--shadow-sm); }
.yt .play::after { content: ''; position: absolute; left: 36px; top: 26px; border-left: 30px solid #fff; border-top: 18px solid transparent; border-bottom: 18px solid transparent; }
.yt:hover .play { background: var(--mari); }
.yt iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-note { font-size: .8rem; color: var(--ink-soft); margin: 8px 4px 0; }
.ep-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 30px; align-items: start; }
@media (max-width: 960px) { .ep-body { grid-template-columns: 1fr; } }
.bigq { display: flex; gap: 16px; align-items: center; padding: 16px 20px; background: #fff3d6; margin-bottom: 20px; }
.bigq h2 { font-size: 1.3rem; margin-bottom: 2px; }
.bigq p { margin: 0; font-size: 1.12rem; font-weight: 600; }
.bigq-art { width: 80px; flex: none; }
.summary { font-size: 1.08rem; }
.block { margin-top: 34px; }
.words { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.word { padding: 16px 18px; }
.word h3 { color: var(--sky-deep); font-size: 1.35rem; margin-bottom: 2px; }
.word .say { font-size: .88rem; color: var(--ink-soft); margin-bottom: 8px; }
.word .eg { font-size: .92rem; background: var(--cream); border-radius: 10px; padding: 6px 10px; margin: 0; }
.try { padding: 20px 22px; }
.try h3 { margin-top: 10px; }
.needs { columns: 2; padding-left: 20px; }
@media (max-width: 560px) { .needs { columns: 1; } }
.steps li { margin-bottom: 8px; }
.notice-box { background: #e6f8fc; border: 2px solid var(--ink); border-radius: 14px; padding: 12px 14px; }
.safety { background: #ffe9e3; border-radius: 12px; padding: 8px 12px; font-weight: 600; }
.bonus { background: #fff3d6; border-radius: 12px; padding: 8px 12px; }
.shorts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.short { display: flex; flex-direction: column; gap: 6px; padding: 14px; text-decoration: none; color: var(--ink); font-weight: 600; }
.short-ico { width: 44px; height: 44px; border-radius: 50%; background: var(--coral); color: #fff; display: grid; place-items: center; border: 2px solid var(--ink); }
.ep-side { display: flex; flex-direction: column; gap: 20px; }
.side-box { padding: 18px 20px; }
.side-box h2 { font-size: 1.35rem; }
.side-box ul { padding-left: 20px; margin: 0; }
.side-box li { margin-bottom: 8px; }
.print-box { background: #e6f8fc; }
.dl { display: block; font-weight: 600; margin: 8px 0; }
.facts { background: #fff3d6; }
.sources { font-size: .95rem; }
.wonder { text-align: center; }
.wonder img { width: 70px; }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; }
.prevnext a { display: flex; flex-direction: column; padding: 14px 18px; text-decoration: none; color: var(--ink); font: 800 1.1rem var(--display); }
.prevnext a.right { text-align: right; }
@media (max-width: 560px) { .prevnext { grid-template-columns: 1fr; } }

/* quiz */
.quiz { padding: 22px; min-height: 160px; }
.quiz .qnum { font-weight: 700; color: var(--ink-soft); font-size: .9rem; }
.quiz h3 { font-size: 1.35rem; margin: 6px 0 14px; }
.quiz .choices { display: grid; gap: 10px; }
.quiz .choice { text-align: left; font: 600 1.02rem var(--body); color: var(--ink); background: #fff; border: var(--line) solid var(--ink); border-radius: 14px; padding: 12px 14px; cursor: pointer; box-shadow: var(--shadow-sm); }
.quiz .choice:hover:not(:disabled) { background: var(--sky-soft); }
.quiz .choice.right { background: #c9f2d5; }
.quiz .choice.wrong { background: #ffd3cb; }
.quiz .choice:disabled { cursor: default; }
.quiz .feedback { display: flex; gap: 14px; align-items: center; margin-top: 16px; }
.quiz .feedback img { width: 74px; flex: none; }
.quiz .score { text-align: center; }
.quiz .score img { width: 140px; }
.quiz .stars { font-size: 2rem; letter-spacing: 4px; }

/* forms */
.form-card { padding: 22px 24px; margin-bottom: 22px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; }
.form label.inline { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; }
.form label.inline input { margin-top: 5px; }
.form input[type=email], .form input:not([type]), .form input[type=text], .form select, .form textarea { font: 400 1rem var(--body); color: var(--ink); background: #fff; border: var(--line) solid var(--ink); border-radius: 12px; padding: 10px 12px; width: 100%; }
.form textarea { resize: vertical; }
.form fieldset { border: 2px dashed var(--ink-soft); border-radius: 14px; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.form legend { font-weight: 600; padding: 0 6px; }
.form button { align-self: flex-start; }
.form hr { border: 0; border-top: 2px dashed var(--ink-soft); width: 100%; }
.form .row { flex-direction: row; }
.perks { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 6px; font-weight: 600; }
.notice { border: var(--line) solid var(--ink); border-radius: 14px; padding: 12px 16px; margin-bottom: 18px; font-weight: 600; }
.notice.ok { background: #c9f2d5; } .notice.bad { background: #ffd3cb; } .notice.warn { background: #fff3d6; }
.join-box { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; padding: 20px 22px; background: #fff3d6; }
.join-box > div { flex: 1 1 320px; }

/* printables */
.print-card { padding: 14px; display: flex; flex-direction: column; }
.print-card img { border: 2px solid var(--ink); border-radius: 10px; background: #fff; margin-bottom: 10px; }
.print-card h3 { font-size: 1.1rem; }
.print-card p:last-child { margin: auto 0 0; padding-top: 8px; }
.lock { font-size: .9rem; }

/* prose */
.prose h2 { margin-top: 1.5em; }
.prose li { margin-bottom: 6px; }

/* admin */
.admin .stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat { padding: 14px; text-align: center; } .stat b { display: block; font: 800 2rem var(--display); } .stat span { font-size: .9rem; }
.qlist { display: grid; gap: 14px; }
.q { padding: 14px 16px; } .qtext { font-size: 1.1rem; font-weight: 600; margin-bottom: 4px; }
.q .row { display: flex; gap: 8px; flex-wrap: wrap; } .q select, .q input { font: inherit; border: 2px solid var(--ink); border-radius: 10px; padding: 5px 8px; } .q input { flex: 1; min-width: 200px; }
.quizstats { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; } .quizstats .card { padding: 14px 16px; font-size: .92rem; }
.tbl { border-collapse: collapse; width: 100%; font-size: .92rem; } .tbl td { border-bottom: 1px solid #ddd; padding: 4px 6px; } .tbl td:last-child { text-align: right; }

/* footer */
.foot { background: var(--ink); color: var(--cream); margin-top: 40px; }
.foot-in { max-width: var(--max); margin: 0 auto; padding: 30px 16px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px 30px; }
.foot-about { display: flex; gap: 16px; align-items: flex-start; }
.foot-about img { flex: none; background: var(--sky); border-radius: 50%; border: 3px solid var(--cream); }
.foot-links { display: flex; flex-direction: column; gap: 6px; }
.foot a { color: var(--sky); }
.fine { grid-column: 1 / -1; font-size: .85rem; opacity: .8; margin: 0; }
@media (max-width: 700px) { .foot-in { grid-template-columns: 1fr; } }

@media print { .top, .foot, .video, .quiz { display: none; } .card { box-shadow: none; } }
