/*
 * The hub's page: a near-black page with a serif headline (after the "Smarter Growth" design) and one pastel card
 * per world in the manner of an iOS home screen widget. Fonts are served from /assets/fonts; latin and latin-ext
 * are split by unicode-range, so a German or English page never loads the Polish letters it does not need.
 */

/* ---------- Fonts (SIL Open Font License, see fonts/OFL-*.txt) ---------- */

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-tight-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-tight-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */

:root {
  --bg: #080a0b;
  --rule: #151719;
  --material: #121416;
  --material-edge: #1f2123;
  --nav: #a0a2a5;
  --sub: #a5a7aa;
  --faint: #737679;
  --white: #fff;
  --ink: #101820;
  --ink-soft: rgb(16 24 32 / 0.66);
  --accent: #ffd500;
  --fill: rgb(118 118 128 / 0.24);

  --mint: #abf1ce;
  --lilac: #d9c1f9;
  --peach: #ffc9a8;
  --sky: #b5dcff;
  --lime: #d2f28a;
  --butter: #f9e484;

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --system: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter Tight", system-ui, sans-serif;
  --rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Inter Tight", system-ui, sans-serif;

  --r-card: 34px;
  --r-panel: 20px;
  --r-icon: 14px;
  --r-pill: 999px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
}

/* ---------- Base ---------- */

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

html {
  background: var(--bg);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

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

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.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 {
  position: absolute;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 12px 18px;
  border-radius: var(--r-pill);
  background: var(--white);
  color: #000;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease-out);
}

.skip:focus {
  transform: none;
}

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

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--rule);
  background: rgb(8 10 11 / 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
}

.top__row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  height: 68px;
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--white);
}

.brand .mark {
  width: 30px;
  height: 30px;
  flex: none;
  filter: drop-shadow(0 2px 8px rgb(255 213 0 / 0.18));
}

.brand__name {
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1;
  letter-spacing: -0.01em;
  transform: translateY(1px);
}

.top__nav {
  display: flex;
  padding: 0 3px;
  border: 1px solid var(--material-edge);
  border-radius: var(--r-pill);
  background: rgb(18 20 22 / 0.7);
}

.top__nav a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  color: var(--nav);
  font-size: 14px;
  font-weight: 450;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.top__nav a::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 5px 2px;
  border-radius: var(--r-pill);
  background: transparent;
  transition: background-color 0.25s ease;
}

.top__nav a:hover {
  color: #e9eaeb;
}

.top__nav a[aria-current="true"] {
  color: var(--white);
  font-weight: 500;
}

.top__nav a[aria-current="true"]::before {
  background: #1d2023;
  box-shadow: inset 0 0 0 1px #2a2d30;
}

.top__nav a:focus-visible {
  outline-offset: -3px;
  border-radius: var(--r-pill);
}

.langs {
  justify-self: end;
}

.langs ul {
  display: flex;
  margin: 0;
  padding: 0 3px;
  list-style: none;
  border: 1px solid var(--material-edge);
  border-radius: var(--r-pill);
  background: rgb(18 20 22 / 0.7);
}

.langs a {
  position: relative;
  z-index: 0;
  display: grid;
  place-items: center;
  min-width: 42px;
  min-height: 44px;
  color: var(--nav);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.langs a::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 6px 2px;
  border-radius: var(--r-pill);
  transition: background-color 0.2s ease;
}

.langs a:hover {
  color: var(--white);
}

.langs a:hover::before {
  background: #1d2023;
}

.langs a[aria-current] {
  color: #000;
}

.langs a[aria-current]::before {
  background: var(--white);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.5);
}

.langs a:focus-visible {
  outline-offset: -3px;
  border-radius: var(--r-pill);
}

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

