/* Totem — "Set Apart 2026" shared token + component layer, v2.
   Y2K thermal-camera collage: textured fields (scanlines + smears + grain),
   ONE banded thermal star per surface (replaces all round blobs), torn-paper
   stickers with hard offset shadows, warped display type via brandtype.js.
   Figure-ground: blue field/yellow star on /me + quests; INVERTED yellow
   field/blue star on /welcome + /claim (body.sun).
   Loaded by student AND admin pages; admin.css layers on top for admin.
   The stage display has its own stylesheet: stage.css. */

:root {
  /* Set Apart 2026 palette */
  --ocean:  #0C72EC;
  --deep:   #0237E5;
  --lime:   #1EEA0C;
  --orange: #FF9217;
  --yellow: #FFDC29;
  --paper:  #FFF8E8;
  --ink:    #0A0A14;

  /* derived tints/shades */
  --paper-2: #FFFDF6;          /* input fields on cream */
  --paper-line: #EFE4C8;       /* hairlines on cream */
  --muted-paper: #5A5546;      /* readable warm grey on cream */
  --muted-field: rgba(255, 248, 232, .82); /* muted text on blue */
  --lime-shade: #128F02;       /* lime dark enough for text on cream */
  --orange-shade: #B45A00;     /* orange dark enough for text on cream */

  /* legacy token aliases (kept so nothing downstream breaks) */
  --ink-legacy: var(--ink);
  --accent: var(--yellow);
  --good: var(--lime-shade);
  --bad: var(--orange-shade);
  --radius: 14px;

  --display: "SetApartDisplay", "SetApartFallback", "Anybody", "Arial Black", system-ui, sans-serif;
  --mono: "SetApartMono", "SetApartMonoFallback", "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* v2: torn-paper edges (jittered polygons — sticker faces + shadow layers
     share the same path so the offset shadow matches the tear) */
  --torn-a: polygon(0.8% 4%, 7.5% 1.2%, 18% 3.4%, 31% 0.4%, 44% 2.8%, 57% 0.2%,
    69% 3.1%, 82% 0.6%, 93% 2.6%, 99.4% 0.9%, 98.6% 13%, 99.8% 27%, 98.2% 42%,
    99.6% 58%, 98% 72%, 99.7% 87%, 98.4% 97%, 88% 99.3%, 75% 97.5%, 61% 99.7%,
    47% 97.2%, 33% 99.5%, 19% 97.7%, 8% 99.6%, 1.4% 97.9%, 0.2% 85%, 1.6% 70%,
    0% 55%, 1.8% 40%, 0.4% 25%, 1.5% 11%);
  --torn-b: polygon(1.5% 2.5%, 12% 0.6%, 26% 3.2%, 40% 0.3%, 53% 2.9%, 67% 0.5%,
    80% 3.3%, 92% 0.8%, 99.2% 3.6%, 98% 16%, 99.9% 31%, 98.1% 47%, 99.5% 63%,
    97.9% 78%, 99.4% 91%, 96% 98.8%, 84% 97.1%, 70% 99.8%, 55% 97.3%, 41% 99.6%,
    27% 97.4%, 13% 99.9%, 3% 98.2%, 0.5% 89%, 1.9% 74%, 0.1% 59%, 1.7% 44%,
    0.3% 29%, 1.2% 14%);

  /* hard offset shadow for torn stickers: near-black navy on the blue field,
     overridden to --deep on the yellow field (body.sun) */
  --shadow-hard: #051246;

  /* muted text that holds 4.5:1 on the yellow field */
  --muted-sun: #5A5546;

  /* directional texture, shared by both fields: film grain tile (alpha baked
     into the SVG so it can live inside a background-image stack) */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.07'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--deep); }
