/* Rezimob site: "price tag / SIM card". Paper, ink and one lime signal.
   No inline styles or scripts anywhere: the CSP has no 'unsafe-inline'.
   Font URLs carry ?v=: bump it together with FONT_VERSION in app/site/routes.py. */

@font-face {
  font-family: "Rubik";
  src: url(../fonts/rubik-700.woff2?v=2) format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rubik";
  src: url(../fonts/rubik-400.woff2?v=2) format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url(../fonts/jetbrains-mono-latin.woff2?v=2) format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url(../fonts/jetbrains-mono-cyrillic.woff2?v=2) format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --paper: #f3f0e8;
  --paper-deep: #ebe6da;
  --card: #fbfaf5;
  --ink: #121212;
  --muted: #5b574f;
  --rule: #d9d3c7;
  --rule-strong: #b9b2a3;
  --lime: #c8f03c;
  --black: #121212; /* fixed dark: text on lime, the proxy-line chip, the footer */
  --white: #edeae2; /* fixed light text on --black */
  --edge: #121212; /* SIM outlines */
  --drop: #121212; /* hard offset shadows */
  --grid: rgb(18 18 18 / 0.055);
  --focus: #121212;
  --display: "Rubik", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono",
    monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --cut: 44px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f0f0e;
    --paper-deep: #151513;
    --card: #1a1a17;
    --ink: #edeae2;
    --muted: #aaa598;
    --rule: #2f2d29;
    --rule-strong: #4a4740;
    --edge: #edeae2;
    --drop: #c8f03c;
    --grid: rgb(237 234 226 / 0.045);
    --focus: #c8f03c;
  }
}

/* ---------- base ---------- */

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

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

body {
  margin: 0;
  min-width: 320px;
  background-color: var(--paper);
  /* faint paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--display);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  text-wrap: balance;
  word-spacing: 0.05em; /* tight tracking would otherwise close up the spaces */
}

p {
  text-wrap: pretty;
}

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

main:focus {
  outline: none;
}

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

.vh {
  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;
  left: 12px;
  top: -80px;
  z-index: 10;
  padding: 12px 16px;
  background: var(--lime);
  color: var(--black);
  font-weight: 700;
  border: 2px solid var(--black);
  border-radius: 10px;
}

.skip:focus {
  top: 12px;
}

/* SIM silhouette: a rounded rectangle with one clipped corner */
.sim-mark {
  display: inline-block;
  flex: none;
  width: 0.72em;
  height: 0.94em;
  background: var(--ink);
  border-radius: 0.14em;
  clip-path: polygon(0 0, 58% 0, 100% 32%, 100% 100%, 0 100%);
  position: relative;
}

.sim-mark::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  top: 46%;
  height: 34%;
  background: var(--lime);
  border-radius: 0.06em;
}

.sim-mark--lime {
  background: var(--lime);
  outline: 0;
}

.sim-mark--lime::after {
  background: var(--black);
}

/* SIM chip: lime pad with contact lines */
.chip {
  display: block;
  flex: none;
  width: 52px;
  height: 40px;
  border: 2px solid var(--black);
  border-radius: 9px;
  background:
    linear-gradient(var(--black), var(--black)) 50% 0 / 2px 30% no-repeat,
    linear-gradient(var(--black), var(--black)) 50% 100% / 2px 30% no-repeat,
    linear-gradient(var(--black), var(--black)) 0 50% / 30% 2px no-repeat,
    linear-gradient(var(--black), var(--black)) 100% 50% / 30% 2px no-repeat,
    radial-gradient(closest-side, transparent 58%, var(--black) 60% 74%, transparent 76%) 50% 50% / 44% 50% no-repeat,
    var(--lime);
}

/* ---------- buttons & links ---------- */

