/* Generated by scripts/import_paper_page.py -- do not edit by hand.
   Source: paper_page_release/index.html <style> block. */
.singlish-demo{
  color-scheme: light;
  --bg:#fcfcfb; --surface:#ffffff; --surface-2:#f4f4f2; --border:#e2e2dd;
  --ink:#1a1a19; --ink-2:#4a4a46; --ink-3:#77776f;
  --accent:#2171b5; --accent-soft:#e8f1f9;
  --grid:#e8e8e3;
  --c-real:#6e6e6e; --c-cb:#6baed6; --c-fcb:#2171b5;
  --c-cv:#fd8d3c; --c-fcv:#a63603; --c-idx:#31a354;
  --alt:#f2f2ef;
  --b1:#eaf2fb; --b1-ink:#1f6fb8;
  --b2:#f2ecfa; --b2-ink:#6b4bb5;
  --b3:#fdf3e6; --b3-ink:#a5691a;
  --b4:#e9f5f1; --b4-ink:#1f7d68;
  --radius:10px;
  --maxw:1080px;
}
.singlish-demo *{box-sizing:border-box}
/* scroll-padding keeps an anchor jump clear of the sticky bar, which is a
   bigger share of the viewport on a phone than on a laptop. */
.singlish-demo{-webkit-text-size-adjust:100%; scroll-padding-top:68px}
.singlish-demo{
  margin:0; background:var(--bg); color:var(--ink);
  font:16px/1.65 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  padding-top:env(safe-area-inset-top,0px); padding-bottom:env(safe-area-inset-bottom,0px);
}
.singlish-demo img{max-width:100%}
.singlish-demo [hidden]{display:none!important}
.singlish-demo .wrap{max-width:var(--maxw); margin:0 auto; padding-inline:20px}
.singlish-demo section{padding-block:56px; border-top:1px solid var(--border)}
.singlish-demo section:first-of-type{border-top:0}
/* Alternating bands. The sections sit inside .wrap, so the tint is bled to the
   viewport edges with a spread shadow rather than 100vw -- which would overflow
   by the scrollbar's width and put a horizontal scrollbar on the page. The
   clip-path keeps that bleed from counting as overflow. */
.singlish-demo section:nth-of-type(even){
  background:var(--alt);
  box-shadow:0 0 0 100vmax var(--alt);
  clip-path:inset(0 -100vmax);
}
.singlish-demo h1, .singlish-demo h2, .singlish-demo h3{line-height:1.25; margin:0 0 .5em}
.singlish-demo h1{font-size:clamp(2.72rem,4.4vw,4.16rem); letter-spacing:-.02em}
.singlish-demo h2{font-size:clamp(2rem,2.8vw,2.56rem); letter-spacing:-.01em}
.singlish-demo h3{font-size:1.632rem; letter-spacing:.01em}
.singlish-demo p{margin:0 0 1em}
.singlish-demo a{color:var(--accent)}
.singlish-demo code, .singlish-demo .mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:.9em}
.singlish-demo .muted{color:var(--ink-3)}
.singlish-demo .lead{font-size:1.696rem; color:var(--ink-2)}
.singlish-demo .eyebrow{font-size:1.2rem; text-transform:uppercase; letter-spacing:.09em;
  color:var(--ink-3); font-weight:600; margin-bottom:.7em}
/* ---------- top bar ---------- */
.singlish-demo .topbar{position:sticky; top:env(safe-area-inset-top,0px); z-index:50;
  background:color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter:blur(8px); border-bottom:1px solid var(--border)}
.singlish-demo .topbar .wrap{display:flex; align-items:center; gap:14px; height:52px}
.singlish-demo .topbar nav{display:flex; gap:4px; overflow-x:auto; flex:1; scrollbar-width:none}
.singlish-demo .topbar nav::-webkit-scrollbar{display:none}
.singlish-demo .topbar a{color:var(--ink-2); text-decoration:none; font-size:1.376rem;
  padding:5px 10px; border-radius:7px; white-space:nowrap}
