/*
 * Liverpool Rummy website styles (docs/WEBSITE.md). The look follows the app (D-129, UI_SPEC.md §5): an indigo night with
 * a faint suit scatter, solid white panels, glossy candy buttons, and gold highlights. Colors are the app's palette
 * (application/mobile/lib/theme/palette.dart); every text pair is at least 4.5:1.
 */

@font-face {
  font-family: "Fredoka";
  src: url("/font/Fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("/font/Nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

/* Suit symbols in text (♠ ♥ ♦ ♣): Nunito and Fredoka have none (B-078). */
@font-face {
  font-family: "Suits";
  src: url("/font/NotoSansSymbols2-Suits.woff2") format("woff2");
  unicode-range: U+2660, U+2663, U+2665, U+2666;
  font-display: swap;
}

:root {
  --night-top: #2a1663;
  --night-bottom: #4b23a8;
  --glow: #8c5cff;
  --ink: #2a1660;
  --ink-muted: #6b5e91;
  --panel-edge: #dcd3f7;
  --field-fill: #f3effd;
  --gold: #ffc83d;
  --on-night: #ffffff;
  --on-night-muted: #d7ccf5;
  --card-red: #e0284f;
  --card-red-text: #c41e45;

  --sun-top: #ffd84d;
  --sun-bottom: #ffb21e;
  --sun-bevel: #d9840b;
  --grape-top: #7b4cf5;
  --grape-bottom: #5a2bd8;
  --grape-bevel: #3e1a9e;
  --mint-top: #11884f;
  --mint-bottom: #0e7a44;
  --mint-bevel: #09552f;
  --berry-top: #d6335f;
  --berry-bottom: #b5194a;
  --berry-bevel: #7e0f33;
  --sky-top: #1976d2;
  --sky-bottom: #125aae;
  --sky-bevel: #0b3e7d;

  --font-display: "Fredoka", "Suits", "Trebuchet MS", Arial, sans-serif;
  --font-text: "Nunito", "Suits", "Segoe UI", Arial, sans-serif;
  --radius-panel: 20px;
  --radius-button: 18px;
  --gutter: 16px;
  --content-width: 1120px;

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--on-night);
  background-color: var(--night-top);
  background-image:
    url("/image/suit-pattern.svg"),
    radial-gradient(ellipse 90% 520px at 50% 0, rgba(140, 92, 255, 0.35), rgba(140, 92, 255, 0)),
    linear-gradient(180deg, var(--night-top) 0, var(--night-bottom) 1400px, var(--night-bottom) 100%);
  background-repeat: repeat, no-repeat, no-repeat;
  background-size:
    288px 288px,
    100% 100%,
    100% 100%;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

a:hover {
  text-decoration-thickness: 3px;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
}

.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.narrow {
  max-width: 820px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Maintenance banner ---------- */

/* Fixed to the bottom of the screen: it appears after the status request, so in the page flow it would push the page
   down while the visitor reads. */
.maintenance-banner {
  position: fixed;
  z-index: 50;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 -8px 24px rgba(10, 4, 40, 0.35);
}

.maintenance-close {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.maintenance-close svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.maintenance-banner.maintenance-active {
  background: var(--berry-bottom);
  color: var(--on-night);
}

.maintenance-banner-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.maintenance-banner p {
  margin: 0;
}

.maintenance-icon {
  flex: none;
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* ---------- Header ---------- */

.site-header {
  position: relative;
  z-index: 10;
}

.site-header-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--on-night);
  text-decoration: none;
  min-height: 44px;
}

.brand-mark {
  width: 54px;
  height: 36px;
  overflow: visible;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.2px;
  text-shadow: 0 2px 0 var(--ink);
}

.site-navigation {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-left: auto;
}

.site-navigation ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-navigation ul a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--on-night);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

.site-navigation ul a:hover,
.site-navigation ul a[aria-current="page"] {
  border-bottom-color: var(--gold);
}

.menu-button {
  display: none;
  width: 48px;
  height: 48px;
  margin-left: auto;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.menu-button-bars,
.menu-button-bars::before,
.menu-button-bars::after {
  display: block;
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: var(--on-night);
  transition: transform 160ms ease;
}

.menu-button-bars {
  position: relative;
}

.menu-button-bars::before,
.menu-button-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-button-bars::before {
  top: -7px;
}

.menu-button-bars::after {
  top: 7px;
}

.menu-open .menu-button-bars {
  background: transparent;
}

.menu-open .menu-button-bars::before {
  transform: translateY(7px) rotate(45deg);
}

.menu-open .menu-button-bars::after {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 859px) {
  .has-menu .menu-button:not([hidden]) {
    display: inline-flex;
  }

  .has-menu .site-navigation {
    display: none;
    width: 100%;
    margin: 0;
    padding: 12px 16px 16px;
    border-radius: var(--radius-panel);
    background: var(--night-top);
    box-shadow: 0 18px 40px rgba(10, 4, 40, 0.45);
    flex-direction: column;
    align-items: stretch;
  }

  .has-menu.menu-open .site-navigation {
    display: flex;
  }

  .has-menu .site-navigation ul {
    flex-direction: column;
  }

  .has-menu .site-navigation .candy-button {
    width: 100%;
  }
}

/* ---------- Candy buttons (lib/widget/candy_button.dart) ---------- */

.candy-button {
  --candy-top: var(--sun-top);
  --candy-bottom: var(--sun-bottom);
  --candy-bevel: var(--sun-bevel);
  --candy-label: var(--ink);
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 22px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-button);
  background: linear-gradient(180deg, var(--candy-top), var(--candy-bottom));
  box-shadow:
    0 4px 0 var(--candy-bevel),
    0 8px 14px rgba(0, 0, 0, 0.28);
  color: var(--candy-label);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 80ms ease,
    box-shadow 80ms ease;
}

/* The gloss: a soft white band across the upper part of the face, under the label. */
.candy-button::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 4px;
  right: 4px;
  top: 3px;
  height: 36%;
  border-radius: calc(var(--radius-button) - 4px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.04));
  pointer-events: none;
}

