/* Moneypedia by Rank, v2
   Built from the Rank website in Figma (Rank Web › Rank website Final): the same
   header, menu, CTA card and footer; the same type sizes (Dazzed: 96 hero, 56
   section titles, 18/28 card titles, 16/24 body, 14 uppercase meta) and 4rem page
   margins. Topic colours are the Figma Brand Colors pastels, each with its deep ink. */

:root {
  /* Layout: 136rem content inside 4rem margins (website), cards on cream. */
  --paper: #fcf8e8;
  --float: #241a14; /* floating controls (the phone contents pill and panel) */
  --float-ink: #fcf8e8;
  --float-line: rgba(252, 248, 232, 0.08);
  --paper-2: #f5edd8;
  --ink: #26120a;
  --ink-2: #5e4b40;
  --meta: #7a7a7a;
  --title: #702d00;
  --line: rgba(38, 18, 10, 0.1);
  --line-2: rgba(38, 18, 10, 0.18);
  --peach: #ffe4cc;
  --peach-ink: #663000;
  --hover: rgba(38, 18, 10, 0.05);
  --scrim: rgba(38, 18, 10, 0.36);
  --panel: #fffdf6;
  --shadow: 0 1px 1px rgba(38, 18, 10, 0.04), 0 2.4rem 4.8rem -1.6rem rgba(38, 18, 10, 0.22);
  --focus: #f77500;

  /* Brand Colors (Figma primitives): tiles with their own ink, the same in both themes. */
  --orange: #f77500;
  --peach-tile: #ffe6d3;
  --pink: #ffabc2;
  --yellow: #fbf4a2;
  --cyan: #c9e1ee;
  --chartreuse: #e2f86c;
  --lilac: #d6cae0;
  --biege: #efe3da;
  --brown: #702d00;
  --teal: #154347;
  --burgundy: #44061c;
  --darkbrown: #220900;
  --footer-top: #220900;
  --footer: #220900; /* the website's footer ground (userank.com, measured) */
  --warn: #a34700;

  --font: "Dazzed", "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --m: 4rem; /* page margin */
  --hd-h: 10.48rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  /* userank.com's own button spring */
  --ease-button: linear(0, 0.0059 1%, 0.0225 2%, 0.0479 3%, 0.0806 4%, 0.1191 5%, 0.1621 6%, 0.2085 7%, 0.2573 8%, 0.3075 9%, 0.3583 10%, 0.4092 11%, 0.4594 12%, 0.5084 13%, 0.556 14%, 0.6018 15%, 0.6454 16%, 0.6867 17%, 0.7256 18%, 0.762 19%, 0.7958 20%, 0.827 21%, 0.8557 22%, 0.8818 23%, 0.9054 24%, 0.9267 25%, 0.9457 26%, 0.9626 27%, 0.9774 28%, 0.9903 29%, 1.0014 30%, 1.0109 31%, 1.0189 32%, 1.0255 33%, 1.0308 34%, 1.035 35%, 1.0382 36%, 1.0404 37%, 1.0419 38%, 1.0427 39%, 1.0428 40%, 1.0425 41%, 1.0417 42%, 1.0405 43%, 1.0391 44%, 1.0374 45%, 1.0355 46%, 1.0335 47%, 1.0314 48%, 1.0292 49%, 1.027 50%, 1.0227 52%, 1.0186 54%, 1.0148 56%, 1.0114 58%, 1.0085 60%, 1.0059 62%, 1.0039 64%, 1.0022 66%, 1.0008 68%, 0.9998 70%, 0.9991 72%, 0.9986 74%, 0.9983 76%, 0.9982 78%, 0.9982 80%, 0.9983 82%, 0.9985 84%, 0.9987 86%, 0.9989 88%, 0.999 90%, 0.9992 92%, 0.9993 94%, 0.9995 96%, 0.9996 98%, 0.9997 100%);
  /* Figma's "Gentle" spring */
  --gentle: linear(0, 0.07 4%, 0.25 9.5%, 0.5 16%, 0.72 23%, 0.87 30%, 0.96 38%, 1.01 47%, 1.025 56%, 1.018 66%, 1.006 80%, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #160f0b;
    --float: #2b221c;
    --float-line: rgba(252, 248, 232, 0.1);
    --paper-2: #21170f;
    --ink: #fcf8e8;
    --ink-2: #cbbdaf;
    --meta: #9d9187;
    --title: #ffd7b5;
    --line: rgba(252, 248, 232, 0.1);
    --line-2: rgba(252, 248, 232, 0.2);
    --peach: #3a2213;
    --peach-ink: #ffd7b5;
    --hover: rgba(252, 248, 232, 0.06);
    --scrim: rgba(0, 0, 0, 0.55);
    --panel: #1e150f;
    --shadow: 0 1px 1px rgba(0, 0, 0, 0.3), 0 2.4rem 4.8rem -1.6rem rgba(0, 0, 0, 0.8);
    --warn: #ffb27a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #160f0b;
    --float: #2b221c;
    --float-line: rgba(252, 248, 232, 0.1);
  --paper-2: #21170f;
  --ink: #fcf8e8;
  --ink-2: #cbbdaf;
  --meta: #9d9187;
  --title: #ffd7b5;
  --line: rgba(252, 248, 232, 0.1);
  --line-2: rgba(252, 248, 232, 0.2);
  --peach: #3a2213;
  --peach-ink: #ffd7b5;
  --hover: rgba(252, 248, 232, 0.06);
  --scrim: rgba(0, 0, 0, 0.55);
  --panel: #1e150f;
  --shadow: 0 1px 1px rgba(0, 0, 0, 0.3), 0 2.4rem 4.8rem -1.6rem rgba(0, 0, 0, 0.8);
  --warn: #ffb27a;
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  /* the website's fluid root: 10px at a 1440px window, so every rem scales with it */
  font-size: 0.694444vw;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--hd-h) + 1.6rem);
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 2.4rem;
  font-synthesis: none;
  /* Dazzed's contextual alternates turn a lone digit in brackets into a circled one
     ("(4)" → "④"), and also rewrite "->", "1x2" and "1/2". Ordinary text is identical
     either way, so they're off: counts and story text read exactly as written. */
  font-variant-ligatures: no-contextual;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 60;
  background: var(--paper);
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
}
button,
input {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 0.3rem;
}
::selection {
  background: var(--orange);
  color: #fff;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.wrap {
  max-width: calc(136rem + 2 * var(--m));
  margin-inline: auto;
  padding-left: max(var(--m), env(safe-area-inset-left, 0px));
  padding-right: max(var(--m), env(safe-area-inset-right, 0px));
}

/* ---------------------------------------------------------------- type (website scale) */
.t-section {
  margin: 0;
  font-size: clamp(3.2rem, 3.9vw, 5.6rem);
  font-weight: 700;
  line-height: 1.214; /* 68/56 */
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.t-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.8rem;
  margin: 0;
  color: var(--meta);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 2.1rem;
  font-variant-numeric: tabular-nums;
}
.t-meta i {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 0.8rem;
  background: rgba(112, 45, 0, 0.5);
}

/* ---------------------------------------------------------------- buttons */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  height: 4.4rem;
  padding: 0 2rem;
  border: 0;
  border-radius: 2rem;
  background: var(--peach);
  color: var(--peach-ink);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 2rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), filter 0.2s;
}
.pill svg {
  width: 1.8rem;
  height: 1.8rem;
  flex: none;
}
.pill:hover {
  filter: brightness(0.97);
}
.pill:active {
  transform: scale(0.97);
}
.round {
  display: inline-grid;
  place-items: center;
  width: 4.8rem;
  height: 4.8rem;
  padding: 0;
  border: 0;
  border-radius: 4.8rem;
  background: var(--orange);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), opacity 0.2s;
}
.round svg {
  width: 2.8rem;
  height: 2.8rem;
}
.round:active {
  transform: scale(0.94);
}

/* ---------------------------------------------------------------- header (website, Figma 6350:19960)
   1440 × 104.79, 40px sides. Right: "Get the app" 16/28 + 112.8 × 60.8 store pill, 24px, 56px menu button. */
.hd {
  position: fixed;
  z-index: 50;
  top: env(safe-area-inset-top, 0px);
  left: 0;
  right: 0;
  height: var(--hd-h);
  pointer-events: none;
}
/* the backing's colour is a registered property so it can glide between the paper and a
   story's colour instead of switching (see html.hd-on-tile below) */
