/* Rigs: the pull-rate sheet. Lacquered indigo, gold for five stars and the one action, tier colours as beams. */

@font-face { font-family: "Big Shoulders"; src: url(fonts/bigshoulders.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Zen Kaku"; src: url(fonts/zenkaku-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Zen Kaku"; src: url(fonts/zenkaku-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Chivo Mono"; src: url(fonts/chivomono.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --ink: #0f1020;
  --panel: #181a33;
  --panel-2: #1f2242;
  --line: #2c2f58;
  --line-gold: #8c7332;
  --chalk: #f8f9fa;
  --chalk-2: #c9cbe3;
  --chalk-3: #8e91b8;
  --gold: #ffd166;
  --gold-2: #e0b24a;
  --gold-ink: #2a1f06;
  --magenta: #ef476f;
  --purple: #9b5de5;
  --blue: #4cc9f0;
  --teal: #06d6a0;
  --t0: var(--chalk-2);
  --t1: var(--teal);
  --t2: var(--blue);
  --t3: var(--purple);
  --t4: var(--gold);
  --display: "Big Shoulders", "Arial Narrow", sans-serif;
  --ui: "Zen Kaku", system-ui, sans-serif;
  --mono: "Chivo Mono", ui-monospace, monospace;
  --radius: 4px;
  --max: 1240px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { background: var(--ink); color: var(--chalk); font-family: var(--ui); font-weight: 500; font-size: 16px; line-height: 1.5; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--ink); }
::selection { background: var(--gold); color: var(--gold-ink); }
* { scrollbar-color: var(--line-gold) var(--ink); scrollbar-width: thin; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
a { color: var(--gold); text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--chalk); }
button { font: inherit; color: inherit; }
img, svg { display: block; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 800; letter-spacing: 0; line-height: 1; }
h2 { font-size: clamp(2rem, 4vw, 3rem); text-transform: uppercase; }
p { margin: 0; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; }
.label { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--chalk-3); font-weight: 700; }
.wrap { width: min(var(--max), 100% - 2rem); margin-inline: auto; }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* pixel rigs never blur */
/* sprites scale by whole pixels only: --px is the multiple, set per place and per width */
.rig { --px: 6; display: grid; place-items: center; }
.rig svg { width: calc(32px * var(--px)); height: calc(32px * var(--px)); shape-rendering: crispEdges; }

/* stars */
.stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.stars svg { width: 14px; height: 14px; }
.stars .on { fill: currentColor; }
.stars .off { fill: none; stroke: currentColor; stroke-width: 1.2; opacity: .35; }
.tier-0 { color: var(--t0); --tier: var(--t0); } .tier-1 { color: var(--t1); --tier: var(--t1); } .tier-2 { color: var(--t2); --tier: var(--t2); } .tier-3 { color: var(--t3); --tier: var(--t3); } .tier-4 { color: var(--t4); --tier: var(--t4); }

/* ---------------------------------------------------------------- top bar */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--ink) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 1.5rem; height: 60px; }
.top nav { overflow-x: auto; scrollbar-width: none; }
.top nav::-webkit-scrollbar { display: none; }
.wordmark { font-family: var(--display); font-weight: 900; font-size: 1.75rem; letter-spacing: .04em; color: var(--chalk); text-decoration: none; }
.wordmark b { color: var(--gold); }
.top nav { display: flex; gap: 1.25rem; margin-left: .5rem; }
.top nav a { color: var(--chalk-2); text-decoration: none; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.top nav a:hover { color: var(--gold); }
.top .spacer { flex: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border: 1px solid var(--line-gold); background: var(--panel); color: var(--chalk); padding: .55rem 1rem; border-radius: var(--radius); cursor: pointer; font-weight: 700; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; transition: background .15s, border-color .15s; }
.btn:hover { border-color: var(--gold); background: var(--panel-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- banner */
.banner { padding: 1.5rem 0 2rem; }
.sheet { position: relative; border: 1px solid var(--line-gold); outline: 1px solid var(--line-gold); outline-offset: 3px; background: linear-gradient(160deg, #1c1f45 0%, #14163a 45%, #101232 100%); border-radius: var(--radius); display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); grid-template-rows: 1fr auto; overflow: hidden; }
.art { grid-row: 1 / span 2; }
.key { grid-column: 2; grid-row: 2; border-left: 1px solid var(--line-gold); background: color-mix(in srgb, var(--ink) 60%, transparent); padding: 0 1.75rem 1.75rem; display: grid; gap: 1rem; }
.art { position: relative; padding: 4.5rem 2rem 2rem; min-height: 460px; display: flex; flex-direction: column; gap: 1.5rem; }
.featured li { min-width: 0; }
.featured .cap { min-width: 0; overflow: hidden; }
.featured .cap .tag, .featured .cap b { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.featured .cap .stars { display: inline-flex; }
.ribbon { position: absolute; top: 24px; left: -70px; width: 220px; z-index: 2; text-align: center; transform: rotate(-45deg); background: var(--magenta); color: #1a0a10; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; padding: .4rem 0; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.banner h1 { font-size: clamp(2.6rem, 6vw, 5.2rem); text-transform: uppercase; font-weight: 900; line-height: .92; max-width: 14ch; text-wrap: balance; }
.banner h1 em { font-style: normal; color: var(--gold); }
.banner .lede { color: var(--chalk-2); max-width: 44ch; font-size: 1rem; }
.featured { list-style: none; margin: auto 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.featured li { display: grid; gap: .5rem; }
.featured .rig { --px: 6; background: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.featured .rig.empty { border: 1px dashed var(--line-gold); background: transparent; }
.featured .cap { display: flex; flex-direction: column; gap: .15rem; font-size: .78rem; color: var(--chalk-2); }
.featured .cap b { color: var(--chalk); font-family: var(--display); font-size: 1.1rem; letter-spacing: .02em; }
.featured .tag { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--chalk-3); font-weight: 700; }

.pull { position: relative; border-left: 1px solid var(--line-gold); background: color-mix(in srgb, var(--ink) 60%, transparent); padding: 2rem 1.75rem; display: flex; flex-direction: column; gap: 1rem; }
.tally { list-style: none; margin: 0; padding: 1rem 0 0; border-top: 1px solid var(--line); display: grid; gap: .35rem; }
.tally li { display: flex; align-items: center; justify-content: space-between; font-size: .8rem; color: var(--chalk-2); }
.tally li b { font-family: var(--display); font-size: 1.1rem; color: var(--chalk); font-variant-numeric: tabular-nums; }
.mine { position: relative; width: 100%; border: 0; border-radius: var(--radius); background: var(--gold); color: var(--gold-ink); font-family: var(--display); font-weight: 900; font-size: 2.6rem; letter-spacing: .06em; padding: .9rem 1rem 1rem; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(42, 31, 6, .35), inset 0 0 0 4px var(--gold), inset 0 0 0 5px rgba(42, 31, 6, .35), 0 10px 24px rgba(0, 0, 0, .35); transition: transform .08s, background .15s; }
.mine:hover { background: #ffd97d; }
.mine:active { transform: translateY(1px); background: var(--gold-2); }
.mine:disabled { background: var(--panel-2); color: var(--chalk-3); box-shadow: inset 0 0 0 1px var(--line); cursor: not-allowed; }
.mine small { display: block; font-family: var(--ui); font-weight: 700; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; opacity: .8; margin-top: .25rem; }
.mine.live { background: var(--panel-2); color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.charge { height: 10px; border: 1px solid var(--line-gold); border-radius: 2px; background: var(--ink); overflow: hidden; }
.charge i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--gold-2), var(--gold)); transition: transform .4s var(--ease); }
.charge.live i { animation: charge 1.2s linear infinite; background: repeating-linear-gradient(90deg, var(--gold) 0 14px, var(--gold-2) 14px 28px); background-size: 28px 100%; }
@keyframes charge { to { background-position: 28px 0; } }
.rate { display: flex; justify-content: space-between; align-items: baseline; }
.rate .num { font-size: 1.6rem; }
.rate .num small { font-size: .8rem; color: var(--chalk-3); font-family: var(--ui); letter-spacing: .1em; }
.liveline { font-size: .95rem; color: var(--chalk-2); padding: .9rem .25rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.liveline b { font-family: var(--display); font-size: 1.35rem; color: var(--chalk); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.how-live { margin-top: 1.25rem; color: var(--chalk-2); max-width: 70ch; }
.how-live b { color: var(--chalk); font-family: var(--display); font-size: 1.15rem; letter-spacing: .02em; }
.pity { font-size: .85rem; color: var(--chalk-2); }
.pity b { color: var(--chalk); }
.status { font-size: .8rem; color: var(--chalk-3); min-height: 1.2em; }
.nowrap { white-space: nowrap; }
.liveline .short { display: none; }
.status.warn { color: var(--gold); }

/* ---------------------------------------------------------------- sections */
section.block { padding: 3.5rem 0 1rem; }
section.block > .wrap > h2 { margin-bottom: 1.25rem; }
section.block > .wrap > h2 + p { color: var(--chalk-2); max-width: 64ch; margin-bottom: 1.5rem; }
.panel { border: 1px solid var(--line-gold); outline: 1px solid var(--line); outline-offset: 3px; background: var(--panel); border-radius: var(--radius); padding: 1.5rem; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { text-align: left; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--chalk-3); font-weight: 700; padding: 0 .75rem .6rem; border-bottom: 1px solid var(--line-gold); }
td { padding: .7rem .75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }
.odds { overflow-x: auto; }
.odds td:first-child { white-space: nowrap; }
.odds .frac { font-family: var(--display); font-size: 1.35rem; }
.odds .pct { color: var(--chalk-2); font-family: var(--mono); font-size: .85rem; }
.odds .note { color: var(--chalk-3); font-size: .85rem; margin-top: 1rem; }
.weight-inline { display: none; }

/* how */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.steps .panel h3 { font-size: 1.5rem; text-transform: uppercase; margin-bottom: .6rem; }
.steps .panel p { color: var(--chalk-2); font-size: .95rem; }
.steps .panel .mono { display: block; margin-top: .75rem; font-size: .78rem; color: var(--gold); word-break: break-all; }

/* history */
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.feed li { position: relative; display: grid; grid-template-columns: 64px 1fr auto; gap: 1rem; align-items: center; padding: .5rem .75rem .5rem .9rem; background: var(--panel); border-radius: 2px; }
.feed li::before { content: ""; position: absolute; left: 4px; top: 4px; bottom: 4px; width: 3px; border-radius: 2px; background: linear-gradient(to bottom, transparent, currentColor 30%, currentColor 70%, transparent); }
.feed li .rig { --px: 2; background: var(--ink); border-radius: 2px; }
.feed .who { display: grid; gap: .15rem; color: var(--chalk); }
.feed .who b { font-family: var(--display); font-size: 1.2rem; letter-spacing: .02em; }
.feed .who span { font-size: .8rem; color: var(--chalk-2); }
.feed .meta { text-align: right; display: grid; gap: .15rem; font-size: .8rem; color: var(--chalk-2); }
.feed .meta .mono { color: var(--chalk-3); font-size: .75rem; }
.feed li.flash { animation: flash 1.6s var(--ease); }
@keyframes flash { from { background: color-mix(in srgb, currentColor 35%, var(--panel)); } to { background: var(--panel); } }
.feed-empty { color: var(--chalk-3); padding: 2rem; text-align: center; border: 1px dashed var(--line); }
.more { margin-top: 1rem; }

/* board */
.board td:first-child { font-family: var(--mono); font-size: .85rem; }
.board .num { font-size: 1.2rem; }

/* collection */
.collection-empty { color: var(--chalk-2); }
.rigs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.rigs figure { margin: 0; display: grid; gap: .5rem; }
.rigs .rig { --px: 4; background: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; }
.rigs figcaption { display: grid; gap: .15rem; font-size: .8rem; color: var(--chalk-2); }
.rigs figcaption b { font-family: var(--display); font-size: 1.1rem; color: var(--chalk); }
.collect-bar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line-gold); }
.collect-bar .num { font-size: 2rem; }
.collect-bar .num small { font-family: var(--ui); font-size: .8rem; color: var(--chalk-3); letter-spacing: .1em; }

/* details */
.details { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.details h3 { font-size: 1.5rem; text-transform: uppercase; margin-bottom: 1rem; }
.rules { margin: 0; padding-left: 1.2rem; color: var(--chalk-2); display: grid; gap: .6rem; font-size: .95rem; }
.rules li::marker { color: var(--gold); }
.faq details { border-top: 1px solid var(--line); padding: .7rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-family: var(--display); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--chalk-2); font-size: .95rem; margin-top: .6rem; }
.links { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.links a { font-size: .8rem; }

footer { margin-top: 4rem; border-top: 1px solid var(--line); padding: 2rem 0 3rem; color: var(--chalk-3); font-size: .85rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }

/* ---------------------------------------------------------------- reveal */
.reveal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(8, 9, 22, .92); opacity: 0; pointer-events: none; transition: opacity .3s; perspective: 900px; }
.reveal.on { opacity: 1; pointer-events: auto; }
.reveal .beam { position: absolute; top: -10%; bottom: -10%; left: 50%; width: 140px; transform: translateX(-50%) scaleX(0); background: linear-gradient(to bottom, transparent, currentColor 30%, currentColor 70%, transparent); opacity: .55; filter: blur(2px); }
.reveal.on .beam { animation: beam 1.1s var(--ease) forwards; }
@keyframes beam { 0% { transform: translateX(-50%) scaleX(0); } 40% { transform: translateX(-50%) scaleX(1); } 100% { transform: translateX(-50%) scaleX(.08); opacity: .25; } }
.reveal .card { position: relative; width: min(360px, 86vw); display: grid; gap: 1rem; text-align: center; opacity: 0; transform: translateY(24px) rotateY(90deg); transition: opacity .5s var(--ease) .5s, transform .7s var(--ease) .5s; }
.reveal.on .card { opacity: 1; transform: none; }
.reveal .rig { --px: 8; background: var(--ink); border: 1px solid currentColor; border-radius: var(--radius); padding: 12px; }
.reveal h3 { font-size: 2.4rem; text-transform: uppercase; }
.reveal .stars svg { width: 26px; height: 26px; opacity: 0; transform: scale(.4); }
.reveal.on .stars svg { animation: star .35s var(--ease) forwards; }
.reveal.on .stars svg:nth-child(1) { animation-delay: 1.1s; } .reveal.on .stars svg:nth-child(2) { animation-delay: 1.25s; } .reveal.on .stars svg:nth-child(3) { animation-delay: 1.4s; } .reveal.on .stars svg:nth-child(4) { animation-delay: 1.55s; } .reveal.on .stars svg:nth-child(5) { animation-delay: 1.7s; }
@keyframes star { to { opacity: 1; transform: none; } }
.reveal p { color: var(--chalk-2); }
.reveal .btn { justify-self: center; }

/* ---------------------------------------------------------------- rig page */
.rig-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; padding: 2rem 0; }
.rig-page .big { --px: 10; background: var(--ink); border: 1px solid currentColor; border-radius: var(--radius); padding: 16px; align-self: start; }
.rig-page > div:last-child { color: var(--chalk); }
.rig-page h1, .rig-page .stars-line .stars { color: var(--tier); }
.rig-page h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); text-transform: uppercase; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.25rem; font-size: .9rem; margin-top: 1.25rem; }
.kv dt { color: var(--chalk-3); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; padding-top: .2em; }
.kv dd { margin: 0; word-break: break-all; color: var(--chalk); }
.verify { margin-top: 1.5rem; }
.verify .ok { color: var(--teal); }
.verify .bad { color: var(--magenta); }
.traits { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.traits span { border: 1px solid var(--line-gold); border-radius: 2px; padding: .2rem .5rem; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--chalk-2); }
.traits span b { color: var(--chalk); margin-left: .3rem; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .sheet { grid-template-columns: 1fr; }
  .sheet { grid-template-rows: auto auto auto; }
  .art { grid-row: 1; }
  .pull { grid-column: 1; grid-row: 2; border-left: 0; border-top: 1px solid var(--line-gold); }
  .key { grid-column: 1; grid-row: 3; border-left: 0; padding-top: 1.25rem; }
  .steps, .details, .rig-page { grid-template-columns: 1fr 1fr; }
  .top .wrap { height: auto; flex-wrap: wrap; row-gap: 0; padding: .6rem 0; gap: 1rem; }
  .top nav { order: 3; flex-basis: 100%; gap: 1rem; padding-bottom: .4rem; white-space: nowrap; }
  .rig-page .big { --px: 8; }
}
@media (max-width: 640px) {
  .art { padding: 4rem 1.25rem 1.5rem; min-height: 0; }
  .featured .rig { --px: 3; padding: 4px; }
  .rigs .rig { --px: 3; }
  .reveal .rig { --px: 7; }
  .rig-page .big { --px: 8; }
  .weight-inline { display: inline; }
  /* the pull panel becomes the dock: fixed to the bottom of the screen for the whole page */
  .pull { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; border-top: 1px solid var(--line-gold); background: color-mix(in srgb, var(--ink) 94%, transparent); backdrop-filter: blur(10px); padding: .5rem .9rem calc(.5rem + env(safe-area-inset-bottom)); display: grid; grid-template-columns: auto 1fr; grid-template-areas: "mine rate" "mine line" "charge charge" "status status"; column-gap: .9rem; row-gap: .2rem; align-items: center; }
  .mine { grid-area: mine; position: static; font-size: 1.5rem; padding: .45rem .9rem .5rem; min-width: 112px; }
  .mine small { font-size: .7rem; letter-spacing: .08em; }
  .charge { grid-area: charge; height: 5px; }
  .rate { grid-area: rate; justify-content: flex-start; gap: .5rem; }
  .rate .label { display: none; }
  .rate .num { font-size: 1.25rem; white-space: nowrap; }
  .liveline { grid-area: line; padding: 0; border: 0; font-size: .8rem; white-space: nowrap; }
  .liveline b { font-size: 1rem; }
  .liveline .long { display: none; }
  .liveline .short { display: inline; }
  .status { grid-area: status; font-size: .75rem; margin: 0; min-height: 0; }
  .status:not(.held):not(.warn) { display: none; }
  .key { grid-column: 1; grid-row: 2; padding: 1rem 1.25rem 1.25rem; }
  body { padding-bottom: 120px; }
  .banner h1 { font-size: clamp(2.4rem, 11vw, 3.2rem); }
  .featured { gap: .6rem; }
  .featured .cap b { font-size: .95rem; }
  .steps, .details, .rig-page { grid-template-columns: 1fr; }
  .feed li { grid-template-columns: 64px 1fr; }
  .feed .meta { grid-column: 2; text-align: left; }
  .ribbon { top: 18px; left: -74px; width: 220px; font-size: .68rem; }
  .odds .hide-sm { display: none; }
  .panel { padding: 1rem; }
  td, th { padding-inline: .35rem; }
  .odds .frac { font-size: 1.15rem; }
  .odds .pct { display: block; }
  .board td:first-child { font-size: .78rem; }
}
@media (max-width: 480px) {
  .featured .rig { --px: 2; }
  .featured { gap: .5rem; }
  .featured .cap .who { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