.singlish-demo .topbar a:hover{background:var(--surface-2); color:var(--ink)}
.singlish-demo .topbar a.active{background:var(--accent-soft); color:var(--accent);
  font-weight:600}
.singlish-demo .iconbtn{background:var(--surface); border:1px solid var(--border); color:var(--ink-2);
  width:32px; height:32px; border-radius:8px; cursor:pointer; font-size:14px; flex:none}
.singlish-demo .iconbtn:hover{color:var(--ink); border-color:var(--ink-3)}
/* ---------- header ---------- */
.singlish-demo header.hero{padding-block:54px 40px}
.singlish-demo .venue{color:var(--accent); margin:.55em 0 .9em; font-size:1.504rem; font-weight:600}
.singlish-demo .byline{color:var(--ink-2); margin:.2em 0 .1em; font-size:1.632rem}
.singlish-demo .affil{color:var(--ink-3); font-size:1.472rem; margin-bottom:1.3em}
.singlish-demo .badges{display:flex; flex-wrap:wrap; gap:9px; margin-bottom:1.8em}
.singlish-demo .badge{display:inline-flex; align-items:center; gap:6px; padding:6px 13px;
  border:1px solid var(--border); border-radius:999px; background:var(--surface);
  color:var(--ink-2); text-decoration:none; font-size:1.36rem}
.singlish-demo .badge:hover{border-color:var(--accent); color:var(--accent)}
.singlish-demo .badge.primary{background:var(--accent); border-color:var(--accent); color:#fff}
.singlish-demo .badge.primary:hover{color:#fff; opacity:.9}
.singlish-demo details.abstract{border:1px solid var(--border); border-radius:var(--radius);
  background:var(--surface); padding:16px 18px}
.singlish-demo details.abstract summary{cursor:pointer; font-weight:600; font-size:1.52rem}
.singlish-demo details.abstract p{margin:.9em 0 0; color:var(--ink-2); font-size:1.52rem}
/* ---------- claim cards ---------- */
.singlish-demo .cards{display:grid; gap:16px; grid-template-columns:repeat(auto-fit,minmax(250px,1fr))}
.singlish-demo .card{background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius); padding:20px}
.singlish-demo .card .stat{font-size:3.2rem; font-weight:680; letter-spacing:-.02em; line-height:1.1}
.singlish-demo .card .stat .statand{font-size:.5em; font-weight:500; color:var(--ink-3);
  letter-spacing:0; padding:0 .38em}
.singlish-demo .card .statsub{font-size:1.312rem; color:var(--ink-3); margin-top:.35em}
.singlish-demo .card h3{margin:.85em 0 .4em}
.singlish-demo .card p{font-size:1.472rem; color:var(--ink-2); margin:0}
.singlish-demo .card .metric{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:.82em; padding:1px 6px; border-radius:5px; white-space:nowrap;
  background:var(--surface-2); border:1px solid var(--border); color:var(--ink)}
/* ---------- generic table ---------- */
.singlish-demo .tablewrap{overflow-x:auto; border:1px solid var(--border);
  border-radius:var(--radius); background:var(--surface);
  -webkit-overflow-scrolling:touch; overscroll-behavior-x:contain}
/* Scrolling shadows: the `local` cover panes ride with the content and uncover
   the `scroll`-attached shadows only while there is more table off that edge.
   Pure CSS, so a table that fits shows nothing -- which is the point, since on
   a phone the only cue that Table V continues past the viewport is this. */
.singlish-demo .scroll-x{
  background:
    linear-gradient(to right, var(--surface) 40%, transparent) 0 0 / 28px 100% no-repeat local,
    linear-gradient(to left,  var(--surface) 40%, transparent) 100% 0 / 28px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.17), transparent) 0 0 / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.17), transparent) 100% 0 / 12px 100% no-repeat scroll,
    var(--surface);
}
.singlish-demo table{border-collapse:collapse; width:100%; font-size:1.408rem; min-width:540px}
.singlish-demo th, .singlish-demo td{padding:9px 12px; text-align:right; border-bottom:1px solid var(--border)}
.singlish-demo td{white-space:nowrap}
.singlish-demo th{white-space:normal; vertical-align:middle}
.singlish-demo th .thmain{display:block}
.singlish-demo th .thsub{display:block; font-weight:400; text-transform:none;
  letter-spacing:0; font-size:1.184rem; color:var(--ink-3)}
