/* =========================================================
   Vetra — demo mini app
   Tokens · Base · Shell · Tabbar · Shared UI
   ========================================================= */

/* Tokens */
:root {
  --canvas: #ECECEC;
  --surface: #F4F4F4;
  --sunken: #E2E2E2;
  --hairline: #D5D5D5;
  --ink: #0C0C0C;
  --secondary: #636363;
  --tertiary: #969696;
  --card-edge: #2E2E2E;
  --foil: #F4F4F4;
  --accent: #0C0C0C;
  --accent-dark: #000000;
  --accent-tint: #E2E2E2;
  --on-accent: #FFFFFF;
  --accent-hover: #1F1F1F;
  --page-desktop: #DDDDDD;
  --chrome: rgba(236, 236, 236, .84);
  --hover-surface: rgba(255, 255, 255, .5);
  --hover-soft: rgba(0, 0, 0, .05);
  --hover-faint: rgba(0, 0, 0, .025);
  --switch-track: #D6D6D6;
  --switch-border: #C8C8C8;
  --switch-thumb-on: #FFFFFF;
  --card-grad: linear-gradient(152deg, #2A2A2A 0%, #171717 44%, #0A0A0A 100%);
  --card-ink: 244, 244, 244;
  --chip-body: #C7C7C7;
  --chip-stroke: #E6E6E6;
  --chip-lines: #8A8A8A;
  --tag-ink: #F4F4F4;
  --app-edge: rgba(0, 0, 0, .08);
  --line-soft: rgba(0, 0, 0, .08);

  --font: "Onest", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --r-12: 12px;
  --r-16: 16px;
  --r-20: 20px;
  --r-28: 28px;

  --ease-out: cubic-bezier(.33, 1, .68, 1);
  --dur: 180ms;

  --pad-x: 20px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

/* Dark theme */
html[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #0B0B0B;
  --surface: #141414;
  --sunken: #1E1E1E;
  --hairline: #2B2B2B;
  --ink: #F2F2F2;
  --secondary: #9C9C9C;
  --tertiary: #6A6A6A;
  --card-edge: #D2D2D2;
  --foil: #0C0C0C;
  --accent: #F2F2F2;
  --accent-dark: #FFFFFF;
  --accent-tint: #242424;
  --on-accent: #0C0C0C;
  --accent-hover: #DADADA;
  --page-desktop: #000000;
  --chrome: rgba(11, 11, 11, .82);
  --hover-surface: rgba(255, 255, 255, .05);
  --hover-soft: rgba(255, 255, 255, .07);
  --hover-faint: rgba(255, 255, 255, .03);
  --switch-track: #2B2B2B;
  --switch-border: #3A3A3A;
  --switch-thumb-on: #0C0C0C;
  --card-grad: linear-gradient(152deg, #FFFFFF 0%, #EFEFEF 44%, #DCDCDC 100%);
  --card-ink: 12, 12, 12;
  --chip-body: #2E2E2E;
  --chip-stroke: #4A4A4A;
  --chip-lines: #757575;
  --tag-ink: #0C0C0C;
  --app-edge: rgba(255, 255, 255, .14);
  --line-soft: rgba(255, 255, 255, .1);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, p {
  margin: 0;
}

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

code {
  font-family: var(--mono);
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

::selection {
  background: var(--accent-tint);
  color: var(--ink);
}

/* App shell (lives inside .device__frame on the case page) */
.app {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--canvas);
  color: var(--ink);
  border-radius: inherit;
  overflow: hidden;
  isolation: isolate;
  pointer-events: none;
}

.grain {
  position: absolute;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: .055;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* Header */
.app-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  padding: calc(10px + var(--safe-t)) var(--pad-x) 8px;
}

.app-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.app-header__tools {
  display: flex;
  align-items: center;
  gap: 2px;
}

.wordmark {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--secondary);
  white-space: nowrap;
}

.pill--tint {
  background: var(--accent-tint);
  border-color: transparent;
  color: var(--accent-dark);
  letter-spacing: .04em;
  text-transform: none;
  font-size: 11px;
}

.pill--outline {
  background: transparent;
  color: var(--secondary);
  letter-spacing: .04em;
  text-transform: none;
  font-size: 11px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--sunken);
  color: var(--secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}

.avatar:hover {
  background: var(--surface);
  color: var(--ink);
}

/* Screens */
.screens {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}

.screen {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px var(--pad-x) calc(96px + var(--safe-b));
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  animation: screen-in 180ms var(--ease-out);
}

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

.screen[hidden] {
  display: none;
}

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

.screen__title {
  margin: 16px 0 10px;
  font-size: clamp(22px, 6.2cqw, 28px);
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.1;
}

.screen__sub {
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--secondary);
}

/* Tabbar */
.tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 6px 8px calc(6px + var(--safe-b));
  background: var(--chrome);
  border-top: 1px solid var(--hairline);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  backdrop-filter: blur(18px) saturate(1.15);
}

.tabbar__indicator {
  position: absolute;
  top: -1px;
  left: 0;
  width: 20%;
  height: 2px;
  display: block;
  transform: translateX(calc(var(--tab-index, 0) * 100%));
  transition: transform 260ms var(--ease-out);
}

.tabbar__indicator::before {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  border-radius: 2px;
  background: var(--accent);
}

.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 48px;
  padding: 6px 2px 4px;
  border: 0;
  border-radius: var(--r-12);
  background: none;
  color: var(--secondary);
  cursor: pointer;
  transition: color var(--dur) var(--ease-out);
}