@property --hd-bg {
  syntax: "<color>";
  inherits: false;
  initial-value: transparent;
}
.hd::before {
  content: "";
  position: absolute;
  inset: 0 0 -2.4rem;
  --hd-bg: var(--paper);
  background: linear-gradient(var(--hd-bg) 55%, transparent);
  opacity: 0;
  transition: opacity 0.35s var(--eoq), --hd-bg 0.5s var(--eoq);
}
.hd.is-scrolled::before {
  opacity: 1;
}
.hd-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 max(4rem, env(safe-area-inset-right, 0px)) 0 max(4rem, env(safe-area-inset-left, 0px));
}
.hd a,
.hd button,
.hd input {
  pointer-events: auto;
}
.hd-logo {
  display: block;
  width: 9.345rem;
  height: 2.736rem;
  color: var(--ink);
  transition: color 0.35s;
}
.hd-logo svg {
  display: block;
  width: 100%;
  height: 100%;
}
.hd-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.hd-right {
  display: flex;
  align-items: center;
  gap: 2.4rem;
}
.hd-get {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  text-decoration: none;
}
.hd-get span:first-child {
  color: var(--ink);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 2.8rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  transition: color 0.35s;
}
.stores {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 11.28rem;
  height: 6.08rem;
  border-radius: 3.2rem;
  background: var(--orange);
  transition: transform 0.6s var(--ease-button);
}
.stores img {
  width: 6.48rem;
  height: 2.88rem;
}
.hd-get:hover .stores {
  transform: scale(1.04);
}
.menu-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 5.6rem;
  height: 5.6rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--orange);
  color: #fcf8e8;
  cursor: pointer;
  transition: background 0.35s var(--ease-out), color 0.35s var(--ease-out), transform 0.6s var(--ease-button);
}
.menu-btn:hover {
  transform: scale(1.06);
}
.menu-btn:active {
  transform: scale(0.94);
}
.menu-btn svg {
  position: absolute;
  width: 2.4rem;
  height: 2.4rem;
  transition: transform 0.45s var(--ease-out), opacity 0.25s;
}
.menu-btn .x {
  opacity: 0;
  transform: rotate(-90deg) scale(0.6);
}
.menu-open .menu-btn {
  background: #fdf8e6;
  color: #000;
}
.menu-open .menu-btn .lines {
  opacity: 0;
  transform: rotate(90deg) scale(0.6);
}
.menu-open .menu-btn .x {
  opacity: 1;
  transform: none;
}
.menu-open .hd-logo,
.menu-open .hd-get span:first-child,
.hd.on-dark .hd-logo,
.hd.on-dark .hd-get span:first-child {
  color: #fff;
}
.menu-open .hd::before {
  opacity: 0;
}
.menu-open .hd-center,
.menu-open .hd-icon {
  opacity: 0;
  pointer-events: none;
}
.hd.on-footer::before {
  background: linear-gradient(var(--footer) 55%, transparent);
  opacity: 1;
}