.singlish-demo th:first-child, .singlish-demo td:first-child{text-align:left}
/* Subset is centred. Tagged by class, not position: on a row covered by the
   System rowspan the Subset cell is the first child, so nth-child would miss
   it and :first-child would left-align it. */
.singlish-demo #tableV th.col-subset, .singlish-demo #tableV td.col-subset{text-align:center}
.singlish-demo th{background:var(--surface-2); color:var(--ink-2); font-weight:600;
  position:sticky; top:0; font-size:1.248rem; text-transform:uppercase; letter-spacing:.05em}
.singlish-demo th.sortable{cursor:pointer; user-select:none}
.singlish-demo th.sortable:hover{color:var(--ink)}
.singlish-demo tbody tr:last-child td{border-bottom:0}
.singlish-demo tbody tr:hover{background:var(--surface-2)}
.singlish-demo td.best{font-weight:700; color:var(--ink)}
.singlish-demo tr.gt td{color:var(--ink-3); font-style:italic}
.singlish-demo .swatch{display:inline-block; width:10px; height:10px; border-radius:2px;
  margin-right:7px; vertical-align:baseline}
.singlish-demo td.merged{vertical-align:middle; background:var(--surface)}
.singlish-demo tbody tr:hover td.merged{background:var(--surface)}
/* ---------- controls ---------- */
.singlish-demo .controls{display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-bottom:22px}
/* Label + switch travel together so a wrap never orphans a label onto the
   line above its control; the phone query turns this column-wise. */
.singlish-demo .ctl-group{display:flex; align-items:center; gap:10px}
.singlish-demo .segmented{display:inline-flex; background:var(--surface-2); border:1px solid var(--border);
  border-radius:9px; padding:3px; gap:2px}
.singlish-demo .segmented button{border:0; background:transparent; color:var(--ink-2); cursor:pointer;
  font:inherit; font-size:1.344rem; padding:6px 13px; border-radius:6px; white-space:nowrap}
.singlish-demo .segmented button[aria-pressed="true"]{background:var(--surface); color:var(--ink);
  font-weight:600; box-shadow:0 1px 2px rgba(0,0,0,.08)}
.singlish-demo .ctl-label{font-size:1.248rem; color:var(--ink-3); text-transform:uppercase;
  letter-spacing:.06em; font-weight:600}
/* ---------- sample cards ---------- */
.singlish-demo .samples{display:grid; gap:18px}
.singlish-demo .sample{background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius); overflow:hidden}
.singlish-demo .sample-head{padding:14px 18px; border-bottom:1px solid var(--border)}
.singlish-demo .sample-meta{display:flex; flex-wrap:wrap; gap:7px; align-items:center}
.singlish-demo .chip{font-size:1.184rem; padding:2px 9px; border-radius:999px;
  background:var(--surface-2); color:var(--ink-3); border:1px solid var(--border)}
.singlish-demo .chip.tier-best{background:var(--accent-soft); color:var(--accent); border-color:transparent; font-weight:600}
.singlish-demo .sample-text{font-size:1.632rem; line-height:1.55; color:var(--ink)}
.singlish-demo .sample-text .particle{color:var(--accent); font-weight:600}
.singlish-demo .prompt-row{display:flex; flex-wrap:wrap; gap:12px 16px; align-items:center;
  padding:13px 18px; background:var(--surface-2); border-bottom:1px solid var(--border)}
