@font-face {
  font-family: 'Manrope Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('/fonts/manrope-cyrillic-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Manrope Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('/fonts/manrope-latin-wght-normal.woff2') format('woff2-variations');
  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+20B8, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Geist Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/geist-mono-cyrillic-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

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

@font-face {
  font-family: 'Onest Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/onest-cyrillic-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: 'Onest Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/onest-cyrillic-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Onest Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/onest-latin-wght-normal.woff2') format('woff2-variations');
  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+20B8, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/*
 * kztusdt UI kit tokens (graphite monochrome); the accent is the ink itself.
 * Colour is a state signal only: green marks the best rate (ok), then wait / attention / danger.
 */
:root {
  /* Surfaces and lines */
  --ui-bg: #ffffff;
  --ui-surface: #f4f4f3;
  --ui-surface-2: #e9e9e7;
  --ui-raised: #ffffff;
  --ui-line: rgba(0, 0, 0, 0.08);
  --ui-line-strong: rgba(0, 0, 0, 0.18);
  --ui-field-line: rgba(0, 0, 0, 0.46);
  --ui-overlay: rgba(10, 10, 10, 0.46);

  /* Text */
  --ui-text: #141414;
  --ui-text-dim: #5c5c5c;
  --ui-accent: #141414;
  --ui-accent-ink: #ffffff;
  --ui-accent-soft: rgba(20, 20, 20, 0.08);

  /* State signals */
  --ui-danger: #c62828;
  --ui-danger-soft: #fbe7e5;
  --ui-ok: #1a7f37;
  --ui-ok-soft: color-mix(in srgb, #1a7f37 12%, #ffffff);
  --ui-wait: #7a4f00;
  --ui-wait-soft: #fbf1d4;
  --ui-attn: #9a4300;
  --ui-attn-soft: #fce8d6;

  /* Typography */
  --ui-font-sans: 'Manrope Variable', 'Manrope', system-ui, sans-serif;
  --ui-font-mono: 'Geist Mono Variable', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Radius: card 6, control and chip 4, small 3; full only for the tab bar and status dots */
  --ui-r-card: 6px;
  --ui-r-ctl: 4px;
  --ui-r-sm: 3px;
  --ui-r-chip: 4px;
  --ui-r-full: 999px;

  /* Elevation, tinted to the ink */
  --ui-shadow-sheet: 0 -12px 40px rgba(20, 20, 20, 0.16);
  --ui-shadow-pop: 0 10px 30px rgba(20, 20, 20, 0.16), 0 0 0 1px rgba(20, 20, 20, 0.06);
  --ui-shadow-soft: 0 8px 24px rgba(20, 20, 20, 0.08);

  /* Motion */
  --ui-ease: cubic-bezier(0.3, 0.7, 0.3, 1);
  --ui-t1: 120ms;
  --ui-t2: 200ms;
  --ui-t3: 320ms;

  /* Legacy names used across components */
  --font-sans: var(--ui-font-sans);
  --font-mono: var(--ui-font-mono);

  --color-shell: rgba(0, 0, 0, 0.04);

  --shadow-md: none;
  --shadow-inset: none;

  --radius-shell: var(--ui-r-card);
  --radius-core: var(--ui-r-card);
  --radius-row: var(--ui-r-card);
  --radius-button: var(--ui-r-ctl);
  --radius-pill: var(--ui-r-chip);

  --ease: var(--ui-ease);

  color-scheme: light;
}

/* Manrope and Geist Mono lack Kazakh Cyrillic (ә ғ қ ң ө ұ ү һ і): Onest everywhere on kk. */
html[lang='kk'] {
  --ui-font-sans: 'Onest Variable', 'Onest', system-ui, sans-serif;
  --ui-font-mono: 'Onest Variable', 'Onest', ui-monospace, monospace;
}

/* Set by /theme.js from the saved choice or the system preference. */
:root[data-theme='dark'] {
  --ui-bg: #111111;
  --ui-surface: #111111;
  --ui-surface-2: #2b2b2b;
  --ui-raised: #1a1a1a;
  --ui-line: rgba(255, 255, 255, 0.08);
  --ui-line-strong: rgba(255, 255, 255, 0.18);
  --ui-field-line: rgba(255, 255, 255, 0.38);
  --ui-overlay: rgba(0, 0, 0, 0.62);

  --ui-text: #f3f3f3;
  --ui-text-dim: #9e9e9e;
  --ui-accent: #f3f3f3;
  --ui-accent-ink: #111111;
  --ui-accent-soft: rgba(243, 243, 243, 0.1);

  --ui-danger: #ff8a80;
  --ui-danger-soft: #2e1c1b;
  --ui-ok: #4cc38a;
  --ui-ok-soft: color-mix(in srgb, #4cc38a 12%, #1a1a1a);
  --ui-wait: #f2c14e;
  --ui-wait-soft: #2c2614;
  --ui-attn: #ffab5e;
  --ui-attn-soft: #2f2216;

  --ui-shadow-sheet: 0 -12px 40px rgba(0, 0, 0, 0.5);
  --ui-shadow-pop: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
  --ui-shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.32);

  --color-shell: rgba(255, 255, 255, 0.04);
  color-scheme: dark;
}

:root {
  --color-canvas: var(--ui-surface);
  --color-surface: var(--ui-raised);
  --color-ink: var(--ui-text);
  --color-muted: var(--ui-text-dim);
  --color-line: var(--ui-line);
  --color-accent: var(--ui-accent);
  --color-accent-ink: var(--ui-accent-ink);
  --color-accent-soft: var(--ui-accent-soft);
  --color-good: var(--ui-ok);
  --color-warn: var(--ui-wait);
  --color-skeleton: var(--ui-surface-2);
}

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

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

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  flex-direction: column;
  background: var(--color-canvas);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

a {
  color: inherit;
}

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

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

.shell {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: max(24px, env(safe-area-inset-left)) max(24px, env(safe-area-inset-right));
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-canvas);
  border-bottom: 1px solid var(--color-line);
}

.site-header__inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-weight: 750;
  letter-spacing: -0.02em;
  font-size: 18px;
}

/* Header pills: refresh chip and language toggle share the kit's LocaleToggle shape */
.live,
.lang-toggle,
.theme-toggle {
  display: inline-flex;
  flex: none;
  align-items: center;
  height: 40px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px var(--color-line);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--ui-t2) var(--ease), color var(--ui-t2) var(--ease), transform var(--ui-t1) var(--ease);
}

.live:hover,
.lang-toggle:hover,
.theme-toggle:hover {
  background: var(--ui-surface-2);
  color: var(--color-ink);
}

.live:active,
.lang-toggle:active,
.theme-toggle:active {
  transform: scale(0.95);
}

.live:focus-visible,
.lang-toggle:focus-visible,
.theme-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.live {
  gap: 8px;
  padding: 0 12px 0 14px;
  color: var(--color-muted);
}

.live time {
  color: var(--color-ink);
  font-variant-numeric: tabular-nums;
}

.live__icon {
  flex: none;
  opacity: 0.55;
  transition: opacity var(--ui-t2) var(--ease);
}

.live:hover .live__icon {
  opacity: 1;
}

.live[data-busy] .live__icon {
  opacity: 1;
  animation: live-spin 700ms var(--ui-ease) infinite;
}

@keyframes live-spin {
  to {
    transform: rotate(360deg);
  }
}

.theme-toggle {
  justify-content: center;
  width: 40px;
  padding: 0;
  color: var(--color-ink);
}

.theme-toggle__icon {
  flex: none;
}

/* Shows the theme a click switches to. */
.theme-toggle__icon--sun,
[data-theme='dark'] .theme-toggle__icon--moon {
  display: none;
}

[data-theme='dark'] .theme-toggle__icon--sun {
  display: block;
}

.lang-toggle {
  gap: 6px;
  padding: 0 14px 0 12px;
  color: var(--color-ink);
  letter-spacing: 0.02em;
}

.lang-toggle__icon {
  flex: none;
  color: var(--color-muted);
}

.lang-toggle__code {
  min-width: 2ch;
  font-variant-numeric: tabular-nums;
}

.live__pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-muted);
}

.live[data-state='ok'] .live__pulse {
  background: var(--color-good);
}

.live[data-state='stale'] .live__pulse {
  background: var(--color-warn);
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 88px;
}

