/* Fumbled: one theme (ink navy), one accent (coral). */
:root {
  --fb-ground: #0d1524;
  --fb-raised: #131d30;
  --fb-rule: #22304a;
  --fb-bone: #efeae1;
  --fb-muted: #8c96a6;
  --fb-coral: #ee5a4f;
  --fb-coral-deep: #c9443a;
  --fb-display: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --fb-mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fb-ground); }
.fb-root {
  min-height: 100dvh;
  background: var(--fb-ground);
  color: var(--fb-bone);
  font-family: var(--fb-display);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: var(--fb-coral); color: var(--fb-ground); }
[hidden] { display: none !important; }
.fb-wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }

/* nav */
.fb-nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; padding-inline: max(20px, calc((100% - 1180px) / 2));
  background: color-mix(in srgb, var(--fb-ground) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--fb-rule);
}
.fb-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--fb-bone); text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.fb-logo__mark { transition: transform 600ms cubic-bezier(.2,.8,.2,1); }
.fb-logo:hover .fb-logo__mark { transform: rotate(-200deg); }
.fb-navlink { position: relative; color: var(--fb-bone); text-decoration: none; font-weight: 500; font-size: 15px; padding: 6px 0; }
.fb-navlink::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--fb-coral); transform: scaleX(0); transform-origin: left; transition: transform 300ms ease; }
.fb-navlink:hover::after, .fb-navlink:focus-visible::after { transform: scaleX(1); }

/* hero */
.fb-hero {
  width: min(1180px, 100% - 40px); margin-inline: auto;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
  padding: 88px 0 104px;
  min-height: calc(100dvh - 72px);
}
.fb-h1 {
  margin: 0; font-weight: 800; font-size: clamp(44px, 6.4vw, 84px); line-height: 0.96; letter-spacing: -0.045em;
  animation: fb-rise 700ms cubic-bezier(.2,.8,.2,1) both;
}
.fb-strike { position: relative; color: var(--fb-coral); white-space: nowrap; }
.fb-strike::after {
  content: ""; position: absolute; left: -2%; right: -2%; top: 54%; height: 0.09em; background: var(--fb-bone);
  transform: rotate(-3deg); transform-origin: left;
  animation: fb-strike 600ms 500ms cubic-bezier(.2,.8,.2,1) both;
}
.fb-hero__sub { margin: 28px 0 36px; max-width: 46ch; font-size: 19px; line-height: 1.55; color: var(--fb-muted); animation: fb-rise 700ms 120ms cubic-bezier(.2,.8,.2,1) both; }
.fb-hero-cta {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 18px 26px 18px 20px; border-radius: 4px;
  background: var(--fb-coral); color: var(--fb-ground);
  font-weight: 700; font-size: 17px; text-decoration: none;
  box-shadow: 0 6px 0 var(--fb-coral-deep);
  transition: transform 160ms ease, box-shadow 160ms ease;
  animation: fb-rise 700ms 220ms cubic-bezier(.2,.8,.2,1) both;
}
.fb-hero-cta__coin { display: inline-flex; transition: transform 380ms cubic-bezier(.3,1.6,.5,1); }
.fb-hero-cta:hover .fb-hero-cta__coin { transform: translateY(5px) rotate(-90deg); }
.fb-hero-cta:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--fb-coral-deep); }
.fb-hero-cta:focus-visible { outline: 2px solid var(--fb-bone); outline-offset: 4px; }