.hero {
  padding-top: clamp(48px, 6.4vw, 92px);
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(40px, 4vw + 30px, 88px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.018em;
}

.hero__line {
  display: block;
}

.hero h1 em {
  font-style: italic;
  letter-spacing: -0.01em;
  padding-right: 0.04em;
}

.hero__sub {
  max-width: 39em;
  margin: clamp(18px, 2vw, 26px) auto 0;
  color: var(--sub);
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.6;
  text-wrap: pretty;
}

.nw {
  white-space: nowrap;
}

.u {
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  margin-top: clamp(26px, 3vw, 38px);
  padding: 6px 24px 6px 6px;
  border-radius: var(--r-pill);
  background: var(--white);
  color: #000;
  font-size: 16px;
  font-weight: 550;
  box-shadow: 0 1px 2px #000, 0 12px 40px -12px rgb(255 255 255 / 0.25);
  transition: background-color 0.2s ease, transform 0.35s var(--spring);
}

.cta__chip {
  display: grid;
  place-items: center;
  width: 48px;
  height: 40px;
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--white);
}

.cta__chip svg {
  width: 14px;
  height: 16px;
  transition: transform 0.3s var(--ease-out);
}

.cta:hover {
  background: #ececec;
}

.cta:hover .cta__chip svg {
  transform: translateY(2px);
}

.cta:active {
  transform: scale(0.97);
}

/* ---------- World cards ---------- */

.worlds {
  padding-top: clamp(48px, 5.6vw, 80px);
}

.rail {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 22px;
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.world {
  --tint: var(--mint);
  --deep: #5fd9a5;
  position: relative;
  z-index: 0;
  isolation: isolate;
  container-type: inline-size;
  grid-column: span 2;
  overflow: hidden;
  border-radius: var(--r-card);
  color: var(--ink);
  font-family: var(--system);
  background:
    radial-gradient(130% 85% at 0% 0%, rgb(255 255 255 / 0.5), rgb(255 255 255 / 0) 58%),
    linear-gradient(168deg, color-mix(in oklab, var(--tint), #fff 14%) 0%, var(--tint) 46%, color-mix(in oklab, var(--tint), var(--deep) 42%) 100%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.85),
    inset 0 0 0 1px rgb(255 255 255 / 0.2),
    0 2px 4px rgb(0 0 0 / 0.35),
    0 26px 60px -28px color-mix(in srgb, var(--tint) 75%, transparent),
    0 50px 120px -50px color-mix(in srgb, var(--tint) 55%, transparent);
  transition: transform 0.55s var(--spring), box-shadow 0.45s ease;
  -webkit-tap-highlight-color: transparent;
}

/* A soft orb of the deeper tone behind the glass panel, so the frosted list has something to blur. */
.world::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -18%;
  bottom: -12%;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklab, var(--deep), #fff 8%) 0%, rgb(255 255 255 / 0) 66%);
  opacity: 0.9;
}

.world::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -10%;
  bottom: 18%;
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(255 255 255 / 0.55) 0%, rgb(255 255 255 / 0) 66%);
}

.world--esim {
  --tint: var(--mint);
  --deep: #4fd39b;
}

.world--cards {
  --tint: var(--lilac);
  --deep: #a985f3;
}

.world--protein {
  --tint: var(--peach);
  --deep: #ff9a68;
}

/* The two ink sites share a tint; a page shows one of them. */
.world--ink,
.world--tinte {
  --tint: var(--sky);
  --deep: #74b4ff;
}

.world--ahk {
  --tint: var(--lime);
  --deep: #a8d42e;
}

.world--solar {
  --tint: #ffdc9a;
  --deep: #f5ad3c;
}

.world--keyfinder {
  --tint: var(--butter);
  --deep: #f1c43c;
}

/*
 * The scene behind a card (hub/art.ts): a square frame of 400 units as wide as the card. Its line y = 215 meets
 * the top edge of a four-row list (246px above the card's bottom), so the drawing stands behind the frosted glass
 * and shows sharp above it. It fades out to the left, where the price is written.
 */
