/* ============================================================================
   WIGANTARA CTF for CTFd
   pages.css: hero, cut-letter headlines, cards, modal, scoreboard, auth
   Direction: DESIGN.md · Persona 5 cut-paper ransom note
   ========================================================================= */

/* --- A. Cut-letter headline (ransom note) ------------------------------- */

/* Each letter is its own scrap. The template emits one .wg-cut per character;
   the tone and rotation come from nth-child so there is no per-letter inline
   style and no layout cost. Rotation is capped at 3.5deg because past that the
   word stops being readable at speed. */
.wg-cut {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.1em 0.06em;
  line-height: 1;
}
.wg-cut__ch {
  display: inline-block;
  padding: 0.05em 0.085em 0.09em;
  background: var(--paper-fixed);
  color: var(--static-ink);
  border: 2px solid #0B0B0D;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
  --settle-rot: -1.2;
  transform: rotate(calc(var(--settle-rot) * 1deg));
  box-shadow: 3px 3px 0 0 var(--shadow);
}
/* alternate the paper tone and the tilt so no two neighbours match */
.wg-cut__ch:nth-child(2n)  { background: var(--scrap-dark); color: var(--paper-fixed); --settle-rot: 1.6; }
.wg-cut__ch:nth-child(3n)  { background: var(--paper-fixed-2); color: var(--static-ink); --settle-rot: -2.4; }
.wg-cut__ch:nth-child(4n)  { --settle-rot: 0.9; }
.wg-cut__ch:nth-child(5n)  { background: var(--scrap-dark-2); color: var(--paper-fixed); --settle-rot: -0.6; }
.wg-cut__ch:nth-child(7n)  { --settle-rot: 2.2; }
.wg-cut__ch:nth-child(11n) { --settle-rot: -3.2; }

/* the single crimson letter keeps its tilt when it overrides the tones */
.wg-cut__ch--hot { background: var(--crimson); color: #fff; }

.wg-cut__sp { display: inline-block; width: 0.34em; }

/* --- B. Hero ------------------------------------------------------------ */

.wg-hero {
  position: relative;
  padding-block: clamp(34px, 4.2vw, 62px) clamp(28px, 3.2vw, 46px);
  /* clip the enormous background slabs without cutting the plate's offset
     shadow, which hangs 9px below and right of the plate */
  overflow: clip;
  overflow-clip-margin: 14px;
}
.wg-hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
/* one hard diagonal slab behind the copy: the loudest single shape on the page */
.wg-hero__slash {
  position: absolute;
  top: -10%;
  bottom: -10%;
  right: -12%;
  width: 46%;
  background: var(--crimson);
  opacity: 0.12;
  clip-path: polygon(40% 0, 100% 0, 100% 100%, 0 100%);
}
.wg-hero__slash2 {
  position: absolute;
  top: -10%;
  bottom: -10%;
  right: -12%;
  width: 34%;
  background: var(--paper);
  opacity: 0.05;
  clip-path: polygon(58% 0, 100% 0, 100% 100%, 18% 100%);
}

.wg-hero__in {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(26px, 4.5vw, 56px);
  align-items: center;
}

.wg-hero__kicker { margin-bottom: 16px; }

.wg-hero h1 {
  margin: 0 0 22px;
  /* Cut letters carry their own padding and border, so the effective width of
     a headline is roughly 1.35x the glyph run. The size is set for the longest
     line ("WIGANTARA") fitting the 7fr column at 1120px. */
  font-size: clamp(1.5rem, 0.75rem + 2.7vw, 2.85rem);
  line-height: 1;
  letter-spacing: -0.02em;
}
.wg-hero__line2 { display: block; margin-top: 0.22em; }
/* keep each headline line from orphaning a single letter */
.wg-cut { gap: 0.09em 0.05em; }

.wg-hero__sub {
  max-width: 44ch;
  margin: 0 0 26px;
  color: var(--smoke);
  font-size: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
  line-height: 1.62;
}

.wg-hero__actions { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }

/* countdown: a strip of evidence tags */
.wg-cd {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.wg-cd__cell {
  min-width: 62px;
  padding: 9px 12px 8px;
  border: 2px solid #0B0B0D;
  background: var(--paper-fixed);
  color: var(--static-ink);
  text-align: center;
  transform: rotate(-0.8deg);
}
.wg-cd__cell:nth-child(2n) { background: var(--scrap-dark); color: var(--paper-fixed); border-color: #0B0B0D; transform: rotate(1.1deg); }
.wg-cd__n {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.wg-cd__l {
  display: block;
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.72;
}

/* crest plate: a photograph of the crest, taped to the page */
.wg-plate {
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(22px, 3vw, 34px);
  background: var(--paper-fixed);
  border: 2px solid #0B0B0D;
  box-shadow: 9px 9px 0 0 var(--crimson);
  transform: rotate(-1.6deg);
}
.wg-plate img { width: clamp(148px, 21vw, 214px); height: auto; display: block; }
.wg-plate__word { margin-top: 18px; text-align: center; }
.wg-plate__word b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(0.875rem, 1.5vw, 1.0625rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--static-ink);
}
.wg-plate__word span {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #5C574E;
}
/* tape strips */
.wg-plate__tape {
  position: absolute;
  width: 74px;
  height: 22px;
  background: var(--acid-fill);
  opacity: 0.75;
  border-inline: 1px dashed rgb(11 11 13 / 0.3);
}
.wg-plate__tape--tl { top: -11px; left: 18px; transform: rotate(-7deg); }
.wg-plate__tape--br { bottom: -11px; right: 18px; transform: rotate(-6deg); }

/* --- C. Figures strip --------------------------------------------------- */

/* section rhythm: the landing is a sequence of stacked cuts, not a series of
   full-height marketing panels, so vertical space is spent on the pieces */
/* Section rhythm. The bottom value used to be 0 with `:last-child` restoring it,
   which left the briefing card sitting directly on the rules section's divider
   line: no clearance at all, so the 2px cut read as striking the card edge.
   Every section now owns a bottom gutter. */
.wg-section { padding-block: clamp(26px, 3.2vw, 44px) clamp(30px, 4vw, 56px); }
/* the last section closes the page, so it gets a little more air */
.wg-section:last-child { padding-bottom: clamp(36px, 5vw, 72px); }
.wg-cut-top { position: relative; }
.wg-cut-top::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: var(--ink-line);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 40px 100%);
}
.wg-cut-top--alt::before { background: var(--crimson); opacity: 0.55; }

.wg-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 8px;
}
.wg-figure {
  padding: 16px 18px 14px;
  background: var(--ink-panel);
  border: 2px solid var(--ink-line);
  transform: rotate(-0.5deg);
}
.wg-figure:nth-child(2n) { transform: rotate(0.7deg); }
.wg-figure:nth-child(3n) { transform: rotate(-0.9deg); }
.wg-figure__n {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.125rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--bone);
}
.wg-figure__l {
  display: block;
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--smoke);
}

/* --- D. Section head: skewed band + index ------------------------------- */

.wg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.wg-head__left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.wg-head h2 { margin: 0; font-size: clamp(1.375rem, 1.1rem + 1.4vw, 1.875rem); }
.wg-head__id {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 2px solid var(--crimson);
  color: var(--crimson-text);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  transform: rotate(-2deg);
}

