/* ---------- layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

.stack {
  display: flex;
  flex-direction: column;
}

.section {
  padding-block: var(--sp-7);
}

.section--tight {
  padding-block: var(--sp-5);
}

.section--rule {
  border-top: var(--border);
}

/* ---------- typography helpers ---------- */
.display {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: var(--fs-display);
  line-height: 1.08;
  letter-spacing: -0.5px;
  text-wrap: balance;
}

.h1 {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: var(--fs-h1);
  line-height: 1.12;
  text-wrap: balance;
}

.h2 {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: var(--fs-h2);
  line-height: 1.14;
  text-wrap: balance;
}

.h3 {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: var(--fs-h3);
  line-height: 1.18;
}

.mono {
  font-family: var(--ff-mono);
  font-size: var(--fs-label-md);
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.kicker {
  font-family: var(--ff-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--violet);
}

.muted {
  color: var(--on-surface-variant);
}

.deck {
  font-size: var(--fs-body-lg);
  line-height: 1.5;
  color: var(--on-surface-variant);
  text-wrap: pretty;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--white);
  border-bottom: var(--border);
}

.header-top {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}

.brand__name {
  font-family: var(--ff-display);
  font-size: 30px;
  line-height: 1;
  color: var(--violet);
  letter-spacing: -0.5px;
}

.brand__name span {
  color: var(--magenta);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: var(--border);
  border-radius: var(--r-pill);
  background: var(--white);
  transition: background var(--t-state), transform var(--t-state);
}

.icon-btn:hover {
  background: var(--volt);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.icon-btn--sm {
  width: 34px;
  height: 34px;
}

.icon-btn--sm svg {
  width: 16px;
  height: 16px;
}

/* edition */
.edition {
  position: relative;
}

.edition__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border: var(--border);
  border-radius: var(--r-pill);
  background: var(--white);
  font-size: var(--fs-label-lg);
  font-weight: 700;
  white-space: nowrap;
  transition: background var(--t-state);
}

.edition__btn:hover {
  background: var(--surface);
}

.edition__btn svg {
  width: 14px;
  height: 14px;
}

.edition__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 190px;
  padding: 6px;
  background: var(--white);
  border: var(--border);
  border-radius: var(--r-lg);
  display: none;
  z-index: 70;
}

.edition__menu.is-open {
  display: block;
}

.edition__menu button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  font-size: var(--fs-label-lg);
  font-weight: 700;
  text-align: left;
}

.edition__menu button:hover {
  background: var(--surface);
}

.edition__menu button[aria-current="true"] {
  background: var(--volt);
}

/* nav */
.nav-bar {
  background: var(--white);
}

.nav-bar__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 52px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-bar__inner::-webkit-scrollbar {
  display: none;
}

.nav-link {
  flex: 0 0 auto;
  padding: 7px 14px;
  border: 2px solid transparent;
  border-radius: var(--r-pill);
  font-size: var(--fs-label-lg);
  font-weight: 700;
  white-space: nowrap;
  transition: background var(--t-state), border-color var(--t-state);
}

.nav-link:hover {
  background: var(--surface);
}

.nav-link[aria-current="page"] {
  background: var(--volt);
  border-color: var(--ink);
}

.nav-all {
  margin-left: auto;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: var(--border);
  border-radius: var(--r-pill);
  background: var(--white);
  font-size: var(--fs-label-lg);
  font-weight: 700;
}

.nav-all:hover {
  background: var(--surface);
}

.nav-all svg {
  width: 14px;
  height: 14px;
}

.nav-toggle {
  display: none;
}

.site-header.is-stuck {
  box-shadow: 0 2px 0 0 var(--ink);
}

/* ---------- buttons ---------- */
.btn {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 40px;
  padding: 9px 20px;
  border: var(--border);
  border-radius: var(--r-pill);
  background: var(--white);
  font-size: var(--fs-label-lg);
  font-weight: 700;
  white-space: nowrap;
  transition: background var(--t-state), color var(--t-state), transform var(--t-state);
}

.btn:hover {
  background: var(--volt);
}

.btn--primary {
  background: var(--violet);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--violet-container);
  color: var(--white);
}

.btn--magenta {
  background: var(--magenta);
  color: var(--white);
}

.btn--magenta:hover {
  background: var(--magenta-container);
  color: var(--white);
}

.btn--volt {
  background: var(--volt);
  color: var(--ink);
}

.btn--sm {
  min-height: 34px;
  padding: 6px 14px;
  font-size: var(--fs-label-md);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn[aria-pressed="true"] {
  background: var(--volt);
}

/* ---------- chips + badges ---------- */
.chip {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: var(--border);
  border-radius: var(--r-pill);
  background: var(--white);
  font-size: var(--fs-label-md);
  font-weight: 700;
  white-space: nowrap;
  transition: background var(--t-state);
}

.chip:hover {
  background: var(--surface);
}

.chip[aria-pressed="true"] {
  background: var(--volt);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border: 2px solid var(--ink);
  border-radius: var(--r-pill);
  font-family: var(--ff-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  line-height: 1.4;
}

.badge--live {
  background: var(--magenta);
  color: var(--white);
}

.badge--live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--volt);
}