body {
  margin: 0;
  /* the blue field, v2: grain + diagonal scanlines + motion-smear bands over
     ONE yellow thermal star (knocked back by a translucent field veil so it
     reads low-opacity, upper area), over the ocean → deep gradient.
     Layer order = paint order: first layer on top. */
  background:
    var(--grain) repeat,
    repeating-linear-gradient(112deg, rgba(3, 14, 58, .08) 0 1px, rgba(3, 14, 58, 0) 1px 7px),
    linear-gradient(180deg, rgba(255, 248, 232, 0) 17%, rgba(255, 248, 232, .07) 20%, rgba(255, 248, 232, 0) 25%),
    linear-gradient(180deg, rgba(30, 234, 12, 0) 46%, rgba(30, 234, 12, .06) 49%, rgba(30, 234, 12, 0) 53%),
    linear-gradient(180deg, rgba(2, 13, 46, 0) 73%, rgba(2, 13, 46, .18) 78%, rgba(2, 13, 46, 0) 85%),
    linear-gradient(180deg, rgba(12, 114, 236, .74) 0%, rgba(2, 55, 229, .78) 100%),
    url('/static/img/star-yellow.svg') 76% -120px / min(120vw, 560px) no-repeat,
    linear-gradient(180deg, var(--ocean) 0%, var(--deep) 100%);
  background-color: var(--deep);
  color: #FFFFFF;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  min-height: 100dvh;
}

/* INVERTED field for /welcome + /claim (body.sun): yellow field, the big
   BLUE thermal star behind the content column, ink text, same texture kit. */
body.sun {
  /* THE REAL ART: the brand kit's square star background (blue star on
     yellow, texture baked in), cover-cropped for phones; yellow gradient
     stays underneath as the 404 fallback. */
  /* no `fixed` attachment: it forces full repaints per scroll frame on iOS */
  background:
    url('/static/img/brand/field-star-square.jpg') center / cover no-repeat,
    linear-gradient(180deg, #FFE451 0%, var(--yellow) 52%, #F3CE13 100%);
  background-color: var(--yellow);
  color: var(--ink);
  --shadow-hard: var(--deep);
}
/* on-yellow ink-based link + muted colors (4.5:1+) */
body.sun a { color: var(--ink); text-decoration-color: var(--deep); }
body.sun small, body.sun .muted { color: var(--muted-sun); }
body.sun button.linkish { color: var(--deep); }
/* field-level fine print can land on the blue star core — set it on cream
   tape strips so it holds 4.5:1 over star, fringe, and field alike */
body.sun .wrap > p small {
  background: var(--paper);
  color: var(--muted-paper);
  padding: 2px 8px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  line-height: 1.9;
}

/* links on the blue field: white text, yellow underline accent (yellow text
   alone is ~3.4:1); links inside cream cards override to --deep below */
a { color: #FFFFFF; font-weight: 700; text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 3px; }
/* block-level link wrappers (quest cards, hub cards) are buttons, not prose */
a:has(.card), a.card, a.hubcard { text-decoration: none; color: inherit; font-weight: inherit; }
/* path-valued crests (<img>) size like the emoji they replace */
.crest-img { height: 1.15em; width: auto; vertical-align: -0.18em; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 900;
  /* the display face is now a variable font (wdth 50–150, default 100):
     uniform-extended is opt-in. brandtype.js overrides per letter on
     [data-warp] via font-variation-settings. */
  font-stretch: 150%;
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: 1.02;
  margin: 0 0 .5em;
  overflow-wrap: anywhere;
}
h1 { font-size: 1.4rem; }
h2 { font-size: 1rem; }
p { margin: .35em 0; }
small, .muted { color: var(--muted-field); }

/* chromatic ghosting for hero display type */
.chroma { text-shadow: .04em 0 0 rgba(255, 91, 211, .55), -.04em 0 0 rgba(0, 224, 255, .45); }

.wrap { max-width: 640px; margin: 0 auto; padding: 16px 16px 96px; }
.wrap-wide { max-width: 960px; }

/* --- top bar / bottom nav --- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: rgba(2, 30, 140, .9); backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--yellow);
}
.topbar .brand {
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 150%;
  font-size: .95rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--yellow);
  text-decoration: none; /* it's a home link now */
}

/* --- More hub cards --- */
a.hubcard {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
}
a.hubcard strong { font-size: 1.02rem; }
.hub-ico { font-size: 1.5rem; }

/* --- student mini-nav: sticky, always a way home + a way to enter a code --- */
.studnav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 14px calc(9px + 2px);
  background: var(--paper);
  border-bottom: 2px solid var(--deep);
  box-shadow: 0 3px 0 rgba(2, 55, 229, .25);
}
.studnav a { text-decoration: none; color: var(--ink); }
.studnav-home {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--display); font-stretch: 150%;
  text-transform: uppercase; font-size: .95rem; letter-spacing: .02em;
  min-height: 32px;
}
.studnav-home .crest-img { height: 1.5em; }
.studnav-code {
  font-family: var(--mono); font-weight: 700; font-size: .72rem;
  text-transform: uppercase; letter-spacing: .1em;
  background: var(--yellow);
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 7px 12px;
  box-shadow: 2px 2px 0 var(--deep);
}
.studnav-code:active { transform: translate(2px, 2px); box-shadow: none; }

