/* Finance landing page. Tokens follow .claude/skills/landing-page-design/SKILL.md and the app's DESIGN.md. */

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('assets/fonts/geist-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('assets/fonts/geist-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;

  /* Spacing: the only values in use. */
  --space-25: 2px;
  --space-50: 4px;
  --space-75: 8px;
  --space-100: 12px;
  --space-200: 16px;
  --space-300: 24px;
  --space-400: 32px;
  --space-500: 40px;
  --space-600: 48px;
  --space-700: 64px;
  --space-800: 80px;
  --space-900: 96px;

  /* Radius: Tailwind's steps. */
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-3xl: 24px;
  --radius-4xl: 32px;
  --radius-full: 9999px;

  /* Motion. */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --move: 500ms;
  --tint: 300ms;

  /* Colour: the app's zinc theme. */
  --bg: #ffffff;
  --fg: #09090b;
  --muted: #f4f4f5;
  --muted-fg: #71717a;
  --border: #e4e4e7;
  --card: #ffffff;
  --primary: #18181b;
  --primary-fg: #fafafa;
  --bezel: #18181b;
  --shot-bg: #ffffff;
  --hero-from: #000000;
  --hero-to: #666666;
  --shadow: 0 24px 48px -16px rgb(0 0 0 / 0.22);
  --positive: #16a34a;

  /* The ring's colours, the same as the web app's. */
  --ring-orange: #f76516;
  --ring-yellow: #f6bd16;
  --ring-violet: #c46af0;
  --ring-blue: #2f6bf2;
  --ring-green: #26b257;
  --ring-sky: #35b9e8;
  --ring-ink: #09090b;
  --ring-dim: #ededef;
  --ring-dim-ink: #a1a1aa;
}

/* Set before first paint from the saved choice or the system, and switched by the toggle in the nav. */
:root[data-theme='dark'] {
    color-scheme: dark;
    --bg: #000000;
    --fg: #fafafa;
    --muted: #181818;
    --muted-fg: #a1a1aa;
    --border: #272727;
    --card: #181818;
    --primary: #fafafa;
    --primary-fg: #18181b;
    --bezel: #1f1f1f;
    --shot-bg: #09090b;
    --hero-from: #ffffff;
    --hero-to: #9b9b9b;
    --shadow: 0 24px 48px -16px rgb(0 0 0 / 0.7);
    --positive: #4ade80;
    --ring-dim: #272727;
    --ring-dim-ink: #52525b;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-900);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Geist', ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.5rem;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ol, dl, dd {
  margin: 0;
}

ol {
  padding: 0;
  list-style: none;
}

img, picture, svg {
  display: block;
}

[hidden] {
  display: none !important;
}

img {
  max-width: 100%;
  height: auto;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

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

/* ---------- Text styles ---------- */

.heading-1, .heading-2, .heading-3, .heading-6 {
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.heading-1 { font-size: 1.875rem; line-height: 2.25rem; }
.heading-2 { font-size: 1.875rem; line-height: 2.25rem; }
.heading-3 { font-size: 1.875rem; line-height: 2.25rem; }
.heading-6 { font-size: 1.25rem; line-height: 1.75rem; letter-spacing: -0.01em; }

@media (min-width: 768px) {
  .heading-1 { font-size: 3.75rem; line-height: 3.75rem; }
  .heading-2 { font-size: 3rem; line-height: 3rem; }
  .heading-3 { font-size: 2.25rem; line-height: 2.5rem; }
}

.title-2 { font-size: 1.125rem; line-height: 1.75rem; font-weight: 500; }
.title-3 { font-size: 1rem; line-height: 1.5rem; font-weight: 500; }
.title-4 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; }

.body-3 { font-size: 1rem; line-height: 1.5rem; font-weight: 400; text-wrap: pretty; }
.body-5 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; }
.body-6 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 400; text-wrap: pretty; }

.button-md { font-size: 1rem; line-height: 1.5rem; font-weight: 600; }
.button-sm { font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; }

.caption-1 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; }
.caption-2 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 400; }
.caption-3 { font-size: 0.75rem; line-height: 1rem; font-weight: 600; }
.caption-4 { font-size: 0.75rem; line-height: 1rem; font-weight: 500; }

.muted {
  color: var(--muted-fg);
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--space-200);
}

@media (min-width: 768px) {
  .container {
    padding-inline: var(--space-300);
  }
}

.section {
  padding-block: var(--space-700);
}