.world {
  --art-hi: color-mix(in oklab, var(--tint), #fff 62%);
  --art-sh: color-mix(in oklab, var(--deep), #101820 30%);
}

.world__art {
  position: absolute;
  z-index: -1;
  right: -7cqi;
  bottom: calc(246px - 46.25cqi);
  width: 100cqi;
  aspect-ratio: 1;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, rgb(0 0 0 / 0) 10%, #000 50%);
  mask-image: linear-gradient(90deg, rgb(0 0 0 / 0) 10%, #000 50%);
}

/* The sister card has a headline and one row: its scene hangs from the top, in the room above the headline. */
.world--keyfinder .world__art {
  top: 4cqi;
  right: 6cqi;
  bottom: auto;
  width: 115cqi;
  -webkit-mask-image: none;
  mask-image: none;
}

.world__art svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform-origin: 78% 40%;
  transition: transform 0.9s var(--spring);
}

/* With a mouse the scene leans towards the pointer's card and its small parts drift; a phone shows it still. */
@media (hover: hover) and (pointer: fine) {
  .world:hover .world__art svg {
    transform: translate(-1%, -1.4%) scale(1.05) rotate(-1.5deg);
  }
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .art-f {
    animation: art-float 5.6s ease-in-out infinite alternate;
  }

  .art-f2 {
    animation: art-float 7s ease-in-out -2.4s infinite alternate-reverse;
  }

  .art-pulse {
    transform-box: fill-box;
    transform-origin: center;
    animation: art-pulse 2.6s ease-in-out infinite;
  }

  .world:hover .art-route {
    animation: art-march 0.9s linear infinite;
  }
}

@keyframes art-float {
  from {
    transform: translateY(-3px);
  }

  to {
    transform: translateY(4px);
  }
}

@keyframes art-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.24);
    opacity: 0.7;
  }
}

@keyframes art-march {
  to {
    stroke-dashoffset: -8.1;
  }
}

/* What a drawing puts left of its strip is shown only where no price is written over it. */
.world--priced .art-x {
  display: none;
}

/* The text of a card with a price keeps left of the drawing: caption and the two lines under the price wrap. */
.world--priced .world__caption,
.world--priced .world__meta {
  max-width: 64%;
}

.art-d {
  fill: var(--deep);
}

.art-sh {
  fill: var(--art-sh);
}

