/* Styles for the simple text pages (About, Privacy, Terms, Contact).
   Colors match the tool in src/styles/tool.css. */
:root{
  --bg:#eef1f8; --panel:#ffffff; --text:#1b1d2a; --muted:#596079; --line:#d9deeb;
  --accent:#2747ff; --accent-ink:#ffffff; color-scheme:light;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#11131b; --panel:#1a1d28; --text:#e8ebf5; --muted:#a1a8bf; --line:#2c3142;
    --accent:#8395ff; --accent-ink:#0c0f2e; color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --bg:#11131b; --panel:#1a1d28; --text:#e8ebf5; --muted:#a1a8bf; --line:#2c3142;
  --accent:#8395ff; --accent-ink:#0c0f2e; color-scheme:dark;
}
*,*::before,*::after{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font:17px/1.6 "Atkinson Hyperlegible",system-ui,-apple-system,"Segoe UI",sans-serif}
:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
a{color:var(--accent)}
.pagetop{display:flex;align-items:center;gap:12px;max-width:760px;margin:0 auto;padding:18px 16px}
.pagetop a{display:flex;align-items:center;gap:12px;color:var(--text);text-decoration:none;font:400 30px/1 "Patrick Hand","Comic Sans MS",cursive}
.page{max-width:760px;margin:0 auto 28px;padding:24px clamp(16px,4vw,36px);background:var(--panel);border:1.5px solid var(--line);border-radius:16px}
.page h1,.page h2{font-family:"Patrick Hand","Comic Sans MS",cursive;font-weight:400;line-height:1.15}
.page h1{font-size:40px;margin:0 0 8px}
.page h2{font-size:28px;margin:28px 0 6px}
.page .updated{color:var(--muted);font-size:14px;margin-top:0}
.page .btn{display:inline-block;margin-top:8px;padding:10px 18px;border-radius:10px;background:var(--accent);color:var(--accent-ink);font-weight:700;text-decoration:none}
@media (max-width:520px){.page{border-radius:0;border-left:0;border-right:0}}
/* Story templates: the gallery and each template's page */
.page.wide{max-width:1040px}
.page .lead{font-size:18px;margin-top:0}
.page .crumbs{margin:0 0 4px;font-size:15px}
.tgrid{list-style:none;margin:16px 0 20px;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:16px}
.tgrid.small{grid-template-columns:repeat(3,minmax(0,1fr))}
.tgrid.small.four{grid-template-columns:repeat(4,minmax(0,1fr))}
.tgrid.small.four .tname{font-size:18px}
@media (max-width:600px){.tgrid.small,.tgrid.small.four{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.tgrid.small .tname{font-size:18px}}
.tcard a{display:flex;flex-direction:column;height:100%;background:var(--bg);border:1.5px solid var(--line);border-radius:14px;overflow:hidden;color:var(--text);text-decoration:none}
.tcard a:hover{border-color:var(--accent)}
.tcard img{display:block;width:100%;height:auto;aspect-ratio:1/1;background:#fff}
.tcard .tname{display:block;padding:10px 12px 0;font:400 22px/1.15 "Patrick Hand","Comic Sans MS",cursive}
.tcard .tline{display:block;padding:4px 12px 12px;font-size:14px;line-height:1.4;color:var(--muted)}
.tgrid.small .tname{padding-bottom:10px;font-size:20px}
.tuse{display:grid;grid-template-columns:minmax(0,240px) 1fr;gap:24px;align-items:start;margin:16px 0 8px}
.tpreview{display:block;width:100%;height:auto;aspect-ratio:9/16;border:2px solid var(--text);border-radius:14px;background:#fff}
.page .btn.big{margin-top:0;padding:14px 26px;font-size:20px}
.page .note{color:var(--muted);font-size:14px;margin:8px 0 0}
.tlines{padding-left:22px;margin:4px 0}
.tlines li{margin:4px 0}
.tuse h2{margin-top:20px}
@media (max-width:600px){.tuse{grid-template-columns:1fr}.tpreview{max-width:220px;margin:0 auto}}
/* Long YouTube templates (Shape: wide): a wide preview above the button */
.tuse.wide{grid-template-columns:1fr}
.tpreview.wide{aspect-ratio:16/9;max-width:640px}
@media (max-width:600px){.tpreview.wide{max-width:100%}}

/* Jokes: the hub and each category's page */
.page .btn.small{margin-top:0;padding:7px 14px;font-size:15px;white-space:nowrap}
.page .jwhen{background:var(--bg);border:1.5px solid var(--line);border-radius:10px;padding:8px 12px}
.jokes{margin:16px 0 8px;padding-left:34px}
.jokes li{padding:10px 0;border-bottom:1.5px solid var(--line)}
.jokes li::marker{font-weight:700;color:var(--muted)}
.jokes .jrow{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px}
.jtext{min-width:0;flex:1 1 260px}
.jtext p{margin:0}
.jtext p + p{margin-top:2px}
.jtext p:last-child{font-weight:700}
.jtext .them{padding-left:14px;color:var(--muted)}
.jtext p.them:last-child{color:var(--text)}
.jtext .answer{margin-top:4px}
.jtext .answer summary{cursor:pointer;color:var(--accent);font-weight:700;width:max-content;max-width:100%}
.jtext .answer p{font-weight:700;margin-top:2px}
/* Template categories: the filter buttons on /templates/ */
.tfilters{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 0}
.tfilter{font:700 15px/1 "Atkinson Hyperlegible",system-ui,sans-serif;padding:9px 14px;border-radius:999px;border:1.5px solid var(--line);background:var(--bg);color:var(--text);cursor:pointer}
.tfilter span{font-weight:400;color:var(--muted);margin-left:2px}
.tfilter:hover{border-color:var(--accent)}
.tfilter[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.tfilter[aria-pressed="true"] span{color:inherit}
.page .tcatnote{margin:10px 0 0}
.tcard[hidden]{display:none}
/* Joke pages with sections: the "On this page" list, and the copypasta box with its Copy button */
.jtoc{margin:14px 0 4px;font-size:15px}
.jtoc ul{display:flex;flex-wrap:wrap;gap:4px 16px;list-style:none;margin:4px 0 0;padding:0}
.jtoc a{color:var(--accent);font-weight:700}
.copypasta .cptext{background:var(--bg);border:1.5px solid var(--line);border-radius:10px;padding:10px 14px;margin-top:10px}
.copypasta .cptext p{margin:0 0 8px}
.copypasta .cptext p:last-child{margin:0}
.cpbtns{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}
.cpdone{font-size:14px;color:var(--muted)}
.copypasta button.btn{border:0;cursor:pointer;font:inherit;font-weight:700}
/* How to use pages: screenshots and the sample AI answer */
.page img.shot{display:block;max-width:100%;height:auto;border:1.5px solid var(--line);border-radius:12px;margin:12px 0 16px;background:var(--bg)}
.page img.shot.narrow{max-width:min(100%,436px)}
.page .howsteps a{font-weight:700}
.page pre.sample{white-space:pre-wrap;overflow-wrap:anywhere;background:var(--bg);border:1.5px solid var(--line);border-radius:10px;padding:10px 14px;font:14px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
/* Landing pages (stick figure animation maker, stickman video maker, Shorts, kids): buttons, lists, FAQ */
.page .ctas{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;margin:14px 0 6px}
.page .ctas .btn{margin-top:0}
.page .btn.ghost{background:transparent;color:var(--accent);border:1.5px solid var(--accent)}
.feats{list-style:none;margin:12px 0 8px;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}
.feats li{background:var(--bg);border:1.5px solid var(--line);border-radius:12px;padding:10px 14px;font-size:16px;line-height:1.45}
.feats strong{display:block;font-size:17px}
.page figure.shots{margin:12px 0 16px}
.page figure.shots img.shot{margin:0}
.page figure.shots figcaption{color:var(--muted);font-size:14px;margin-top:6px}
.faq details{border-bottom:1.5px solid var(--line);padding:8px 0}
.faq summary{cursor:pointer;font-weight:700}
.faq details p{margin:6px 0 2px}
.landlinks{list-style:none;margin:8px 0;padding:0;display:grid;gap:8px}
.landlinks li{display:flex;flex-direction:column}
.landlinks a{font-weight:700}
.landlinks span{color:var(--muted);font-size:15px}
.landcards .tgrid{grid-template-columns:repeat(3,minmax(0,1fr))}
.landcards .tname{font-size:20px}
@media (max-width:600px){.landcards .tgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.landcards .tname{font-size:18px}}
