/* Shared styles for the content pages (about, rules, contact, privacy, terms, show pages).
   Same world as the home page: Lilita One + Baloo 2, chunky ledges, white-stroked titles. */
:root {
  --ink: #2A2340; --ink-soft: #5B5470;
  --tomato: #D33A18; --tomato-deep: #A12A0F;
  --lilac: #EEE8FF;
  --display: "Lilita One", "Baloo 2", system-ui, sans-serif;
  --body: "Baloo 2", system-ui, sans-serif;
  --m: #8A63E8; --m-soft: #EAE2FF; --m-deep: #5B39C4;
}
/* Text in the page colour: a darker mix of --m-deep, so light show colours (Friends, Seinfeld, B99) still pass 4.5:1 */
body { --m-text: color-mix(in srgb, var(--m-deep) 72%, #000); }
* { box-sizing: border-box; margin: 0; }
body { font-family: var(--body); color: var(--ink); background: var(--lilac); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.btn { --b: var(--tomato); --bd: var(--tomato-deep); display: inline-flex; align-items: center; justify-content: center; gap: 12px; background: var(--b); color: #fff; font-family: var(--display); font-size: 24px; letter-spacing: .01em; padding: 18px 34px 16px; border-radius: 20px; box-shadow: 0 7px 0 var(--bd); text-decoration: none; transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 9px 0 var(--bd); }
.btn:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--bd); }

/* ---------- Header + menu ---------- */
.top { display: flex; justify-content: space-between; align-items: center; padding: 26px 5vw; position: sticky; top: 0; z-index: 30; transition: padding .3s, margin .3s; }
.logo { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-size: 28px; text-decoration: none; }
.logo svg { width: 46px; height: 46px; }
.logo .q { color: #C2300F; }
.menu-btn { width: 60px; height: 60px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink); display: grid; place-items: center; transition: transform .12s, box-shadow .12s, width .3s, height .3s; }
.menu-btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
.menu-btn span { display: grid; gap: 5px; }
.menu-btn i { display: block; width: 24px; height: 3.5px; border-radius: 3px; background: var(--ink); transition: transform .25s, opacity .2s; }
.menu-btn[aria-expanded="true"] i:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] i:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }
.menu { position: absolute; top: calc(100% - 4px); right: 5vw; width: 290px; padding: 16px; background: #fff; border: 3px solid var(--ink); border-radius: 28px; box-shadow: 0 8px 0 var(--ink); display: grid; gap: 12px; transform-origin: top right; transform: scale(.6) translateY(-10px); opacity: 0; pointer-events: none; transition: transform .3s cubic-bezier(.3,1.5,.5,1), opacity .2s; }
.menu.open { transform: none; opacity: 1; pointer-events: auto; }
.menu a { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 18px; background: var(--soft); border: 2.5px solid var(--deep); box-shadow: 0 4px 0 var(--deep); font-weight: 700; font-size: 18px; text-decoration: none; transition: transform .12s, box-shadow .12s; }
.menu a:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--deep); }
.menu a b { width: 38px; height: 38px; flex: none; border-radius: 12px; background: var(--deep); color: #fff; display: grid; place-items: center; }
.menu a b svg { width: 20px; height: 20px; }
/* Header search: round button beside the menu, pops open a show list (markup: menu_html() in build_site.py) */
.top-actions { display: flex; gap: 12px; }
.search-btn svg { width: 26px; height: 26px; color: var(--ink); }
.search { position: absolute; top: calc(100% - 4px); right: 5vw; width: min(360px, 90vw); padding: 16px; background: #fff; border: 3px solid var(--ink); border-radius: 28px; box-shadow: 0 8px 0 var(--ink); display: grid; gap: 14px; transform-origin: top right; transform: scale(.6) translateY(-10px); opacity: 0; pointer-events: none; transition: transform .3s cubic-bezier(.3,1.5,.5,1), opacity .2s; }
.search.open { transform: none; opacity: 1; pointer-events: auto; }
.search input { font: inherit; font-size: 18px; font-weight: 600; width: 100%; padding: 12px 16px; border-radius: 18px; border: 3px solid #E4DEF2; background: #FBFAFF; color: var(--ink); }
.search input:focus { outline: none; border-color: var(--ink); background: #fff; }
.search-pills { display: flex; flex-wrap: wrap; gap: 8px; max-height: min(52vh, 380px); overflow-y: auto; padding: 2px 2px 4px; }
.search .sf-pill { display: inline-block; font-weight: 800; font-size: 15px; padding: 7px 14px 5px; border-radius: 999px; background: var(--pastel); color: var(--ink); border: 2.5px solid var(--deep); text-decoration: none; transition: transform .12s; }
.search .sf-pill:hover { transform: translateY(-2px); }
.search .sf-pill[hidden] { display: none; }
.search-none { font-weight: 700; color: var(--ink-soft); }
/* Back arrow beside the search box: only shown on phones, where the search fills the screen */
.search-bar { display: flex; gap: 10px; align-items: center; }
.search-back { display: none; flex: none; width: 48px; height: 48px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); place-items: center; color: var(--ink); }
.search-back svg { width: 24px; height: 24px; }
/* Sticky header: transparent at the top, a white bar once the page scrolls (site.js sets .scrolled on <html>) */
/* Scrolled header: smaller logo and buttons, shorter bar, frosted see-through background (site.js sets .scrolled on <html>).
   The blur lives on ::before, not on .top: a filter on .top would trap the full-screen phone search inside the header bar. */
.top::before { content: ""; position: absolute; inset: 0; z-index: -1; transition: background .3s, box-shadow .3s; }
.scrolled .top { padding-top: 12px; padding-bottom: 12px; margin-bottom: 42px; }
.scrolled .top::before { background: rgba(255,255,255,.55); -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5); box-shadow: 0 1px 0 rgba(42,35,64,.1); }
.logo { transition: font-size .3s; } .logo svg { transition: width .3s, height .3s; }
.scrolled .logo { font-size: 22px; } .scrolled .logo svg { width: 36px; height: 36px; }
.scrolled .menu-btn { width: 46px; height: 46px; box-shadow: 0 4px 0 var(--ink); }
.scrolled .menu-btn i { width: 20px; }
.search-btn svg { transition: width .3s, height .3s; } .scrolled .search-btn svg { width: 22px; height: 22px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Page card (the pop-up look, as a page) ---------- */
main { flex: 1; padding: 70px 5vw 90px; display: grid; justify-items: center; }
.gm-card { position: relative; width: min(860px, 100%); padding: 84px 48px 44px; border-radius: 52px; border: 9px solid var(--m); background: linear-gradient(180deg, var(--m-soft) 75%, #fff); box-shadow: 0 12px 0 var(--m-deep), 0 40px 60px -20px rgba(42,35,64,.4); }
.gm-title { position: absolute; left: 50%; top: 0; translate: -50% -58%; rotate: -2deg; white-space: nowrap; font-family: var(--display); font-weight: 400; font-size: min(84px, max(24px, calc(90vw / (var(--len, 12) * .5)))); line-height: 1; color: var(--m-text); -webkit-text-stroke: .17em #fff;  /* size from the title length (--len) so long names fit on phones */ paint-order: stroke fill; filter: drop-shadow(0 6px 0 rgba(42,35,64,.12)); }
.gm-lead { text-align: center; font-size: 21px; line-height: 1.5; font-weight: 500; max-width: 46ch; margin: 0 auto 30px; }
.gm-lead strong { font-weight: 800; }

.acc { display: grid; gap: 18px; }
.acc details, .panel { background: #fff; border-radius: 30px; padding: 0 30px; box-shadow: 0 5px 0 rgba(42,35,64,.06); }
.acc summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0; font-weight: 800; font-size: 22px; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary .chev { flex: none; width: 50px; height: 50px; border-radius: 50%; border: 3px solid var(--m); color: var(--m-deep); background: #fff; box-shadow: 0 4px 0 var(--m); display: grid; place-items: center; transition: transform .3s cubic-bezier(.3,1.5,.5,1), background .2s; }
.acc summary .chev svg { width: 20px; height: 20px; }
.acc details[open] .chev { transform: rotate(180deg); background: var(--m-soft); }
.acc details p, .acc details ul, .panel p, .panel ul { font-size: 19px; line-height: 1.6; color: var(--ink-soft); font-weight: 500; padding-bottom: 22px; max-width: 64ch; }
.acc details ul, .panel ul { padding-left: 1.2em; }
.acc details a, .panel a, .gm-lead a { color: var(--m-text); font-weight: 700; text-underline-offset: 3px; }
.panel h2 { font-weight: 800; font-size: 22px; padding: 24px 0 8px; }
.stack { display: grid; gap: 18px; }
.updated { text-align: center; color: var(--ink-soft); font-size: 15px; font-weight: 600; margin-top: 26px; }

/* ---------- Contact form + thank-you ---------- */
.form { display: grid; gap: 16px; background: #fff; border-radius: 30px; padding: 28px 30px 30px; }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: 17px; }
.form input, .form textarea { font: inherit; font-size: 18px; font-weight: 500; padding: 14px 18px; border-radius: 18px; border: 3px solid #E4DEF2; background: #FBFAFF; color: var(--ink); resize: vertical; transition: border-color .2s; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--m); background: #fff; }
.form .btn { --b: var(--m-deep); --bd: color-mix(in srgb, var(--m-deep), #000 35%); margin-top: 8px; }
.form .note { font-size: 15px; color: var(--ink-soft); font-weight: 600; }
.form .error { color: #A1260F; font-weight: 700; }
.gm { margin: 0; padding: 0; border: 0; background: transparent; width: 100vw; height: 100vh; max-width: none; max-height: none; }
.gm::backdrop { background: rgba(42,35,64,.35); backdrop-filter: blur(10px); }
.gm[open] { display: grid; place-items: center; }
.gm .gm-card { width: min(520px, calc(100% - 40px)); text-align: center; animation: card-in .5s cubic-bezier(.3,1.4,.5,1); }
.gm .gm-lead { margin: 0 auto; }
.gm.closing .gm-card { animation: card-out .3s cubic-bezier(.4,0,1,1) forwards; }
.gm.closing::backdrop { animation: backdrop-out .3s ease-in forwards; }
@keyframes card-in { from { transform: scale(.7) translateY(30px); opacity: 0; } }
@keyframes card-out { to { transform: scale(.9) translateY(14px); opacity: 0; } }
@keyframes backdrop-out { to { opacity: 0; } }

/* ---------- Show pages ---------- */
.show-page .cast { display: block; width: min(420px, 90%); height: auto; margin: -10px auto 18px; filter: drop-shadow(0 12px 12px rgba(42,35,64,.18)); }
.play-row { display: flex; justify-content: center; margin: 6px 0 34px; }
.stack + .play-row { margin: 36px 0 6px; }  /* bottom Play button: clear the last panel */
.bts { display: grid; gap: 10px; padding: 0 0 18px 1.4em; max-width: 64ch; font-size: 18px; line-height: 1.55; color: var(--ink-soft); font-weight: 500; }
.bts li::marker { color: var(--m-text); font-weight: 800; }
.topics { display: flex; flex-wrap: wrap; gap: 10px; padding-bottom: 24px; list-style: none; padding-left: 0 !important; }
.topics li { background: var(--m-soft); color: var(--ink); border-radius: 999px; padding: 6px 14px 4px; font-size: 16px; font-weight: 700; }
.sample { display: grid; gap: 14px; padding: 0 0 26px; }
.sample li { list-style: none; }
.sample h4 { font-size: 19px; font-weight: 800; line-height: 1.4; margin-bottom: 8px; }
.sample ol { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; padding-left: 0; list-style: none; font-size: 17px; color: var(--ink-soft); font-weight: 600; }
.sample ol li::before { content: attr(data-k) ") "; font-weight: 800; color: var(--m-text); }
.sample details { margin-top: 8px; }
.sample summary { cursor: pointer; font-weight: 800; color: var(--m-text); font-size: 16px; }
.sample details p { padding: 6px 0 0; font-size: 17px; font-weight: 700; color: var(--ink); }
.sample > li + li { border-top: 2px dashed #E4DEF2; padding-top: 14px; }
.qa-topic { display: inline-block; background: var(--m-soft); color: var(--m-text); border-radius: 999px; padding: 6px 16px 4px; font-size: 17px; font-weight: 800; margin: 8px 0 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; padding-bottom: 14px; }
.panel a.chip { background: var(--m-soft); color: var(--m-text); border-radius: 999px; padding: 8px 18px 6px; font-size: 17px; text-decoration: none; }
.panel a.chip:hover { background: color-mix(in srgb, var(--m-soft), var(--m) 20%); }

@media (max-width: 640px) {
  .top { padding: 18px 5vw; }
  .logo { font-size: 22px; } .logo svg { width: 38px; height: 38px; }
  .menu-btn { width: 52px; height: 52px; }
  .scrolled .top { padding-top: 10px; padding-bottom: 10px; margin-bottom: 26px; }
  .scrolled .logo { font-size: 18px; } .scrolled .logo svg { width: 32px; height: 32px; }
  .scrolled .menu-btn { width: 42px; height: 42px; }
  .menu { width: min(290px, 90vw); }
  .search { position: fixed; inset: 0; width: auto; padding: 18px 5vw 24px; border: 0; border-radius: 0; box-shadow: none; align-content: start; overflow-y: auto; transform: translateY(14px); z-index: 60; }
  .search.open { transform: none; }
  .search-back { display: grid; }
  .search-pills { max-height: none; overflow: visible; }
  html.search-open { overflow: hidden; }
  .btn { font-size: 21px; padding: 16px 28px 14px; }
  main { padding: 54px 16px 60px; }
  .gm-card { padding: 64px 22px 26px; border-radius: 36px; border-width: 7px; }
  .gm-lead { font-size: 18px; }
  .acc details, .panel { padding: 0 20px; border-radius: 24px; }
  .acc summary { font-size: 19px; padding: 18px 0; }
  .acc summary .chev { width: 42px; height: 42px; }
  .acc details p, .acc details ul, .panel p, .panel ul { font-size: 17px; }
  .sample ol { grid-template-columns: 1fr; }
  .form { padding: 20px; }
}
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
}
