/* Due Back launch site. Tokens from docs/site/BRIEF.md (the app's palette plus site-only tokens). */
:root {
  --bg: #f5f2ec;
  --surface: #fffdf9;
  --surface-sunken: #ece7df;
  --border: #ddd5c9;
  --border-strong: #a99e90;
  --text: #24201b;
  --text-muted: #665c52;
  --accent: #c2410c;
  --accent-hover: #a3360a;
  --accent-contrast: #ffffff;
  --accent-soft: #fde6d8;
  --focus: #c2410c;
  --overdue-fg: #b42318;
  --overdue-bg: #fde8e6;
  --due-today-fg: #855400;
  --due-today-bg: #fcefc7;
  --out-fg: #1d4ed8;
  --out-bg: #e2eafc;
  --available-fg: #1b6e38;
  --available-bg: #dff2e5;
  --returned-fg: #475266;
  --returned-bg: #e8ebf0;
  --oos-fg: #5b554e;
  --oos-bg: #e9e5df;
  /* site only */
  --paper: #fffef8;
  --peg-hole: #ddd5c9;
  --band: #24201b;
  --band-text: #f2ede6;
  /* The band label: safety orange lightened so it reaches AA on the dark band. */
  --band-accent: #ff8a4c;
  --header-bg: rgb(245 242 236 / 0.86);
  --shadow-sm: 0 1px 2px rgb(56 40 20 / 0.06);
  --shadow-md: 0 2px 6px rgb(56 40 20 / 0.08), 0 8px 24px rgb(56 40 20 / 0.06);
  --shadow-lg: 0 12px 40px rgb(56 40 20 / 0.16);
  --display: "Archivo", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --header-h: 4.25rem;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --pad: clamp(1.25rem, 5vw, 3rem);
  --gap: clamp(5rem, 12vw, 9rem);
  --peg: radial-gradient(circle, var(--peg-hole) 2.5px, transparent 3px) 0 0 /
    28px 28px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161412;
    --surface: #211e1a;
    --surface-sunken: #1b1916;
    --border: #3a352f;
    --border-strong: #6b6259;
    --text: #f2ede6;
    --text-muted: #b3a89b;
    --accent: #ff8a4c;
    --accent-hover: #ffa070;
    --accent-contrast: #1c0d04;
    --accent-soft: #3e2416;
    --focus: #ff8a4c;
    --overdue-fg: #ffa198;
    --overdue-bg: #451a16;
    --due-today-fg: #f5c451;
    --due-today-bg: #3b2d0b;
    --out-fg: #9ab8ff;
    --out-bg: #18254a;
    --available-fg: #7fd69c;
    --available-bg: #13301e;
    --returned-fg: #b9c2d0;
    --returned-bg: #262b33;
    --oos-fg: #beb6ac;
    --oos-bg: #2d2a26;
    --paper: #f4efe4;
    --peg-hole: #2b2722;
    --band: #0f0d0b;
    --band-text: #f2ede6;
    --header-bg: rgb(22 20 18 / 0.86);
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
    --shadow-md: 0 2px 6px rgb(0 0 0 / 0.35), 0 8px 24px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 12px 40px rgb(0 0 0 / 0.5);
  }
}

/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  color-scheme: light dark;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
  overflow-x: clip;
}
h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
}
h1,
h2 {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 118%;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.6rem, 8.5vw, 5.75rem);
  line-height: 1.02;
}
h2 {
  font-size: clamp(1.9rem, 5vw, 3.25rem);
  line-height: 1.06;
  margin-bottom: 1.25rem;
}
h3 {
  font: 600 1.25rem/1.3 var(--body);
  margin-bottom: 0.5rem;
}
.label {
  display: block;
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font: 700 0.75rem/1.4 var(--body);
  font-stretch: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.wrap {
  width: 100%;
  max-width: calc(72rem + 2 * var(--pad));
  margin-inline: auto;
  padding-inline: var(--pad);
}
main > section + section {
  margin-top: var(--gap);
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.skip {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  font-weight: 600;
  transform: translateY(-200%);
}
.skip:focus {
  transform: none;
}

/* Logo */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
}
.logo {
  flex: none;
  width: 32px;
  height: 32px;
}
.logo__tag {
  transform-box: view-box;
  transform-origin: 12px 16px;
}
.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.02em;
  font-size: 1.25rem;
  line-height: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  min-height: 44px;
  min-width: 44px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}