.singlish-demo .prompt-row audio{flex:1 1 260px; min-width:0}
.singlish-demo .text-row{padding:14px 18px; border-bottom:1px solid var(--border)}
.singlish-demo .text-row .sample-text{margin-top:8px}
/* subheader: label + a help button carrying a hover/focus tooltip */
.singlish-demo .subhead{display:flex; align-items:center; gap:7px; flex:0 0 auto}
.singlish-demo .subhead > span{font-size:1.36rem; font-weight:600; color:var(--ink)}
.singlish-demo .help{width:16px; height:16px; flex:none; padding:0; cursor:help;
  border:1px solid var(--border); border-radius:50%; background:var(--surface);
  color:var(--ink-3); font:inherit; font-size:10.5px; line-height:1;
  display:inline-flex; align-items:center; justify-content:center}
.singlish-demo .help:hover, .singlish-demo .help:focus-visible{color:var(--accent); border-color:var(--accent)}
.singlish-demo #tip{position:fixed; z-index:200; max-width:min(290px, calc(100vw - 32px)); padding:9px 12px;
  background:var(--ink); color:var(--bg); border-radius:8px;
  font-size:1.264rem; line-height:1.5; pointer-events:none;
  box-shadow:0 4px 14px rgba(0,0,0,.22); opacity:0; transition:opacity .12s}
.singlish-demo #tip[data-show]{opacity:1}
.singlish-demo .rows{padding:6px 0}
.singlish-demo .row{display:grid; grid-template-columns:190px 1fr 168px; gap:14px;
  align-items:center; padding:9px 18px}
.singlish-demo .row + .row{border-top:1px solid var(--border)}
.singlish-demo .row.is-real{background:color-mix(in srgb, var(--surface-2) 60%, transparent)}
.singlish-demo .row.is-idx{border-top:2px solid var(--border)}
.singlish-demo .sysname{display:flex; align-items:center; gap:8px; font-size:1.392rem; font-weight:600}
.singlish-demo .sysname .mark{width:13px; height:13px; border-radius:3px; flex:none}
.singlish-demo .sysname small{display:block; font-weight:400; font-size:1.12rem; color:var(--ink-3)}
.singlish-demo audio{width:100%; height:34px; display:block}
.singlish-demo .scores{display:flex; gap:14px; justify-content:flex-end; font-size:1.248rem}
.singlish-demo .score{text-align:right; min-width:58px}
.singlish-demo .score .k{color:var(--ink-3); font-size:1.088rem; text-transform:uppercase; letter-spacing:.04em}
.singlish-demo .score .v{font-variant-numeric:tabular-nums; font-weight:600; color:var(--ink)}
.singlish-demo .meter{height:3px; background:var(--grid); border-radius:2px; margin-top:3px; overflow:hidden}
.singlish-demo .meter i{display:block; height:100%; border-radius:2px}
.singlish-demo .sysname-title{display:flex; align-items:center; gap:6px; white-space:nowrap}
.singlish-demo .sysname > span{flex:1 1 auto; min-width:0}
@media (max-width:720px){
.singlish-demo .row{grid-template-columns:1fr; gap:7px; padding:12px 16px}
.singlish-demo .scores{justify-content:flex-start}
.singlish-demo .sample-head, .singlish-demo .prompt-row{padding-inline:16px}
}
/* The prompt player and its label stop competing for one line well before the
   sample rows do -- 260px of flex-basis plus the label needs ~440px. */
@media (max-width:520px){
.singlish-demo .prompt-row{gap:8px}
.singlish-demo .prompt-row audio{flex:1 1 100%}
.singlish-demo .subhead{width:100%}
}
/* ---------- figures ---------- */
.singlish-demo .figure{background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius); padding:18px; margin-bottom:22px}
.singlish-demo .figure h3{margin:0 0 .25em}
.singlish-demo .figure .cap{font-size:1.36rem; color:var(--ink-3); margin:0 0 14px}
.singlish-demo .figure .cap.after{margin:12px 0 0}
.singlish-demo .plot{width:100%; min-height:300px}
.singlish-demo .grid2{display:grid; gap:18px; grid-template-columns:repeat(auto-fit,minmax(320px,1fr))}
/* ---------- method diagram ---------- */
/* No background here on purpose: .scroll-x supplies it as the last layer under
   the shadow panes, and a plain `background` on .diagram would outrank it. */