.hero__title {
  font-size: clamp(40px, 5.4vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 720;
  max-width: 12ch;
}

.hero__lead {
  margin-top: 22px;
  max-width: 44ch;
  color: var(--color-muted);
  font-size: 18px;
  line-height: 1.6;
}

/* Two figures side by side, split by a vertical rule instead of two cards. */
.best {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-self: end;
  border-top: 1px solid var(--color-line);
}

.best > * + * {
  padding-left: 28px;
  border-left: 1px solid var(--color-line);
}

.best > :first-child {
  padding-right: 28px;
}

.best__card {
  display: grid;
  grid-template-areas:
    'label'
    'value'
    'source'
    'usd';
  justify-items: start;
  row-gap: 6px;
  padding-top: 20px;
}

.best__label {
  grid-area: label;
  margin-bottom: 8px;
  color: var(--color-muted);
  font-weight: 600;
  font-size: 14px;
}

.best__source {
  grid-area: source;
  margin-top: 8px;
  color: var(--color-muted);
  font-size: 14px;
}

.best__source strong {
  color: var(--color-ink);
  font-weight: 700;
}

.best__source a {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--color-accent) 70%, transparent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.best__source a:hover {
  text-decoration-color: var(--color-accent);
}

.best__value {
  grid-area: value;
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 700;
  line-height: 1;
}

.best__usd {
  grid-area: usd;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 600;
}

.fx {
  margin-top: 28px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 15px;
}

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

.fx__value {
  font-weight: 700;
}

.best__unit {
  font-size: 0.5em;
  color: var(--color-muted);
  font-weight: 600;
}

.best__card[data-best] .best__value .num {
  color: var(--color-good);
}

/* Board */

.board {
  padding-bottom: 96px;
}

.section-title {
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.035em;
  font-weight: 760;
  line-height: 1.15;
  margin-bottom: 28px;
}

/* Section rhythm: a content-width rule opens every section instead of a frame around it. */
section.shell:not(.hero, .page-hero, .reg-hero, .feed, .course, .tool)::before {
  content: '';
  display: block;
  height: 1px;
  margin-bottom: 32px;
  background: var(--color-line);
}

.board__head,
.row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)) 212px;
  align-items: center;
  gap: 16px;
}

.board__head {
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--ui-line-strong);
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 600;
}

.board__head span:nth-child(n + 2):nth-child(-n + 3) {
  text-align: right;
}

.board__head span:last-child {
  text-align: right;
}

.board__list {
  display: grid;
}

.row {
  position: relative;
  min-height: 84px;
  padding: 16px;
  border-bottom: 1px solid var(--color-line);
  transition: background-color 0.3s var(--ease), transform 0.4s var(--ease), opacity 0.4s var(--ease);
}

.row:hover {
  background: var(--color-shell);
}

/* The list is sorted best-first for the active mode, so the top row carries the marker. */
.board__list > .row:first-child::before {
  content: '';
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: 0;
  width: 2px;
  background: var(--color-good);
}

.row--skeleton {
  display: flex;
}

.row__name {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.row__monogram {
  display: none;
}

.row__title {
  display: block;
  font-weight: 720;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.row__status {
  display: block;
  color: var(--color-muted);
  font-size: 13px;
}

.row__status[data-state='stale'] {
  color: var(--color-warn);
}

.row__terms {
  display: block;
  margin-top: 2px;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.45;
}

.row__terms[data-tone='warn'] {
  color: var(--color-warn);
}

.row__terms[data-tone='ok'] {
  color: var(--color-good);
}

.row__cell {
  text-align: right;
  font-size: 20px;
  font-weight: 700;
}

.row__cell .num.is-best {
  color: var(--color-good);
}

.row__label {
  display: none;
}

.row__cell .num[data-unit]::after {
  content: '\00a0' attr(data-unit);
  color: var(--color-muted);
  font-size: 0.62em;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.row__cell .num.is-best[data-unit]::after {
  color: inherit;
}

.row__usd {
  display: block;
  margin-top: 2px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 400;
}

.row__usd:empty {
  display: none;
}

.row__cell--link {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.row__link,
.row__calc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-button);
  border: 1px solid var(--color-line);
  background: transparent;
  color: var(--color-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.2s var(--ease);
}

.row__calc:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-ink);
}

/* "To site" is a plain text link; only "Calculate" reads as a control. */
.row__link {
  padding: 0 4px;
  border-color: transparent;
  color: var(--color-muted);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.row__link:hover {
  color: var(--color-ink);
  text-decoration-color: var(--color-accent);
}

.row__link:active,
.row__calc:active {
  transform: scale(0.98);
}

.row__link:focus-visible,
.row__calc:focus-visible,
.brand:focus-visible,
.site-footer a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.board__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.board__switches {
  display: flex;
  gap: 8px;
}

.board__mode {
  min-width: 15rem;
}

.board__currency {
  flex: none;
}

.board__currency span {
  min-width: 2.75rem;
  font-size: 0.9375rem;
}

.segmented.board__presets {
  grid-auto-columns: max-content;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.board__presets span {
  min-height: 2.5rem;
  padding: 0 1rem;
  font-size: 0.875rem;
}

.board__caption {
  min-height: 1.5em;
  margin-bottom: 22px;
  color: var(--color-muted);
  font-size: 14px;
}

.board__head span {
  transition: color 0.3s var(--ease);
}

.board__head[data-side='buy'] span:nth-child(2),
.board__head[data-side='sell'] span:nth-child(3) {
  color: var(--color-ink);
}

.row__usd[data-tone='ok'],
.row__usd[data-tone='warn'] {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0;
}

.row__usd[data-tone='ok'] {
  color: var(--color-good);
}

.row__usd[data-tone='warn'] {
  color: var(--color-warn);
}

.row--out {
  opacity: 0.6;
}

.row--out:hover {
  opacity: 1;
}

.board__error {
  margin-top: 16px;
  padding-left: 14px;
  border-left: 2px solid var(--color-warn);
  color: var(--color-warn);
  font-weight: 600;
}

/* Assets */

.assets {
  padding-bottom: 96px;
}

.assets__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.assets__table thead th {
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--ui-line-strong);
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.assets__table thead th.num {
  text-align: right;
}

.asset > * {
  padding: 16px;
  border-top: 1px solid var(--color-line);
  vertical-align: top;
  text-align: left;
}

.asset--same > * {
  border-top-color: color-mix(in srgb, var(--color-line) 50%, transparent);
}

.asset--same .asset__symbol {
  color: transparent;
}

.asset__symbol {
  width: 20%;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
}

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

.asset > .asset__rate {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
  text-align: right;
}

.asset__rate small {
  display: block;
  margin-top: 2px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 400;
}

.assets__table tbody tr:last-child > * {
  border-bottom: 1px solid var(--color-line);
}

/* Explain */

.explain {
  padding-bottom: 112px;
}

.explain__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}

.explain__list > div {
  padding-top: 18px;
  border-top: 1px solid var(--ui-line-strong);
}

.explain__list dt {
  margin-bottom: 8px;
  font-weight: 750;
  font-size: 18px;
}

.explain__list dd {
  max-width: 34ch;
  color: var(--color-muted);
}

/* FAQ */

.faq {
  padding-bottom: 112px;
}

.faq__list {
  max-width: 860px;
  border-bottom: 1px solid var(--color-line);
}

.faq__item {
  border-top: 1px solid var(--color-line);
}

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding: 16px 0;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
  transition: color 0.3s var(--ease);
}

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

.faq__item summary::after {
  content: '+';
  flex: none;
  color: var(--color-muted);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.4s var(--ease), color 0.3s var(--ease);
}

.faq__item summary:hover::after,
.faq__item[open] summary::after {
  color: var(--color-ink);
}

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

.faq__item summary:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--ui-r-sm);
}

.faq__item p {
  padding: 0 0 22px;
  color: var(--color-muted);
  max-width: 70ch;
}

/* Calculator */

html:has(.calc[open]) {
  overflow: hidden;
}

.calc {
  width: min(480px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-shell);
  background: var(--color-surface);
  color: var(--color-ink);
  box-shadow: var(--ui-shadow-pop);
}

.calc::backdrop {
  background: var(--ui-overlay);
}

.calc__panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 22px 24px 24px;
  background: var(--color-surface);
}

.calc__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

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

.calc__title {
  font-size: 20px;
  font-weight: 760;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.calc__status {
  color: var(--color-muted);
  font-size: 13px;
}

.calc__status[data-state='stale'] {
  color: var(--color-warn);
}

.calc__close {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-line);
  border-radius: var(--ui-r-ctl);
  background: var(--color-canvas);
  color: var(--color-ink);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.2s var(--ease);
}

.calc__close:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-ink);
}

.calc__modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-canvas);
}

.calc__modes label,
.calc__assets label {
  position: relative;
}