@media (min-width: 768px) {
  .section {
    padding-block: var(--space-900);
  }
}

.section-head {
  display: grid;
  gap: var(--space-100);
  max-width: 680px;
  margin-bottom: var(--space-600);
}

.icon {
  width: 1.125em;
  height: 1.125em;
  fill: currentColor;
  flex: none;
}

.skip {
  position: fixed;
  top: var(--space-200);
  left: var(--space-200);
  z-index: 30;
  padding: var(--space-75) var(--space-100);
  border-radius: var(--radius-lg);
  background: var(--primary);
  color: var(--primary-fg);
  transform: translateY(-96px);
  transition: transform var(--move) var(--ease);
}

.skip:focus-visible {
  transform: translateY(0);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-75);
  padding: var(--space-75) var(--space-100);
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background-color var(--tint) var(--ease), border-color var(--tint) var(--ease), opacity var(--tint) var(--ease), transform var(--tint) var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-fg);
}

.btn-primary:hover {
  opacity: 0.86;
}

.btn-outline {
  background: var(--bg);
  border-color: var(--border);
}

.btn-outline:hover,
.btn-outline[aria-expanded='true'] {
  background: var(--muted);
}

/* ---------- Theme switch ---------- */

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-75);
}

/* A two way segmented switch. The thumb slides under whichever is chosen. */
.theme-switch {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 28px);
  padding: var(--space-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--muted);
}

.theme-thumb {
  position: absolute;
  top: var(--space-50);
  left: var(--space-50);
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: var(--bg);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.12), 0 0 0 1px var(--border);
  transition: transform var(--move) var(--ease);
}

:root[data-theme='dark'] .theme-thumb {
  transform: translateX(28px);
}

.theme-option {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  color: var(--muted-fg);
  transition: color var(--tint) var(--ease);
}

.theme-option:hover,
.theme-option[aria-pressed='true'] {
  color: var(--fg);
}

.theme-option:active .theme-glyph {
  transform: scale(0.9);
}

.theme-glyph {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--move) var(--ease);
}

/* The chosen one turns a little as the thumb arrives: the sun spins its rays, the moon rocks into place. */
.theme-option[data-theme-option='light'][aria-pressed='true'] .theme-glyph {
  transform: rotate(90deg);
}

.theme-option[data-theme-option='dark'][aria-pressed='true'] .theme-glyph {
  transform: rotate(-20deg);
}

/* The new theme opens as a circle from the switch. */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-new(root) {
  z-index: 2;
}

/* The switch sits above the circle, live, so its thumb slides the whole way instead of being cut by it. */
.theme-switch {
  view-transition-name: theme-switch;
}

::view-transition-group(theme-switch) {
  z-index: 3;
  animation: none;
}

::view-transition-old(theme-switch) {
  display: none;
}

::view-transition-new(theme-switch) {
  animation: none;
}

/* ---------- Navigation ---------- */

.nav-wrap {
  position: fixed;
  top: var(--space-200);
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding-inline: var(--space-200);
  pointer-events: none;
}

.nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: var(--space-300);
  padding: var(--space-75) var(--space-75) var(--space-75) var(--space-200);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-75);
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: var(--radius-md);
}

.brand-mark rect {
  fill: var(--primary);
}

.brand-mark path {
  stroke: var(--primary-fg);
}

.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-50);
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  padding: var(--space-50) var(--space-100);
  border-radius: var(--radius-md);
  color: var(--muted-fg);
  transition: color var(--tint) var(--ease), background-color var(--tint) var(--ease);
}

.nav-link:hover,
.nav-link[aria-current='true'] {
  color: var(--fg);
}

.nav-link[aria-current='true'] {
  background: var(--muted);
}

.nav-link:active {
  transform: translateY(1px);
}

/* ---------- GitHub popup ---------- */

.gh {
  position: relative;
  display: inline-flex;
}

.gh-pop {
  position: absolute;
  z-index: 25;
  display: flex;
  align-items: flex-start;
  gap: var(--space-100);
  width: max-content;
  max-width: min(304px, calc(100vw - var(--space-400)));
  padding: var(--space-200);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: left;
  white-space: normal;
  opacity: 0;
  transform: translateY(var(--space-75)) scale(0.98);
  transition: opacity var(--tint) var(--ease), transform var(--move) var(--ease);
  pointer-events: none;
}

