/* =====================================================================
   TORPOR
   One stylesheet for the whole site.

   The ground is a near black with a brown cast rather than a true black,
   so cream type sits warm on it instead of glaring. Two faces: a serif
   for anything that speaks, a mono for anything that counts. Metals are
   the only other colours and they always mean rarity, never decoration.

   Layers, bottom to top: the ambient canvas (bg.js, z 0), its grain
   (z 1), then everything in the document (z 2), then the sticky header
   (z 40), then sheets and modals (z 60+).
   ===================================================================== */

/* ------------------------------------------------------------ fonts
   Self hosted. Loading these from a third party cost two extra origins to
   resolve and connect to, and on a connection where a round trip is a
   quarter of a second that was most of a second before any text painted. */
@font-face {
  font-family: "Instrument Serif"; font-style: normal; font-weight: 400;
  font-display: swap;
  src: url("/fonts/instrument-serif-normal-400.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif"; font-style: italic; font-weight: 400;
  font-display: swap;
  src: url("/fonts/instrument-serif-italic-400.woff2") format("woff2");
}
@font-face {
  font-family: "Martian Mono"; font-style: normal; font-weight: 300;
  font-display: swap;
  src: url("/fonts/martian-mono-normal-300.woff2") format("woff2");
}
@font-face {
  font-family: "Martian Mono"; font-style: normal; font-weight: 500;
  font-display: swap;
  src: url("/fonts/martian-mono-normal-500.woff2") format("woff2");
}

/* ------------------------------------------------------------ tokens */
:root {
  --paper:    #14130f;   /* the room */
  --raise:    #181712;   /* a panel */
  --rise:     #1f1c15;   /* a panel, lifted */
  --rule:     #211e17;   /* hairline */
  --edge:     #2e2a20;   /* visible border */
  --edge2:    #3d3828;   /* border, hovered */
  --ink:      #ece5d2;   /* cream type */
  --bone:     #e8dcc0;   /* emphasis, fills */
  --mute:     #8b8273;   /* secondary type */
  --faint:    #6b6457;   /* ornament, stamps */
  --signal:   #d4603f;   /* errors and live counts only */
  --eth:      #a8dae3;   /* the glow inside the machine */
  --tile:     #ffffff;   /* the art's own ground */

  --silver:   #b9bcc2;
  --gold:     #d8a445;
  --platinum: #9fe4ef;

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono:  "Martian Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --pad:  clamp(16px, 2.4vw, 28px);
  --wrap: 1120px;
  --r:    3px;
  --t:    .16s;
}

/* ------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  font: 300 13px/1.7 var(--mono);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
img, svg, canvas { display: block; max-width: 100%; }
img { -webkit-user-drag: none; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--bone); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--bone); color: var(--paper); }

/* signed in and signed out variants of the same element */
html[data-who="in"]  .out-only { display: none !important; }
html[data-who="out"] .in-only,
html:not([data-who]) .in-only  { display: none !important; }

/* a single warm light source, high and centred, over a faint dot grid */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(52% 40% at 50% 38%, rgba(236, 229, 210, .045), transparent 72%),
    radial-gradient(circle at 1px 1px, rgba(236, 229, 210, .05) 1px, transparent 0);
  background-size: auto, 22px 22px;
}
body > * { position: relative; z-index: 2; }

/* ------------------------------------------------------------ header */
.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 16px;
  height: 60px; padding: 0 var(--pad);
  background: rgba(20, 19, 15, .84);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.brand {
  display: flex; align-items: center; gap: 11px; height: 100%;
  text-decoration: none; flex: none;
}
.brand .mark { height: 26px; width: auto; }
.brand .word { height: 12px; width: auto; }
.brand:hover .word { opacity: .8; }

.nav { display: flex; gap: 2px; margin-left: 8px; }
.nav a {
  font-size: 10px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: var(--mute); text-decoration: none;
  padding: 8px 12px; border-radius: 2px;
  transition: color var(--t), background var(--t);
}
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--paper); background: var(--bone); }

