/* "Cosmo" theme (2026-11-23) after tubik's cosmic-diner landing page: fire-engine red canvas, orange-yellow
   and purple panels, cream cards with thick black outlines and hard black shadows, chunky display type
   (Bungee), sparkle stars and ringed planets. Animated: twinkling stars, a floating planet, cards that pop
   in with a bounce, squashy buttons, a bobbing logo, a wobbling active tab. app.css already switches all
   animation off for prefers-reduced-motion. Applies when <html data-theme="cosmo">; Settings → Design. */
html[data-theme="cosmo"]{
  --bg:#e8332a; --bg2:#d42a22; --panel:#fff1d6; --panel2:#ffe7bd; --line:#f0d3a6; --line2:#111;
  --text:#111; --mute:#6b4a2f; --dim:#a8875f;
  --red:#e8332a; --yolk:#f9b61a; --grape:#5a35c9; --cream:#fff1d6;
  --acc:var(--yolk); --acc2:#eea400; --acc-text:#a34f00; --ink:#111;
  --dark:#111; --dark2:#2a2a2a; --on-dark:#fff1d6; --on-dark-mute:rgba(255,241,214,.72);
  --good:#1f8a3b; --mid:#a86a00; --bad:#c41f17; --blue:var(--grape); --pitch:#2f8f3f; --pitch2:#37994a;
  --head:"Bungee","Space Grotesk",system-ui,sans-serif; --body:"Space Grotesk",system-ui,sans-serif;
  --r:18px; --r-sm:12px; --bw:2.5px; --shadow:5px 5px 0 #111;
  --pop:cubic-bezier(.34,1.56,.64,1);
}
html[data-theme="cosmo"] body{background:var(--red);overflow-x:hidden}

/* ---------- animated sky: twinkling sparkles and a slowly floating ringed planet ---------- */
html[data-theme="cosmo"] body:before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:
    radial-gradient(circle,#fff 1.6px,transparent 2.4px) 0 0/140px 140px,
    radial-gradient(circle,#ffe29a 1.2px,transparent 2px) 70px 50px/190px 190px,
    radial-gradient(circle,#fff 1px,transparent 1.8px) 30px 110px/230px 230px;
  animation:cosmo-twinkle 3.2s ease-in-out infinite alternate}
html[data-theme="cosmo"] body:after{content:"";position:fixed;right:-60px;bottom:40px;width:300px;height:300px;z-index:-1;pointer-events:none;opacity:.55;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Ccircle cx='100' cy='100' r='58' fill='%23c4261f' stroke='%23111' stroke-width='5'/%3E%3Ccircle cx='80' cy='82' r='9' fill='none' stroke='%23111' stroke-width='4'/%3E%3Ccircle cx='122' cy='118' r='6' fill='none' stroke='%23111' stroke-width='4'/%3E%3Cellipse cx='100' cy='104' rx='96' ry='22' fill='none' stroke='%23111' stroke-width='5' transform='rotate(-18 100 100)'/%3E%3C/svg%3E") no-repeat center/contain;
  animation:cosmo-float 9s ease-in-out infinite}
@keyframes cosmo-twinkle{0%{opacity:.35}100%{opacity:.95}}
@keyframes cosmo-float{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-22px) rotate(8deg)}}
@keyframes cosmo-pop{0%{opacity:0;transform:translateY(18px) scale(.94)}100%{opacity:1;transform:none}}
@keyframes cosmo-bob{0%,100%{transform:translateY(0) rotate(-4deg)}50%{transform:translateY(-3px) rotate(4deg)}}
@keyframes cosmo-wobble{0%{transform:rotate(0)}30%{transform:rotate(-4deg) scale(1.05)}60%{transform:rotate(3deg)}100%{transform:rotate(0)}}
@keyframes cosmo-spark{0%,100%{transform:scale(.7) rotate(0);opacity:.6}50%{transform:scale(1.1) rotate(45deg);opacity:1}}