.btn--primary {
  padding: 0 1.1rem;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 1px 0 var(--accent-hover);
  transition: transform 120ms var(--ease-out);
}
.btn--primary:hover {
  background: var(--accent-hover);
}
.btn--primary:active {
  transform: translateY(1px);
}
.btn--big {
  min-height: 52px;
  padding: 0 1.5rem;
  font-size: 1.0625rem;
}
.btn--small {
  font-size: 0.9375rem;
}
.btn--text {
  padding: 0 0.5rem;
  color: var(--text);
  text-underline-offset: 0.2em;
}
.btn--text:hover {
  text-decoration: underline;
}

/* Pills: the app's StatusBadge */
.pill {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.4em;
  padding: 0.15em 0.65em;
  border-radius: 999px;
  font: 600 0.875rem/1.4 var(--body);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pill::before {
  content: "";
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: currentColor;
}
.pill--overdue {
  color: var(--overdue-fg);
  background: var(--overdue-bg);
}
.pill--due-today {
  color: var(--due-today-fg);
  background: var(--due-today-bg);
}
.pill--out {
  color: var(--out-fg);
  background: var(--out-bg);
}
.pill--available {
  color: var(--available-fg);
  background: var(--available-bg);
}
.pill--oos {
  color: var(--oos-fg);
  background: var(--oos-bg);
}
.pill--oos::before {
  border-radius: 1px;
}
.pill--returned {
  color: var(--returned-fg);
  background: var(--returned-bg);
}

/* Filter pills (the app's Out now filters), also the screenshot toggles */
.filter {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font: 600 0.9375rem/1.2 var(--body);
}
.filter.is-pressed,
.filter[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}
button.filter {
  cursor: pointer;
}

/* 0. Header */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}
.top.is-scrolled {
  border-bottom-color: var(--border);
}
.top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}
.top__nav {
  display: none;
}
@media (min-width: 720px) {
  .top__nav {
    display: flex;
    gap: 0.25rem;
  }
  .top__nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 0.75rem;
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9375rem;
    text-decoration: none;
  }
  .top__nav a:hover {
    color: var(--text);
  }
}