.badge--volt {
  background: var(--volt);
  color: var(--ink);
}

.badge--violet {
  background: var(--violet);
  color: var(--white);
}

.badge--teal {
  background: var(--teal);
  color: var(--white);
}

.badge--brand {
  background: var(--ink);
  color: var(--white);
}

/* ---------- ticker ---------- */
.ticker {
  background: var(--volt);
  border-bottom: var(--border);
  overflow: hidden;
}

.ticker__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  height: 36px;
}

.ticker__label {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-right: var(--sp-4);
  margin-right: var(--sp-4);
  border-right: var(--border);
  height: 100%;
  background: var(--volt);
}

.ticker__viewport {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.ticker__track {
  display: flex;
  flex: 0 0 auto;
  gap: var(--sp-6);
  width: max-content;
  white-space: nowrap;
  animation: ticker 40s linear infinite;
}

.ticker__track:hover {
  animation-play-state: paused;
}

.ticker__item {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.ticker__item::before {
  content: "◆";
  font-size: 8px;
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* ---------- section headings ---------- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
  flex-wrap: wrap;
}

.section-head__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-head__title {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: var(--fs-h2);
  line-height: 1.1;
}

.section-head__link {
  font-size: var(--fs-label-lg);
  font-weight: 700;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 2px;
}

.section-head__link:hover {
  background: var(--volt);
}

/* ---------- cards ---------- */
.card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: transform var(--t-enter), box-shadow var(--t-enter);
}

a.card:hover,
a.card:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: var(--elevation);
}

.card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  border-bottom: var(--border);
  background: var(--surface);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__tags {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: var(--sp-4);
  flex: 1;
}

.card__title {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: var(--fs-h3);
  line-height: 1.16;
  text-wrap: balance;
}

.card--sm .card__title {
  font-size: var(--fs-title-lg);
  line-height: 1.2;
}

.card__deck {
  font-size: var(--fs-body-md);
  color: var(--on-surface-variant);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

.card--hero .card__media {
  aspect-ratio: 16 / 10;
}

.card--hero .card__title {
  font-size: var(--fs-h1);
}

.card--hero .card__body {
  padding: var(--sp-5);
  gap: var(--sp-3);
}

/* compact row item */
.row-item {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-top: 2px solid var(--ink);
  align-items: start;
}

.row-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.row-item__thumb {
  aspect-ratio: 16 / 10;
  border: var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
}

.row-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.row-item__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.row-item__title {
  font-family: var(--ff-display);
  font-size: var(--fs-title-lg);
  line-height: 1.18;
}

.row-item:hover .row-item__title {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* numbered list */
.num-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: var(--sp-2);
  padding: var(--sp-3) 0;
  border-top: 1px solid var(--outline-variant);
  align-items: start;
}

.num-item:first-child {
  border-top: 0;
}

.num-item__n {
  font-family: var(--ff-display);
  font-size: 26px;
  line-height: 1;
  color: var(--violet);
}

.num-item__title {
  font-size: var(--fs-title-md);
  font-weight: 700;
  line-height: 1.25;
}

/* ---------- carousel ---------- */
.carousel {
  position: relative;
}

.carousel__track {
  display: flex;
  gap: var(--sp-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: var(--sp-2);
  scrollbar-width: none;
}

.carousel__track::-webkit-scrollbar {
  display: none;
}

.carousel__item {
  flex: 0 0 clamp(160px, 18vw, 200px);
  scroll-snap-align: start;
}

.carousel__controls {
  display: flex;
  gap: 8px;
}

.carousel__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* short card */
.short-card {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  border: var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
}

.short-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: transform var(--t-enter);
}

.short-card:hover img {
  transform: scale(1.04);
}

.short-card__grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(29, 26, 36, 0) 35%, rgba(29, 26, 36, 0.9) 100%);
}

.short-card__body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.short-card__title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pill-duration {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--white);
  color: var(--ink);
  font-family: var(--ff-mono);
  font-size: 10px;
  font-weight: 600;
}

.pill-duration svg {
  width: 10px;
  height: 10px;
}