.tab .icon {
  width: 22px;
  height: 22px;
}

.tab__label {
  font-size: 11px;
  line-height: 1;
  letter-spacing: .01em;
  font-weight: 500;
}

.tab:hover {
  color: var(--secondary);
}

.tab.is-active {
  color: var(--ink);
}

/* Shared UI */
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--r-12);
  background: none;
  color: var(--secondary);
  cursor: pointer;
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}

.icon-btn:hover {
  background: var(--hover-soft);
  color: var(--ink);
}

.icon-btn .icon {
  width: 20px;
  height: 20px;
}

.link-btn {
  min-height: 44px;
  padding: 0 0 0 14px;
  border: 0;
  background: none;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--r-12);
}

.link-btn:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--r-16);
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  transition: transform 90ms var(--ease-out), background var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}

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

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

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--block {
  width: 100%;
}

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.chip {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface);
  color: var(--secondary);
  font-size: 13px;
  cursor: pointer;
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out);
}

.chip:hover {
  color: var(--ink);
  border-color: var(--tertiary);
}

.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--canvas);
}

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

/* Switch */
.switch {
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 999px;
  cursor: pointer;
}

.switch::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 50%;
  height: 30px;
  transform: translateY(-50%);
  border-radius: 999px;
  border: 1px solid var(--switch-border);
  background: var(--switch-track);
  transition: background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}

.switch__thumb {
  position: absolute;
  top: 50%;
  left: 7px;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .22);
  transition: transform var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}

.switch[aria-checked="true"]::before {
  background: var(--accent);
  border-color: var(--accent);
}

.switch[aria-checked="true"] .switch__thumb {
  transform: translateX(17px);
  background: var(--switch-thumb-on);
}

/* Rows */
.row-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 10px 10px 10px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-16);
  background: var(--surface);
}

.row-block__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.row-block__title {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -.005em;
}

.row-block__note {
  font-size: 12px;
  color: var(--secondary);
}

/* Home — balance */
.balance {
  padding: 22px 0 18px;
}

.balance__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.balance__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--secondary);
}

.balance__value {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
  margin: 4px 0 6px;
  min-height: 52px;
  font-size: clamp(34px, 12.4cqw, 50px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}

.balance__int,
.balance__dec {
  transition: opacity var(--dur) var(--ease-out);
}

.balance__dec {
  margin-left: 1px;
  font-size: .62em;
  color: var(--secondary);
  letter-spacing: -.02em;
}

.balance__unit {
  margin-left: 10px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--secondary);
}

.balance__fiat {
  min-height: 19px;
  font-size: 13px;
  color: var(--secondary);
  transition: opacity var(--dur) var(--ease-out);
}

.balance__rate {
  color: var(--secondary);
}