.candy-button:hover {
  filter: brightness(1.05);
}

.candy-button:active {
  transform: translateY(3px);
  box-shadow:
    0 1px 0 var(--candy-bevel),
    0 3px 6px rgba(0, 0, 0, 0.28);
}

.candy-button:disabled {
  cursor: progress;
  filter: saturate(0.6);
}

.candy-grape {
  --candy-top: var(--grape-top);
  --candy-bottom: var(--grape-bottom);
  --candy-bevel: var(--grape-bevel);
  --candy-label: #ffffff;
}

.candy-mint {
  --candy-top: var(--mint-top);
  --candy-bottom: var(--mint-bottom);
  --candy-bevel: var(--mint-bevel);
  --candy-label: #ffffff;
}

.candy-berry {
  --candy-top: var(--berry-top);
  --candy-bottom: var(--berry-bottom);
  --candy-bevel: var(--berry-bevel);
  --candy-label: #ffffff;
}

.candy-sky {
  --candy-top: var(--sky-top);
  --candy-bottom: var(--sky-bottom);
  --candy-bevel: var(--sky-bevel);
  --candy-label: #ffffff;
}

.candy-small {
  min-height: 44px;
  padding: 0 16px;
  font-size: 1rem;
}

.candy-wide {
  width: 100%;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 24px 0 0;
}

.button-row-center {
  justify-content: center;
}

/* ---------- Panels and shared pieces ---------- */

.panel {
  position: relative;
  background: #ffffff;
  color: var(--ink);
  border-radius: var(--radius-panel);
  box-shadow:
    0 5px 0 var(--panel-edge),
    0 18px 40px rgba(10, 4, 40, 0.35);
  padding: 24px;
}

.panel a {
  color: var(--grape-bottom);
}

.panel a.candy-button {
  color: var(--candy-label);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.chip {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--on-night);
  font-weight: 700;
  font-size: 0.9rem;
}

.chip-gold {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

.mini-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 40px;
  padding: 0 4px;
  border-radius: 6px;
  background: #ffffff;
  border: 1.5px solid var(--panel-edge);
  box-shadow: 0 2px 0 var(--panel-edge);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1;
  white-space: nowrap;
}

.mini-card.red {
  color: var(--card-red-text);
}