/* 1. Hero */
.hero {
  position: relative;
  padding-block: clamp(2.5rem, 7vw, 5.5rem) 1rem;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--peg);
  -webkit-mask-image: radial-gradient(
    ellipse 60% 70% at 78% 45%,
    #000 15%,
    transparent 72%
  );
  mask-image: radial-gradient(
    ellipse 60% 70% at 78% 45%,
    #000 15%,
    transparent 72%
  );
}
.hero__grid {
  display: grid;
  gap: 3.5rem;
  align-items: center;
}
@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: 55fr 45fr;
    gap: 2rem;
  }
}
.hero h1 {
  margin-bottom: 1.5rem;
}
.hero__sub {
  max-width: 34ch;
  color: var(--text-muted);
  font-size: 1.2rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 2rem;
}
.fine {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* The printer and its slip */
.printer {
  justify-self: center;
  width: min(100%, 22rem);
  position: relative;
}
.printer__slot {
  position: relative;
  z-index: 2;
  width: 110%;
  margin-left: -5%;
  height: 10px;
  border-radius: 999px;
  background: var(--text);
}
.printer__out {
  margin-top: -5px;
  /* Cut at the slot's edge: the slip appears out of the printer. */
  clip-path: inset(0 -3rem -4rem -3rem);
}
.slip {
  --ink: #24201b;
  position: relative;
  padding: 1.5rem 1.5rem 2rem;
  background: var(--paper);
  color: var(--ink);
  font: 400 0.875rem/1.55 var(--mono);
  font-variant-numeric: tabular-nums;
  box-shadow:
    0 1px 0 #0000000d,
    0 18px 40px rgb(56 40 20 / 0.18);
  transform: rotate(-1.5deg);
  transform-origin: top center;
  -webkit-mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - 9px) no-repeat,
    conic-gradient(from -45deg at 50% 100%, #000 90deg, #0000 0) bottom / 10px
      10px repeat-x;
  mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - 9px) no-repeat,
    conic-gradient(from -45deg at 50% 100%, #000 90deg, #0000 0) bottom / 10px
      10px repeat-x;
}
/* The torn-edge mask clips the slip's own box-shadow, so the same shadow is cast from the parent too. */
.printer__feed {
  filter: drop-shadow(0 1px 0 #0000000d)
    drop-shadow(0 18px 20px rgb(56 40 20 / 0.18));
}
.slip__head {
  display: flex;
  justify-content: space-between;
  font-weight: 500;
}
.slip__title {
  letter-spacing: 0.2em;
}
.slip__rule {
  margin: 0.6rem 0;
  border: 0;
  border-top: 1px dashed #a99e90;
}
.slip__lines > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.slip__lines dd {
  text-align: right;
}
.slip__total {
  font-size: 1.25rem;
  font-weight: 600;
}
.slip__sign {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1rem;
  margin-top: 2rem;
  font-size: 0.6875rem;
  color: #5c534a;
}
.slip__sign span {
  padding-top: 0.3rem;
  border-top: 1px solid #24201b;
}
.stamp {
  position: absolute;
  right: 1.25rem;
  bottom: 2.4rem;
  padding: 0.2rem 0.6rem;
  border: 3px solid #475266;
  border-radius: 8px;
  color: #475266;
  font: 800 1.5rem/1 var(--display);
  font-stretch: 112%;
  letter-spacing: 0.04em;
  opacity: 0.85;
  transform: rotate(-8deg);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='60'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.2 2'/%3E%3C/filter%3E%3Crect width='160' height='60' filter='url(%23n)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='60'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.2 2'/%3E%3C/filter%3E%3Crect width='160' height='60' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: no-preference) {
  .printer__feed {
    animation:
      slip-print 1100ms steps(14, end) both,
      slip-settle 200ms ease-out 1100ms both;
  }
  .printer .slip .ret {
    animation: line-in 220ms ease-out both;
    animation-delay: calc(1350ms + var(--i) * 90ms);
  }
  .printer .stamp {
    animation: stamp 420ms ease-out 2050ms both;
  }
}
@keyframes slip-print {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(6px);
  }
}
@keyframes slip-settle {
  from {
    translate: 0 0;
  }
  to {
    translate: 0 -6px;
  }
}
@keyframes line-in {
  from {
    opacity: 0;
  }
}
@keyframes stamp {
  0% {
    opacity: 0;
    transform: rotate(-8deg) scale(1.4);
  }
  43% {
    opacity: 0.85;
    transform: rotate(-8deg) scale(1);
  }
  62% {
    transform: rotate(-8deg) translateY(2px);
  }
  81% {
    transform: rotate(-8deg) translateY(-1px);
  }
  100% {
    opacity: 0.85;
    transform: rotate(-8deg);
  }
}

/* 2. The whiteboard problem */
.board__lines {
  display: grid;
  gap: 0.6rem;
}
.board__lines li,
.board__answer {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.35;
}
.board__lines li {
  color: var(--text-muted);
}
.board__answer {
  margin-top: 1.5rem;
  color: var(--text);
}
.strike {
  background: linear-gradient(var(--accent), var(--accent)) 0 58% / 100% 3px
    no-repeat;
}
@media (prefers-reduced-motion: no-preference) {
  .js .strike {
    background-size: 0 3px;
    transition: background-size 500ms ease-out;
  }
  .js .strike.is-in {
    background-size: 100% 3px;
  }
}

/* 3. How it works */
.steps {
  position: relative;
  display: grid;
  gap: 2.5rem;
  margin-top: 2.5rem;
}
.steps::before {
  content: "";
  position: absolute;
  top: 1rem;
  bottom: 1rem;
  left: 1.4rem;
  border-left: 2px dashed var(--border-strong);
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
}
.step__num {
  align-self: start;
  padding-block: 0.25rem;
  background: var(--bg);
  color: var(--accent);
  font: 500 1.75rem/1 var(--mono);
}
.step__body > p {
  color: var(--text-muted);
}
@media (min-width: 860px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  .steps::before {
    top: 1.15rem;
    bottom: auto;
    left: 4.5rem;
    right: 2rem;
    border-left: 0;
    border-top: 2px dashed var(--border-strong);
  }
  .step {
    grid-template-columns: 1fr;
  }
  .step__num {
    justify-self: start;
    padding-right: 0.75rem;
    font-size: 2.25rem;
  }
}
.vignette {
  margin-top: 1.25rem;
}
.vignette--form {
  padding: 1rem;
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 0.875rem;
  line-height: 1.7;
}
.rows {
  display: grid;
  gap: 0.5rem;
}
.row {
  --tone: var(--border-strong);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 0.75rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--tone);
  border-radius: 10px;
  background: var(--surface);
  font-size: 0.9rem;
  line-height: 1.35;
}
.row--overdue {
  --tone: var(--overdue-fg);
}
.result {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
}
.result__big {
  display: block;
  color: var(--text);
  font: 500 1.5rem/1.3 var(--mono);
}