.btn {
  --shadow: var(--drop);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 48px;
  padding: 0.7em 1.25em;
  font: 700 1rem/1.1 var(--display);
  letter-spacing: -0.005em;
  text-decoration: none;
  border: 2px solid var(--black);
  border-radius: 12px;
  box-shadow: 4px 4px 0 var(--shadow);
  transition:
    transform 0.14s ease,
    box-shadow 0.14s ease,
    background-color 0.14s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn .icon {
  width: 1.2em;
  height: 1.2em;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--shadow);
}

.btn:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--shadow);
}

.btn--lime {
  background: var(--lime);
  color: var(--black);
}

@media (prefers-color-scheme: dark) {
  .btn--lime {
    --shadow: var(--white);
  }
}

.btn--ink {
  --shadow: var(--lime);
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.btn--sm {
  min-height: 44px;
  padding: 0.55em 1em;
  font-size: 0.9375rem;
  box-shadow: 3px 3px 0 var(--shadow);
}

.btn--lg {
  min-height: 56px;
  padding: 0.85em 1.5em;
  font-size: 1.125rem;
}

.btn:focus-visible {
  outline-color: var(--focus);
  outline-offset: 4px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 44px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.link-arrow span {
  transition: transform 0.2s ease;
}

.link-arrow:hover span {
  transform: translateY(3px);
}

.split__head .link-arrow:hover span {
  transform: translateX(4px);
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--rule);
}

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  padding-block: 10px;
}

@media (min-width: 520px) {
  .header-row {
    column-gap: 28px;
  }
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.32em;
  min-height: 44px;
  font: 700 1.625rem/1 var(--display);
  letter-spacing: -0.045em;
  text-decoration: none;
}

.header-row .wordmark {
  margin-right: auto;
}

.nav ul,
.langs ul,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav ul {
  gap: 0 22px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.9688rem;
  text-decoration: none;
  background: linear-gradient(var(--lime), var(--lime)) 0 78% / 0 0.42em no-repeat;
  transition: background-size 0.25s ease;
}

.nav a:hover,
.nav a[aria-current] {
  background-size: 100% 0.42em;
}

.langs ul {
  align-items: center;
}

.langs li + li::before {
  content: "·";
  color: var(--muted);
}

.langs a {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  font: 500 0.8125rem/1 var(--mono);
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
}

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