/* --- E. Category index -------------------------------------------------- */

.wg-index { display: grid; gap: 7px; }

.wg-index__row {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 15px 18px;
  border: 2px solid var(--ink-line);
  background: var(--ink-panel);
  color: var(--bone);
  text-decoration: none;
  transform: rotate(-0.35deg);
  transition: transform var(--snap-fast) var(--snap), border-color var(--snap-fast) linear,
              background-color var(--snap-fast) linear;
}
.wg-index__row:nth-child(2n) { transform: rotate(0.4deg); }
.wg-index__row:nth-child(3n) { transform: rotate(-0.6deg); }
.wg-index__row:hover {
  transform: rotate(0deg) translateX(4px);
  border-color: var(--crimson);
  background: var(--ink-raise);
  text-decoration: none;
}
.wg-index__id {
  /* crimson as small text needs the lighter tone on dark ground */
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--crimson-text);
  font-variant-numeric: tabular-nums;
}
.wg-index__name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.wg-index__desc {
  display: block;
  margin-top: 2px;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--smoke);
}
.wg-index__n {
  padding: 3px 9px;
  border: 2px solid var(--ink-line);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--bone);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.wg-index__row:hover .wg-index__n { border-color: var(--crimson-text); color: var(--crimson-text); }

/* --- F. Prose (content block: upright, solid, no collage) --------------- */

.wg-prose {
  max-width: 68ch;
  color: var(--smoke);
  font-size: 0.9375rem;
  line-height: 1.72;
}
.wg-prose h2, .wg-prose h3 {
  margin: 1.5em 0 0.5em;
  color: var(--bone);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.wg-prose h2:first-child, .wg-prose h3:first-child { margin-top: 0; }
.wg-prose ul, .wg-prose ol { margin: 0 0 1em; padding-left: 1.2em; }
.wg-prose li { margin-bottom: 0.45em; }
.wg-prose li::marker { color: var(--crimson); font-weight: 700; }
.wg-prose strong { color: var(--bone); font-weight: 600; }
.wg-prose code {
  padding: 0.12em 0.4em;
  border: 1px solid var(--ink-line);
  background: var(--ink-raise);
  font-family: var(--font-mono);
  font-size: 0.875em;
  color: var(--acid);
}
.wg-prose pre {
  padding: 14px 16px;
  border: 2px solid var(--ink-line);
  background: var(--ink-void);
  overflow-x: auto;
}
.wg-prose pre code { padding: 0; border: 0; background: none; color: var(--bone); }
.wg-prose blockquote {
  margin: 1.4em 0;
  padding: 3px 0 3px 16px;
  border-left: 4px solid var(--crimson);
  color: var(--bone);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}
.wg-prose hr { margin: 2em 0; }
.wg-prose a { text-decoration: underline; }

/* --- F1. Briefing card -------------------------------------------------- */

/* The card was capped by .wg-prose at 68ch (612px) while the rules card beside
   it spanned the full 1068px column, so the two sections read as unrelated.
   The card is now full width and the measure is capped on the text inside it,
   which keeps prose readable at any viewport without shrinking the card. */
.wg-briefing {
  background: var(--ink-panel);
  border: 2px solid var(--ink-line);
  padding: clamp(20px, 3vw, 32px);
  max-width: none;
}
.wg-briefing > h2,
.wg-briefing > h3,
.wg-briefing > p,
.wg-briefing > ul,
.wg-briefing > ol,
.wg-briefing > blockquote,
.wg-briefing > pre,
.wg-briefing > * > li { max-width: 72ch; }

/* --- F2. Rules list ----------------------------------------------------- */

.wg-rules {
  background: var(--ink-panel);
  border: 2px solid var(--ink-line);
  padding: clamp(20px, 3vw, 32px);
}
.wg-rules__list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: rule;
  display: grid;
  gap: 0;
}
.wg-rules__list li {
  position: relative;
  display: grid;
  gap: 3px;
  padding: 16px 0 16px 52px;
  border-bottom: 1px solid var(--ink-line);
  counter-increment: rule;
}
.wg-rules__list li:first-child { padding-top: 4px; }
.wg-rules__list li:last-child { border-bottom: 0; padding-bottom: 2px; }
/* the number is a small cut stamp, not a decorative bullet */
.wg-rules__list li::before {
  content: counter(rule, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 15px;
  min-width: 34px;
  padding: 2px 5px;
  background: var(--paper-fixed);
  color: var(--static-ink);
  border: 2px solid #0B0B0D;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  text-align: center;
  transform: rotate(-2deg);
}
.wg-rules__list li:nth-child(2n)::before { transform: rotate(1.6deg); background: var(--paper-fixed-2); }
.wg-rules__list li:nth-child(3n)::before { background: var(--crimson); border-color: var(--crimson); color: #fff; }
.wg-rules__list li:first-child::before { top: 3px; }
.wg-rules__list strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--bone);
}
.wg-rules__list span {
  display: block;
  color: var(--smoke);
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 66ch;
}
.wg-rules__list code {
  padding: 0.1em 0.35em;
  border: 1px solid var(--ink-line);
  background: var(--ink-raise);
  font-family: var(--font-mono);
  font-size: 0.8125em;
  color: var(--acid);
}

@media (max-width: 560px) {
  .wg-rules__list li { padding-left: 44px; }
  .wg-rules__list li::before { min-width: 28px; font-size: 0.625rem; }
}

/* --- G. Standings preview ---------------------------------------------- */

.wg-board { display: grid; gap: 6px; }
.wg-board__row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(10px, 2vw, 16px);
  padding: 11px 16px;
  background: var(--ink-panel);
  border: 2px solid var(--ink-line);
  border-left-width: 6px;
  transition: transform var(--snap-fast) var(--snap), border-color var(--snap-fast) linear,
              background-color var(--snap-fast) linear;
}
.wg-board__row:nth-child(1) { border-left-color: var(--crimson); background: var(--ink-raise); }
.wg-board__row:nth-child(2) { border-left-color: var(--bone); }
.wg-board__row:nth-child(3) { border-left-color: var(--acid); }
/* Rank chips match the scoreboard medals: crimson / paper / acid. */
.wg-board__r {
  display: inline-grid;
  place-items: center;
  width: 32px; height: 32px;
  justify-self: center;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--smoke);
  border: 2px solid var(--ink-line);
  transition: transform var(--snap-fast) var(--snap), background-color var(--snap-fast) linear,
              border-color var(--snap-fast) linear, color var(--snap-fast) linear;
}
.wg-board__row:nth-child(1) .wg-board__r,
.wg-board__row:nth-child(2) .wg-board__r,
.wg-board__row:nth-child(3) .wg-board__r { border-color: #0B0B0D; box-shadow: 3px 3px 0 0 var(--shadow); }
.wg-board__row:nth-child(1) .wg-board__r { background: var(--crimson); color: #fff; transform: rotate(-3deg); }
.wg-board__row:nth-child(2) .wg-board__r { background: var(--paper-fixed); color: var(--static-ink); transform: rotate(2deg); }
.wg-board__row:nth-child(3) .wg-board__r { background: var(--acid-fill); color: var(--static-ink); transform: rotate(-1.5deg); }
.wg-board__row:nth-child(1) { padding-block: 13px; }
.wg-board__row:nth-child(1) .wg-board__s { color: var(--crimson-text); font-size: 1rem; }
.wg-board__row:hover { transform: translateX(3px); border-color: var(--crimson); }
.wg-board__row:hover .wg-board__r { transform: rotate(0deg) scale(1.06); }
/* Entrance stagger, CSS-only and fast. */
@keyframes wg-board-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
.wg-board__row:nth-child(1), .wg-board__row:nth-child(2), .wg-board__row:nth-child(3) {
  animation: wg-board-in 260ms var(--snap) backwards;
}
.wg-board__row:nth-child(2) { animation-delay: 60ms; }
.wg-board__row:nth-child(3) { animation-delay: 120ms; }
.wg-board__t { min-width: 0; }
.wg-board__name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--bone);
  text-decoration: none;
}
.wg-board__name:hover { color: var(--crimson-text); text-decoration: none; }
.wg-board__s {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--paper);
}

