/* Landing page styles (/ and /fr/). Same tokens as src/constants/theme.ts. */
:root {
  --background: #F3F3EA;
  --surface: #FFFFFF;
  --lime: #E2F55A;
  --ink: #1E1E1E;
  --muted: #6E6E68;
  --green: #2F6B4A;
  --sky: #C3E7EC;
  --butter: #FBE3A1;
  --coral: #F26B3A;
  --radius: 28px;
  --gutter: 16px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--background);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 12px; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
@media (min-width: 720px) { :root { --gutter: 24px; } }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: calc(env(safe-area-inset-top) + 16px);
  padding-bottom: 16px;
}
.wordmark { height: 26px; width: auto; }
.header-links { display: flex; align-items: center; gap: 8px; }

/* Buttons */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 0;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
}
.pill:active { transform: scale(.97); }
.pill-ink { background: var(--ink); color: var(--surface); }
.pill-white { background: var(--surface); color: var(--ink); }
.pill-lime { background: var(--lime); color: var(--ink); }
.pill-lg { min-height: 56px; padding: 16px 28px; font-size: 17px; }
.pill svg { width: 20px; height: 20px; flex: none; }
.header-cta { display: none; }
@media (min-width: 560px) { .header-cta { display: inline-flex; } }

/* Hero */
.hero {
  background: var(--lime);
  border-radius: var(--radius);
  padding: 32px 24px 0;
  display: grid;
  gap: 32px;
  overflow: hidden;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 14px 6px 10px;
  font-size: 13px;
  font-weight: 600;
}
.eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}
.hero h1 {
  margin-top: 20px;
  font-size: clamp(40px, 10.5vw, 76px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.hero-lead {
  margin-top: 20px;
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.5;
  max-width: 34ch;
}
.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-note { margin-top: 14px; font-size: 13px; font-weight: 500; }
.hero-phone { display: flex; justify-content: center; align-items: flex-end; }

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    padding: 56px 56px 0;
    gap: 40px;
  }
  .hero-copy { padding-bottom: 56px; }
}