/* search and theme sit beside the website buttons at the same 56px size, 12px apart */
.hd-searchwrap {
  position: relative;
  display: grid;
  margin-right: -1.2rem;
}
.hd-searchwrap .hd-icon {
  margin-right: 0;
}
.hd-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 5.6rem;
  height: 5.6rem;
  margin-right: -1.2rem; /* 12px to "Get the app", like the pill's own gap */
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--hover);
  color: var(--ink);
  cursor: pointer;
  overflow: hidden;
  transition: background 0.25s, color 0.35s, transform 0.6s var(--ease-button), opacity 0.25s;
}
.hd-icon:hover {
  background: var(--line-2);
  transform: scale(1.06);
}
.hd-icon:active {
  transform: scale(0.94);
}
.hd-icon svg {
  width: 2.2rem;
  height: 2.2rem;
}
.hd-search-btn {
  display: none;
}
.hd.on-dark .hd-icon,
.menu-open .hd-icon {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.theme-btn svg {
  position: absolute;
  transition: transform 0.6s var(--ease-out), opacity 0.3s;
}
.theme-btn .moon {
  transform: translateY(2.6rem) rotate(-40deg);
  opacity: 0;
}
.theme-btn[data-theme="dark"] .sun {
  transform: translateY(-2.6rem) rotate(40deg);
  opacity: 0;
}
.theme-btn[data-theme="dark"] .moon {
  transform: none;
  opacity: 1;
}
.theme-vt::view-transition-old(root),
.theme-vt::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
.theme-vt::view-transition-group(root) {
  animation-duration: 0s;
}
/* while the columns rise, the new theme is already settled underneath them: no colour
   transitions of its own to fight the reveal (the sun/moon still turns) */
html.theme-vt *:not(.theme-btn svg),
html.theme-vt *::before,
html.theme-vt *::after {
  transition: none !important;
}
/* browsers without view transitions: a short, even cross-fade of every colour instead of a snap */
html.theme-fade *,
html.theme-fade *::before,
html.theme-fade *::after {
  transition: background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease, fill 0.45s ease, stroke 0.45s ease, box-shadow 0.45s ease !important;
}

/* ---------------------------------------------------------------- search (Linear's palette)
   One field and a list of story titles: a big quiet input, a hairline, a small label,
   then rows of arrow + title with a soft fill on the one you are on. Nothing else. */
.palette {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: max(14vh, calc(env(safe-area-inset-top, 0px) + 1.2rem)) max(1.6rem, env(safe-area-inset-right, 0px)) 2.4rem max(1.6rem, env(safe-area-inset-left, 0px));
}
.palette-scrim {
  position: absolute;
  inset: 0;
  background: var(--scrim);
  -webkit-backdrop-filter: blur(0.6rem);
  backdrop-filter: blur(0.6rem);
  animation: fade-in 0.2s ease-out both;
}
.palette-box {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(64rem, 100%);
  max-height: min(60rem, 72vh);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2rem;
  background: var(--panel);
  box-shadow: var(--shadow);
  animation: palette-in 0.32s var(--ease-out) both;
}
.palette.is-closing .palette-scrim {
  animation: fade-out 0.16s ease-in both;
}
.palette.is-closing .palette-box {
  animation: palette-out 0.16s ease-in both;
}
@keyframes palette-in {
  from {
    opacity: 0;
    transform: translateY(-0.8rem) scale(0.98);
  }
}
@keyframes palette-out {
  to {
    opacity: 0;
    transform: scale(0.98);
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
@keyframes fade-out {
  to {
    opacity: 0;
  }
}
.palette-field {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex: none;
  height: 6.8rem;
  padding: 0 2rem 0 2.4rem;
  border-bottom: 1px solid var(--line);
}
.palette-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.palette-field input::placeholder {
  color: var(--meta);
}
.palette-field input::-webkit-search-cancel-button {
  display: none;
}
.palette-field kbd,
.palette-field .palette-cancel {
  flex: none;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--line-2);
  border-radius: 0.8rem;
  background: none;
  color: var(--meta);
  font: inherit;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.8rem;
}
.palette-field .palette-cancel {
  display: none;
  border: 0;
  padding: 0.6rem 0;
  color: var(--ink);
  font-size: 1.5rem;
  cursor: pointer;
}
.palette-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.2rem 1.2rem 1.2rem;
}
.palette-label {
  margin: 0.4rem 1.2rem 0.8rem;
  color: var(--meta);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 2rem;
}
.palette-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.palette-item {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  min-height: 5.2rem;
  padding: 1.2rem 1.4rem;
  border-radius: 1.2rem;
  color: var(--ink-2);
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 2.4rem;
  text-decoration: none;
}
/* the arrow sits at the row's end and only shows on the row you are on */
.palette-item .go {
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  margin-left: auto;
  color: var(--ink);
  opacity: 0;
  transform: translateX(-0.8rem);
  transition: opacity 0.2s ease, transform 0.35s var(--ease-button);
}
.palette-item span {
  flex: 1;
  min-width: 0;
}
.palette-item mark {
  background: none;
  color: var(--ink);
  font-weight: 700;
}
.palette-item[aria-selected="true"] {
  background: var(--hover);
  color: var(--ink);
}
.palette-item[aria-selected="true"] .go {
  opacity: 1;
  transform: none;
}
.palette-empty {
  margin: 0;
  padding: 2.4rem 1.2rem;
  color: var(--ink-2);
  font-size: 1.5rem;
  line-height: 2.2rem;
  text-align: center;
}

/* ---------------------------------------------------------------- menu (as live on userank.com)
   1440: cards 260 × 280 (r 28), 3 a row, 24 gaps, from y 120; link columns at x 941, 221 wide;
   15px labels/links; Download app at the bottom right. Phone: 176 × 190 cards (r 18), 8 gaps. */
.menu {
  position: fixed;
  inset: 0;
  z-index: 45;
  overflow: auto;
  overscroll-behavior: contain;
  background: rgba(33, 13, 0, 0.9);
  /* a light, static blur: animating a full-screen 20px blur dropped frames on open */
  -webkit-backdrop-filter: blur(0.8rem);
  backdrop-filter: blur(0.8rem);
  color: #fff;
  animation: menu-in 0.35s var(--ease-out) both;
}
.menu.is-closing {
  animation: menu-out 0.25s ease-in both;
}
@keyframes menu-in {
  from {
    opacity: 0;
  }
}
@keyframes menu-out {
  to {
    opacity: 0;
  }
}
.menu-body {
  display: flex;
  align-items: flex-start;
  padding: calc(12rem + env(safe-area-inset-top, 0px)) max(4rem, env(safe-area-inset-right, 0px)) 4rem max(4rem, env(safe-area-inset-left, 0px));
}
.menu-cards {
  display: grid;
  grid-template-columns: repeat(3, 26rem);
  gap: 2.4rem;
}
.menu-card {
  display: grid;
  align-content: start;
  gap: 1.4rem;
  color: #fff;
  text-decoration: none;
  animation: rise 0.55s var(--ease-out) both;
  animation-delay: calc(80ms + var(--i) * 45ms);
}
.menu-card-img {
  display: block;
  width: 26rem;
  height: 28rem;
  border-radius: 2.8rem;
  overflow: hidden;
}
.menu-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.menu-card:hover .menu-card-img img {
  transform: scale(1.05);
}
.menu-card b {
  display: block;
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.01em;
}
.menu-card small {
  display: block;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.57;
  letter-spacing: -0.01em;
}
.menu-links {
  display: flex;
  margin-left: auto;
  margin-right: 1.6rem;
  animation: rise 0.55s var(--ease-out) both;
  animation-delay: 200ms;
}
.menu-col {
  display: grid;
  align-content: start;
  gap: 4.6rem;
  width: 22.13rem;
}
.link-group h3 {
  margin: 0 0 1.6rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 2.19rem;
  letter-spacing: -0.02em;
}
.link-group ul {
  display: grid;
  gap: 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.link-group a {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 2.4rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.link-group a:hover {
  text-decoration: underline;
  text-underline-offset: 0.3rem;
}
.link-group a.u {
  text-decoration: underline;
}
.socials-row {
  margin-top: 1.5rem;
}
.socials {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 22.1rem;
}
.socials a {
  display: block;
  width: 2.4rem;
  height: 2.4rem;
}
.socials img {
  width: 2.4rem;
  height: 2.4rem;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.socials a:hover img {
  opacity: 1;
}
.menu-download {
  position: fixed;
  right: 5.12rem;
  bottom: 5.25rem;
  animation: rise 0.55s var(--ease-out) 0.25s both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.6rem);
  }
}

/* ---------------------------------------------------------------- labels (Koto-quiet) */
.label {
  margin: 0;
  color: var(--ink-2);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 2rem;
  letter-spacing: -0.01em;
}
.label span {
  margin-left: 0.8rem;
  color: var(--meta);
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  color: var(--meta);
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.8rem;
  font-variant-numeric: tabular-nums;
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.8rem;
  border-radius: 0.6rem;
  background: var(--tile);
  color: var(--tink);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.6rem;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- CTA + footer (website) */
.cta-wrap {
  --above: var(--paper);
  margin-top: clamp(8rem, 8.3vw, 12rem);
  background: linear-gradient(180deg, var(--above) 8.4rem, var(--footer-top) 8.4rem, var(--footer) 70.4rem);
}
/* after a story, Keep reading's colour runs on behind the top of the card */
.cta-wrap[data-after] {
  margin-top: 0;
}
.cta-wrap[data-after="lilac"] {
  --above: var(--more-lilac);
}
.cta-wrap[data-after="cyan"] {
  --above: var(--more-cyan);
}
.cta {
  position: relative;
  isolation: isolate;
  height: 74rem;
  border-radius: 2.4rem;
  overflow: hidden;
  background: #26120a;
  color: #fff;
  text-align: center;
}
.cta-photo {
  /* Figma: the photo is 1764.9 × 1174.2, turned −4.12°, centred 4.1rem right of the card */
  position: absolute;
  left: -20.45%;
  top: -18.77%;
  width: 129.68%;
  height: 158.68%;
  z-index: -1;
  transform: rotate(-4.12deg);
}
.cta-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cta-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(38, 18, 10, 0.4);
}
.cta-in {
  position: absolute;
  left: calc(50% + 4.1rem);
  top: calc(50% + 10.4rem);
  display: grid;
  justify-items: center;
  gap: 2.3rem;
  width: min(63.9rem, calc(100% - 3.2rem));
  transform: translate(-50%, -50%);
}
.cta h2 {
  margin: 0;
  max-width: 59.9rem;
  font-size: clamp(4rem, 4.44vw, 6.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}
.cta p {
  margin: 0;
  max-width: 59.5rem;
  font-size: 1.6rem;
  line-height: 2.4rem;
}
/* Figma "Component 9": 340.81 × 108; on hover the row glides 23.3rem left (Smart Animate, Gentle, 1s) */
.download {
  position: relative;
  display: block;
  width: 34.081rem;
  height: 10.8rem;
  border-radius: 2rem;
  overflow: hidden;
  background: var(--orange);
  color: #fff;
  text-decoration: none;
}
.dl-track {
  position: absolute;
  left: 0.4rem;
  top: 0.4rem;
  display: flex;
  align-items: center;
  transition: transform 1s var(--gentle);
}
.download:hover .dl-track,
.download:focus-visible .dl-track {
  transform: translateX(-23.3rem);
}
.dl-text,
.dl-track .qr {
  flex: none;
}
.dl-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  width: 23.3rem;
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 2.2rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.dl-text img {
  width: 5.68rem;
  height: 2.08rem;
}
.qr {
  padding: 0.567rem;
  border-radius: 1.735rem;
  background: #fff;
}
.qr img {
  width: 8.865rem;
  height: 8.865rem;
}
/* the footer, as it is live on userank.com (measured at 1440 and 393, 2026-11-19) */
.sf {
  padding: 8rem 0;
  background: var(--footer);
  color: #fff;
}
.sf-in {
  display: flex;
  justify-content: space-between;
  gap: 13.5rem;
}
.sf-left {
  flex: none;
  width: 54.9rem;
}
.sf-logo {
  display: block;
  width: 12.3rem;
  height: 3.6rem;
}
.sf-legal {
  margin: 2.4rem 0 0;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 2.4rem;
  letter-spacing: 0;
}
.sf-rcl {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-top: 2.4rem;
}
.sf-rcl > img {
  flex: none;
  width: 7.6rem;
  height: 7.6rem;
}
.sf-lic {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 2.4rem;
  letter-spacing: 0;
}
.sf-lic > span {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.sf-lic img[src*="cbn"] {
  width: 2rem;
  height: 2.4rem;
}
.sf-lic img[src*="ndic"] {
  width: 6.4rem;
  height: 2.4rem;
}
.sf-lic-short {
  display: none;
}
.sf-qr {
  display: block;
  width: 20rem;
  height: 20rem;
  margin-top: 5.2rem;
}
.sf-nav {
  flex: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas:
    "products community company"
    "ng us contact";
  align-content: start;
  column-gap: 3.2rem;
  row-gap: 8rem;
  width: 67.6rem;
}
.sf-products {
  grid-area: products;
}
.sf-community {
  grid-area: community;
}
.sf-company {
  grid-area: company;
}
.sf-ng {
  grid-area: ng;
}
.sf-us {
  grid-area: us;
}
.sf-contact {
  grid-area: contact;
}
.sf-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8rem;
}
.sf-col h3 {
  margin: 0;
  padding: 0.4rem 0;
  color: #fff;
  opacity: 0.7;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 2.2rem;
  letter-spacing: -0.02em;
}
.sf-col a,
.sf-col p {
  margin: 0;
  padding: 0.4rem 0;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 2.4rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: opacity 0.25s var(--eoq);
}
.sf-col a.u {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3rem;
}
@media (hover: hover) {
  .sf-col a:hover {
    opacity: 0.7;
  }
}
.sf-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 2.1rem;
}
.sf-socials a {
  padding: 0.4rem 0;
  line-height: 0;
}
.sf-socials img {
  display: block;
  width: 2.4rem;
  height: 2.4rem;
}

/* ---------------------------------------------------------------- the newsletter
   In the Insights language, not a card: a hairline, a big quiet sentence on the left
   (rising line by line when it comes into view), and on the right one short line, the
   email field as an underline with a text button, and a small note. No panel, no shadow,
   no decorative cards. */
.nl {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--g);
  align-items: end;
  padding-bottom: 16rem;
}
.nl::before {
  content: "";
  grid-column: 1 / -1;
  height: 1px;
  margin-bottom: 4rem;
  background: var(--line);
}
.nl-head {
  grid-column: 1 / span 8;
}
.nl-title {
  margin: 0;
  color: var(--ink);
  font-size: 8rem;
  font-weight: 500;
  line-height: 7.6rem;
  letter-spacing: -0.035em;
}
.nl-side {
  grid-column: 9 / span 4;
  padding-bottom: 0.6rem;
}
.nl-sub {
  max-width: 36rem;
  margin: 0 0 2.4rem;
  color: var(--ink-70);
  font-size: 1.8rem;
  line-height: 2.6rem;
}
.nl-note {
  margin: 1.2rem 0 0;
  color: var(--ink-40);
  font-size: 1.4rem;
  line-height: 1.8rem;
  transition: opacity 0.3s var(--eoq);
}
/* the note steps aside for an error, and once you're subscribed */
.nl-side:has(.sub-note:not(:empty)) .nl-note,
.nl.is-done .nl-note {
  opacity: 0;
}
/* the field: an underline, the button a word with an arrow. Every state shows on the one
   line: it darkens under the pointer, an ink line draws across from the left while you're
   in it, and turns orange-brown when the address isn't one (see Letter in Sections.tsx) */
.sub {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  border-bottom: 1px solid var(--line-2);
  transition: border-color 0.3s var(--eoq);
}
.sub::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.55s var(--eoq), background-color 0.3s var(--eoq);
  pointer-events: none;
}
.sub:focus-within::after,
.sub.is-sending::after,
.sub.is-error::after {
  transform: scaleX(1);
}
.sub.is-error::after {
  background: var(--warn);
}
.sub input {
  flex: 1;
  min-width: 0;
  height: 6rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  caret-color: var(--orange);
  font: inherit;
  font-size: 2.2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  outline: none;
  transition: transform 0.35s var(--eoq), opacity 0.3s var(--eoq);
}
.sub input::placeholder {
  color: var(--ink-40);
}
/* sending: the address lifts out of the field */
.sub.is-sending input {
  opacity: 0;
  transform: translateY(-1.6rem);
  transition: transform 0.4s cubic-bezier(0.55, 0, 1, 0.45), opacity 0.3s ease-in;
}
.sub button {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  height: 6rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 1.6rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.3s var(--eoq);
}
.sub.is-sending button {
  color: var(--ink-40);
  cursor: default;
}
.sub-arrow {
  display: inline-flex;
  color: var(--ink-40);
  transition: color 0.3s var(--eoq), transform 0.4s var(--eoq), opacity 0.3s var(--eoq);
}
.sub-arrow svg {
  width: 1.8rem;
  height: 1.8rem;
}
/* a real address: the arrow lights up (and leans forward once, from script) */
.sub.is-valid .sub-arrow {
  color: var(--ink);
}
/* sending: the arrow leaves to the right */
.sub.is-sending .sub-arrow {
  opacity: 0;
  transform: translateX(1.6rem);
  transition: transform 0.35s cubic-bezier(0.55, 0, 1, 0.45), opacity 0.25s ease-in;
}
.sub button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 0.4rem;
}
@media (hover: hover) {
  .sub:hover {
    border-color: var(--ink-40);
  }
  .sub:not(.is-sending) button:hover .sub-arrow {
    transform: translateX(0.4rem);
  }
}
.sub-note {
  position: absolute;
  left: 0;
  top: calc(100% + 1.2rem);
  color: var(--warn);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.8rem;
}
.sub-note:not(:empty) {
  animation: note-in 0.3s var(--eoq) both;
}
@keyframes note-in {
  from {
    opacity: 0;
    transform: translateY(-0.4rem);
  }
}
/* done: a check that draws itself, the address, and Change */
.sub-done {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 6rem;
  margin: 0;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink);
}
.sub-check {
  flex: none;
  width: 2.2rem;
  height: 2.2rem;
}
.sub-check path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: check-draw 0.45s var(--eoq) 0.2s forwards;
}
@keyframes check-draw {
  to {
    stroke-dashoffset: 0;
  }
}
.sub-addr {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 2.2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  animation: done-in 0.5s var(--eoq) both;
}
@keyframes done-in {
  from {
    opacity: 0;
    transform: translateY(1.2rem);
  }
}
.sub-change {
  flex: none;
  height: 6rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-40);
  font: inherit;
  font-size: 1.6rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s var(--eoq);
  animation: done-in 0.5s var(--eoq) 0.1s both;
}
.sub-change:hover,
.sub-change:focus-visible {
  color: var(--ink);
}
/* the heading turning over: the old words leave upward, line by line */
.nl-head .lines.reveal.is-out .lw {
  transform: translateY(-115%);
  transition: transform 0.42s cubic-bezier(0.55, 0, 1, 0.45);
  transition-delay: calc(var(--l, 0) * 50ms);
}