/* Home — mini card */
.mini-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--card-edge);
  border-radius: var(--r-20);
  background: var(--card-grad);
  color: var(--foil);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    0 18px 36px -22px rgba(0, 0, 0, .6),
    0 2px 6px rgba(0, 0, 0, .14),
    inset 0 1px 0 rgba(255, 255, 255, .12);
  transition: transform 90ms var(--ease-out), box-shadow var(--dur) var(--ease-out);
}

.mini-card:active {
  transform: scale(.985);
}

.mini-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mini-card__brand {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .3em;
}

.mini-card__num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: rgba(var(--card-ink), .82);
  font-variant-numeric: tabular-nums;
}

.mini-card__row--bottom {
  align-items: baseline;
}

.mini-card__holder {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(var(--card-ink), .58);
}

.mini-card__state {
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(var(--card-ink), .58);
}

.mini-card__frost {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, .18) 0%, transparent 38%),
    linear-gradient(300deg, rgba(255, 255, 255, .13) 0%, transparent 46%);
  transition: opacity 240ms var(--ease-out);
}

/* Home — actions / strip */
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-16);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 90ms var(--ease-out), background var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out);
}

.action:active {
  transform: scale(.985);
}

.action:hover {
  border-color: var(--tertiary);
}

.action__icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: var(--secondary);
}

.action__icon .icon {
  width: 20px;
  height: 20px;
}

.action--primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--on-accent);
}

.action--primary .action__icon {
  color: var(--on-accent);
}

.action--primary:hover {
  background: var(--accent-hover);
  border-color: transparent;
}

.action--primary .action__icon {
  color: #FFFFFF;
  opacity: .9;
}

.action__label {
  white-space: nowrap;
}

.strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 13px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-16);
  background: var(--surface);
}

.strip__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--accent-tint);
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 600;
}

.strip__main {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.strip__title {
  font-size: 14px;
  font-weight: 500;
}

.strip__note {
  font-size: 12px;
  color: var(--secondary);
}

/* Home — operations */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 4px;
}

.section-head__title {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--secondary);
}

.tx-list {
  display: flex;
  flex-direction: column;
}

.tx {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 10px 8px;
  margin: 0 -8px;
  border: 0;
  border-radius: var(--r-12);
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background var(--dur) var(--ease-out);
}

.tx:hover {
  background: var(--hover-surface);
}

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

.tx[hidden] {
  display: none;
}

.tx__tile {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--sunken);
  color: var(--secondary);
  font-size: 13px;
  font-weight: 500;
}

.tx__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.tx__title {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx__meta {
  font-size: 11.5px;
  color: var(--secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx__meta .mono {
  font-size: 11px;
  color: var(--secondary);
}

.tx__amount {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

.tx__amount--in {
  color: var(--ink);
}

/* Card screen */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  aspect-ratio: 1.6 / 1;
  margin-top: 12px;
  padding: 18px;
  border: 1px solid var(--card-edge);
  border-radius: var(--r-20);
  background: var(--card-grad);
  color: var(--foil);
  text-align: left;
  overflow: hidden;
  cursor: pointer;
  box-shadow:
    0 26px 50px -26px rgba(0, 0, 0, .7),
    0 2px 8px rgba(0, 0, 0, .16),
    inset 0 0 0 .5px rgba(var(--card-ink), .16),
    inset 0 1px 0 rgba(var(--card-ink), .12);
  transition: transform 90ms var(--ease-out);
}

.card:active {
  transform: scale(.985);
}

.card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card__brand {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .34em;
}

.card__marks {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card__chip {
  width: 36px;
  height: 27px;
  flex: 0 0 auto;
}

.card__chip .chip__body {
  fill: var(--chip-body);
  stroke: var(--chip-stroke);
}

.card__chip .chip__lines {
  stroke: var(--chip-lines);
}

.card__contactless {
  width: 20px;
  height: 20px;
  stroke-width: 1.4;
  color: rgba(var(--card-ink), .6);
}

.card__number {
  display: block;
  font-family: var(--mono);
  font-size: clamp(12px, 4.4cqw, 17px);
  font-weight: 400;
  letter-spacing: .1em;
  color: rgba(var(--card-ink), .92);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: opacity 160ms var(--ease-out);
}

.card__bottom {
  display: flex;
  align-items: flex-end;
  gap: 22px;
}

.card__holder,
.card__expiry,
.card__cvv {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(var(--card-ink), .85);
  font-variant-numeric: tabular-nums;
}

.card__cvv {
  margin-left: auto;
  text-align: right;
}

.card__caption {
  font-size: 8.5px;
  letter-spacing: .12em;
  color: rgba(var(--card-ink), .5);
}

.card__hint {
  font-size: 9.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(var(--card-ink), .5);
}

.card__frost {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, .18) 0%, transparent 36%),
    linear-gradient(298deg, rgba(255, 255, 255, .14) 0%, transparent 44%),
    radial-gradient(120% 90% at 20% 0%, rgba(255, 255, 255, .12), transparent 60%);
  transition: opacity 260ms var(--ease-out);
}

.card__sheen {
  position: absolute;
  inset: -30% -40%;
  pointer-events: none;
  background: linear-gradient(104deg, transparent 42%, rgba(255, 255, 255, .08) 50%, transparent 58%);
  transform: translateX(-55%);
  transition: transform 900ms var(--ease-out);
}

.card-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}

.card-footnote {
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--secondary);
}