.ribbon {
  position: relative;
  display: inline-block;
  margin: 0 auto 18px;
  padding: 8px 34px 10px;
  background: linear-gradient(180deg, var(--sun-top), var(--sun-bottom));
  border: 2.5px solid var(--sun-bevel);
  border-radius: 8px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* ---------- Hero ---------- */

.hero {
  padding: 24px 0 56px;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  gap: 40px;
  align-items: center;
}

.hero-logo .logo {
  width: min(360px, 88%);
  height: auto;
  margin: 0 0 12px -6px;
  overflow: visible;
  filter: drop-shadow(0 12px 24px rgba(10, 4, 40, 0.35));
}

.hero-title {
  font-size: clamp(2rem, 6.2vw, 3.4rem);
  font-weight: 700;
  text-shadow: 0 3px 0 var(--ink);
  margin-bottom: 16px;
}

.highlight {
  color: var(--gold);
}

.hero-lead {
  max-width: 34em;
  color: var(--on-night-muted);
  font-size: 1.15rem;
}

.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 10px 0;
}

.phone {
  position: relative;
  margin: 0;
  width: min(270px, 74vw);
  padding: 10px;
  border-radius: 44px;
  background: linear-gradient(150deg, #22124f, #0f0728 60%, #1d0f45);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.16),
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 30px 60px rgba(8, 2, 30, 0.55);
}

/* The dynamic island; the screenshots are cropped below the status bar. */
.phone::after {
  content: "";
  position: absolute;
  top: 19px;
  left: 50%;
  width: 30%;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #07031a;
}

/* A strip for the status bar and the island above the cropped screenshot, in the screenshot's top color. */
.phone-screen {
  overflow: hidden;
  border-radius: 34px;
  padding-top: 34px;
  background: #2b1766;
}

.phone-screen img {
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 1210;
  object-fit: cover;
  object-position: center bottom;
}

.phone-hero {
  width: min(300px, 78vw);
  transform: rotate(3deg);
}

.floating-card {
  position: absolute;
  z-index: 1;
  width: 92px;
  height: 128px;
  padding: 10px;
  border-radius: 12px;
  background: #ffffff;
  border: 3px solid var(--night-bottom);
  box-shadow: 0 16px 30px rgba(8, 2, 30, 0.45);
}

.floating-card svg {
  width: 52px;
  height: 52px;
  margin: 10px auto 0;
}

.floating-card-rank {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1;
}

.floating-card-left {
  left: max(0px, calc(50% - 230px));
  top: 18%;
  transform: rotate(-14deg);
  animation: float-left 7s ease-in-out infinite;
}

.floating-card-right {
  right: max(0px, calc(50% - 230px));
  bottom: 12%;
  transform: rotate(12deg);
  animation: float-right 8s ease-in-out infinite;
}

.card-red {
  color: var(--card-red-text);
}

.card-black {
  color: var(--ink);
}

.card-red-fill {
  fill: var(--card-red);
}

.card-black-fill {
  fill: var(--ink);
}

@keyframes float-left {
  0%,
  100% {
    transform: rotate(-14deg) translateY(0);
  }
  50% {
    transform: rotate(-10deg) translateY(-12px);
  }
}

@keyframes float-right {
  0%,
  100% {
    transform: rotate(12deg) translateY(0);
  }
  50% {
    transform: rotate(16deg) translateY(-10px);
  }
}

@media (min-width: 900px) {
  .hero {
    padding: 40px 0 80px;
  }

  .hero-inner {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 56px;
  }
}

@media (max-width: 420px) {
  .site-header-inner {
    column-gap: 10px;
  }

  .brand-mark {
    width: 45px;
    height: 30px;
  }

  .brand-name {
    font-size: 1.15rem;
  }

  .floating-card {
    width: 70px;
    height: 98px;
    padding: 7px;
  }

  .floating-card svg {
    width: 38px;
    height: 38px;
  }

  .button-row .candy-button {
    flex: 1 1 100%;
  }
}

/* ---------- Countdown ---------- */

.countdown-section {
  margin-top: -12px;
  margin-bottom: 24px;
}

.countdown-panel {
  max-width: 760px;
  margin: 0 auto;
  padding-top: 28px;
  text-align: center;
}

.countdown-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.countdown-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 4px 10px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--night-top), var(--night-bottom));
  color: var(--on-night-muted);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.25);
}