/* Reveal on scroll: only with JS and motion allowed. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(12px);
    transition:
      opacity 400ms var(--ease-out) var(--d, 0ms),
      transform 400ms var(--ease-out) var(--d, 0ms);
  }
  .js .reveal.is-in {
    opacity: 1;
    transform: none;
  }
}

/* 4. The arithmetic */
.math__intro {
  max-width: 52ch;
  color: var(--text-muted);
}
.math__static {
  margin-top: 2rem;
}
.math__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.math__table caption {
  padding-bottom: 0.75rem;
  color: var(--text-muted);
  text-align: left;
}
.math__table th,
.math__table td {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.math__table thead th {
  font: 700 0.75rem/1.4 var(--body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.math__table td:last-child {
  text-align: right;
}
.math__table tbody th {
  font-weight: 500;
}
/* Phones: each day becomes a two-line card (roles in the HTML keep the table semantics). */
@media (max-width: 599px) {
  .math__table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .math__table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.35rem 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }
  .math__table th,
  .math__table td {
    padding: 0;
    border: 0;
  }
  .math__table td:last-child {
    grid-column: 1 / -1;
    color: var(--text-muted);
    text-align: left;
  }
}
.math__static .sum {
  max-width: 24rem;
  margin: 1.5rem 0 0 auto;
}
.sum {
  display: grid;
  gap: 0.2rem;
  font-size: 0.9375rem;
  text-align: right;
}
.sum li span {
  display: inline-block;
  min-width: 6ch;
}
.sum__refund {
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
  font-weight: 500;
  font-size: 1.125rem;
}
.sum__refund span {
  text-decoration: underline double;
  text-underline-offset: 0.25em;
}

.math__track {
  height: 360vh;
  margin-top: 2rem;
}
@media (max-width: 719px) {
  .math__track {
    height: 300vh;
  }
}
.math__sticky {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  display: grid;
  width: 100%;
  max-width: calc(44rem + 2 * var(--pad));
  margin-inline: auto;
  padding-inline: var(--pad);
}
@media (min-width: 960px) {
  .math__sticky {
    max-width: calc(72rem + 2 * var(--pad));
    grid-template-columns: minmax(0, 1fr) 40rem;
    gap: 3rem;
    align-items: center;
  }
}
.panel {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1rem, 4vw, 2rem);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.cal {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(48px, 1fr));
  padding-top: 1.6rem;
  font: 500 0.9375rem/1.2 var(--mono);
}
.cal li {
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  padding: 0.6rem 0 0.4rem;
  border-left: 1px solid var(--border);
}
.cal li:first-child {
  border-left: 0;
}
.cal li span {
  color: var(--text-muted);
  font: 600 0.75rem/1 var(--body);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cal em {
  padding: 0 0.4em;
  border-radius: 999px;
  background: var(--due-today-bg);
  color: var(--due-today-fg);
  font: 600 0.6875rem/1.5 var(--body);
  font-style: normal;
}
.cal .cal__today {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% / 6);
  padding: 0;
  border: 0;
  transform: translateX(calc((var(--d) - 1) * 100%));
  transition: transform 240ms var(--ease-out);
}
.cal__today b {
  display: block;
  width: 100%;
  padding-bottom: 0.35rem;
  border-bottom: 3px solid var(--accent);
  color: var(--accent);
  font: 700 0.6875rem/1 var(--body);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.panel__row[data-tone="due-today"] {
  --tone: var(--due-today-fg);
}
.panel__row[data-tone="out"] {
  --tone: var(--out-fg);
}
.panel__row[data-tone="overdue"] {
  --tone: var(--overdue-fg);
}
.panel__row[data-tone="returned"] {
  --tone: var(--returned-fg);
}
.panel .sum li[data-from] {
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 200ms ease-out,
    transform 200ms ease-out;
}
.panel[data-day="5"] .sum li[data-from="5"],
.panel[data-day="6"] .sum li[data-from] {
  opacity: 1;
  transform: none;
}
.math__caption {
  order: 1;
  min-height: 3.2em;
  margin-top: 1rem;
  font-weight: 500;
  transition: opacity 150ms ease-out;
}
@media (min-width: 960px) {
  .math__caption {
    order: 0;
    max-width: 22ch;
    min-height: 6em;
    margin-top: 0;
    font: 500 clamp(1.25rem, 2vw, 1.6rem) / 1.4 var(--body);
  }
}
.math__caption.is-out {
  opacity: 0;
}

/* 5. Features */
.grid {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
}
@media (min-width: 960px) {
  .grid {
    grid-template-columns: repeat(12, 1fr);
  }
  .card--7 {
    grid-column: span 7;
  }
  .card--5 {
    grid-column: span 5;
  }
  .card--4 {
    grid-column: span 4;
  }
  .card--tall {
    min-height: 22rem;
  }
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity 150ms ease-out;
}
.card > p {
  color: var(--text-muted);
}
@media (hover: hover) and (pointer: fine) {
  .card {
    transition: transform 150ms ease-out;
  }
  .js .card.reveal.is-in {
    transition:
      opacity 400ms var(--ease-out) var(--d, 0ms),
      transform 150ms ease-out;
  }
  .card:hover,
  .js .card.reveal.is-in:hover {
    transform: translateY(-2px);
  }
  .card:hover::after {
    opacity: 1;
  }
}
.outcomes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1.5rem;
}
.outcomes .result {
  background: var(--surface-sunken);
  box-shadow: none;
}
.outcomes .result__big {
  font-size: 1.25rem;
}
.thumb {
  display: grid;
  justify-items: center;
  height: 13rem;
  margin-top: auto;
  padding-top: 1.25rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 70%, transparent);
  mask-image: linear-gradient(#000 70%, transparent);
}
.slip--thumb {
  width: 22rem;
  zoom: 0.55;
  margin-top: 1rem;
  transform: rotate(-1.5deg);
}
.filters,
.stock {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.stock {
  gap: 0.6rem 1.25rem;
}
.stock li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.9375rem;
}
.search {
  margin-top: 1.25rem;
  font-size: 0.875rem;
}
.search__field {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg);
}
.search__field::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1em;
  margin-left: 1px;
  vertical-align: -0.15em;
  background: var(--text);
}
.search__results li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.3rem;
  padding: 0.5rem 0.1rem;
  border-bottom: 1px solid var(--border);
}