.calc__modes input,
.calc__assets input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.calc__modes span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  border-radius: var(--radius-pill);
  color: var(--color-muted);
  font-weight: 700;
  font-size: 15px;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.calc__modes input:checked + span {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

.calc__assets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calc__assets span {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.calc__assets input:checked + span {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.calc__modes input:focus-visible + span,
.calc__assets input:focus-visible + span,
.calc__close:focus-visible,
.calc__preset:focus-visible,
.calc__switch:focus-visible,
.calc__cta:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

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

.calc__label {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 650;
}

.calc__input {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 0 18px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-row);
  background: var(--color-canvas);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.calc__input:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-accent-soft);
}

.calc__input input {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--color-ink);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.calc__unit {
  flex: none;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
}

.calc__presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.calc__preset {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.calc__preset:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.calc__summary {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  font-size: 14px;
}

.calc__summary div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.calc__summary dt {
  color: var(--color-muted);
}

.calc__summary dd {
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.calc__warn {
  padding-left: 14px;
  border-left: 2px solid var(--color-warn);
  color: var(--color-warn);
  font-size: 14px;
  font-weight: 650;
}

.calc__compare {
  display: grid;
  gap: 6px;
  padding-left: 14px;
  border-left: 2px solid var(--color-line);
  font-size: 14px;
  font-weight: 600;
}

.calc__compare[data-state='best'] {
  border-left-color: var(--color-good);
  color: var(--color-good);
}

.calc__switch {
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-ink);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--color-accent) 70%, transparent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.calc__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 20px;
  border-radius: var(--radius-button);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-weight: 750;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.2s var(--ease), filter 0.3s var(--ease);
}

.calc__cta:hover {
  filter: brightness(1.05);
}

.calc__cta:active,
.calc__close:active,
.calc__preset:active {
  transform: scale(0.98);
}

.calc__note {
  margin-top: -6px;
  color: var(--color-muted);
  font-size: 12px;
  text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
  .calc[open] {
    animation: calc-in 0.45s var(--ease);
  }

  .calc[open]::backdrop {
    animation: calc-fade 0.3s var(--ease);
  }
}

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

@keyframes calc-sheet {
  from { transform: translateY(100%); }
}

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

/* Footer */

.site-footer {
  border-top: 1px solid var(--color-line);
  color: var(--color-muted);
  font-size: 14px;
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 28px;
  padding-bottom: 36px;
}

.site-footer__inner p:first-child {
  max-width: 70ch;
}

.site-footer__meta {
  font-family: var(--font-mono);
  font-size: 13px;
  white-space: nowrap;
}

/* States */

.skeleton {
  color: transparent !important;
  background: var(--color-skeleton);
  border-radius: var(--ui-r-sm);
  user-select: none;
}

.flash {
  animation: flash 1.2s var(--ease);
}

@keyframes flash {
  0% { background-color: var(--ui-ok-soft); color: var(--color-good); }
  100% { background-color: transparent; }
}

/*
 * kztusdt UI kit motion: scroll reveal + entrance.
 *
 * [data-reveal="<variant>"]  driven by /reveal.js; hidden only while data-reveal-state
 *                            is above | below, so markup without the script stays visible.
 *   variants: '' (rise) · left · right · scale · panel
 *   stagger:  --reveal-delay, applied on enter only
 * [data-reveal-pop]          child that fades in after its reveal parent
 * [data-enter="<variant>"]   CSS-only entrance on load
 *   variants: '' (rise) · scale
 *   stagger:  --enter-delay
 */
:root {
  --ui-reveal-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ui-reveal-t: 700ms;
}

@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    --reveal-shift: 12px;
    --reveal-dir: 1;
    --reveal-y: calc(var(--reveal-shift) * var(--reveal-dir));
    transition:
      opacity var(--ui-reveal-t) var(--ui-reveal-ease),
      transform var(--ui-reveal-t) var(--ui-reveal-ease);
  }

  [data-reveal][data-reveal-state='above'] {
    --reveal-dir: -1;
  }

  [data-reveal='panel'] {
    --reveal-shift: 16px;
    --ui-reveal-t: 900ms;
  }

  [data-reveal][data-reveal-state]:not([data-reveal-state='in']) {
    opacity: 0;
    transform: translateY(var(--reveal-y));
  }

  [data-reveal='left'][data-reveal-state]:not([data-reveal-state='in']) {
    transform: translate3d(-12px, calc(var(--reveal-y) / 2), 0);
  }

  [data-reveal='right'][data-reveal-state]:not([data-reveal-state='in']) {
    transform: translate3d(12px, calc(var(--reveal-y) / 2), 0);
  }

  [data-reveal='scale'][data-reveal-state]:not([data-reveal-state='in']) {
    transform: translateY(calc(var(--reveal-y) / 2));
  }

  [data-reveal='panel'][data-reveal-state]:not([data-reveal-state='in']) {
    opacity: 0.4;
    transform: translateY(var(--reveal-y));
  }

  [data-reveal][data-reveal-state='in'] {
    transition-delay: var(--reveal-delay, 0ms);
  }

  .faq__item[data-reveal] {
    transition:
      opacity var(--ui-reveal-t) var(--ui-reveal-ease),
      transform var(--ui-reveal-t) var(--ui-reveal-ease),
      border-color 0.3s var(--ease);
  }

  .faq__item[data-reveal][data-reveal-state='in'] {
    transition-delay: var(--reveal-delay, 0ms), var(--reveal-delay, 0ms), 0ms;
  }

  /* Pop: follows the nearest reveal ancestor, not an outer panel */
  [data-reveal-state] [data-reveal-pop] {
    opacity: 0;
    transition: opacity 600ms var(--ui-reveal-ease);
  }

  [data-reveal-state='in'] [data-reveal-pop] {
    opacity: 1;
    transition-delay: calc(var(--reveal-delay, 0ms) + 180ms);
  }

  [data-reveal-state='in'] [data-reveal-state]:not([data-reveal-state='in']) [data-reveal-pop] {
    opacity: 0;
    transition-delay: 0ms;
  }

  [data-enter] {
    animation: ui-enter 900ms var(--ui-reveal-ease) var(--enter-delay, 0ms) both;
  }

  [data-enter='scale'] {
    animation-name: ui-enter-scale;
    animation-duration: 1100ms;
  }

  @keyframes ui-enter {
    from {
      opacity: 0;
      transform: translateY(12px);
    }
  }

  @keyframes ui-enter-scale {
    from {
      opacity: 0;
      transform: translateY(16px);
    }
  }
}

.live[data-state='ok'] .live__pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--color-good);
  animation: pulse 2.4s var(--ease) infinite;
}

@keyframes pulse {
  from { transform: scale(1); opacity: 0.6; }
  to { transform: scale(2.8); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .flash,
  .live__pulse::after {
    animation: none !important;
  }

  .row,
  .row__link {
    transition: none;
  }
}

/* Mobile */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 48px;
    padding-bottom: 64px;
  }

  .explain__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }
}