/* ---------------------------------------------------------------- responsive
   Like userank.com: one desktop layout that scales with the window (root 10px at 1440),
   and one phone layout below 1024px (root 10px at 393), which also covers phones held
   sideways and small tablets: there the desktop layout would scale its text down to
   about 10px. */
@media (max-width: 1023px) {

  /* search palette on phones: pinned near the top, Cancel instead of esc */
  .palette {
    padding-top: calc(env(safe-area-inset-top, 0px) + 1.2rem);
  }

  .palette-box {
    max-height: 78svh;
  }

  .palette-field {
    height: 6rem;
    padding: 0 1.6rem 0 2rem;
  }

  .palette-field input {
    font-size: 1.8rem;
  }

  .palette-field kbd {
    display: none;
  }

  .palette-field .palette-cancel {
    display: block;
  }

  .palette-body {
    padding: 0.8rem;
  }

  .palette-item {
    padding: 1.2rem;
    font-size: 1.5rem;
    line-height: 2.2rem;
  }

  /* footer on phones, as the website lays it out at 393: one column on the left, then the
     links in two columns (Contact beside Company, the addresses last) */
  .sf {
    padding: 4rem 0;
  }
  .sf-in {
    flex-direction: column;
    gap: 4rem;
  }
  .sf-left,
  .sf-nav {
    width: auto;
  }
  .sf-lic-long {
    display: none;
  }
  .sf-lic-short {
    display: inline;
  }
  .sf-qr {
    margin-top: 4rem;
  }
  .sf-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "products community"
      "company contact"
      "ng us";
    gap: 4rem;
    padding-top: 2.4rem;
  }
  .sf-col h3,
  .sf-col a,
  .sf-col p {
    font-size: 1.2rem;
  }
  .sf-socials {
    gap: 1.2rem 2.4rem;
  }

  /* header (Figma phone header 6712:18498: 393 × 70, 16px sides, 38px button) */
  .hd-inner {
    padding: 0 max(1.6rem, env(safe-area-inset-right, 0px)) 0 max(1.6rem, env(safe-area-inset-left, 0px));
  }

  .hd-right {
    gap: 0.8rem;
  }

  .hd-center,
  .hd-get {
    display: none;
  }

  .hd-search-btn {
    display: grid;
  }

  .menu-btn,
  .hd-icon {
    /* 44px to the finger (the icon buttons clip their own edges, so their tap area can't
       reach past what's drawn: the circles themselves are 44px) */
    width: max(4.4rem, 44px);
    height: max(4.4rem, 44px);
    margin-right: 0;
  }

  .hd-searchwrap {
    margin-right: 0;
  }

  .menu-btn svg {
    width: 1.8rem;
    height: 1.8rem;
  }

  .hd-icon svg {
    width: 1.9rem;
    height: 1.9rem;
  }

  /* menu as live at 393: 176 × 190 cards (r 18), 8 gaps, 14px text, two link columns */
  .menu-body {
    flex-direction: column;
    gap: 3.4rem;
    padding: calc(6.8rem + env(safe-area-inset-top, 0px)) max(1.6rem, env(safe-area-inset-right, 0px)) 4rem max(1.6rem, env(safe-area-inset-left, 0px));
  }

  .menu-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    width: 100%;
  }

  .menu-card {
    gap: 0.95rem;
  }

  .menu-card-img {
    width: 100%;
    height: auto;
    aspect-ratio: 176 / 190;
    border-radius: 1.8rem;
  }

  .menu-card b {
    font-size: 1.4rem;
    line-height: 2.6rem;
  }

  .menu-card small {
    font-size: 1.2rem;
    line-height: 1.8rem;
  }

  .menu-links {
    width: 100%;
    margin: 0;
  }

  .menu-col {
    width: 50%;
  }

  .link-group h3 {
    font-size: 1.4rem;
    line-height: 2.04rem;
  }

  .link-group a {
    font-size: 1.4rem;
    line-height: 2.24rem;
  }

  .socials {
    width: 100%;
    max-width: 18rem;
  }

  .menu-download {
    display: none;
  }


  :root {
    --m: 2.4rem;
  }

  .nl {
    display: block;
    padding-bottom: 8rem;
  }
  .nl::before {
    display: block;
    margin-bottom: 3.2rem;
  }
  .nl-title {
    font-size: 4rem;
    line-height: 4.6rem;
    letter-spacing: -0.025em;
  }
  .nl-side {
    margin-top: 2.4rem;
    padding-bottom: 0;
  }
  .nl-sub {
    margin-bottom: 1.6rem;
    font-size: 1.6rem;
    line-height: 2.4rem;
  }
  .sub input,
  .sub-addr {
    font-size: 1.8rem;
  }
  .sub-done {
    min-height: 5.6rem;
  }
  .sub input,
  .sub button,
  .sub-change {
    height: 5.6rem;
  }



  :root {
    --m: 1.6rem;
    --hd-h: 7rem;
  }

  .cta {
    height: 62rem;
  }

  .cta-in {
    left: 50%;
    top: 50%;
    /* the column is the card's width, never the button's: on a narrow phone the
       Download app button narrows (its QR side tucks under the edge) instead of pushing
       the heading and text off the card */
    grid-template-columns: minmax(0, 1fr);
  }
  .cta h2,
  .cta-in p,
  .download {
    max-width: 100%;
  }


}