/* 6. See the real app */
.shots__sub {
  color: var(--text-muted);
}
.toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}
.toggles[hidden] {
  display: none;
}
.stage {
  position: relative;
  display: grid;
  gap: 2rem;
  margin-top: 1.5rem;
}
.browser {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.browser__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  background: var(--surface-sunken);
}
.browser__bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}
.browser__url {
  margin-inline: auto;
  padding: 0.1rem 1.5rem;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.75rem;
}
.browser__view {
  display: grid;
}
.shot {
  grid-area: 1 / 1;
  opacity: 0;
}
.shot.is-shown {
  opacity: 1;
}
@media (prefers-reduced-motion: no-preference) {
  .shot {
    transition: opacity 200ms ease-out;
  }
}
.phone {
  order: -1;
  justify-self: center;
  width: 78%;
  max-width: 20rem;
  overflow: hidden;
  border: 8px solid var(--text);
  border-radius: 40px;
  background: var(--text);
  box-shadow: var(--shadow-lg);
}
.phone img {
  border-radius: 32px;
}
@media (min-width: 720px) {
  .stage {
    display: block;
    padding-right: 14%;
    padding-bottom: 6rem;
  }
  .phone {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 24%;
    max-width: none;
  }
}
.shots__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2.5rem;
}
.shots__cta p {
  color: var(--text-muted);
}