.card-foot__link {
  flex: 0 0 auto;
  margin-top: -9px;
  margin-right: -4px;
  padding-left: 8px;
  font-size: 12px;
}

/* Card — limit */
.limit {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-16);
  background: var(--surface);
}

.limit__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--secondary);
}

.limit__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.limit__value strong {
  color: var(--ink);
  font-weight: 500;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.limit__track {
  height: 6px;
  margin-top: 12px;
  border-radius: 999px;
  background: var(--sunken);
  overflow: hidden;
}

.limit__fill {
  display: block;
  width: 35%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.limit__note {
  margin-top: 10px;
  font-size: 11px;
  color: var(--secondary);
}

/* History — filters */
.screen--history {
  padding-top: 0;
}

.filters {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 8px;
  margin: 0 -4px 6px;
  padding: 8px 4px 12px;
  overflow-x: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  background: var(--canvas);
}

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

.group__title {
  margin: 16px 0 2px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--secondary);
}

.history-end {
  margin: 26px 0 8px;
  font-size: 11.5px;
  text-align: center;
  color: var(--secondary);
}

.group[hidden] {
  display: none;
}

/* Earn */
.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 18px;
  padding: 4px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-16);
  background: var(--sunken);
}

.segmented__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 54px;
  padding: 6px 4px;
  border: 0;
  border-radius: var(--r-12);
  background: transparent;
  color: var(--secondary);
  font-size: 11.5px;
  cursor: pointer;
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
}

.segmented__btn.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1), inset 0 0 0 .5px rgba(0, 0, 0, .06);
}

.segmented__rate {
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.stake {
  margin-top: 14px;
  padding: 20px 20px 18px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-20);
  background: var(--surface);
}

.stake__value {
  font-size: clamp(24px, 8.3cqw, 34px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.stake__income {
  margin: 6px 0 16px;
  font-size: 13px;
  color: var(--secondary);
  font-variant-numeric: tabular-nums;
}

.range {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  --fill: 18.4%;
}

.range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--accent) 0 var(--fill), var(--sunken) var(--fill) 100%);
}

.range::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--accent) 0 var(--fill), var(--sunken) var(--fill) 100%);
}

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -10px;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
  transition: transform 90ms var(--ease-out);
}

.range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}

.range:active::-webkit-slider-thumb {
  transform: scale(1.06);
}

.range:focus-visible {
  outline: none;
}

.range:focus-visible::-webkit-slider-thumb {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.range:focus-visible::-moz-range-thumb {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.range__scale {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
  font-size: 11px;
  color: var(--secondary);
}

.stake .btn {
  margin-top: 20px;
}

.stake-card {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-20);
  background: var(--surface);
}

.stake-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stake-card__title {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--secondary);
}

.stake-card__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}