.countdown-number {
  color: var(--on-night);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 8vw, 3rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.countdown-caption {
  margin: 16px 0 0;
  color: var(--ink-muted);
  font-weight: 700;
}

.countdown-live .countdown-caption {
  color: var(--ink);
  font-size: 1.15rem;
}

/* ---------- Sections ---------- */

.section {
  padding: 48px 0;
}

.section-heading {
  max-width: 720px;
  margin: 0 auto 32px;
  text-align: center;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  text-shadow: 0 2px 0 var(--ink);
}

.section-heading p:not(.eyebrow) {
  color: var(--on-night-muted);
}

.section-link {
  margin: 28px 0 0;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
}

/* Six contracts as playing-card tiles. */
.contract-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contract-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 20px 22px;
  border-radius: 18px;
  background: #ffffff;
  color: var(--ink);
  border: 3px solid var(--night-bottom);
  box-shadow:
    0 5px 0 var(--panel-edge),
    0 18px 36px rgba(10, 4, 40, 0.35);
  transition: transform 160ms ease;
}

.contract-card:hover {
  transform: translateY(-4px) rotate(-0.6deg);
}

.contract-number {
  color: var(--ink-muted);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.contract-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.15;
}

.contract-note {
  color: var(--ink-muted);
  font-weight: 700;
  font-size: 0.95rem;
}

.contract-card-final {
  border-color: var(--sun-bevel);
  background: linear-gradient(180deg, #fff8e1, #ffffff 45%);
}

.meld-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 10px;
}

.meld {
  display: inline-flex;
}

.meld .mini-card + .mini-card {
  margin-left: -6px;
}

/* Features */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature h3 {
  font-size: 1.35rem;
  margin-top: 14px;
}

.feature p {
  margin: 0;
  color: var(--ink-muted);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.2);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
  fill: #ffffff;
}

.feature-icon-sun {
  background: linear-gradient(180deg, var(--sun-top), var(--sun-bottom));
}

.feature-icon-sun svg {
  fill: var(--ink);
}

.feature-icon-grape {
  background: linear-gradient(180deg, var(--grape-top), var(--grape-bottom));
}

.feature-icon-mint {
  background: linear-gradient(180deg, var(--mint-top), var(--mint-bottom));
}

.feature-icon-berry {
  background: linear-gradient(180deg, var(--berry-top), var(--berry-bottom));
}

.feature-icon-sky {
  background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom));
}

.feature-icon-gold {
  background: linear-gradient(180deg, var(--night-top), var(--night-bottom));
}

.feature-icon-gold svg {
  fill: var(--gold);
}

/* Screenshot gallery: a swipeable row on phones, three across on wide screens. */
.screen-gallery {
  display: flex;
  gap: 28px;
  margin: 0 calc(-1 * var(--gutter));
  padding: 8px var(--gutter) 24px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.screen-gallery li {
  flex: none;
  scroll-snap-align: center;
}

.screen-gallery .phone {
  width: 250px;
}

.screen-figure {
  margin: 0;
}

.screen-gallery figcaption {
  margin-top: 18px;
  color: var(--on-night-muted);
  font-weight: 700;
  text-align: center;
}

@media (min-width: 900px) {
  .screen-gallery {
    justify-content: center;
    overflow: visible;
  }

  .screen-gallery li:nth-child(1) {
    transform: rotate(-3deg) translateY(16px);
  }

  .screen-gallery li:nth-child(3) {
    transform: rotate(3deg) translateY(16px);
  }
}

.call-panel {
  max-width: 820px;
  margin: 0 auto;
  padding: 36px 24px;
  text-align: center;
  overflow: hidden;
}

.call-panel h2 {
  font-size: clamp(1.6rem, 4.6vw, 2.2rem);
}

.call-panel p {
  max-width: 36em;
  margin: 0 auto;
  color: var(--ink-muted);
}

/* ---------- Inner pages ---------- */

.page-intro {
  padding: 28px 0 32px;
  text-align: center;
}

.page-title {
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  font-weight: 700;
  text-shadow: 0 3px 0 var(--ink);
}

.page-lead {
  max-width: 36em;
  margin: 0 auto;
  color: var(--on-night-muted);
  font-size: 1.15rem;
}

.prose h2 {
  font-size: 1.5rem;
  margin-top: 1.4em;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 6px;
}

.narrow > .panel + .panel {
  margin-top: 24px;
}

.step-list {
  counter-reset: step;
  list-style: none;
  padding-left: 0 !important;
}

.step-list li {
  position: relative;
  padding-left: 46px;
  min-height: 34px;
  counter-increment: step;
}

.step-list li + li {
  margin-top: 12px;
}

.step-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -1px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--sun-top), var(--sun-bottom));
  box-shadow: 0 2px 0 var(--sun-bevel);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
}