.art-line {
  stroke: color-mix(in oklab, var(--deep), #fff 30%);
}

.art-route {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 0.1 8;
  opacity: 0.75;
}

.world__in {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 22px;
}

.world :focus-visible {
  outline: 2.5px solid var(--ink);
  outline-offset: 2px;
}

/* Top row, like an App Store row: icon, name and category, the capsule button. */
.world__top {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
}

.world__icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: var(--r-icon);
  background: linear-gradient(180deg, #fff 0%, #f4f5f6 100%);
  box-shadow:
    0 0 0 0.5px rgb(16 24 32 / 0.08),
    0 1px 2px rgb(16 24 32 / 0.12),
    0 8px 18px -8px rgb(16 24 32 / 0.35);
}

.world__icon svg {
  width: auto;
  height: 32px;
}

.world__id {
  min-width: 0;
  padding-top: 7px;
}

.world__name {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.world__name a {
  border-radius: 6px;
}

.world__name a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.world__cat {
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.world__lang {
  margin: 7px 0 0;
}

.world__lang span {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  background: rgb(255 255 255 / 0.5);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  backdrop-filter: blur(12px) saturate(1.4);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.7), 0 1px 2px rgb(16 24 32 / 0.06);
  color: rgb(16 24 32 / 0.78);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.world__open {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--white);
  margin-top: 13px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  box-shadow: 0 6px 14px -6px rgb(16 24 32 / 0.55);
  transition: background-color 0.2s ease, transform 0.35s var(--spring);
}

/* The visible capsule is 34px; the target reaches 44px. */
.world__open::before {
  content: "";
  position: absolute;
  inset: -5px -2px;
}

.world__open:hover {
  background: #26323d;
}

.world__open:active {
  transform: scale(0.95);
}

.world .world__open:focus-visible {
  outline-offset: 3px;
}

/* The widget number, held to the bottom so the prices of a row of cards share a line. */
.world__lead {
  display: flex;
  flex-direction: column;
  margin: auto 0 24px;
  padding-top: 26px;
  border-radius: 14px;
}

a.world__lead {
  transition: transform 0.35s var(--spring);
}

.world__caption {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-soft);
  /* Not in capitals: "eSIM Türkei" keeps its small e, and a long product name fits on one line. */
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.005em;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.world__price {
  margin-top: 4px;
  font-family: var(--rounded);
  font-size: min(60px, 18.5cqi);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* A currency code beside the number: half its size, so "49,99 PLN" reads as a price and a label. */
.world__unit {
  font-size: 0.46em;
  font-weight: 650;
  letter-spacing: 0;
}

.world__meta {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.35;
}

/* Shop and date, one line each. */
.world__meta span {
  display: block;
}

.world__price--long {
  font-size: min(52px, 16cqi);
}

.world__price--xlong {
  font-size: min(42px, 13cqi);
}

.world__lead--count .world__price {
  margin-top: 0;
}

.world__word {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.world__tagline {
  margin: auto 0 26px;
  padding-top: 24px;
  font-family: var(--serif);
  font-size: min(34px, 10.4cqi);
  font-style: italic;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* The list: an iOS inset grouped list on glass. */
.world__list {
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
  border-radius: var(--r-panel);
  background: rgb(255 255 255 / 0.55);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.65),
    inset 0 1px 0 rgb(255 255 255 / 0.9),
    0 1px 2px rgb(16 24 32 / 0.06),
    0 10px 24px -14px rgb(16 24 32 / 0.25);
}

.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 16px;
  transition: background-color 0.2s ease;
}

/* In a card every row has the height of a two-line name, so the numbers of a row of cards share a line. */
.world__list .row {
  min-height: 56px;
}

/* Separators inset from the left, as iOS draws them; a row hidden by the search takes its line with it. */
li:not([hidden]) ~ li > .row::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 16px;
  height: 1px;
  background: rgb(16 24 32 / 0.1);
}

/* A long name (a card product) runs to a second line, as an iOS list row does, before it is cut. */
.row__name {
  display: -webkit-box;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.row__price {
  flex: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chev {
  flex: none;
  width: 8px;
  height: 14px;
  color: rgb(16 24 32 / 0.34);
  transition: transform 0.3s var(--ease-out), color 0.2s ease;
}

.world .row:hover {
  background: rgb(255 255 255 / 0.42);
}

.world .row:active {
  background: rgb(16 24 32 / 0.07);
}

.row:hover .chev {
  color: currentColor;
  transform: translateX(3px);
}

.world .row:focus-visible {
  outline-offset: -3px;
  border-radius: var(--r-panel);
}

.world__all .row__name {
  font-weight: 600;
}

/* Press like an iOS widget; lift with a mouse. */
.world:active {
  transform: scale(0.985);
  transition-duration: 0.18s;
}

@media (hover: hover) and (pointer: fine) {
  .world:hover {
    transform: translateY(-4px);
    box-shadow:
      inset 0 1px 0 rgb(255 255 255 / 0.85),
      inset 0 0 0 1px rgb(255 255 255 / 0.2),
      0 2px 4px rgb(0 0 0 / 0.35),
      0 34px 80px -26px color-mix(in srgb, var(--tint) 90%, transparent),
      0 60px 160px -40px color-mix(in srgb, var(--tint) 70%, transparent);
  }

  .world:hover:active {
    transform: translateY(-2px) scale(0.985);
  }
}

/* A wide card (a row with fewer cards) shows its number and its list side by side, like a large widget. */
@container (min-width: 540px) {
  .world__in {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    grid-template-rows: auto 1fr;
    column-gap: 32px;
  }

  .world__top {
    grid-column: 1 / -1;
  }

  /* The number sits level with the middle of the list, so the left half of a wide card is not empty above it. */
  .world__lead {
    align-self: center;
    margin: 26px 0 0;
    padding-top: 0;
  }

  .world__tagline {
    align-self: end;
    margin-bottom: 4px;
  }

  .world__list {
    align-self: center;
    margin-top: 26px;
  }

  .world__price {
    font-size: min(60px, 9.4cqi);
  }

  /* A sister site's line takes the whole width; its one row sits under it on the right. */
  .world__tagline {
    grid-column: 1 / -1;
    max-width: 10.5em;
    margin-bottom: 0;
    font-size: min(40px, 6.4cqi);
  }

  .world__tagline + .world__list {
    grid-column: 2;
    margin-top: 22px;
  }

  /*
   * The scene of a wide card: smaller, standing behind the top edge of the list (108px under the card's top),
   * in the free middle of the top row, left of the button. The text has its own column and wraps as it likes.
   */
  .world__art {
    top: calc(108px - 20.96cqi);
    right: 17cqi;
    bottom: auto;
    width: 39cqi;
  }

  .world .art-x {
    display: none;
  }

  .world--priced .world__caption,
  .world--priced .world__meta {
    max-width: none;
  }

  /* The sister card's headline keeps to the left: its scene takes the right, above the one row. */
  .world--keyfinder .world__art {
    top: 6cqi;
    right: 1cqi;
    width: 50cqi;
  }
}

/* Five cards in three columns: the last row's two share it. */
.world:nth-child(3n + 1):nth-last-child(2),
.world:nth-child(3n + 1):nth-last-child(2) + .world {
  grid-column: span 3;
}

.world:nth-child(3n + 1):last-child {
  grid-column: 3 / span 2;
}

.dots {
  display: none;
}

@media (max-width: 1099px) {
  .rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .world,
  .world:nth-child(3n + 1):nth-last-child(2),
  .world:nth-child(3n + 1):nth-last-child(2) + .world,
  .world:nth-child(3n + 1):last-child {
    grid-column: span 1;
  }

  .rail > .world:nth-child(odd):last-child {
    grid-column: 1 / -1;
  }
}

/* Phones: a swipe rail with the next card peeking in, and dots that follow. */
@media (max-width: 699px) {
  .rail {
    display: flex;
    gap: 12px;
    padding: 6px var(--gutter) 44px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }

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

  .world,
  .world:nth-child(odd):last-child {
    flex: 0 0 86vw;
    max-width: 400px;
    border-radius: 30px;
    scroll-snap-align: start;
  }

  .world__in {
    padding: 20px;
  }

  .dots {
    display: flex;
    justify-content: center;
    margin-top: -30px;
  }

  .dots button {
    position: relative;
    width: 30px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
  }

  .dots button::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 7px;
    height: 7px;
    border-radius: var(--r-pill);
    background: rgb(255 255 255 / 0.26);
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease-out), background-color 0.3s ease;
  }

  .dots button[aria-current="true"]::before {
    width: 20px;
    background: var(--white);
  }

  .dots button:focus-visible {
    outline-offset: -6px;
    border-radius: 12px;
  }
}

/* ---------- All comparisons ---------- */

.all {
  padding-top: clamp(80px, 10vw, 150px);
}

.all__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 20px;
}

.all__head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(36px, 4.6vw, 60px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.015em;
}

.all__count {
  margin: 0;
  color: var(--sub);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.finder {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 28px;
}

.search {
  position: relative;
  flex: 1 1 300px;
  max-width: 440px;
}

.search__glyph {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 18px;
  height: 18px;
  color: #8e8e93;
  transform: translateY(-50%);
  pointer-events: none;
}

.search__input {
  width: 100%;
  height: 50px;
  padding: 0 16px 0 44px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--fill);
  color: var(--white);
  font-size: 17px;
  letter-spacing: -0.01em;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.search__input::placeholder {
  color: #8e8e93;
  opacity: 1;
}

.search__input:hover {
  background: rgb(118 118 128 / 0.3);
}

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

.segs {
  display: flex;
  max-width: 100%;
  padding: 3px;
  overflow-x: auto;
  border-radius: 13px;
  background: var(--fill);
  scrollbar-width: none;
}

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

.seg {
  flex: none;
  min-height: 44px;
  padding: 0 15px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #d4d5d7;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.2s ease, box-shadow 0.25s ease;
}

.seg:hover {
  color: var(--white);
}

.seg[aria-pressed="true"] {
  background: #636366;
  color: var(--white);
  font-weight: 600;
  box-shadow: 0 3px 8px rgb(0 0 0 / 0.24), 0 3px 1px rgb(0 0 0 / 0.08), inset 0 0.5px 0 rgb(255 255 255 / 0.18);
}

.seg:focus-visible {
  outline-offset: -2px;
}

.all__empty {
  margin: 28px 0 0;
  color: var(--sub);
  font-size: 16px;
}

.all__empty:empty {
  display: none;
}

.groups {
  margin-top: 30px;
}

.group {
  margin-bottom: 30px;
  break-inside: avoid;
}

.group__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  padding-inline: 4px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.group__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--tint, #fff);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.6);
}

.group__icon svg {
  width: auto;
  height: 19px;
}

.group--esim {
  --tint: var(--mint);
}

.group--cards {
  --tint: var(--lilac);
}

.group--protein {
  --tint: var(--peach);
}

.group--ink,
.group--tinte {
  --tint: var(--sky);
}

.group--ahk {
  --tint: var(--lime);
}

.group--solar {
  --tint: #ffdc9a;
}

.group__name {
  flex: 1;
  min-width: 0;
}

.group__count {
  color: var(--faint);
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.group__list {
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
  border: 1px solid var(--material-edge);
  border-radius: var(--r-panel);
  background: var(--material);
  font-family: var(--system);
}

.group .row {
  color: #f2f2f3;
}

.group li:not([hidden]) ~ li > .row::before {
  background: rgb(255 255 255 / 0.075);
}

.group .row__price {
  color: var(--white);
}

.group .chev {
  color: #5c5f63;
}

.group .row:hover {
  background: rgb(255 255 255 / 0.045);
}

.group .row:active {
  background: rgb(255 255 255 / 0.08);
}

.group .row:hover .chev {
  color: var(--accent);
}

.group .row:focus-visible {
  outline-offset: -3px;
  border-radius: var(--r-panel);
}

@media (min-width: 900px) {
  .groups {
    columns: 2;
    column-gap: 28px;
  }
}

/* ---------- Legal notice, privacy and the 404 page ---------- */

/* One reading column, its heading in the hero's serif at a smaller size, its body in the sans. */
.doc {
  padding-top: clamp(44px, 6vw, 88px);
}

.doc__col {
  max-width: 35rem;
  margin-inline: auto;
}

.doc h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(40px, 2.8vw + 28px, 66px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.doc__body {
  margin-top: clamp(26px, 3vw, 38px);
  padding-top: clamp(26px, 3vw, 38px);
  border-top: 1px solid var(--rule);
  color: var(--sub);
  font-size: 17px;
  line-height: 1.7;
}

.doc__body p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

.doc__body h2 {
  margin: 2.4em 0 0.6em;
  color: var(--white);
  font-family: var(--sans);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

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

/* The operator's address, set apart on a panel of the page's material. */
.doc__body address {
  margin: 1.1em 0 1.3em;
  padding: 20px 24px;
  border: 1px solid var(--material-edge);
  border-radius: var(--r-panel);
  background: var(--material);
  color: var(--white);
  font-style: normal;
  line-height: 1.65;
}

.doc__body a:not(.cta) {
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  transition: text-decoration-thickness 0.2s ease;
}

.doc__body a:not(.cta):hover {
  text-decoration-thickness: 2.5px;
}

.doc__action {
  padding-top: 6px;
}

.doc__action .cta {
  margin-top: 0;
}

.doc__action .cta__chip svg {
  width: 16px;
  height: 14px;
}

.doc__action .cta:hover .cta__chip svg {
  transform: translateX(2px);
}

.doc__langs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

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

@media (max-width: 759px) {
  .doc__body {
    font-size: 16px;
  }

  .doc__body h2 {
    font-size: 18px;
  }

  .doc__body address {
    padding: 18px 20px;
  }
}

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

.foot {
  margin-top: clamp(80px, 10vw, 140px);
  border-top: 1px solid var(--rule);
  color: var(--sub);
  font-size: 15px;
}

.foot__grid {
  display: grid;
  gap: 28px 40px;
  padding-top: 44px;
}

.foot__about p {
  max-width: 30em;
  margin: 12px 0 0;
  line-height: 1.6;
}

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

.foot__worlds ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  column-gap: 32px;
}

.foot__worlds a,
.foot__langs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #d4d5d7;
  transition: color 0.2s ease;
}

.foot__worlds a:hover,
.foot__langs a:hover {
  color: var(--white);
}

.foot__langs {
  display: flex;
  gap: 20px;
  align-self: start;
}

.foot__langs a[aria-current] {
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* The base line: the page's date, and the legal notice and the privacy page at the far end. */
.foot__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 28px;
  margin-top: 32px;
  padding-block: 12px 22px;
  border-top: 1px solid var(--rule);
  color: var(--faint);
  font-size: 13px;
}

.foot__base p {
  margin: 0;
  padding-block: 12px;
}

.foot__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0 22px;
}

.foot__legal a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--sub);
  transition: color 0.2s ease;
}

