/* ==========================================================================
   Shared base stylesheet for every site.
   Change a color, font, radius, or spacing value here and every page follows.
   Sections: 1 tokens, 2 reset, 3 star background, 4 type, 5 icons and buttons,
   6 cards chips and tags, 7 jagged edge, 8 mascot, 9 placeholders, 10 helpers.
   ========================================================================== */

/* 1. TOKENS ---------------------------------------------------------------- */
:root{
  /* brand pinks */
  --pink-50:#FFF6F9; --pink-100:#FFE6EE; --pink-200:#FFCFDF; --pink-300:#F8AFC8;
  --pink-400:#F08FB0; --pink-500:#E26C97; --pink-700:#B0306A;
  /* supporting colors */
  --plum-900:#33203B; --plum-700:#55405E; --plum-500:#7C6885;
  --cream:#FFFBF6; --white:#FFFFFF;
  --gold:#F3B63F; --butter:#FFE9A8; --mint:#C9EFE2; --sky:#CFE4FB; --lilac:#E3D6FA; --peach:#FFD9C2;

  /* roles: pages use these names, never the raw colors above */
  --page:var(--pink-50);
  --surface:var(--white);
  --surface-2:var(--pink-100);
  --ink:var(--plum-900);
  --ink-soft:var(--plum-700);
  --ink-faint:var(--plum-500);
  --line:#F3D3DF;
  --accent:var(--pink-700);        /* links and small text on light surfaces */
  --accent-fill:var(--pink-400);   /* button and badge fills */
  --on-accent:var(--plum-900);
  --star:#F6C6D7;                  /* drifting background stars */
  --star-opacity:.55;
  --focus:#7A4BD1;
  --shadow:0 6px 0 rgba(176,48,106,.14), 0 14px 30px rgba(176,48,106,.10);
  --shadow-press:0 2px 0 rgba(176,48,106,.18);

  /* fonts: the two families are set per site in one place */
  --font-display:"Fredoka","Nunito",system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-body:"Nunito",system-ui,-apple-system,"Segoe UI",sans-serif;

  /* type scale */
  --fs-xs:.82rem; --fs-sm:.92rem; --fs-md:1.0625rem; --fs-lg:1.3rem;
  --fs-xl:1.7rem; --fs-2xl:clamp(2.1rem,6vw,3.4rem);

  /* shape and spacing */
  --r-sm:12px; --r-md:20px; --r-lg:28px; --r-pill:999px;
  --sp-1:6px; --sp-2:10px; --sp-3:16px; --sp-4:24px; --sp-5:36px; --sp-6:56px;
  --maxw:1080px;
  --ease:cubic-bezier(.2,.8,.2,1);
}

:root[data-theme=dark]{
  --page:#1A141D;
  --surface:#261D2B;
  --surface-2:#30243A;
  --ink:#F6EAF0;
  --ink-soft:#D9C6D2;
  --ink-faint:#AC98A8;
  --line:#43324B;
  --accent:#F7A8C4;
  --accent-fill:#F08FB0;
  --on-accent:#2A1830;
  --star:#8E7A93;
  --star-opacity:.16;
  --focus:#C9A8FF;
  --shadow:0 6px 0 rgba(0,0,0,.35), 0 14px 30px rgba(0,0,0,.30);
  --shadow-press:0 2px 0 rgba(0,0,0,.4);
}

/* 2. RESET ----------------------------------------------------------------- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth;scroll-padding-top:84px}
body{margin:0;background:var(--page);color:var(--ink);font:500 var(--fs-md)/1.65 var(--font-body);overflow-x:hidden;min-height:100vh}
img,svg{max-width:100%;display:block}
h1,h2,h3,p,ul,ol,figure,dl,dd{margin:0}
ul,ol{padding:0;list-style:none}
a{color:var(--accent);text-underline-offset:3px}
button{font:inherit;color:inherit}
:focus-visible{outline:3px solid var(--focus);outline-offset:3px;border-radius:6px}
.skip{position:absolute;left:-999px;top:8px;z-index:200;background:var(--surface);color:var(--ink);padding:10px 16px;border-radius:var(--r-pill);font-weight:800}
.skip:focus{left:8px}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.001s!important;animation-iteration-count:1!important;transition-duration:.001s!important}
}

/* 3. STAR BACKGROUND (kept from the earlier site: rounded stars on a 96px tile, drifting diagonally) */
.bg{position:fixed;inset:-96px;z-index:-1;pointer-events:none;background-color:var(--star);opacity:var(--star-opacity);
  -webkit-mask:var(--star-tile) 0 0/96px 96px repeat;mask:var(--star-tile) 0 0/96px 96px repeat;
  animation:drift 24s linear infinite}
