/* Candy AI Web - "midnight plum and coral" */

:root {
  --night: #0E0B14;
  --plum: #17131F;
  --plum-up: #201A2B;
  --edge: #322A45;
  --text: #F4F1F8;
  --soft: #DCD6E6;
  --mute: #A79FB5;
  --coral: #FF5C7A;
  --coral-hi: #FF8098;
  --on-coral: #1A0810;
  --violet: #8B5CF6;
  --lilac: #C9B9FF;
  --bar: 64px;
  --r: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--bar) + 1rem);
}

body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font);
  overflow-wrap: break-word;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

ul[class],
ol[class] {
  padding: 0;
  list-style: none;
}

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

img {
  height: auto;
}

.ico {
  flex: none;
}

a {
  color: var(--coral);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--coral-hi);
}

strong {
  font-weight: 700;
  color: var(--text);
}

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

h1 {
  font-size: clamp(2.2rem, 1.35rem + 4.2vw, 4.1rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.9vw, 2.5rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}

.skip {
  position: absolute;
  top: -5rem;
  left: 1rem;
  z-index: 60;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--coral);
  color: var(--on-coral);
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 0.75rem;
}

.wrap {
  width: min(100% - 2.5rem, 72.5rem);
  margin-inline: auto;
}

.wrap-narrow {
  width: min(100% - 2.5rem, 50rem);
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--edge);
  background: rgba(14, 11, 20, 0.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.topbar .wrap {
  width: min(100% - 2rem, 72.5rem);
}

.topbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.4rem;
  min-height: calc(var(--bar) - 1px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  min-height: 44px;
  margin-right: auto;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

.brandmark {
  flex: none;
  width: 30px;
  height: 30px;
}

.brand-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Without popover support the links stay visible as a scrolling row. */
.mainnav {
  order: 9;
  flex: 0 0 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  overflow-x: auto;
}

.mainnav ul {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0 0 0.6rem;
  list-style: none;
}

.mainnav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.8rem;
  border-radius: 10px;
  color: var(--mute);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.mainnav a:hover,
.mainnav a[aria-current="page"] {
  background: var(--plum-up);
  color: var(--text);
}

.navtoggle,
.navtoggle-close {
  display: none;
}

@media (max-width: 68.74em) {
  @supports selector(:popover-open) {
    .topbar-row {
      flex-wrap: nowrap;
    }

    .navtoggle {
      display: inline-flex;
      flex: none;
      align-items: center;
      justify-content: center;
      width: 44px;
      height: 44px;
      padding: 0;
      border: 1px solid var(--edge);
      border-radius: 12px;
      background: var(--plum);
      color: var(--text);
      cursor: pointer;
    }

    .mainnav {
      opacity: 0;
      translate: 0 -12px;
      transition:
        opacity 0.2s ease,
        translate 0.2s ease,
        overlay 0.2s allow-discrete,
        display 0.2s allow-discrete;
    }

    .mainnav:popover-open {
      position: fixed;
      inset: var(--bar) 0 auto 0;
      width: auto;
      max-width: none;
      height: auto;
      max-height: calc(100dvh - var(--bar));
      padding: 0.75rem 1.25rem 1.5rem;
      border-bottom: 1px solid var(--edge);
      background: var(--plum);
      color: var(--text);
      box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
      opacity: 1;
      translate: 0 0;
      overflow-y: auto;
    }

    @starting-style {
      .mainnav:popover-open {
        opacity: 0;
        translate: 0 -12px;
      }
    }

    .mainnav:popover-open ul {
      flex-direction: column;
      gap: 0.15rem;
      padding: 0;
    }

    .mainnav:popover-open a {
      min-height: 52px;
      padding: 0 0.9rem;
      color: var(--text);
      font-size: 1.05rem;
    }

    .mainnav::backdrop {
      inset: 64px 0 0;
      background: rgba(8, 6, 12, 0.6);
    }

    /* A tap outside the open menu only closes it: nothing underneath is activated. */
    body:has(.mainnav:popover-open) main,
    body:has(.mainnav:popover-open) .foot {
      pointer-events: none;
    }

    .topbar:has(.mainnav:popover-open) .navtoggle-open {
      display: none;
    }

    .topbar:has(.mainnav:popover-open) .navtoggle-close {
      display: block;
    }
  }
}

@media (max-width: 21.49em) {
  .brandmark {
    display: none;
  }
}

@media (min-width: 26em) {
  .topbar .wrap {
    width: min(100% - 2.5rem, 72.5rem);
  }

  .brand {
    gap: 0.6rem;
    font-size: 1.05rem;
  }

  .brandmark {
    width: 34px;
    height: 34px;
  }

  .topbar-row {
    gap: 0 0.75rem;
  }
}

@media (min-width: 68.75em) {
  .topbar-row {
    flex-wrap: nowrap;
  }

  .brand {
    margin-right: 0;
  }

  .mainnav,
  .mainnav:popover-open {
    position: static;
    display: block;
    order: 0;
    flex: 1 1 auto;
    overflow: visible;
  }

  .mainnav ul {
    justify-content: center;
    padding: 0;
  }

  .mainnav a {
    padding: 0 0.7rem;
  }
}

/* ---------- buttons and small parts ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 50px;
  padding: 0.7rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}

.btn-coral {
  background: var(--coral);
  color: var(--on-coral);
  box-shadow: 0 12px 30px -14px rgba(255, 92, 122, 0.8);
}

.btn-coral:hover {
  background: var(--coral-hi);
  color: var(--on-coral);
  transform: translateY(-1px);
}

.btn-line {
  border-color: var(--edge);
  background: rgba(244, 241, 248, 0.03);
  color: var(--text);
}

.btn-line:hover {
  border-color: var(--violet);
  color: var(--text);
}

.btn-sm {
  min-height: 44px;
  padding: 0.5rem 0.65rem;
  font-size: 0.82rem;
  box-shadow: none;
}

@media (min-width: 26em) {
  .btn-sm {
    padding: 0.5rem 1.1rem;
    font-size: 0.92rem;
  }
}

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

.more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  color: var(--coral);
  font-weight: 700;
  text-decoration: none;
}

.more:hover {
  text-decoration: underline;
}

.eyebrow {
  color: var(--lilac);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lead {
  max-width: 46rem;
  color: var(--soft);
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  line-height: 1.6;
}

.stamp {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: var(--plum);
  color: var(--mute);
  font-size: 0.875rem;
}

.stamp .ico {
  color: var(--coral);
}

.plate {
  padding: 1.5rem;
  border: 1px solid var(--edge);
  border-radius: var(--r);
  background: var(--plum);
}

.zone-tint .plate {
  background: var(--plum-up);
}

/* ---------- home ---------- */

.hero,
.masthead {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero {
  padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(3rem, 7vw, 5.5rem);
}

.hero::before,
.hero::after,
.masthead::before {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

.hero::before,
.masthead::before {
  top: -20rem;
  right: -14rem;
  width: 46rem;
  height: 46rem;
  background: radial-gradient(closest-side, rgba(139, 92, 246, 0.3), rgba(139, 92, 246, 0));
}

.hero::after {
  bottom: -24rem;
  left: -16rem;
  width: 44rem;
  height: 44rem;
  background: radial-gradient(closest-side, rgba(255, 92, 122, 0.2), rgba(255, 92, 122, 0));
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.hero-copy > * + * {
  margin-top: 1.25rem;
}

.hero-art img {
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  color: var(--mute);
  font-size: 0.95rem;
}

.hero-points li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-points .ico {
  color: var(--coral);
}

@media (min-width: 62em) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 3.5rem;
  }
}

.zone {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.zone-tint {
  border-block: 1px solid var(--edge);
  background: var(--plum);
}

.zone-head {
  max-width: 46rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.zone-head p {
  margin-top: 0.9rem;
  color: var(--mute);
  font-size: 1.1rem;
}

.zone-foot {
  margin-top: 2rem;
}

.doors,
.tiles,
.plans,
.pair,
.facts {
  display: grid;
  gap: 1rem;
}

.door {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.75rem;
}

.door-label {
  align-self: flex-start;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.2);
  color: var(--lilac);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.door h3 {
  font-size: 1.5rem;
  letter-spacing: -0.015em;
}

.door p,
.tile p,
.plan-bill,
.facts-label {
  color: var(--mute);
}

.door .more {
  margin-top: auto;
  padding-top: 0.4rem;
}

.tile-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: rgba(255, 92, 122, 0.14);
  color: var(--coral);
}

.tile p {
  margin-top: 0.35rem;
  font-size: 1rem;
}

.plan h3 {
  color: var(--lilac);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.plan-price {
  margin-top: 0.6rem;
  color: var(--mute);
}

.plan-price strong {
  font-size: clamp(2.2rem, 1.7rem + 2vw, 3rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.plan-bill {
  margin-top: 0.5rem;
}

.plans + .actions {
  margin-top: 2rem;
}

@media (min-width: 40em) {
  .tiles,
  .pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 48em) {
  .doors,
  .plans {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 62em) {
  .tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- portrait cards ---------- */

.portraits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.portrait {
  position: relative;
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--edge);
  border-radius: var(--r);
  background: var(--plum-up);
  color: var(--text);
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}

.portrait:hover {
  border-color: var(--coral);
  color: var(--text);
  transform: translateY(-3px);
}

.portrait img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(160deg, #2E2244, #1A1424 55%, #3B1F33);
  color: var(--mute);
  font-size: 0.8rem;
}

.portrait-strip .portrait-cap,
.portrait-mini .portrait-cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 3rem 0.85rem 0.8rem;
  background: linear-gradient(to top, rgba(14, 11, 20, 0.97) 58%, rgba(14, 11, 20, 0));
}

.portrait-full .portrait-cap {
  padding: 0.85rem 0.85rem 1rem;
}

.portrait-tag {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: #2D1623;
  color: #FF94A8;
  font-size: 0.75rem;
  font-weight: 700;
}

.portrait-name {
  margin-top: 0.3rem;
  font-size: 1.1rem;
}

.portrait-kind {
  color: var(--mute);
  font-size: 0.8rem;
}

.portrait-line {
  margin-top: 0.35rem;
  color: var(--mute);
  font-size: 0.9rem;
  line-height: 1.45;
}

@media (min-width: 40em) {
  .portraits {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (min-width: 56em) {
  .portraits {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  /* a group of exactly six cards: two full rows instead of four plus two */
  .portraits:has(> li:nth-child(6):last-child) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 72em) {
  .portraits,
  .portraits:has(> li:nth-child(6):last-child) {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* ---------- inner pages ---------- */

.masthead {
  padding: clamp(1rem, 3vw, 2rem) 0 clamp(2.5rem, 6vw, 4rem);
}

.masthead .wrap > * + * {
  margin-top: 1.25rem;
}

.masthead h1 {
  max-width: 56rem;
}

.masthead-solo {
  padding-top: clamp(2.5rem, 7vw, 5rem);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--mute);
  font-size: 0.9rem;
}

.crumbs li {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.crumbs li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--edge);
}

.crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--mute);
}

.crumbs a:hover {
  color: var(--text);
}

.sect {
  padding: clamp(2.25rem, 5vw, 4rem) 0;
  border-top: 1px solid var(--edge);
}

.sect-grid {
  display: grid;
  gap: 1.25rem 3.5rem;
}

.sect-body > * + * {
  margin-top: 1.15rem;
}

.sect-body > p,
.sect-body > .ticks {
  max-width: 44rem;
}

.sect-body > p {
  color: var(--soft);
}

@media (min-width: 62em) {
  .sect-grid {
    grid-template-columns: minmax(0, 19rem) minmax(0, 1fr);
  }

  .sect-head {
    position: sticky;
    top: calc(var(--bar) + 1.5rem);
    align-self: start;
  }

  .sect-wide .sect-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .sect-wide .sect-head {
    position: static;
  }
}

.ticks {
  display: grid;
  gap: 0.6rem;
}

.ticks li {
  position: relative;
  padding-left: 1.9rem;
  color: var(--soft);
}

.ticks li::before {
  content: "";
  position: absolute;
  top: 0.45em;
  left: 0.15rem;
  width: 0.95rem;
  height: 0.5rem;
  border-bottom: 2px solid var(--coral);
  border-left: 2px solid var(--coral);
  transform: rotate(-45deg);
}

.ticks-open li::before {
  top: 0.5em;
  left: 0.25rem;
  width: 0.65rem;
  height: 0.65rem;
  border: 2px solid var(--lilac);
  border-radius: 50%;
  transform: none;
}

.pair h3 {
  margin-bottom: 0.9rem;
}

.facts-value {
  color: var(--coral);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.facts-label {
  margin-top: 0.5rem;
}

.steps {
  display: grid;
  gap: 1rem;
  counter-reset: step;
}

.steps > li {
  position: relative;
  padding: 1.4rem 1.4rem 1.4rem 4.5rem;
  border: 1px solid var(--edge);
  border-radius: var(--r);
  background: var(--plum);
  counter-increment: step;
}

.zone-tint .steps > li {
  background: var(--plum-up);
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  top: 1.3rem;
  left: 1.25rem;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--coral);
  color: var(--on-coral);
  font-weight: 800;
}

.steps p {
  margin-top: 0.3rem;
  color: var(--mute);
}

@media (min-width: 56em) {
  .steps-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .steps-row > li {
    padding: 4.6rem 1.5rem 1.6rem;
  }

  .steps-row > li::before {
    top: 1.5rem;
    left: 1.5rem;
  }
}

.ledger {
  overflow: hidden;
  border: 1px solid var(--edge);
  border-radius: var(--r);
  background: var(--plum);
}

.ledger table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.ledger caption {
  padding: 0.8rem 1.1rem;
  border-top: 1px solid var(--edge);
  color: var(--mute);
  font-size: 0.875rem;
  text-align: left;
  caption-side: bottom;
}

.ledger th,
.ledger td {
  padding: 0.9rem 1.1rem;
  text-align: left;
  vertical-align: top;
}

.ledger thead th {
  background: var(--plum-up);
  color: var(--mute);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ledger tbody tr + tr > * {
  border-top: 1px solid var(--edge);
}

.ledger tbody th {
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 43.99em) {
  .ledger thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .ledger tbody tr,
  .ledger tbody th,
  .ledger tbody td {
    display: block;
  }

  .ledger tbody tr {
    padding: 0.9rem 1.1rem;
  }

  .ledger tbody tr + tr {
    border-top: 1px solid var(--edge);
  }

  .ledger tbody tr + tr > * {
    border-top: 0;
  }

  .ledger tbody th,
  .ledger tbody td {
    padding: 0.15rem 0;
  }

  .ledger tbody th {
    font-size: 1.15rem;
  }

  .ledger td::before {
    content: attr(data-label) ": ";
    color: var(--mute);
  }
}

.diagram {
  max-width: 40rem;
}

.diagram img {
  width: 100%;
  border: 1px solid var(--edge);
  border-radius: var(--r);
}

.diagram figcaption {
  margin-top: 0.6rem;
  color: var(--mute);
  font-size: 0.9rem;
}

.qa-list {
  display: grid;
  gap: 0.75rem;
}

.qa {
  border: 1px solid var(--edge);
  border-radius: var(--r);
  background: var(--plum);
}

.zone-tint .qa {
  background: var(--plum-up);
}

.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 58px;
  padding: 0.9rem 1.25rem;
  border-radius: var(--r);
  cursor: pointer;
  list-style: none;
}

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

.qa summary h3 {
  font-size: 1.05rem;
}

.qa summary::after {
  content: "";
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  margin-right: 0.25rem;
  border-right: 2px solid var(--coral);
  border-bottom: 2px solid var(--coral);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease;
}

.qa[open] summary::after {
  transform: translateY(2px) rotate(-135deg);
}

.qa-body {
  padding: 0 1.25rem 1.25rem;
  color: var(--soft);
}

.related {
  padding: clamp(2rem, 4vw, 3rem) 0 0;
  border-top: 1px solid var(--edge);
}

.related h2 {
  font-size: 1.25rem;
  letter-spacing: 0;
}

.related ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.related a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: var(--plum);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.related a:hover {
  border-color: var(--violet);
}

.related .ico {
  color: var(--coral);
}

.lost-links {
  display: grid;
  gap: 0 2rem;
}

.lost-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

@media (min-width: 40em) {
  .lost-links {
    grid-template-columns: repeat(2, max-content);
  }
}

/* ---------- closing band and footer ---------- */

.band-zone {
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3rem, 7vw, 5rem);
}

.band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
  padding: clamp(1.75rem, 4vw, 3rem);
  border: 1px solid rgba(255, 92, 122, 0.4);
  border-radius: 24px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(139, 92, 246, 0.32), rgba(139, 92, 246, 0) 60%),
    radial-gradient(120% 140% at 0% 100%, rgba(255, 92, 122, 0.22), rgba(255, 92, 122, 0) 55%),
    var(--plum);
}

.band-copy {
  flex: 1 1 20rem;
}

.band p {
  max-width: 38rem;
  margin-top: 0.6rem;
  color: var(--soft);
}

.foot {
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 2rem;
  border-top: 1px solid var(--edge);
  background: var(--plum);
  font-size: 0.95rem;
}

.foot-grid {
  display: grid;
  gap: 2rem;
}

.foot-about p {
  max-width: 26rem;
  margin-top: 0.75rem;
  color: var(--mute);
}

.foot-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.foot-title {
  margin-bottom: 0.4rem;
  color: var(--mute);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.foot-col ul,
.foot-langs ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-col a,
.foot-langs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
}

.foot-col a:hover,
.foot-langs a:hover {
  color: var(--coral);
}

.foot-langs ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  margin-top: 1.5rem;
}

.foot-langs a[aria-current] {
  color: var(--mute);
}

.foot-disclosure {
  max-width: 60rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--edge);
  color: var(--mute);
  font-size: 0.875rem;
}

.foot-copy {
  margin-top: 0.75rem;
  color: var(--mute);
  font-size: 0.875rem;
}

@media (min-width: 36em) {
  .foot-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 56em) {
  .foot-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: 4rem;
  }
}

/* ---------- redirect page ---------- */

.go-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 1.5rem;
}

.go-box {
  max-width: 34rem;
  padding: 2rem;
  border: 1px solid var(--edge);
  border-radius: var(--r);
  background: var(--plum);
  text-align: center;
}

.go-box h1 {
  font-size: clamp(1.8rem, 1.4rem + 2vw, 2.4rem);
}

.go-box p {
  margin-top: 1rem;
  color: var(--mute);
}

.go-box a {
  display: inline-block;
  padding: 0.6rem 0.25rem;
}

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

/* Japanese: break headings at phrase boundaries, never in the middle of a word */
:lang(ja) h1,
:lang(ja) h2,
:lang(ja) h3 {
  word-break: auto-phrase;
  text-wrap: balance;
}

/* Korean: wrap between words, never between the syllables of a word */
:lang(ko) {
  word-break: keep-all;
}

:lang(ko) h1,
:lang(ko) h2,
:lang(ko) h3 {
  text-wrap: balance;
}

/* Chinese: headings break at spaces and punctuation, not in the middle of a word (overflow-wrap still prevents overflow) */
:lang(zh) h1,
:lang(zh) h2,
:lang(zh) h3 {
  word-break: keep-all;
  text-wrap: balance;
}