.topwho { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.me {
  display: flex; align-items: center; gap: 9px; text-decoration: none;
  padding: 4px 10px 4px 4px; border: 1px solid var(--rule); border-radius: 20px;
  transition: border-color var(--t);
}
.me:hover { border-color: var(--edge2); }
.me img { width: 24px; height: 24px; border-radius: 50%; background: var(--rise); object-fit: cover; }
.me span { font-size: 10px; letter-spacing: .08em; color: var(--mute); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me:hover span { color: var(--ink); }

/* ------------------------------------------------------------ page */
.page {
  flex: 1 0 auto; width: 100%; max-width: var(--wrap);
  margin: 0 auto; padding: clamp(28px, 5vh, 56px) var(--pad) 80px;
}
.page.narrow { max-width: 680px; }
.page.wide { max-width: 1240px; }
.section { margin-top: 44px; }

.foot {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 18px var(--pad); border-top: 1px solid var(--rule);
  font-size: 9px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: var(--faint);
}
.foot a { color: inherit; text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* ------------------------------------------------------------ type */
h1 {
  font: 400 clamp(38px, 7vw, 76px)/.96 var(--serif);
  letter-spacing: -.012em; margin: 0 0 12px;
}
h1 em, h2 em, .tag em { font-style: italic; }
h2 {
  display: flex; align-items: baseline; gap: 16px;
  font: 400 clamp(24px, 3.4vw, 34px)/1.1 var(--serif);
  letter-spacing: -.005em; margin: 0 0 8px;
}
h2::after {
  content: ""; flex: 1 1 auto; height: 1px; background: var(--edge);
  transform: translateY(-6px);
}
h2.plain::after { display: none; }
h2 + .note, h2 + .lede { margin-top: 10px; }
.lede { color: var(--mute); font-size: 12px; line-height: 1.85; max-width: 54ch; margin: 0 0 26px; }
.kicker {
  font-size: 9px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase;
  color: var(--mute); margin: 0 0 10px;
}
.note { font-size: 10.5px; color: var(--mute); letter-spacing: .03em; line-height: 1.8; }
.note b { color: var(--ink); font-weight: 500; }
.note a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--edge); }
.note a:hover { text-decoration-color: currentColor; }
.bad { color: var(--signal); }
.err {
  color: var(--signal); font-size: 10px; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase; min-height: 1.3em; margin: 0;
}
.tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.serif { font-family: var(--serif); }
.label {
  display: block; font-size: 9px; font-weight: 500; letter-spacing: .22em;
  text-transform: uppercase; color: var(--mute);
}

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  padding: 14px 24px; border: 1px solid var(--bone); border-radius: var(--r);
  background: var(--bone); color: var(--paper);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background var(--t), border-color var(--t), color var(--t),
              opacity var(--t), transform var(--t);
}
.btn:hover { background: var(--ink); border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .38; cursor: default; pointer-events: none; }
.btn.ghost { background: none; color: var(--ink); border-color: var(--edge); }
.btn.ghost:hover { background: none; border-color: var(--ink); }
.btn.ghost.on { border-color: var(--gold); color: var(--gold); }
.btn.sm { padding: 9px 14px; font-size: 9px; letter-spacing: .14em; }
.btn.xs { padding: 7px 10px; font-size: 8px; letter-spacing: .12em; }
.btn.bad { color: var(--signal); border-color: rgba(212, 96, 63, .45); }
.btn.bad:hover { background: var(--signal); border-color: var(--signal); color: var(--paper); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn.wide { width: 100%; }

.link {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-size: 10px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--mute); text-decoration: none; white-space: nowrap;
  transition: color var(--t);
}
.link:hover { color: var(--ink); }
.link.u { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--edge); }

/* a segmented control */
.tabs {
  display: flex; gap: 2px; padding: 2px; width: max-content; max-width: 100%;
  border: 1px solid var(--rule); border-radius: var(--r); background: var(--raise);
}
.tabs button {
  font-size: 9px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  padding: 8px 13px; border: 0; border-radius: 2px; background: none;
  color: var(--mute); cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color var(--t), background var(--t);
}
.tabs button:hover { color: var(--ink); }
.tabs button.on { background: var(--bone); color: var(--paper); }
.tabs.sub { background: none; border-color: transparent; padding: 0; }
.tabs.sub button { font-size: 8.5px; padding: 6px 10px; }
.tabs.sub button.on { background: var(--rise); color: var(--ink); }

.badge {
  display: inline-block; min-width: 16px; padding: 1px 5px; border-radius: 9px;
  background: var(--gold); color: var(--paper);
  font-size: 9px; line-height: 14px; text-align: center; font-weight: 500;
}
.tabs button.on .badge { background: var(--paper); color: var(--bone); }

/* ------------------------------------------------------------ panels */
.panel {
  position: relative; padding: 22px;
  border: 1px solid var(--edge); border-radius: var(--r);
  background: linear-gradient(var(--rise), var(--raise) 70%);
}
.panel::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(236, 229, 210, .13), transparent);
}
.panel.soft { border-color: var(--rule); }
.panel.dashed { border-style: dashed; background: none; }
.panel.dashed::before { display: none; }
.panel > .kicker { margin-bottom: 8px; }
.panel .note + .btn, .panel .note + .row { margin-top: 14px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 0 0 22px; }
.tile {
  position: relative; padding: 15px 16px 13px;
  border: 1px solid var(--edge); border-radius: var(--r);
  background: linear-gradient(var(--rise), var(--raise) 70%);
}
.tile::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px;
  background: var(--edge);
}
.tile b {
  display: block; font: 400 34px/1 var(--serif); margin-bottom: 6px;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.tile span { font-size: 9px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); }