.foot__legal a:hover {
  color: var(--white);
}

.foot__legal a[aria-current="page"] {
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

@media (min-width: 860px) {
  .foot__grid {
    grid-template-columns: minmax(0, 1.4fr) auto auto;
  }
}

/* ---------- Phones ---------- */

@media (max-width: 759px) {
  .top__row {
    grid-template-columns: 1fr auto;
    height: 62px;
  }

  .top__nav {
    display: none;
  }

  .hero h1 em {
    padding-right: 0.06em;
  }
}

@media (max-width: 380px) {
  .langs a {
    min-width: 40px;
  }

  .seg {
    padding: 0 13px;
  }
}

/* ---------- Entrance: once, on load ---------- */

@keyframes hub-fade-up {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes hub-fade {
  from {
    opacity: 0;
  }
}

@keyframes hub-wipe {
  from {
    opacity: 0;
    clip-path: inset(-10% -5% 100% -5%);
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    clip-path: inset(-10% -5% -20% -5%);
    transform: none;
  }
}

@keyframes hub-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes hub-card {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .top .brand {
    animation: hub-fade-up 0.48s var(--ease-out) 0.04s backwards;
  }

  .top__nav {
    animation: hub-fade 0.52s var(--ease-out) 0.11s backwards;
  }

  .langs {
    animation: hub-fade-up 0.5s var(--ease-out) 0.15s backwards;
  }

  .hero h1 {
    animation: hub-wipe 0.9s var(--ease-out) 0.21s backwards;
  }

  .hero__sub {
    animation: hub-rise 0.57s var(--ease-out) 0.55s backwards;
  }

  .cta {
    animation: hub-card 0.6s var(--ease-out) 0.75s backwards;
  }

  .doc__col {
    animation: hub-rise 0.57s var(--ease-out) 0.08s backwards;
  }

  .doc .cta {
    animation: none;
  }

  .world {
    animation: hub-card 0.86s var(--ease-out) backwards;
  }

  .world:nth-child(1) {
    animation-delay: 0.92s;
  }

  .world:nth-child(2) {
    animation-delay: 1.04s;
  }

  .world:nth-child(3) {
    animation-delay: 1.16s;
  }

  .world:nth-child(4) {
    animation-delay: 1.28s;
  }

  .world:nth-child(5) {
    animation-delay: 1.4s;
  }

  .world:nth-child(n + 6) {
    animation-delay: 1.52s;
  }
}

@media (prefers-reduced-motion: no-preference) and (max-width: 699px) {
  .world {
    animation: none;
  }

  .rail {
    animation: hub-rise 0.87s var(--ease-out) 0.95s backwards;
  }

  .dots {
    animation: hub-rise 0.43s var(--ease-out) 1.4s backwards;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .world:active,
  .world:hover,
  .world:hover:active,
  .cta:active,
  .world__open:active {
    transform: none !important;
  }
}