.stake-card__info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.stake-card__amount {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.stake-card__meta {
  font-size: 12px;
  color: var(--secondary);
}

.stake-card__income {
  margin-top: 6px;
  font-size: 12px;
  color: var(--secondary);
}

.stake-card__income strong {
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.stake-card__date {
  font-size: 11px;
  color: var(--secondary);
}

.ring {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 86px;
  height: 86px;
}

.ring__svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring__track {
  fill: none;
  stroke: var(--sunken);
  stroke-width: 6;
}

.ring__value {
  fill: none;
  stroke: var(--accent);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 163.9 263.9;
}

.ring__label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.earn-note {
  margin: 16px 0 8px;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--secondary);
}

/* Profile */
.identity {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 0 6px;
}

.identity__avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: var(--sunken);
  color: var(--secondary);
  font-size: 17px;
  font-weight: 500;
}

.identity__info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.identity__name {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -.015em;
}

.identity__phone {
  font-size: 13px;
  color: var(--secondary);
  font-variant-numeric: tabular-nums;
}

.chips--identity {
  margin-top: 7px;
  gap: 6px;
}

.settings {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.settings .row-block {
  margin-top: 0;
}

.menu {
  margin-top: 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-16);
  background: var(--surface);
  overflow: hidden;
}

.menu__row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 8px 14px;
  border: 0;
  background: none;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background var(--dur) var(--ease-out);
}

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

.menu__row:hover {
  background: var(--hover-faint);
}

.menu__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--sunken);
  color: var(--secondary);
}

.menu__icon .icon {
  width: 18px;
  height: 18px;
}

.menu__label {
  flex: 1 1 auto;
  font-size: 14px;
  font-weight: 500;
}

.menu__meta {
  font-size: 12px;
  color: var(--secondary);
  font-variant-numeric: tabular-nums;
}

.menu__chevron {
  width: 16px;
  height: 16px;
  color: var(--tertiary);
}

.app-footer {
  margin: 28px 0 4px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  text-align: center;
}

.app-footer__brand {
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--secondary);
}

.app-footer__note {
  margin-top: 4px;
  font-size: 11px;
  color: var(--secondary);
}

/* Short viewports */
@media (max-height: 640px) {
  .balance {
    padding-top: 10px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

  .card__sheen {
    display: none;
  }

  .card:active,
  .mini-card:active,
  .btn:active,
  .action:active {
    transform: none;
  }
}

/* =========================================================
   Vetra — case page
   Tokens · Page shell · Poster · Stage · Device
   ========================================================= */

:root {
  --page: #0C0C0B;
  --page-2: #141412;
  --bone: #EFEAE0;
  --dim: #918C82;
  --rule: rgba(239, 234, 224, .13);
  --rule-soft: rgba(239, 234, 224, .07);
  --hot: #FF5C35;
  --page-ease: cubic-bezier(.22, 1, .36, 1);
  --gutter: clamp(20px, 4.6vw, 68px);
  --page-max: 1520px;
}

.case-page {
  background: var(--page);
  color: var(--bone);
  font-size: 16px;
  line-height: 1.55;
}

.case-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: .035;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.case-page a {
  color: inherit;
  text-decoration: none;
}

.case-page :focus-visible {
  outline: 2px solid var(--hot);
  outline-offset: 4px;
  border-radius: 3px;
}

/* Site header */
.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 17px var(--gutter);
  border-bottom: 1px solid var(--rule);
  background: var(--page);
}

.site-head__brand {
  justify-self: start;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
}

.site-head__dot {
  color: var(--hot);
}

.site-head__meta {
  justify-self: center;
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
}

.site-head__meta span {
  margin: 0 8px;
  color: rgba(239, 234, 224, .28);
}

.site-head__link {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--bone);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color .25s ease, text-decoration-color .25s ease;
}

.site-head__link::after {
  content: "↗";
  font-size: 12px;
  color: var(--hot);
  transition: transform .25s var(--page-ease);
}

.site-head__link:hover::after {
  transform: translate(2px, -2px);
}

.site-head__link:hover {
  color: var(--hot);
  text-decoration-color: var(--hot);
}

/* Poster */
.poster {
  position: relative;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 120px) var(--gutter) clamp(36px, 5vw, 64px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 clamp(18px, 2.2vw, 28px);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
}