@media (max-width: 1023px) and (min-width: 768px) {
  .board__head {
    display: none;
  }

  .row {
    grid-template-columns: 1fr 1fr auto;
    gap: 14px 20px;
    padding: 20px 0 20px 16px;
  }

  .row__name {
    grid-column: 1 / span 2;
  }

  .row__cell--link {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .row__cell {
    text-align: left;
    font-size: 19px;
  }

  .row__label {
    display: block;
    color: var(--color-muted);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
  }

  .row__link,
  .row__calc {
    height: 44px;
  }
}

@media (max-width: 767px) {
  .shell {
    padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
  }

  .site-header__inner {
    height: 60px;
  }

  .brand {
    font-size: 17px;
  }

  .hero {
    gap: 28px;
    padding-top: 36px;
    padding-bottom: 56px;
  }

  .hero__title {
    font-size: clamp(34px, 10.5vw, 44px);
    max-width: none;
  }

  .hero__lead {
    margin-top: 16px;
    font-size: 16px;
  }

  .fx {
    display: flex;
    justify-content: space-between;
    width: 100%;
  }

  .best {
    grid-template-columns: 1fr;
  }

  .best > :first-child {
    padding-right: 0;
  }

  .best > * + * {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--color-line);
  }

  .best__card {
    padding: 18px 0 20px;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      'label label'
      'value value'
      'source usd';
    row-gap: 10px;
  }

  .best__value {
    font-size: 40px;
  }

  .best__usd {
    align-self: center;
  }

  .best__source {
    margin-top: 0;
  }

  .section-title {
    margin-bottom: 20px;
  }

  .board,
  .assets {
    padding-bottom: 64px;
  }

  .board__tools {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

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

  .segmented.board__presets {
    grid-auto-columns: minmax(max-content, 1fr);
  }

  .board__presets span {
    padding: 0 0.6rem;
    font-size: 0.8125rem;
  }

  .board__caption {
    margin-bottom: 16px;
    font-size: 13px;
  }

  .faq,
  .explain {
    padding-bottom: 72px;
  }

  .faq__item summary {
    font-size: 16px;
  }

  .board__head {
    display: none;
  }

  .row {
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
    padding: 20px 0 20px 14px;
  }

  .row__name,
  .row__cell--link {
    grid-column: 1 / -1;
  }

  .row__cell {
    text-align: left;
    font-size: 18px;
  }

  .row__label {
    display: block;
    color: var(--color-muted);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
  }

  .row__cell--link {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .row__link,
  .row__calc {
    height: 44px;
    font-size: 15px;
  }

  .calc {
    width: 100%;
    max-height: calc(100dvh - 12px);
    margin: auto 0 0;
    padding: 0;
    border-bottom: 0;
    border-radius: var(--radius-shell) var(--radius-shell) 0 0;
  }

  .calc__panel {
    gap: 16px;
    padding: 18px 18px max(20px, env(safe-area-inset-bottom));
  }

  .calc__input input {
    font-size: 24px;
  }

  .calc__presets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calc__preset {
    height: 40px;
  }

  .explain__list {
    grid-template-columns: 1fr;
  }

  .fx {
    margin-top: 20px;
  }

  .site-footer__inner {
    flex-direction: column;
    gap: 12px;
    padding-bottom: max(28px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 767px) and (prefers-reduced-motion: no-preference) {
  .calc[open] {
    animation: calc-sheet 0.45s var(--ease);
  }
}

@media (max-width: 420px) {

  .best__value {
    font-size: 36px;
  }

  .row {
    padding-left: 12px;
  }
}

/* Exchanger page */

a.row__title {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.3s var(--ease);
}

a.row__title:hover,
a.row__title:focus-visible {
  text-decoration-color: var(--color-accent);
}

.crumbs {
  display: flex;
  gap: 10px;
  padding-top: 32px;
  color: var(--color-muted);
  font-size: 14px;
}

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

.ex-hero {
  padding-top: 32px;
}

.ex-hero__id {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.ex-hero__id .row__terms {
  margin-top: 0;
}

.ex-hero__title {
  max-width: 14ch;
}

.ex-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.ex-hero__button {
  height: 48px;
  padding-inline: 22px;
  font-size: 15px;
}

.chart {
  padding-bottom: 96px;
}

.chart__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 28px;
}

.chart__head .section-title {
  margin-bottom: 0;
  max-width: 22ch;
}

.chart__ranges {
  grid-template-columns: repeat(4, minmax(0, auto));
}

.chart__ranges span {
  height: 38px;
  padding-inline: 16px;
  font-size: 14px;
}

.chart__card {
  padding-top: 20px;
  border-top: 1px solid var(--color-line);
}

.chart__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--color-muted);
}

.chart__legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chart__swatch {
  width: 18px;
  height: 0;
  border-top: 2.5px solid var(--chart-color);
}

.chart__swatch--usd {
  border-top-style: dashed;
  border-top-width: 2px;
}

.chart__plot {
  position: relative;
  min-height: 240px;
  display: grid;
  place-items: center;
}

.chart__empty {
  max-width: 36ch;
  text-align: center;
  color: var(--color-muted);
  font-size: 15px;
}

.chart__svg {
  display: block;
  width: 100%;
  height: auto;
  touch-action: pan-y;
  overflow: visible;
}

.chart {
  --chart-buy: var(--color-good);
  --chart-sell: var(--color-ink);
  --chart-usd: var(--color-muted);
}

.chart__swatch--buy { --chart-color: var(--chart-buy); }
.chart__swatch--sell { --chart-color: var(--chart-sell); }
.chart__swatch--usd { --chart-color: var(--chart-usd); }

.chart__grid line {
  stroke: var(--color-line);
  stroke-width: 1;
}

.chart__axis {
  fill: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.chart__line {
  fill: none;
  stroke-width: 2.25;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart__line--buy { stroke: var(--chart-buy); }
.chart__line--sell { stroke: var(--chart-sell); }
.chart__line--usd { stroke: var(--chart-usd); stroke-dasharray: 5 5; stroke-width: 1.5; }
.chart__dot--buy, .chart__marker--buy { fill: var(--chart-buy); }
.chart__dot--sell, .chart__marker--sell { fill: var(--chart-sell); }
.chart__dot--usd, .chart__marker--usd { fill: var(--chart-usd); }

.chart__marker {
  stroke: var(--color-surface);
  stroke-width: 2;
}

.chart__cursor-line {
  stroke: var(--color-muted);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}

.chart__tip {
  position: absolute;
  top: 0;
  left: 0;
  min-width: 190px;
  padding: 12px 14px;
  border-radius: var(--ui-r-ctl);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  box-shadow: var(--ui-shadow-soft);
  pointer-events: none;
  font-size: 13px;
}

.chart__tip-time {
  margin-bottom: 8px;
  color: var(--color-muted);
}

.chart__tip dl {
  display: grid;
  gap: 4px;
}

.chart__tip dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.chart__tip-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart__tip-key::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--chart-color);
}

.chart__tip-key--buy { --chart-color: var(--chart-buy); }
.chart__tip-key--sell { --chart-color: var(--chart-sell); }
.chart__tip-key--usd { --chart-color: var(--chart-usd); }

.chart__note {
  margin-top: 10px;
  color: var(--color-muted);
  font-size: 13px;
}

.chart__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 20px;
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}

.chart__stat {
  padding: 18px 20px;
}

.chart__stat:first-child {
  padding-left: 0;
}

.chart__stat + .chart__stat {
  border-left: 1px solid var(--color-line);
}

.chart__stat dt {
  color: var(--color-muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.chart__stat dd {
  font-size: 17px;
  font-weight: 700;
}

.terms {
  padding-bottom: 96px;
}

.terms__body {
  display: grid;
  gap: 16px;
  max-width: 760px;
  font-size: 16px;
}

.terms__table {
  border-bottom: 1px solid var(--color-line);
}

.terms__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--color-line);
}

.terms__table--three .terms__row {
  grid-template-columns: minmax(0, 1fr) 96px 96px;
}

.terms__row > span:not(:first-child) {
  text-align: right;
}

.terms__row--head {
  padding-top: 0;
  border-top: 0;
  border-bottom: 1px solid var(--ui-line-strong);
  color: var(--color-muted);
  font-size: 13px;
}

.terms__row--head + .terms__row {
  border-top: 0;
}

.terms__hint {
  color: var(--color-muted);
  font-size: 14px;
}

.others {
  padding-bottom: 96px;
}

.others__grid {
  display: grid;
  border-bottom: 1px solid var(--color-line);
}

.other {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--color-line);
  text-decoration: none;
}

.other__name {
  font-weight: 720;
  font-size: 17px;
  letter-spacing: -0.02em;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.3s var(--ease);
}

.other:hover .other__name {
  text-decoration-color: var(--color-accent);
}

.other__rate {
  display: grid;
  gap: 2px;
  justify-items: end;
}

.other__label {
  color: var(--color-muted);
  font-size: 13px;
}

.other__rate .num {
  font-size: 17px;
  font-weight: 700;
}

.other__rate small {
  color: var(--color-muted);
  font-size: 12px;
}

@media (max-width: 1023px) {
  .chart__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart__stat:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

  .chart__stat:nth-child(n + 3) {
    border-top: 1px solid var(--color-line);
  }
}

@media (max-width: 767px) {
  .crumbs {
    padding-top: 20px;
  }

  .ex-hero {
    padding-top: 20px;
  }

  .ex-hero__actions > * {
    flex: 1 1 0;
  }

  .chart,
  .terms,
  .others {
    padding-bottom: 64px;
  }

  .chart__ranges {
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .chart__ranges span {
    padding-inline: 4px;
    font-size: 13px;
  }

  .chart__stat {
    padding: 14px 16px;
  }

  .chart__stat dd {
    font-size: 15px;
    white-space: nowrap;
  }

  .other {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    row-gap: 10px;
  }

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

  .other__rate {
    justify-items: start;
  }

  .terms__table--three .terms__row {
    grid-template-columns: minmax(0, 1fr) 72px 72px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .chart__svg--enter .chart__line {
    animation: chart-in 0.6s var(--ease) both;
  }
}

@keyframes chart-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .other__name {
    transition: none;
  }
}

/* Registry page */

.board__note,
.registry__source {
  margin-top: 16px;
  color: var(--color-muted);
  font-size: 14px;
}

.board__note a,
.registry__source a,
.terms__license a,
.site-footer__link {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--color-accent) 70%, transparent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.board__note a:hover,
.registry__source a:hover,
.terms__license a:hover,
.site-footer__link:hover {
  text-decoration-color: var(--color-accent);
}

.terms__license {
  padding-left: 14px;
  border-left: 2px solid var(--color-accent);
  font-size: 15px;
}

.reg-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 56px;
  align-items: end;
  padding-top: 32px;
  padding-bottom: 72px;
}

.reg-hero__eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reg-hero__title {
  max-width: 16ch;
}

.reg-meta {
  display: grid;
  border-bottom: 1px solid var(--color-line);
}

.reg-meta__item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--color-line);
}

.reg-meta__item dt {
  color: var(--color-muted);
  font-size: 14px;
}

.reg-meta__item dd {
  font-weight: 700;
  text-align: right;
}

.reg-meta__item dd.num {
  font-size: 22px;
}

.registry {
  padding-bottom: 96px;
}

.registry__error {
  margin-bottom: 16px;
  padding-left: 14px;
  border-left: 2px solid var(--color-warn);
  color: var(--color-warn);
  font-weight: 600;
}

.registry__list {
  display: grid;
  padding: 0;
  border-bottom: 1px solid var(--color-line);
  list-style: none;
}

.op {
  border-top: 1px solid var(--color-line);
}

.op__core {
  display: grid;
  gap: 22px;
  padding: 28px 0;
}

.op__head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.op__num {
  flex: none;
  width: 2.5rem;
  padding-top: 10px;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 700;
}

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

.op__name {
  margin: 8px 0 0;
  font-size: 21px;
  font-weight: 760;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.op__license {
  margin-top: 4px;
  color: var(--color-muted);
  font-size: 14px;
}

.op__badge {
  flex: none;
  margin-top: 4px;
}

.op__details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr) minmax(0, 1.6fr);
  gap: 18px 28px;
}