/* Phone mockup of the Home screen */
.phone {
  width: min(300px, 82vw);
  background: var(--ink);
  border-radius: 48px 48px 0 0;
  padding: 10px 10px 0;
  flex: none;
}
.screen {
  background: var(--background);
  border-radius: 38px 38px 0 0;
  padding: 14px 14px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 12px;
}
.status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}
.island { width: 84px; height: 24px; background: var(--ink); border-radius: 999px; }
.status-icons { display: flex; gap: 4px; align-items: center; }
.status-icons i { display: block; width: 16px; height: 9px; border-radius: 2px; background: var(--ink); }
.status-icons i:first-child { width: 12px; opacity: .8; }
.screen-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}
.screen-top strong { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.gear {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-items: center;
}
.gear svg { width: 17px; height: 17px; }
.balance {
  background: var(--lime);
  border-radius: 22px;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.balance-meta { font-size: 11px; font-weight: 500; }
.balance-amount { font-size: 34px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
.balance-amount small { font-size: 14px; font-weight: 600; letter-spacing: 0; }
.balance-label { font-size: 11px; }
.balance-btn {
  margin-top: 2px;
  background: var(--surface);
  border-radius: 999px;
  padding: 9px 22px;
  font-size: 12px;
  font-weight: 600;
}
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile {
  background: var(--surface);
  border-radius: 18px;
  padding: 10px 12px 12px;
  height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
}
.tile img { width: 44px; height: 44px; margin: -4px 0 0 -4px; }

/* Sections */
.section { padding: 72px 0 0; }
@media (min-width: 900px) { .section { padding-top: 112px; } }
.section-head { max-width: 680px; margin-bottom: 32px; }
.kicker { font-size: 14px; font-weight: 600; color: var(--muted); }
.section h2 {
  margin-top: 8px;
  font-size: clamp(30px, 5.4vw, 50px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.section-head p { margin-top: 14px; font-size: 18px; color: var(--muted); }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3 { font-size: 20px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.card p { margin-top: 8px; color: var(--muted); }

/* How it works */
.steps { display: grid; gap: 12px; list-style: none; padding: 0; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.step { display: flex; flex-direction: column; gap: 16px; }
.step-top { display: flex; justify-content: space-between; align-items: flex-start; }
.step img { width: 96px; height: 96px; margin: -8px 0 0 -8px; }
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--background);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
}

/* Receipt split demo */
.split {
  display: grid;
  gap: 24px;
  align-items: center;
}
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; } }
.split .section-head { margin-bottom: 0; }
.checks { list-style: none; padding: 0; margin-top: 24px; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks li::before {
  content: '';
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E1E1E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.receipt { padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.receipt-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 4px 4px 12px;
}
.receipt-head strong { font-size: 18px; font-weight: 700; }
.receipt-head span { font-size: 14px; color: var(--muted); font-weight: 500; }
.receipt-hint { padding: 0 4px 8px; font-size: 13px; color: var(--muted); }
.line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-top: 1px solid #EDEDE4;
}
.line-name { font-weight: 500; min-width: 0; }
.line-price { font-variant-numeric: tabular-nums; font-weight: 600; }
.chip {
  min-width: 84px;
  min-height: 36px;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: var(--background);
  cursor: pointer;
  transition: background-color .2s ease, transform .15s ease;
}
.chip:active { transform: scale(.95); }
.chip[data-owner='1'] { background: var(--lime); }
.chip[data-owner='2'] { background: var(--sky); }
.result {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.share { background: var(--background); border-radius: 20px; padding: 14px 16px; }
.share:first-child { background: var(--lime); }
.share:last-child { background: var(--sky); }
.share span { display: block; font-size: 13px; font-weight: 500; }
.share strong { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.share small { font-size: 13px; font-weight: 600; }

/* Features */
.features { display: grid; gap: 12px; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .features { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.feature img { width: 72px; height: 72px; margin: -6px 0 12px -6px; }

/* What you can track: two bands scrolling in opposite directions (static without motion) */
.marquee { display: grid; gap: 12px; }
.marquee-row { display: flex; }
.track {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  padding: 0;
}
.track[aria-hidden] { display: none; }
.cat {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 26px 8px 10px;
  font-size: 18px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color .3s ease;
}
.cat img { width: 52px; height: 52px; transition: transform .5s var(--spring); }
@media (hover: hover) {
  .cat:hover { background: var(--lime); }
  .cat:hover img { transform: rotate(-10deg) scale(1.12); }
}

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border-radius: 24px; }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 17px;
  font-weight: 700;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '';
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--background) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E1E1E' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 24px 22px; color: var(--muted); max-width: 64ch; }

/* Final call to action */
.cta {
  background: var(--ink);
  color: var(--surface);
  border-radius: var(--radius);
  padding: 40px 24px;
  display: grid;
  gap: 24px;
  align-items: center;
}
.cta h2 { margin: 0; color: var(--surface); }
.cta p { margin-top: 12px; color: #C9C9C0; font-size: 18px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 900px) {
  .cta { grid-template-columns: 1fr auto; padding: 56px; }
}

/* Footer */
.site-footer {
  padding: 48px 0 calc(env(safe-area-inset-bottom) + 32px);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--muted);
}
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; font-weight: 500; }
.site-footer a:hover { color: var(--ink); }
.site-footer .wordmark { height: 20px; opacity: .55; }

/* Language switcher: a pill at the end of the footer that opens a list upward. */
.lang-switch {
  position: relative;
  margin-inline-start: auto;
  z-index: 20;
}
.lang-switch summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px 10px 12px;
  border: 1px solid rgba(30, 30, 30, .12);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.lang-switch summary::-webkit-details-marker { display: none; }
/* Chevron drawn centred in its own box, so flipping it keeps it in place. */
.lang-switch summary::after {
  content: '';
  width: 12px;
  height: 12px;
  flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 7.75 6 4.25l3.5 3.5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 7.75 6 4.25l3.5 3.5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .25s var(--ease);
}
.lang-switch[open] summary::after { transform: rotate(180deg); }
.lang-switch nav {
  position: absolute;
  inset-inline-end: 0;
  bottom: calc(100% + 8px);
  display: grid;
  min-width: 184px;
  padding: 6px;
  border: 1px solid rgba(30, 30, 30, .12);
  border-radius: 24px;
  background: var(--surface);
}
.lang-switch a {
  display: flex;
  color: var(--ink);
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.lang-switch a:hover { background: var(--background); }
.lang-switch a[aria-current] { background: var(--lime); font-weight: 600; }
.lang-switch img {
  width: 24px;
  height: 16px;
  flex: none;
  object-fit: cover;
  border-radius: 4px;
  outline: 1px solid rgba(30, 30, 30, .1);
  outline-offset: -1px;
}
.anim .lang-switch[open] nav { animation: rise .3s var(--ease); }

/* ---------- Motion ----------
   Everything below runs only with html.anim, which the head script sets unless the visitor
   prefers reduced motion. */

/* Pill labels roll up to a copy of themselves on hover. */
.label {
  position: relative;
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  line-height: 1.3;
}
.label > span { display: block; }
.label::after {
  content: attr(data-text);
  content: attr(data-text) / '';
  position: absolute;
  left: 0;
  top: 100%;
  white-space: nowrap;
}
.pill-ink .logo-android { color: #3DDC84; }
.pill svg { transition: transform .5s var(--spring); }
@media (hover: hover) {
  .anim .label > span, .anim .label::after { transition: transform .5s var(--ease); }
  .anim .pill:hover .label > span, .anim .pill:hover .label::after { transform: translateY(-100%); }
  .anim .pill:hover svg { transform: rotate(-10deg) scale(1.12); }
}

/* Cards fill with their colour from where the pointer enters. */
.fx { position: relative; isolation: isolate; overflow: hidden; }
.fx::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: var(--x, 50%);
  top: var(--y, 100%);
  width: 280%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--fill, var(--lime));
  transform: translate(-50%, -50%) scale(0);
  transition: transform .8s var(--ease);
}
.fx img { transition: transform .6s var(--spring); }
.fx p, .step-num { transition: color .4s ease, background-color .4s ease; }
@media (hover: hover) {
  .anim .fx:hover::before { transform: translate(-50%, -50%) scale(1); }
  .anim .fx:hover img { transform: translateY(-6px) rotate(-8deg) scale(1.08); }
  .anim .fx:hover p { color: var(--ink); }
  .anim .fx:hover .step-num { background: var(--surface); }
}

/* Hero entrance */
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }
@keyframes hero-in { from { opacity: 0; clip-path: inset(6% 4% 0 4% round 28px); } to { clip-path: inset(0 round 28px); } }
@keyframes phone-in { from { transform: translateY(70%); } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } }
.anim .hero { animation: hero-in 1.1s var(--ease) both; }
.anim .hero-copy > :not(h1) { animation: rise .9s var(--ease) both; }
.anim .hero-copy > .eyebrow { animation-delay: .2s; }
.anim .hero-copy > .hero-lead { animation-delay: .55s; }
.anim .hero-copy > .hero-actions { animation-delay: .65s; }
.anim .hero-copy > .hero-note { animation-delay: .75s; }
.anim .hero h1 { --d: .25s; }
.anim .phone { animation: phone-in 1.3s var(--ease) .35s both; }
.anim .tile { animation: pop .7s var(--spring) both; }
.anim .tile:nth-child(1) { animation-delay: 1.1s; }
.anim .tile:nth-child(2) { animation-delay: 1.18s; }
.anim .tile:nth-child(3) { animation-delay: 1.26s; }
.anim .tile:nth-child(4) { animation-delay: 1.34s; }
.hero-phone { transform-origin: 50% 100%; transition: transform .6s var(--ease); }

/* Headings: words slide up from behind a mask. */
.anim [data-split]:not(.is-split) { opacity: 0; }
.anim [data-split] .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: .12em;
  margin-bottom: -.12em;
}
.anim [data-split] .w > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s var(--ease);
  transition-delay: calc(var(--d, 0s) + var(--wi) * 50ms);
}
.anim [data-split].in .w > span { transform: none; }