.eyebrow__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--hot);
  box-shadow: 0 0 0 4px rgba(255, 92, 53, .14);
}

.poster__title {
  margin: 0;
  font-size: clamp(42px, 9.4vw, 146px);
  font-weight: 500;
  line-height: .9;
  letter-spacing: -.052em;
}

.poster__title em {
  font-style: normal;
  color: var(--hot);
}

.poster__line {
  display: block;
  overflow: hidden;
  padding-bottom: .05em;
}

.poster__line > span {
  display: block;
  transform: translateY(112%);
  animation: line-rise 1100ms var(--page-ease) forwards;
}

.poster__line:nth-child(2) > span {
  animation-delay: 90ms;
}

.poster__line:nth-child(3) > span {
  animation-delay: 180ms;
}

.poster__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 330px);
  gap: clamp(24px, 4vw, 72px);
  align-items: end;
  margin-top: clamp(28px, 4vw, 56px);
  opacity: 0;
  animation: soft-in 900ms var(--page-ease) 420ms forwards;
}

.poster__lead {
  max-width: 52ch;
  margin: 0;
  font-size: clamp(16px, 1.3vw, 20px);
  line-height: 1.55;
  color: #C6C0B5;
}

.facts {
  margin: 0;
  border-top: 1px solid var(--rule);
}

.facts__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
}

.facts__row dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
  padding-top: 2px;
}

.facts__row dd {
  margin: 0;
  text-align: right;
}

.poster__cue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(30px, 4vw, 54px);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
  transition: color .25s ease;
}

.poster__cue .icon {
  width: 15px;
  height: 15px;
  transition: transform .35s var(--page-ease);
}

.poster__cue:hover {
  color: var(--bone);
}

.poster__cue:hover .icon {
  transform: translateY(4px);
}

/* Section primitives */
.section-title {
  margin: 0;
  font-size: clamp(31px, 4.4vw, 62px);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.038em;
}

.section-lead {
  max-width: 44ch;
  margin: clamp(14px, 1.8vw, 22px) 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--dim);
}

/* Stage */
.stage {
  scroll-margin-top: 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(300px, 31vw, 410px);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(52px, 7vw, 110px) var(--gutter);
  border-top: 1px solid var(--rule);
  overflow: clip;
}

.steps {
  list-style: none;
  margin: clamp(26px, 3.2vw, 42px) 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.steps__item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--rule);
  opacity: .38;
  transition: opacity .55s var(--page-ease);
}

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

.steps__index {
  padding-top: 3px;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--hot);
}

.steps__body {
  display: block;
  min-width: 0;
}

.steps__title {
  display: block;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -.012em;
}

.steps__note {
  display: block;
  max-width: 42ch;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--dim);
}

/* Device */
.stage__device {
  position: relative;
  justify-self: end;
  width: 100%;
}

.stage__device::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 16%;
  z-index: -1;
  width: 150%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 234, 224, .07), transparent 62%);
  pointer-events: none;
}

.device__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.meter {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  flex: 1 1 auto;
}

.meter__seg {
  height: 2px;
  border-radius: 2px;
  background: rgba(239, 234, 224, .13);
  overflow: hidden;
}

.meter__seg i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--hot);
}

.device__caption {
  margin: 0;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}

.device__caption span {
  color: var(--bone);
}

.device {
  position: relative;
  width: 100%;
  aspect-ratio: 410 / 864;
  transform-style: preserve-3d;
  will-change: transform;
}

.device__frame {
  position: relative;
  height: 100%;
  padding: 9px;
  border: 1px solid rgba(239, 234, 224, .15);
  border-radius: 52px;
  background: linear-gradient(158deg, #2C2C2A 0%, #101010 42%, #1B1B19 100%);
  box-shadow:
    0 70px 120px -50px rgba(0, 0, 0, .95),
    0 26px 50px -30px rgba(0, 0, 0, .8),
    inset 0 1px 0 rgba(255, 255, 255, .08);
  container-type: inline-size;
}

.device__frame .app {
  inset: 9px;
  width: auto;
  border-radius: 43px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .55);
}