.langs a[aria-current] {
  color: var(--ink);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* phones: wordmark + languages, then the nav; the hero carries the main CTA */
.header-row .langs {
  order: 2;
}

.header-row .nav {
  order: 4;
  flex-basis: 100%;
}

.header-cta {
  order: 3;
  display: none;
}

@media (min-width: 520px) {
  .header-cta {
    display: inline-flex;
  }
}

@media (min-width: 900px) {
  .header-row {
    flex-wrap: nowrap;
    min-height: 76px;
  }

  .header-row .nav {
    order: 1;
    flex-basis: auto;
    margin-right: auto;
  }

  .header-row .wordmark {
    margin-right: 12px;
  }
}

/* ---------- hero ---------- */

.hero {
  overflow-x: clip;
  padding-block: clamp(36px, 7vw, 96px) clamp(56px, 8vw, 120px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 56px;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center;
    gap: 48px;
  }
}

.kicker {
  display: flex;
  align-items: center;
  gap: 0.7em;
  margin: 0 0 22px;
  font: 500 0.8125rem/1.35 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.kicker .sim-mark {
  font-size: 1.35rem;
  box-shadow: none;
}

.hero-title {
  margin: 0 0 24px;
  font: 700 clamp(2.5rem, 1.15rem + 5.6vw, 5.5rem)/0.98 var(--display);
  letter-spacing: -0.04em;
}

.price-unit {
  white-space: nowrap;
}

.hl {
  font-family: var(--mono);
  font-weight: 800;
  letter-spacing: -0.07em;
  white-space: nowrap;
  /* the mono face has a taller line box than Rubik: paint only around the figures */
  background: linear-gradient(var(--lime), var(--lime)) 0 52% / 100% 74% no-repeat;
  color: var(--black);
  padding: 0 0.1em 0 0.06em;
  margin-inline: 0.02em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hero-sub {
  max-width: 34em;
  margin: 0 0 34px;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
}

/* the proxy line: a ticket with notches on both ends */
.proxy-line {
  --notch: 9px;
  max-width: 41rem;
  margin: 44px 0 0;
  padding: 14px 26px 16px;
  background: var(--black);
  color: var(--white);
  border-radius: 12px;
  -webkit-mask:
    radial-gradient(circle var(--notch) at 0 50%, #0000 97%, #000),
    radial-gradient(circle var(--notch) at 100% 50%, #0000 97%, #000);
  -webkit-mask-composite: source-in;
  mask:
    radial-gradient(circle var(--notch) at 0 50%, #0000 97%, #000),
    radial-gradient(circle var(--notch) at 100% 50%, #0000 97%, #000);
  mask-composite: intersect;
}

@media (prefers-color-scheme: dark) {
  .proxy-line {
    background: #1e1e1b;
  }
}

.proxy-line figcaption {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #4a4740;
  font: 500 0.6875rem/1.2 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #aaa598;
}

.proxy-line code {
  display: block;
  font: 500 clamp(0.8125rem, 0.77rem + 0.2vw, 0.9063rem)/1.6 var(--mono);
  overflow-wrap: anywhere;
}

.pl-scheme,
.pl-sep {
  color: #aaa598;
}

.pl-pass {
  color: var(--lime);
}

/* hero art: a big SIM card, its dashed cut line and the price tag */
.hero-art {
  display: grid;
  place-items: center end;
  padding: 0 14px 12px 0;
}

.sim-stack {
  position: relative;
  width: min(58vw, 290px);
  aspect-ratio: 3 / 4;
  container-type: inline-size;
}

@media (max-width: 959.98px) {
  .hero-grid {
    gap: 36px;
  }

  .hero-art {
    margin-top: -8px;
  }

  .hero-art {
    padding-bottom: 28px;
  }
}

@media (min-width: 960px) {
  .hero-art {
    place-items: center;
    padding: 0 8px 12px;
  }

  /* the tilted card and its cut line need ~48px of room inside the column */
  .sim-stack {
    width: min(400px, 100% - 48px);
  }
}

.sim-stack__cut {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--rule-strong);
  transform: rotate(7deg) translate(4%, 2%);
}

.sim-stack__card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 11% 10% 10%;
  background: var(--ink);
  color: var(--paper);
  border-radius: 7cqw;
  clip-path: polygon(0 0, 73% 0, 100% 20.25%, 100% 100%, 0 100%);
  transform: rotate(-5deg);
  animation: sim-in 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.chip--xl {
  width: 34cqw;
  height: 26cqw;
  border-radius: 4.5cqw;
  border-width: 0.8cqw;
}

.sim-stack__word {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font: 700 25cqw/0.8 var(--display);
  letter-spacing: -0.06em;
}

.sim-stack__word span + span {
  color: var(--lime);
}

@media (prefers-color-scheme: dark) {
  /* the card turns paper-coloured: lime text would vanish on it, so "rezi" (which the
     tag never covers) gets the lime marker instead */
  .sim-stack__word span:first-child {
    background: linear-gradient(var(--lime), var(--lime)) 0 78% / 100% 30% no-repeat;
  }

  .sim-stack__word span + span {
    color: var(--black);
  }
}

.sim-stack__meta {
  display: flex;
  gap: 0.9em;
  font: 500 3.6cqw/1 var(--mono);
  letter-spacing: 0.14em;
  opacity: 0.7;
}

.tag {
  --hole: 0.6em;
  position: absolute;
  font-size: clamp(9px, 4.2cqw, 16px);
  left: -7%;
  bottom: 9%;
  display: grid;
  grid-template-columns: auto auto;
  align-items: end;
  column-gap: 0.15em;
  margin: 0;
  padding: 0.55em 1em 0.6em 2.1em;
  background: var(--lime);
  color: var(--black);
  border-radius: 0.75em;
  clip-path: polygon(15% 0, 100% 0, 100% 100%, 15% 100%, 0 50%);
  transform: rotate(-9deg);
  animation: tag-in 0.6s 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}

.tag::before {
  content: "";
  position: absolute;
  left: 0.75em;
  top: 50%;
  width: var(--hole);
  height: var(--hole);
  margin-top: calc(var(--hole) / -2);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: inset 0 0 0 2px var(--black);
}

.tag__from {
  grid-column: 1 / -1;
  font: 600 0.75em/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tag__price {
  font: 800 3.1em/1 var(--mono);
  letter-spacing: -0.07em;
}

.tag__unit {
  padding-bottom: 0.35em;
  font: 700 1.125em/1 var(--display);
}

@media (max-width: 959.98px) {
  .tag {
    bottom: -6%; /* the small card: hang below it instead of covering "mob" */
    left: -12%;
  }
}

/* ---------- sections ---------- */

.section {
  padding-block: clamp(64px, 9vw, 128px);
}

.section-title {
  margin: 0;
  font: 700 clamp(2.125rem, 1.4rem + 3.2vw, 3.75rem)/1 var(--display);
  letter-spacing: -0.035em;
}

.split {
  display: grid;
  gap: 36px;
}

@media (min-width: 960px) {
  .split {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 48px;
  }

  .split__head {
    position: sticky;
    top: 32px;
    align-self: start;
  }
}

.split__head .link-arrow {
  margin-top: 18px;
}

/* features: a spec sheet, not a card grid */
.features {
  padding-top: clamp(40px, 6vw, 88px);
}

.feature-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 44px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 3px solid var(--ink);
}

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

.feature {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  align-content: start;
  gap: 0 16px;
  padding: 24px 0 28px;
  border-bottom: 1.5px dashed var(--rule-strong);
}

.feature__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  transition: color 0.2s ease;
}

.feature__icon .icon {
  position: relative;
}

.sim-frame {
  position: absolute;
  inset: 0;
}

.sim-frame path {
  fill: transparent;
  stroke: var(--ink);
  transition: fill 0.2s ease;
}

.feature:hover .feature__icon {
  color: var(--black);
}

.feature:hover .sim-frame path {
  fill: var(--lime);
  stroke: var(--black);
}

.feature__num {
  justify-self: end;
  font: 500 0.8125rem/1 var(--mono);
  letter-spacing: 0.08em;
  color: var(--muted);
}

.feature__title {
  grid-column: 1 / -1;
  margin: 18px 0 6px;
  font: 700 1.3125rem/1.2 var(--display);
  letter-spacing: -0.015em;
}

.feature__text {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

/* ---------- prices: two SIM cards with receipt lines ---------- */

.prices {
  background-color: var(--paper-deep);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
  border-block: 1px solid var(--rule);
  scroll-margin-top: 0;
}

.prices-head {
  display: grid;
  gap: 18px;
  margin-bottom: clamp(36px, 5vw, 64px);
}

@media (min-width: 900px) {
  .prices-head {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: end;
  }
}

.prices-sub {
  max-width: 34em;
  margin: 0;
  font-size: 1.125rem;
  color: var(--muted);
}

.sims {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
}

@media (min-width: 780px) {
  .sims {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px clamp(32px, 5vw, 72px);
  }
}

.sim {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 26px;
}

/* the outline and hard shadow follow the clipped silhouette */
.sim__body {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  align-self: stretch;
  filter: drop-shadow(2px 0 0 var(--edge)) drop-shadow(-2px 0 0 var(--edge))
    drop-shadow(0 2px 0 var(--edge)) drop-shadow(0 -2px 0 var(--edge))
    drop-shadow(8px 8px 0 var(--drop));
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sim:nth-child(2) .sim__body {
  transform: rotate(0.6deg);
}

.sim:hover .sim__body {
  transform: translate(-3px, -4px) rotate(-0.5deg);
}

.sim__face {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 26px clamp(20px, 3vw, 32px) 26px;
  background: var(--card);
  border-radius: 22px;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}

/* receipt tail: a barcode at the bottom, so a shorter card ends like a receipt, not a hole */
.sim__face::after {
  content: "";
  width: min(52%, 190px);
  height: 26px;
  margin-top: auto;
  background: repeating-linear-gradient(
    90deg,
    var(--ink) 0 2px,
    transparent 2px 4px,
    var(--ink) 4px 5px,
    transparent 5px 7px,
    var(--ink) 7px 10px,
    transparent 10px 12px,
    var(--ink) 12px 13px,
    transparent 13px 17px
  );
  opacity: 0.38;
}

.sim.is-paused .sim__face::after {
  opacity: 0.15;
}

.sim__top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: calc(var(--cut) - 18px); /* clear of the clipped corner at this height */
}

.sim__name {
  min-width: 0;
  margin: 0;
  font: 700 clamp(1.5rem, 1.1rem + 1.6vw, 2.125rem)/1 var(--display);
  letter-spacing: -0.03em;
  -webkit-hyphens: auto;
  hyphens: auto;
}

@media (max-width: 400px) {
  /* small phones: the chip goes above the name, so long Cyrillic names fit on one line */
  .sim__top {
    flex-direction: column;
    align-items: flex-start;
  }
}

.sim__from {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.25em;
  margin: 30px 0 0;
}

.sim__from-label {
  flex-basis: 100%;
  margin-bottom: 4px;
  font: 500 0.75rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.sim__from-price {
  font: 800 clamp(3.25rem, 2.4rem + 3.4vw, 4.75rem)/0.95 var(--mono);
  letter-spacing: -0.075em;
  background: linear-gradient(var(--lime), var(--lime)) 0 88% / 100% 0.3em no-repeat;
}

@media (prefers-color-scheme: dark) {
  .sim__from-price {
    background: none;
    color: var(--lime);
  }
}

.sim__from-unit {
  font: 700 1.375rem/1 var(--display);
}

.perf {
  margin: 26px calc(-1 * clamp(20px, 3vw, 32px)) 18px;
  border-top: 2px dashed var(--rule-strong);
}

.receipt-head {
  margin: 0 0 4px;
  text-align: right;
  font: 500 0.6875rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.receipt {
  margin: 0 0 24px;
  font: 500 clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem)/1.3 var(--mono);
}

.receipt__row {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  padding: 8px 0;
}

.receipt dt {
  display: flex;
  flex: 1;
  align-items: baseline;
  gap: 0.5em;
  min-width: 0;
  white-space: nowrap;
}

.receipt dt::after {
  content: "";
  flex: 1;
  min-width: 1.5em;
  border-bottom: 2px dotted var(--rule-strong);
  transform: translateY(-0.28em);
}

.receipt dd {
  margin: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.receipt__row.is-best dd {
  padding: 0.1em 0.35em;
  margin-right: -0.35em;
  background: var(--lime);
  color: var(--black);
  border-radius: 4px;
}

.sim__empty {
  margin: 0 0 24px;
  padding: 10px 0 6px;
  font: 500 1rem/1.5 var(--mono);
  color: var(--muted);
}

.sim.is-empty .perf {
  margin-top: 30px;
}

/* paused: the card fades, a rubber stamp says why */
.sim.is-paused .sim__face > * {
  opacity: 0.42;
}

.sim.is-paused .sim__body {
  filter: drop-shadow(2px 0 0 var(--rule-strong)) drop-shadow(-2px 0 0 var(--rule-strong))
    drop-shadow(0 2px 0 var(--rule-strong)) drop-shadow(0 -2px 0 var(--rule-strong));
}

.stamp {
  position: absolute;
  top: 44%;
  left: 50%;
  max-width: 86%;
  margin: 0;
  padding: 0.45em 0.8em;
  font: 800 clamp(1rem, 0.85rem + 0.8vw, 1.375rem)/1.15 var(--mono);
  letter-spacing: 0.05em;
  text-align: center;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 8px;
  outline: 1.5px solid var(--ink);
  outline-offset: 3px;
  transform: translate(-50%, -50%) rotate(-10deg);
}

.prices-note {
  margin: clamp(36px, 5vw, 56px) 0 0;
  font: 500 0.875rem/1.5 var(--mono);
  color: var(--muted);
}

/* ---------- how it works: tear-off tickets ---------- */

.steps {
  --notch: 13px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: clamp(32px, 5vw, 56px) 0 0;
  padding: 0;
  list-style: none;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 20px;
}

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

.step {
  position: relative;
  padding: 30px clamp(22px, 3vw, 36px) 34px;
}

.step + .step {
  border-top: 2px dashed var(--rule-strong);
}

/* notches where the perforation meets the edge */
.step + .step::before,
.step + .step::after {
  content: "";
  position: absolute;
  top: calc(-1 * var(--notch) - 1px);
  width: calc(2 * var(--notch));
  height: calc(2 * var(--notch));
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink);
}

.step + .step::before {
  left: calc(-1 * var(--notch) - 2px);
  clip-path: inset(0 0 0 50%);
}

.step + .step::after {
  right: calc(-1 * var(--notch) - 2px);
  clip-path: inset(0 50% 0 0);
}

@media (min-width: 820px) {
  .step + .step {
    border-top: 0;
    border-left: 2px dashed var(--rule-strong);
  }

  .step + .step::before,
  .step + .step::after {
    left: calc(-1 * var(--notch) - 1px);
    right: auto;
  }

  .step + .step::before {
    top: calc(-1 * var(--notch) - 2px);
    clip-path: inset(50% 0 0 0);
  }

  .step + .step::after {
    top: auto;
    bottom: calc(-1 * var(--notch) - 2px);
    clip-path: inset(0 0 50% 0);
  }
}

.step__num {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  font: 800 1.5rem/1 var(--mono);
  background: var(--lime);
  color: var(--black);
  border: 2px solid var(--black);
  border-radius: 50%;
}

.step__title {
  margin: 22px 0 8px;
  font: 700 1.5rem/1.15 var(--display);
  letter-spacing: -0.02em;
}

.step__text {
  margin: 0;
  color: var(--muted);
}

/* ---------- FAQ teaser ---------- */

.faq-teaser {
  padding-top: 0;
}

.qa {
  border-top: 1.5px solid var(--ink);
}

.qa:last-child {
  border-bottom: 1.5px solid var(--ink);
}

.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 44px;
  padding: 20px 0;
  font: 700 clamp(1.125rem, 1rem + 0.45vw, 1.375rem)/1.25 var(--display);
  letter-spacing: -0.01em;
  list-style: none;
  cursor: pointer;
}

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

.qa summary::after {
  content: "+";
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  font: 500 1.5rem/1 var(--mono);
  border: 2px solid var(--ink);
  border-radius: 50%;
  transition:
    transform 0.25s ease,
    background-color 0.25s ease;
}

.qa summary:hover::after {
  background: var(--paper-deep);
}

.qa[open] summary::after {
  transform: rotate(45deg);
  background: var(--lime);
  color: var(--black);
  border-color: var(--black);
}

.qa__a {
  max-width: 62ch;
  padding: 0 0 26px;
}

/* ---------- rich text (FAQ answers, terms) ---------- */

.rich p,
.rich ul,
.rich ol {
  margin: 0 0 1em;
}

.rich > :last-child,
.rich section > :last-child {
  margin-bottom: 0;
}

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

.rich li {
  margin-bottom: 0.5em;
  padding-left: 0.2em;
}

.rich ul > li::marker {
  content: "▪  ";
  color: var(--muted);
}

.rich ol > li::marker {
  font: 700 0.9em var(--mono);
  color: var(--muted);
}

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

.rich a:hover {
  background: var(--lime);
  color: var(--black);
  text-decoration: none;
}

.rich code {
  padding: 0.08em 0.35em;
  font: 500 0.88em/1.4 var(--mono);
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-radius: 5px;
  overflow-wrap: anywhere;
}

.rich pre {
  margin: 0 0 1em;
  padding: 16px 18px;
  background: var(--black);
  color: var(--white);
  border-radius: 12px;
  overflow-x: auto;
}

.rich pre code {
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  overflow-wrap: normal;
  white-space: pre;
}

.rich strong {
  font-weight: 700;
}

/* <em> marks bot buttons and terms; there is no italic face, so no slanted roman */
.rich em {
  padding: 0 0.3em;
  font-style: normal;
  font-weight: 700;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-radius: 5px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- documents: terms & FAQ ---------- */

.doc {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  padding-block: clamp(28px, 5vw, 64px) clamp(64px, 9vw, 120px);
}

.toc--desktop {
  display: none;
}

@media (min-width: 1040px) {
  .doc {
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 72px;
    align-items: start;
  }

  .toc--mobile {
    display: none;
  }

  .toc--desktop {
    display: block;
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 6px 6px 6px 0;
    scrollbar-width: thin;
  }
}

.toc__title,
.toc--mobile summary {
  margin: 0 0 10px;
  font: 600 0.75rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1.5px solid var(--ink);
}

.toc__list a {
  display: grid;
  grid-template-columns: 2.2em minmax(0, 1fr);
  gap: 0.25em;
  padding: 9px 0;
  font-size: 0.9063rem;
  line-height: 1.35;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

.toc__list a:hover {
  color: var(--ink);
}

.toc__num {
  font: 500 0.8125rem/1.55 var(--mono);
}

.toc--mobile {
  margin: 0 0 8px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--card);
  font-size: 1rem;
  line-height: 1.35;
}

.toc--mobile summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  margin: 0;
  padding: 0 18px;
  color: var(--ink);
  list-style: none;
  cursor: pointer;
}

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

.toc--mobile summary::after {
  content: "+";
  font: 500 1.375rem/1 var(--mono);
  transition: transform 0.2s ease;
}

.toc--mobile[open] summary::after {
  transform: rotate(45deg);
}

.toc--mobile .toc__list {
  margin: 0 18px 12px;
  border-top-width: 1px;
}

.toc--mobile .toc__list a {
  min-height: 44px;
  align-items: center;
}

.prose {
  max-width: 70ch;
  font-size: 1.0625rem;
  line-height: 1.65;
}

.doc__path {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 10px;
  font: 500 0.75rem/1 var(--mono);
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1.5px dashed var(--rule-strong);
  border-radius: 6px;
}

.prose h1 {
  margin: 0 0 20px;
  font: 700 clamp(2.25rem, 1.5rem + 3.2vw, 3.75rem)/1 var(--display);
  letter-spacing: -0.035em;
}

.prose .meta,
.prose .lede,
.lang-note {
  margin: 0 0 1.5em;
  color: var(--muted);
}

.prose .meta {
  padding: 14px 0;
  font: 500 0.875rem/1.6 var(--mono);
  border-block: 1.5px dashed var(--rule-strong);
}

.prose .lede {
  font-size: 1.1875rem;
}

.lang-note {
  padding: 10px 14px;
  font: 500 0.875rem/1.5 var(--mono);
  background: var(--paper-deep);
  border-radius: 8px;
}

.prose h2 {
  margin: 2.2em 0 0.7em;
  padding-top: 0.9em;
  font: 700 clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem)/1.2 var(--display);
  letter-spacing: -0.02em;
  border-top: 2px solid var(--ink);
  scroll-margin-top: 20px;
}

.faq-item {
  scroll-margin-top: 20px;
}

.faq-item h2 {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.6em;
  align-items: baseline;
}

.faq-item__num {
  font: 500 0.875rem/1 var(--mono);
  color: var(--muted);
}

/* linked from the bot (/faq#connect): flash the target */
.prose h2:target,
.faq-item:target h2 {
  animation: target-flash 2.6s ease-out both;
}

.faq-item:target {
  position: relative;
}

.faq-item:target::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--lime);
  border-radius: 2px;
}

@keyframes target-flash {
  0%,
  35% {
    background: var(--lime);
    color: var(--black);
    box-shadow: 0 0 0 10px var(--lime);
  }
  100% {
    background: transparent;
    box-shadow: 0 0 0 10px transparent;
  }
}

/* ---------- CTA band: a lime receipt with a torn top edge ---------- */

.band {
  position: relative;
  margin-top: 14px;
  background: var(--lime);
  color: var(--black);
}

.band::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 10px;
  background: conic-gradient(from 135deg at 50% 0, var(--lime) 90deg, transparent 0) 0 0 / 20px 10px
    repeat-x;
}

.band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 40px;
  padding-block: clamp(48px, 7vw, 88px);
}

@media (min-width: 900px) {
  .band__inner {
    flex-wrap: nowrap;
    align-items: flex-end;
  }

  .band__inner .btn {
    flex: none;
    margin-bottom: 0.35em;
  }
}

.band__title {
  max-width: 13em;
  margin: 0;
  font: 700 clamp(2rem, 1.3rem + 3vw, 3.5rem)/1.02 var(--display);
  letter-spacing: -0.035em;
}

.band .btn--ink {
  --shadow: var(--white);
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--black);
  color: var(--white);
  padding-block: 44px 36px;
}