.empty {
  border: 1px dashed var(--edge); border-radius: var(--r); padding: 32px 22px;
  text-align: center; color: var(--mute); font-size: 11px; line-height: 1.9;
}
.empty a { color: var(--ink); }

.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }

/* ------------------------------------------------------------ forms */
.field { display: flex; flex-direction: column; gap: 7px; }
.input {
  width: 100%; min-width: 0;
  background: var(--paper); border: 1px solid var(--edge); border-radius: var(--r);
  color: var(--ink); font: 300 13px/1.4 var(--mono); padding: 12px 13px;
  transition: border-color var(--t);
}
.input:focus { outline: none; border-color: var(--mute); }
.input::placeholder { color: var(--faint); }
select.input { font-size: 12px; padding: 11px 13px; }
input[type="number"].input { text-align: right; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { align-items: flex-end; }
.row .grow { flex: 1 1 200px; min-width: 0; }
.form { display: grid; gap: 12px; max-width: 520px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 14px; }
.toolbar .note { margin: 0; }
.spacer { flex: 1 1 auto; }

/* ------------------------------------------------------------ gate */
.gate { max-width: 560px; padding-top: 4vh; }
.gate h1 { margin-bottom: 14px; }
.gate .lede { margin-bottom: 22px; }

/* ===================================================================
   HOME
   =================================================================== */
body.home { height: 100dvh; overflow: hidden; }
body.home .foot { flex: none; }
.hero {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(8px, 1.6vh, 18px); padding: 0 var(--pad);
}
:root { --s: min(34vw, 38dvh); }
.stage {
  position: relative; flex: 0 1 auto;
  width: min(calc(var(--s) * 1.58), 100%); aspect-ratio: 1;
  display: grid; place-items: center; perspective: 1400px;
  touch-action: none; cursor: grab;
}
.stage:active { cursor: grabbing; }
.cube { position: relative; width: var(--s); height: var(--s); transform-style: preserve-3d; will-change: transform; }
.face {
  position: absolute; inset: 0; background: var(--tile);
  backface-visibility: hidden; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 0 60px rgba(232, 220, 192, .06);
}
.lyr {
  position: absolute; inset: 0; pointer-events: none; user-select: none;
  background-repeat: no-repeat; background-position: center; background-size: 100% 100%;
}
.f0 { transform: translateZ(calc(var(--s) / 2)); }
.f1 { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.f2 { transform: rotateY(90deg)  translateZ(calc(var(--s) / 2)); }
.f3 { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.f4 { transform: rotateX(90deg)  translateZ(calc(var(--s) / 2)); }
.f5 { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); }
.guard { position: absolute; inset: 0; z-index: 4; }
.shadow {
  position: absolute; left: 50%; top: 50%; pointer-events: none;
  width: calc(var(--s) * 1.5); height: calc(var(--s) * .42);
  transform: translate(-50%, calc(var(--s) * .66));
  background: radial-gradient(ellipse at center, rgba(232, 220, 192, .1), rgba(232, 220, 192, 0) 66%);
}
.hint { font-size: 9px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--faint); }
.tag {
  margin: clamp(6px, 2vh, 18px) 0 0; text-align: center;
  font: 400 clamp(28px, 4.4vw, 48px)/1.1 var(--serif); letter-spacing: -.01em;
}
.tag em { color: var(--bone); }
.cta { display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; }

.live { display: flex; align-items: baseline; gap: 10px; }
.live b {
  font: 400 19px/1 var(--serif); color: var(--signal);
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.live b.bump { display: inline-block; animation: bump .42s ease-out; }
@keyframes bump { 35% { transform: translateY(-3px); } }
.dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--signal); margin-right: 8px; vertical-align: middle;
  animation: pulse 1.9s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .25; } }

@media (max-width: 900px), (max-aspect-ratio: 10/9) { :root { --s: min(54vw, 31dvh); } }
@media (max-height: 460px) { :root { --s: min(24vw, 36dvh); } }

/* ===================================================================
   APPLY
   =================================================================== */