/* --- student flash = toast: fixed, slides in, fades out — feedback is
   visible wherever you were on the page (htmx keeps scroll position) --- */
body.student .flash {
  position: fixed; top: 12px; left: 50%; z-index: 60;
  transform: translateX(-50%);
  max-width: min(92vw, 480px);
  border: 1px solid var(--ink);
  box-shadow: 3px 3px 0 var(--deep);
  animation: toast-in .25s cubic-bezier(.2,.8,.2,1), toast-out .5s ease 4s forwards;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -14px); } }
@keyframes toast-out { to { opacity: 0; visibility: hidden; } }
.topbar .spacer { flex: 1; }
.topbar form { margin: 0; }
.topbar .muted { color: var(--muted-field); }

/* cream sticker bar; active tab = yellow sticker pill behind the icon */
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  display: flex;
  background: var(--paper);
  border-top: 2px solid var(--deep);
  box-shadow: 0 -3px 0 rgba(2, 55, 229, .25);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav a {
  position: relative;
  flex: 1; text-align: center; padding: 11px 0 9px;
  color: var(--muted-paper);
  font-family: var(--mono);
  font-size: .62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
}
.bottomnav a .ico { position: relative; display: block; font-size: 1.25rem; line-height: 1.2; }
.bottomnav a.active { color: var(--ink); }
.bottomnav a.active::before {
  content: "";
  position: absolute; top: 7px; left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 46px; height: 27px;
  background: var(--yellow);
  border: 1px solid var(--ink);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--deep);
}

/* --- cards: cream DIY stickers --- */
.card {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--deep);
  border-radius: var(--radius);
  padding: 14px;
  margin: 0 0 12px;
  box-shadow: 3px 3px 0 var(--deep);
}
.card.team-edge { border-left: 5px solid var(--team, var(--orange)); }
/* on cream: ink text, warm-grey muted, deep links */
.card small, .card .muted,
.tribe-hero small, .tribe-hero .muted { color: var(--muted-paper); }
.card a { color: var(--deep); }

/* on the yellow field, cards become TORN-PAPER stickers: jittered clip-path
   face on ::after, the same path offset + filled deep blue on ::before for
   the hard cut-paper shadow. isolation keeps the negative-z pseudos inside
   the card instead of escaping behind the page field. */
body.sun .card {
  position: relative;
  isolation: isolate;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 18px 16px;
  transform: rotate(-1.8deg);
}
body.sun .card::before {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background: var(--shadow-hard);
  clip-path: var(--torn-a);
  transform: translate(6px, 7px);
}
body.sun .card::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: var(--paper);
  clip-path: var(--torn-a);
}
body.sun .card.sticker-tilt { transform: rotate(2.1deg); }
body.sun .card.sticker-tilt::before,
body.sun .card.sticker-tilt::after { clip-path: var(--torn-b); }