.gh-pop.is-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.gh[data-placement='bottom-end'] .gh-pop {
  top: calc(100% + var(--space-100));
  right: 0;
  transform-origin: top right;
}

.gh[data-placement='bottom-start'] .gh-pop {
  top: calc(100% + var(--space-100));
  left: 0;
  transform-origin: top left;
}

.gh[data-placement='top-end'] .gh-pop {
  bottom: calc(100% + var(--space-100));
  right: 0;
  transform-origin: bottom right;
}

.gh-pop-text {
  display: grid;
  gap: var(--space-50);
}

.gh-pop-close {
  flex: none;
  display: grid;
  place-items: center;
  width: var(--space-300);
  height: var(--space-300);
  border-radius: var(--radius-md);
  color: var(--muted-fg);
  transition: color var(--tint) var(--ease), background-color var(--tint) var(--ease);
}

.gh-pop-close:hover {
  color: var(--fg);
  background: var(--muted);
}

.gh-pop-close:active {
  transform: scale(0.98);
}

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

.hero {
  padding-top: calc(var(--space-900) + var(--space-400));
  padding-bottom: var(--space-700);
  overflow-x: clip;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-title {
  max-width: 680px;
  padding-bottom: var(--space-50);
  background: linear-gradient(90deg, var(--hero-from), var(--hero-to));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 680px;
  margin-top: var(--space-300);
  color: var(--muted-fg);
}

@media (min-width: 768px) {
  .hero-sub {
    font-size: 1.125rem;
    line-height: 1.75rem;
    max-width: 600px;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-100);
  margin-top: var(--space-400);
}

.hero-proof {
  margin-top: var(--space-200);
  color: var(--muted-fg);
}

.hero-visual {
  position: relative;
  max-width: 1040px;
  margin: var(--space-700) auto 0;
  padding-bottom: var(--space-600);
}

.browser {
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  background: var(--shot-bg);
  overflow: hidden;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: var(--space-75);
  height: var(--space-500);
  padding-inline: var(--space-200);
  background: var(--muted);
}

.browser-bar span {
  width: var(--space-75);
  height: var(--space-75);
  border-radius: var(--radius-full);
  background: var(--border);
}

/* On a narrow screen the table is shown at a readable size and cropped, not shrunk. */
.browser picture {
  height: 320px;
  overflow: hidden;
}

.browser img {
  width: 760px;
  max-width: none;
}

@media (min-width: 768px) {
  .browser picture {
    height: auto;
  }

  .browser img {
    width: 100%;
    max-width: 100%;
  }
}

.phone {
  padding: var(--space-75);
  border-radius: var(--radius-4xl);
  background: var(--bezel);
  border: 1px solid var(--border);
}

.phone img,
.demo-screens {
  border-radius: var(--radius-3xl);
}

.hero-phone {
  position: absolute;
  right: var(--space-200);
  bottom: 0;
  width: 168px;
  box-shadow: var(--shadow);
}

@media (min-width: 768px) {
  .hero-phone {
    right: var(--space-600);
    width: 232px;
  }
}

/* ---------- Tagline reveal ---------- */

.tagline {
  padding-block: var(--space-700);
}

@media (min-width: 768px) {
  .tagline {
    padding-block: var(--space-900);
  }
}

.tagline-text {
  max-width: 880px;
  margin-inline: auto;
  text-align: center;
}

.tagline-text .word {
  display: inline-block;
  opacity: 0.3;
  transition: opacity var(--move) var(--ease);
}

.tagline-text .word.is-on {
  opacity: 1;
}

/* ---------- How it works ---------- */

.how {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-400);
}

@media (min-width: 900px) {
  .how {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: var(--space-700);
  }
}

.steps {
  display: grid;
  gap: var(--space-75);
}

.step {
  position: relative;
  display: flex;
  gap: var(--space-200);
  width: 100%;
  padding: var(--space-200);
  border-radius: var(--radius-2xl);
  text-align: left;
  opacity: 0.56;
  transition: opacity var(--tint) var(--ease), transform var(--tint) var(--ease);
}

/* The highlight is its own layer, so only opacity animates. */
.step::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid var(--border);
  background: var(--muted);
  opacity: 0;
  transition: opacity var(--tint) var(--ease);
}

.step > * {
  position: relative;
}

.step:hover {
  opacity: 0.86;
}

.step:active {
  transform: scale(0.98);
}

.step.is-active {
  opacity: 1;
}

.step.is-active::before {
  opacity: 1;
}