.steps { list-style: none; margin: 0 0 20px; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.steps li {
  display: flex; align-items: center; gap: 8px;
  font-size: 9px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: var(--faint);
}
.steps .n {
  width: 20px; height: 20px; border-radius: 50%; flex: none;
  border: 1px solid var(--edge); display: grid; place-items: center;
  font-size: 9px; font-weight: 500;
}
.steps li.now { color: var(--ink); }
.steps li.now .n { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.steps li.done { color: var(--mute); }
.steps li.done .n { background: var(--bone); border-color: var(--bone); color: var(--paper); font-size: 0; }
.steps li.done .n::after { content: "\2713"; font-size: 10px; }
.steps li + li::before { content: ""; width: 18px; height: 1px; background: var(--rule); }

.who-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding-bottom: 14px; border-bottom: 1px solid var(--rule); margin-bottom: 4px;
}
.who-row b { font: 400 24px/1 var(--serif); }
.who-row .link { font-size: 9px; }

.tasks { list-style: none; margin: 0; padding: 0; }
.task {
  display: grid; grid-template-columns: 22px 10px minmax(0, 1fr) auto;
  align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rule);
}
.task:first-child { border-top: 1px solid var(--rule); }
.task .idx { font-size: 10px; color: var(--faint); font-variant-numeric: tabular-nums; }
.task .tick { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--edge); }
.task.done .tick { background: var(--bone); border-color: var(--bone); box-shadow: 0 0 10px rgba(232, 220, 192, .45); }
.task .body { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.task .body b { font-weight: 500; font-size: 12px; letter-spacing: .14em; color: var(--mute); }
.task.now .body b { color: var(--ink); }
.task.done .body b { color: var(--faint); }
.task .how {
  font-size: 8px; letter-spacing: .14em; text-transform: uppercase;
  padding: 2px 6px; border: 1px solid var(--rule); border-radius: 2px; color: var(--faint);
}
.task .how.m { color: var(--signal); border-color: rgba(212, 96, 63, .4); }
.task.paused { opacity: .42; }
.task.paused .how { border-style: dashed; }
.task .acts { display: flex; gap: 6px; align-items: center; }
.task .stamp { font-size: 9px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--bone); }
.tasks.scanning .task:not(.done) .tick { animation: scan .9s ease-in-out infinite; }
.tasks.scanning .task:nth-child(2) .tick { animation-delay: .12s; }
.tasks.scanning .task:nth-child(3) .tick { animation-delay: .24s; }
.tasks.scanning .task:nth-child(4) .tick { animation-delay: .36s; }
.tasks.scanning .task:nth-child(5) .tick { animation-delay: .48s; }
@keyframes scan {
  50% { border-color: var(--bone); box-shadow: 0 0 8px rgba(232, 220, 192, .35); }
}

.quote { border-left: 2px solid var(--bone); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.quote .head { display: flex; justify-content: space-between; gap: 12px; font-size: 9px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); }
.quote .phrase { margin: 0; font: 400 clamp(17px, 2.2vw, 22px)/1.35 var(--serif); color: var(--bone); }
.quote .sub { border-top: 1px solid var(--rule); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }

.verify { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.meter { flex: 1 1 auto; height: 1px; background: var(--rule); position: relative; overflow: hidden; }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--bone); transition: width .45s ease; }
.ratio { font-size: 10px; letter-spacing: .12em; color: var(--mute); font-variant-numeric: tabular-nums; }

.done-card { text-align: center; padding: 40px 0; }
.done-card img { width: 64px; margin: 0 auto 20px; }
.done-card .lede { margin: 10px auto 0; }

@media (max-width: 560px) {
  .task {
    grid-template-columns: 22px 10px minmax(0, 1fr);
    grid-template-areas: "idx tick body" "idx acts acts";
    row-gap: 10px;
  }
  .task .idx { grid-area: idx; align-self: start; padding-top: 3px; }
  .task .tick { grid-area: tick; }
  .task .body { grid-area: body; }
  .task .acts { grid-area: acts; flex-wrap: wrap; }
  .task .acts .btn { padding: 11px 16px; font-size: 9px; }
}

/* ===================================================================
   PROFILE
   =================================================================== */
.idcard {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center; gap: 18px; margin: 0 0 24px;
}
.idcard img { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--edge); background: var(--rise); object-fit: cover; }
.idcard .who-name { min-width: 0; }
.idcard h1 { font-size: clamp(26px, 4vw, 40px); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idcard .note { margin-top: 3px; }
/* where the application stands, said once at the top as well as on the pass */
.statusword { text-align: right; }
.statusword b { display: block; font: italic 400 36px/1 var(--serif); color: var(--mute); }
.statusword span { display: block; font-size: 9px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--faint); margin-top: 5px; }
.statusword[data-s="review"] b { color: var(--ink); }
.statusword[data-s="approved"] b { color: var(--bone); }
.statusword[data-s="rejected"] b { color: var(--signal); }
.statusword[data-t="A"] b { color: var(--platinum); }
.statusword[data-t="B"] b { color: var(--gold); }
.statusword[data-t="C"] b { color: var(--silver); }

/* ---- the pass: a ticket, torn across the middle ----
   The stub holds who you are, the body holds what was decided. The
   perforation is real: the notches sit on the line the dashes run along,
   so the eye reads one object that could physically come apart. */