.row { display: flex; align-items: center; gap: 10px; }
.row .grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* --- forms --- */
label.field {
  display: block; margin: 10px 0 2px;
  font-family: var(--mono);
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted-paper);
}
input[type=text], input[type=password], input[type=number], input[type=url],
input[type=date], input[type=datetime-local], select, textarea {
  width: 100%;
  background: var(--paper-2);
  color: var(--ink);
  border: 1.5px solid var(--deep);
  border-radius: 10px;
  padding: 12px;
  font-size: 1rem;
  font-family: inherit;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 3px solid var(--lime);
  outline-offset: 0;
  border-color: var(--ink);
}
.checkline { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
.checkline input { width: 20px; height: 20px; accent-color: var(--deep); }

.btn {
  display: inline-block;
  background: var(--yellow);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 10px;
  padding: 12px 18px;
  min-height: 44px;
  font-size: 1rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  box-shadow: 3px 3px 0 var(--deep);
  transition: transform .06s ease, box-shadow .06s ease, filter .12s ease;
}
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--deep); }
.btn.block { display: block; width: 100%; }
.btn.ghost {
  background: transparent;
  color: var(--paper);
  border: 2px solid var(--paper);
  box-shadow: none;
  font-weight: 700;
}
.btn.ghost:active { transform: none; filter: brightness(1.2); }
.card .btn.ghost, .tribe-hero .btn.ghost { color: var(--ink); border-color: var(--ink); }
.btn.danger {
  background: transparent;
  color: var(--orange-shade);
  border: 2px solid var(--orange);
  box-shadow: none;
  font-weight: 700;
}
.btn.small { padding: 7px 12px; min-height: 0; font-size: .85rem; border-radius: 8px; }
.btn:disabled { opacity: .5; }
button.linkish { background: none; border: 0; color: var(--yellow); font: inherit; cursor: pointer; padding: 0; }
.card button.linkish { color: var(--deep); }

/* --- chips (point pad): cut-paper stickers --- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chip {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 11px 16px; min-height: 44px;
  font-size: 1rem; font-weight: 800;
  font-family: var(--mono);
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--deep);
}
.chip.selected {
  background: var(--yellow);
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}

.seg {
  display: flex;
  background: var(--paper);
  border: 1.5px solid var(--deep);
  border-radius: 10px;
  overflow: hidden;
}
.seg label { flex: 1; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: block; text-align: center; padding: 10px 6px;
  font-family: var(--mono);
  font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted-paper); cursor: pointer;
}
.seg input:checked + span {
  background: var(--yellow);
  color: var(--ink);
  box-shadow: inset 0 -3px 0 var(--deep);
}

/* --- badges, flash --- */
/* sticker-chip look: 1px ink border (cut-out edge) */
.badge {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  font-family: var(--mono);
  font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  background: var(--paper-line); color: var(--muted-paper);
  border: 1px solid var(--ink);
  white-space: nowrap;
}
.badge.banked   { color: var(--ink); background: var(--yellow); border-color: var(--ink); }
.badge.revealed { color: var(--ink); background: var(--lime); border-color: var(--ink); }
.badge.void     { color: var(--ink); background: var(--orange); border-color: var(--ink); text-decoration: line-through; }
.badge.pending  { color: var(--ink); background: var(--yellow); border-color: var(--ink); }
.badge.approved { color: var(--ink); background: var(--lime); border-color: var(--ink); }
.badge.rejected { color: var(--ink); background: var(--orange); border-color: var(--ink); }
/* legibility law: tribe name on a cream chip with a tribe-color edge, never raw team text */
.badge.team {
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--ink);
  border-left: 5px solid var(--team, var(--deep));
  border-radius: 6px;
  transform: rotate(-1.6deg); /* the one chip that tilts */
}

.flash {
  border-radius: 10px; padding: 10px 14px; margin: 0 0 12px;
  font-weight: 700; color: var(--ink);
  border: 1px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}
.flash.ok  { background: var(--lime); }
.flash.err { background: var(--orange); }