.singlish-demo .diagram{border:1px solid var(--border);
  border-radius:var(--radius); padding:20px 18px 16px;
  overflow-x:auto; -webkit-overflow-scrolling:touch; overscroll-behavior-x:contain}
.singlish-demo .diagram figure{margin:0}
/* The figure is an 820-unit viewBox whose smallest label is 9.8 units. Letting
   it shrink to a phone's width renders that label at ~3.6px -- so it gets a
   floor and the panel scrolls instead. 660px keeps the smallest type at ~8px. */
.singlish-demo .diagram svg{display:block; width:100%; min-width:660px; height:auto; color:var(--ink-3)}
.singlish-demo .diagram figcaption{margin-top:12px; font-size:1.328rem; color:var(--ink-3);
  line-height:1.55}
/* Shown only where the figure actually overflows; see the phone media query. */
.singlish-demo .swipehint{display:none; margin:10px 0 0; font-size:1.248rem; color:var(--ink-3)}
.singlish-demo .swipehint::after{content:" \2192"}
/* Diagram is styled entirely from CSS tokens, so a theme switch needs no
   re-render -- which also means the reveal animation is never reset. */
.singlish-demo .d-box{fill:var(--surface-2); stroke:var(--border); stroke-width:1}
.singlish-demo .d-box.accent{stroke:var(--accent); stroke-width:1.5}
.singlish-demo .d-t1{fill:var(--ink); font-size:12px; font-weight:600}
.singlish-demo .d-name{fill:var(--ink); font-size:11px; font-weight:600}
.singlish-demo .d-t2{fill:var(--ink-3); font-size:9.8px}
.singlish-demo .d-band{stroke:none}
.singlish-demo .d-band.b1{fill:var(--b1)}
.singlish-demo .d-band.b2{fill:var(--b2)}
.singlish-demo .d-band.b3{fill:var(--b3)}
.singlish-demo .d-band.b4{fill:var(--b4)}
.singlish-demo .d-stage{fill:var(--accent); font-size:10.5px; font-weight:700; letter-spacing:.1em}
.singlish-demo .d-num{font-size:14px; font-weight:700; letter-spacing:0}
.singlish-demo .d-stage.l1{fill:var(--b1-ink)}
.singlish-demo .d-stage.l2{fill:var(--b2-ink)}
.singlish-demo .d-stage.l3{fill:var(--b3-ink)}
.singlish-demo .d-stage.l4{fill:var(--b4-ink)}
.singlish-demo .d-lbl{fill:var(--ink-2); font-size:10px; font-weight:600}
.singlish-demo .d-emoji{font-size:20px;
  font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif}
.singlish-demo .d-emoji-sm{font-size:15px;
  font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif}
.singlish-demo .d-line{stroke:currentColor; stroke-width:1.5; fill:none}
/* Scroll-triggered reveal, stage by stage. */
.singlish-demo .diagram .stage{opacity:0; transform:translateY(12px);
  transition:opacity .9s ease, transform .9s cubic-bezier(.22,.61,.36,1)}
.singlish-demo .diagram.revealed .stage{opacity:1; transform:none}
.singlish-demo .diagram .stage.s2{transition-delay:.4s}
.singlish-demo .diagram .stage.s3{transition-delay:.8s}
.singlish-demo .diagram .stage.s4{transition-delay:1.2s}
.singlish-demo .diagram .d-line{stroke-dasharray:1; stroke-dashoffset:1;
  transition:stroke-dashoffset 1.1s ease}
.singlish-demo .diagram.revealed .d-line{stroke-dashoffset:0}
.singlish-demo .diagram.revealed .s2 .d-line{transition-delay:.4s}
.singlish-demo .diagram.revealed .s3 .d-line{transition-delay:.8s}
.singlish-demo .diagram.revealed .s4 .d-line{transition-delay:1.2s}
@media (prefers-reduced-motion: reduce){
.singlish-demo .diagram .stage{opacity:1; transform:none; transition:none}
.singlish-demo .diagram .d-line{stroke-dashoffset:0; transition:none}
}
.singlish-demo .explain{display:grid; gap:16px; grid-template-columns:repeat(auto-fit,minmax(290px,1fr));
  margin-top:20px}
