/* Beacon Dice · beacondice.com · site styles v2.0.1 (a roll every minute, named by its time; the show on one stage; colours in two named sets, Live and Gold)
   VOICE: a live sports broadcast for dice: always on, a big clock, results as they land, the proof on screen.
   IDEA: beacondice.com is a live feed (a new pair every minute, on the minute), so the site is its broadcast: the home page is the live show,
   a roll's page the replay, today's sums the stats desk, /tv the broadcast on a big screen. The casino drawings use the same look.
   PICTURE: two white 3D dice tumbling onto a navy stage, a red LIVE tag, a huge countdown, a HOW IT'S FAIR ticker under the header.
   COLOUR and TYPE: ground #0A0D14, panels #111624, white #F3F5F9, electric blue #3D7BFF (text links #7FA6FF), live red #FF3B5C,
   highlight gold #FFD166, verified green #3BE0A6; Big Shoulders for numbers and headings, Inter, JetBrains Mono for hashes and code.
   LAYOUT: one column up to 1120 px: the live stage first, then today's numbers, checking a roll, naming one, how it works.
   Motion is transforms and opacity only, and stops under reduced motion. */
@font-face { font-family: 'Big Shoulders'; src: url('/fonts/BigShoulders-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/JetBrainsMono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
:root {
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; --display: 'Big Shoulders', 'Arial Narrow', sans-serif; --mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: dark;
}
/* THE COLOURS: two named sets. The site uses one, set by data-colors on <html> (build.py's PALETTE); nothing below names a colour. */
:root, :root[data-colors="live"] {   /* Live: navy, electric blue, white dice */
  --ground: #0A0D14; --panel: #111624; --panel2: #182036; --white: #F3F5F9; --grey: #8B93A7; --soft: #C9CFDC; --dim: #7A8296; --faint: #4A5268;
  --acc: #3D7BFF; --acc2: #7FA6FF; --hi: #FFD166; --ok: #3BE0A6; --liv: #FF3B5C; --red: #FF6B83; --line: rgba(243,245,249,0.08);
  --acc-soft: rgba(61,123,255,0.18); --acc-faint: rgba(61,123,255,0.07); --acc-hover: #5C90FF; --hi-soft: rgba(255,209,102,0.14); --hi-glow: rgba(255,209,102,0.75);
  --ok-soft: rgba(59,224,166,0.14); --red-soft: rgba(255,107,131,0.14); --live-soft: rgba(255,59,92,0.15); --live-text: #FF7B90;
  --glow-a: rgba(61,123,255,0.18); --glow-b: rgba(61,123,255,0.04); --tbl-a: #0E1424; --tbl-b: #0B0F1B;
  --face: #F3F5F9; --face-rgb: 243,245,249; --pip: #0A0D14; --mk-dots: #8B93A7; --mk-dice: #F3F5F9;
  --hc: #C9CFDC; --hc-wait: #3D7BFF; --hc-cur: rgba(61,123,255,0.28); --thr: #7FA6FF; --thr-glow: rgba(61,123,255,0.6);
}
:root[data-colors="gold"] {   /* Gold: v1.0's near-black and #FFD424, gold dice */
  --ground: #050607; --panel: #0C0D0F; --panel2: #15171A; --white: #E6EDF5; --grey: #9AA4AE; --soft: #C3CAD2; --dim: #858E97; --faint: #3A3F45;
  --acc: #FFD424; --acc2: #FFD424; --hi: #FFD424; --ok: #FFD424; --liv: #FF7A6B; --red: #FF7A6B; --line: rgba(230,237,245,0.1);
  --acc-soft: rgba(255,212,36,0.16); --acc-faint: rgba(255,212,36,0.06); --acc-hover: #FFE066; --hi-soft: rgba(255,212,36,0.14); --hi-glow: rgba(255,212,36,0.7);
  --ok-soft: rgba(255,212,36,0.12); --red-soft: rgba(255,122,107,0.14); --live-soft: rgba(255,122,107,0.15); --live-text: #FF8E80;
  --glow-a: rgba(255,212,36,0.10); --glow-b: rgba(255,212,36,0.03); --tbl-a: #0E0F12; --tbl-b: #08090B;
  --face: #FFD424; --face-rgb: 255,212,36; --pip: #11161D; --mk-dots: #EEF2F6; --mk-dice: #FFD424;
  --hc: #9AA4AE; --hc-wait: #C9A925; --hc-cur: rgba(255,212,36,0.22); --thr: #F4F7FB; --thr-glow: rgba(230,237,245,0.6);
}
* { box-sizing: border-box; min-width: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--ground); color: var(--white); font: 16px/1.55 var(--font); overflow-x: clip; }
body:not(.tv) { min-height: 100vh; display: flex; flex-direction: column; }   /* a short page keeps its footer at the bottom */
body:not(.tv) > main { flex: 1 0 auto; }
a { color: var(--acc2); }
b { font-weight: 600; }
:focus-visible { outline: 2px solid var(--acc2); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 max(4vw, 16px); }
.nw { white-space: nowrap; }
.k2 { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.1em; color: var(--grey); }
.title { margin: 0; font: 800 34px/1 var(--display); letter-spacing: 0.01em; text-transform: uppercase; color: var(--white); }
.say { margin: 0; font-size: 16px; line-height: 1.6; color: var(--soft); max-width: 68ch; }
.caps { margin: 0; font-size: 15px; line-height: 1.6; color: var(--soft); max-width: 72ch; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header: the mark (white dice, grey ring) and the name in Big Shoulders; the nav's first item is LIVE */
.top { padding: 16px 0 14px; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px 28px; flex-wrap: wrap; }
.lk { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.lk .mk { width: 44px; height: 44px; flex: none; }
.lk .mk circle[fill="#EEF2F6"] { fill: var(--mk-dots); }
.lk .mk rect { fill: var(--mk-dice); filter: none; }
.lk .rw { font: 800 32px/1 var(--display); letter-spacing: 0.02em; color: var(--white); white-space: nowrap; }
.nav { display: flex; gap: 4px 26px; flex-wrap: wrap; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; color: var(--soft); text-decoration: none; }
.nav a:hover, .nav a[aria-current] { color: var(--white); box-shadow: inset 0 -3px 0 var(--acc); }
.nav a:first-child::before { content: ''; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--liv); animation: pulse 1.6s ease-in-out infinite; }
.nav .sh { display: none; }
@keyframes pulse { 50% { opacity: 0.25; } }

/* the HOW IT'S FAIR ticker: the same items twice, moved half its width so it loops */
.ticker { position: relative; display: flex; align-items: stretch; height: 46px; background: var(--panel); overflow: hidden; }
.tk-l { flex: none; display: flex; align-items: center; padding: 0 18px 0 max(4vw, 16px); background: var(--acc); color: var(--ground); font: 800 20px/1 var(--display); letter-spacing: 0.04em; white-space: nowrap; }
.tk-w { flex: 1; display: flex; align-items: center; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px); mask-image: linear-gradient(90deg, transparent, #000 36px); }
.tk-r { flex: none; display: flex; white-space: nowrap; animation: ticker 80s linear infinite; will-change: transform; }
.tk-r > span { flex: none; display: inline-flex; align-items: center; gap: 20px; padding-left: 20px; font-size: 15px; font-weight: 500; color: var(--soft); }
.tk-r i { flex: none; width: 7px; height: 7px; background: var(--acc); transform: rotate(45deg); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* footer */
.foot { margin-top: 64px; background: var(--panel); padding: 34px 0 48px; }
.foot .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 26px 40px; }
.foot .lk .mk { width: 38px; height: 38px; }
.foot .lk .rw { font-size: 27px; }
.foot .tg { margin-top: 12px; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; color: var(--grey); }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.foot li a { display: inline-flex; align-items: center; min-height: 36px; font-size: 14px; font-weight: 600; letter-spacing: 0.04em; text-decoration: none; }
.foot .small { grid-column: 1 / -1; font-size: 12px; font-weight: 500; letter-spacing: 0.08em; color: var(--dim); }

/* the dice: white 3D cubes with dark pips (faces front 1, back 6, right 3, left 4, top 5, bottom 2), turned by transforms only */
.pair { position: relative; display: flex; justify-content: center; align-items: center; gap: clamp(46px, 6.5vw, 88px); margin: 26px 0 30px; }
.pair .d { --s: clamp(104px, 14.5vw, 168px); position: relative; width: var(--s); height: var(--s); flex: none; perspective: calc(var(--s) * 5.5); will-change: transform; }
.pair .d::after { content: ''; position: absolute; left: 8%; right: 8%; bottom: -16%; height: 16%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,0.55), transparent); z-index: -1; }
.cube { position: absolute; inset: 0; transform-style: preserve-3d;
  --z: 0deg; --x: -16deg; --y: 18deg; --fx: 0deg; --fy: 0deg;
  transform: rotateZ(var(--z)) rotateX(var(--x)) rotateY(var(--y)) rotateX(var(--fx)) rotateY(var(--fy)); }
.cube .fc { position: absolute; inset: 0; padding: 15%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr));
  border-radius: 17%; background: var(--face); box-shadow: inset 0 0 0 1px rgba(10,13,20,0.10), inset 0 calc(var(--s) * -0.07) calc(var(--s) * 0.12) rgba(10,13,20,0.12); backface-visibility: hidden; }