.passwrap { max-width: 920px; margin-bottom: 30px; }
.noapp { margin-bottom: 30px; }
.pass {
  --accent: var(--mute);
  position: relative; isolation: isolate;
  display: flex; flex-direction: column; margin: 0;
  filter: drop-shadow(0 18px 44px rgba(0, 0, 0, .55));
}
.pass-stub, .pass-body {
  position: relative; z-index: 1; background: #070605;
  border: 1px solid var(--edge);
  padding: clamp(20px, 3.4vw, 28px);
  display: flex; flex-direction: column; gap: clamp(13px, 2vw, 18px);
}
.pass-stub { border-radius: 4px 4px 0 0; border-bottom: 0; }
.pass-stub .pass-id { padding-top: 10px; }
.pass-body { border-radius: 0 0 4px 4px; border-top: 0; }
.pass-stub::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent); z-index: 2; border-radius: 4px 0 0 0;
}
.holo { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; }

.perf { position: relative; z-index: 2; height: 0; border-top: 1px dashed var(--edge); margin: 0 17px; }
.perf .notch {
  position: absolute; width: 18px; height: 18px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--edge); top: 50%; margin-top: -9px;
}
.perf .nl { left: -27px; }
.perf .nr { right: -27px; }

.pass[data-status="pending"] .pass-stub,
.pass[data-status="pending"] .pass-body { border-style: dashed; }
.pass[data-status="pending"] .pass-stub { border-bottom: 0; }
.pass[data-status="pending"] .pass-body { border-top: 0; }
.pass[data-status="review"]   { --accent: var(--ink); }
.pass[data-status="approved"] { --accent: var(--bone); }
.pass[data-status="rejected"] { --accent: var(--signal); }
.pass[data-tier="A"] { --accent: var(--platinum); }
.pass[data-tier="B"] { --accent: var(--gold); }
.pass[data-tier="C"] { --accent: var(--silver); }
.pass[data-status="approved"] .pass-stub,
.pass[data-status="approved"] .pass-body { border-color: rgba(232, 220, 192, .3); }
.pass[data-status="approved"] .holo {
  opacity: 1;
  background:
    radial-gradient(70% 60% at 14% 0%, rgba(232, 220, 192, .13), transparent 62%),
    linear-gradient(104deg, transparent 40%, rgba(232, 220, 192, .07) 49%, transparent 58%);
}

.pass-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pass-brand { display: inline-flex; align-items: center; gap: 9px; }
.pass-brand .mark { height: 20px; width: auto; }
.pass-brand .word { height: 9px; width: auto; }
.pass-kind { font-size: 8px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--accent); }

.pass-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.klabel { font-size: 8px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; color: var(--mute); }
.serial {
  font: 400 clamp(54px, 13vw, 88px)/.9 var(--serif);
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.pass[data-status="approved"] .serial { color: var(--bone); }
.pass-who { margin-top: 5px; font-size: 11px; letter-spacing: .06em; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barcode { display: flex; align-items: stretch; gap: 3px; height: 36px; overflow: hidden; }
.barcode b { display: block; min-width: 1px; background: var(--accent); }

.verdict { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.state { font: italic 400 clamp(30px, 6vw, 44px)/1 var(--serif); color: var(--accent); }
.tierline { font-size: 8px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.standline { font-size: 11px; line-height: 1.8; color: var(--mute); margin: 0; max-width: 46ch; }
.talkline {
  font-size: 11px; line-height: 1.85; color: var(--mute); margin: 0;
  padding-top: 12px; border-top: 1px solid var(--rule); max-width: 46ch;
}
.talkline a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.talkline a:hover { color: var(--bone); }

.rail { list-style: none; margin: 0; padding: 0; display: flex; }
.rail li {
  flex: 1 1 0; min-width: 0; position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  font-size: 8px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--edge2);
}
.rail li i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--edge); display: block; }
.rail li::before { content: ""; position: absolute; left: 9px; right: 0; top: 4px; height: 1px; background: var(--rule); }
.rail li:last-child::before { display: none; }
.rail li.done { color: var(--mute); }
.rail li.done i { background: var(--mute); border-color: var(--mute); }
.rail li.done::before { background: var(--mute); }
.rail li.now { color: var(--ink); }
.rail li.now i {
  background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 70%, transparent);
}