@media (prefers-color-scheme: dark) {
  .site-footer {
    background: #080807;
    border-top: 1px solid var(--rule);
  }
}

.footer-grid {
  display: grid;
  gap: 28px 40px;
}

@media (min-width: 820px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
    align-items: start;
  }
}

.wordmark--footer {
  font-size: 1.875rem;
}

.site-footer .sim-mark {
  background: var(--white);
}

.footer-copy {
  margin: 8px 0 0;
  font: 500 0.8125rem/1.5 var(--mono);
  color: #aaa598;
}

.footer-links {
  flex-direction: column;
}

.footer-links a,
.footer-links span {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 44px;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
  text-decoration-color: var(--lime);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.footer-links a[aria-current] {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.footer-handle {
  font: 500 0.8125rem/1 var(--mono);
  color: #aaa598;
}

.footer-label {
  margin: 0 0 2px;
  font: 500 0.6875rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #aaa598;
}

.site-footer .langs a {
  color: #aaa598;
}

.langs--footer ul {
  margin-left: -14px; /* the first 44px target starts at the column edge, text aligned */
}

.site-footer .langs a:hover,
.site-footer .langs a[aria-current] {
  color: var(--white);
}

.site-footer :focus-visible {
  outline-color: var(--lime);
}

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

.hero-copy > * {
  animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-copy > :nth-child(2) {
  animation-delay: 0.06s;
}

.hero-copy > :nth-child(3) {
  animation-delay: 0.12s;
}

.hero-copy > :nth-child(4) {
  animation-delay: 0.18s;
}

.hero-copy > :nth-child(5) {
  animation-delay: 0.26s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@keyframes sim-in {
  from {
    opacity: 0;
    transform: rotate(-16deg) translate(8%, 6%);
  }
}

@keyframes tag-in {
  from {
    opacity: 0;
    transform: rotate(-24deg) scale(1.5);
  }
}

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