/* --- H. Page header (inner pages) -------------------------------------- */

.wg-page { padding-block: 26px 70px; }
.wg-page__head {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.wg-page__head::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--crimson);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
.wg-page__head h1 { margin: 0 0 6px; }
.wg-page__head p { margin: 0; color: var(--smoke); font-size: 0.875rem; max-width: 58ch; }
.wg-page__head p code { color: var(--acid); font-family: var(--font-mono); font-size: 0.8125rem; }
.wg-page__meta { display: flex; align-items: center; gap: 12px; }

/* --- I. Filter bar ------------------------------------------------------ */

.wg-filters {
  display: grid;
  grid-template-columns: minmax(0, 250px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  margin-bottom: 30px;
  border: 2px solid var(--ink-line);
  background: var(--ink-panel);
}

/* No icon in this field: the placeholder carries the meaning, and a magnifier
   next to the word "Search" was repeating it. Padding is therefore symmetric
   again. It still has to be !important because CTFd's main.css forces
   `input, select { padding: .6rem !important }` on every field. */
.wg-search { position: relative; }
.wg-search input {
  width: 100%;
  min-height: 44px;
  padding: 9px 14px !important;
  border: 2px solid var(--field-border);
  background: var(--field-bg);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 0.8125rem;
}
.wg-search input::placeholder { color: var(--smoke); }
.wg-search input:focus { outline: none; border-color: var(--crimson); box-shadow: 3px 3px 0 0 var(--crimson); }

/* chips: cut tags, never pills */
.wg-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}
.wg-chip {
  flex: none;
  min-height: 32px;
  padding: 5px 11px;
  border: 2px solid var(--ink-line);
  background: transparent;
  color: var(--smoke);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color var(--snap-fast) linear, background-color var(--snap-fast) linear,
              border-color var(--snap-fast) linear, transform var(--snap-fast) var(--snap);
}
.wg-chip:hover { color: var(--bone); border-color: var(--ash); transform: translateY(-1px); }
.wg-chip.is-on {
  background: var(--crimson);
  border-color: #0B0B0D;
  color: #fff;
  transform: rotate(-1.4deg);
}
.wg-filters__count {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--smoke);
  white-space: nowrap;
}
@media (max-width: 1279px) {
  .wg-filters { grid-template-columns: minmax(0, 210px) minmax(0, 1fr); }
  .wg-filters__count { grid-column: 1 / -1; }
}

/* --- J. Category groups and cards -------------------------------------- */

.wg-cat { margin-bottom: 36px; }
.wg-cat__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.wg-cat__head h2 {
  margin: 0;
  padding: 4px 12px;
  background: var(--paper-fixed);
  color: var(--static-ink);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: rotate(-1.1deg);
}
.wg-cat__n {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--crimson-text);
}
.wg-cat__line { flex: 1; height: 2px; background: var(--ink-line); }

.wg-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Card: cut tile with its own tilt. Hover straightens it, which reads as
   picking the card up. */
.wg-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 320px;
  min-height: 84px;
  padding: 11px 13px 10px;
  border: 2px solid var(--ink-line);
  background: var(--ink-panel);
  color: var(--bone);
  text-align: left;
  text-decoration: none;
  transform: rotate(-0.7deg);
  transition: transform var(--snap-mid) var(--snap), border-color var(--snap-fast) linear,
              background-color var(--snap-fast) linear, box-shadow var(--snap-fast) linear;
}
.wg-card:nth-child(2n) { transform: rotate(0.8deg); }
.wg-card:nth-child(3n) { transform: rotate(-1.1deg); }
.wg-card:nth-child(5n) { transform: rotate(0.5deg); }
.wg-card:hover {
  transform: rotate(0deg) translateY(-3px);
  border-color: var(--crimson);
  background: var(--ink-raise);
  box-shadow: 5px 5px 0 0 rgb(228 0 43 / 0.35);
  text-decoration: none;
}

.wg-card__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.wg-card__name {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--bone);
}
.wg-card__val {
  flex: none;
  padding: 2px 7px;
  border: 2px solid var(--ink-line);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}
.wg-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 9px;
  border-top: 1px solid var(--ink-line);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--smoke);
}

/* solved: a stamped state, colour plus the word */
.wg-card.is-solved { border-color: var(--ok); background: var(--ok-wash); }
.wg-card.is-solved .wg-card__name { color: var(--bone); }
.wg-card.is-solved .wg-card__foot { color: var(--ok); }
.wg-card__solved { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ok); }
/* category tag on the card footer: quieter than the solve count */
.wg-card__cat { color: var(--ash); letter-spacing: 0.1em; }
.wg-card.is-locked { background: var(--ink-void); border-style: dashed; }

/* --- K. Challenge modal ------------------------------------------------ */

#challenge-window .modal-dialog {
  display: flex;
  flex-direction: column;
  max-width: 900px;
  min-height: calc(100% - 48px);
  margin: 24px auto;
}
#challenge-window .modal-content {
  width: 100%;
  margin-block: auto;
  border: 3px solid #0B0B0D;
  box-shadow: 10px 10px 0 0 var(--crimson);
}
#challenge-window .modal-body { padding: 0; }

.wg-chal { display: grid; grid-template-columns: minmax(0, 1fr) 274px; }

.wg-chal__main { padding: 24px 26px; min-width: 0; }
.wg-chal__title { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 2px; }
.wg-chal__title h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0;
  text-transform: uppercase;
}
.wg-chal__cat {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--smoke);
}
.wg-chal__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin: 10px 0 0;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--smoke);
}
.wg-chal__meta span { display: inline-flex; align-items: center; gap: 5px; }
.wg-chal__desc { margin: 18px 0 0; color: var(--smoke); font-size: 0.9375rem; line-height: 1.72; max-width: 62ch; }
.wg-chal__desc img { border: 2px solid var(--ink-line); margin: 12px 0; }
.wg-chal__desc code {
  padding: 0.12em 0.38em;
  border: 1px solid var(--ink-line);
  background: var(--ink-raise);
  font-family: var(--font-mono);
  font-size: 0.875em;
  color: var(--acid);
}
.wg-chal__desc pre { padding: 13px 15px; border: 2px solid var(--ink-line); background: var(--ink-void); overflow-x: auto; }