.singlish-demo .explain .card h3{display:flex; align-items:center; gap:8px}
.singlish-demo .dl{margin:0; font-size:1.44rem}
.singlish-demo .dl dt{font-weight:600; color:var(--ink); margin-top:.7em}
.singlish-demo .dl dt:first-child{margin-top:0}
.singlish-demo .dl dd{margin:.15em 0 0; color:var(--ink-2)}
/* ---------- caveats ---------- */
.singlish-demo .caveat{background:var(--surface); border:1px solid var(--border);
  border-left:3px solid var(--accent); border-radius:var(--radius);
  padding:16px 18px; margin-bottom:14px}
.singlish-demo .caveat h3{margin:0 0 .35em; font-size:1.552rem}
.singlish-demo .caveat p{margin:0; font-size:1.456rem; color:var(--ink-2)}
.singlish-demo .caveat p + p{margin-top:.6em}
/* ---------- cite ---------- */
.singlish-demo pre.bib{background:var(--surface-2); border:1px solid var(--border);
  border-radius:var(--radius); padding:16px; overflow-x:auto;
  font-size:1.28rem; line-height:1.55; margin:0}
.singlish-demo .copybtn{background:var(--surface); border:1px solid var(--border); color:var(--ink-2);
  border-radius:7px; padding:5px 12px; font:inherit; font-size:1.28rem; cursor:pointer}
.singlish-demo .copybtn:hover{color:var(--ink); border-color:var(--ink-3)}
.singlish-demo footer{padding-block:40px 60px; border-top:1px solid var(--border);
  color:var(--ink-3); font-size:1.36rem}
/* ================================================================ responsive
   Three layers, each doing one job:
     <=860px  tablet -- tighten the chrome, nothing reflows yet
     <=600px  phone  -- gutters, rhythm, stacked controls, scroll affordances
     coarse pointer  -- hit targets, independent of width (a tablet in
                        landscape is 1024px wide and still finger-driven)
   Chart layout is NOT done here: Plotly draws into a canvas-like SVG that CSS
   cannot reflow, so the subplot grid is rebuilt in JS at the same 760px line.
   ------------------------------------------------------------------------- */
@media (max-width:860px){
.singlish-demo section{padding-block:46px}
.singlish-demo header.hero{padding-block:40px 32px}
.singlish-demo .figure, .singlish-demo .diagram{padding:16px 14px 14px}
.singlish-demo .explain{gap:14px; margin-top:16px}
.singlish-demo .cards{gap:14px}
}
@media (max-width:600px){
.singlish-demo .wrap{padding-inline:16px}
/* 16px gutter, no horizontal page scroll */
.singlish-demo section{padding-block:38px}
.singlish-demo header.hero{padding-block:30px 26px}
.singlish-demo h1{letter-spacing:-.015em}
.singlish-demo .lead{font-size:1.6rem}
.singlish-demo .card{padding:16px}
.singlish-demo .card .stat{font-size:2.8rem}
.singlish-demo .caveat{padding:14px 16px}
.singlish-demo .figure{padding:14px 12px 12px}
.singlish-demo .figure .cap{font-size:1.312rem}
/* Label above its own switch instead of beside it -- at this width the
     inline form wraps into a ragged two-and-a-half-line block. */
.singlish-demo .controls{gap:14px}
.singlish-demo .ctl-group{display:flex; flex-direction:column; align-items:flex-start;
    gap:6px; flex:1 1 100%}
.singlish-demo .ctl-group .segmented{width:100%}
.singlish-demo .ctl-group .segmented button{flex:1}
.singlish-demo .samples{gap:14px}
.singlish-demo .sample-text{font-size:1.568rem}
.singlish-demo .text-row, .singlish-demo .sample-head{padding-block:12px}
.singlish-demo .scores{gap:18px}
.singlish-demo .score{min-width:0; flex:1 1 0; max-width:120px}
/* Table V cannot usefully reflow -- eight numeric columns are the content.
     It scrolls, with the shadow cue carrying the fact that it does. */
.singlish-demo table{min-width:520px; font-size:1.344rem}
.singlish-demo th, .singlish-demo td{padding:8px 10px}
.singlish-demo th{font-size:1.152rem}
/* Pin the system name so the numbers scrolling past it stay attributable.
     :not(.col-subset) for the same reason the alignment rule above needs it --
     on a row covered by the System rowspan the Subset cell IS the first child,
     and without the guard it pins itself on top of the name it belongs to.
     Those rows then have no sticky cell, which is right: the merged cell above
     spans down over them and is itself sticky. */
.singlish-demo #tableV th:first-child:not(.col-subset), .singlish-demo #tableV td:first-child:not(.col-subset){
    position:sticky; left:0; z-index:2;
    background:var(--surface); box-shadow:1px 0 0 var(--border)}