@media (max-width: 1023px) {
  html {
    /* 10px at 393 (the phone design width); held between 9.2px, so a 320 phone keeps
       readable text and 44px targets, and 11px, so wide phones and tablets don't balloon */
    font-size: clamp(9.2px, 2.54453vw, 11px);
  }
}

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

/* ================================================================ Moneypedia after Iventions' Insights
   iventions.com/insights and its story pages, measured at 1440 and rebuilt in Rank's
   type (Dazzed) and colours. Sizes are their pixels in rem (10px at 1440). */
:root {
  --more-lilac: var(--lilac);
  --more-cyan: var(--cyan);
  --eoq: cubic-bezier(0.165, 0.84, 0.44, 1); /* easeOutQuart, their hover and reveals */
  --eioq: cubic-bezier(0.76, 0, 0.24, 1); /* easeInOutQuart, their bigger moves */
  --g: 2.4rem; /* gutter */
  --ink-70: color-mix(in srgb, var(--ink) 72%, transparent);
  --ink-40: color-mix(in srgb, var(--ink) 38%, transparent);
}

/* ---------------------------------------------------------------- line reveal
   Words in clipped boxes; the padding gives ascenders and descenders room inside the
   clip while the negative margin keeps the layout as if it weren't there. */
.lines {
  position: relative;
}
.lm {
  display: inline-block;
  overflow: clip;
  padding: 0.14em 0.04em 0.16em;
  margin: -0.14em -0.04em -0.16em;
  vertical-align: top;
}
.lw {
  display: inline-block;
}
.lines.reveal .lw {
  transform: translateY(135%);
  transition: transform 0.95s var(--eoq);
  transition-delay: calc(var(--l, 0) * 90ms + 80ms);
}
.lines.reveal.is-in .lw {
  transform: none;
}

/* ---------------------------------------------------------------- home: "Inside [picture] Rank" */
.ih {
  display: grid;
  align-content: center;
  min-height: max(60rem, 75svh);
  padding: 0 max(var(--m), env(safe-area-inset-right, 0px)) 0 max(var(--m), env(safe-area-inset-left, 0px));
}
.ih-row {
  display: flex;
  align-items: center;
}
.ih-word {
  flex: none;
  position: relative;
  font-size: 12rem;
  font-weight: 600;
  line-height: 10.8rem;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.ih-mid {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 2.4rem 0 4rem;
}
.ih-line {
  flex: none;
  width: 24rem;
  margin: 0;
  font-size: 2rem;
  font-weight: 500;
  line-height: 2.2rem;
  letter-spacing: -0.02em;
}
.ih-pic {
  position: relative;
  flex: 1;
  height: 11.6rem;
  border-radius: 1.5rem;
  overflow: hidden;
  background: var(--peach-tile);
}
.ih-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
}

/* ---------------------------------------------------------------- the count and the topics, as words */
.if {
  display: flex;
  align-items: flex-start;
  gap: var(--g);
  margin-bottom: 6rem;
  font-size: 3.2rem;
  font-weight: 500;
  line-height: 3.6rem;
  letter-spacing: -0.03em;
  scroll-margin-top: calc(var(--hd-h) + 2.4rem);
}
.if-count {
  flex: none;
  font-variant-numeric: tabular-nums;
}
/* a new topic's count rolls up into place */
.if-count .lw.is-new {
  animation: count-in 0.5s var(--eoq) both;
}
@keyframes count-in {
  from {
    transform: translateY(100%);
  }
}
.if-list {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0 0.24em;
  margin: 0;
  padding: 0;
  list-style: none;
}
.if-item {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-40);
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  transition: color 0.4s var(--eoq);
}
.if-item:hover,
.if-item[aria-pressed="true"] {
  color: var(--ink);
}

/* ---------------------------------------------------------------- the grid */
.stories {
  padding-bottom: 12rem;
}
.ig {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--g);
  row-gap: 12rem;
  align-items: start;
}
.ig.is-swap {
  animation: ig-in 0.6s var(--eoq) both;
}
@keyframes ig-in {
  from {
    opacity: 0;
    transform: translateY(1.6rem);
  }
}
/* cards rise in the first time they scroll into view (lib/motion.ts); a row arrives
   left to right, 70ms apart */
.sc.will-reveal {
  opacity: 0;
  transform: translateY(2.4rem);
}
.sc.will-reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--eoq) var(--d, 0ms), transform 0.9s var(--eoq) var(--d, 0ms);
}
.s-h {
  grid-column: span 6;
}
.s-q {
  grid-column: span 3;
}
.s-t {
  grid-column: span 4;
}
.sc {
  display: block;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}
.sc-img {
  position: relative;
  display: block;
  aspect-ratio: 684 / 499;
  border-radius: 1.5rem;
  overflow: hidden;
  isolation: isolate;
  background: var(--tile);
}
.sc-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--eoq), opacity 0.6s var(--eoq);
}
/* a picture that is still on its way: it fades in when it lands (lib/motion.ts) */
.sc-img img.is-loading,
.art-prose img.is-loading {
  opacity: 0;
}
@media (hover: hover) {
  .sc:hover .sc-img img {
    transform: scale(1.05);
  }
  .sc:hover .ul {
    background-position: 0 100%;
    background-size: 100% 1px;
  }
}
.sc-type {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 2.4rem;
  color: var(--tink);
  font-size: 2.8rem;
  font-weight: 600;
  line-height: 3rem;
  letter-spacing: -0.03em;
}
.sc-txt {
  display: grid;
  grid-template-columns: 9.6rem minmax(0, 1fr);
  row-gap: 1.6rem;
  margin-top: 2.4rem;
}
.sc-date,
.sc-topic {
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.8rem;
  font-variant-numeric: tabular-nums;
}
.sc-topic {
  padding-right: 1.6rem;
}
.sc-title {
  grid-column: 1 / -1;
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 2.8rem;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}
/* half-width cards: date and topic on the left, the title beside them */
.s-h .sc-txt {
  grid-template-columns: 9.6rem 15.8rem minmax(0, 1fr);
}
.s-h .sc-title {
  grid-column: 3;
  grid-row: 1;
}
/* hover: a 1px line draws under the title from the left, line after line, and
   leaves to the right (the background switches sides instantly; only its size moves) */
.ul {
  background: linear-gradient(currentColor, currentColor) no-repeat 100% 100% / 0 1px;
  transition: background-size 0.5s var(--eoq);
}
.sc:focus-visible .ul {
  background-position: 0 100%;
  background-size: 100% 1px;
}

/* ---------------------------------------------------------------- pages
   In the topics' voice: the numbers as large quiet words (yours in ink with a line under
   it, the rest grey), "Previous" and "Next" at the grid's edges with arrows that lean the
   way they go. Long runs fold to 1 … 4 5 6 … 12. */
.pager {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  margin-top: 12rem;
}
.pg-step {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  height: 4.8rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 1.8rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: color 0.3s var(--eoq), opacity 0.3s var(--eoq);
}
.pg-prev {
  justify-self: start;
}
.pg-next {
  justify-self: end;
}
.pg-step svg {
  width: 2rem;
  height: 2rem;
  transition: transform 0.4s var(--eoq);
}
.pg-step:disabled {
  opacity: 0.3;
  cursor: default;
}
.pg-nums {
  display: flex;
  align-items: baseline;
  gap: 2.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 3.2rem;
  font-weight: 500;
  line-height: 3.6rem;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.pg-num {
  position: relative;
  min-width: 2.4rem;
  padding: 0.4rem 0.2rem;
  border: 0;
  background: none;
  color: var(--ink-40);
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  transition: color 0.3s var(--eoq);
}
.pg-num::after {
  content: "";
  position: absolute;
  left: 0.2rem;
  right: 0.2rem;
  bottom: 0;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.45s var(--eoq);
}
.pg-num[aria-current] {
  color: var(--ink);
}
.pg-num[aria-current]::after {
  transform: scaleX(1);
}
.pg-gap {
  color: var(--ink-40);
}
.pg-step:focus-visible,
.pg-num:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 0.4rem;
}
@media (hover: hover) {
  .pg-num:hover {
    color: var(--ink);
  }
  .pg-prev:not(:disabled):hover svg {
    transform: translateX(-0.4rem);
  }
  .pg-next:not(:disabled):hover svg {
    transform: translateX(0.4rem);
  }
}