.wg-chal__rail {
  padding: 22px 18px;
  border-left: 3px solid #0B0B0D;
  background: var(--ink-raise);
}
.wg-rail__label {
  margin: 0 0 9px;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ash);
}
.wg-rail__stats { display: grid; gap: 11px; padding-bottom: 16px; margin: 0 0 16px; border-bottom: 2px solid var(--ink-line); }
.wg-rail__stat { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.wg-rail__stat dt { font-size: 0.75rem; color: var(--smoke); margin: 0; }
.wg-rail__stat dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--bone);
}

/* Flag bar — bottom dock, calm content, loud frame */
.wg-flag-bar {
  border-top: 3px solid #0B0B0D;
  background: var(--ink-panel);
  padding: 18px var(--gut);
  position: relative;
  overflow: hidden;
}
.wg-flag-bar.is-solved {
  background: linear-gradient(135deg, var(--ok-wash) 0%, var(--ink-panel) 55%);
  animation: wg-flag-solved 560ms ease-out;
}
.wg-flag-bar__inner {
  max-width: 560px;
  margin: 0 auto;
}
.wg-flag {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.wg-flag input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  border: 2px solid var(--field-border);
  background: var(--field-bg);
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
}
.wg-flag input[type="text"]::placeholder { color: var(--smoke); letter-spacing: 0; }
.wg-flag input[type="text"]:focus { outline: none; border-color: var(--crimson); box-shadow: 3px 3px 0 0 var(--crimson); }
.wg-flag .btn {
  flex: 0 0 128px;
  min-width: 128px;
  white-space: nowrap;
}
.wg-flag__result {
  margin-top: 12px;
  padding: 10px 12px;
  border: 2px solid currentColor;
  border-left-width: 6px;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.45;
  text-transform: uppercase;
}
.wg-flag__result.is-ok { color: var(--ok); background: var(--ok-wash); animation: wg-flag-pop 420ms ease-out; }
.wg-flag__result.is-bad { color: var(--bad); background: var(--bad-wash); animation: wg-shake 420ms ease; }
.wg-flag-bar.is-bad { animation: wg-shake 420ms ease; }