/* --- tables (admin: dense, calm, readable on cream) --- */
table.list { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.list th {
  text-align: left; color: var(--muted-paper);
  font-family: var(--mono);
  font-size: .65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  padding: 6px 8px;
}
table.list td { padding: 8px; border-top: 1px solid var(--paper-line); vertical-align: top; }
.amount-pos { color: var(--lime-shade); font-weight: 800; font-variant-numeric: tabular-nums; }
.amount-neg { color: var(--orange-shade); font-weight: 800; font-variant-numeric: tabular-nums; }

/* --- progress bars (student + admin quest views) ---
   deep navy track, tribe-color fill with a lime thermal edge */
/* empty track must read EMPTY on cream cards (a dark track looks full) */
.progress { height: 12px; border-radius: 999px; background: var(--paper-line); border: 1px solid rgba(10, 10, 20, .25); overflow: hidden; }
.progress > div {
  height: 100%; border-radius: 999px;
  background: var(--team, var(--yellow));
  box-shadow: inset -3px 0 0 var(--lime);
  transition: width .6s cubic-bezier(.2,.8,.2,1);
}

/* --- student look --- */
body.student .wrap { max-width: 520px; }

/* tribe hero, v2: a TORN-PAPER cream sticker (no more round blob).
   Sticker face on ::after (z -1), the same torn path offset + filled with
   the hard shadow color on ::before (z -2). isolation keeps the negative-z
   pseudos inside the element. Bigger tilt than v1 — it's the hero. */
.tribe-hero {
  position: relative;
  isolation: isolate;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-radius: 0;
  padding: 24px 20px;
  margin: 16px 6px 30px;
  box-shadow: none;
  transform: rotate(-2.6deg);
}
.tribe-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--paper);
  clip-path: var(--torn-b);
}
.tribe-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--shadow-hard);
  clip-path: var(--torn-b);
  transform: translate(7px, 8px);
}
/* claim page: the hero is also a body.sun .card — keep its own tilt + tear */
body.sun .card.tribe-hero { transform: rotate(-2.6deg); padding: 24px 20px; }
body.sun .card.tribe-hero::before,
body.sun .card.tribe-hero::after { clip-path: var(--torn-b); }
.tribe-hero .crest { font-size: 3rem; line-height: 1; filter: drop-shadow(2px 2px 0 rgba(10, 10, 20, .18)); }
.tribe-hero .crest-img { height: 72px; vertical-align: middle; }
.tribe-hero h1 { margin: 6px 0 0; font-size: clamp(1.3rem, 6.5vw, 1.7rem); color: var(--ink); }
/* legibility law: tribe name in ink with a thick tribe-color underline */
.tribe-hero .tribename {
  display: inline-block;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 150%; /* dynamic strings stay uniform-extended, never warped */
  letter-spacing: .02em;
  text-transform: uppercase;
  font-size: .85rem;
  line-height: 1.15;
  border-bottom: .32em solid var(--team, var(--orange));
  padding-bottom: 1px;
}

/* tiers sit on cream cards — shaded orange for 4.5:1+ contrast */
.tiers { color: var(--orange-shade); letter-spacing: .12em; font-size: .95rem; font-weight: 700; white-space: nowrap; }
/* quest cards keep straight edges (lists must scan), but the left tribe rail
   gets a torn top-edge notch instead of a flat border */
.quest-card {
  border-left: 0;
  position: relative;
  overflow: hidden;
}
.quest-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 9px;
  background: var(--team, var(--orange));
  clip-path: polygon(0 0, 34% 7px, 58% 2px, 78% 10px, 100% 4px, 100% 100%, 0 100%);
}
.quest-card .title { font-weight: 800; font-size: 1.05rem; }
.quest-card [data-progress-quest] {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px dashed rgba(10, 10, 20, .25);
}
[data-count] {
  font-family: var(--mono);
  font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
}
.codebox { display: flex; gap: 8px; }
.codebox input {
  font-family: var(--mono);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: .2em;
  font-weight: 700;
  text-align: center;
}

/* --- login / welcome: hero moment --- */
/* .torch kept as the welcome backdrop hook; on body.sun the page-level blue
   thermal star IS the backdrop, so the old radial blob is retired there */