/* Blocks fade up as they scroll into view. */
.anim [data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0s);
}
.anim [data-reveal].in { opacity: 1; transform: none; }
/* Once in, hover transforms shouldn't wait for the reveal delay. */
.anim .fx.in { transition-delay: 0s; }

/* Receipt demo */
@keyframes chip-pop { 40% { transform: scale(1.12); } }
.anim .chip.pop { animation: chip-pop .45s var(--spring); }

/* FAQ */
@media (hover: hover) {
  .faq summary::after { transition: transform .3s var(--ease), background-color .3s ease; }
  .faq summary:hover::after { background-color: var(--lime); }
}
.anim .faq details[open] p { animation: rise .5s var(--ease); }

/* Bands scroll forever, edge to edge; hovering pauses them. */
@keyframes marquee { to { transform: translateX(-50%); } }
.anim .marquee {
  margin: 0 calc(50% - 50vw);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.anim .marquee-row { width: max-content; animation: marquee 48s linear infinite; }
.anim .marquee-row.reverse { animation-direction: reverse; animation-duration: 56s; }
.anim .marquee:hover .marquee-row { animation-play-state: paused; }
.anim .track { flex-wrap: nowrap; padding-right: 12px; }
.anim .track[aria-hidden] { display: flex; }

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

/* Legal pages (/privacy/, /terms/ and their /fr/ versions) */
.legal {
  max-width: 820px;
  margin: 8px auto 0;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px 24px 40px;
}
@media (min-width: 720px) { .legal { padding: 56px 64px 64px; } }
.legal h1 {
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.legal .updated { margin-top: 10px; color: var(--muted); font-size: 14px; font-weight: 500; }
.legal .note {
  margin-top: 24px;
  background: var(--lime);
  border-radius: 20px;
  padding: 16px 20px;
  font-weight: 500;
}
.legal h2 {
  margin-top: 40px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.legal p, .legal li { margin-top: 12px; color: #3D3D39; }
.legal ul { padding-left: 22px; }
.legal li::marker { color: var(--muted); }
.legal strong { color: var(--ink); font-weight: 700; }
.legal a { text-underline-offset: 3px; }

/* ---------- Audience pages (/roommates/, /couples/) ---------- */
.hero-art {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 340px;
  margin: 0 auto;
  padding-bottom: 32px;
}
.art-tile {
  aspect-ratio: 1;
  background: var(--surface);
  border-radius: 32px;
  display: grid;
  place-items: center;
}
.art-tile img { width: 78%; height: auto; }
.art-tile:nth-child(even) { transform: translateY(28px); }
.anim .art-tile { animation: pop .8s var(--spring) both; }
.anim .art-tile:nth-child(1) { animation-delay: .5s; }
.anim .art-tile:nth-child(2) { animation-delay: .6s; }
.anim .art-tile:nth-child(3) { animation-delay: .7s; }
.anim .art-tile:nth-child(4) { animation-delay: .8s; }
@media (min-width: 900px) { .hero-art { padding-bottom: 72px; } }

/* A month of expenses with their splits */
.month { padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.month .line { grid-template-columns: 1fr auto; row-gap: 6px; }
.line-meta { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }
.line-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.tag {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 13px;
  font-weight: 600;
  background: var(--background);
}
.tag-lime { background: var(--lime); }
.tag-sky { background: var(--sky); }
.tag-butter { background: var(--butter); }
.balances { margin-top: 8px; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.balances .share:nth-child(n) { background: var(--background); }
.balances .share.plus { background: var(--lime); }
.balances .share strong { font-size: 20px; }

/* "Made for" cards; the ones not built yet are greyed out and not links */
.for-grid { display: grid; gap: 12px; }
@media (min-width: 820px) { .for-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.for-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.for-card img { width: 88px; height: 88px; margin: -8px 0 0 -8px; }
.for-card .more { margin-top: auto; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.for-card .more::after { content: '→'; transition: transform .4s var(--spring); }
@media (hover: hover) { .anim .for-card:hover .more::after { transform: translateX(6px); } }
.soon { opacity: .55; filter: grayscale(1); cursor: default; }
.badge {
  align-self: flex-start;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 700;
  background: var(--background);
  color: var(--muted);
}

/* ---------- Blog ---------- */
.page-head { padding: 24px 0 8px; max-width: 760px; }
.page-head h1 {
  margin-top: 8px;
  font-size: clamp(38px, 7vw, 64px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.page-head p { margin-top: 16px; font-size: 18px; color: var(--muted); }
.posts { display: grid; gap: 12px; margin-top: 32px; }
@media (min-width: 820px) { .posts { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
.post { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; }
.post.featured { background: var(--lime); }
@media (min-width: 820px) { .post.featured { grid-column: 1 / -1; padding: 40px; } }
.post.featured h2, .post.featured h3 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.post.featured p { color: var(--ink); }
.post .meta { font-size: 13px; font-weight: 600; color: var(--muted); }
.post.featured .meta { color: var(--ink); }

/* Articles reuse .legal's card; these are the extras */
.crumbs { max-width: 820px; margin: 8px auto 12px; font-size: 14px; color: var(--muted); font-weight: 500; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.legal h3 { margin-top: 24px; font-size: 18px; font-weight: 700; }
.table-wrap { margin-top: 16px; overflow-x: auto; }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.legal th, .legal td { padding: 10px 12px; text-align: right; border-bottom: 1px solid #EDEDE4; white-space: nowrap; }
.legal th:first-child, .legal td:first-child { text-align: left; }
.legal thead th { font-size: 13px; color: var(--muted); font-weight: 600; }
.legal tfoot td { font-weight: 700; border-bottom: 0; }
.legal ol { padding-left: 22px; }
.legal .cta-inline { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Arabic (dir="rtl") ---------- */
[lang="ar"] body { font-family: 'Plus Jakarta Sans', 'IBM Plex Sans Arabic', system-ui, -apple-system, sans-serif; }
/* Arabic letters join; tracking would break the words apart. */
[dir="rtl"] * { letter-spacing: 0 !important; }
[dir="rtl"] .label::after { left: auto; right: 0; }
[dir="rtl"] .eyebrow { padding: 6px 10px 6px 14px; }
[dir="rtl"] .cat { padding: 8px 10px 8px 26px; }
[dir="rtl"] .legal ul, [dir="rtl"] .legal ol { padding-left: 0; padding-right: 22px; }
[dir="rtl"] .legal th, [dir="rtl"] .legal td { text-align: left; }
[dir="rtl"] .legal th:first-child, [dir="rtl"] .legal td:first-child { text-align: right; }
[dir="rtl"].anim .track { padding-right: 0; padding-left: 12px; }
@keyframes marquee-rtl { to { transform: translateX(50%); } }
[dir="rtl"].anim .marquee-row { animation-name: marquee-rtl; }
[dir="rtl"] .for-card .more::after { content: '←'; }
@media (hover: hover) { [dir="rtl"].anim .for-card:hover .more::after { transform: translateX(-6px); } }
[dir="rtl"] .lang-switch summary { padding: 10px 12px 10px 16px; }
/* Arabic script needs more room between lines than the tight Latin display headings. */
[dir="rtl"] h1, [dir="rtl"] h2 { line-height: 1.25; }