.cube .fc i { display: block; }
.cube .fc .pp { width: 76%; aspect-ratio: 1; place-self: center; border-radius: 50%; background: var(--pip); box-shadow: inset 0 calc(var(--s) * 0.012) calc(var(--s) * 0.02) rgba(255,255,255,0.18); }
.cube .f1 { transform: translateZ(calc(var(--s) / 2)); }
.cube .f6 { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.cube .f3 { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.cube .f4 { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.cube .f5 { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.cube .f2 { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); }
.die { display: block; width: 100%; height: 100%; overflow: visible; }   /* a roll not rolled yet: a dashed outline with a question mark */
.die.q .face { fill: none; stroke: var(--grey); stroke-width: 3; stroke-dasharray: 9 7; }
.die.q text { fill: var(--grey); font: 800 46px var(--display); }
.pair.dim .d { opacity: 0.55; }
.pair.shake .d { animation: shake 0.42s ease-in-out infinite; }
.pair.shake .d + .d { animation-delay: -0.21s; }
/* a new roll: the pair drops in while each cube tumbles to its face (the page code listens for the end of 'throw') */
.pair.throw .d { animation: throw 1.35s cubic-bezier(.3,.75,.3,1) both; }
.pair.throw .d .cube { animation: tumble 1.35s cubic-bezier(.12,.7,.22,1) both; }
.pair.throw .d + .d, .pair.throw .d + .d .cube { animation-delay: 0.12s; }
@keyframes shake { 0%, 100% { transform: rotate(-4deg) translateY(0); } 50% { transform: rotate(4deg) translateY(-4px); } }
@keyframes throw { 0% { transform: translateY(-55%) scale(0.88); opacity: 0; } 15% { opacity: 1; } 52% { transform: translateY(5%) scale(1.02); } 70% { transform: translateY(-4%); } 86% { transform: translateY(1%); } 100% { transform: none; } }
@keyframes tumble {
  0% { transform: rotateZ(calc(var(--z) + 80deg)) rotateX(calc(var(--x) + 540deg)) rotateY(calc(var(--y) - 450deg)) rotateX(var(--fx)) rotateY(var(--fy)); }
  100% { transform: rotateZ(var(--z)) rotateX(var(--x)) rotateY(var(--y)) rotateX(var(--fx)) rotateY(var(--fy)); }
}
.mini { display: block; width: 30px; height: 30px; overflow: visible; }
.mini rect { fill: var(--face); }
.mini circle { fill: var(--pip); }

/* the live stage (home) and the replay stage (a roll's page) */
.hero { padding-top: 30px; padding-bottom: 8px; }
.hero .lead { margin: 0; max-width: 60ch; text-wrap: balance; font-size: 18px; line-height: 1.5; color: var(--soft); }
.table { position: relative; margin: 22px 0 0; border-radius: 24px; background: var(--panel); isolation: isolate; overflow: hidden; }
.table::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
[data-page=home] .table { padding: 32px 36px 34px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); grid-template-areas: "tag pair" "clock pair"; gap: 28px 40px; }
[data-page=home] .table::before { background: radial-gradient(ellipse 34% 62% at 70% 56%, var(--glow-a), var(--glow-b) 60%, transparent 76%); }
[data-page=home] .rolltag { grid-area: tag; align-self: start; }
[data-page=home] .pair { grid-area: pair; align-self: center; margin: 10px 0 20px; }
[data-page=home] .clock { grid-area: clock; align-self: end; }
.rolltag { margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font-size: 13px; font-weight: 600; line-height: 1.5; letter-spacing: 0.1em; color: var(--grey); text-wrap: balance; }
.rolltag b { display: block; margin-top: 4px; font: 800 clamp(64px, 8.4vw, 104px)/0.88 var(--display); letter-spacing: 0.005em; color: var(--white); white-space: nowrap; }
.rolltag .at { font-size: 16px; font-weight: 500; letter-spacing: 0.02em; color: var(--soft); }
.onair { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 6px 14px 6px 12px; border-radius: 20px; background: var(--live-soft); color: var(--live-text); font-size: 13px; font-weight: 700; letter-spacing: 0.12em; }
.onair i { width: 9px; height: 9px; border-radius: 50%; background: var(--liv); animation: pulse 1.4s ease-in-out infinite; }
.clock { position: relative; width: 100%; display: flex; flex-direction: column; }
.clock .k2 { order: 1; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px 20px; flex-wrap: wrap; }
.bar { order: 2; margin-top: 16px; height: 6px; border-radius: 3px; background: var(--acc-soft); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--acc); transform-origin: 0 50%; transform: scaleX(0); }
#lrNext { display: flex; flex-direction: column; gap: 4px; }
#lrNext .lbl { font-size: 13px; font-weight: 600; letter-spacing: 0.12em; color: var(--grey); }
#lrNext .num { font: 800 clamp(52px, 6vw, 76px)/0.9 var(--display); letter-spacing: 0.01em; color: var(--acc); font-variant-numeric: tabular-nums; }
#lrToday { font-size: 13px; letter-spacing: 0.08em; }
[data-page=roll] .hero { text-align: center; }
[data-page=roll] .table { padding: 40px 24px 32px; }
[data-page=roll] .table::before { background: radial-gradient(ellipse 40% 60% at 50% 45%, var(--glow-a), transparent 72%); }
[data-page=roll] .pair { margin: 8px 0 34px; }

/* buttons and links */
.acts { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.hero .acts { margin-top: 22px; }
[data-page=roll] .hero .acts { justify-content: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border: 0; border-radius: 24px; background: var(--acc); color: var(--ground);
  font: 600 15px var(--font); letter-spacing: 0.02em; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--acc-hover); }
.btn:disabled { opacity: 0.45; cursor: default; }
.more { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 600; letter-spacing: 0.04em; color: var(--acc2); text-decoration: none; }
.more:hover { text-decoration: underline; text-underline-offset: 4px; }
button.more { background: none; border: 0; padding: 0; font-family: inherit; cursor: pointer; }

/* earlier rolls: a results strip */
.earlier { margin-top: 36px; }
.earlier .k2 { margin-bottom: 12px; }
.ecards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.ecard { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px 12px; border-radius: 16px; background: var(--panel); text-decoration: none;
  color: var(--grey); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; }
.ecard:hover { background: var(--panel2); color: var(--white); }
.ecard .pr { display: flex; gap: 8px; margin-bottom: 4px; }
.ecard > span:nth-child(2) { font: 800 21px/1 var(--display); letter-spacing: 0.02em; color: var(--white); }

/* panels */
.sec { margin-top: 48px; }
.box { border-radius: 24px; background: var(--panel); padding: 30px 32px; display: flex; flex-direction: column; gap: 18px; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.hd { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; }

/* today's sums: the stats desk */
.sums { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 10px; align-items: end; height: 200px; padding-top: 22px; }
.sb { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; }
.sb .v { position: absolute; left: 0; right: 0; text-align: center; font-size: 12px; font-weight: 600; color: var(--grey); transform: translateY(-20px); }
.sb .fill { background: var(--acc); border-radius: 5px 5px 0 0; min-height: 2px; }
.sb .exp { position: absolute; left: -3px; right: -3px; height: 0; border-top: 2px dashed rgba(243,245,249,0.6); }
.sl { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 10px; margin-top: 8px; text-align: center; font: 800 20px/1 var(--display); color: var(--white); border-top: 1px solid var(--line); padding-top: 10px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 30px; align-items: baseline; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; }
.facts b { font: 800 24px/1 var(--display); letter-spacing: 0.02em; color: var(--white); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; }
.legend span::before { content: ''; display: inline-block; width: 14px; margin-right: 8px; vertical-align: middle; }
.legend .lg1::before { height: 8px; background: var(--acc); border-radius: 2px; }
.legend .lg2::before { border-top: 2px dashed rgba(243,245,249,0.6); }

/* forms */
.fields { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field input { font: 16px var(--font); color: var(--white); background: var(--ground); border: 1px solid rgba(243,245,249,0.16); border-radius: 12px; min-height: 46px; padding: 0 12px; }
.field input[type=date] { width: 182px; }
.field input[type=number] { width: 120px; }
.when { font-size: 13px; font-weight: 600; line-height: 1.5; letter-spacing: 0.06em; color: var(--grey); }
.when.no { color: var(--red); }
.example { margin: 0; padding: 16px 20px; border-left: 3px solid var(--acc); border-radius: 0 14px 14px 0; background: var(--acc-faint); font-size: 16px; line-height: 1.6; color: var(--soft); }

/* the recipe */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 34px; }
.steps li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; font-size: 15px; line-height: 1.6; color: var(--soft); }
.steps li span { font: 800 42px/0.9 var(--display); color: var(--acc); }
pre.code { margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--ground); font: 13px/1.65 var(--mono); color: var(--soft);
  white-space: pre; overflow-x: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.hash { font: 13px/1.6 var(--mono); overflow-wrap: anywhere; color: var(--dim); }
.hash .d { color: var(--soft); }
.hash .k { color: var(--hi); background: var(--hi-soft); border-radius: 3px; padding: 0 2px; }
.hash .more { font-family: var(--font); }

/* a roll's page: the replay */
.crumb { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.crumb .mid { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; color: var(--grey); }
.big { margin: 0; font: 800 clamp(64px, 11vw, 120px)/0.88 var(--display); letter-spacing: 0.005em; color: var(--white); }
#rWhen { font-size: 13px; }
.count { font: 800 clamp(56px, 11vw, 112px)/0.9 var(--display); letter-spacing: 0.01em; color: var(--acc); font-variant-numeric: tabular-nums; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 16px; border-radius: 18px; background: var(--ok-soft); color: var(--ok); font-size: 13px; font-weight: 700; letter-spacing: 0.06em; }
.chip svg { width: 16px; height: 16px; flex: none; }
.chip span { white-space: nowrap; }
.chip.bad { background: var(--red-soft); color: var(--red); }
.chip.wait { background: rgba(243,245,249,0.08); color: var(--grey); }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.checks li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; font-size: 14px; line-height: 1.55; letter-spacing: 0.02em; color: var(--soft); }
.checks li svg { width: 16px; height: 16px; margin-top: 2px; }
.checks li.sum { display: block; margin-bottom: 4px; font: 800 28px/1.05 var(--display); letter-spacing: 0.01em; color: var(--white); }
.checks li.bad { color: var(--red); }
.checks li.note { display: block; font-size: 13px; color: var(--grey); }
.tick { stroke: var(--ok); } .cross { stroke: var(--red); } .dash { stroke: var(--grey); }
textarea { width: 100%; min-height: 110px; font: 13px/1.5 var(--mono); color: var(--white); background: var(--ground); border: 1px solid rgba(243,245,249,0.16); border-radius: 12px; padding: 10px 12px; }
#rState { display: flex; flex-direction: column; align-items: center; gap: 8px; }
#rState .caps { text-align: center; margin-top: 6px; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.err { max-width: 640px; margin: 60px auto 0; text-align: center; display: flex; flex-direction: column; gap: 18px; align-items: center; }
.err .big { font-size: clamp(48px, 9vw, 88px); }

@media (max-width: 860px) {
  .row2 { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .foot .wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  [data-page=home] .table { grid-template-columns: minmax(0, 1fr); grid-template-areas: "tag" "pair" "clock"; padding: 24px 20px 26px; gap: 18px; }
  [data-page=home] .pair { margin: 16px 0 26px; justify-self: center; }
}
@media (max-width: 600px) {
  .top { padding-top: 14px; }
  .lk .rw { font-size: 26px; }
  .lk .mk { width: 38px; height: 38px; }
  .nav { gap: 0 18px; width: 100%; }
  .nav a { font-size: 12px; }
  .nav .lg { display: none; }
  .nav .sh { display: inline; }
  .ticker { height: 40px; }
  .tk-l { font-size: 17px; padding-right: 14px; }
  .tk-r > span { font-size: 14px; gap: 16px; padding-left: 16px; }
  .hero { padding-top: 22px; }
  .hero .lead { font-size: 16px; }
  .pair { gap: 48px; }
  .pair .d { --s: 104px; }
  .rolltag b { font-size: 68px; }
  #lrNext .num { font-size: 56px; }
  .hero .acts { gap: 4px 18px; }
  .ecards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .box { padding: 22px 20px; border-radius: 20px; }
  .title { font-size: 28px; }
  .sums { gap: 4px; height: 150px; }
  .sl { gap: 4px; font-size: 16px; }
  .sb .v { font-size: 10px; }
  .steps li { grid-template-columns: 44px minmax(0, 1fr); }
  .steps li span { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .tk-r, .nav a:first-child::before, .onair i, .pair.throw .d, .pair.throw .d .cube, .pair.shake .d { animation: none; }
}

/* ======================================================================== the show (home, v1.2.0)
   Every roll plays out on screen: the six lines wait for a drand round that doesn't exist yet; the round arrives; the hash appears and is read
   left to right; the first two characters from 1 to 6 lift out of it as the dice, thrown along a path drawn from the hash's last 16 characters. */
.headline { margin: 0; font: 800 clamp(38px, 5vw, 62px)/0.95 var(--display); letter-spacing: 0.01em; text-transform: uppercase; text-wrap: balance; }
.headline + .lead { margin-top: 12px; }
.show { --s: 104px; position: relative; margin-top: 24px; border-radius: 24px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; isolation: isolate; }
.shtop { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding: 16px 26px; border-bottom: 1px solid var(--line); }
.show .rolltag { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.show .rolltag .onair { margin: 0; }
.show .rolltag b { margin: 0; font-size: 32px; line-height: 1; }
.show .rolltag .at { font: 14px var(--mono); letter-spacing: 0.02em; color: var(--grey); }
.shnext { display: flex; align-items: center; gap: 16px; }
.show #lrNext { flex-direction: row; align-items: center; gap: 12px; }
.show #lrNext .lbl { font-size: 12px; letter-spacing: 0.14em; white-space: nowrap; }
.show #lrNext .num { min-width: 60px; font-size: 32px; color: var(--white); }
.show #lrNext.pre .num { color: var(--hi); }
.show #lrNext.rolling .lbl { color: var(--liv); }
.shnext .bar { order: 0; width: 120px; height: 4px; margin: 0; flex: none; }
.upper { position: relative; height: 300px; }
.layer { position: absolute; inset: 0; display: flex; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .35s ease, transform .45s ease, visibility 0s linear .45s; }
.layer.on { opacity: 1; visibility: visible; transform: none; transition: opacity .35s ease, transform .45s ease, visibility 0s; }
.layer.dim { opacity: 0.16; visibility: visible; transform: none; transition: opacity .8s ease, visibility 0s; }
#lyLines { align-items: center; justify-content: space-between; gap: 32px; padding: 0 44px; }
.lncol { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.lines { font: 15px/1.7 var(--mono); color: var(--white); word-break: break-all; }
.lines i { font-style: normal; color: var(--dim); }
.lines .bn { color: var(--soft); }
#lnRand.rwait { color: var(--hi); animation: wpulse 1.4s ease-in-out infinite; }
@keyframes wpulse { 50% { opacity: 0.55; } }
#lnRand.dec { color: var(--hi); }
.lncap { margin: 0; max-width: 62ch; font-size: 16px; line-height: 1.5; color: var(--soft); }
.lncap.c { min-height: 48px; text-align: center; }
.wait { flex: none; width: 300px; text-align: right; }
.wbig { margin-top: 12px; font: 800 132px/0.9 var(--display); color: var(--hi); font-variant-numeric: tabular-nums; }
.wbig.in { color: var(--ok); }
.wsmall { margin-top: 10px; font-size: 15px; line-height: 1.45; color: var(--soft); }
#lyHash { flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 0 20px; }
.shash { display: grid; grid-template-columns: repeat(32, 0.64em); row-gap: 14px; font: 38px/1.5 var(--mono); }
.hc { position: relative; text-align: center; color: var(--hc); border-radius: 4px; transition: color .25s ease, opacity .25s ease, transform .35s ease, text-shadow .25s ease; }
.hc.w { color: var(--hc-wait); opacity: 0.55; }
.hc.s { color: var(--faint); }
.hc.c { color: var(--white); background: var(--hc-cur); }
.hc.g { color: var(--hi); text-shadow: 0 0 18px var(--hi-glow); -webkit-text-stroke: 0.6px var(--hi); }
.hc.t { color: var(--thr); text-shadow: 0 0 14px var(--thr-glow); }
.hc.l { color: var(--hi); opacity: 0; transform: translateY(-14px) scale(1.7); }
.hc.x { color: transparent; box-shadow: inset 0 -3px 0 var(--hi); }
.hc[data-up]::after { top: auto; bottom: 100%; margin: 0 0 1px; }   /* the two dice side by side: DIE 2's label goes above */
.hc[data-lab]::after { content: attr(data-lab); position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 1px; font: 700 11px/1 var(--font); letter-spacing: 0.12em; color: var(--hi); white-space: nowrap; }
#lyResult { align-items: center; justify-content: space-between; gap: 18px 36px; padding: 0 44px; }
#lyResult .rs { flex: none; }
.rsbig { margin-top: 8px; font: 800 128px/0.92 var(--display); letter-spacing: 0.02em; color: var(--white); white-space: nowrap; }
.rsbig i { margin: 0 0.16em; font-style: normal; color: var(--hi); }
.rsmeta { margin-top: 10px; }
#lyResult .acts { margin-top: 16px; }
.rcpt { flex: 0 1 430px; min-width: 0; padding: 18px 20px; border-radius: 14px; background: rgba(0,0,0,0.28); border: 1px solid var(--line); }
.rcl { margin-top: 8px; font: 14px/1.6 var(--mono); color: var(--white); word-break: break-all; }
.rcl i { font-style: normal; color: var(--dim); }
.rcl .g { color: var(--hi); }
.rcl .d { color: var(--dim); }
.rcpt p { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: var(--grey); }
.tablez { position: relative; height: 280px; border-top: 1px solid var(--line); background: radial-gradient(ellipse 60% 70% at 50% 45%, var(--glow-a), transparent 70%), linear-gradient(var(--tbl-a), var(--tbl-b)); }
.dice3 { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.sdie { position: absolute; left: 0; top: 0; width: var(--s); height: var(--s); opacity: 0; perspective: calc(var(--s) * 5); will-change: transform, opacity; }
.sdie .cube { transform: none; }
.sshd { position: absolute; left: 0; top: 0; width: calc(var(--s) * 1.25); height: calc(var(--s) * 0.5); border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,0.75), rgba(0,0,0,0)); opacity: 0; will-change: transform, opacity; }
.ecard .eh { margin-top: 2px; font: 12px/1 var(--mono); letter-spacing: 0.02em; color: var(--dim); white-space: nowrap; }
.ecard .eh .g { color: var(--hi); }
.steps li:nth-child(5):last-child { grid-column: 1 / -1; }
@media (max-width: 999px) { .show { --s: 84px; } .rcpt { display: none; } .shash { font-size: 30px; } .wait { width: 240px; } .wbig { font-size: 108px; } .rsbig { font-size: 108px; } }
@media (max-width: 719px) {
  .show { --s: 60px; border-radius: 20px; }
  .shtop { padding: 14px 18px; }
  .show .rolltag b { font-size: 28px; }
  .show #lrNext .num { font-size: 28px; }
  .shnext .bar { width: 80px; }
  .upper { height: 320px; }
  .tablez { height: 210px; }
  .show .rolltag .at { display: none; }   /* the time is under the dice in the result */
  #lyLines, #lyResult { padding: 0 20px; }
  .wait, .rcpt { display: none; }
  .lines { font-size: 11px; line-height: 1.65; }
  .lncap { font-size: 15px; }
  .shash { grid-template-columns: repeat(16, 0.64em); row-gap: 14px; font-size: 21px; }
  #lyResult .rs { flex: 1 1 auto; }
  #lyResult .acts { gap: 10px 18px; }
  .rsbig { font-size: 84px; }
  .ecard .eh { font-size: 11px; }
}
@media (max-width: 600px) { .headline + .lead { display: none; } .show { margin-top: 18px; } }   /* on a phone the headline says it, so the show starts higher */
@media (prefers-reduced-motion: reduce) { .layer, .hc { transition: none; } #lnRand.rwait { animation: none; } }

/* ======================================================================== one stage (v1.3.0)
   The dice land beside the result, on the same stage: the first screen holds the whole show on a laptop. The roll's number and time are
   said once (the top bar); a caption bar under the stage narrates the show, then says where the dice came from. CHECK THIS ROLL is the
   main button. The headline is one line on wide screens. The ticker's label is gold type, not a gold block, so the headline leads. */
.hero { padding-top: 24px; }
.headline { font-size: clamp(30px, 3.4vw, 46px); line-height: 1; }
.headline + .lead { margin-top: 10px; font-size: 16px; }
@media (min-width: 601px) and (max-height: 860px) { .headline + .lead { display: none; } }   /* a short laptop screen: the ticker already says it */
.show { margin-top: 18px; }
.upper { height: 300px; background: radial-gradient(ellipse 30% 58% at 72% 52%, var(--glow-a), var(--glow-b) 60%, transparent 76%), linear-gradient(var(--tbl-a), var(--tbl-b)); }
.tablez { position: absolute; top: 0; bottom: 0; left: 44%; right: 0; height: auto; border: 0; background: none; pointer-events: none; }   /* where the dice land */
#lyResult { justify-content: flex-start; padding: 0 44px; }
#lyResult .rs { flex: none; max-width: calc(44% - 44px); }
.rs .k2:empty { display: none; }
.rsbig { margin-top: 0; font-size: 120px; }
.rsmeta .ph { display: none; }
#lyResult .acts { margin-top: 22px; gap: 10px 22px; flex-wrap: nowrap; }
.rs .more { color: var(--soft); white-space: nowrap; }
.rs .btn { white-space: nowrap; }
.shcap { position: relative; z-index: 2; display: flex; align-items: center; min-height: 66px; padding: 12px 26px 13px; border-top: 1px solid var(--line); }
.shcap .rcpt { flex: 1 1 auto; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 18px; padding: 0; border: 0; border-radius: 0; background: none; }
.shcap .rcl { margin: 0; font-size: 14px; }
.shcap .rcpt p { flex-basis: 100%; margin: 2px 0 0; }
.capt { margin: 0; font-size: 15px; line-height: 1.5; color: var(--soft); }
.show.cap .shcap .rcpt, .show:not(.cap) .capt { display: none; }
.tk-l { background: var(--panel2); color: var(--acc); box-shadow: inset 3px 0 0 var(--acc); }
.hc[data-lab][data-up]::after { top: auto; bottom: 100%; margin: 0 0 1px; }   /* the dice side by side: DIE 2's label above (it lost to the label rule before) */
.show #lrNext { min-height: 30px; }   /* ROLLING NOW has no number: keep the bar's height, so the stage doesn't jump */
@media (max-width: 999px) { .rsbig { font-size: 104px; } #lyResult .rs { max-width: calc(48% - 44px); } .tablez { left: 48%; } }
@media (max-width: 719px) {
  .upper { height: 250px; }
  .tablez { left: 42%; bottom: 68px; }
  #lyResult { padding: 16px 20px 14px; align-items: stretch; }
  #lyResult .rs { max-width: none; width: 100%; display: flex; flex-direction: column; }
  #lyResult .acts { margin-top: auto; gap: 10px 20px; }
  .rsbig { font-size: 84px; }
  .rsmeta .ph { display: inline; }
  .shcap { min-height: 0; padding: 10px 18px 12px; }
  .shcap .rcpt { gap: 2px 12px; }
  .shcap .rcpt .k2 { flex-basis: 100%; }
  .shcap .rcl { font-size: 12px; }
  .shcap .rcpt p { font-size: 12px; }
  .capt { font-size: 14px; }
}

/* ======================================================================== the dice read from above (v1.3.1)
   The camera looks down from 56° at dice that always land turned 22 to 42° (site.js), so two sides show, shaded, under a bright top;
   a little more perspective; and each show die has a solid core: three planes through its middle in the faces' shadow colour, seen
   only through the rounded corners, so a die is one block with the result on top. */
.sdie .core { position: absolute; inset: 3%; border-radius: 8%; background: color-mix(in srgb, var(--face) 58%, #000); }
.sdie .cx { transform: rotateY(90deg); }
.sdie .cy { transform: rotateX(90deg); }
/* a die turned to its corner is about 1.4 times as wide, so on a phone the dice are a size smaller (they look the same size as before)
   and land clear of the result's words (the time and sum end about 170 px in) */
@media (max-width: 719px) { .tablez { left: max(42%, 176px); } }
@media (max-width: 480px) { .show { --s: 52px; } }
@media (max-width: 400px) { .show { --s: 48px; } }
@media (max-width: 370px) { .show { --s: 44px; } }

/* ======================================================================== a roll every minute (v2.0.0)
   Rolls are named by their time ("the 7:30 PM roll") and live at /<day>/<HH:MM>. Each show die's faces are lit by a dark shade layer whose
   opacity changes as the die turns (composited: the throw never repaints, where v1.2.0 to v1.3.1 set each face's colour every frame), and the
   die nearer the camera is drawn over the other (site.js sets their order; the shadows stay under both). */
.sdie .fc .shade { position: absolute; inset: 0; border-radius: inherit; background: #000; opacity: 0; will-change: opacity; pointer-events: none; }
.sshd { z-index: 0; }
.sdie { z-index: 1; }
.big.long { font-size: clamp(44px, 10.5vw, 120px); }   /* THE 12:59 PM ROLL: one line on a phone */
.field input[type=time] { width: 150px; }
.ecard > span:nth-child(2) { white-space: nowrap; }

/* ======================================================================== centred on phones (v2.0.1)
   On a phone everything stacks into one column, so left-aligned headings, buttons and links left a ragged empty strip down the right
   (X, Nov 22: "why is everything you design on mobile always mashed against the left side of the screen?"). Up to 600 px wide the header,
   headings, the show's top bar and buttons, short lines, the forms and the footer are centred; paragraphs, lists, the six lines and code
   stay left-aligned, where reading wants a straight left edge. Desktop doesn't change. */
@media (max-width: 600px) {
  .top .wrap { flex-direction: column; align-items: center; gap: 8px; }
  .nav { justify-content: space-evenly; }
  .headline { text-align: center; }
  .shtop { justify-content: center; text-align: center; }
  .show .rolltag { justify-content: center; }
  .shnext { width: 100%; justify-content: center; }
  #lyResult .rs { align-items: flex-start; }
  #lyResult .acts { justify-content: center; }
  .shcap .rcpt { justify-content: center; text-align: center; }
  .capt { text-align: center; }
  .hero > .acts { justify-content: center; text-align: center; }
  #lrToday { flex-basis: 100%; }   /* 1,170 OF 1,440 TODAY on its own line under the two links, at any phone width */
  .earlier > .k2 { text-align: center; }
  .title, .hd { text-align: center; justify-content: center; }
  .facts, .legend { justify-content: center; text-align: center; }
  .fields { justify-content: center; }
  .fields .field { flex: 1 1 120px; }   /* day and time side by side, LATEST ROLL centred under them */
  .field input[type=date], .field input[type=time], .field input[type=number] { width: 100%; }
  .fields > .more { flex-basis: 100%; justify-content: center; }   /* a button in the row wraps to its own line, centred */
  .when { text-align: center; }
  .checks .sum { text-align: center; justify-content: center; }   /* ALL 5 CHECKS PASS · THE 7:30 PM ROLL IS 1 · 4, under its centred title */
  .box .acts { justify-content: center; }
  .foot .wrap { justify-items: center; text-align: center; }
  .foot .lk { justify-content: center; }
  .foot ul { align-items: center; }
}