/* Rules */
.rules-layout {
  display: grid;
  gap: 24px;
  align-items: start;
  padding-bottom: 56px;
}

.rules-contents h2 {
  font-size: 1.2rem;
}

.rules-contents ol {
  margin: 0;
  padding-left: 1.3em;
}

.rules-contents li + li {
  margin-top: 4px;
}

.rules-contents a {
  font-weight: 700;
}

.rules-sections {
  display: grid;
  gap: 20px;
}

.rule-section {
  scroll-margin-top: 16px;
}

.rule-section h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
}

.rule-section p {
  margin: 0;
  font-size: 1.08rem;
}

.rule-number {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 46px;
  border-radius: 8px;
  background: #ffffff;
  border: 2.5px solid var(--night-bottom);
  box-shadow: 0 3px 0 var(--panel-edge);
  color: var(--ink);
  font-size: 1.2rem;
  transform: rotate(-6deg);
}

.points-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.points-list li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.points-list strong {
  margin-left: 10px;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

@media (min-width: 900px) {
  .rules-layout {
    grid-template-columns: 260px 1fr;
  }

  .rules-contents {
    position: sticky;
    top: 16px;
  }
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 14px;
  padding-bottom: 56px;
}

.faq-item {
  padding: 0;
}

.faq-item summary {
  position: relative;
  display: block;
  padding: 18px 56px 18px 22px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius-panel);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  border-radius: 50%;
  background: var(--field-fill);
  color: var(--grape-bottom);
  font-size: 1.3rem;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0;
  padding: 0 22px 20px;
}

/* Support */
.support-panel {
  text-align: center;
}

.support-panel .button-row {
  justify-content: center;
}

.support-address {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 5vw, 1.7rem);
  overflow-wrap: anywhere;
}

/* Beta sign-up */
.beta-layout {
  display: grid;
  gap: 24px;
  align-items: start;
  padding-bottom: 56px;
}

.beta-aside {
  display: grid;
  gap: 24px;
}

.beta-form {
  display: grid;
  gap: 14px;
}

.beta-form h2 {
  font-size: 1.6rem;
  margin-bottom: 4px;
}

/* The static-only build's beta panel (#183): a link to the Facebook Page instead of the form. */
.beta-coming-soon {
  display: grid;
  gap: 14px;
  align-content: start;
}

.beta-coming-soon h2 {
  font-size: 1.6rem;
}

.text-input {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: var(--field-fill);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
}

.text-input::placeholder {
  color: var(--ink-muted);
  opacity: 1;
}

.text-input:focus {
  border-color: var(--grape-bottom);
  outline: none;
  box-shadow: 0 0 0 3px rgba(90, 43, 216, 0.25);
}

.text-input[aria-invalid="true"] {
  border-color: var(--berry-bottom);
}

.platform-choice {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 0;
  padding: 4px;
  border: 0;
  border-radius: 16px;
  background: var(--field-fill);
  min-width: 0;
}

.platform-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.platform-option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.platform-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 6px;
  border-radius: 12px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  text-align: center;
}

.platform-option input:checked + span {
  background: linear-gradient(180deg, var(--grape-top), var(--grape-bottom));
  box-shadow: 0 3px 0 var(--grape-bevel);
  color: #ffffff;
}

.platform-option input:focus-visible + span {
  outline: 3px solid var(--grape-bottom);
  outline-offset: 2px;
}

.form-message {
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fde7ee;
  color: var(--berry-bevel);
  font-weight: 700;
}

/* #164: what an emailed link did (confirmed, removed), above the form. */
.link-result {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #e3f7ec;
  color: #14532d;
  font-weight: 700;
}