.step-num {
  flex: none;
  display: grid;
  place-items: center;
  width: var(--space-300);
  height: var(--space-300);
  margin-top: var(--space-25);
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg);
  font-variant-numeric: tabular-nums;
}

.step.is-active .step-num {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-fg);
}

.step-text {
  display: grid;
  gap: var(--space-50);
}

.stage {
  display: grid;
  place-items: center;
  padding: var(--space-400) var(--space-200);
  border-radius: var(--radius-3xl);
  background: var(--muted);
  order: -1;
}

@media (min-width: 900px) {
  .stage {
    order: 0;
    padding: var(--space-600);
  }
}

.demo {
  width: 100%;
  max-width: 264px;
}

@media (min-width: 900px) {
  .demo {
    max-width: 296px;
  }
}

.demo-screens {
  position: relative;
  overflow: hidden;
  aspect-ratio: 720 / 1600;
  background: var(--shot-bg);
}

.demo-screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(var(--space-300));
  transition: opacity var(--move) var(--ease), transform var(--move) var(--ease);
}

.demo-screen.is-active {
  opacity: 1;
  transform: none;
}

.demo-screen img {
  width: 100%;
  border-radius: 0;
}

/* The app's own notification, cut from the same screenshot, placed where Android showed it. */
.demo-note {
  position: absolute;
  z-index: 2;
  top: 6.375%;
  left: 3.9%;
  width: 92.2%;
  opacity: 0;
  transform: translateY(-160%);
  transition: opacity var(--tint) var(--ease), transform 700ms var(--ease);
}

.demo-note img {
  width: 100%;
  border-radius: 5.6% / 25.6%;
}

.demo-note.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- The web app ---------- */

.bento {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-200);
}

@media (min-width: 900px) {
  .bento {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: var(--space-300);
  }

  .card-ring {
    grid-row: span 2;
  }

  .card-balance {
    grid-column: 1 / -1;
  }
}

.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-300);
  padding: var(--space-300);
  border: 1px solid var(--border);
  border-radius: var(--radius-3xl);
  background: var(--card);
}

@media (min-width: 768px) {
  .card {
    padding: var(--space-400);
  }
}

.card-copy {
  display: grid;
  gap: var(--space-50);
}

.shot {
  position: relative;
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--shot-bg);
  overflow: hidden;
}

.hint {
  position: absolute;
  top: var(--space-100);
  right: var(--space-100);
  display: inline-flex;
  align-items: center;
  gap: var(--space-50);
  padding: var(--space-50) var(--space-75);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg);
  color: var(--muted-fg);
  transition: opacity var(--tint) var(--ease);
}

.hint-tap {
  display: none;
}

@media (hover: none) {
  .hint-hover {
    display: none;
  }

  .hint-tap {
    display: inline;
  }
}

.ring-box.is-picked .hint {
  opacity: 0;
}

/* ---------- Copies of the web app's own controls ---------- */

.licon {
  width: 14px;
  height: 14px;
  flex: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-50);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-50);
  height: var(--space-400);
  padding-inline: var(--space-100);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg);
  white-space: nowrap;
  transition: background-color var(--tint) var(--ease), color var(--tint) var(--ease), border-color var(--tint) var(--ease), transform var(--tint) var(--ease);
}

.chip:hover {
  background: var(--muted);
}

.chip:active {
  transform: scale(0.98);
}

.chip[aria-pressed='true'] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-fg);
}

.morph {
  display: inline-grid;
  justify-items: center;
}

.morph-layer {
  grid-area: 1 / 1;
  white-space: pre;
}

.morph-layer > span {
  display: inline-block;
}

/* ---------- Ring ---------- */

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-200);
}

.ring-box {
  position: relative;
  padding: var(--space-300) var(--space-200);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--shot-bg);
}

.ring {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1;
  margin-inline: auto;
  container-type: inline-size;
  user-select: none;
  -webkit-user-select: none;
}

.ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  touch-action: manipulation;
}

.ring-segment {
  transition: color 200ms var(--ease);
}

.ring-segment > path {
  transition: fill 200ms var(--ease);
}

.ring-amount {
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  fill: currentColor;
}