.torch {
  background: radial-gradient(300px 300px at 50% -90px,
    var(--yellow) 34%, var(--lime) 50%, rgba(12, 114, 236, 0) 70%) no-repeat;
}
body.sun .torch { background: none; }
/* the real "set APART" lockup above hero titles */
.brand-logo {
  display: block;
  margin: 0 auto 12px;
  width: min(58vw, 250px); height: auto;
  filter: drop-shadow(2px 3px 0 rgba(5, 18, 70, .28));
}
body.sun .brand-logo { filter: drop-shadow(2px 3px 0 rgba(2, 55, 229, .3)); }
.login-title {
  font-family: var(--display);
  font-stretch: 150%;
  color: var(--yellow);
  font-size: clamp(1.7rem, 9vw, 2.6rem);
  letter-spacing: .01em;
  line-height: .98;
  margin-bottom: .2em;
  text-shadow: .04em 0 0 rgba(255, 91, 211, .55), -.04em 0 0 rgba(0, 224, 255, .45);
}
/* figure-ground flip: deep-blue display type on the yellow field */
body.sun .login-title { color: var(--deep); }
.tagline {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: .72rem;
  font-weight: 700;
}
/* the one tilted sticker on the welcome screen */
.sticker-tilt { transform: rotate(1.6deg); }

/* --- sign-in by tribe + name --- */
.tribegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
a.tribepick {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 18px 10px 14px;
  text-decoration: none; color: var(--ink);
  border-left: 5px solid var(--team);
}
a.tribepick:nth-child(odd) { transform: rotate(-1.2deg); }
a.tribepick:nth-child(even) { transform: rotate(1.1deg); }
a.tribepick:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--shadow-hard); }
.tribepick-crest .crest-img { height: 52px; }
.tribepick-name {
  font-family: var(--display); font-stretch: 150%;
  text-transform: uppercase; font-size: .92rem; letter-spacing: .02em;
  text-align: center; line-height: 1.1;
}
.codefold summary {
  font-family: var(--mono); font-weight: 700; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink); cursor: pointer;
  background: var(--paper); border: 1px solid var(--ink); border-radius: 999px;
  padding: 10px 16px; display: inline-block;
  box-shadow: 2px 2px 0 var(--shadow-hard);
}
.namegrid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.namechip {
  display: inline-flex; align-items: baseline; gap: 6px;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--ink); border-radius: 999px;
  padding: 11px 16px; min-height: 44px;
  font-weight: 800; font-size: .98rem;
  text-decoration: none;
  box-shadow: 2px 2px 0 var(--shadow-hard);
}
.namechip small { font-family: var(--mono); font-weight: 700; font-size: .62rem; color: var(--muted-paper); text-transform: uppercase; letter-spacing: .08em; }
.namechip:active { transform: translate(2px, 2px); box-shadow: none; }
.namechip.is-claimed { opacity: .55; box-shadow: none; border-style: dashed; font-weight: 600; }
.namechip .tick { color: var(--lime-shade); font-weight: 900; }

/* --- moderation --- */
.modcard img { width: 100%; border-radius: 10px; display: block; border: 1px solid var(--paper-line); }

/* --- misc --- */
.divider {
  border: 0; height: 5px; margin: 20px 0;
  background: linear-gradient(90deg, var(--yellow) 0%, var(--lime) 55%, rgba(30, 234, 12, 0) 100%);
  border-radius: 999px;
}
.center { text-align: center; }
.mt { margin-top: 14px; }
.danger-text { color: var(--orange-shade); }
code.code {
  background: var(--paper-2); color: var(--ink);
  border: 1px solid var(--paper-line);
  border-radius: 6px; padding: 2px 7px;
  font-family: var(--mono); font-weight: 700; letter-spacing: .1em;
}

@media (min-width: 700px) {
  .wrap { padding-bottom: 24px; }
  body.admin .wrap { padding-left: 24px; padding-right: 24px; }
}