.specs {
  margin: 0; display: grid; gap: 14px 18px;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  border-top: 1px solid var(--rule); padding: 16px 0 0;
}
.specs > div { min-width: 0; }
.specs dt { font-size: 8px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--mute); margin-bottom: 4px; }
.specs dd { margin: 0; font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.specs dd.mono { font-size: 10px; font-weight: 300; }
.pass-foot {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  border-top: 1px solid var(--rule); padding-top: 14px;
  font-size: 8px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--mute);
}
.passacts { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.pickline { margin-top: 8px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.pickline b { color: var(--bone); font-weight: 500; }

@media (min-width: 720px) {
  .pass { flex-direction: row; align-items: stretch; }
  .pass-stub { flex: 0 0 42%; border-radius: 4px 0 0 4px; border-bottom: 1px solid var(--edge); border-right: 0; justify-content: space-between; }
  .pass-body { flex: 1 1 auto; min-width: 0; border-radius: 0 4px 4px 0; border-top: 1px solid var(--edge); border-left: 0; gap: 20px; }
  .pass[data-status="pending"] .pass-stub { border-bottom: 1px dashed var(--edge); border-right: 0; }
  .pass[data-status="pending"] .pass-body { border-top: 1px dashed var(--edge); border-left: 0; }
  .pass-stub::before { border-radius: 4px 0 0 4px; }
  .perf { height: auto; width: 0; margin: 17px 0; border-top: 0; border-left: 1px dashed var(--edge); }
  .perf .notch { top: auto; margin-top: 0; left: -9px; }
  .perf .nl { top: -27px; }
  .perf .nr { bottom: -27px; }
  .serial { font-size: clamp(72px, 7.5vw, 116px); }
  .pass-body .specs { margin-top: auto; }
  .specs { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
}
@media (max-width: 480px) {
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.signout { margin-top: 44px; }

/* ===================================================================
   GALLERY
   =================================================================== */
.galhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.galhead h1 { margin-bottom: 4px; }
.galhead .lede { margin: 0; }
.galside { display: flex; align-items: center; gap: 18px; flex: none; }
.galcount { text-align: right; }
.galcount b { display: block; font: 400 clamp(30px, 4vw, 44px)/1 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; }
.galcount span { font-size: 9px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }

.galbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.galfind { flex: 1 1 190px; min-width: 0; display: block; }

.galfilters {
  border: 1px solid var(--rule); border-radius: var(--r); background: var(--raise);
  padding: 18px; margin: 0 0 16px;
  display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.galgroup .kicker { margin: 0 0 9px; }
.galchips { display: flex; flex-wrap: wrap; gap: 5px; }
.galchip {
  font-family: var(--mono); font-size: 10px; letter-spacing: .04em;
  padding: 6px 9px; border: 1px solid var(--rule); border-radius: 2px;
  background: none; color: var(--mute); cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: color var(--t), border-color var(--t), background var(--t);
}
.galchip i { font-style: normal; font-size: 8px; color: var(--faint); font-variant-numeric: tabular-nums; }
.galchip:hover { color: var(--ink); border-color: var(--edge); }
.galchip.on { background: var(--bone); border-color: var(--bone); color: var(--paper); }
.galchip.on i { color: rgba(20, 19, 15, .6); }

/* the grid. .galrows is moved with a transform rather than reflowed, so
   scrolling 4,444 tiles never touches layout. */
.galgrid { position: relative; width: 100%; }
.galspacer { width: 100%; }
.galrows {
  position: absolute; inset: 0 0 auto 0; will-change: transform;
  display: grid; gap: var(--gap, 10px);
  grid-template-columns: repeat(auto-fill, var(--cell, 120px));
  justify-content: space-between;
}
.frog {
  width: var(--cell, 120px); height: var(--cell, 120px); padding: 0;
  border: 1px solid var(--rule); border-radius: var(--r);
  background-color: var(--rise); background-repeat: no-repeat;
  cursor: pointer; position: relative; overflow: hidden;
  transition: border-color var(--t), transform var(--t);
}
.frog:hover, .frog:focus-visible { border-color: var(--bone); transform: translateY(-2px); z-index: 1; }
.frog span {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-size: 8px; letter-spacing: .1em; color: var(--ink);
  background: linear-gradient(transparent, rgba(0, 0, 0, .72));
  padding: 10px 0 3px; opacity: 0; transition: opacity var(--t);
  font-variant-numeric: tabular-nums;
}
.frog:hover span, .frog:focus-visible span { opacity: 1; }

/* one frog, opened */
.sheetwrap { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: var(--pad); }
.sheetbg { position: absolute; inset: 0; border: 0; padding: 0; cursor: pointer; background: rgba(8, 7, 5, .86); }
.frogsheet {
  position: relative; z-index: 1; width: 100%; max-width: 760px; max-height: 100%; overflow: auto;
  background: var(--raise); border: 1px solid var(--edge); border-radius: 4px;
  display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .6);
}
.frogart { margin: 0; background: var(--tile); display: grid; place-items: center; align-self: stretch; min-height: 0; }
.frogart img { width: 100%; height: auto; }
.frogbody { padding: 22px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.frogtop { display: flex; justify-content: space-between; gap: 14px; }
.frogtop b { display: block; font: 400 38px/1 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; }
.frograre { text-align: right; }
.frograre b { color: var(--platinum); }
.frogtraits { margin: 0; display: grid; gap: 11px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 16px 0; }
.frogtraits dt { font-size: 8px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); margin-bottom: 3px; }
.frogtraits dd { margin: 0; font-size: 13px; color: var(--ink); display: flex; justify-content: space-between; gap: 12px; }
.frogtraits dd i { font-style: normal; font-size: 10px; color: var(--mute); font-variant-numeric: tabular-nums; }
.frogfoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.frogfoot .mono { font-size: 9px; color: var(--faint); }
.frognav { display: flex; gap: 6px; }
@media (max-width: 620px) {
  .frogsheet { grid-template-columns: 1fr; max-height: 92dvh; }
  .frogbody { padding: 18px; }
  .frogtop b { font-size: 30px; }
}

/* ===================================================================
   CONTROL
   =================================================================== */
.users { display: flex; flex-direction: column; gap: 1px; }
.urow, .uhead {
  display: grid; align-items: center; gap: 12px;
  grid-template-columns: 30px 34px minmax(0, 1fr) repeat(4, minmax(56px, 72px)) 42px 50px;
}
.urow { padding: 12px 14px; background: var(--raise); border: 1px solid var(--rule); border-radius: var(--r); }
.uhead { padding: 0 14px 10px; font-size: 8px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); }
.uhead > span:nth-child(n+4) { text-align: right; }
.nums { display: contents; }
.urow .rank { font-size: 10px; color: var(--faint); font-variant-numeric: tabular-nums; }
.urow .pfp { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--edge); object-fit: cover; background: var(--rise); display: block; }
.urow .who { min-width: 0; }
.urow .who b { display: block; font-size: 12px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.urow .who span { display: block; font-size: 9px; color: var(--faint); letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.urow .who a { color: inherit; text-decoration: none; }
.urow .who a:hover { color: var(--ink); text-decoration: underline; }
.urow .num { text-align: right; font-size: 11px; color: var(--ink); font-variant-numeric: tabular-nums; min-width: 0; }
.urow .num i { display: block; font-size: 8px; font-style: normal; color: var(--faint); letter-spacing: .12em; }
.urow .best { text-align: right; font-size: 11px; letter-spacing: .06em; color: var(--mute); }
.urow .best i { display: block; font-style: normal; font-size: 12px; color: var(--ink); }
.urow .score { font-size: 13px; color: var(--ink); }
.urow .ismall { font-size: 9px; }

.arow2, .ahead2 { grid-template-columns: 46px minmax(0, 1fr) 118px 104px 104px auto; }
.arow2 .acts { display: flex; gap: 5px; justify-content: flex-end; flex-wrap: wrap; }
.ahead2 > span:nth-child(n+3) { text-align: right; }
.arow2 .who a { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.arow2 .who a:hover { text-decoration-color: currentColor; }
.urow .who .mono { font-size: 9px; color: var(--faint); letter-spacing: .04em; }
.urow .reach b { display: block; font-weight: 500; font-size: 12px; }
.urow .reach .ctry {
  display: block; margin-top: 2px; font-size: 9px; font-style: normal; letter-spacing: .04em;
  color: var(--mute); text-transform: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.urow .reach .ctry.guess { color: var(--faint); }
.urow .reach .ctry.claim { color: var(--faint); font-style: italic; }
.urow .reach .ctry.warn { color: var(--signal); }
.urow .reach .ctry.odd { color: var(--faint); opacity: .62; font-size: 8.5px; }
.urow .reach .odd { color: var(--faint); }

.lookrow { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 0 0 10px; }
.lookrow .note { margin: 0; font-size: 9px; letter-spacing: .1em; }
.morerow { display: flex; justify-content: center; margin: 14px 0 0; }

.tbtn {
  font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  padding: 7px 10px; border: 1px solid var(--edge); border-radius: 2px;
  background: none; color: var(--mute); cursor: pointer; transition: color var(--t), border-color var(--t), background var(--t);
}
.tbtn:hover { color: var(--ink); border-color: var(--ink); }
.tbtn.on { background: var(--bone); border-color: var(--bone); color: var(--paper); }
.tbtn:disabled { opacity: .4; cursor: default; }

.chips4 { display: inline-flex; gap: 3px; }
.c4 { width: 15px; height: 15px; display: grid; place-items: center; font-size: 7px; border: 1px solid var(--rule); color: var(--faint); border-radius: 2px; }
.c4.on { background: var(--bone); border-color: var(--bone); color: var(--paper); }
.c4.undone { background: var(--signal); border-color: var(--signal); color: var(--paper); }

.swrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 11px; color: var(--ink); cursor: pointer; }
.swrow input { accent-color: var(--bone); width: 15px; height: 15px; margin: 0; }
.swrow input:disabled + span { color: var(--faint); }

.cantpost { border: 1px solid rgba(212, 96, 63, .4); border-radius: var(--r); background: rgba(212, 96, 63, .06); padding: 16px 18px; margin: 0 0 14px; }
.cantpost .kicker { color: var(--signal); margin-bottom: 8px; }
.cantpost .note + .note { margin-top: 10px; }
.needlist { margin: 6px 0 0; padding-left: 18px; }
.needlist li { font-size: 11px; line-height: 1.9; color: var(--mute); }
.needlist code { font-size: 10px; color: var(--ink); background: var(--paper); padding: 2px 6px; border-radius: 2px; }
.note.posting { color: var(--platinum); }
.setup { margin-top: 14px; padding: 14px; border: 1px dashed var(--edge); border-radius: var(--r); background: var(--paper); }
.setup .kicker { margin-bottom: 8px; }
.setup .note + .note { margin-top: 6px; }
.cburl { display: block; font-family: var(--mono); font-size: 11px; color: var(--eth); word-break: break-all; padding: 9px 10px; margin: 6px 0 8px; background: #0b0a08; border: 1px solid var(--rule); border-radius: 2px; }

.feed { display: flex; flex-direction: column; gap: 8px; }
.queued { margin-bottom: 12px; }
.qtop { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.qkind { font-size: 8px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; padding: 4px 8px; border-radius: 2px; border: 1px solid var(--edge); color: var(--mute); }
.qkind.approval { color: var(--platinum); border-color: var(--platinum); }
.qkind.pull { color: var(--gold); border-color: var(--gold); }
.qsaid { margin: 0 0 10px; padding: 10px 12px; border-left: 2px solid var(--rule); background: var(--paper); font-size: 11px; line-height: 1.5; color: var(--mute); }
.qtext { font-size: 12px; line-height: 1.8; color: var(--ink); margin: 0 0 12px; white-space: pre-wrap; }
.qimg { width: 100%; max-width: 300px; border-radius: 4px; border: 1px solid var(--rule); margin-bottom: 12px; }
.qacts { display: flex; gap: 8px; flex-wrap: wrap; }

.standline-lg { font: 400 17px/1.4 var(--serif); color: var(--ink); }

/* ===================================================================
   MOTION, SMALL SCREENS
   =================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

@media (max-width: 760px) {
  .top { height: 54px; gap: 10px; }
  .brand .mark { height: 23px; }
  .nav { margin-left: 2px; }
  .nav a { font-size: 9px; letter-spacing: .12em; padding: 8px 9px; }
  .me { padding: 3px 8px 3px 3px; }
  .me img { width: 22px; height: 22px; }
  .me span { font-size: 9px; max-width: 90px; }
  .page { padding-left: 16px; padding-right: 16px; padding-bottom: 64px; }
  .section { margin-top: 34px; }
  h2 { font-size: 26px; }
  h2::after { display: none; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
  .tile { padding: 12px 13px; }
  .tile b { font-size: 26px; margin-bottom: 4px; }
  .tile span { font-size: 8px; letter-spacing: .14em; }
  .panel { padding: 16px; }
  .idcard { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; margin-bottom: 18px; }
  .idcard img { width: 52px; height: 52px; }
  .statusword b { font-size: 26px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: 0 0 auto; }
  .row .grow { flex: 1 1 100%; }
  .row > .btn { width: 100%; }
  .foot { flex-direction: column; gap: 8px; text-align: center; }

  .uhead { display: none; }
  .urow {
    grid-template-columns: 20px 30px minmax(0, 1fr) auto;
    grid-template-areas: "rank pfp who meta" "nums nums nums nums";
    row-gap: 8px; column-gap: 10px; padding: 11px 12px;
  }
  .urow .rank { grid-area: rank; }
  .urow .pfp { grid-area: pfp; width: 30px; height: 30px; }
  .urow .who { grid-area: who; }
  .urow .best, .urow .score { grid-area: meta; justify-self: end; }
  .nums { grid-area: nums; display: flex; gap: 14px; flex-wrap: wrap; }
  .urow .num { text-align: left; font-size: 10px; display: flex; align-items: baseline; gap: 5px; }
  .urow .num i { display: inline; font-size: 8px; }
  .urow .hidesm { display: none; }
  /* the review row: who they are, then how far they reach and where they
     stand, then the chips, then the buttons on a line of their own */
  .urow.arow2 {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    grid-template-areas: "rank who reach" "chips chips state" "acts acts acts";
    row-gap: 10px;
  }
  .urow.arow2 .rank { grid-area: rank; }
  .urow.arow2 .who { grid-area: who; }
  .urow.arow2 .num.reach { grid-area: reach; text-align: right; display: block; }
  .urow.arow2 .num:not(.reach) { grid-area: chips; text-align: left; display: block; }
  .urow.arow2 .best { grid-area: state; text-align: right; }
  .urow.arow2 .acts { grid-area: acts; justify-content: flex-start; }
  .urow.arow2 .reach b { display: block; }
  .urow.arow2 .reach .ctry { display: block; margin-top: 2px; }
}
@media (max-width: 440px) {
  .brand .word { display: none; }
  /* the avatar alone is enough to say who you are */
  .me { padding: 3px; }
  .me span { display: none; }
  .idcard { grid-template-columns: 46px minmax(0, 1fr) auto; }
  .idcard img { width: 46px; height: 46px; }
  .idcard h1 { font-size: 22px; }
  .statusword b { font-size: 22px; }
}
