/* 5-Star Films - layout & theme
   Image sharpness: low-res PNGs upscaled by CSS look soft. Use full-res exports
   (e.g. 3840px wide) for full-bleed backgrounds and hero art - see /assets. */

/* Grityle - register the same Black file for normal/bold requests too. Without 400/700,
   anything inheriting font-weight: 400 under .site-header skips Grityle and falls back to Bebas Neue. */
@font-face {
  font-family: "Grityle";
  src: url("assets/fonts/grityle/Grityle-Black.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Grityle";
  src: url("assets/fonts/grityle/Grityle-Black.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Grityle";
  src: url("assets/fonts/grityle/Grityle-Black.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* Futura PT (local) - register common weights on the same file so body (400) and nav (700)
   don’t fall through to Coco Gothic / Source Sans on some displays or DPI paths. */
@font-face {
  font-family: "Futura PT";
  src: url("assets/fonts/futura-cyrillic-heavy/FuturaCyrillicHeavy.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Futura PT";
  src: url("assets/fonts/futura-cyrillic-heavy/FuturaCyrillicHeavy.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Futura PT";
  src: url("assets/fonts/futura-cyrillic-heavy/FuturaCyrillicHeavy.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Futura PT";
  src: url("assets/fonts/futura-cyrillic-heavy/FuturaCyrillicHeavy.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* LEMON MILK (local) */
@font-face {
  font-family: "LEMON MILK";
  src: url("assets/fonts/lemonmilk/LEMONMILK-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Lexend (local) */
@font-face {
  font-family: "Lexend";
  src: url("assets/fonts/lexend/Lexend-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lexend";
  src: url("assets/fonts/lexend/Lexend-ExtraLight.ttf") format("truetype");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lexend";
  src: url("assets/fonts/lexend/Lexend-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lexend";
  src: url("assets/fonts/lexend/Lexend-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lexend";
  src: url("assets/fonts/lexend/Lexend-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* Coco Gothic - trial: Regular (wiki headings, etc.) + Bold (header nav & mega-menu labels) */
@font-face {
  font-family: "Coco Gothic";
  src: url("assets/fonts/coco-gothic/Coco-Gothic-Regular-trial.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Coco Gothic";
  src: url("assets/fonts/coco-gothic/Coco-Gothic-Bold-trial.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Now Alt - Medium for primary header nav labels (Work, Videos, Wiki, …) */
@font-face {
  font-family: "Now Alt Medium";
  src: url("assets/fonts/now/NowAlt-Medium.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Now Alt - Light (wiki infobox headers, character slideshow tabs, etc.) */
@font-face {
  font-family: "NowAlt-Light";
  src: url("assets/fonts/now/NowAlt-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* MADE TOMMY (local) - Tools store typography */
@font-face {
  font-family: "MADE TOMMY";
  src: url("assets/fonts/made_tommy/MADE TOMMY Regular_PERSONAL USE.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "MADE TOMMY";
  src: url("assets/fonts/made_tommy/MADE TOMMY Bold_PERSONAL USE.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0a0b;
  --bg-elevated: #121214;
  --text: #e8e6e3;
  --muted: #9a9690;
  --accent: #22d3ee;
  --accent-dim: #0e7490;
  --accent-hover: #67e8f9;
  --border: rgba(255, 255, 255, 0.08);
  --font-display: "Bebas Neue", Impact, sans-serif;
  --font-header: "Grityle", "Bebas Neue", Impact, sans-serif;
  --font-nav: "Futura PT", "Futura", "Coco Gothic", "Source Sans 3", system-ui, sans-serif;
  /* Header row: top-level nav links only (see .site-nav .nav-top) */
  --font-nav-top: "Now Alt Medium", var(--font-nav);
  --font-body: "Futura PT", "Futura", "Source Sans 3", system-ui, sans-serif;
  --radius: 10px;
  /* Main content width - bumped on large / 4K screens (see end of file) */
  --max: 1100px;
  /* Header / footer - black grunge (center spotlight) */
  --texture-tint: rgba(6, 6, 8, 0.52);
  --texture-header-footer: url("assets/texture-header-footer.png");
  /* Global page - original star/grain image */
  --global-bg-texture: url("assets/bg-texture.png");
  --page-bg-overlay: rgba(2, 3, 6, 0.74);
}

/* - Admin-only editor UI (shared across all pages) - */
.wiki-draft-banner {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  z-index: 30;
}

.wiki-draft-banner[hidden] {
  display: none !important;
}

.wiki-draft-banner__text {
  margin: 0;
  flex: 1 1 12rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.wiki-draft-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.wiki-draft-banner__btn {
  font-family: var(--font-nav);
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.wiki-draft-banner__btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.wiki-draft-banner__btn--primary {
  background: rgba(34, 211, 238, 0.12);
  border-color: var(--accent-dim);
  color: var(--accent);
}

.wiki-edit-fab {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 40;
  width: 3.25rem;
  height: 3.25rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--accent);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wiki-edit-fab[hidden] {
  display: none !important;
}

.wiki-edit-fab:hover {
  transform: scale(1.06);
  border-color: var(--accent);
  color: var(--accent-hover);
}

.wiki-edit-fab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wiki-edit-fab[aria-pressed="true"] {
  color: var(--text);
  border-color: rgba(34, 211, 238, 0.45);
}

body.wiki-is-editing .wiki-edit-fab {
  bottom: 5.5rem;
}

.wiki-toolbox-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  margin: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.wiki-toolbox-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(34, 211, 238, 0.10);
  color: var(--accent-hover);
}

.wiki-toolbox-btn:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.75);
  outline-offset: 2px;
}

.wiki-edit-dock {
  position: fixed;
  top: var(--wiki-header-h, 72px);
  left: 0;
  bottom: 0;
  right: auto;
  z-index: 41;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100vh - var(--wiki-header-h, 72px));
  max-height: calc(100dvh - var(--wiki-header-h, 72px));
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-sizing: border-box;
  transform: translateX(-104%);
  transition: transform 0.18s ease;
}

.wiki-edit-dock[hidden] {
  display: none !important;
}

.wiki-tools-open .wiki-edit-dock {
  transform: translateX(0);
}

.wiki-edit-toolbar {
  position: relative;
  left: auto;
  width: min(268px, 90vw);
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  padding: 0.75rem;
  border-right: none;
  background: rgba(10, 10, 11, 0.96);
  backdrop-filter: blur(8px);
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
  max-height: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 211, 238, 0.42) rgba(255, 255, 255, 0.06);
}

.wiki-edit-toolbar::-webkit-scrollbar {
  width: 9px;
}

.wiki-edit-toolbar::-webkit-scrollbar-track {
  margin: 4px 0;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

.wiki-edit-toolbar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.45), rgba(14, 116, 144, 0.55));
  border-radius: 6px;
  border: 2px solid rgba(10, 10, 11, 0.92);
  background-clip: padding-box;
}

.wiki-edit-toolbar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(103, 232, 249, 0.55), rgba(34, 211, 238, 0.45));
  border-color: rgba(10, 10, 11, 0.95);
}

.wiki-edit-toolbar::-webkit-scrollbar-corner {
  background: transparent;
}

.wiki-edit-toolbar__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wiki-edit-toolbar__font-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  padding-bottom: 0.5rem;
  margin-bottom: 0.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wiki-edit-toolbar__font-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.wiki-edit-toolbar__select {
  font-family: var(--font-nav);
  font-size: 0.82rem;
  width: 100%;
  padding: 0.32rem 0.45rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
}

.wiki-edit-toolbar__select:hover {
  border-color: var(--muted);
}

.wiki-edit-toolbar__select:focus {
  outline: 2px solid rgba(34, 211, 238, 0.45);
  outline-offset: 1px;
}

.wiki-edit-toolbar__layer-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.wiki-edit-toolbar__layer-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.wiki-edit-toolbar__layer-btn {
  flex: 1 1 auto;
  text-align: left;
  font-family: var(--font-nav);
  font-size: 0.82rem;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
}

.wiki-edit-toolbar__layer-btn:hover {
  border-color: rgba(34, 211, 238, 0.45);
  color: var(--accent);
}

.wiki-edit-toolbar__layer-btn.is-active {
  border-color: rgba(34, 211, 238, 0.65);
  background: rgba(34, 211, 238, 0.12);
  color: #fff;
}

.wiki-edit-toolbar__layer-lock {
  flex: 0 0 auto;
  width: 2.1rem;
  padding: 0.35rem 0;
}

.wiki-edit-toolbar__layers-details {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.wiki-edit-toolbar__layers-summary {
  list-style: none;
  cursor: pointer;
  padding: 0.4rem 0.55rem;
  font-family: var(--font-nav);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.9);
}

.wiki-edit-toolbar__layers-summary::-webkit-details-marker {
  display: none;
}

.wiki-edit-toolbar__layers-summary::after {
  content: "▾";
  float: right;
  color: rgba(255, 255, 255, 0.7);
}

.wiki-edit-toolbar__layers-details[open] > .wiki-edit-toolbar__layers-summary::after {
  content: "▴";
}

.wiki-edit-toolbar__label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-right: 0;
}

.wiki-edit-toolbar__flash {
  height: 1.7rem;
  max-width: 100%;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.38);
  background: rgba(34, 211, 238, 0.14);
  color: var(--accent);
  font-size: 0.85rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.wiki-edit-toolbar__flash.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.wiki-edit-toolbar__btn {
  font-family: var(--font-nav);
  font-size: 0.84rem;
  padding: 0.38rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.wiki-edit-toolbar__btn:hover {
  border-color: var(--muted);
  color: var(--accent-hover);
}

.wiki-edit-toolbar__btn-row {
  display: flex;
  gap: 0.35rem;
  width: 100%;
  align-items: stretch;
}

.wiki-edit-toolbar__btn-row .wiki-edit-toolbar__btn {
  width: auto;
  flex: 1;
  min-width: 0;
}

.wiki-edit-toolbar__btn-row .wiki-edit-toolbar__btn--icon {
  flex: 0 0 2.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.wiki-edit-toolbar__btn--icon svg {
  display: block;
  flex-shrink: 0;
}

.wiki-edit-toolbar__btn--ghost {
  width: auto;
  text-align: center;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
}

.wiki-edit-toolbar__btn--primary {
  background: rgba(34, 211, 238, 0.15);
  border-color: var(--accent-dim);
  color: var(--accent);
}

@media (max-width: 640px) {
  .wiki-edit-toolbar__btn--primary {
    width: auto;
  }
}

.wiki-edit-toolbar__link {
  position: static;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.82rem;
  padding: 0.32rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.1);
  color: var(--accent);
  cursor: pointer;
}

.wiki-edit-toolbar__link--bottom {
  margin-top: auto;
  margin-bottom: 0.25rem;
}

.wiki-edit-toolbar__link:hover {
  border-color: rgba(34, 211, 238, 0.6);
  background: rgba(34, 211, 238, 0.14);
}

.wiki-edit-toolbar__end {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding-top: 0.5rem;
  margin-bottom: 0;
  padding-bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 11, 0) 0,
    rgba(10, 10, 11, 0.92) 30%,
    rgba(10, 10, 11, 0.98) 100%
  );
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.35);
}

/* Ensure editable areas get a visible outline on any page */
body.wiki-is-editing [contenteditable="true"] {
  outline: 1px dashed rgba(34, 211, 238, 0.45);
  outline-offset: 4px;
  border-radius: var(--radius);
  min-height: 2rem;
}

/* Free-drag / resize overlays (edit mode) */
.wiki-block-resizer,
.wiki-watch-resizer,
.wiki-ibox-resizer,
.wiki-master-resizer {
  position: fixed;
  z-index: 4200;
  pointer-events: none;
}

.wiki-block-resizer[hidden],
.wiki-watch-resizer[hidden],
.wiki-ibox-resizer[hidden],
.wiki-master-resizer[hidden] {
  display: none !important;
}

.wiki-block-resizer__box,
.wiki-watch-resizer__box,
.wiki-ibox-resizer__box,
.wiki-master-resizer__box {
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(34, 211, 238, 0.65);
  background: rgba(34, 211, 238, 0.06);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) inset;
}

.wiki-block-resizer__handle,
.wiki-watch-resizer__handle,
.wiki-ibox-resizer__handle,
.wiki-master-resizer__handle,
.wiki-watch-resizer__drag,
.wiki-ibox-resizer__drag {
  pointer-events: auto;
}

.wiki-block-resizer__handle,
.wiki-watch-resizer__handle,
.wiki-ibox-resizer__handle,
.wiki-master-resizer__handle {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(34, 211, 238, 0.85);
  background: rgba(10, 10, 11, 0.92);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

/* Free-drag: custom icon on the right, vertically centered (offset past east resize handle) */
.wiki-block-resizer__handle--move,
.wiki-ibox-resizer__handle--move,
.wiki-watch-resizer__drag {
  position: absolute;
  left: auto;
  right: -34px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(34, 211, 238, 0.85);
  background-color: rgba(10, 10, 11, 0.92);
  background-image: url("assets/wiki-free-drag.png");
  background-size: 18px 18px;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  cursor: grab;
}

.wiki-block-resizer__handle--move:active,
.wiki-ibox-resizer__handle--move:active,
.wiki-watch-resizer__drag:active {
  cursor: grabbing;
}

.wiki-block-resizer__handle--e,
.wiki-ibox-resizer__handle--e,
.wiki-watch-resizer__handle--e {
  right: -7px;
  top: 50%;
  transform: translateY(-50%);
  cursor: ew-resize;
}

.wiki-block-resizer__handle--s,
.wiki-ibox-resizer__handle--s,
.wiki-watch-resizer__handle--s {
  left: 50%;
  bottom: -7px;
  transform: translateX(-50%);
  cursor: ns-resize;
}

.wiki-block-resizer__handle--se,
.wiki-ibox-resizer__handle--se,
.wiki-watch-resizer__handle--se {
  right: -7px;
  bottom: -7px;
  cursor: nwse-resize;
}

/* Master content resizer (title + article body) */
.wiki-master-resizer__handle--scale {
  right: -7px;
  bottom: -7px;
  cursor: ns-resize;
}

.wiki-watch-resizer__handle--w,
.wiki-ibox-resizer__handle--w {
  left: -7px;
  top: 50%;
  transform: translateY(-50%);
  cursor: ew-resize;
}

.wiki-watch-resizer__handle--n,
.wiki-ibox-resizer__handle--n {
  left: 50%;
  top: -7px;
  transform: translateX(-50%);
  cursor: ns-resize;
}

.wiki-watch-resizer__handle--ne,
.wiki-ibox-resizer__handle--ne {
  right: -7px;
  top: -7px;
  cursor: nesw-resize;
}

.wiki-watch-resizer__handle--nw,
.wiki-ibox-resizer__handle--nw {
  left: -7px;
  top: -7px;
  cursor: nwse-resize;
}

.wiki-watch-resizer__handle--sw,
.wiki-ibox-resizer__handle--sw {
  left: -7px;
  bottom: -7px;
  cursor: nesw-resize;
}

/* Image replace + crop modal */
.wiki-imgedit {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: min(4vw, 1.5rem);
  box-sizing: border-box;
}

.wiki-imgedit[hidden] {
  display: none !important;
}

.wiki-imgedit__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 12, 0.86);
}

.wiki-imgedit__panel {
  position: relative;
  z-index: 1;
  width: min(920px, 96vw);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: 0 14px 70px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.wiki-imgedit__head,
.wiki-links__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--border);
}

.wiki-imgedit__title,
.wiki-links__title {
  font-family: var(--font-nav);
  font-weight: 600;
}

.wiki-imgedit__close,
.wiki-links__close {
  margin-left: auto;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.wiki-imgedit__close:hover,
.wiki-links__close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.wiki-imgedit__body {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 260px);
  gap: 1rem;
  padding: 1rem;
}

@media (max-width: 720px) {
  .wiki-imgedit__body {
    grid-template-columns: 1fr;
  }
}

.wiki-imgedit__preview {
  position: relative;
  width: 100%;
  height: min(62vh, 560px);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
  touch-action: none;
  user-select: none;
  cursor: grab;
}

.wiki-imgedit__preview.is-dragging {
  cursor: grabbing;
}

.wiki-imgedit__img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  max-width: none;
  max-height: none;
  will-change: transform;
}

.wiki-imgedit__controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.wiki-imgedit__row {
  display: grid;
  grid-template-columns: 5.25rem 1fr;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.wiki-imgedit__row input[type="range"] {
  width: 100%;
}

.wiki-imgedit__hint {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.35;
}

.wiki-imgedit__status {
  min-height: 1.2rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
}

.wiki-imgedit__foot {
  display: flex;
  gap: 0.6rem;
  padding: 0.85rem 1rem 1rem;
  border-top: 1px solid var(--border);
}

.wiki-imgedit__btn {
  font-family: var(--font-nav);
  font-size: 0.9rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.wiki-imgedit__btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.wiki-imgedit__btn--primary {
  margin-left: auto;
  background: rgba(34, 211, 238, 0.15);
  border-color: var(--accent-dim);
  color: var(--accent);
}

/* Links panel */
.wiki-links {
  position: fixed;
  inset: 0;
  z-index: 5100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: min(4vw, 1.5rem);
  box-sizing: border-box;
}

.wiki-links[hidden] {
  display: none !important;
}

.wiki-links__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 12, 0.86);
}

.wiki-links__panel {
  position: relative;
  z-index: 1;
  width: min(860px, 96vw);
  max-height: min(82vh, 720px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: 0 14px 70px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.wiki-links__body {
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
}

.wiki-links__search {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font-family: var(--font-nav);
}

.wiki-links__list {
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
}

.wiki-links__row {
  display: grid;
  grid-template-columns: 1fr minmax(140px, 240px) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wiki-links__row:last-child {
  border-bottom: none;
}

.wiki-links__href {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.88);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wiki-links__label {
  font-family: var(--font-nav);
  font-size: 0.9rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wiki-links__actions {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

.wiki-links__apply,
.wiki-links__copy {
  font-family: var(--font-nav);
  font-size: 0.9rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.wiki-links__apply {
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.12);
  color: var(--accent);
}

.wiki-links__apply:hover {
  border-color: rgba(34, 211, 238, 0.6);
  background: rgba(34, 211, 238, 0.16);
}

.wiki-links__copy:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Drag-to-reorder (admin editor) */
body.wiki-is-editing [data-wiki-drag] {
  cursor: grab;
}

body.wiki-dragging-active [data-wiki-drag] {
  cursor: grabbing;
}

.wiki-dragging {
  opacity: 0.65;
}

.wiki-drag-placeholder {
  border: 2px dashed rgba(34, 211, 238, 0.45);
  border-radius: var(--radius);
  background: rgba(34, 211, 238, 0.08);
  margin: 0.6rem 0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  min-height: 100%;
  overflow-x: hidden;
  /* Fixed root: vw-based scaling made typography larger on wide 4K viewports than on 1080p. */
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* More consistent glyph rasterization across 1080p vs 4K / mixed scaling (subpixel vs grayscale). */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
  background-color: #050506;
  background-image: linear-gradient(var(--page-bg-overlay), var(--page-bg-overlay)), var(--global-bg-texture);
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Let the main content grow so the footer sticks to bottom on short pages */
main {
  flex: 1 0 auto;
}

/* Home hero: hide copy until video/overlay are ready */
html.hero-pending .hero {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

html.hero-pending .hero-video-wrap {
  /* Keep a stable dark backdrop while assets load */
  background: #050506;
}

html:not(.hero-pending) .hero {
  transition: opacity 220ms ease, transform 220ms ease;
}

@media (max-width: 900px) {
  body {
    background-attachment: scroll;
  }
}

/* Best raster scaling the browser offers (helps once source files are high-res) */
img {
  image-rendering: auto;
}

@supports (image-rendering: high-quality) {
  img {
    image-rendering: high-quality;
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: #111;
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header - grunge texture (center detail) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  font-family: var(--font-header);
  background-color: #070708;
  background-image: linear-gradient(var(--texture-tint), var(--texture-tint)), var(--texture-header-footer);
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.65), 0 4px 12px rgba(0, 0, 0, 0.45);
}

.header-inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 2.05rem 0;
}

.header-left,
.header-right {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
}

.header-left {
  justify-content: flex-start;
  margin-left: -7.5rem;
}

.header-right {
  justify-content: flex-end;
  gap: 0.5rem;
  /* Pull search, socials, and account toward the viewport edge (paired with .header-left negative margin). */
  margin-right: -19rem;
}

@media (min-width: 721px) {
  .header-inner {
    display: grid;
    /* Equal side tracks so primary nav stays visually centered (logo left, tools right). */
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    align-content: center;
    column-gap: 1.25rem;
  }

  .header-left,
  .header-right {
    flex: unset;
  }

  .header-left {
    justify-self: start;
    align-self: center;
    min-width: 0;
  }

  .site-nav {
    justify-self: center;
    align-self: center;
    justify-content: center;
    margin-top: 0.4rem;
  }

  .header-right {
    justify-self: end;
    align-self: center;
    min-width: 0;
    padding-left: 1rem;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
  }

  .header-toolbar-cluster {
    flex: 1 1 auto;
    min-width: 0;
  }

  .header-right .header-toolbar-cluster .header-search-wrap {
    flex: 0 1 260px;
    min-width: 0;
    max-width: 280px;
  }
}

/* Medium desktop: soften extreme side pulls so centered nav (Home, Videos, Wiki, Gallery) stays in view. */
@media (min-width: 721px) and (max-width: 1320px) {
  .header-left {
    margin-left: calc(-7.5rem + min(5rem, 8vw));
  }

  .header-right {
    margin-right: calc(-19rem + min(12rem, 14vw));
  }

  .site-nav {
    gap: clamp(0.75rem, 2vw, 2.25rem);
  }
}

.header-youtube,
.header-instagram,
.header-bluesky,
.header-discord {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.header-bluesky {
  --bluesky-icon: #ffffff;
}

/* Header auth (login/register) - sits after .header-toolbar-cluster (search + socials) */
.header-auth {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0;
  padding-left: 0.75rem;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  margin-right: 0;
  flex: 0 0 auto;
  font-family: var(--font-nav);
}

.header-auth__user {
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.95rem;
  color: var(--muted);
}

.header-auth__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.25rem;
  padding: 0 0.75rem;
  white-space: nowrap;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  line-height: 1;
  font-family: var(--font-nav);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  padding: 0 0.6rem;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.header-auth__btn:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.55);
  color: var(--accent-hover);
}

.header-auth__btn--primary {
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.12);
  color: var(--accent);
}

.header-auth__iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.header-auth__iconbtn:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.55);
  color: var(--accent-hover);
}

@media (max-width: 720px) {
  .header-auth__user {
    display: none;
  }
}

.header-youtube:hover {
  color: #ff4242;
  border-color: rgba(255, 66, 66, 0.5);
  background: rgba(255, 66, 66, 0.1);
  transform: scale(1.06);
}

.header-instagram:hover {
  color: #e4405f;
  border-color: rgba(228, 64, 95, 0.5);
  background: rgba(228, 64, 95, 0.1);
  transform: scale(1.06);
}

.header-bluesky:hover {
  color: #1185fe;
  border-color: rgba(17, 133, 254, 0.55);
  background: rgba(17, 133, 254, 0.12);
  transform: scale(1.06);
  --bluesky-icon: #1185fe;
}

.header-discord:hover {
  color: #5865f2;
  border-color: rgba(88, 101, 242, 0.55);
  background: rgba(88, 101, 242, 0.12);
  transform: scale(1.06);
}

/* Butterfly: inline SVG data URL so the mask always loads (no separate asset fetch / path issues) */
.header-bluesky__icon {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  pointer-events: none;
  background-color: var(--bluesky-icon);
  transition: background-color 0.2s ease;
  mask: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%20600%20530%22%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22m135.72%2044.03c66.496%2049.921%20138.02%20151.14%20164.28%20205.46%2026.262-54.316%2097.782-155.54%20164.28-205.46%2047.98-36.021%20125.72-63.892%20125.72%2024.795%200%2017.712-10.155%20148.79-16.111%20170.07-20.703%2073.984-96.144%2092.854-163.25%2081.433%20117.3%2019.964%20147.14%2086.092%2082.697%20152.22-122.39%20125.59-175.91-31.511-189.63-71.766-2.514-7.3797-3.6904-10.832-3.7077-7.8964-0.0174-2.9357-1.1937%200.51669-3.7077%207.8964-13.714%2040.255-67.233%20197.36-189.63%2071.766-64.444-66.128-34.605-132.26%2082.697-152.22-67.108%2011.421-142.55-7.4491-163.25-81.433-5.9562-21.282-16.111-152.36-16.111-170.07%200-88.687%2077.742-60.816%20125.72-24.795z%22/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%20600%20530%22%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22m135.72%2044.03c66.496%2049.921%20138.02%20151.14%20164.28%20205.46%2026.262-54.316%2097.782-155.54%20164.28-205.46%2047.98-36.021%20125.72-63.892%20125.72%2024.795%200%2017.712-10.155%20148.79-16.111%20170.07-20.703%2073.984-96.144%2092.854-163.25%2081.433%20117.3%2019.964%20147.14%2086.092%2082.697%20152.22-122.39%20125.59-175.91-31.511-189.63-71.766-2.514-7.3797-3.6904-10.832-3.7077-7.8964-0.0174-2.9357-1.1937%200.51669-3.7077%207.8964-13.714%2040.255-67.233%20197.36-189.63%2071.766-64.444-66.128-34.605-132.26%2082.697-152.22-67.108%2011.421-142.55-7.4491-163.25-81.433-5.9562-21.282-16.111-152.36-16.111-170.07%200-88.687%2077.742-60.816%20125.72-24.795z%22/%3E%3C/svg%3E") center / contain no-repeat;
}

.header-youtube:focus-visible,
.header-instagram:focus-visible,
.header-discord:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.header-bluesky:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Auth pages (login/register) */
.auth-page {
  padding: 3.25rem 0 4.25rem;
}

.auth-card {
  max-width: 32rem;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  background: rgba(18, 18, 20, 0.74);
  backdrop-filter: blur(6px);
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.55);
  font-family: var(--font-nav);
}

.auth-title {
  margin: 0;
  font-family: var(--font-nav);
  letter-spacing: 0.02em;
  font-size: 2.2rem;
  text-transform: uppercase;
}

.auth-sub {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.auth-form {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.85rem;
}

.auth-label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.auth-input {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
}

.auth-password {
  position: relative;
  display: block;
}

.auth-password .auth-input {
  padding-right: 2.6rem;
}

.auth-eye {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-eye:hover {
  color: var(--accent-hover);
  background: rgba(255, 255, 255, 0.06);
}

.auth-eye:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.auth-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.auth-btn {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: var(--font-nav);
  font-size: 1rem;
  cursor: pointer;
}

.auth-btn:hover {
  border-color: rgba(34, 211, 238, 0.55);
  color: var(--accent-hover);
}

.auth-btn--primary {
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.12);
  color: var(--accent);
}

.auth-msg {
  margin: 0;
  min-height: 1.25rem;
  color: var(--muted);
}

.auth-alt {
  margin: 1rem 0 0;
  color: var(--muted);
}

/* Discord page: prefer Futura PT for body text */
.discord-page .auth-card,
.discord-page .auth-card * {
  font-family: "Futura PT", "Futura", "Trebuchet MS", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

/* Prevent "flash" of old navigation links before JS normalizes nav */
.site-nav a.nav-top[href="#work"],
.site-nav a.nav-top[href*="#services"],
.site-nav a.nav-top[href*="#about"],
.site-nav a.nav-top[href*="#contact"] {
  display: none !important;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.logo img {
  display: block;
  height: clamp(44px, 9.5vw, 56px);
  width: auto;
  aspect-ratio: 1;
  object-fit: contain;
  object-position: center;
  border-radius: 50%;
}

.logo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 50%;
}

.site-nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: clamp(1.65rem, 4.2vw, 3.25rem);
}

.site-nav .nav-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  line-height: 1;
  font-family: var(--font-nav-top);
  color: #fff;
  text-decoration: none;
  text-decoration-thickness: 0;
  font-weight: 400;
  font-size: clamp(1.05rem, 1.28vw, 1.45rem);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.45rem 0.65rem;
  transition: color 0.35s ease, transform 0.35s ease;
}

.site-nav .nav-top::after {
  content: "";
  position: absolute;
  left: 0.65rem;
  right: 0.65rem;
  bottom: 0.2rem;
  height: 2px;
  background: var(--accent);
  border-radius: 999px;
  transform-origin: left center;
  transform: scaleX(0);
  opacity: 0.95;
  transition: transform 0.22s ease;
}

.site-nav .nav-top:hover::after,
.site-nav .nav-top:focus-visible::after {
  transform: scaleX(1);
}

.site-nav .nav-top[aria-current="page"]::after {
  transform: scaleX(1);
}

.site-nav .nav-top:hover {
  color: var(--accent);
  transform: scale(1.1);
}

/* Wiki - mega-menu */
.nav-dropdown-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: min(90vw, var(--nav-dd-min, 860px));
  max-width: 92vw;
  /* Stay within the viewport; scroll inside if the list is tall. */
  max-height: min(72vh, 36rem);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: auto;
  scrollbar-color: rgba(255, 255, 255, 0.28) rgba(255, 255, 255, 0.06);
  padding: 0;
  background: rgba(14, 14, 16, 0.98);
  background-image: linear-gradient(var(--texture-tint), var(--texture-tint)), var(--texture-header-footer);
  background-position: center center, center center;
  background-size: cover;
  background-repeat: no-repeat;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  z-index: 60;
}

.nav-dropdown::-webkit-scrollbar {
  width: 14px;
}

.nav-dropdown::-webkit-scrollbar-track {
  margin: 6px 0;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
}

.nav-dropdown::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  border: 2px solid rgba(14, 14, 16, 0.85);
  background-clip: padding-box;
}

.nav-dropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

.nav-dropdown-wrap:hover .nav-dropdown,
.nav-dropdown-wrap:focus-within .nav-dropdown {
  display: block;
}

.site-nav .nav-top[aria-current="page"] {
  color: var(--accent);
}

.nav-dropdown-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(10rem, max-content);
  gap: 0.75rem 0;
  column-gap: 0;
  padding: 0.85rem 1rem 0.95rem;
}

@media (min-width: 721px) {
  /* Pin the three wiki mega-menu columns so layout matches even when markup variants exist. */
  #wiki-dropdown .nav-dropdown-inner > .nav-dropdown-group:nth-child(1) {
    grid-column: 1;
  }

  #wiki-dropdown .nav-dropdown-inner > .nav-dropdown-group:nth-child(2) {
    grid-column: 2;
  }

  /* Direct children only - nested .nav-dropdown-group (e.g. Productions inside .nav-dropdown-col--right)
     is also :nth-child(1) of its parent and must NOT get these column rules. */
  .nav-dropdown-inner > .nav-dropdown-group:nth-child(1) .nav-dropdown-list {
    column-count: 2;
    column-gap: 1.25rem;
  }

  .nav-dropdown-inner > .nav-dropdown-group:nth-child(1) .nav-dropdown-list li {
    break-inside: avoid;
  }

  .nav-dropdown-inner > .nav-dropdown-group:nth-child(2) .nav-dropdown-list {
    column-count: 2;
    column-gap: 1.25rem;
  }

  .nav-dropdown-inner > .nav-dropdown-group:nth-child(2) .nav-dropdown-list li {
    break-inside: avoid;
  }

  /* Third column: Productions + MISC - width hugs content (same rhythm as col 1 → 2). */
  #wiki-dropdown .nav-dropdown-inner > .nav-dropdown-group:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
    align-self: start;
  }

  .nav-dropdown-inner .nav-dropdown-col--right {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-width: 0;
    align-self: start;
    justify-self: start;
    padding: 0;
    padding-left: 0.875rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-dropdown-inner .nav-dropdown-col--right .nav-dropdown-group {
    border-left: none;
    padding: 0 0.75rem 0 0;
  }

  .nav-dropdown-inner .nav-dropdown-col--right .nav-dropdown-group:not(:first-child) {
    margin: 0;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* Minimal nav (no .nav-dropdown-col--right): third column Productions matches inset above. */
  .nav-dropdown-inner > .nav-dropdown-group:nth-child(3) {
    padding-left: 0.875rem;
  }
}

.nav-dropdown-group {
  min-width: 0;
  padding: 0 0.75rem;
}

.nav-dropdown-list li {
  min-width: 0;
}

.nav-dropdown-group:first-child {
  padding-left: 0;
}

.nav-dropdown-group:last-child {
  padding-right: 0;
}

.nav-dropdown-group:not(:first-child) {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 1.25rem;
}

.nav-dropdown-heading {
  margin: 0 0 0.4rem;
  font-family: "Lexend", var(--font-nav);
  font-size: 0.88rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid rgba(34, 211, 238, 0.25);
  padding-bottom: 0.3rem;
}

.nav-dropdown-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-dropdown-list li {
  margin: 0 0 0.28rem;
}

.nav-dropdown-label {
  margin: 0.55rem 0 0.3rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-family: "Lexend", var(--font-body);
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

/* MISC block below stacked productions list (same column, full width). */
.nav-dropdown-misc {
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-dropdown-misc__label {
  margin: 0 0 0.35rem;
  font-family: "Lexend", var(--font-nav);
  font-size: 0.88rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.nav-dropdown-misc .nav-dropdown-list {
  margin: 0;
}

.nav-dropdown-list a {
  display: block;
  font-family: "Lexend", var(--font-body);
  color: var(--text);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 300;
  text-transform: none;
  letter-spacing: 0.02em;
  padding: 0.2rem 0;
  line-height: 1.32;
  transition: color 0.2s ease, transform 0.2s ease;
  transform: translateX(0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Allow Elizabeth Paige Koennecke to wrap like before (two-line stacked name). */
.nav-dropdown-list a[href="elizabeth-paige-koennecke.html"] {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

/* Productions + MISC: show full titles (stacked single column; no ellipsis). */
.nav-dropdown-list--productions a,
.nav-dropdown-misc .nav-dropdown-list a {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

/* Non-admins: private wiki entries should not be visible at all in the header mega-menu */
body:not(.site-admin-session) .nav-dropdown-list li.is-wiki-private,
body:not(.site-admin-session) .nav-dropdown-list a.is-wiki-private {
  display: none !important;
}

.nav-dropdown-list li.is-unreleased a {
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
  cursor: default;
}

.nav-dropdown-list li.is-unreleased a:hover {
  color: rgba(255, 255, 255, 0.55);
  transform: none;
}

/* Unreleased nav entries: full styling + clicks only when logged in as adminrs */
body.site-admin-session .nav-dropdown-list li.is-unreleased a {
  color: var(--text);
  pointer-events: auto;
  cursor: pointer;
}

body.site-admin-session .nav-dropdown-list li.is-unreleased a:hover {
  color: var(--accent-hover);
  transform: translateX(0.25rem);
}

/* FASTLANE 3 characters listed before a wiki page exists (no link) */
.nav-dropdown-list li.is-unreleased > span {
  display: block;
  font-family: "Lexend", var(--font-body);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.92rem;
  font-weight: 300;
  padding: 0.25rem 0;
  line-height: 1.35;
  cursor: default;
}

.nav-dropdown-list a:hover {
  color: var(--accent-hover);
  transform: translateX(0.25rem);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  .site-nav .nav-top {
    transition: none;
  }

  .site-nav .nav-top:hover {
    transform: none;
  }

  .nav-dropdown-list a {
    transition: none;
  }

  .nav-dropdown-list a:hover {
    transform: none;
  }

  .header-youtube,
  .header-instagram,
  .header-bluesky,
  .header-discord {
    transition: none;
  }

  .header-youtube:hover,
  .header-instagram:hover,
  .header-bluesky:hover,
  .header-discord:hover {
    transform: none;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }

  .header-right {
    margin-right: -1rem;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem 1.5rem 1.5rem;
    background: rgba(18, 18, 20, 0.96);
    background-image: linear-gradient(var(--texture-tint), var(--texture-tint)), var(--texture-header-footer);
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    gap: 1.35rem;
    z-index: 40;
    max-height: min(85vh, 28rem);
    overflow-y: auto;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav .nav-top {
    text-align: center;
  }

  .nav-dropdown-wrap {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .nav-dropdown {
    display: block;
    position: static;
    transform: none;
    left: auto;
    min-width: 0;
    max-width: none;
    margin-top: 0.35rem;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav-dropdown-inner {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0.85rem 1rem 1rem;
  }

  .nav-dropdown-group {
    padding: 0;
  }

  .nav-dropdown-group:not(:first-child) {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.85rem;
    margin-top: 0.85rem;
  }

  /* Wrapper replaces standalone Productions + MISC groups; keep separator after Voice. */
  .nav-dropdown-inner .nav-dropdown-col--right:not(:first-child) {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-dropdown-heading {
    font-size: 0.88rem;
  }
}

/* Top-of-page loop video - full frame visible (letterboxing if needed) */
.hero-video-wrap {
  position: relative;
  width: 100%;
  background: #000;
  line-height: 0;
  overflow: visible;
}

.hero-video {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center;
}

/* z-index: video 1 -> FASTLANE wrap 2 -> Irene 3 */
.hero-fastlane-wrap {
  --fastlane-nudge: min(30vw, 20rem);
  --parallax-x: 0px;
  --parallax-y: 0px;
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(
    calc(-50% - var(--fastlane-nudge) + var(--parallax-x)),
    calc(-50% + var(--parallax-y))
  );
  transition: transform 0.22s ease-out;
  pointer-events: none;
}

/* Edit mode: allow selecting/dragging hero layers on Home */
body.wiki-is-editing .hero-fastlane-wrap {
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .hero-fastlane-wrap {
    transition: none;
  }
}

.hero-fastlane-logo {
  display: block;
  width: min(85vw, 1200px);
  max-width: min(91vw, 1320px);
  height: auto;
  max-height: min(78vh, 780px);
  object-fit: contain;
  object-position: center;
  opacity: 0;
  filter: blur(18px);
  transform: scale(0.9);
  transform-origin: center center;
  animation: hero-fastlane-in 1.05s cubic-bezier(0.22, 1, 0.36, 1) 0.28s forwards;
}

@keyframes hero-fastlane-in {
  to {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-fastlane-logo {
    animation: none;
    opacity: 1;
    filter: none;
    transform: none;
  }
}

@media (max-width: 720px) {
  .hero-fastlane-wrap {
    --fastlane-nudge: min(22vw, 9rem);
  }

  .hero-fastlane-logo {
    width: min(90vw, 680px);
    max-height: min(59vh, 530px);
  }
}

/* Character over video - absolute on wrap (not flex) so % height matches video box */
.hero-video-overlay {
  --irene-rest-x: 14vw;
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 3;
  width: min(102vw, 1420px);
  height: min(148%, 78vh);
  object-fit: contain;
  object-position: right bottom;
  pointer-events: none;
  backface-visibility: hidden;
  transform: translate3d(105%, 0, 0) translateZ(0);
  animation: hero-overlay-slide-in 1.15s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

@keyframes hero-overlay-slide-in {
  to {
    transform: translate3d(var(--irene-rest-x), 0, 0) translateZ(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-video-overlay {
    animation: none;
    transform: translate3d(var(--irene-rest-x), 0, 0) translateZ(0);
  }
}

@media (max-width: 720px) {
  .hero-video-overlay {
    /* The art is anchored right and bleeds off that edge. On a phone a rest offset
       pushed it past the viewport, which made the whole page scroll sideways (the
       header is sticky, so this cannot be clipped with overflow on <body>).
       Resting at 0 keeps the same right-anchored framing inside the screen. */
    --irene-rest-x: 0vw;
    width: min(118vw, 1420px);
    height: min(138%, 74vh);
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  padding: 4rem 0 5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 90% 70% at 50% 0%,
    rgba(34, 211, 238, 0.12),
    transparent 60%
  );
  pointer-events: none;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.015) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.35;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw + 0.5rem, 6rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
  margin: 0 0 1.25rem;
}

.lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 36ch;
  margin: 0 0 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #111;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #0a0a0b;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--muted);
  color: var(--text);
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 2.5vw + 1.25rem, 3.25rem);
  letter-spacing: 0.04em;
  margin: 0 0 0.75rem;
}

.section-intro {
  color: var(--muted);
  max-width: 52ch;
  margin: 0 0 2.5rem;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-thumb {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #141a1f 0%, #1a2528 100%);
}

.card-thumb-2 {
  background: linear-gradient(135deg, #121820 0%, #1a2430 100%);
}

.card-thumb-3 {
  background: linear-gradient(135deg, #141a22 0%, #1a2830 100%);
}

.card h3 {
  font-size: 1.15rem;
  margin: 1rem 1.25rem 0.25rem;
}

.card p {
  margin: 0 1.25rem 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Services */
.services {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.25rem;
  max-width: 640px;
}

.services li {
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--accent-dim);
  background: rgba(34, 211, 238, 0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.services strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.services span {
  color: var(--muted);
}

/* About */
.about-text p {
  max-width: 62ch;
  color: var(--muted);
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* Contact */
.contact-form {
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent-dim);
  outline-offset: 2px;
}

.form-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

.form-note code {
  font-size: 0.85em;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

/* Footer - grunge texture (center detail) */
.site-footer {
  padding: 2rem 0;
  margin-top: auto;
  background-color: #070708;
  background-image: linear-gradient(var(--texture-tint), var(--texture-tint)), var(--texture-header-footer);
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.footer-brand,
.footer-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-brand a {
  color: var(--muted);
}

.footer-brand a:hover {
  color: var(--accent);
}

/* --- Large / 4K / ultrawide: wider content rail (4K @ 150% usually lands ~2560 CSS px wide) --- */
@media (min-width: 1600px) {
  :root {
    --max: min(1200px, 92vw);
    --nav-dd-min: 940px;
  }
}

@media (min-width: 1920px) {
  :root {
    --max: min(1280px, 90vw);
    --nav-dd-min: 1000px;
  }

  .logo img {
    height: clamp(50px, 3.75vw, 68px);
  }

  .header-inner {
    padding: 2.25rem 0;
  }

  .hero {
    padding: 4.5rem 0 5.25rem;
  }

  .section {
    padding: 4.75rem 0;
  }

  /* Hero: FASTLANE 3 logo + Irene - scale up on large desktop */
  .hero-fastlane-logo {
    width: min(88vw, 1380px);
    max-width: min(93vw, 1480px);
    max-height: min(82vh, 880px);
  }

  .hero-video-overlay {
    width: min(100vw, 1480px);
    height: min(148%, 80vh);
  }
}

@media (min-width: 2560px) {
  :root {
    --max: min(1380px, 88vw);
    --nav-dd-min: 1040px;
  }

  .hero-fastlane-wrap {
    --fastlane-nudge: min(36vw, 26rem);
  }

  .hero-fastlane-logo {
    width: min(90vw, 1580px);
    max-width: min(94vw, 1720px);
    max-height: min(86vh, 980px);
  }

  .hero-video-overlay {
    width: min(104vw, 1680px);
    height: min(152%, 84vh);
  }
}

/* True "full width" 4K @ 100% (rare); keep modest bump so it doesn't overpower 150% setups */
@media (min-width: 3840px) {
  :root {
    --max: min(1520px, 86vw);
    --nav-dd-min: 1120px;
  }

  .hero-fastlane-wrap {
    --fastlane-nudge: min(40vw, 29rem);
  }

  .hero-fastlane-logo {
    width: min(92vw, 1760px);
    max-width: min(96vw, 1880px);
    max-height: min(88vh, 1080px);
  }

  .hero-video-overlay {
    width: min(108vw, 1860px);
    height: min(158%, 87vh);
  }
}

/* Full HD height (~1080p): keep FASTLANE hero logo smaller - overrides wide-only scaling */
@media (min-width: 1920px) and (max-height: 1080px) {
  .hero-fastlane-logo {
    width: min(80vw, 1020px);
    max-width: min(86vw, 1120px);
    max-height: min(68vh, 640px);
  }
}

/* Videos page - thumbnail grid + modal player (@5-starfilms) */
.page-videos {
  padding-top: 5rem;
}

.page-videos .section-intro {
  max-width: 46rem;
  margin-inline: auto;
}

.channel-videos-notice {
  max-width: 42rem;
  margin: 1.25rem auto 0;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
}

.channel-videos-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 1.25rem;
}

.channel-videos-loading {
  margin: 0;
  text-align: center;
  color: var(--muted);
  grid-column: 1 / -1;
}

.channel-videos-error {
  margin: 0;
  text-align: center;
  color: var(--muted);
  max-width: 36rem;
  margin-inline: auto;
  grid-column: 1 / -1;
}

.video-tile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
  color: #f4f1ea;
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.video-tile:hover {
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.video-tile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.video-tile-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0a0a0a;
  overflow: hidden;
}

.video-tile-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-tile-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  pointer-events: none;
  transition: background 0.15s ease;
}

.video-tile:hover .video-tile-play {
  background: rgba(0, 0, 0, 0.45);
}

.video-tile-play::after {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent rgba(255, 255, 255, 0.95);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
  margin-left: 4px;
}

.video-tile-caption {
  display: block;
  padding: 0.65rem 0.75rem 0.35rem;
  font-size: 0.92rem;
  line-height: 1.35;
  font-weight: 600;
}

.video-tile-yt {
  display: block;
  padding: 0 0.75rem 0.65rem;
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
}

.video-tile-yt:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Single embed in modal - avoids YouTube error 153 from many simultaneous iframes */
.video-modal[hidden] {
  display: none !important;
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: min(4vh, 2rem) min(3vw, 1rem);
}

.video-modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  cursor: pointer;
}

.video-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(96vw, 960px);
  background: #0c0c0c;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}

.video-modal-close {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.video-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

.video-modal-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-modal-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-page-cta {
  margin-top: 3rem;
  text-align: center;
}

/* - Site + wiki search (see script.js initSiteSearch) - */
.site-search {
  position: relative;
  width: 100%;
}

.site-search__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-search--wiki-hub .site-search__label {
  position: static;
  width: auto;
  height: auto;
  margin: 0 0 0.5rem;
  clip: auto;
  overflow: visible;
  white-space: normal;
  font-family: var(--font-nav);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.header-toolbar-cluster {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  justify-content: flex-end;
}

.header-search-wrap {
  min-width: 0;
  flex: 0 1 14rem;
  max-width: 280px;
}

@media (max-width: 720px) {
  .header-right {
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    row-gap: 0.5rem;
  }

  .header-toolbar-cluster {
    order: -1;
    flex: 1 1 100%;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .header-toolbar-cluster .header-search-wrap {
    flex: 1 1 100%;
    max-width: none;
    margin-top: 0;
  }
}

.site-search__row {
  position: relative;
}

.site-search__input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.32rem 0.45rem 0.65rem;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
}

.site-search__input::placeholder {
  color: rgba(154, 150, 144, 0.85);
}

.site-search__input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Native clear (X) - white icon, hugging the right inner edge of the field */
.site-search__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  width: 1rem;
  height: 1rem;
  margin-right: 0;
  margin-inline-end: 0;
  cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

/* Firefox */
.site-search__input::-moz-search-clear-button {
  -moz-appearance: none;
  appearance: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E")
    center / contain no-repeat;
  border: none;
  width: 1rem;
  height: 1rem;
  margin-right: 0;
  margin-inline-end: 0;
  padding: 0;
  cursor: pointer;
}

.site-search__results {
  position: absolute;
  top: calc(100% + 0.85rem);
  /* Center on the search field; panel is wider than the input so it extends left and right. */
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: min(28rem, calc(100vw - 1.5rem));
  min-width: min(18rem, calc(100vw - 1.5rem));
  z-index: 80;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  max-height: min(70vh, 22rem);
  overflow-y: auto;
  overflow-x: hidden;
  background: rgba(14, 14, 16, 0.98);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 211, 238, 0.42) rgba(255, 255, 255, 0.06);
}

.site-search__results::-webkit-scrollbar {
  width: 9px;
}

.site-search__results::-webkit-scrollbar-track {
  margin: 4px 0;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

.site-search__results::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.45), rgba(14, 116, 144, 0.55));
  border-radius: 6px;
  border: 2px solid rgba(14, 14, 16, 0.85);
  background-clip: padding-box;
}

.site-search__results::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(103, 232, 249, 0.55), rgba(34, 211, 238, 0.45));
  border-color: rgba(14, 14, 16, 0.9);
}

/* Wiki index only: results panel same width as the field, flush under the input (combobox-style). */
.site-search--wiki-hub .site-search__results {
  top: 100%;
  left: 0;
  right: 0;
  transform: none;
  width: 100%;
  min-width: 0;
  max-height: min(78vh, 32rem);
  margin-top: -1px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}

.site-search--wiki-hub:has(.site-search__results:not([hidden])) .site-search__input {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.site-search__hit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.88rem;
}

.site-search__hit:hover,
.site-search__hit:focus-visible {
  background: rgba(34, 211, 238, 0.12);
}

.site-search__hit-title {
  flex: 1;
  min-width: 0;
}

.site-search__hit-meta {
  flex-shrink: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

body:not(.site-admin-session) .site-search__results li.is-wiki-private {
  display: none !important;
}

body:not(.site-admin-session) .site-search__results a.is-wiki-private {
  display: none !important;
}

.site-search__results li.is-unreleased .site-search__hit {
  opacity: 0.52;
  pointer-events: none;
  cursor: default;
}

.site-search__results li.is-unreleased .site-search__hit:hover,
.site-search__results li.is-unreleased .site-search__hit:focus-visible {
  background: transparent;
}

body.site-admin-session .site-search__results li.is-unreleased .site-search__hit {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}

body.site-admin-session .site-search__results li.is-unreleased .site-search__hit:hover,
body.site-admin-session .site-search__results li.is-unreleased .site-search__hit:focus-visible {
  background: rgba(34, 211, 238, 0.12);
}

.site-search__empty {
  padding: 0.5rem 0.75rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.wiki-hub-search {
  margin: 1.25rem 0 2rem;
  max-width: 46rem;
}

/* - Gallery (downloads) - */
.gallery-page .gallery-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

.gallery-hero {
  margin-bottom: 1.5rem;
}

.gallery-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.gallery-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  margin: 0;
}

.gallery-card__thumb-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #0d0d10;
  cursor: pointer;
  aspect-ratio: 16 / 10;
}

.gallery-card__thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.gallery-card__body {
  padding: 1rem 1.1rem 0.75rem;
  flex: 1 1 auto;
}

.gallery-card__title {
  margin: 0;
  font-family: "Now Alt Medium", var(--font-nav);
  font-weight: 400;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
}

.gallery-page #gallery-heading {
  font-family: "Now Alt Medium", var(--font-nav);
  font-weight: 400;
  letter-spacing: 0.06em;
}

.gallery-card__date {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  font-family: var(--font-body);
}

.gallery-card__date time {
  font-weight: 400;
}

.gallery-card__desc {
  margin: 0.4rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.45;
}

.gallery-card__actions {
  padding: 0 1.1rem 1.1rem;
}

.gallery-card__actions .btn {
  width: 100%;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  box-sizing: border-box;
}

.gallery-empty {
  text-align: center;
  padding: 2rem;
}

.gallery-foot-note {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.gallery-foot-note a {
  color: var(--accent);
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.gallery-lightbox[hidden] {
  display: none !important;
}

.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.85);
  cursor: zoom-out;
}

.gallery-lightbox__inner {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1400px);
  max-height: 92vh;
}

.gallery-lightbox__img {
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65);
  cursor: zoom-in;
  transform: translate(0px, 0px) scale(1);
  transform-origin: 50% 50%;
  touch-action: none;
}

.gallery-lightbox.is-zoomed .gallery-lightbox__img {
  cursor: zoom-out;
}

.gallery-lightbox.is-panning .gallery-lightbox__img {
  cursor: grabbing;
}

.gallery-lightbox__close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-lightbox__close:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
}

.gallery-page .gallery-card,
.gallery-page .gallery-hero {
  font-family: "Futura PT", "Futura", "Source Sans 3", system-ui, sans-serif;
}

.gallery-add-panel {
  margin-bottom: 1.75rem;
}

.gallery-add-panel__title {
  margin: 0 0 0.5rem;
  font-family: "Now Alt Medium", var(--font-nav);
  font-weight: 400;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
}

.gallery-upload-key-wrap {
  margin: 1rem 0 0;
}

.gallery-upload-key-note code {
  font-size: 0.85em;
  color: var(--accent-hover);
}

.gallery-add-panel__hint {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.5;
}

.gallery-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 8.5rem;
  padding: 1rem;
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.gallery-dropzone:hover,
.gallery-dropzone:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(34, 211, 238, 0.06);
}

.gallery-dropzone--active {
  border-color: var(--accent);
  background: rgba(34, 211, 238, 0.1);
}

.gallery-file-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.gallery-dropzone__text {
  font-family: var(--font-nav);
  font-size: 1rem;
  color: var(--text);
  text-align: center;
}

.gallery-dropzone__sub {
  font-size: 0.82rem;
  color: var(--muted);
}

.gallery-add-preview {
  display: block;
  max-width: 100%;
  max-height: 10rem;
  margin: 1rem auto 0;
  object-fit: contain;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.gallery-add-fields {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.gallery-add-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.gallery-add-actions .btn {
  width: auto;
}

.gallery-card__badge {
  display: inline-block;
  margin: 0 0 0.35rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.72rem;
  font-family: var(--font-nav);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-hover);
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 4px;
  background: rgba(34, 211, 238, 0.08);
}

.gallery-card--local {
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.12);
}

.gallery-card__actions--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.gallery-card__actions--split .btn {
  width: 100%;
  margin: 0;
}



/* - Tools: index + app showcase pages - */

/* Tools page font overrides */
.page-tools main,
.page-tools .section-intro,
.page-tools .btn {
  font-family: "MADE TOMMY", var(--font-body);
  font-weight: 400;
}

.page-tools .section-title,
.page-tools .tool-card__name,
.page-tools .app-hero__title,
.page-tools .app-block__title {
  font-family: "MADE TOMMY", var(--font-header);
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* - Tools index - */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

.tool-card {
  --tool-accent: var(--accent);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  background: var(--bg-elevated);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover,
.tool-card:focus-visible {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--tool-accent) 55%, transparent);
  box-shadow: 0 18px 40px -24px color-mix(in srgb, var(--tool-accent) 70%, transparent);
}

.tool-card--clip-manager {
  --tool-accent: #2dd4bf;
}

.tool-card--anim-lab {
  --tool-accent: #4ade4a;
}

.tool-card__banner {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 6;
  object-fit: cover;
  background: #0b0f18;
}

.tool-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.35rem 1.35rem 1.5rem;
  flex: 1;
}

.tool-card__head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.tool-card__icon {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.tool-card__name {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.15;
}

.tool-card__pitch {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
}

.tool-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-card__meta li {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.22rem 0.65rem;
}

.tool-card__go {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.3rem;
  font-weight: 600;
  color: var(--tool-accent);
  transition: gap 0.2s ease;
}

.tool-card:hover .tool-card__go {
  gap: 0.75rem;
}

.tool-card__go::after {
  content: "\2192";
}

.tools-note {
  margin: 2.25rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* - App showcase pages - */

.app-page {
  --app-accent: var(--accent);
  --app-accent-hover: var(--accent-hover);
  --app-ink: #06110f;
  --app-glow: rgba(45, 212, 191, 0.22);
}

.app-page--clip-manager {
  --app-accent: #2dd4bf;
  --app-accent-hover: #6ee7d7;
  --app-ink: #04201c;
  --app-glow: rgba(45, 212, 191, 0.24);
}

.app-page--anim-lab {
  --app-accent: #4ade4a;
  --app-accent-hover: #86ef7a;
  --app-ink: #06220a;
  --app-glow: rgba(74, 222, 74, 0.22);
}

/* Hero art is cropped to the viewport, never allowed to widen the page. */
.app-page main {
  overflow-x: clip;
}

.btn-app {
  background: var(--app-accent);
  color: var(--app-ink);
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 30px -14px var(--app-accent);
}

.btn-app:hover,
.btn-app:focus-visible {
  background: var(--app-accent-hover);
  color: var(--app-ink);
}

.btn-app--lg {
  padding: 0.95rem 1.9rem;
  font-size: 1.05rem;
}

/* Hero */

.app-hero {
  position: relative;
  isolation: isolate;
  border-bottom: 1px solid var(--border);
  background: #07080a;
}

.app-hero__backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.app-hero__backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.38;
  /* Softened so the banner's own wordmark sits behind the headline instead of
     competing with it; the scale hides the blur fringe at the edges. */
  filter: saturate(1.1) blur(2px);
  transform: scale(1.05);
}

.app-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(90% 120% at 15% 10%, var(--app-glow) 0%, transparent 60%),
    linear-gradient(180deg, rgba(7, 8, 10, 0.55) 0%, rgba(7, 8, 10, 0.86) 55%, var(--bg) 100%);
}

.app-hero__inner {
  padding: 4rem 0 3.5rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1.25rem 2rem;
}

.app-hero__icon {
  width: clamp(88px, 14vw, 148px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.65));
}

.app-hero__text {
  min-width: 0;
}

.app-hero__eyebrow {
  margin: 0 0 0.5rem;
  font-family: var(--font-nav);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--app-accent);
}

.app-hero__title {
  margin: 0 0 0.6rem;
  font-size: clamp(2.1rem, 5vw + 0.5rem, 3.6rem);
  line-height: 1.02;
}

.app-hero__pitch {
  margin: 0 0 1.4rem;
  max-width: 54ch;
  color: var(--text);
  font-size: clamp(1rem, 0.5vw + 0.9rem, 1.15rem);
  line-height: 1.6;
}

.app-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
}

.app-badge--accent {
  color: var(--app-accent);
  border-color: color-mix(in srgb, var(--app-accent) 45%, transparent);
  background: color-mix(in srgb, var(--app-accent) 10%, transparent);
}

.app-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.app-hero__aside {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* Spec strip */

.app-specs {
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.app-specs__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  background: var(--border);
  border-inline: 1px solid var(--border);
}

.app-specs__item {
  background: var(--bg-elevated);
  padding: 1.1rem 1.25rem;
}

.app-specs__item dt {
  margin: 0 0 0.3rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.app-specs__item dd {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

/* Section headings inside an app page */

.app-block__title {
  margin: 0 0 0.6rem;
  font-size: clamp(1.6rem, 2vw + 1rem, 2.4rem);
  line-height: 1.1;
}

.app-block__title::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-bottom: 0.9rem;
  border-radius: 2px;
  background: var(--app-accent);
}

.app-block__intro {
  margin: 0 0 2.25rem;
  max-width: 60ch;
  color: var(--muted);
  line-height: 1.6;
}

/* Features */

.app-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-feature {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  padding: 1.25rem 1.3rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.app-feature:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--app-accent) 40%, transparent);
}

.app-feature__title {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0 0 0.45rem;
  font-family: var(--font-nav);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
}

.app-feature__num {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
  color: var(--app-accent);
}

.app-feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Screenshots */

.app-shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 1.5rem;
  align-items: start;
}

.app-shot {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  background: #0b0b0d;
}

/* A tall screenshot would dwarf the others at full column width. */
.app-shot--portrait {
  max-width: 640px;
  margin-inline: auto;
}

.app-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.app-shot figcaption {
  padding: 0.85rem 1.1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Reviews */

.app-rating {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.9rem;
  margin: 0 0 2rem;
}

.app-rating__score {
  font-family: var(--font-display);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--app-accent);
}

.app-rating__stars {
  letter-spacing: 0.12em;
  color: var(--app-accent);
}

.app-rating__count {
  color: var(--muted);
  font-size: 0.92rem;
}

.app-quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
  align-items: start;
}

.app-quote {
  margin: 0;
  border: 1px solid var(--border);
  border-left: 3px solid var(--app-accent);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  padding: 1.3rem 1.35rem 1.1rem;
}

.app-quote blockquote {
  margin: 0 0 0.85rem;
  color: var(--text);
  line-height: 1.6;
}

.app-quote figcaption {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

/* Closing CTA */

.app-closing {
  text-align: center;
  border: 1px solid color-mix(in srgb, var(--app-accent) 28%, var(--border));
  border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(120% 140% at 50% 0%, var(--app-glow) 0%, transparent 65%),
    var(--bg-elevated);
  padding: 3rem 1.5rem;
}

.app-closing__title {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw + 1rem, 2.8rem);
  letter-spacing: 0.04em;
}

.app-closing p {
  margin: 0 auto 1.75rem;
  max-width: 48ch;
  color: var(--muted);
  line-height: 1.6;
}

.app-backlink {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 2.25rem 0 0;
  color: var(--muted);
  font-family: var(--font-nav);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.app-backlink:hover {
  color: var(--app-accent);
}

.app-backlink::before {
  content: "\2190";
}

@media (max-width: 720px) {
  .app-hero__inner {
    grid-template-columns: minmax(0, 1fr);
    padding: 2.75rem 0 2.5rem;
    gap: 1rem;
  }

  .app-hero__icon {
    width: 76px;
  }

  .app-hero__actions .btn {
    width: 100%;
  }

  .app-specs__list {
    border-inline: 0;
  }

  .app-closing {
    padding: 2.25rem 1.1rem;
  }
}