/* ---------------------------------------------------------------- a story page */
.art {
  --art-bg: var(--tile);
}
.art-hero {
  padding-top: 24rem;
  background: var(--art-bg);
}
.art-title {
  display: block;
  margin: 0 auto;
  padding: 0 max(var(--m), env(safe-area-inset-left, 0px));
  max-width: 140rem;
  color: var(--ink);
  font-size: 12rem;
  font-weight: 600;
  line-height: 10.8rem;
  letter-spacing: -0.035em;
  text-align: center;
  text-wrap: balance;
}
.art-title.len-m {
  font-size: 10rem;
  line-height: 9.2rem;
}
.art-title.len-l {
  font-size: 8rem;
  line-height: 7.6rem;
}
.art-missing {
  margin: 4rem 0 0;
  padding-bottom: 16rem;
  text-align: center;
  font-size: 2rem;
}
.art-meta {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  padding: 6rem max(var(--m), env(safe-area-inset-right, 0px)) 2.4rem max(var(--m), env(safe-area-inset-left, 0px));
  font-size: 2rem;
  font-weight: 500;
  line-height: 2.4rem;
  letter-spacing: -0.02em;
  animation: meta-in 0.9s var(--eoq) both 0.5s;
}
@keyframes meta-in {
  from {
    opacity: 0;
    transform: translateY(1.2rem);
  }
}
.art-date {
  font-variant-numeric: tabular-nums;
}
.art-date span {
  color: var(--ink-70);
}
.art-topic {
  color: inherit;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) no-repeat 100% 100% / 0 1px;
  transition: background-size 0.5s var(--eoq);
}
a.art-topic:hover {
  background-position: 0 100%;
  background-size: 100% 1px;
}
.art-share {
  position: relative;
  justify-self: end;
  display: flex;
  gap: 0.4rem;
}
.share-btn {
  display: grid;
  place-items: center;
  width: 4.8rem;
  height: 4.8rem;
  padding: 0;
  border: 0;
  border-radius: 4.8rem;
  background: none;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.25s var(--eoq);
}
.share-btn svg {
  width: 2.4rem;
  height: 2.4rem;
}
.share-btn:hover {
  background: color-mix(in srgb, var(--ink) 9%, transparent);
}
.copied {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: calc(100% + 1rem);
  max-width: 28rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0.6rem 1.2rem;
  border-radius: 1.2rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 1.3rem;
  line-height: 1.8rem;
  letter-spacing: 0;
  animation: copied-in 0.3s var(--eoq) both;
}
.copied.is-out {
  animation: copied-out 0.2s cubic-bezier(0.4, 0, 1, 1) both;
}
@keyframes copied-in {
  from {
    opacity: 0;
    transform: translateY(0.6rem);
  }
}
@keyframes copied-out {
  to {
    opacity: 0;
    transform: translateY(0.3rem);
  }
}
.art-cover {
  margin: 0;
  overflow: hidden;
  animation: cover-open 1.25s var(--eioq) both 0.15s;
}
.art-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1440 / 945;
  object-fit: cover;
  animation: cover-settle 1.7s var(--eoq) both 0.15s;
}
@keyframes cover-open {
  from {
    clip-path: inset(100% 0 0 0);
  }
  to {
    clip-path: inset(0);
  }
}
@keyframes cover-settle {
  from {
    transform: scale(1.18);
  }
}
.art-cover.is-type {
  display: grid;
  place-items: center;
  aspect-ratio: 1440 / 600;
  background: color-mix(in srgb, var(--tink) 12%, var(--tile));
  color: var(--tink);
  font-size: 9.6rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}

/* the text: one calm column in the middle, contents quietly in the left margin */
.art-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68.4rem minmax(0, 1fr);
  column-gap: var(--g);
  padding: 9rem max(var(--m), env(safe-area-inset-right, 0px)) 12rem max(var(--m), env(safe-area-inset-left, 0px));
}
.art-col {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}
/* "In this story" (components/Contents.tsx): pinned beside the text, never taller than the
   window; a long list scrolls inside itself, follows the reading, and fades at an edge
   only when there's more that way */
@property --toc-up {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}
@property --toc-down {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}
.art-toc {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  position: sticky;
  top: calc(var(--hd-h) + 4rem + env(safe-area-inset-top, 0px));
  display: flex;
  flex-direction: column;
  max-width: 24rem;
  max-height: calc(100vh - var(--hd-h) - 8rem - env(safe-area-inset-top, 0px));
  max-height: calc(100svh - var(--hd-h) - 8rem - env(safe-area-inset-top, 0px));
}
.art-toc-label {
  flex: none;
  display: block;
  margin-bottom: 1.6rem;
  color: var(--ink-40);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.4rem;
}
.art-toc-scroll {
  position: relative; /* the items measure their place from here */
  min-height: 0;
  margin: -0.4rem -0.8rem 0 -0.4rem; /* room for focus rings and the scrollbar */
  padding: 0.4rem 0.8rem 0.4rem 0.4rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--toc-up), #000 calc(100% - var(--toc-down)), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 var(--toc-up), #000 calc(100% - var(--toc-down)), transparent 100%);
  transition: --toc-up 0.3s var(--eoq), --toc-down 0.3s var(--eoq), scrollbar-color 0.3s;
}
/* only a list that really scrolls keeps the wheel to itself */
.art-toc-scroll.scrolls {
  overscroll-behavior: contain;
}
.art-toc-scroll.can-up {
  --toc-up: 4rem;
}
.art-toc-scroll.can-down {
  --toc-down: 6.4rem;
}
.art-toc:hover .art-toc-scroll {
  scrollbar-color: var(--ink-40) transparent;
}
.art-toc ol {
  display: grid;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.art-toc a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: var(--ink-40);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.8rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  text-wrap: pretty;
  scroll-margin-block: 4rem 6.4rem; /* a focused item clears the fades */
  border-radius: 0.4rem;
  transition: color 0.3s var(--eoq);
}
.art-toc a:hover,
.art-toc a[aria-current] {
  color: var(--ink);
}
.art-toc a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
/* "In this story" on a phone (components/Contents.tsx): one quiet dark pill at the bottom
   while you're in the text (a ring that fills as you read, the section, a chevron), and a
   clean panel that rises from it with every section. Dark in both themes, like a floating
   control, not part of the page. */