/* ---------- overlays ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  background: rgba(29, 26, 36, 0.55);
  padding: 72px var(--page-pad) 24px;
}

.overlay.is-open {
  display: block;
}

.overlay__panel {
  max-width: 760px;
  margin: 0 auto;
  background: var(--white);
  border: var(--border);
  border-radius: var(--r-2xl);
  padding: var(--sp-5);
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.overlay__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}

.search-field {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0 16px;
  height: 56px;
  border: var(--border);
  border-radius: var(--r-pill);
  background: var(--surface-low);
}

.search-field svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font-family: var(--ff-body);
  font-size: var(--fs-body-lg);
  font-weight: 500;
  color: var(--ink);
  outline: none;
}

.search-results {
  margin-top: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.search-result {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--r-md);
}

.search-result:hover,
.search-result:focus-visible {
  background: var(--surface);
}

.search-result__title {
  font-weight: 700;
  font-size: var(--fs-body-md);
}

.search-result__meta {
  font-family: var(--ff-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--on-surface-variant);
}

/* all-directory sheet */
.dir {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 90;
  background: var(--canvas);
  border-top: var(--border);
  display: none;
  overflow: auto;
}

.dir.is-open {
  display: block;
}

.dir__inner {
  padding-top: var(--sp-5);
  padding-bottom: var(--sp-8);
}

.dir__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
}

.dir__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-5);
}

.dir__group h3 {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--magenta);
  padding-bottom: 6px;
  border-bottom: var(--border);
  margin-bottom: 10px;
}

.dir__group li a {
  display: block;
  padding: 7px 0;
  font-size: var(--fs-label-lg);
  font-weight: 700;
}

.dir__group li a:hover {
  color: var(--violet);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* ---------- footer ---------- */
.site-footer {
  margin-top: var(--sp-8);
  border-top: var(--border);
  background: var(--white);
  padding-bottom: 88px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1fr;
  gap: var(--sp-6);
  padding: var(--sp-6) 0;
}

.footer-col h3 {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
  color: var(--magenta);
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 var(--sp-4);
}

.footer-links a {
  display: block;
  padding: 5px 0;
  font-size: var(--fs-body-sm);
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--violet);
  text-decoration: underline;
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--sp-3);
}

.social-pill {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: var(--border);
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
  background: var(--white);
}

.social-pill:hover {
  background: var(--volt);
}

.app-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.app-pill svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.app-pill {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: var(--border);
  border-radius: var(--r-md);
  background: var(--ink);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
}

.footer-bottom {
  border-top: var(--border);
  padding: var(--sp-4) 0 var(--sp-5);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 12px;
  font-weight: 600;
}

.legal-links a:hover {
  text-decoration: underline;
}

.notice {
  font-size: 11px;
  color: var(--on-surface-variant);
  max-width: 520px;
}

/* ---------- ad slot ---------- */
.ad {
  display: grid;
  place-items: center;
  gap: 4px;
  padding: var(--sp-4);
  border: 2px dashed var(--outline-variant);
  border-radius: var(--r-md);
  background: repeating-linear-gradient(45deg, var(--surface-low) 0 10px, var(--white) 10px 20px);
  color: var(--outline);
  text-align: center;
}

.ad__label {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.ad--leaderboard {
  min-height: 100px;
  margin: var(--sp-4) 0;
}

.ad--rail {
  min-height: 260px;
}

.ad--inline {
  min-height: 120px;
  margin: var(--sp-5) 0;
}

/* ---------- bottom nav (mobile) ---------- */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: none;
  background: var(--white);
  border-top: var(--border);
  padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom));
}

.bottom-nav__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 520px;
  margin: 0 auto;
}

.bottom-nav a,
.bottom-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 0;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--r-md);
}

.bottom-nav svg {
  width: 20px;
  height: 20px;
}

.bottom-nav a:hover,
.bottom-nav button:hover {
  background: var(--surface);
}

.bottom-nav [aria-current="page"] {
  background: var(--volt);
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translate(-50%, 20px);
  z-index: 150;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--r-pill);
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-enter), transform var(--t-enter);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

body.no-scroll {
  overflow: hidden;
}

@media (max-width: 1023px) {
  .dir__grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-col:last-child {
    grid-column: 1 / -1;
    padding-top: var(--sp-4);
    border-top: 1px solid var(--outline-variant);
  }
}

@media (max-width: 719px) {
  .header-top {
    height: 58px;
  }

  .edition {
    display: none;
  }

  .brand__name {
    font-size: 26px;
  }

  .nav-bar {
    display: none;
  }

  .dir {
    inset: 58px 0 0 0;
  }

  .header-cta {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .dir__grid {
    grid-template-columns: 1fr;
  }

  .bottom-nav {
    display: block;
  }

  .site-footer {
    padding-bottom: 96px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-5);
  }

  .footer-links {
    grid-template-columns: 1fr 1fr;
  }

  .overlay {
    padding: 12px;
  }

  .overlay__panel {
    padding: var(--sp-4);
    border-radius: var(--r-xl);
  }

  .row-item {
    grid-template-columns: 104px 1fr;
  }

  .toast {
    bottom: 84px;
  }
}