.ring-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ring-middle {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.ring-label {
  font-size: min(0.875rem, 3.9cqw);
  line-height: 1.43;
  color: var(--muted-fg);
}

.ring-value {
  margin-top: var(--space-25);
  font-size: min(2.25rem, 10cqw);
  line-height: 1.11;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

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

.ring-list li {
  padding-block: var(--space-50);
  border-bottom: 1px solid var(--border);
}

.ring-list li:last-child {
  border-bottom: 0;
}

.ring-row {
  display: flex;
  align-items: center;
  gap: var(--space-75);
  width: 100%;
  height: var(--space-400);
  padding-inline: var(--space-75);
  border-radius: var(--radius-md);
  text-align: left;
  transition: background-color 200ms var(--ease);
}

.ring-row:hover,
.ring-row.is-active {
  background: var(--muted);
}

.ring-row .licon {
  color: var(--muted-fg);
}

.ring-row-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ring-row-value {
  min-width: 7rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------- The two small tiles: a piece of the app at the bottom ---------- */

.mock {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-200);
  margin-top: auto;
  padding: var(--space-200);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--shot-bg);
}

.budget-rows {
  display: grid;
  margin: 0;
}

.budget-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-200);
  padding-block: var(--space-75);
  border-bottom: 1px solid var(--border);
}

.budget-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.budget-row dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.keywords {
  gap: var(--space-75);
}

.kw-head {
  display: flex;
  align-items: center;
  gap: var(--space-75);
  padding-bottom: var(--space-75);
  border-bottom: 1px solid var(--border);
}

.kw-chevron {
  color: var(--muted-fg);
}

.kw-count {
  margin-left: auto;
  white-space: nowrap;
}

.caption-5 { font-size: 0.75rem; line-height: 1rem; font-weight: 400; }

.kw-list {
  display: grid;
  gap: var(--space-50);
  padding-left: var(--space-300);
}

.kw-list li {
  display: flex;
  align-items: center;
  gap: var(--space-75);
}

.kw-word {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.75rem;
  line-height: 1rem;
}

.kw-select,
.kw-input,
.kw-add {
  display: inline-flex;
  align-items: center;
  height: var(--space-400);
  padding-inline: var(--space-100);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
}

.kw-select {
  justify-content: space-between;
  gap: var(--space-200);
  width: 128px;
}

.kw-new {
  display: flex;
  gap: var(--space-75);
  padding-left: var(--space-300);
}

.kw-input {
  flex: 1;
  min-width: 0;
}

.kw-add {
  gap: var(--space-50);
  color: var(--muted-fg);
}

/* ---------- Balance ---------- */

.balance {
  padding: var(--space-75);
  border-radius: var(--radius-2xl);
  background: var(--muted);
}

.balance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--space-500);
  padding-inline: var(--space-75);
}

.balance-grid {
  display: grid;
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--border);
}

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

.balance-cell {
  display: grid;
  gap: var(--space-50);
  padding: var(--space-200);
  background: var(--shot-bg);
}

.balance-cell dt,
.balance-foot-label,
.balance-ok {
  display: inline-flex;
  align-items: center;
  gap: var(--space-75);
}

.balance-amount {
  margin: 0;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.balance-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-50) var(--space-200);
  padding: var(--space-100) var(--space-75) var(--space-50);
}

.balance-ok {
  gap: var(--space-50);
  color: var(--positive);
}

/* ---------- Good to know ---------- */

.notes {
  display: grid;
  gap: var(--space-400);
}

@media (min-width: 768px) {
  .notes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-600) var(--space-700);
  }
}

.note {
  display: grid;
  gap: var(--space-50);
  max-width: 440px;
}

.stack {
  margin-top: var(--space-700);
  color: var(--muted-fg);
}

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

.footer {
  padding-block: var(--space-600);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-300);
}

.footer-inner::before {
  content: '';
  flex: 0 0 100%;
  height: 1px;
  margin-bottom: var(--space-300);
  background: var(--border);
}

.footer-copy {
  display: grid;
  gap: var(--space-50);
}

/* ---------- Scroll reveals ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(var(--space-400));
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

  .js .reveal,
  .demo-screen,
  .demo-note,
  .gh-pop,
  .skip {
    transform: none;
  }

  .skip:not(:focus-visible) {
    opacity: 0;
    pointer-events: none;
  }

  .btn:active,
  .chip:active,
  .step:active,
  .gh-pop-close:active,
  .nav-link:active {
    transform: none;
  }

  .tagline-text .word {
    opacity: 1;
    transition: none;
  }

  .theme-thumb,
  .theme-glyph {
    transition: none;
  }

  .theme-option .theme-glyph {
    transform: none !important;
  }
}