.device__glare {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 52px;
  pointer-events: none;
  background: linear-gradient(116deg, rgba(255, 255, 255, .05) 0%, rgba(255, 255, 255, 0) 34%, rgba(255, 255, 255, 0) 66%, rgba(255, 255, 255, .03) 100%);
}

.device__hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 0;
  font-size: 11px;
  letter-spacing: .02em;
  color: rgba(239, 234, 224, .52);
}

.device__hint span {
  font-size: 6px;
  color: var(--hot);
}

/* In-device fixes for the static mockup */
.device .switch--on::before {
  background: var(--accent);
  border-color: var(--accent);
}

.device .switch--on .switch__thumb {
  transform: translateX(17px);
  background: var(--switch-thumb-on);
}

html.has-js .device .screen > * {
  opacity: 0;
  transform: translateY(9px);
}

html.has-js .device .screen.is-enter > * {
  animation: item-rise 520ms var(--page-ease) forwards;
}

html.has-js .device .screen.is-enter > *:nth-child(2) { animation-delay: 40ms; }
html.has-js .device .screen.is-enter > *:nth-child(3) { animation-delay: 80ms; }
html.has-js .device .screen.is-enter > *:nth-child(4) { animation-delay: 120ms; }
html.has-js .device .screen.is-enter > *:nth-child(5) { animation-delay: 160ms; }
html.has-js .device .screen.is-enter > *:nth-child(6) { animation-delay: 200ms; }
html.has-js .device .screen.is-enter > *:nth-child(7) { animation-delay: 240ms; }
html.has-js .device .screen.is-enter > *:nth-child(8) { animation-delay: 280ms; }

/* Scroll reveal */
html.has-js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .9s var(--page-ease), transform .9s var(--page-ease);
}

html.has-js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Features */
.features {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(52px, 8vw, 116px) var(--gutter);
  border-top: 1px solid var(--rule);
}

.features__head {
  max-width: 820px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: clamp(34px, 5vw, 68px) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.feature {
  padding: 24px clamp(18px, 2vw, 30px) 6px;
  border-left: 1px solid var(--rule);
}

.feature:first-child {
  padding-left: 0;
  border-left: 0;
}

.feature__index {
  display: block;
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--hot);
}

.feature__title {
  margin: 16px 0 0;
  font-size: clamp(18px, 1.5vw, 22px);
  font-weight: 500;
  letter-spacing: -.02em;
}

.feature__text {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.62;
  color: var(--dim);
}

/* System */
.system {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: clamp(30px, 5vw, 80px);
  align-items: start;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(52px, 8vw, 116px) var(--gutter);
  border-top: 1px solid var(--rule);
}

.system__head {
  position: sticky;
  top: 104px;
}

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

.spec {
  padding: 22px;
  border: 1px solid var(--rule);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(239, 234, 224, .045), rgba(239, 234, 224, .012));
}

.spec__label {
  margin: 0 0 20px;
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
}

.spec__specimen {
  margin: 0;
  font-size: clamp(60px, 6.6vw, 92px);
  line-height: .78;
  letter-spacing: -.055em;
}

.spec__rows {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.spec__rows li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--rule);
  font-size: 13px;
}

.spec__value {
  font-size: 10px;
  letter-spacing: .04em;
  color: var(--dim);
}

.swatches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.swatch {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
}

.swatch__chip {
  grid-row: 1 / span 2;
  width: 26px;
  height: 42px;
  border: 1px solid rgba(239, 234, 224, .16);
  border-radius: 7px;
  background: var(--sw);
}