.wg-solve-celebration {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.wg-solve-celebration i {
  position: absolute;
  top: -10px;
  width: 8px;
  height: 14px;
  background: var(--crimson);
  opacity: 0.95;
  animation: wg-confetti 950ms ease-out forwards;
}
.wg-solve-celebration i:nth-child(1) { left: 6%;  background: #E63946; animation-delay: 0ms; transform: rotate(12deg); }
.wg-solve-celebration i:nth-child(2) { left: 14%; background: #F2EDE3; animation-delay: 45ms; transform: rotate(-18deg); }
.wg-solve-celebration i:nth-child(3) { left: 22%; background: #FFB703; animation-delay: 90ms; transform: rotate(8deg); }
.wg-solve-celebration i:nth-child(4) { left: 31%; background: #06D6A0; animation-delay: 30ms; transform: rotate(-8deg); }
.wg-solve-celebration i:nth-child(5) { left: 39%; background: #118AB2; animation-delay: 75ms; transform: rotate(22deg); }
.wg-solve-celebration i:nth-child(6) { left: 47%; background: #E63946; animation-delay: 15ms; transform: rotate(-14deg); }
.wg-solve-celebration i:nth-child(7) { left: 55%; background: #F2EDE3; animation-delay: 60ms; transform: rotate(18deg); }
.wg-solve-celebration i:nth-child(8) { left: 63%; background: #FFB703; animation-delay: 105ms; transform: rotate(-22deg); }
.wg-solve-celebration i:nth-child(9) { left: 71%; background: #06D6A0; animation-delay: 20ms; transform: rotate(10deg); }
.wg-solve-celebration i:nth-child(10){ left: 78%; background: #118AB2; animation-delay: 80ms; transform: rotate(-10deg); }
.wg-solve-celebration i:nth-child(11){ left: 86%; background: #E63946; animation-delay: 40ms; transform: rotate(16deg); }
.wg-solve-celebration i:nth-child(12){ left: 93%; background: #F2EDE3; animation-delay: 100ms; transform: rotate(-16deg); }

@keyframes wg-flag-solved {
  0% { transform: translateY(6px); opacity: 0.85; }
  100% { transform: translateY(0); opacity: 1; }
}
@keyframes wg-flag-pop {
  0% { transform: scale(0.97); }
  60% { transform: scale(1.02); }
  100% { transform: scale(1); }
}
@keyframes wg-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}
@keyframes wg-confetti {
  0% { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(72px) rotate(360deg); opacity: 0; }
}
@media (max-width: 520px) {
  .wg-flag { flex-direction: column; }
  .wg-flag .btn { width: 100%; flex-basis: auto; }
}

.wg-hints { display: grid; gap: 8px; margin-top: 18px; }
.wg-hint {
  padding: 11px 12px;
  border: 2px solid var(--ink-line);
  background: var(--ink-panel);
  font-size: 0.8125rem;
  color: var(--smoke);
}
.wg-hint__cost { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--warn); }

.wg-tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0 8px;
  margin-bottom: -3px;      /* tuck under .modal-content's top border */
  position: relative;
  z-index: 2;
  background: transparent;
}
/* the tabs are individual cut tags, not a continuous bar */
.wg-tabs .btn-close {
  margin-left: auto;
  align-self: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 2px solid #0B0B0D;
  border-radius: 0;
  background: #F2EDE3 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='M1 1l10 10M11 1L1 11' stroke='%230B0B0D' stroke-width='2.2' stroke-linecap='square'/%3E%3C/svg%3E") center / 12px no-repeat;
  background-size: 12px;
  opacity: 1;
  box-shadow: 3px 3px 0 0 #0B0B0D;
}
.wg-tabs .btn-close:hover {
  background-color: var(--crimson);
  border-color: #0B0B0D;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='M1 1l10 10M11 1L1 11' stroke='%23FFFFFF' stroke-width='2.2' stroke-linecap='square'/%3E%3C/svg%3E");
  opacity: 1;
}
html[data-bs-theme="light"] .wg-tabs .btn-close {
  background: #F2EDE3 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='M1 1l10 10M11 1L1 11' stroke='%230B0B0D' stroke-width='2.2'/%3E%3C/svg%3E") center / 12px no-repeat;
  border-color: #0B0B0D;
  box-shadow: 3px 3px 0 0 #0B0B0D;
}
.wg-tab {
  position: relative;
  padding: 11px 16px 13px;
  border: 2px solid #0B0B0D;
  border-bottom: 0;
  background: #F2EDE3;
  color: var(--static-ink);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: rotate(-0.8deg);
  transform-origin: bottom left;
}
.wg-tab:nth-child(2n) { background: #E4DCCB; transform: rotate(0.7deg); }
.wg-tab:hover { background: #FAF6EB; }
.wg-tab.active, .wg-tab[aria-selected="true"] { background: var(--crimson); color: #fff; border-color: #0B0B0D; }
.wg-tab.active:hover, .wg-tab[aria-selected="true"]:hover { background: var(--crimson); color: #fff; }

/* --- L. Scoreboard ----------------------------------------------------- */

.wg-chart {
  padding: 16px;
  border: 2px solid var(--ink-line);
  background: var(--ink-panel);
  margin-bottom: 24px;
}
.wg-chart canvas { display: block; }

.table.wg-sb tr > th,
.table.wg-sb tr > td { white-space: nowrap; text-align: left; }
/* Beat main.css's `.table > thead > tr > :first-child { padding-left: 1rem }`
   so the Place heading lines up with the 01 rank cells directly below it. */
.table.wg-sb > thead > tr > :first-child { padding-left: 15px; }
.table.wg-sb tr > th:first-child,
.table.wg-sb tr > td:first-child { width: 60px; }
/* Beat main.css's `.table tr > :not(:first-child) { text-align: center }` so
   Team stays left-aligned alongside Place while Score remains on the right. */
.table.wg-sb tr > th:nth-child(2),
.table.wg-sb tr > td:nth-child(2) { width: 99%; white-space: normal; text-align: left; }
.table.wg-sb tr > th:last-child,
.table.wg-sb tr > td:last-child { text-align: right; }
.wg-sb__team {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--bone);
  text-decoration: none;
}
.wg-sb__team:hover { color: var(--crimson-text); text-decoration: none; }
.wg-sb__team .av {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  background: var(--ink-raise);
  border: 1px solid var(--ink-line);
  color: var(--smoke);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  flex: none;
}
.wg-sb__score { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 700; }
/* Top-3 avatars match their medals. */
tr.wg-rank-1 .wg-sb__team .av { background: var(--crimson); border-color: #0B0B0D; color: #fff; }
tr.wg-rank-2 .wg-sb__team .av { background: var(--paper-fixed); border-color: #0B0B0D; color: var(--static-ink); }
tr.wg-rank-3 .wg-sb__team .av { background: var(--acid-fill); border-color: #0B0B0D; color: var(--static-ink); }

/* --- L2. Podium: top 3 cards above the table ---------------------------
   DOM order stays 1-2-3 for screen readers; visual order on desktop is
   2-1-3 so the leader sits centre and tallest. Mobile stacks 1-2-3. */
.wg-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 1.6vw, 14px);
  margin-bottom: 22px;
  align-items: end;
}
.wg-podium__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: clamp(14px, 2vw, 20px) 12px clamp(12px, 1.6vw, 16px);
  border: 2px solid var(--ink-line);
  background: var(--ink-panel);
  text-align: center;
  text-decoration: none;
  transition: transform var(--snap-fast) var(--snap), border-color var(--snap-fast) linear,
              background-color var(--snap-fast) linear;
}
.wg-podium__card:hover { transform: translateY(-3px); border-color: var(--crimson); text-decoration: none; }
.wg-podium__card--1 { order: 2; padding-block: clamp(18px, 2.6vw, 26px) clamp(14px, 2vw, 18px); border-color: #0B0B0D; background: var(--ink-raise); box-shadow: 6px 6px 0 0 var(--crimson); transform: rotate(-0.6deg); }
.wg-podium__card--2 { order: 1; transform: rotate(0.5deg); }
.wg-podium__card--3 { order: 3; transform: rotate(-0.4deg); }
.wg-podium__card--1:hover { transform: rotate(0deg) translateY(-3px); }
.wg-podium__rank {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1;
  border: 2px solid #0B0B0D;
  box-shadow: 3px 3px 0 0 var(--shadow);
}
.wg-podium__card--1 .wg-podium__rank { background: var(--crimson); color: #fff; transform: rotate(-3deg); }
.wg-podium__card--2 .wg-podium__rank { background: var(--paper-fixed); color: var(--static-ink); transform: rotate(2deg); }
.wg-podium__card--3 .wg-podium__rank { background: var(--acid-fill); color: var(--static-ink); transform: rotate(-1.5deg); }
.wg-podium__av {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  border: 2px solid var(--ink-line);
  background: var(--ink-raise);
  color: var(--smoke);
}
.wg-podium__card--1 .wg-podium__av { width: 52px; height: 52px; font-size: 1.25rem; background: var(--crimson); border-color: #0B0B0D; color: #fff; }
.wg-podium__card--2 .wg-podium__av { background: var(--paper-fixed); border-color: #0B0B0D; color: var(--static-ink); }
.wg-podium__card--3 .wg-podium__av { background: var(--acid-fill); border-color: #0B0B0D; color: var(--static-ink); }
.wg-podium__name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: clamp(0.875rem, 0.8rem + 0.4vw, 1rem);
  font-weight: 700;
  color: var(--bone);
}
.wg-podium__card:hover .wg-podium__name { color: var(--crimson-text); }
.wg-podium__score {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 0.9rem + 0.6vw, 1.375rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--bone);
}
.wg-podium__card--1 .wg-podium__score { color: var(--crimson-text); }
.wg-podium__label {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--smoke);
}
@keyframes wg-podium-in {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.wg-podium__card { animation: wg-podium-in 300ms var(--snap) backwards; }
.wg-podium__card--2 { animation-delay: 60ms; }
.wg-podium__card--1 { animation-delay: 0ms; }
.wg-podium__card--3 { animation-delay: 120ms; }
@media (max-width: 640px) {
  .wg-podium { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  .wg-podium__card--1, .wg-podium__card--2, .wg-podium__card--3 { order: 0; transform: none; }
  .wg-podium__card--1 { order: -1; }
}

/* --- M. Auth ---------------------------------------------------------- */


.wg-auth__aside {
  /* Layout and surface are built through Tailwind in tailwind/input.css. */
}
.wg-auth__aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(currentColor 1.2px, transparent 1.3px);
  background-size: 8px 8px;
  color: var(--crimson);
  opacity: 0.09;
  pointer-events: none;
}
.wg-auth__aside > * { position: relative; }
.wg-auth__aside img { width: 56px; height: 56px; }
.wg-auth__quote {
  max-width: 30ch;
  margin: 24px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1rem + 1.3vw, 1.875rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--bone);
}
.wg-auth__quote em { font-style: normal; color: var(--crimson); }
.wg-auth__facts {
  display: grid;
  gap: 11px;
  margin: 28px 0 0;
  padding: 20px 0 0;
  border-top: 2px solid var(--ink-line);
  list-style: none;
  max-width: 34ch;
}
.wg-auth__facts li { font-size: 0.8125rem; color: var(--smoke); line-height: 1.5; }
.wg-auth__facts b {
  display: inline-block;
  min-width: 5.4em;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--crimson-text);
}
.wg-auth__facts code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--bone);
  background: var(--ink-void);
  border: 1px solid var(--ink-line);
  padding: 1px 5px;
}
/* Three cut-bursts at descending size, rotated off-axis. Reads as burst
   energy, not as a decorative sparkle: no star glyph, no glow. */
.wg-auth__burst {
  position: relative;
  height: 190px;
  margin-top: 34px;
}
.wg-auth__burst .wg-burst {
  position: absolute;
  color: var(--crimson);
  opacity: 0.9;
}
.wg-auth__burst .wg-burst:nth-child(1) {
  width: 92px; height: 92px; left: 2%; top: 16%; transform: rotate(-8deg);
}
.wg-auth__burst .wg-burst:nth-child(2) {
  width: 46px; height: 46px; left: 46%; top: 54%; transform: rotate(12deg);
  color: var(--paper-fixed); opacity: 0.5;
}
.wg-auth__burst .wg-burst:nth-child(3) {
  width: 26px; height: 26px; left: 74%; top: 8%; transform: rotate(-22deg);
  color: var(--paper-fixed); opacity: 0.28;
}
/* Paper bursts vanish on the cream aside in light mode; ink them instead. */
html[data-bs-theme="light"] .wg-auth__burst .wg-burst:nth-child(2) { color: var(--crimson); opacity: 0.38; }
html[data-bs-theme="light"] .wg-auth__burst .wg-burst:nth-child(3) { color: var(--crimson); opacity: 0.22; }

.wg-auth__foot {
  margin-top: auto;
  padding-top: 32px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ash);
}

.wg-auth__form h1 { margin: 0 0 6px; font-size: 1.875rem; text-transform: uppercase; }
.wg-auth__form h1 + .alert { margin-top: 14px; }
.wg-auth__form > p { margin: 0 0 26px; color: var(--smoke); font-size: 0.875rem; }
.wg-auth__form .mb-3 { margin-bottom: 16px !important; }
.wg-auth__form .btn { width: 100%; }
.wg-auth__alt {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 2px solid var(--ink-line);
  font-size: 0.8125rem;
  color: var(--smoke);
}

/* --- N. Profile / team pages (inherited core) ------------------------- */

body[data-endpoint="users.private"] .jumbotron,
body[data-endpoint="teams.private"] .jumbotron,
body[data-endpoint="users.public"] .jumbotron,
body[data-endpoint="teams.public"] .jumbotron {
  display: block;
  padding-block: 34px 22px;
  text-align: left;
  border-bottom: 3px solid var(--crimson);
}
body[data-endpoint="users.private"] .jumbotron .container,
body[data-endpoint="teams.private"] .jumbotron .container,
body[data-endpoint="users.public"] .jumbotron .container,
body[data-endpoint="teams.public"] .jumbotron .container { max-width: var(--col); }

body[data-endpoint="users.private"] .jumbotron > .container > h1,
body[data-endpoint="teams.private"] .jumbotron > .container > h1,
body[data-endpoint="users.public"] .jumbotron > .container > h1,
body[data-endpoint="teams.public"] .jumbotron > .container > h1 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem);
  text-transform: uppercase;
}

body[data-endpoint="users.private"] .jumbotron h2:has(.badge),
body[data-endpoint="users.public"] .jumbotron h2:has(.badge) { margin: 0 0 14px; font-size: 0; line-height: 1; }
body[data-endpoint="users.private"] .jumbotron h2:has(.badge) .badge,
body[data-endpoint="users.public"] .jumbotron h2:has(.badge) .badge {
  font-size: 0.6875rem;
  padding: 4px 9px;
}

body[data-endpoint="users.private"] .jumbotron > .container > div:has(> h2.text-center),
body[data-endpoint="users.public"] .jumbotron > .container > div:has(> h2.text-center),
body[data-endpoint="teams.private"] .jumbotron > .container > div:has(> h2.text-center),
body[data-endpoint="teams.public"] .jumbotron > .container > div:has(> h2.text-center) {
  display: flex;
  align-items: baseline;
  gap: 28px;
  padding-block: 14px;
  border-top: 2px solid var(--ink-line);
  border-bottom: 2px solid var(--ink-line);
}
body[data-endpoint="users.private"] .jumbotron h2.text-center,
body[data-endpoint="users.public"] .jumbotron h2.text-center,
body[data-endpoint="teams.private"] .jumbotron h2.text-center,
body[data-endpoint="teams.public"] .jumbotron h2.text-center {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  text-align: left !important;
  font-variant-numeric: tabular-nums;
  color: var(--bone);
}
body[data-endpoint="users.private"] .jumbotron h2.text-center small,
body[data-endpoint="users.public"] .jumbotron h2.text-center small,
body[data-endpoint="teams.private"] .jumbotron h2.text-center small,
body[data-endpoint="teams.public"] .jumbotron h2.text-center small {
  margin-left: 7px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--smoke);
}
body[data-endpoint="users.private"] .jumbotron .badge.rounded-pill,
body[data-endpoint="users.public"] .jumbotron .badge.rounded-pill,
body[data-endpoint="teams.private"] .jumbotron .badge.rounded-pill,
body[data-endpoint="teams.public"] .jumbotron .badge.rounded-pill {
  border-radius: 0 !important;
  padding: 3px 8px;
}
body[data-endpoint="users.private"] .jumbotron > .container > div:has(> h3.d-block) { display: grid; gap: 4px; padding-top: 12px; }
body[data-endpoint="users.private"] .jumbotron h3.d-block,
body[data-endpoint="users.public"] .jumbotron h3.d-block {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--smoke);
}

body[data-endpoint="users.private"] h3,
body[data-endpoint="teams.private"] h3,
body[data-endpoint="users.public"] h3,
body[data-endpoint="teams.public"] h3 {
  margin: 26px 0 12px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--smoke);
}

body[data-endpoint="users.private"] .row.min-vh-25,
body[data-endpoint="users.public"] .row.min-vh-25,
body[data-endpoint="teams.private"] .row.min-vh-25,
body[data-endpoint="teams.public"] .row.min-vh-25 {
  min-height: 0 !important;
  margin: 0 0 48px;
  padding: 38px 20px;
  border: 2px dashed var(--ink-line);
  background: var(--ink-panel);
}
body[data-endpoint="users.private"] .row.min-vh-25 > h3,
body[data-endpoint="users.public"] .row.min-vh-25 > h3,
body[data-endpoint="teams.private"] .row.min-vh-25 > h3,
body[data-endpoint="teams.public"] .row.min-vh-25 > h3 {
  margin: 0 auto;
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  text-align: center;
  color: var(--smoke);
  opacity: 1 !important;
}
body[data-endpoint="users.private"] .award-icon,
body[data-endpoint="users.public"] .award-icon { color: var(--crimson); }

/* --- O. Notifications ------------------------------------------------- */

.wg-notif { display: grid; gap: 9px; }
.wg-notif__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  border: 2px solid var(--ink-line);
  border-left: 6px solid var(--crimson);
  background: var(--ink-panel);
}
.wg-notif__icon {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: var(--crimson);
  color: #fff;
  font-size: 0.75rem;
}
.wg-notif__body h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.wg-notif__body p { margin: 2px 0 0; color: var(--smoke); font-size: 0.8125rem; }
.wg-notif__time { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--ash); white-space: nowrap; }

/* --- P. Error pages --------------------------------------------------- */

.wg-err {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  min-height: calc(100dvh - var(--nav-h));
  padding: 48px var(--gut);
  text-align: center;
  position: relative;
}
body:has(.wg-err) .wg-footer { display: none; }
.wg-err__code {
  display: inline-block;
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(4rem, 2.4rem + 9vw, 8rem);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--bone);
  transform: rotate(-3deg);
  text-shadow: 6px 6px 0 var(--crimson);
}
/* the middle digit is a paper scrap: it keeps its colour in both themes */
.wg-err__code span {
  display: inline-block;
  padding: 0 0.06em 0.04em;
  background: var(--paper-fixed);
  color: var(--static-ink);
  text-shadow: none;
  transform: rotate(2.5deg);
}
.wg-err h1 { margin: 24px 0 8px; font-size: 1.5rem; text-transform: uppercase; }
.wg-err > div > p:not(.wg-err__code) {
  max-width: 42ch; margin: 0 auto 28px; color: var(--smoke); font-size: 0.9375rem;
}
.wg-err__actions { display: flex; gap: 11px; justify-content: center; flex-wrap: wrap; }

/* --- Q. Responsive contract ------------------------------------------ */

@media (max-width: 991px) {
  :root { --nav-h: 60px; }

  .wg-nav__links { display: none; }
  .wg-burger { display: inline-flex; }
  /* Shrink both cuts on small screens and keep them mirrored. An earlier
     version dropped the left cut entirely and shrank the right to 14px, so the
     bar read as a rectangle with one chamfer. */
  .wg-nav__slab::before { clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 100%, 16px 100%); }

  /* Tablets keep the two-column hero. A 768px screen has the width for it, and
     stacking there left the crest stranded in an empty band. The columns go
     even rather than 7/5 because the shorter measure reads better at this
     size. */
  .wg-hero__in { grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); gap: 26px; }
  .wg-plate { max-width: 300px; margin-inline: auto; padding: 18px; }
  .wg-plate img { width: clamp(130px, 17vw, 170px); }

  .wg-filters { grid-template-columns: minmax(0, 1fr); }
  .wg-filters__count { justify-self: start; }

  .wg-chal { grid-template-columns: minmax(0, 1fr); }
  .wg-chal__rail { border-left: 0; border-top: 3px solid #0B0B0D; }
  .wg-chal__main { padding: 20px 18px; }
  #challenge-window .modal-dialog {
    margin: 16px 12px;
    min-height: calc(100% - 32px);
    max-width: none;
  }


  .wg-footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .wg-footer__grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
  :root { --gut: 18px; }

  /* phones stack */
  .wg-hero__in { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .wg-plate { max-width: 320px; padding: 22px; }

  .wg-hero { padding-block: 30px 34px; }
  /* 9 scraps plus gaps must fit the content width; at 390px that lands near
     1.45rem. Fixing a minimum here would push the F of "CTF" onto its own
     line, so the floor is deliberately low. */
  .wg-hero h1 { font-size: clamp(1.05rem, 0.55rem + 2.1vw, 1.6rem); }
  .wg-cut__ch { border-width: 2px; }
  .wg-cut { gap: 0.08em 0.05em; }
  .wg-cut__ch { padding: 0.05em 0.08em 0.09em; box-shadow: 2px 2px 0 0 var(--shadow-soft); }

  .wg-hero__actions { width: 100%; }
  .wg-hero__actions .btn { flex: 1 1 auto; }

  .wg-cd__cell { min-width: 54px; padding: 7px 9px; }

  .wg-page { padding-block: 24px 50px; }
  .wg-page__head { align-items: flex-start; }

  .wg-index__row { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; padding: 13px 14px; }
  .wg-index__desc { display: none; }

  .wg-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .wg-chal__title { flex-direction: column; gap: 6px; }
  .wg-tabs { padding-inline: 14px; overflow-x: auto; }

  /* Podium chips shrink proportionally; rows keep their rhythm. */
  .wg-rank { width: 30px; height: 30px; font-size: 0.75rem; }
  tr.wg-rank-1 td, tr.wg-rank-2 td, tr.wg-rank-3 td { padding-block: 12px; }
  tr.wg-rank-1 .wg-sb__score { font-size: 0.9375rem; }
  .wg-board__row { grid-template-columns: 38px minmax(0, 1fr) auto; padding: 10px 12px; }
  .wg-board__r { width: 28px; height: 28px; font-size: 0.75rem; }
  .wg-sb__team .av { width: 22px; height: 22px; }

  .wg-sb__hide-sm { display: none; }

  .wg-footer { padding-block: 32px 24px; }
  .wg-footer__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .wg-footer__base { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (max-width: 560px) {
  /* On a phone the bar carries the wordmark, the theme switch and the drawer
     handle only. Log in and Daftar are the first two items inside the drawer,
     so they stay reachable a tap away instead of crowding the bar into an
     ellipsis. */
  .wg-nav__login, .wg-nav__register { display: none; }
  /* .wg-hide-sm is applied in the template, so it has to mean something:
     Settings and Log out both live in the drawer on the same page. */
  .wg-hide-sm { display: none; }
  /* the account chip keeps its avatar and drops the name and score, which are
     both on the profile page one tap away */
  .wg-account__meta { display: none; }
  /* matches the 16px cut below 991px */
  .wg-brand { padding: 0 6px 0 12px; margin-right: 0; }
  .wg-brand__name { font-size: 0.875rem; letter-spacing: 0.1em; }
  .wg-nav__tools { gap: 0; }
  /* Do not shrink below 44px here. The earlier 36px override beat the touch
     target block in core.css and put the two controls a thumb reaches for
     most back under the minimum. Tighten the gap instead, which the layout
     can afford. */
  .wg-icon, .wg-theme-toggle { width: 44px; height: 44px; }
  .wg-account { padding: 4px; }
  .wg-plate { padding: 20px; box-shadow: 6px 6px 0 0 var(--crimson); }
  .wg-cards { grid-template-columns: minmax(0, 1fr); }
}

/* Narrowest phones in use (iPhone SE 1st gen, compact Androids). Four
   controls plus the crest cannot all be 44px wide with labels, so the text
   drops from Log in and keeps its icon, its aria-label and its 44px box. */
@media (max-width: 359px) {
  :root { --gut: 14px; --nav-h: 58px; }

  .wg-nav__link--login .wg-nav__link__label { display: none; }
  .wg-nav__link--login { padding: 0; width: 44px; justify-content: center; }
  .wg-nav__tools { gap: 0; }
  .wg-nav__tools .btn-sm {
    width: 44px;
    min-width: 44px;
    padding: 0;
    justify-content: center;
    transform: none;
  }
  .wg-nav__tools .btn-sm::before {
    content: "\f234";            /* fa-user-plus */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.8125rem;
  }
  .wg-btn-nav-label { display: none; }
  .wg-hero__sub { font-size: 0.875rem; }
  .wg-cd { gap: 4px; }
  .wg-cut { gap: 0.07em 0.04em; }
}

@media (max-width: 420px) {
  :root { --gut: 16px; }
  .wg-cd__cell { min-width: 48px; padding: 6px 7px; }
  .wg-cd__n { font-size: 1.0625rem; }
  .wg-cd__l { font-size: 0.4375rem; }
  .wg-figure__n { font-size: 1.375rem; }
  .wg-auth__form h1 { font-size: 1.5rem; }
  .wg-err__code { text-shadow: 4px 4px 0 var(--crimson); }
}


/* ==========================================================================
   Settings, Directory, Enrollment, Team & User Profiles
   ========================================================================== */

.wg-subhead {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--smoke);
}

.wg-input-group {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.wg-input-group > .form-control { flex: 1 1 auto; min-width: 0; }

/* --- Settings ----------------------------------------------------------- */

.wg-settings {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: clamp(18px, 2.4vw, 32px);
  align-items: start;
}
@media (max-width: 820px) {
  .wg-settings { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}

.wg-settings__rail .nav-pills {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}
.wg-settings__rail .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 11px 14px;
  border: 2px solid var(--ink-line);
  border-radius: 0;
  background: var(--ink-panel);
  color: var(--smoke);
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
}
.wg-settings__rail .nav-link:hover { color: var(--bone); border-color: var(--ash); }
.wg-settings__rail .nav-link.active {
  background: var(--crimson);
  border-color: #0B0B0D;
  color: #fff;
  box-shadow: 4px 4px 0 0 #0B0B0D;
}
.wg-settings__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* CTFd main.css ships `input, select { padding: .6rem !important }`; preserve
   select arrow gutter across settings/setup/directory pages. */
.wg-page .form-control,
.wg-page .form-select,
.wg-auth .form-control,
.wg-auth .form-select { padding: 10px 12px !important; }
.wg-page .form-select,
.wg-auth .form-select { padding-right: 38px !important; }
.wg-page .form-select:has(option:checked:empty) { color: var(--ash); }

/* --- Teams & Users Directory ------------------------------------------- */

.wg-dir-search {
  display: grid;
  grid-template-columns: minmax(130px, 180px) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
  padding: 12px 14px;
  margin-bottom: 22px;
  background: var(--ink-panel);
  border: 2px solid var(--ink-line);
}
@media (max-width: 680px) {
  .wg-dir-search { grid-template-columns: minmax(0, 1fr); }
}
.wg-dir-table tr > th,
.wg-dir-table tr > td { text-align: left !important; }
.wg-dir-table tr > th:nth-child(2),
.wg-dir-table tr > td:nth-child(2) { text-align: center !important; }
.wg-dir-link {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--bone);
}
.wg-dir-link:hover { color: var(--crimson-text); }
.wg-country { display: inline-flex; align-items: center; gap: 8px; }

.wg-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.wg-pagination__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.wg-pagination__label .form-select { width: auto; min-width: 72px; min-height: 40px; }

/* --- Team Enrollment ---------------------------------------------------- */

.wg-enroll {
  display: flex;
  justify-content: center;
  padding-block: clamp(16px, 4vw, 40px);
}
.wg-enroll__card {
  width: 100%;
  max-width: 560px;
  text-align: center;
}
.wg-enroll__card h2 { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem); margin-bottom: 10px; }
.wg-enroll__card p { color: var(--smoke); margin-bottom: 24px; }
.wg-enroll__actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.wg-enroll__actions--stack { flex-direction: column; }
.wg-enroll__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 520px) { .wg-enroll__pair { grid-template-columns: minmax(0, 1fr); } }

/* --- Team & User Profiles ---------------------------------------------- */

.wg-profile-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.wg-profile-fields {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.8125rem;
  color: var(--smoke);
}
.wg-profile-fields b { color: var(--bone); }
.wg-profile-statwrap {
  display: flex;
  align-items: stretch;
  gap: 14px;
  flex-wrap: wrap;
}
.wg-profile-stat {
  min-width: 108px;
  padding: 10px 14px;
  border: 2px solid var(--ink-line);
  background: var(--ink-panel);
  text-align: left;
}
.wg-profile-stat__n {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--bone);
}
.wg-profile-stat__l {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--smoke);
}
.wg-captain-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  padding: 12px 14px;
  border: 2px solid var(--ink-line);
  background: var(--ink-panel);
}
.wg-profile-sec { margin-bottom: 28px; }
.wg-awards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.wg-award {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 18px;
}
.wg-award .award-icon { font-size: 1.5rem; color: var(--crimson); }
.wg-breakdowns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 760px) { .wg-breakdowns { grid-template-columns: minmax(0, 1fr); } }
.wg-progress {
  height: 14px;
  border-radius: 0;
  background: var(--ink-void);
  border: 1px solid var(--ink-line);
  margin-bottom: 12px;
}
.wg-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  font-size: 0.75rem;
  color: var(--smoke);
}
.wg-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.wg-legend > span > i { display: inline-block; width: 10px; height: 10px; }