.toc-pill,
.toc-panel,
.toc-catch {
  display: none;
}
@media (max-width: 1023px) {
  .toc-catch {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 39;
  }
  .toc-pill {
    position: fixed;
    z-index: 40;
    left: 50%;
    bottom: calc(1.6rem + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: calc(100vw - 3.2rem);
    height: 4.8rem;
    padding: 0 1.4rem 0 1.2rem;
    border: 1px solid var(--float-line);
    border-radius: 99rem;
    background: var(--float);
    box-shadow: 0 0.8rem 2.4rem rgba(12, 8, 6, 0.22);
    color: var(--float-ink);
    font: inherit;
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 2rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, calc(100% + 2.4rem));
    transition: transform 0.4s var(--eoq), opacity 0.3s var(--eoq), visibility 0s linear 0.4s;
  }
  .toc-pill.is-shown {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.3s var(--eoq), visibility 0s;
  }
  .toc-pill.is-shown:active {
    transform: translate(-50%, 0) scale(0.97);
    transition-duration: 0.12s;
  }
  /* where you are: a ring that fills as you read */
  .toc-ring {
    flex: none;
    width: 2rem;
    height: 2rem;
    transform: rotate(-90deg);
  }
  .toc-ring circle {
    fill: none;
    stroke-width: 2.8;
  }
  .toc-ring-track {
    stroke: color-mix(in srgb, var(--float-ink) 18%, transparent);
  }
  .toc-ring-fill {
    stroke: var(--orange);
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 0.25s ease-out;
  }
  .toc-pill-name {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    animation: pill-swap 0.3s var(--eoq) both;
  }
  .toc-chev {
    flex: none;
    width: 1.8rem;
    height: 1.8rem;
    opacity: 0.8;
    transition: transform 0.25s var(--eoq);
  }
  .toc-chev path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .toc-pill.is-open .toc-chev {
    transform: rotate(180deg);
  }
  /* the panel rises from the pill: open 250ms, close quicker (150ms) */
  .toc-panel {
    position: fixed;
    z-index: 41;
    left: 1.2rem;
    right: 1.2rem;
    bottom: calc(1.6rem + 4.8rem + 1rem + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--hd-h) - 9.4rem - env(safe-area-inset-bottom, 0px));
    max-height: calc(100svh - var(--hd-h) - 9.4rem - env(safe-area-inset-bottom, 0px));
    border: 1px solid var(--float-line);
    border-radius: 2.4rem;
    background: var(--float);
    box-shadow: 0 1.6rem 4.8rem rgba(12, 8, 6, 0.28);
    color: var(--float-ink);
    transform-origin: 50% 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.8rem) scale(0.97);
    transition: opacity 0.15s ease-out, transform 0.15s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.15s;
  }
  .toc-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.25s cubic-bezier(0.22, 1, 0.36, 1), transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
  }
  .toc-panel-list {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1rem 0.8rem;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--toc-up), #000 calc(100% - var(--toc-down)), transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 var(--toc-up), #000 calc(100% - var(--toc-down)), transparent 100%);
    transition: --toc-up 0.3s var(--eoq), --toc-down 0.3s var(--eoq);
  }
  .toc-panel-list.can-up {
    --toc-up: 3.2rem;
  }
  .toc-panel-list.can-down {
    --toc-down: 4.8rem;
  }
  .toc-panel-list ol {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .toc-panel-list a {
    position: relative;
    display: block;
    padding: 1.3rem 4rem 1.3rem 1.6rem;
    border-radius: 1.4rem;
    color: color-mix(in srgb, var(--float-ink) 60%, transparent);
    font-size: 1.6rem;
    font-weight: 500;
    line-height: 2.2rem;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.2s, color 0.2s;
  }
  /* two lines at most (the clamp sits on the text, clear of the row's padding) */
  .toc-panel-list a span {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
  .toc-panel-list a:active {
    background: color-mix(in srgb, var(--float-ink) 7%, transparent);
  }
  .toc-panel-list li[aria-current] a {
    color: var(--float-ink);
  }
  /* yours: a small orange dot, softly lit */
  .toc-panel-list li[aria-current] a::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 1.8rem;
    width: 0.8rem;
    height: 0.8rem;
    margin-top: -0.4rem;
    border-radius: 50%;
    background: var(--orange);
    box-shadow: 0 0 0.8rem rgba(247, 117, 0, 0.55);
  }
  .toc-panel-list a:focus-visible {
    outline: 2px solid var(--float-ink);
    outline-offset: -2px;
  }
}
@keyframes pill-swap {
  from {
    opacity: 0;
    transform: translateY(0.4rem);
  }
}

.art-prose {
  color: var(--ink-70);
  font-size: 1.8rem;
  line-height: 2.7rem;
}
.art-prose > * {
  margin: 0 0 2.4rem;
}
.art-prose > :first-child {
  margin-top: 0;
}
.art-prose > :last-child {
  margin-bottom: 0;
}
.art-prose p {
  text-wrap: pretty;
}
/* WordPress leaves empty paragraphs between blocks: they'd add stray gaps */
.art-prose p:empty {
  display: none;
}
/* some stories use an h1 inside the text (17 do): it reads as a section head, like h2 */
.art-prose h1,
.art-prose h2,
.art-prose h3,
.art-prose h4 {
  color: var(--ink);
  font-weight: 600;
  text-wrap: balance;
  scroll-margin-top: calc(var(--hd-h) + 2.4rem);
}
.art-prose h1,
.art-prose h2 {
  margin: 9rem 0 2.4rem;
  font-size: 3.6rem;
  line-height: 4.4rem;
  letter-spacing: -0.025em;
}
.art-prose h3 {
  margin: 3.6rem 0 2.4rem;
  font-size: 3rem;
  line-height: 3.7rem;
  letter-spacing: -0.02em;
}
.art-prose h4 {
  margin: 3.2rem 0 1.6rem;
  font-size: 2.2rem;
  line-height: 2.8rem;
}
.art-prose strong,
.art-prose b {
  color: var(--ink);
  font-weight: 600;
}
.art-prose h1 strong,
.art-prose h2 strong,
.art-prose h3 strong {
  font-weight: inherit;
}
.art-prose a {
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 100% 1px;
}
.art-prose a:hover {
  animation: ul-swap 0.9s var(--eoq);
}
@keyframes ul-swap {
  0% {
    background-position: 100% 100%;
    background-size: 100% 1px;
  }
  40% {
    background-position: 100% 100%;
    background-size: 0 1px;
  }
  41% {
    background-position: 0 100%;
    background-size: 0 1px;
  }
  100% {
    background-position: 0 100%;
    background-size: 100% 1px;
  }
}
.art-prose figure,
.art-prose > img,
.art-prose .wp-block-image {
  margin: 9rem 0;
}
.art-prose figure figure {
  margin: 0;
}
.art-prose img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.5rem;
  transition: opacity 0.6s var(--eoq);
}
.art-prose figcaption {
  margin-top: 1.2rem;
  color: var(--ink-40);
  font-size: 1.4rem;
  line-height: 2rem;
}
.art-prose .wp-block-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--g);
}
.art-prose ul,
.art-prose ol {
  padding-left: 2.4rem;
}
.art-prose li {
  margin: 0.8rem 0;
  padding-left: 0.4rem;
}
.art-prose li::marker {
  color: var(--ink-40);
}
.art-prose blockquote {
  margin: 6rem 0;
  padding: 0;
  color: var(--ink);
  font-size: 2.8rem;
  font-weight: 500;
  line-height: 3.4rem;
  letter-spacing: -0.02em;
}
.art-prose blockquote p {
  margin: 0;
}
.art-prose hr {
  margin: 6rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.art-prose iframe,
.art-prose video {
  max-width: 100%;
  border-radius: 1.5rem;
}
.art-prose .wp-block-table {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
/* a table wider than the column: a fade on the side with more (classes from Article.tsx) */
.art-prose .wp-block-table.is-wide {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--tb-l, 0px), #000 calc(100% - var(--tb-r, 0px)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--tb-l, 0px), #000 calc(100% - var(--tb-r, 0px)), transparent 100%);
}
.art-prose .wp-block-table.more-left {
  --tb-l: 3.2rem;
}
.art-prose .wp-block-table.more-right {
  --tb-r: 4.8rem;
}
.art-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.5rem;
  line-height: 2.2rem;
  font-variant-numeric: tabular-nums;
}
.art-prose th {
  color: var(--ink);
  font-weight: 600;
  text-align: left;
}
.art-prose th,
.art-prose td {
  min-width: 11rem;
  padding: 1.2rem 1.6rem 1.2rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.art-prose td a {
  word-break: break-word;
}
.art-by {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin: 6rem 0 0;
  padding-top: 2.4rem;
  border-top: 1px solid var(--line);
  color: var(--ink-70);
  font-size: 1.6rem;
  line-height: 2rem;
}
.art-by b {
  color: var(--ink);
  font-weight: 600;
}
.avatar {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  flex: none;
  border-radius: 4rem;
  overflow: hidden;
  background: var(--tile);
  color: var(--tink);
  font-size: 1.3rem;
  font-weight: 700;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* "Keep reading": its own colour, its heading as big as the title */
.art-more {
  --more-bg: var(--more-lilac);
  padding: 12rem max(var(--m), env(safe-area-inset-right, 0px)) 12rem max(var(--m), env(safe-area-inset-left, 0px));
  background: var(--more-bg);
  color: var(--ink);
}
.art-more[data-tile="cyan"] {
  --more-bg: var(--more-cyan);
}
.art-more-title {
  display: block;
  margin: 0 0 9rem;
  font-size: 12rem;
  font-weight: 500;
  line-height: 10.8rem;
  letter-spacing: -0.03em;
}
.art-more-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6rem var(--g);
}
.art-more-grid > .sc {
  grid-column: auto;
}

/* on dark, the hero and Keep reading use deep versions of their colours */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .art {
    --art-bg: color-mix(in srgb, var(--tile) 16%, var(--paper));
  }
  :root:not([data-theme="light"]) {
    --more-lilac: color-mix(in srgb, var(--lilac) 14%, var(--paper));
    --more-cyan: color-mix(in srgb, var(--cyan) 14%, var(--paper));
  }
}
:root[data-theme="dark"] .art {
  --art-bg: color-mix(in srgb, var(--tile) 16%, var(--paper));
}
:root[data-theme="dark"] {
  --more-lilac: color-mix(in srgb, var(--lilac) 14%, var(--paper));
  --more-cyan: color-mix(in srgb, var(--cyan) 14%, var(--paper));
}

/* the header's soft backing takes the story's colour over its hero */
html.hd-on-tile .hd::before {
  --hd-bg: var(--hd-tile, var(--paper));
}

/* ---------------------------------------------------------------- page change
   A story comes up over the list like a new sheet; Back lets it drop away.
   The header is its own layer so it stays still. */