.swatch--canvas { --sw: #ECECEC; }
.swatch--surface { --sw: #F4F4F4; }
.swatch--ink { --sw: #0C0C0C; }
.swatch--line { --sw: #D5D5D5; }

.swatch__name {
  font-size: 13px;
  line-height: 1.2;
}

.swatch__hex {
  font-size: 10px;
  color: var(--dim);
}

.parts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.parts .btn {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 13px;
}

.parts .chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-color: var(--rule);
  background: transparent;
  color: var(--dim);
  font-size: 12px;
}

.parts .chip.is-active {
  border-color: var(--bone);
  background: var(--bone);
  color: var(--page);
}

.parts .btn--primary {
  background: var(--bone);
  color: var(--page);
}

.parts .switch {
  transform: scale(.78);
  transform-origin: left center;
}

.parts .switch::before {
  background: rgba(239, 234, 224, .16);
  border-color: rgba(239, 234, 224, .26);
}

.parts .switch--on::before {
  background: var(--bone);
  border-color: var(--bone);
}

.parts .switch--on .switch__thumb {
  transform: translateX(17px);
  background: var(--page);
}

.parts .pill {
  border-color: var(--rule);
  color: var(--dim);
}

.grid-spec {
  margin: 0;
}

.grid-spec__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--rule);
  font-size: 13px;
}

.grid-spec__row:first-child {
  padding-top: 0;
  border-top: 0;
}

.grid-spec dt {
  color: var(--dim);
}

.grid-spec dd {
  margin: 0;
  font-size: 11px;
}

/* Numbers */
.numbers {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(44px, 6vw, 88px) var(--gutter);
  border-top: 1px solid var(--rule);
}

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

.number {
  padding: 0 clamp(16px, 2vw, 30px);
  border-left: 1px solid var(--rule);
}

.number:first-child {
  padding-left: 0;
  border-left: 0;
}

.number__label {
  margin: 0 0 16px;
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
}

.number__value {
  margin: 0;
  font-size: clamp(44px, 6.2vw, 100px);
  line-height: .82;
  letter-spacing: -.04em;
  color: var(--bone);
}

/* Footer */
.site-foot {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(26px, 4vw, 48px) var(--gutter) clamp(34px, 4vw, 56px);
  border-top: 1px solid var(--rule);
}

.site-foot__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 28px;
}

.site-foot__brand {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
}

.site-foot__brand span {
  color: var(--hot);
}

.site-foot__meta {
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
}

.site-foot__link {
  margin-left: auto;
  font-size: 13px;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color .25s ease, text-decoration-color .25s ease;
}

.site-foot__link:hover {
  color: var(--hot);
  text-decoration-color: var(--hot);
}

.site-foot__note {
  margin: 20px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(239, 234, 224, .32);
}

/* Motion */
@keyframes line-rise {
  from { transform: translateY(112%); }
  to { transform: translateY(0); }
}

@keyframes soft-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes item-rise {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: none; }
}

@keyframes seg-fill {
  from { width: 0; }
  to { width: 100%; }
}

/* Responsive */
@media (max-width: 1180px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 26px;
  }

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

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

  .system__head {
    position: static;
  }
}

@media (max-width: 980px) {
  .poster__row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .facts {
    max-width: 420px;
  }

  .stage {
    grid-template-columns: 1fr;
    gap: 44px;
    justify-items: center;
  }

  .stage__copy {
    justify-self: start;
    max-width: none;
    width: 100%;
  }

  .stage__device {
    justify-self: center;
    width: min(410px, 100%);
  }

  .site-head {
    grid-template-columns: 1fr auto;
  }

  .site-head__meta {
    display: none;
  }
}

@media (max-width: 720px) {
  .site-head__link {
    font-size: 12px;
  }

  .poster__title {
    letter-spacing: -.045em;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    row-gap: 0;
  }

  .feature {
    padding: 20px 0 22px;
    border-left: 0;
    border-top: 1px solid var(--rule);
  }

  .feature:first-child {
    border-top: 0;
  }

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

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

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

  .number__value {
    font-size: clamp(44px, 12vw, 68px);
  }

  .site-foot__link {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .poster__line > span {
    animation: none;
    transform: none;
  }

  .poster__row {
    opacity: 1;
    animation: none;
  }

  html.has-js .reveal,
  html.has-js .device .screen > * {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }

  .device {
    transform: none !important;
  }
}

/* Reveal stagger inside grids */
.feature-grid .reveal:nth-child(2) { transition-delay: 90ms; }
.feature-grid .reveal:nth-child(3) { transition-delay: 180ms; }
.feature-grid .reveal:nth-child(4) { transition-delay: 270ms; }
.number.reveal:nth-child(2) { transition-delay: 90ms; }
.number.reveal:nth-child(3) { transition-delay: 180ms; }
.number.reveal:nth-child(4) { transition-delay: 270ms; }