.singlish-demo #tableV thead th:first-child{z-index:3; background:var(--surface-2)}
.singlish-demo #tableV tbody tr:hover td:first-child:not(.col-subset){background:var(--surface)}
.singlish-demo .diagram{padding:14px 12px 12px}
.singlish-demo .swipehint{display:block}
.singlish-demo pre.bib{font-size:1.152rem; padding:13px}
.singlish-demo footer{padding-block:30px 44px}
}
@media (max-width:380px){
.singlish-demo .topbar a{padding-inline:8px; font-size:1.312rem}
.singlish-demo .badge{padding:6px 11px; font-size:1.312rem}
.singlish-demo table{min-width:470px}
}
/* Hit targets. Keyed off the pointer, not the viewport: the 16px help dot and
   the 32px theme button are fine under a mouse and too small under a thumb. */
@media (pointer:coarse){
.singlish-demo .help{width:24px; height:24px; font-size:12px}
.singlish-demo .iconbtn{width:40px; height:40px; font-size:16px}
.singlish-demo .segmented button{padding:10px 14px; min-height:42px}
.singlish-demo .topbar .wrap{height:58px}
.singlish-demo .topbar a{padding-block:9px}
.singlish-demo .copybtn{padding:9px 14px}
.singlish-demo audio{height:40px}
/* :hover sticks after a tap on touch; these would latch on. */
.singlish-demo .topbar a:hover{background:transparent; color:var(--ink-2)}
.singlish-demo tbody tr:hover{background:transparent}
}

/* ---------------------------------------------------------------------------
   Site integration. Everything above is the paper page's own CSS, scoped to
   .singlish-demo; these rules bend it to this site's design: white background,
   Raleway, red accent, no alternating bands, no dark palette. The per-system
   colours (--c-*) are data encodings and stay as upstream.
   --------------------------------------------------------------------------- */
.singlish-demo {
  /* light band = this site's white; darker band = the paper page's own --alt */
  --bg:#ffffff; --surface:#ffffff; --surface-2:#f7f7f5; --alt:#f2f2ef;
  --border:#e4e4e0; --grid:#ebebe6;
  --ink:#212121; --ink-2:#4a4a46; --ink-3:#757575;
  --accent:red; --accent-soft:#fdecec;
  font-family:inherit;
  text-align:left;          /* the theme centres body text */
  padding-top:0; padding-bottom:0;
}
.singlish-demo h1, .singlish-demo h2, .singlish-demo h3 { font-family:inherit; }

/* Heading scale, lined up with the other research pages, which inherit
   Bootstrap's h2 30px / h3 24px over 14px body text. Sizes are in px because
   Bootstrap puts the root at 10px, which makes rem values easy to misread. */