/* Dark settings surfaces and comfortable breathing room around token controls. */
.wg-settings__panel .wg-plate { background: var(--ink-panel); }
.wg-settings__panel .form-control, .wg-settings__panel .form-select,
.wg-settings__panel textarea { background-color: #141416 !important; color: #f2ede3 !important; }
.wg-settings__panel .form-control:focus, .wg-settings__panel .form-select:focus,
.wg-settings__panel textarea:focus { background-color: #1d1d21 !important; }
.wg-settings__token-form { margin-bottom: 36px; padding-bottom: clamp(30px, 4vw, 48px); }
.wg-settings__token-form .wg-settings__actions { margin-top: 28px; }
#tokens { padding-bottom: clamp(32px, 5vw, 60px); }

/* Consistent column proportions; preserve all team details via horizontal scroll. */
.wg-teams-table { table-layout: fixed; width: 100%; min-width: 620px; }
.wg-teams-table th:nth-child(1) { width: 34%; }
.wg-teams-table th:nth-child(2) { width: 14%; }
.wg-teams-table th:nth-child(3) { width: 29%; }
.wg-teams-table th:nth-child(4) { width: 23%; }
.wg-teams-table th, .wg-teams-table td { padding-inline: clamp(12px, 1.5vw, 22px); vertical-align: middle; overflow-wrap: anywhere; }
.wg-teams-table .wg-country { max-width: 100%; }

/* One quiet podium entrance at a time; keep content visible while waiting. */
@media (prefers-reduced-motion: no-preference) {
  .wg-podium__card { animation: wg-quiet-rise 220ms cubic-bezier(.22, 1, .36, 1) backwards; }
  .wg-podium__card--1 { animation-delay: 0ms; }
  .wg-podium__card--2 { animation-delay: 220ms; }
  .wg-podium__card--3 { animation-delay: 440ms; }
  @keyframes wg-quiet-rise { from { opacity: .68; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
  tr.wg-rank-1, tr.wg-rank-2, tr.wg-rank-3,
  tr.wg-rank-1 .wg-rank, tr.wg-rank-2 .wg-rank, tr.wg-rank-3 .wg-rank,
  .wg-board__row { animation: none; }
}
.wg-teams-scroll-hint { display: none; }
@media (max-width: 650px) {
  .wg-teams-scroll-hint { display: block; margin: 0 0 10px; font-size: .75rem; color: var(--smoke); }
}

/* Settings: straight dark panels also avoid trapping fixed modals in a
   transformed stacking context beneath Bootstrap's body-level backdrop. */
.wg-settings__panel .wg-plate {
  transform: none;
  background: #1d1d21 !important;
  color: #f2ede3;
  border-color: #38383e;
  width: 100%;
  max-width: none;
  display: block;
  box-sizing: border-box;
}
.wg-settings__panel .wg-plate form { width: 100%; }
.wg-settings__panel .form-control,
.wg-settings__panel .form-select,
.wg-settings__panel textarea {
  background: #101012 !important;
  color: #f2ede3 !important;
  border-color: #45454c !important;
  color-scheme: dark;
}
.wg-settings__panel .form-control:focus,
.wg-settings__panel .form-select:focus,
.wg-settings__panel textarea:focus { background: #18181b !important; border-color: #e4002b !important; }
.wg-settings__panel input:-webkit-autofill,
.wg-settings__panel input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f2ede3 !important;
  box-shadow: 0 0 0 1000px #101012 inset !important;
}
.wg-settings__panel .wg-settings__token-form { margin-bottom: 0; padding-bottom: clamp(30px, 4vw, 48px); }
.wg-settings__token-list { margin-top: clamp(40px, 5vw, 56px); }