/* 7. The dark band */
.band {
  position: relative;
  padding-block: clamp(4rem, 10vw, 7rem);
  background:
    radial-gradient(circle, #ffffff0a 2.5px, transparent 3px) 0 0 / 28px 28px,
    var(--band);
  color: var(--band-text);
}
.band .label {
  color: var(--band-accent);
}
.band h2 {
  max-width: 20ch;
  color: var(--band-text);
}
.band__cols {
  display: grid;
  gap: 2rem;
  margin-top: 1rem;
}
@media (min-width: 860px) {
  .band__cols {
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
  }
}
.band__cols > p {
  font-size: 1.125rem;
}
.band__list {
  opacity: 0.8;
}
.band__list ul {
  display: grid;
  gap: 0.6rem;
}
.band__list li {
  padding-left: 1.1rem;
  position: relative;
}
.band__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* 8. Questions */
.faq > * {
  max-width: 48rem;
}
.faq details {
  border-bottom: 1px solid var(--border);
}
.faq details:first-of-type {
  border-top: 1px solid var(--border);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  padding: 0.85rem 0;
  font-weight: 600;
  font-size: 1.0625rem;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  flex: none;
  color: var(--accent);
  font: 400 1.6rem/1 var(--mono);
}
@media (prefers-reduced-motion: no-preference) {
  .faq summary::after {
    transition: transform 200ms ease-out;
  }
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  max-width: 60ch;
  padding-bottom: 1.1rem;
  color: var(--text-muted);
}

/* 9. Closing */
.closing__panel {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 1rem;
  overflow: hidden;
  padding: clamp(3rem, 8vw, 5.5rem) clamp(1.25rem, 5vw, 3rem);
  border-radius: 24px;
  background: var(--surface-sunken);
  text-align: center;
}
.closing__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--peg);
  -webkit-mask-image: radial-gradient(
    ellipse at center,
    transparent 30%,
    #000 85%
  );
  mask-image: radial-gradient(ellipse at center, transparent 30%, #000 85%);
}
.closing__panel > * {
  position: relative;
}
.closing h2 {
  margin: 0.5rem 0 0;
}
.closing p {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.logo--big {
  width: 56px;
  height: 56px;
}
@media (prefers-reduced-motion: no-preference) {
  .closing__panel .logo__tag {
    transition: transform 400ms var(--ease-out);
  }
  .closing__panel:hover .logo__tag {
    animation: swing 1.6s ease-in-out infinite alternate;
  }
}
@keyframes swing {
  from {
    transform: rotate(-4deg);
  }
  to {
    transform: rotate(4deg);
  }
}

/* 10. Footer */
.foot {
  margin-top: var(--gap);
  padding-block: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.875rem;
}
.foot__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 2rem;
}
.foot .wordmark {
  color: var(--text);
  font-size: 1.05rem;
}
.foot .logo {
  width: 24px;
  height: 24px;
}