.singlish-demo h2 { font-size:clamp(22px, 2.6vw, 29px); line-height:1.2; }
.singlish-demo h3 { font-size:20px; }
.singlish-demo .lead { font-size:17px; font-weight:400; }  /* Bootstrap's .lead is 300 */
.singlish-demo .eyebrow { font-size:12px; }
/* a chip in a figure heading is a label, not prose: it should wrap as one unit */
.singlish-demo .figure h3 .chip { display:inline-block; white-space:nowrap; vertical-align:middle; }
.singlish-demo .card .statsub { font-size:15px; }
.singlish-demo #tierNote { font-size:15px; }
.singlish-demo .st-provenance { font-size:14px; }
/* captions: upstream sets .85rem/.83rem, which reads small beside the 15.2px
   body text once the page sits in the site's type scale */
.singlish-demo .figure .cap, .singlish-demo .diagram figcaption { font-size:15px; }
@media (max-width:600px) {
  .singlish-demo .figure .cap, .singlish-demo .diagram figcaption { font-size:14px; }
}
.singlish-demo section { padding-block:40px; }
/* Alternating bands, as upstream. The tint is bled to the viewport edges with a
   spread shadow (not 100vw, which would overflow by the scrollbar width); the
   clip-path keeps that bleed from counting as overflow. `main` is a centred
   column here, so without the bleed the bands would stop at the text edge. */
.singlish-demo section:nth-of-type(even) {
  background:var(--alt);
  box-shadow:0 0 0 100vmax var(--alt);
  clip-path:inset(0 -100vmax);
}
.singlish-demo .wrap { padding-inline:0; }

/* Bootstrap 3 (loaded by the theme) also owns `.row` and `.mark`, and scoping
   our rules is not enough because these set properties ours never mention:
     - .row:before/:after are a clearfix (content:" "; display:table). In a grid
       container those pseudos are real grid items, so they take column 1 and push
       the system name, the player and the scores one column over -- the player
       ends up in the 168px scores column and the scores wrap onto a second row.
     - .row has margin:0 -15px, which pulls every row outside its card.
     - mark/.mark gets a yellow highlight and .2em padding, which inflates the
       little colour swatch beside each system name. */
.singlish-demo .row::before, .singlish-demo .row::after { content:none; }
.singlish-demo .row { margin-left:0; margin-right:0; }
.singlish-demo .mark { padding:0; }

/* static/css/research.css styles every table on a research page: #666 rules above
   and below the table, #eee zebra striping, and `margin:1em auto auto`. Table V
   carries its own grey header and hairline separators, so those generic rules are
   turned off inside the wrapper. The :not(:hover) keeps the demo's own row-hover
   highlight, which has the same specificity but loses on source order. */
.singlish-demo table { border-top:0; border-bottom:0; margin:0; }
.singlish-demo tr:nth-child(even):not(:hover) { background:transparent; }

/* in-page table of contents, replaces the page's own sticky top bar */
.singlish-demo .st-toc {
  display:flex; flex-wrap:wrap; gap:6px;
  margin:0 0 1.6em; padding-bottom:1.2em;
  border-bottom:1px solid var(--border);
}
.singlish-demo .st-toc a {
  color:var(--ink-2); text-decoration:none; font-size:14px;
  padding:5px 10px; border-radius:7px; white-space:nowrap;
}
.singlish-demo .st-toc a:hover { background:var(--surface-2); color:var(--ink); }
.singlish-demo .st-toc a.active {
  background:var(--accent-soft); color:var(--accent); font-weight:600;
}
/* upstream suppresses latched :hover on touch for its own nav (.topbar), which
   this TOC replaced */
@media (pointer:coarse) {
  .singlish-demo .st-toc a:hover { background:transparent; color:var(--ink-2); }
}

/* This stylesheet loads on the singlish-tts page only, so widening the column here does
   not affect the rest of the site (theme: 750px, research.css: 850px).
   `width:100%` is what keeps the page inside a phone viewport: main is a flex item
   of the theme's `body{display:flex}`, so with max-width alone its content (the
   charts, the 520px-min table) stretches it past the viewport and the whole page
   scrolls sideways. With an explicit width the inner .scroll-x / .tablewrap
   containers do the scrolling instead, which is what they are there for. */
main { width:100%; max-width:1100px; }