/* example card */
.fb-example { margin: 0; perspective: 1200px; }
.fb-card {
  --rx: 0deg; --ry: 0deg;
  position: relative; overflow: hidden; aspect-ratio: 1200 / 630;
  padding: 6% 6.5%; border-radius: 6px;
  background:
    repeating-linear-gradient(to bottom, transparent 0 calc(19% - 1px), var(--fb-rule) calc(19% - 1px) 19%),
    var(--fb-raised);
  border: 1px solid var(--fb-rule);
  box-shadow: 0 40px 80px -30px rgb(0 0 0 / 0.7);
  transform: rotateX(var(--rx)) rotateY(var(--ry)) rotate(-2deg);
  transition: transform 300ms cubic-bezier(.2,.8,.2,1);
  container-type: inline-size;
}
.fb-card__coin {
  position: absolute; right: -9%; top: 50%; width: 46%; aspect-ratio: 1; translate: 0 -50%;
  border-radius: 50%; background: var(--fb-coral);
  -webkit-mask: radial-gradient(circle at 92% 6%, transparent 26%, #000 26.5%);
  mask: radial-gradient(circle at 92% 6%, transparent 26%, #000 26.5%);
}
.fb-card__coin::after { content: ""; position: absolute; inset: 17%; border-radius: 50%; border: 3cqi solid var(--fb-bone); }
.fb-card p { position: relative; margin: 0; }
.fb-card__brand { font-weight: 700; font-size: 3.2cqi; }
.fb-card__head { margin-top: 6cqi !important; font-family: var(--fb-mono); font-size: 2.6cqi; color: var(--fb-muted); }
.fb-card__amount { font-weight: 800; font-size: 11cqi; line-height: 1; letter-spacing: -0.04em; color: var(--fb-coral); margin-top: 1.2cqi !important; }
.fb-card__line { font-family: var(--fb-mono); font-size: 2.7cqi; margin-top: 1.6cqi !important; }
.fb-card__verdict { font-weight: 700; font-size: 3.4cqi; margin-top: 4cqi !important; }
.fb-example__caption { margin-top: 22px; font-family: var(--fb-mono); font-size: 13px; color: var(--fb-muted); }

/* calculator */
.fb-check { padding: 112px 0; border-top: 1px solid var(--fb-rule); background: linear-gradient(var(--fb-raised), var(--fb-ground) 520px); scroll-margin-top: 72px; }
.fb-h2 { margin: 0; font-weight: 800; font-size: clamp(36px, 4.6vw, 60px); line-height: 1; letter-spacing: -0.04em; }
.fb-lede { margin: 18px 0 40px; color: var(--fb-muted); font-size: 18px; line-height: 1.55; max-width: 60ch; }
.fb-form { max-width: 820px; }
.fb-form__label { display: block; margin-bottom: 10px; font-family: var(--fb-mono); font-size: 13px; color: var(--fb-muted); }
.fb-form__bar { display: flex; border: 1.5px solid var(--fb-rule); border-radius: 4px; background: var(--fb-ground); transition: border-color 200ms ease; }
.fb-form__bar:focus-within { border-color: var(--fb-bone); }
.fb-form__bar--error { border-color: var(--fb-coral); }
.fb-form__input { flex: 1; min-width: 0; padding: 20px 18px; border: 0; background: transparent; color: var(--fb-bone); font-family: var(--fb-mono); font-size: 16px; outline: none; }
.fb-form__input::placeholder { color: #6b7587; }
.fb-run {
  flex: none; margin: 6px; padding: 0 28px; border: 0; border-radius: 2px;
  background: var(--fb-bone); color: var(--fb-ground); font-family: var(--fb-display); font-weight: 700; font-size: 16px; cursor: pointer;
  box-shadow: 0 4px 0 #b9b3a8; transition: transform 120ms ease, box-shadow 120ms ease;
}
.fb-run:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #b9b3a8; }
.fb-run:disabled { cursor: progress; opacity: 0.75; }
.fb-run:focus-visible { outline: 2px solid var(--fb-coral); outline-offset: 2px; }
.fb-form__error { margin: 10px 0 0; color: var(--fb-coral); font-size: 14px; }
.fb-out { margin-top: 48px; }
.fb-empty { padding: 40px 32px; border: 1px dashed var(--fb-rule); border-radius: 4px; color: var(--fb-muted); line-height: 1.55; }
.fb-empty p { margin: 0; }
.fb-empty__title { color: var(--fb-bone); font-weight: 700; font-size: 22px; margin-bottom: 6px !important; }
.fb-error { margin: 0; padding: 18px 20px; border-left: 3px solid var(--fb-coral); background: color-mix(in srgb, var(--fb-coral) 10%, transparent); }

.fb-results { display: grid; gap: 40px; }
.fb-stats { display: grid; grid-template-columns: 1.3fr 1fr 1fr; margin: 0; border-top: 1px solid var(--fb-rule); border-bottom: 1px solid var(--fb-rule); }
.fb-stat { padding: 26px 24px 26px 0; }
.fb-stat + .fb-stat { padding-left: 24px; border-left: 1px solid var(--fb-rule); }
.fb-stat dt { font-family: var(--fb-mono); font-size: 13px; color: var(--fb-muted); }
.fb-stat dd { margin: 8px 0 4px; font-weight: 800; font-size: clamp(30px, 3.6vw, 46px); letter-spacing: -0.03em; line-height: 1.05; }
.fb-stat--missed dd { color: var(--fb-coral); }
.fb-stat__verdict { font-size: clamp(22px, 2.4vw, 30px) !important; }
.fb-stat > span { font-family: var(--fb-mono); font-size: 14px; color: var(--fb-muted); }

.fb-share { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: end; }
.fb-share__canvas { width: 100%; height: auto; aspect-ratio: 1200 / 630; border-radius: 6px; border: 1px solid var(--fb-rule); background: var(--fb-raised); }
.fb-share__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.fb-download { display: inline-flex; align-items: center; gap: 10px; padding: 14px 20px; border: 1.5px solid var(--fb-bone); border-radius: 4px; background: transparent; color: var(--fb-bone); font-family: var(--fb-display); font-weight: 600; font-size: 16px; cursor: pointer; transition: background 200ms ease, color 200ms ease; }
.fb-download:hover, .fb-download:focus-visible { background: var(--fb-bone); color: var(--fb-ground); }
.fb-post { display: inline-flex; align-items: center; gap: 6px; color: var(--fb-bone); font-family: var(--fb-mono); font-size: 15px; text-decoration: none; }
.fb-post span { display: inline-block; transition: transform 200ms ease; }
.fb-post:hover span { transform: translate(3px, -3px); }

.fb-ledger__head, .fb-row { display: grid; grid-template-columns: minmax(0, 2.2fr) 1fr 1fr 1.2fr; gap: 16px; align-items: center; }
.fb-ledger__head { padding: 0 0 12px; font-family: var(--fb-mono); font-size: 12px; color: var(--fb-muted); border-bottom: 1px solid var(--fb-rule); }
.fb-ledger__head span:not(:first-child), .fb-row__cell { text-align: right; }
.fb-ledger__rows { list-style: none; margin: 0; padding: 0; }
.fb-row { padding: 16px 0; border-bottom: 1px solid var(--fb-rule); font-family: var(--fb-mono); font-size: 15px; }
.fb-row__token { display: flex; align-items: center; gap: 14px; min-width: 0; color: var(--fb-bone); text-decoration: none; }
.fb-row__token strong { display: block; font-family: var(--fb-display); font-size: 17px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-row__token small { display: block; color: var(--fb-muted); font-size: 12px; margin-top: 2px; }
.fb-row__token:hover strong { color: var(--fb-coral); }
.fb-badge { flex: none; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--fb-raised); }
.fb-badge--text { display: grid; place-items: center; font-family: var(--fb-mono); font-size: 11px; text-transform: uppercase; border: 1px solid var(--fb-rule); }
.fb-row__diff { color: var(--fb-muted); }
.fb-row--missed .fb-row__diff { color: var(--fb-coral); font-weight: 600; }
.fb-row__diff em { display: block; font-style: normal; font-size: 12px; opacity: 0.85; }
.fb-more { margin-top: 18px; padding: 0; border: 0; background: none; color: var(--fb-bone); font-family: var(--fb-mono); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.fb-note { margin: 0; font-family: var(--fb-mono); font-size: 13px; color: var(--fb-muted); }

.fb-skeleton { display: grid; gap: 14px; }
.fb-skeleton span { display: block; height: 18px; border-radius: 3px; background: linear-gradient(90deg, var(--fb-raised), var(--fb-rule), var(--fb-raised)); background-size: 200% 100%; animation: fb-shimmer 1.2s linear infinite; }
.fb-skeleton__stats { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.fb-skeleton__stats span { height: 72px; }
.fb-skeleton__row { display: grid; grid-template-columns: 32px 2fr 1fr 1fr; gap: 16px; align-items: center; }
.fb-skeleton .fb-skeleton__dot { width: 32px; height: 32px; border-radius: 50%; }

/* method */
.fb-method { padding: 120px 0; border-top: 1px solid var(--fb-rule); }
.fb-method__grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; align-items: start; }
.fb-method__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--fb-rule); }
.fb-method__item { display: grid; grid-template-columns: 48px 1fr; gap: 20px; padding: 28px 0; border-bottom: 1px solid var(--fb-rule); }
.fb-method__icon { color: var(--fb-coral); margin-top: 2px; }
.fb-method__item h3 { margin: 0 0 6px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.fb-method__item p { margin: 0; color: var(--fb-muted); line-height: 1.6; max-width: 52ch; }

/* statement */
.fb-statement { padding: 128px 0; background: var(--fb-coral); color: var(--fb-ground); }
.fb-statement__big { margin: 0; font-weight: 800; font-size: clamp(56px, 10vw, 148px); line-height: 0.9; letter-spacing: -0.055em; }
.fb-statement__big span { color: var(--fb-bone); -webkit-text-stroke: 2px var(--fb-ground); }
.fb-statement__body { margin: 40px 0 0; max-width: 56ch; font-size: 19px; line-height: 1.55; font-weight: 500; }

/* footer */
.fb-footer { padding: 48px 0 56px; border-top: 1px solid var(--fb-rule); }
.fb-footer__inner { display: flex; justify-content: space-between; gap: 32px; align-items: flex-start; }
.fb-footer p { margin: 0; max-width: 60ch; color: var(--fb-muted); font-family: var(--fb-mono); font-size: 13px; line-height: 1.6; }

@keyframes fb-rise { from { transform: translateY(18px); } to { transform: none; } }
@keyframes fb-strike { from { transform: rotate(-3deg) scaleX(0); } to { transform: rotate(-3deg) scaleX(1); } }
@keyframes fb-shimmer { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .fb-card { transform: rotate(-2deg); }
}

@media (max-width: 900px) {
  .fb-hero { grid-template-columns: 1fr; gap: 48px; padding: 56px 0 80px; min-height: 0; }
  .fb-method__grid { grid-template-columns: 1fr; gap: 40px; }
  .fb-share { grid-template-columns: 1fr; }
  .fb-share__actions { flex-direction: row; align-items: center; flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .fb-nav { height: 64px; }
  .fb-check, .fb-method { padding: 80px 0; }
  .fb-statement { padding: 88px 0; }
  .fb-stats { grid-template-columns: 1fr; }
  .fb-stat, .fb-stat + .fb-stat { padding: 20px 0; border-left: 0; }
  .fb-stat + .fb-stat { border-top: 1px solid var(--fb-rule); }
  .fb-skeleton__stats { grid-template-columns: 1fr; }
  .fb-form__input { padding: 16px 14px; font-size: 15px; }
  .fb-ledger__head { display: none; }
  .fb-row { grid-template-columns: 1fr 1fr; row-gap: 12px; }
  .fb-row__token { grid-column: 1 / -1; }
  .fb-row__cell { text-align: left; }
  .fb-row__cell::before { content: attr(data-label); display: block; font-size: 11px; color: var(--fb-muted); margin-bottom: 2px; }
  .fb-footer__inner { flex-direction: column; }
}