.link-result-problem {
  background: #fde7ee;
  color: var(--berry-bevel);
}

.form-fine-print {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.beta-success {
  text-align: center;
  padding: 12px 0;
}

.beta-success h2 {
  font-size: 1.7rem;
}

.beta-success h2:focus {
  outline: none;
}

.success-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--mint-top), var(--mint-bottom));
  box-shadow: 0 4px 0 var(--mint-bevel);
}

.success-badge svg {
  width: 40px;
  height: 40px;
  fill: #ffffff;
}

.web-note .candy-button {
  margin-top: 4px;
}

@media (min-width: 900px) {
  .beta-layout {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

/* Legal drafts */
.legal-page {
  padding-top: 24px;
  padding-bottom: 56px;
}

.draft-notice {
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--gold);
  color: var(--ink);
}

.legal h1 {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
}

.legal h2 {
  scroll-margin-top: 16px;
}

.legal blockquote {
  margin: 0 0 1em;
  padding: 4px 16px;
  border-left: 4px solid var(--panel-edge);
}

.legal hr {
  border: 0;
  border-top: 2px solid var(--panel-edge);
  margin: 24px 0;
}

.legal code {
  font-family: inherit;
  font-weight: 700;
}

.table-scroll {
  overflow-x: auto;
  margin: 0 0 1em;
}

.legal table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.legal th,
.legal td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--panel-edge);
  text-align: left;
  vertical-align: top;
}

.legal th {
  font-family: var(--font-display);
  font-weight: 600;
}

/* 404 */
.not-found {
  padding: 32px 0 72px;
  text-align: center;
}

.not-found-cards {
  display: flex;
  justify-content: center;
  margin: 12px 0 28px;
}

.big-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100px;
  height: 140px;
  padding: 10px;
  border-radius: 12px;
  background: #ffffff;
  border: 3px solid var(--night-bottom);
  box-shadow: 0 16px 30px rgba(8, 2, 30, 0.45);
  color: var(--ink);
  text-align: left;
}

.big-card b {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
}

.big-card svg {
  width: 48px;
  height: 48px;
  margin: 8px auto 0;
  fill: var(--ink);
}

.big-card-left {
  transform: rotate(-12deg) translateX(14px);
}

.big-card-right {
  transform: rotate(12deg) translateX(-14px);
  color: var(--card-red-text);
}

.big-card-right svg {
  fill: var(--card-red);
}

.big-card-middle {
  z-index: 1;
  align-items: center;
  justify-content: center;
  transform: translateY(-10px);
}

.card-back {
  background: linear-gradient(160deg, var(--grape-top), var(--night-bottom));
  border-color: var(--gold);
}

.card-back svg {
  margin: 0;
  fill: var(--gold);
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 24px;
  padding: 40px 0 28px;
  background: rgba(20, 8, 52, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 28px;
}

.footer-brand p {
  margin-top: 8px;
  color: var(--on-night-muted);
}

.site-footer h2 {
  font-size: 1.05rem;
  color: var(--gold);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--on-night);
  overflow-wrap: anywhere;
}

/* Cookie Settings (#186): a button that looks like the footer's links. */
.footer-link-button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--on-night);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.footer-link-button[hidden] {
  display: none;
}

/* The cookie banner (#186): a white card above the page's bottom edge, over everything but the maintenance banner. */
.consent-banner {
  position: fixed;
  z-index: 40;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  justify-content: center;
}

.consent-banner[hidden] {
  display: none;
}

.consent-inner {
  display: grid;
  gap: 14px;
  max-width: 640px;
  padding: 18px 20px;
  border-radius: 20px;
  border-bottom: 5px solid var(--panel-edge);
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 12px 32px rgba(10, 4, 40, 0.45);
}

.consent-inner p {
  margin: 0;
}

.consent-inner a {
  color: var(--grape-bottom);
}

.consent-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.consent-decline {
  min-height: 44px;
  padding: 0 14px;
  border: 2px solid var(--panel-edge);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.footer-note {
  margin: 32px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--on-night-muted);
  font-size: 0.9rem;
}

/* ---------- Reduced motion ---------- */

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

  .contract-card:hover {
    transform: none;
  }
}