.op__details dt {
  margin-bottom: 4px;
  color: var(--color-muted);
  font-size: 13px;
}

.op__details dd {
  font-size: 15px;
  line-height: 1.45;
}

.op__rates {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: end;
  gap: 16px 36px;
  padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, var(--color-line) 50%, transparent);
}

.op__rate {
  display: grid;
  gap: 2px;
}

.op__rate .num {
  font-size: 20px;
  font-weight: 700;
}

.op__rate small {
  color: var(--color-muted);
  font-size: 12px;
}

.op__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.op__actions > * {
  height: 42px;
  padding-inline: 18px;
}

@media (max-width: 1023px) {
  .reg-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    align-items: start;
  }

  .op__details {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .op__details > div:nth-child(3) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .reg-hero {
    padding-top: 20px;
    padding-bottom: 48px;
  }

  .registry {
    padding-bottom: 64px;
  }

  .op__core {
    padding: 22px 0;
    gap: 18px;
  }

  .op__head {
    flex-wrap: wrap;
    gap: 12px 14px;
  }

  .op__badge {
    order: 3;
    margin-top: 0;
  }

  .op__name {
    font-size: 18px;
  }

  .op__details {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .op__rates {
    grid-template-columns: 1fr 1fr;
  }

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

  .op__actions > * {
    flex: 1 1 0;
  }
}

/* Accessibility helpers */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-button);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-weight: 750;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus-visible {
  transform: none;
  outline: 2px solid var(--color-ink);
  outline-offset: 2px;
}

/* Site navigation */

.site-header__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: 'brand nav aside';
}

.site-header__inner > .brand {
  grid-area: brand;
}

.site-nav {
  grid-area: nav;
  min-width: 0;
  justify-self: center;
}

.site-nav__track {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav__track::-webkit-scrollbar {
  display: none;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding-inline: 0.875rem;
  border-radius: var(--radius-pill);
  color: var(--color-muted);
  font-size: 0.875rem;
  font-weight: 650;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.site-nav__link:hover {
  color: var(--color-ink);
  background: var(--color-shell);
}

.site-nav__link[aria-current='page'] {
  color: var(--color-ink);
  background: var(--color-accent-soft);
}

.site-header__aside {
  grid-area: aside;
  display: flex;
  align-items: center;
  gap: 10px;
}


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

/* Controls: segmented control and buttons */

.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  padding: 4px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-canvas);
}

.segmented label {
  position: relative;
}

.segmented input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.segmented span,
.segmented button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-muted);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.segmented label:hover span,
.segmented button:hover {
  color: var(--color-ink);
}

.segmented input:checked + span,
.segmented button[aria-selected='true'] {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

.segmented input:focus-visible + span,
.segmented button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.segmented--compact span {
  min-height: 2.25rem;
  font-size: 0.8125rem;
}

.segmented--compact input:checked + span {
  background: var(--color-surface);
  color: var(--color-ink);
  box-shadow: 0 1px 3px rgba(20, 20, 20, 0.12), inset 0 0 0 1px var(--color-line);
}

.segmented--tabs {
  max-width: 30rem;
  margin-bottom: 20px;
  background: var(--color-surface);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-button);
  background: var(--color-surface);
  color: var(--color-ink);
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), filter 0.3s var(--ease), background-color 0.3s var(--ease);
}