:root{--star-tile:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cpolygon points='20.6,11.4 26.5,17.5 34.9,16.9 31.0,24.4 34.1,32.2 25.8,30.8 19.3,36.1 18.1,27.8 11.0,23.3 18.6,19.6' fill='%23000' stroke='%23000' stroke-width='7' stroke-linejoin='round'/%3E%3Cpolygon points='68.6,59.4 74.5,65.5 82.9,64.9 79.0,72.4 82.1,80.2 73.8,78.8 67.3,84.1 66.1,75.8 59.0,71.3 66.6,67.6' fill='%23000' stroke='%23000' stroke-width='7' stroke-linejoin='round'/%3E%3C/svg%3E")}
@keyframes drift{to{transform:translate(96px,96px)}}
@media (prefers-reduced-motion:reduce){.bg{animation:none}}

/* 4. TYPE ------------------------------------------------------------------ */
h1,h2,h3,.display{font-family:var(--font-display);font-weight:600;line-height:1.12;letter-spacing:.005em;color:var(--ink)}
h1{font-size:var(--fs-2xl)}
h2{font-size:var(--fs-xl)}
h3{font-size:var(--fs-lg)}
.eyebrow{font-family:var(--font-display);font-weight:600;font-size:var(--fs-sm);letter-spacing:.08em;text-transform:uppercase;color:var(--accent)}
.lead{font-size:var(--fs-lg);line-height:1.5;color:var(--ink)}
.soft{color:var(--ink-soft)}
.small{font-size:var(--fs-sm)}
.num{font-family:var(--font-display);font-weight:600;font-variant-numeric:tabular-nums}

/* 5. BUTTONS (icons live in icons.css) -------------------------------------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:10px 22px;border:0;border-radius:var(--r-pill);
  background:var(--accent-fill);color:var(--on-accent);font-family:var(--font-display);font-weight:600;font-size:var(--fs-md);text-decoration:none;cursor:pointer;
  box-shadow:var(--shadow);transition:transform .18s var(--ease),box-shadow .18s var(--ease)}
.btn:hover{transform:translateY(-2px)}
.btn:active{transform:translateY(3px);box-shadow:var(--shadow-press)}
.btn-quiet{background:var(--surface);color:var(--ink);box-shadow:inset 0 0 0 2px var(--line),var(--shadow)}
.btn-icon{width:48px;padding:0}

/* 6. CARDS, CHIPS, TAGS ---------------------------------------------------- */
.card{background:var(--surface);border-radius:var(--r-lg);padding:var(--sp-4);box-shadow:var(--shadow)}
.chip{display:inline-flex;align-items:center;gap:8px;padding:7px 14px;border-radius:var(--r-pill);background:var(--surface-2);color:var(--ink);font-weight:700;font-size:var(--fs-sm)}
.chips{display:flex;flex-wrap:wrap;gap:10px}
.tag{display:inline-block;padding:3px 12px;border-radius:var(--r-pill);background:var(--surface-2);color:var(--accent);font-family:var(--font-display);font-weight:600;font-size:var(--fs-xs);letter-spacing:.04em}

/* 7. JAGGED EDGE (kept from the earlier site: 24 by 10 teeth). Add .jag to a block with a solid --jag color. */
.jag{position:relative;--jag:var(--surface-2);background:var(--jag)}
.jag::after{content:"";position:absolute;left:0;right:0;top:calc(100% - 1px);height:11px;background:var(--jag);pointer-events:none;
  -webkit-mask:var(--tooth) 50% 0/24px 11px repeat-x;mask:var(--tooth) 50% 0/24px 11px repeat-x}
.jag-up::before{content:"";position:absolute;left:0;right:0;bottom:calc(100% - 1px);height:11px;background:var(--jag);pointer-events:none;
  -webkit-mask:var(--tooth-up) 50% 0/24px 11px repeat-x;mask:var(--tooth-up) 50% 0/24px 11px repeat-x}
:root{
  --tooth:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='11'%3E%3Cpolygon points='0,0 24,0 24,1 12,11 0,1' fill='%23000'/%3E%3C/svg%3E");
  --tooth-up:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='11'%3E%3Cpolygon points='0,11 24,11 24,10 12,0 0,10' fill='%23000'/%3E%3C/svg%3E");
}

/* 8. MASCOT ---------------------------------------------------------------- */
.panda{width:64px;height:auto;aspect-ratio:172/156;flex:none;overflow:visible}
.panda .ears,.panda .patch,.panda .nose{fill:var(--panda-dark,#3B2340)}
.panda .head{fill:var(--panda-face,#FFFDF9);stroke:var(--panda-dark,#3B2340);stroke-width:5}
.panda .eye-star{fill:var(--gold)}
/* current eyes: a soft rounded star in the face color, with a small shine dot */
.panda .eye-soft{fill:var(--panda-face,#FFFDF9);stroke:var(--panda-face,#FFFDF9);stroke-width:4.5;stroke-linejoin:round}
.panda .shine{fill:var(--panda-dark,#3B2340);opacity:.9}
.panda .cheek{fill:var(--pink-300)}
.panda .mouth{fill:none;stroke:var(--panda-dark,#3B2340);stroke-width:4;stroke-linecap:round}
:root[data-theme=dark] .panda{--panda-dark:#120C15;--panda-face:#F6EFEA}
:root[data-theme=dark] .panda .head{stroke:#F6EFEA}
:root[data-theme=dark] .panda .ears{stroke:#F6EFEA;stroke-width:5}

/* character outlines match the interface outline at any size */
/* --cw is the outline width. Small spots set a thinner one so tiny characters stay readable. */
.panda .head,.panda .ears,.buddy .o{vector-effect:non-scaling-stroke;stroke-width:var(--cw,var(--bw,3px))!important}
.panda .ears{stroke:var(--panda-dark,#3B2340)}
.panda .mouth,.buddy .l{vector-effect:non-scaling-stroke;stroke-width:var(--cl,2.5px)}

/* 9. PLACEHOLDERS: every unfinished spot uses this one look, plus a data-placeholder attribute */
[data-placeholder]{border:2px dashed var(--pink-300);border-radius:var(--r-md);background:transparent;padding:var(--sp-3);color:var(--ink-soft);font-size:var(--fs-sm)}
[data-placeholder]::before{content:"Work in progress";display:block;width:max-content;margin-bottom:6px;padding:2px 12px;border-radius:var(--r-pill);background:var(--butter);color:#4A3608;font-family:var(--font-display);font-weight:600;font-size:var(--fs-xs)}
/* one switch: sections that hold only placeholders stay hidden until this attribute is removed */
[data-hide-until-filled]{display:none!important}

/* 10. HELPERS -------------------------------------------------------------- */
.wrap{width:min(100% - 32px,var(--maxw));margin-inline:auto}
.stack>*+*{margin-top:var(--sp-3)}
.row{display:flex;flex-wrap:wrap;gap:var(--sp-3);align-items:center}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* theme change: a circle opens from the button that was pressed */
::view-transition-old(root),::view-transition-new(root){animation:none;mix-blend-mode:normal}
::view-transition-new(root){animation:reveal .55s var(--ease)}
@keyframes reveal{from{clip-path:circle(0 at var(--vx,50%) var(--vy,50%))}to{clip-path:circle(150vmax at var(--vx,50%) var(--vy,50%))}}
@media (prefers-reduced-motion:reduce){::view-transition-new(root){animation:none}}

/* cursor star trail: mouse devices only, off for reduced motion, never blocks clicks */
.trail{position:fixed;left:0;top:0;z-index:9990;width:14px;height:14px;pointer-events:none;background:var(--c,#F08FB0);
  clip-path:polygon(50% 0,63% 34%,100% 38%,72% 62%,80% 100%,50% 80%,20% 100%,28% 62%,0 38%,37% 34%);animation:trail .7s ease-out forwards}
@keyframes trail{from{opacity:.95}to{opacity:0;transform:translate(var(--x),calc(var(--y) + 26px)) scale(.3) rotate(120deg)}}

/* custom cursor: a soft pink arrow, and a white arrow with a star over anything that can be pressed. Mouse devices only. */
@media (hover:hover) and (pointer:fine){
  html{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M5 3 L5 25 L11 19.5 L15 28 L19.5 26 L15.5 18 L23.5 18 Z' fill='%23F8AFC8' stroke='%2333203B' stroke-width='2.4' stroke-linejoin='round'/%3E%3C/svg%3E") 5 3,auto}
  :is(a,button,summary,label,[role=tab],[role=button]){cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M5 3 L5 25 L11 19.5 L15 28 L19.5 26 L15.5 18 L23.5 18 Z' fill='%23FFFDF9' stroke='%2333203B' stroke-width='2.4' stroke-linejoin='round'/%3E%3Cpath d='M25 3 L26.6 7 L30.6 7.4 L27.6 10.2 L28.5 14.2 L25 12.1 L21.5 14.2 L22.4 10.2 L19.4 7.4 L23.4 7 Z' fill='%23F08FB0' stroke='%2333203B' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") 5 3,pointer!important}
}

/* scrollbar: a pink pill with a star in the middle */
::-webkit-scrollbar{width:16px;height:16px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{min-height:56px;border:4px solid transparent;border-radius:999px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 L14.6 9 L21 9.6 L16.2 13.9 L17.6 20.2 L12 16.9 L6.4 20.2 L7.8 13.9 L3 9.6 L9.4 9 Z' fill='%23fff' stroke='%23fff' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") center/11px 11px no-repeat padding-box,var(--accent-fill) padding-box}
::-webkit-scrollbar-thumb:hover{background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 L14.6 9 L21 9.6 L16.2 13.9 L17.6 20.2 L12 16.9 L6.4 20.2 L7.8 13.9 L3 9.6 L9.4 9 Z' fill='%23fff' stroke='%23fff' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") center/11px 11px no-repeat padding-box,var(--pink-500) padding-box}
@supports (-moz-appearance:none){html{scrollbar-color:var(--accent-fill) transparent;scrollbar-width:thin}}

/* scattered stars around the mouse (replaces the single-file trail) */
.spark{position:fixed;left:0;top:0;z-index:9990;pointer-events:none;background:var(--c,#F08FB0);filter:drop-shadow(0 0 1px rgba(51,32,59,.35));
  clip-path:polygon(50% 0,63% 34%,100% 38%,72% 62%,80% 100%,50% 80%,20% 100%,28% 62%,0 38%,37% 34%);animation:spark var(--t,.8s) ease-out forwards}
@keyframes spark{
  0%{opacity:0;transform:translate(var(--x),var(--y)) scale(.3)}
  18%{opacity:1;transform:translate(var(--x),var(--y)) scale(1.1)}
  100%{opacity:0;transform:translate(calc(var(--x) + var(--dx)),calc(var(--y) + var(--dy))) scale(.25) rotate(var(--r))}
}

/* scroll marker: the browser bar is hidden on mouse devices and a star on a dotted line takes its place */
@media (hover:hover) and (pointer:fine){
  html{scrollbar-width:none}
  ::-webkit-scrollbar{display:none;width:0;height:0}
}
.sbar{position:fixed;right:4px;top:96px;bottom:96px;width:26px;z-index:70;opacity:0;pointer-events:none;transition:opacity .25s;cursor:grab;touch-action:none}
.sbar.on{opacity:1;pointer-events:auto}
.sbar::before{content:"";position:absolute;left:50%;top:6px;bottom:6px;border-left:4px dotted var(--pink-300);transform:translateX(-50%)}
.sbar-star{position:absolute;left:0;top:0;width:26px;height:26px;background:var(--accent-fill);
  clip-path:polygon(50% 2%,62% 33%,96% 37%,71% 60%,79% 96%,50% 78%,21% 96%,29% 60%,4% 37%,38% 33%);filter:drop-shadow(0 2px 0 rgba(51,32,59,.25));transition:scale .15s}
.sbar:hover .sbar-star{scale:1.2}

/* text selection: baby pink, never the browser blue */
::selection{background:#FFC9DC;color:#33203B}
::-moz-selection{background:#FFC9DC;color:#33203B}
html{-webkit-tap-highlight-color:rgba(240,143,176,.25)}

/* springy motion shared by anything that reacts to the mouse */
:root{--spring:cubic-bezier(.34,1.56,.64,1)}

/* "more below" chip */
.morecue{position:fixed;left:50%;bottom:20px;z-index:65;display:inline-flex;align-items:center;gap:6px;padding:6px 16px 6px 10px;border:0;border-radius:999px;background:var(--surface);color:var(--ink);
  font-family:var(--font-display);font-weight:600;font-size:.9rem;box-shadow:var(--shadow);opacity:0;pointer-events:none;transform:translate(-50%,14px);transition:opacity .25s,transform .35s var(--spring)}
.morecue.on{opacity:1;pointer-events:auto;transform:translate(-50%,0)}
.morecue .ic{width:18px;height:18px;color:var(--accent);animation:cue 1.4s ease-in-out infinite}
@keyframes cue{50%{transform:translateY(4px)}}

/* keyboard focus is the same pink everywhere, never browser blue */
:root{--focus:#B0306A}
:root[data-theme=dark]{--focus:#F7A8C4}
:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid var(--focus)}

/* one switch for every placeholder: set data-placeholders="hide" on the html tag */
:root[data-placeholders=hide] [data-placeholder],:root[data-placeholders=hide] .ph-row{display:none!important}

/* drawn cursor: shown only when the script switches it on for a mouse, and never with reduced motion */
html.curs-on,html.curs-on *,html.curs-on :is(a,button,summary,label,[role=tab],[role=button]){cursor:none!important}
html.curs-on :is(input,textarea){cursor:text!important}
html.curs-on dialog[open],html.curs-on dialog[open] *{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M5 3 L5 25 L11 19.5 L15 28 L19.5 26 L15.5 18 L23.5 18 Z' fill='%23F8AFC8' stroke='%2333203B' stroke-width='2.4' stroke-linejoin='round'/%3E%3C/svg%3E") 5 3,auto!important}
html.curs-on dialog[open] :is(a,button,[role=button]){cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M5 3 L5 25 L11 19.5 L15 28 L19.5 26 L15.5 18 L23.5 18 Z' fill='%23FFFDF9' stroke='%2333203B' stroke-width='2.4' stroke-linejoin='round'/%3E%3Cpath d='M25 3 L26.6 7 L30.6 7.4 L27.6 10.2 L28.5 14.2 L25 12.1 L21.5 14.2 L22.4 10.2 L19.4 7.4 L23.4 7 Z' fill='%23F08FB0' stroke='%2333203B' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") 5 3,pointer!important}
.curs{position:fixed;left:0;top:0;z-index:2147483000;width:32px;height:32px;pointer-events:none;opacity:0;transform-origin:5px 3px;will-change:transform;transition:opacity .12s}
.curs.on{opacity:1}
.curs.on.text{opacity:0}
.curs-in{position:absolute;inset:0;transform-origin:5px 3px;transition:transform .25s cubic-bezier(.34,1.56,.64,1)}
.curs svg{position:absolute;inset:0;width:32px;height:32px;transition:opacity .12s}
.curs .c-hand{opacity:0}
.curs.over .c-hand{opacity:1}
.curs.over .c-arrow{opacity:0}
.curs.over .curs-in{transform:scale(1.1)}
.curs-in.bop{animation:bop .36s cubic-bezier(.34,1.56,.64,1)}
@keyframes bop{0%{transform:scale(1)}35%{transform:scale(.7) rotate(-10deg)}70%{transform:scale(1.2) rotate(4deg)}100%{transform:scale(1)}}

/* stars around the mouse: no shadow filter, so each one is cheap to draw */
.spark{filter:none;will-change:transform,opacity}

/* the wavy line under a misspelled word is pink */
::spelling-error{text-decoration:wavy underline #F08FB0}
::grammar-error{text-decoration:wavy underline #F08FB0}