/* ---------- chrome: the reference's rounded, outlined header bar ---------- */
html[data-theme="cosmo"] .top{left:12px;right:12px;top:10px;height:56px;border-radius:16px;background:var(--cream);border:var(--bw) solid #111;box-shadow:var(--shadow)}
html[data-theme="cosmo"] main{padding-top:calc(var(--top) + 34px)}
html[data-theme="cosmo"] .side{top:calc(var(--top) + 18px)}
html[data-theme="cosmo"] .brand .wm{font:400 19px/1 var(--head);text-transform:uppercase;letter-spacing:.01em}
html[data-theme="cosmo"] .brand .wm small{font:700 9px var(--body);letter-spacing:.3em;color:var(--red)}
html[data-theme="cosmo"] .brand .mark svg{filter:none;animation:cosmo-bob 2.6s ease-in-out infinite}
html[data-theme="cosmo"] .lg-tile{fill:var(--yolk);stroke:#111;stroke-width:2.2}
html[data-theme="cosmo"] .lg-mark{fill:#111}


html[data-theme="cosmo"] .refresh{background:var(--yolk);border:var(--bw) solid #111;box-shadow:2px 2px 0 #111}
html[data-theme="cosmo"] .gwinfo{color:var(--mute)}
html[data-theme="cosmo"] .gwinfo b{font:400 15px var(--head)}
html[data-theme="cosmo"] .gwinfo .live{background:var(--red);color:#fff;border:2px solid #111}
html[data-theme="cosmo"] .gwinfo .live:before{background:#fff}

/* ---------- type on red: cream headings with a hard black drop ---------- */
html[data-theme="cosmo"] .head h1,html[data-theme="cosmo"] .onboard .big{font:400 clamp(30px,4.6vw,54px)/1 var(--head);color:var(--cream);text-transform:uppercase;text-shadow:3px 3px 0 #111;letter-spacing:.005em}
html[data-theme="cosmo"] .head h3{color:var(--yolk);font:700 12px var(--body);text-transform:uppercase;letter-spacing:.2em}
/* a twinkling sparkle after each page title, like the ✦ stars in the reference */
html[data-theme="cosmo"] .head h1:after{content:"✦";display:inline-block;margin-left:10px;font-size:.5em;color:#fff;vertical-align:.6em;text-shadow:none;animation:cosmo-spark 2.4s ease-in-out infinite}
html[data-theme="cosmo"] .head p,html[data-theme="cosmo"] .onboard p{color:rgba(255,241,214,.88)}
html[data-theme="cosmo"] .onboard .note,html[data-theme="cosmo"] main > .note{color:rgba(255,241,214,.8)}
html[data-theme="cosmo"] main > h3,html[data-theme="cosmo"] .onboard h3{color:var(--yolk)}
html[data-theme="cosmo"] h2{font:400 18px/1.15 var(--head);text-transform:uppercase;letter-spacing:.01em}
html[data-theme="cosmo"] h3{font:700 12px var(--body);text-transform:uppercase;letter-spacing:.12em;color:var(--mute)}
html[data-theme="cosmo"] .big,html[data-theme="cosmo"] .kpi .v,html[data-theme="cosmo"] .countdown,html[data-theme="cosmo"] .score,
html[data-theme="cosmo"] .statgrid b,html[data-theme="cosmo"] .pl .pt{font-family:var(--head);font-weight:400;letter-spacing:0}
html[data-theme="cosmo"] .big{font-size:60px;line-height:.95}
html[data-theme="cosmo"] .kpi .v{font-size:28px;line-height:1.05}
html[data-theme="cosmo"] .countdown{font-size:26px}

/* ---------- surfaces: cream cards, thick outline, hard shadow, bouncy entrance ---------- */
html[data-theme="cosmo"] .card,html[data-theme="cosmo"] .tbl,html[data-theme="cosmo"] .tile,html[data-theme="cosmo"] .tabs,
html[data-theme="cosmo"] .pitch,html[data-theme="cosmo"] .bench,html[data-theme="cosmo"] .sheet{border:var(--bw) solid #111;box-shadow:var(--shadow)}
/* only when a page is opened (app.js adds main.enter on navigation), not on the minute-by-minute live refresh */
html[data-theme="cosmo"] main.enter :is(.card,.tbl,.tile,.kpi){animation:cosmo-pop .55s var(--pop) both}
html[data-theme="cosmo"] main.enter .grid > :nth-child(2),html[data-theme="cosmo"] main.enter .tiles > :nth-child(2){animation-delay:.06s}
html[data-theme="cosmo"] main.enter .grid > :nth-child(3),html[data-theme="cosmo"] main.enter .tiles > :nth-child(3){animation-delay:.12s}
html[data-theme="cosmo"] main.enter .grid > :nth-child(4),html[data-theme="cosmo"] main.enter .tiles > :nth-child(4){animation-delay:.18s}
html[data-theme="cosmo"] main.enter .grid > :nth-child(5),html[data-theme="cosmo"] main.enter .tiles > :nth-child(5){animation-delay:.24s}
html[data-theme="cosmo"] main.enter .grid > :nth-child(n+6),html[data-theme="cosmo"] main.enter .tiles > :nth-child(n+6){animation-delay:.3s}
html[data-theme="cosmo"] .card,html[data-theme="cosmo"] .tbl,html[data-theme="cosmo"] .tile{background:var(--cream)}
html[data-theme="cosmo"] .kpi{background:var(--grape);color:#fff;border:var(--bw) solid #111;box-shadow:var(--shadow)}
html[data-theme="cosmo"] .kpi .l,html[data-theme="cosmo"] .kpi .s{color:rgba(255,255,255,.75)}
html[data-theme="cosmo"] .kpi:has(.big){background:var(--yolk);color:#111}
html[data-theme="cosmo"] .kpi:has(.big) .l,html[data-theme="cosmo"] .kpi:has(.big) .s{color:rgba(17,17,17,.7)}
html[data-theme="cosmo"] .grid > .kpi:nth-child(4n+3){background:var(--cream);color:#111}
html[data-theme="cosmo"] .grid > .kpi:nth-child(4n+3) .l,html[data-theme="cosmo"] .grid > .kpi:nth-child(4n+3) .s{color:var(--mute)}
html[data-theme="cosmo"] .kpi .accent{color:var(--yolk)}
html[data-theme="cosmo"] .kpi .good{color:#9ff0b0}
html[data-theme="cosmo"] .kpi .bad{color:#ffc2bd}
html[data-theme="cosmo"] .statgrid div{background:var(--cream);color:#111;border:2px solid #111;box-shadow:3px 3px 0 #111}
html[data-theme="cosmo"] .statgrid div:nth-child(3n+1){background:var(--yolk)}
html[data-theme="cosmo"] .statgrid div:nth-child(3n+2){background:var(--grape);color:#fff}
html[data-theme="cosmo"] .statgrid div:nth-child(3n+2) small{color:rgba(255,255,255,.75)}
html[data-theme="cosmo"] .statgrid small{color:var(--mute)}
html[data-theme="cosmo"] .statgrid b{font-size:20px}
/* lift and tilt on hover */
html[data-theme="cosmo"] .tile{transition:transform .25s var(--pop),box-shadow .25s}
html[data-theme="cosmo"] .tile:hover{transform:translate(-3px,-3px) rotate(-1.2deg);box-shadow:8px 8px 0 #111;background:var(--yolk)}
html[data-theme="cosmo"] .tile i{background:var(--red);color:#fff;border:2px solid #111}
html[data-theme="cosmo"] .tile b{font:400 15px var(--head);text-transform:uppercase}

/* ---------- buttons, tabs, chips: outlined and squashy ---------- */
html[data-theme="cosmo"] .btn{background:var(--cream);border:var(--bw) solid #111;box-shadow:3px 3px 0 #111;border-radius:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;font-size:12px;transition:transform .15s var(--pop),box-shadow .15s}
html[data-theme="cosmo"] .btn:hover{transform:translate(-2px,-2px);box-shadow:5px 5px 0 #111}
html[data-theme="cosmo"] .btn:active{transform:translate(3px,3px) scale(.97);box-shadow:0 0 0 #111}
html[data-theme="cosmo"] .btn.acc{background:var(--yolk);color:#111}
html[data-theme="cosmo"] .tabs{background:var(--cream);border-radius:14px}
html[data-theme="cosmo"] .tabs button{border-radius:10px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;font-size:12px}
html[data-theme="cosmo"] .tabs button.on{background:var(--red);color:#fff;border:2px solid #111;animation:cosmo-wobble .45s var(--pop)}
html[data-theme="cosmo"] .tag{border:2px solid #111;background:var(--cream);color:#111}
html[data-theme="cosmo"] .tag.acc{background:var(--yolk)}
html[data-theme="cosmo"] .tag.good{background:#d9f3de;color:var(--good)}
html[data-theme="cosmo"] .tag.bad{background:#ffd9d6;color:var(--bad)}
html[data-theme="cosmo"] .tag.mid{background:#ffecc0;color:var(--mid)}
html[data-theme="cosmo"] .score{background:var(--grape);color:#fff;border:2px solid #111;font-size:18px}
html[data-theme="cosmo"] .score.live{background:var(--yolk);color:#111}
html[data-theme="cosmo"] input[type=text],html[data-theme="cosmo"] input[type=number],html[data-theme="cosmo"] input[type=search],html[data-theme="cosmo"] select{background:#fff;border:var(--bw) solid #111;border-radius:12px}
html[data-theme="cosmo"] .filters label{color:var(--cream)}
html[data-theme="cosmo"] .toggle{border:2px solid #111;background:var(--panel2)}
html[data-theme="cosmo"] .toggle:before{top:1px;left:1px;background:#111}
html[data-theme="cosmo"] .toggle:checked{background:var(--yolk)}
html[data-theme="cosmo"] .toggle:checked:before{background:#111}
html[data-theme="cosmo"] .bar,html[data-theme="cosmo"] .worm{border:2px solid #111;height:12px;background:#fff}
html[data-theme="cosmo"] .bar i{background:var(--red)}
html[data-theme="cosmo"] .w-g{background:var(--red)}
html[data-theme="cosmo"] .w-a{background:var(--yolk)}
html[data-theme="cosmo"] .w-cs{background:var(--grape)}

/* ---------- navigation ---------- */
html[data-theme="cosmo"] .side a{color:var(--cream);font-weight:700;text-transform:uppercase;letter-spacing:.06em;font-size:13px}
html[data-theme="cosmo"] .side a i{background:var(--cream);color:#111;border:2px solid #111;transition:transform .25s var(--pop)}
html[data-theme="cosmo"] .side a:hover{background:rgba(255,241,214,.14)}
html[data-theme="cosmo"] .side a:hover i{transform:rotate(-10deg) scale(1.12)}
html[data-theme="cosmo"] .side a.on{background:var(--yolk);color:#111;border:var(--bw) solid #111;box-shadow:3px 3px 0 #111}
html[data-theme="cosmo"] .side a.on i{background:var(--red);color:#fff}
html[data-theme="cosmo"] .sheet{background:var(--cream)}
html[data-theme="cosmo"] .sheet a{background:#fff;border:2px solid #111}
html[data-theme="cosmo"] .sheet a i{background:var(--yolk);border:2px solid #111}
html[data-theme="cosmo"] .sheet:not([hidden]){animation:cosmo-pop .35s var(--pop)}
html[data-theme="cosmo"] .close{background:var(--yolk);color:#111;border:var(--bw) solid #111;box-shadow:3px 3px 0 #111}
html[data-theme="cosmo"] .toast{background:var(--yolk);color:#111;border:var(--bw) solid #111;box-shadow:var(--shadow);animation:cosmo-pop .4s var(--pop)}
html[data-theme="cosmo"] .modal .pane{background:var(--red);border-left:var(--bw) solid #111}
html[data-theme="cosmo"] .modal .pane h1{color:var(--cream);text-shadow:3px 3px 0 #111;font:400 clamp(26px,4vw,40px)/1.05 var(--head);text-transform:uppercase}
html[data-theme="cosmo"] .modal .pane .phead h3{color:var(--yolk)}
html[data-theme="cosmo"] .modal .pane .mc > p.note{color:rgba(255,241,214,.85)}
html[data-theme="cosmo"] .phead img{background:var(--yolk);border:var(--bw) solid #111;box-shadow:var(--shadow)}

/* ---------- tables ---------- */
html[data-theme="cosmo"] .tbl th{background:var(--yolk);color:#111;border-bottom:var(--bw) solid #111;font:700 11px var(--body);text-transform:uppercase;letter-spacing:.06em}
html[data-theme="cosmo"] .tbl th.sorted{background:var(--red);color:#fff;box-shadow:none}
html[data-theme="cosmo"] .tbl td{border-top:1.5px solid #e7cda0}
html[data-theme="cosmo"] .tbl tbody tr:hover{background:#ffe7bd}
html[data-theme="cosmo"] .tbl tr.me{background:#ffe08a}
html[data-theme="cosmo"] .tbl tr.mine{background:#e3f5d8}
html[data-theme="cosmo"] .tbl tr.rival{background:#e6defc}
html[data-theme="cosmo"] .kit{border:2px solid #111}

/* ---------- pitch ---------- */
html[data-theme="cosmo"] .pl .shirt{border:2.5px solid #111}
html[data-theme="cosmo"] .pl .nm{background:var(--cream);color:#111;border:2px solid #111}
html[data-theme="cosmo"] .pl .pt{background:var(--yolk);color:#111;border:2px solid #111;font-size:13px}
html[data-theme="cosmo"] .pl .badge{background:var(--red);color:#fff;border:2px solid #111}
html[data-theme="cosmo"] .bench{background:var(--grape)}
html[data-theme="cosmo"] .bench .pl .nm{background:var(--yolk)}

@media (max-width:820px){
  html[data-theme="cosmo"] .top{left:8px;right:8px;top:8px;height:52px}
  html[data-theme="cosmo"] main{padding-top:calc(var(--top) + 26px)}
  html[data-theme="cosmo"] .bottom{background:var(--cream);border:var(--bw) solid #111;box-shadow:var(--shadow)}
  html[data-theme="cosmo"] .bottom a,html[data-theme="cosmo"] .bottom button{color:var(--mute)}
  html[data-theme="cosmo"] .bottom i{border:2px solid #111;color:#111;background:#fff;transition:transform .2s var(--pop)}
  html[data-theme="cosmo"] .bottom a:active i{transform:scale(.85)}
  html[data-theme="cosmo"] .bottom .on{color:#111}
  html[data-theme="cosmo"] .bottom .on i{background:var(--yolk);border-color:#111;color:#111;animation:cosmo-wobble .45s var(--pop)}
  html[data-theme="cosmo"] .big{font-size:48px}
  html[data-theme="cosmo"] .kpi .v{font-size:22px}
  html[data-theme="cosmo"] body:after{width:200px;height:200px;right:-50px;bottom:110px}
}

/* form controls and buttons on the red page: dark text (they used to inherit the page's cream text, invisible on cream) */
html[data-theme="cosmo"] input[type=text],html[data-theme="cosmo"] input[type=number],html[data-theme="cosmo"] input[type=search],html[data-theme="cosmo"] select{color:#111}
html[data-theme="cosmo"] input::placeholder{color:#6b6b6b}
html[data-theme="cosmo"] select option{color:#111;background:#fff}
html[data-theme="cosmo"] .btn{color:#111}
html[data-theme="cosmo"] .mlist{border:2.5px solid #111;box-shadow:3px 3px 0 #111}
html[data-theme="cosmo"] .modal .pane .mc > p.mute{color:rgba(255,241,214,.88)} html[data-theme="cosmo"] .modal .pane .mc > h3{color:var(--yolk)}

/* Blog text that sits straight on the red page: the muted brown is unreadable there (2026-12-02) */
html[data-theme="cosmo"] main .bl :is(.bl-note,.bl-legend,.bl-src,h3.bl-eyebrow),html[data-theme="cosmo"] main .bl :is(.bl-note,.bl-src) a,html[data-theme="cosmo"] main .bl-share,html[data-theme="cosmo"] main .bl-share a{color:#111}