html[data-vt] .hd {
  view-transition-name: site-header;
}
html[data-vt]::view-transition-group(root) {
  animation: none;
}
html[data-vt="open"]::view-transition-old(root) {
  animation: vt-sink 0.9s var(--eioq) both;
}
html[data-vt="open"]::view-transition-new(root) {
  animation: vt-up 0.9s var(--eioq) both;
}
html[data-vt="back"]::view-transition-old(root) {
  z-index: 2;
  animation: vt-down 0.75s var(--eioq) both;
}
html[data-vt="back"]::view-transition-new(root) {
  z-index: 1;
  animation: vt-rise 0.75s var(--eioq) both;
}
@keyframes vt-up {
  from {
    clip-path: inset(100% 0 0 0);
  }
  to {
    clip-path: inset(0);
  }
}
@keyframes vt-down {
  from {
    clip-path: inset(0);
  }
  to {
    clip-path: inset(100% 0 0 0);
  }
}
@keyframes vt-sink {
  to {
    transform: translateY(-8%);
    opacity: 0.4;
  }
}
@keyframes vt-rise {
  from {
    transform: translateY(-8%);
    opacity: 0.4;
  }
}

/* ---------------------------------------------------------------- phones */
@media (max-width: 1023px) {
  .ih {
    min-height: 0;
    padding-top: calc(var(--hd-h) + 9.6rem + env(safe-area-inset-top, 0px));
    padding-bottom: 6.4rem;
  }
  .ih-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "a b" "pic pic" "line line";
    column-gap: 0.26em;
    row-gap: 1.6rem;
    font-size: 5.6rem;
  }
  .ih-word {
    font-size: 5.6rem;
    line-height: 5.2rem;
  }
  .ih-a {
    grid-area: a;
  }
  .ih-b {
    grid-area: b;
  }
  .ih-mid {
    display: contents;
  }
  .ih-pic {
    grid-area: pic;
    height: auto;
    aspect-ratio: 361 / 124;
    border-radius: 1.2rem;
  }
  .ih-line {
    grid-area: line;
    width: auto;
    max-width: 26rem;
    font-size: 1.5rem;
    line-height: 1.8rem;
  }
  .if {
    display: block;
    margin-bottom: 4rem;
    font-size: 2rem;
    line-height: 2.8rem;
    letter-spacing: -0.02em;
  }
  .if-count {
    display: block;
    margin-bottom: 0.8rem;
    color: var(--ink-40);
    font-size: 1.4rem;
    line-height: 1.8rem;
    letter-spacing: 0;
  }
  .if-list {
    justify-content: flex-start;
    gap: 0 0.28em;
  }
  .ig {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 4.8rem;
  }
  .ig > .sc {
    grid-column: 1 / -1;
  }
  .sc-txt,
  .s-h .sc-txt {
    grid-template-columns: 9.6rem minmax(0, 1fr);
    row-gap: 1.4rem;
    margin-top: 1.6rem;
  }
  .s-h .sc-title {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .sc-date,
  .sc-topic {
    font-size: 1.3rem;
    line-height: 1.6rem;
  }
  .sc-title {
    font-size: 1.8rem;
    line-height: 2.4rem;
  }
  .stories {
    padding-bottom: 8rem;
  }
  .pager {
    margin-top: 6.4rem;
  }
  .pg-step {
    justify-content: center;
    width: 4.4rem;
    height: 4.4rem;
    border: 1px solid var(--line-2);
    border-radius: 50%;
  }
  .pg-step span {
    display: none;
  }
  .pg-step svg {
    width: 1.8rem;
    height: 1.8rem;
  }
  .pg-nums {
    gap: 1.2rem;
    font-size: 2.4rem;
    line-height: 2.8rem;
  }
  .pg-num {
    min-width: 2.8rem;
    min-height: 4.4rem;
  }
  .pg-num::after {
    bottom: 0.5rem;
  }
  .art-hero {
    padding-top: calc(var(--hd-h) + 8rem + env(safe-area-inset-top, 0px));
  }
  .art-title {
    padding-inline: max(var(--m), env(safe-area-inset-left, 0px));
    font-size: 4rem;
    line-height: 4.6rem;
    letter-spacing: -0.025em;
  }
  .art-title.len-m {
    font-size: 3.6rem;
    line-height: 4.2rem;
  }
  .art-title.len-l {
    font-size: 3.2rem;
    line-height: 3.8rem;
  }
  .art-meta {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 2rem;
    padding-top: 3.2rem;
    padding-bottom: 1.6rem;
    font-size: 1.4rem;
    line-height: 1.8rem;
  }
  .art-topic {
    justify-self: end;
  }
  .art-share {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
  }
  .share-btn {
    width: 4.4rem;
    height: 4.4rem;
  }
  .share-btn svg {
    width: 2.2rem;
    height: 2.2rem;
  }
  .art-cover img {
    aspect-ratio: 393 / 280;
  }
  .art-body {
    display: block;
    padding-top: 4.8rem;
    padding-bottom: 6.4rem;
  }
  .art-toc {
    display: none;
  }
  .art-prose {
    font-size: 1.6rem;
    line-height: 2.5rem;
  }
  .art-prose > * {
    margin-bottom: 1.8rem;
  }
  .art-prose h1,
  .art-prose h2 {
    margin: 5.6rem 0 1.6rem;
    font-size: 2.4rem;
    line-height: 3.1rem;
    letter-spacing: -0.02em;
  }
  .art-prose h3 {
    margin: 3.2rem 0 1.2rem;
    font-size: 2rem;
    line-height: 2.6rem;
    letter-spacing: -0.015em;
  }
  .art-prose figure,
  .art-prose > img,
  .art-prose .wp-block-image {
    margin: 4.8rem 0;
  }
  .art-prose img {
    border-radius: 1.2rem;
  }
  .art-prose blockquote {
    margin: 4rem 0;
    font-size: 2.2rem;
    line-height: 2.8rem;
  }
  .art-more {
    padding-top: 6.4rem;
    padding-bottom: 6.4rem;
  }
  .art-more-title {
    margin-bottom: 4.8rem;
    font-size: 5.6rem;
    line-height: 6rem;
  }
  .art-more-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 4.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lines.reveal .lw {
    transform: none;
  }
  .art-cover,
  .art-cover img,
  .art-meta {
    animation: none;
  }
}

/* ---------------------------------------------------------------- hero reveal: Sweep + Flip
   Made by InsideHero for the reveal and removed when it ends: the brand-colour blocks,
   the photos flicked through in the slot, and the count. */
.ih-word,
.ih-pic {
  position: relative;
}
.ih-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}
.ih-count {
  position: absolute;
  z-index: 2;
  font-size: 2rem;
  font-weight: 500;
  line-height: 2.2rem;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.ih-block {
  position: absolute;
  inset: -0.02em -0.04em;
  z-index: 2;
  transform: scaleX(0);
  pointer-events: none;
}
.ih-pic .ih-block {
  inset: 0;
}

/* ---------------------------------------------------------------- phone layout, wider screens
   600–1023px (large phones sideways, small tablets): two columns of stories, the story
   text held to a comfortable measure, and the floating contents panel kept narrow. */
@media (min-width: 600px) and (max-width: 1023px) {
  .ig {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2.4rem;
  }
  .ig > .sc {
    grid-column: auto;
  }
  .art-more-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2.4rem;
  }
  .art-col {
    max-width: 64rem;
    margin-inline: auto;
  }
  .art-title {
    max-width: 72rem;
    margin-inline: auto;
  }
  .nl-side {
    max-width: 48rem;
  }
  .toc-panel {
    left: 50%;
    right: auto;
    width: 48rem;
    margin-left: -24rem;
  }
}

/* ---------------------------------------------------------------- touch targets
   On touch screens every small control gets an invisible 44px-ish hit area around it,
   so it's easy to tap without changing how it looks. */
@media (pointer: coarse) {
  .hd-logo,
  .menu-btn,
  .share-btn,
  .if-item,
  .art-topic,
  .pg-num,
  .sf-col a {
    position: relative;
  }
  .hd-logo::after,
  .menu-btn::after,
  .share-btn::after,
  .if-item::after,
  .art-topic::after,
  .pg-num::before,
  .sf-col a::after {
    content: "";
    position: absolute;
  }
  .hd-logo::after {
    inset: -1rem -0.4rem;
  }
  .menu-btn::after,
  .share-btn::after {
    inset: -0.4rem;
  }
  .if-item::after {
    inset: -0.8rem -0.12em;
  }
  .art-topic::after {
    inset: -1.4rem -0.6rem;
  }
  .pg-num::before {
    inset: 0 -0.6rem;
  }
  .sf-col a::after {
    inset: -0.8rem -0.4rem;
  }
}