.button--primary {
  min-height: 3.25rem;
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

.button--primary:hover {
  filter: brightness(1.05);
}

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

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

.calc__help,
.tool__hint {
  color: var(--color-muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.tool__hint a,
.section-head__link,
.prose a,
.site-footer__disclaimer a {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--color-accent) 70%, transparent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.tool__hint a:hover,
.section-head__link:hover,
.prose a:hover {
  text-decoration-color: var(--color-accent);
}

/* Section heads and page heroes */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.section-head .section-title {
  margin-bottom: 0;
}

.section-head__link {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: 0.9375rem;
  font-weight: 700;
}

.page-hero {
  padding-top: 28px;
  padding-bottom: 48px;
}

.page-hero__title {
  max-width: 20ch;
  font-size: clamp(2.25rem, 4.6vw, 3.5rem);
}

.page-hero__note {
  display: inline-block;
  margin-top: 16px;
  color: var(--color-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

/* Home: quick estimate */

.quick {
  padding-bottom: 96px;
}

.quick__core {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: start;
}

.quick__title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.quick__lead {
  margin-top: 12px;
  max-width: 36ch;
  color: var(--color-muted);
}

.quick__controls {
  display: grid;
  gap: 12px;
}

.quick__controls .segmented {
  margin-bottom: 4px;
}

.quick__result {
  min-height: 1.5em;
  color: var(--color-good);
  font-weight: 700;
}

/* Home: headlines and lessons as two-column hairline lists */

.headlines,
.lessons {
  padding-bottom: 96px;
}

.headlines__list,
.lessons__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 48px;
  border-bottom: 1px solid var(--color-line);
}

.headline {
  border-top: 1px solid var(--color-line);
}

.headline__link {
  display: grid;
  align-content: start;
  gap: 8px;
  height: 100%;
  padding: 18px 0 20px;
  text-decoration: none;
}

.headline__meta,
.story__meta {
  display: flex;
  gap: 10px;
  color: var(--color-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.headline__meta time::before,
.story__meta time::before {
  content: '·';
  margin-right: 10px;
}

.headline__title,
.lesson__title {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.3s var(--ease);
}

.headline__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.headline__link:hover .headline__title,
.lesson:hover .lesson__title {
  text-decoration-color: var(--color-accent);
}

.lesson {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  grid-template-areas:
    'num title'
    'num meta';
  column-gap: 12px;
  row-gap: 6px;
  padding: 20px 0;
  border-top: 1px solid var(--color-line);
  text-decoration: none;
}

.lesson__num {
  grid-area: num;
  padding-top: 3px;
  color: var(--color-muted);
  font-size: 0.8125rem;
  font-weight: 700;
  transition: color 0.3s var(--ease);
}

.lesson__title {
  grid-area: title;
  font-weight: 720;
  font-size: 1.0625rem;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.lesson__meta {
  grid-area: meta;
  color: var(--color-muted);
  font-size: 0.8125rem;
}

.lesson:hover .lesson__num {
  color: var(--color-good);
}

.headline__link:focus-visible,
.lesson:focus-visible,
.story__link:focus-visible,
.course__link:focus-visible,
.pager__link:focus-visible,
.section-head__link:focus-visible,
.prose a:focus-visible,
.toc a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* Calculator page */

.tool {
  padding-bottom: 96px;
}

.tool__core {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 56px;
  margin-top: 24px;
  padding-top: 32px;
  border-top: 1px solid var(--color-line);
}

.tool__form {
  display: grid;
  align-content: start;
  gap: 16px;
}

.tool__results {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.tool__results-title {
  font-size: 1.125rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.tool__empty {
  padding: 16px 0;
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  color: var(--color-muted);
}

.offers {
  display: grid;
  border-bottom: 1px solid var(--color-line);
}

.offer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas:
    'name get cta'
    'notes rate cta';
  align-items: center;
  position: relative;
  gap: 4px 16px;
  padding: 14px 0 14px 14px;
  border-top: 1px solid var(--color-line);
}

.offer.is-best::before {
  content: '';
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: 0;
  width: 2px;
  background: var(--color-good);
}

.offer.is-best .offer__get .num {
  color: var(--color-good);
}

.offer.is-blocked {
  opacity: 0.62;
}

.offer__name {
  grid-area: name;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-weight: 720;
}

.offer__name a {
  text-decoration: none;
}

.offer__name a:hover {
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.offer__name .row__terms {
  margin-top: 0;
}

.offer__get {
  grid-area: get;
  display: grid;
  justify-items: end;
  font-size: 1.125rem;
  font-weight: 700;
}

.offer__get small {
  color: var(--color-muted);
  font-size: 0.75rem;
}

.offer__rate {
  grid-area: rate;
  justify-self: end;
  color: var(--color-muted);
  font-size: 0.8125rem;
}

.offer__notes {
  grid-area: notes;
  color: var(--color-muted);
  font-size: 0.8125rem;
}

.offer.is-blocked .offer__notes {
  color: var(--color-warn);
  font-weight: 600;
}

.offer__cta {
  grid-area: cta;
  min-height: 2.75rem;
}

/* Stat row: figures split by vertical rules; the stacked variant splits by horizontal ones. */
.figures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}

.figures--stack {
  grid-template-columns: minmax(0, 1fr);
}

.figures__item {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 18px 20px;
}

.figures:not(.figures--stack) .figures__item:first-child {
  padding-left: 0;
}

.figures:not(.figures--stack) .figures__item + .figures__item {
  border-left: 1px solid var(--color-line);
}

.figures--stack .figures__item {
  padding-inline: 0;
}

.figures--stack .figures__item + .figures__item {
  border-top: 1px solid var(--color-line);
}

.figures__item dt {
  color: var(--color-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.figures__item dd {
  font-size: 1.5rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.figures__item small {
  color: var(--color-muted);
  font-size: 0.75rem;
}

.figures__item--accent dd {
  color: var(--color-good);
}

.tool .calc__warn {
  margin-top: 10px;
}

.tool .tool__hint + .tool__hint {
  margin-top: 8px;
}

.figures--stack + .calc__warn + .tool__hint,
.figures--stack + .calc__warn[hidden] + .tool__hint {
  margin-top: 16px;
}

.amounts {
  padding-bottom: 96px;
}

.amounts__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}

.amount {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 22px 24px;
}

.amount:first-child {
  padding-left: 0;
}

.amount + .amount {
  border-left: 1px solid var(--color-line);
}

.amount__title {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.875rem;
  font-weight: 700;
}

.amount__value {
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.15;
}

.amount__note {
  color: var(--color-good);
  font-size: 0.8125rem;
  font-weight: 650;
}

.amount__back {
  margin-top: 6px;
  color: var(--color-muted);
  font-size: 0.8125rem;
}

/* News feed */

.feed {
  max-width: calc(860px + 48px);
  margin-inline: 0 auto;
  padding-bottom: 96px;
}

@media (min-width: 1248px) {
  .feed {
    margin-inline: calc((100% - 1200px) / 2) auto;
  }
}

.feed__bar {
  position: sticky;
  top: 68px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 12px 0;
  margin-bottom: 8px;
  background: var(--color-canvas);
}

.feed__bar .segmented {
  min-width: min(100%, 22rem);
}

.feed__meta {
  color: var(--color-muted);
  font-size: 0.8125rem;
}

.feed__day + .feed__day {
  margin-top: 28px;
}

.feed__date {
  margin: 0 0 6px;
  color: var(--color-muted);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.feed__list {
  border-top: 1px solid var(--color-line);
}

.story {
  border-bottom: 1px solid var(--color-line);
}

.story__link {
  display: grid;
  gap: 6px;
  padding: 18px 4px;
  text-decoration: none;
  border-radius: var(--ui-r-sm);
}

.story__source {
  color: var(--color-ink);
}

.story__title {
  font-weight: 720;
  font-size: 1.125rem;
  line-height: 1.35;
  letter-spacing: -0.015em;
  transition: color 0.2s var(--ease);
}

.story__link:hover .story__title {
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.story__excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--color-muted);
  font-size: 0.9375rem;
}

/* Learn: course index */

.course {
  padding-bottom: 96px;
}

.course__list {
  display: grid;
  max-width: 920px;
  border-bottom: 1px solid var(--color-line);
}

.course__link {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 22px;
  padding: 22px 0;
  border-top: 1px solid var(--color-line);
  text-decoration: none;
}

.course__num {
  color: var(--color-muted);
  font-size: 0.875rem;
  font-weight: 700;
  transition: color 0.3s var(--ease);
}

.course__link:hover .course__num {
  color: var(--color-good);
}

.course__title {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.3s var(--ease);
}

.course__link:hover .course__title {
  text-decoration-color: var(--color-accent);
}

.course__body {
  display: grid;
  gap: 4px;
}

.course__title {
  font-weight: 740;
  font-size: 1.125rem;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.course__desc {
  color: var(--color-muted);
  font-size: 0.9375rem;
}

.course__meta {
  color: var(--color-muted);
  font-size: 0.8125rem;
  text-align: right;
  white-space: nowrap;
}

/* Learn: article, static pages */

.article {
  padding-top: 28px;
  padding-bottom: 96px;
}

.article__head {
  max-width: 760px;
  margin-bottom: 48px;
}

.article__meta {
  margin-bottom: 14px;
  color: var(--color-muted);
  font-size: 0.875rem;
  font-weight: 650;
}

.article__title {
  max-width: 22ch;
  font-size: clamp(2.125rem, 4.4vw, 3.25rem);
}

.article__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  grid-template-areas: 'prose aside';
  gap: 64px;
  align-items: start;
}

.article__aside {
  grid-area: aside;
  position: sticky;
  top: 92px;
  display: grid;
  gap: 16px;
}

.article__layout > .prose {
  grid-area: prose;
}

.toc {
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--color-line);
}

.toc__title {
  margin-bottom: 8px;
  color: var(--color-muted);
  font-size: 0.8125rem;
  font-weight: 700;
}

.toc ol {
  display: grid;
  gap: 2px;
}

.toc a {
  display: block;
  padding: 5px 0;
  color: var(--color-muted);
  font-size: 0.875rem;
  line-height: 1.4;
  text-decoration: none;
}

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

.article__rate-core {
  display: grid;
  gap: 6px;
  padding-left: 16px;
  border-left: 2px solid var(--color-accent);
}

.article__rate-label {
  color: var(--color-muted);
  font-size: 0.8125rem;
  font-weight: 650;
}

.article__rate-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
}

.article__rate-value .num {
  color: var(--color-good);
}

.article__rate-note {
  color: var(--color-muted);
  font-size: 0.875rem;
}

.article__rate .button {
  margin-top: 10px;
}

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

.prose--wide {
  max-width: 760px;
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose h2 {
  margin-top: 2.2em;
  font-size: 1.625rem;
  font-weight: 760;
  letter-spacing: -0.03em;
  line-height: 1.2;
  scroll-margin-top: 96px;
}

.prose h3 {
  margin: 1.8em 0 0;
  font-size: 1.1875rem;
  font-weight: 740;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.prose h2 + *,
.prose h3 + * {
  margin-top: 0.6em;
}

.prose ul,
.prose ol {
  display: grid;
  gap: 0.45em;
  padding-left: 1.25em;
}

.prose ul {
  list-style: none;
}

.prose ul li {
  position: relative;
}

.prose ul li::before {
  content: '';
  position: absolute;
  left: -1.05em;
  top: 0.68em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

.prose ol {
  list-style: decimal;
}

.prose ol li::marker {
  color: var(--color-muted);
  font-weight: 700;
}

.prose strong {
  font-weight: 750;
}

.prose code {
  padding: 1px 6px;
  border-radius: var(--ui-r-sm);
  background: var(--color-shell);
  border: 1px solid var(--color-line);
  font-family: var(--font-mono);
  font-size: 0.85em;
}

.prose__note {
  padding-left: 18px;
  border-left: 2px solid var(--color-accent);
  font-size: 0.9875rem;
}

.prose__table {
  overflow-x: auto;
  border-bottom: 1px solid var(--color-line);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.prose th,
.prose td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
}

.prose th:first-child,
.prose td:first-child {
  padding-left: 0;
}

.prose th {
  border-bottom: 1px solid var(--ui-line-strong);
  color: var(--color-muted);
  font-size: 0.8125rem;
  font-weight: 700;
}

.prose tr + tr td,
.prose tbody tr:first-child td {
  border-top: 1px solid var(--color-line);
}

.prose__updated {
  margin-top: 2.5em !important;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 32px;
  margin-top: 56px;
  border-top: 1px solid var(--color-line);
}

.pager__link {
  display: grid;
  gap: 4px;
  padding: 18px 0;
  text-decoration: none;
}

.pager__title {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.3s var(--ease);
}

.pager__link:hover .pager__title {
  text-decoration-color: var(--color-accent);
}

.pager__link--next {
  grid-column: 2;
  text-align: right;
}

.pager__label {
  color: var(--color-muted);
  font-size: 0.8125rem;
  font-weight: 650;
}

.pager__title {
  font-weight: 720;
  line-height: 1.3;
}

/* News: region tag, article page, source attribution */

.story__tag {
  color: var(--color-good);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
}

.story__link--media {
  grid-template-columns: minmax(0, 1fr) 184px;
  grid-template-areas:
    'meta thumb'
    'title thumb'
    'excerpt thumb';
  grid-template-rows: auto auto 1fr;
  column-gap: 24px;
  align-items: start;
}

.story__link--media .story__meta { grid-area: meta; }
.story__link--media .story__title { grid-area: title; }
.story__link--media .story__excerpt { grid-area: excerpt; }

.story__thumb {
  grid-area: thumb;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--ui-r-ctl);
  border: 1px solid var(--color-line);
  background: var(--color-shell);
}

.story__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story__thumb--empty {
  display: grid;
  place-items: center;
  color: var(--color-muted);
  font-size: 1.25rem;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.news-cover {
  max-width: 1040px;
  margin: -16px 0 48px;
}

.news-cover img,
.news-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-core);
  border: 1px solid var(--color-line);
  background: var(--color-shell);
}

.news-cover img {
  max-height: 480px;
  object-fit: cover;
}

.news-cover figcaption,
.news-figure figcaption {
  margin-top: 10px;
  color: var(--color-muted);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.prose > .news-figure {
  margin-block: 1.8em;
}

.news-figure img {
  border-radius: var(--radius-row);
}

.news-article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.news-article__title {
  max-width: 28ch;
  font-size: clamp(1.875rem, 3.6vw, 2.75rem);
}

.news-more {
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--color-line);
}

.news-more__list {
  display: grid;
}

.news-more__link {
  display: grid;
  gap: 2px;
  padding: 9px 0;
  font-size: 0.875rem;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.news-more__list li + li .news-more__link {
  border-top: 1px solid var(--color-line);
}

.news-more__link:hover {
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.news-more__date {
  color: var(--color-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.prose > .news-source {
  margin-top: 3em;
}

.news-source__core {
  display: grid;
  gap: 14px;
  padding-top: 22px;
  border-top: 1px solid var(--ui-line-strong);
}

.news-source__title {
  color: var(--color-muted);
  font-size: 0.8125rem;
  font-weight: 700;
}

.news-source__list {
  display: grid;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.news-source__row {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 4px 16px;
  padding: 10px 0;
  border-top: 1px solid var(--color-line);
}

.news-source__row dt {
  color: var(--color-muted);
  font-weight: 650;
}

.news-source__row dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.news-source__note {
  color: var(--color-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Footer */

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  grid-template-areas:
    'brand cols'
    'meta meta';
  gap: 40px 56px;
  padding-top: 48px;
  padding-bottom: 40px;
}

.site-footer__brand {
  grid-area: brand;
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 16px;
}

.site-footer__brand .brand {
  color: var(--color-ink);
}

.site-footer__disclaimer {
  max-width: 44ch;
  font-size: 0.8125rem;
  line-height: 1.6;
}

.site-footer__cols {
  grid-area: cols;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.site-footer__title {
  margin: 0 0 10px;
  color: var(--color-ink);
  font-size: 0.8125rem;
  font-weight: 750;
}

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

.site-footer__cols a {
  display: inline-block;
  padding: 5px 0;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

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

.site-footer__meta {
  grid-area: meta;
  padding-top: 20px;
  border-top: 1px solid var(--color-line);
}

/* Responsive */

@media (max-width: 1023px) {
  .site-header__inner {
    height: auto;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      'brand aside'
      'nav nav';
    row-gap: 0;
    padding-top: 10px;
  }

  .site-header__aside {
    justify-self: end;
  }

  .site-nav {
    justify-self: stretch;
    margin-inline: -8px;
  }

  .site-nav__track {
    padding: 8px 8px 10px;
  }

  .site-nav__link {
    min-height: 2.75rem;
  }

  .feed__bar {
    top: 116px;
  }

  .quick__core,
  .tool__core {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .amounts__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .amount,
  .amount:first-child {
    padding-inline: 0;
  }

  .amount + .amount {
    border-left: 0;
    border-top: 1px solid var(--color-line);
  }

  .article__layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'aside'
      'prose';
    gap: 32px;
  }

  .article__aside {
    position: static;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .site-footer__inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'brand'
      'cols'
      'meta';
    gap: 32px;
  }
}

@media (max-width: 767px) {
  .site-header__inner {
    height: auto;
  }

  .feed__bar {
    top: 116px;
  }

  .section-head {
    margin-bottom: 20px;
  }

  .quick,
  .headlines,
  .lessons,
  .tool,
  .amounts,
  .feed,
  .course,
  .article {
    padding-bottom: 64px;
  }

  .segmented--tabs {
    max-width: none;
  }

  .headlines__list,
  .lessons__grid,
  .figures {
    grid-template-columns: minmax(0, 1fr);
  }

  .figures:not(.figures--stack) .figures__item {
    padding-inline: 0;
  }

  .figures:not(.figures--stack) .figures__item + .figures__item {
    border-left: 0;
    border-top: 1px solid var(--color-line);
  }

  .headlines__list > :nth-child(n + 4) {
    display: none;
  }

  .story__link--media {
    grid-template-columns: minmax(0, 1fr) 104px;
    grid-template-areas:
      'meta meta'
      'title thumb'
      'excerpt excerpt';
    grid-template-rows: auto auto auto;
    column-gap: 14px;
  }

  .story__thumb {
    border-radius: var(--ui-r-ctl);
  }

  .news-cover {
    margin: -24px 0 32px;
  }

  .news-source__row {
    grid-template-columns: minmax(0, 1fr);
  }

  .offer {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      'name name'
      'get rate'
      'notes notes'
      'cta cta';
    gap: 6px 12px;
  }

  .offer__get {
    justify-items: start;
  }

  .offer__rate {
    align-self: start;
    padding-top: 4px;
  }

  .offer__notes:empty {
    display: none;
  }

  .offer__cta {
    width: 100%;
    margin-top: 6px;
  }

  .course__link {
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 6px 14px;
    padding: 18px 0;
  }

  .course__meta {
    grid-column: 2;
    text-align: left;
  }

  .course__meta br {
    display: none;
  }

  .course__meta br + * {
    margin-left: 0.4em;
  }

  .article__aside {
    grid-template-columns: minmax(0, 1fr);
  }

  .prose {
    font-size: 1rem;
  }

  .prose h2 {
    font-size: 1.375rem;
  }

  .pager {
    grid-template-columns: minmax(0, 1fr);
  }

  .pager__link--next {
    grid-column: 1;
  }

  .pager__link + .pager__link {
    border-top: 1px solid var(--color-line);
  }

  .site-footer__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__cols a {
    padding: 8px 0;
  }
}


@media (prefers-reduced-motion: reduce) {
  .skip-link,
  .segmented span,
  .segmented button,
  .button,
  .lesson,
  .headline__link,
  .course__link,
  .pager__link,
  .site-nav__link,
  .live,
  .lang-toggle,
  .theme-toggle {
    transition: none;
  }

  .live[data-busy] .live__icon {
    animation: none;
  }

}


/* Stagger delays as attributes: the CSP (style-src 'self') drops inline style="" */
[data-delay='10'] { --enter-delay: 10ms; --reveal-delay: 10ms; }
[data-delay='20'] { --enter-delay: 20ms; --reveal-delay: 20ms; }
[data-delay='30'] { --enter-delay: 30ms; --reveal-delay: 30ms; }
[data-delay='40'] { --enter-delay: 40ms; --reveal-delay: 40ms; }
[data-delay='50'] { --enter-delay: 50ms; --reveal-delay: 50ms; }
[data-delay='60'] { --enter-delay: 60ms; --reveal-delay: 60ms; }
[data-delay='70'] { --enter-delay: 70ms; --reveal-delay: 70ms; }
[data-delay='80'] { --enter-delay: 80ms; --reveal-delay: 80ms; }
[data-delay='90'] { --enter-delay: 90ms; --reveal-delay: 90ms; }
[data-delay='100'] { --enter-delay: 100ms; --reveal-delay: 100ms; }
[data-delay='110'] { --enter-delay: 110ms; --reveal-delay: 110ms; }
[data-delay='120'] { --enter-delay: 120ms; --reveal-delay: 120ms; }
[data-delay='130'] { --enter-delay: 130ms; --reveal-delay: 130ms; }
[data-delay='140'] { --enter-delay: 140ms; --reveal-delay: 140ms; }
[data-delay='150'] { --enter-delay: 150ms; --reveal-delay: 150ms; }
[data-delay='160'] { --enter-delay: 160ms; --reveal-delay: 160ms; }
[data-delay='170'] { --enter-delay: 170ms; --reveal-delay: 170ms; }
[data-delay='180'] { --enter-delay: 180ms; --reveal-delay: 180ms; }
[data-delay='190'] { --enter-delay: 190ms; --reveal-delay: 190ms; }
[data-delay='200'] { --enter-delay: 200ms; --reveal-delay: 200ms; }
[data-delay='210'] { --enter-delay: 210ms; --reveal-delay: 210ms; }
[data-delay='220'] { --enter-delay: 220ms; --reveal-delay: 220ms; }
[data-delay='230'] { --enter-delay: 230ms; --reveal-delay: 230ms; }
[data-delay='240'] { --enter-delay: 240ms; --reveal-delay: 240ms; }
[data-delay='250'] { --enter-delay: 250ms; --reveal-delay: 250ms; }
[data-delay='260'] { --enter-delay: 260ms; --reveal-delay: 260ms; }
[data-delay='270'] { --enter-delay: 270ms; --reveal-delay: 270ms; }
[data-delay='280'] { --enter-delay: 280ms; --reveal-delay: 280ms; }
[data-delay='290'] { --enter-delay: 290ms; --reveal-delay: 290ms; }
[data-delay='300'] { --enter-delay: 300ms; --reveal-delay: 300ms; }
[data-delay='310'] { --enter-delay: 310ms; --reveal-delay: 310ms; }
[data-delay='320'] { --enter-delay: 320ms; --reveal-delay: 320ms; }
[data-delay='330'] { --enter-delay: 330ms; --reveal-delay: 330ms; }
[data-delay='340'] { --enter-delay: 340ms; --reveal-delay: 340ms; }
[data-delay='350'] { --enter-delay: 350ms; --reveal-delay: 350ms; }
[data-delay='360'] { --enter-delay: 360ms; --reveal-delay: 360ms; }
[data-delay='370'] { --enter-delay: 370ms; --reveal-delay: 370ms; }
[data-delay='380'] { --enter-delay: 380ms; --reveal-delay: 380ms; }
[data-delay='390'] { --enter-delay: 390ms; --reveal-delay: 390ms; }
[data-delay='400'] { --enter-delay: 400ms; --reveal-delay: 400ms; }
[data-delay='410'] { --enter-delay: 410ms; --reveal-delay: 410ms; }
[data-delay='420'] { --enter-delay: 420ms; --reveal-delay: 420ms; }
[data-delay='430'] { --enter-delay: 430ms; --reveal-delay: 430ms; }
[data-delay='440'] { --enter-delay: 440ms; --reveal-delay: 440ms; }
[data-delay='450'] { --enter-delay: 450ms; --reveal-delay: 450ms; }
[data-delay='460'] { --enter-delay: 460ms; --reveal-delay: 460ms; }
[data-delay='470'] { --enter-delay: 470ms; --reveal-delay: 470ms; }
[data-delay='480'] { --enter-delay: 480ms; --reveal-delay: 480ms; }
[data-delay='490'] { --enter-delay: 490ms; --reveal-delay: 490ms; }
[data-delay='500'] { --enter-delay: 500ms; --reveal-delay: 500ms; }
[data-delay='510'] { --enter-delay: 510ms; --reveal-delay: 510ms; }
[data-delay='520'] { --enter-delay: 520ms; --reveal-delay: 520ms; }
[data-delay='530'] { --enter-delay: 530ms; --reveal-delay: 530ms; }
[data-delay='540'] { --enter-delay: 540ms; --reveal-delay: 540ms; }

/* Reveal shifts must not widen the page */
html,
body {
  overflow-x: clip;
}

/*
 * Mobile app shell, after the kztusdt kit: bottom tab bar with a sliding marker,
 * single-row header, compact rate rows, swipeable card rails and a sheet handle.
 */
.tabbar {
  display: none;
}

@media (max-width: 767px) {
  body {
    padding-bottom: calc(57px + env(safe-area-inset-bottom, 0px));
  }

  .site-header__inner {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: 'brand aside';
    height: 60px;
    padding-top: 0;
  }

  .site-nav {
    display: none;
  }

  .site-header__aside {
    gap: 8px;
  }

  .live,
  .lang-toggle,
  .theme-toggle {
    height: 36px;
  }

  .theme-toggle {
    width: 36px;
  }

  .live {
    padding: 0 10px 0 12px;
  }

  .live__prefix {
    display: none;
  }

  .lang-toggle {
    padding: 0 12px 0 10px;
  }

  .brand {
    min-width: 0;
  }

  .brand__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .feed__bar {
    top: 60px;
  }

  .tabbar {
    --tabbar-ease: cubic-bezier(0.32, 0.72, 0, 1);
    --tab-index: 0;
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: calc(57px + env(safe-area-inset-bottom, 0px));
    padding: 0 max(0px, env(safe-area-inset-right)) env(safe-area-inset-bottom, 0px) max(0px, env(safe-area-inset-left));
    border-top: 1px solid var(--color-line);
    background: var(--color-surface);
  }

  /* Active-tab marker: an accent rule on the bar's top edge, slid by app.js on navigation. */
  .tabbar__lens {
    position: absolute;
    top: -1px;
    left: max(0px, env(safe-area-inset-left));
    width: calc((100% - max(0px, env(safe-area-inset-left)) - max(0px, env(safe-area-inset-right))) / 5);
    height: 2px;
    background: var(--color-accent);
    transform: translateX(calc(var(--tab-index) * 100%));
    transition: transform 560ms var(--tabbar-ease), opacity var(--ui-t2) var(--ease);
    pointer-events: none;
  }

  .tabbar[data-tab-index='1'] { --tab-index: 1; }
  .tabbar[data-tab-index='2'] { --tab-index: 2; }
  .tabbar[data-tab-index='3'] { --tab-index: 3; }
  .tabbar[data-tab-index='4'] { --tab-index: 4; }

  .tabbar[data-idle] .tabbar__lens {
    opacity: 0;
  }

  .tabbar__item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    padding: 0 2px;
    color: var(--color-muted);
    font-size: 10.5px;
    font-weight: 650;
    letter-spacing: -0.01em;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: color var(--ui-t2) var(--ease), background-color var(--ui-t1) var(--ease);
  }

  .tabbar__item:active {
    background: var(--color-shell);
  }

  .tabbar__item[aria-current='page'] {
    color: var(--color-ink);
  }

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

  .tabbar__icon {
    flex: none;
  }

  .tabbar__label {
    max-width: 100%;
    overflow: hidden;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Rate rows: a hairline list item, buy and sell side by side */
  .row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 10px;
    min-height: 0;
    padding: 16px 0 16px 12px;
  }

  .row__name {
    grid-column: 1 / -1;
    gap: 12px;
  }

  .row__title {
    font-size: 16px;
  }

  .row__status:not([data-state='stale']) {
    display: none;
  }

  .row__terms {
    margin-top: 4px;
    font-size: 11px;
  }

  .row__cell {
    font-size: 16px;
  }

  .row__label {
    margin-bottom: 2px;
    font-size: 11px;
  }

  .row__usd {
    font-size: 11px;
    letter-spacing: -0.04em;
    white-space: nowrap;
  }

  .row__cell--link {
    grid-column: 1 / -1;
    gap: 8px;
  }

  .row__link,
  .row__calc {
    height: 42px;
    font-size: 14px;
  }

  /* Presets scroll instead of clipping */
  .board__presets {
    overflow-x: auto;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }

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

  /* Asset table: symbol + exchanger on one line, both rates below */
  .assets__table thead {
    display: none;
  }

  .assets__table tbody,
  .asset {
    display: grid;
  }

  .asset {
    grid-template-columns: auto 1fr 1fr;
    column-gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--color-line);
  }

  .asset--same {
    border-top-color: color-mix(in srgb, var(--color-line) 50%, transparent);
  }

  .asset > * {
    padding: 0;
    border: 0;
  }

  .assets__table tbody tr:last-child > * {
    border-bottom: 0;
  }

  .assets__table tbody tr:last-child {
    border-bottom: 1px solid var(--color-line);
  }

  .asset__symbol {
    width: auto;
    min-width: 3.2em;
  }

  .assets__table:not(.assets__table--single) .asset {
    grid-template-columns: 1fr 1fr;
  }

  .assets__table:not(.assets__table--single) .asset__source {
    text-align: right;
    font-size: 14px;
  }

  .assets__table:not(.assets__table--single) .asset > .asset__rate {
    margin-top: 8px;
    text-align: left;
  }

  .asset > .asset__rate {
    font-size: 15px;
  }

  .asset > .asset__rate::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--color-muted);
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
  }

  .assets__table:not(.assets__table--single) .asset--same .asset__symbol {
    color: inherit;
  }

  /* Calculator dialog reads as a bottom sheet */
  .calc__panel::before {
    content: '';
    justify-self: center;
    width: 36px;
    height: 4px;
    margin: -8px 0 -4px;
    border-radius: var(--ui-r-full);
    background: var(--ui-line-strong);
  }

  /* Pressed feedback on touch */
  .button:active {
    transform: scale(0.985);
  }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .tabbar__lens,
  .tabbar__item {
    transition: none;
  }
}

/* SEO / GEO: short answer, link grids, data tables */

.tldr {
  max-width: 760px;
  margin: 0 0 48px;
}

.tldr__core {
  display: grid;
  gap: 10px;
  padding-left: 20px;
  border-left: 2px solid var(--color-accent);
}

.tldr__label {
  justify-self: start;
  color: var(--color-muted);
  font-size: 0.8125rem;
  font-weight: 700;
}

.tldr__body {
  display: grid;
  gap: 6px;
  font-size: 1.0625rem;
  line-height: 1.6;
}

.tldr__body strong {
  font-weight: 750;
}

.tldr__stamp {
  color: var(--color-muted);
  font-size: 0.8125rem;
}

.tldr-wrap {
  padding-bottom: 8px;
}

.tldr-wrap .tldr {
  margin-bottom: 40px;
}

.seo-links {
  padding-bottom: 72px;
}

.seo-links__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  column-gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.seo-links__grid > li {
  border-top: 1px solid var(--color-line);
}

.seo-links__grid + .section-title {
  margin-top: 48px;
}

.seo-link {
  display: grid;
  gap: 4px;
  height: 100%;
  padding: 16px 0;
  text-decoration: none;
}

.seo-link__title {
  font-weight: 720;
  letter-spacing: -0.015em;
  line-height: 1.3;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.3s var(--ease);
}

.seo-link:hover .seo-link__title {
  text-decoration-color: var(--color-accent);
}

.seo-link__meta {
  color: var(--color-muted);
  font-size: 0.875rem;
}

.prose tr.is-best td.num {
  color: var(--color-good);
  font-weight: 700;
}

.prose td.num,
.prose th.num {
  white-space: nowrap;
}

.prose td small {
  display: block;
  color: var(--color-muted);
  font-size: 0.8125rem;
}

@media (prefers-reduced-motion: reduce) {
  .seo-link__title {
    transition: none;
  }
}

@media (max-width: 767px) {
  .tldr {
    margin-bottom: 36px;
  }

  .tldr__core {
    padding-left: 16px;
  }

  .seo-links__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
