/* billiard-base.com. Colour roles come from tokens.css (generated from the
   app theme); values here are copied from the "Billiard Base · Website"
   canvas artboards (Web-kit, Main, Legal and the Navigation v2 N-*.dc.html). */

/* Montserrat, the app's own files (assets/fonts) as WOFF2, OFL in
   fonts/Montserrat-OFL.txt. Self-hosted: no request to a font service. */
@font-face {
  font-family: Montserrat;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/Montserrat-Regular.woff2") format("woff2");
}
@font-face {
  font-family: Montserrat;
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/Montserrat-Italic.woff2") format("woff2");
}
@font-face {
  font-family: Montserrat;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/Montserrat-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: Montserrat;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/Montserrat-Bold.woff2") format("woff2");
}
@font-face {
  font-family: Montserrat;
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/Montserrat-ExtraBold.woff2") format("woff2");
}

:root {
  /* Felt frame, the same in both themes. Not ColorScheme roles: they come
     from the store screenshots' Felt frame (docs/store-screenshots.md). */
  --felt: #0e5f6e;
  --felt-deep: #0a4f5c;
  --rail: #38251e;
  --pocket: #0a0a0a;
  --gold: var(--color-tertiary);
  --on-gold: var(--color-on-tertiary);
  /* Body text on felt, from the Website kit. */
  --on-felt: #e3f1f3;

  /* Light pages are tinted with white cards (Website kit). */
  --page: var(--color-surface-container-low);
  --card: var(--color-surface-container-lowest);
  --tile: var(--color-surface-container-low);
  --on: var(--color-on-surface);
  --muted: var(--color-on-surface-variant);
  --primary: var(--color-primary);
  --on-primary: var(--color-on-primary);
  --sc: var(--color-secondary-container);
  --on-sc: var(--color-on-secondary-container);
  --outline: var(--color-outline);
  --ov: var(--color-outline-variant);
  --pc: var(--color-primary-container);
  --on-pc: var(--color-on-primary-container);
  --lost: var(--color-error);
  --lost-c: var(--color-error-container);
  --on-lost-c: var(--color-on-error-container);

  /* Tiles, cards, feature cards, bands, table frame; buttons are full. */
  --radius-tile: 12px;
  --radius-card: 16px;
  --radius-feature: 24px;
  --radius-band: 32px;
  --radius-frame: 40px;
  --radius-full: 999px;

  color-scheme: light dark;
}

/* Dark pages keep surface with lifted cards, as in the app. */
@media (prefers-color-scheme: dark) {
  :root {
    --page: var(--color-surface);
    --card: var(--color-surface-container-high);
    --tile: var(--color-surface-container);
  }
}

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

body {
  margin: 0;
  container-type: inline-size;
  background: var(--page);
  color: var(--on);
  font-family: Montserrat, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
}

a:hover {
  color: var(--on);
}

img {
  display: block;
  max-width: 100%;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Type scale (Website kit). */
.h-display {
  margin: 0;
  font-size: clamp(40px, 5.4cqi, 76px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.h-section {
  margin: 0;
  font-size: clamp(28px, 3.2cqi, 44px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.h-card {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
}

.overline {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
}

.lead {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
}

/* Pill buttons (Website kit). */
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  filter: brightness(1.08);
}

.btn-filled,
.btn-filled:hover {
  background: var(--primary);
  color: var(--on-primary);
}

.btn-outlined,
.btn-outlined:hover {
  border: 1px solid var(--ov);
  color: var(--on);
}

.btn-tonal,
.btn-tonal:hover {
  background: var(--sc);
  color: var(--on-sc);
}

/* Cards are flat: no shadows, no borders. */
.card {
  border-radius: var(--radius-card);
  background: var(--card);
}

.tile {
  border-radius: var(--radius-tile);
  background: var(--tile);
}

/* Header and footer, shared by every page (N-Home, N-Phone-menu). */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 80px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--on);
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
}

.brand span {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-full);
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.nav-link:hover {
  background: var(--card);
  color: var(--on);
}

.nav-link[aria-current="page"],
.menu-link[aria-current="page"] {
  background: var(--sc);
  color: var(--on-sc);
  font-weight: 800;
}

/* The phone header's Menu; above 900 px the links are inline instead. */
.menu {
  display: none;
}

.menu-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-full);
  background: var(--card);
  color: var(--on);
  font-size: 14px;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.menu-button::-webkit-details-marker {
  display: none;
}

.menu-button svg,
.menu-link svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
  padding: 12px;
  border-radius: var(--radius-feature);
  background: var(--card);
}

.menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 16px;
  border-radius: var(--radius-card);
  color: var(--on);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
}

.menu-divider {
  height: 1px;
  margin: 8px 16px;
  background: var(--ov);
}

.menu-sub {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.menu-cta {
  justify-content: center;
  min-height: 52px;
  margin-top: 8px;
  font-size: 15px;
}

/* The sitemap: brand, then one column per group. */
.site-footer {
  border-top: 1px solid var(--ov);
}

.foot-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-top: 48px;
  padding-bottom: 32px;
}

.foot-about {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.foot-about p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 800;
}

.foot-brand img {
  width: 28px;
  height: 28px;
}

.foot-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
}

.foot-heading {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.foot-col a {
  color: var(--muted);
  text-decoration: none;
}

.foot-col a:hover {
  color: var(--on);
}

.foot-copyright {
  padding-bottom: 40px;
  font-size: 14px;
  color: var(--muted);
}

.btn-compact {
  min-height: 44px;
  padding: 0 20px;
}

.text-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  font-weight: 800;
}

/* Landing page (Main artboard). */
.section {
  padding-top: 112px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 720px;
  margin-bottom: 40px;
}

/* The gold cue chalk mark before the hero kicker and section titles. */
.cue-mark {
  display: block;
  width: 6px;
  height: 34px;
  border-radius: 2px;
  background: var(--gold);
  transform: rotate(20deg);
}

.hero {
  padding-top: 8px;
}

.table-frame {
  position: relative;
  border: 28px solid var(--rail);
  border-radius: var(--radius-frame);
  background: var(--felt);
  box-shadow: inset 0 0 0 7px var(--felt-deep);
}

/* Clips the phone inside the cushion; the diamonds sit outside it, on the
   rail. Radius = frame radius minus rail width, at both breakpoints. */
.felt {
  overflow: hidden;
  border-radius: 12px;
}

.diamonds {
  position: absolute;
  top: -18px;
  right: 0;
  left: 0;
  display: flex;
  justify-content: space-around;
  padding: 0 12%;
  pointer-events: none;
}

.diamonds span {
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: end;
  padding: 0 56px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  padding: 88px 0 96px;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffffff;
}

.hero-kicker span span {
  white-space: nowrap;
}

.hero-copy .h-display {
  color: #ffffff;
}

.hero-lead {
  max-width: 520px;
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--on-felt);
}

.hero-phone {
  position: relative;
  display: flex;
  align-self: end;
  justify-content: flex-end;
}

/* The phone stands on the cushion: no bottom bezel. */
.hero-phone-inner {
  width: 316px;
  height: 600px;
  margin-top: 64px;
  overflow: hidden;
  border: 12px solid #0a0a0a;
  border-bottom: 0;
  border-radius: 52px 52px 0 0;
  background: var(--page);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.hero-phone-inner img {
  width: 100%;
  height: auto;
}

/* The watch stands on the felt in front of the phone's lower left corner,
   half over it; min() keeps it inside the column when the phone fills it. */
.hero-watch {
  position: absolute;
  right: min(250px, calc(100% - 132px));
  bottom: 28px;
  width: 132px;
  overflow: hidden;
  border: 8px solid #0a0a0a;
  border-radius: 38px;
  background: #000000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.hero-watch img,
.watch img {
  display: block;
  width: 100%;
  height: auto;
}

/* Official badges at the artboard's 52 px badge height. */
.store-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.store-badge {
  display: flex;
  justify-content: center;
}

.store-badge img {
  width: auto;
  height: 52px;
}

/* Google's PNG carries its own clear space (about 16 % of its height on
   each side); scale it so the visible badge is 52 px too. */
.store-badge-googlePlay img {
  height: 77px;
  margin: -12.5px -12px;
}

.disc-section {
  padding-top: 72px;
}

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

.disc-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-card);
  background: var(--card);
}

/* Pool balls in their real colours, the same in both themes. */
.disc-ball {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
}

.disc-ball span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: #ffffff;
  color: #121212;
  font-size: 12px;
  font-weight: 800;
}

.disc-ball-eightBall {
  background: #121212;
}

.disc-ball-nineBall {
  background: linear-gradient(#f4f4f0 0 22%, #e8b321 22% 78%, #f4f4f0 78%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.disc-ball-tenBall {
  background: linear-gradient(#f4f4f0 0 22%, #1f57b8 22% 78%, #f4f4f0 78%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.disc-ball-tenBall span {
  font-size: 11px;
}

/* 14.1 has no ball of its own: a felt tile. */
.disc-ball-straightPool {
  border-radius: var(--radius-tile);
  background: var(--felt);
}

.disc-ball-straightPool span {
  width: auto;
  height: auto;
  background: none;
  color: #ffffff;
  font-size: 15px;
}

.two-line {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.4;
}

.two-line-title {
  font-size: 17px;
  font-weight: 800;
}

.two-line-note {
  font-size: 13px;
  color: var(--muted);
}

.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.span2 {
  grid-column: span 2;
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px;
  border-radius: var(--radius-feature);
  background: var(--card);
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 520px;
}

.feature-text p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

/* Drawings sit at the bottom so cards in a row line up. */
.feature-drawing {
  margin-top: auto;
}

.feature .two-line {
  gap: 0;
}

.feature .two-line-title {
  font-size: 15px;
}

/* The capture brings its own rails and felt. */
.table-shot {
  aspect-ratio: 2 / 1;
}

.table-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modes {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mode {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--ov);
  border-radius: var(--radius-card);
}

.mode-on {
  border: 2px solid var(--primary);
}

.radio {
  flex: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--outline);
  border-radius: var(--radius-full);
}

.mode-on .radio {
  border: 5px solid var(--primary);
}

.stat-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius-card);
  background: var(--tile);
}

.stat-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}

.win-rates {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 40px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
}

.bar {
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--ov);
}

.bar span {
  display: block;
  height: 100%;
  border-radius: var(--radius-full);
}

/* Discipline colours from the app's statistics. */
.bar:nth-child(2) span {
  background: var(--muted);
}

.bar:nth-child(5) span {
  background: #c99a16;
}

.bar:nth-child(8) span {
  background: #3a72cf;
}

.bar:nth-child(11) span {
  background: var(--primary);
}

.rate {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.archive {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.month {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.archived-match {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-tile);
  background: var(--tile);
}

.chip {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
}

.chip-won {
  background: var(--pc);
  color: var(--on-pc);
}

.chip-lost {
  background: var(--lost-c);
  color: var(--on-lost-c);
}

.sheet {
  padding: 12px;
  border-radius: var(--radius-card);
  background: var(--tile);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.sheet-row {
  display: grid;
  grid-template-columns: 28px repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 6px 8px;
}

.sheet-head {
  font-weight: 800;
  color: var(--muted);
}

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

.foul {
  font-weight: 700;
  color: var(--lost);
}

.sheet-current {
  border-radius: 8px;
  background: var(--pc);
  color: var(--on-pc);
  font-weight: 700;
}

.watch-stage {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}

/* watchOS is always dark, so the bezel is too, in both page themes. */
.watch {
  width: 150px;
  overflow: hidden;
  border: 9px solid #0a0a0a;
  border-radius: 43px;
  background: #000000;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.band {
  padding: 48px;
  border-radius: var(--radius-band);
  background: var(--card);
}

.band-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.band-lead {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
}

.privacy-points {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.privacy-point {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-card);
  background: var(--tile);
}

.privacy-point svg {
  flex: none;
  fill: none;
  stroke: var(--primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.privacy-point .two-line {
  gap: 4px;
}

.privacy-point .two-line-title {
  font-size: 16px;
}

.privacy-point .two-line-note {
  font-size: 14px;
  line-height: 1.5;
}

/* "More than the app" (N-Home). */
.explore-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

.explore-head .cue-mark {
  height: 40px;
}

.explore {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.explore-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border-radius: var(--radius-feature);
  background: var(--card);
  color: var(--on);
  text-decoration: none;
}

.explore-card:hover {
  outline: 2px solid var(--primary);
}

.explore-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-card);
  background: var(--sc);
  color: var(--on-sc);
}

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

.explore-text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

.explore-action {
  margin-top: auto;
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
}

.download {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding-bottom: 112px;
  text-align: center;
}

.download .h-section {
  max-width: 720px;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.download .store-row {
  justify-content: center;
}

/* Legal pages (Legal page artboard). */
/* Below the site header: the row of legal pages above the title. */
.legal-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 24px;
  font-size: 14px;
  font-weight: 700;
}

.legal-switcher a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-full);
  color: var(--muted);
  text-decoration: none;
}

.legal-switcher a:hover {
  color: var(--on);
}

.legal-switcher a[aria-current="page"] {
  background: var(--sc);
  color: var(--on-sc);
}

.legal-title {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 760px;
  padding-top: 32px;
  padding-bottom: 40px;
}

.legal-title h1 {
  margin: 0;
  font-size: 48px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.legal-title p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

.legal-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: flex-start;
}

/* Stays in view while the text scrolls; same offset as the headings'
   scroll-margin-top, and a list taller than the window scrolls itself. */
.legal-toc {
  position: sticky;
  top: 24px;
  display: flex;
  flex: 0 0 260px;
  flex-direction: column;
  gap: 2px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 20px;
  border-radius: var(--radius-card);
  background: var(--card);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.legal-toc span {
  padding: 0 12px 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.legal-toc a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
}

.legal-toc a:hover {
  background: var(--tile);
  color: var(--on);
}

.legal-body {
  flex: 999 1 560px;
  min-width: 0;
  max-width: 780px;
  padding: 48px;
  border-radius: var(--radius-feature);
  background: var(--card);
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: break-word;
}

/* jaspr_content wraps the Markdown in <section class="content">. */
.legal-body > .content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.legal-body > .content > * {
  margin: 0;
}

.legal-body h2 {
  margin-top: 16px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  scroll-margin-top: 24px;
}

.legal-body h3 {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
}

.legal-body p,
.legal-body li {
  color: var(--muted);
}

.legal-body strong {
  font-weight: 800;
  color: var(--on);
}

.legal-body ul,
.legal-body ol {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 24px;
}

.legal-body address {
  font-style: normal;
  color: var(--on);
}

.legal-body blockquote {
  padding: 20px 24px;
  border-radius: var(--radius-card);
  background: var(--tile);
}

.legal-body blockquote p {
  margin: 0;
  color: var(--on);
}

.legal-body table {
  border-collapse: collapse;
  font-size: 14px;
}

.legal-body th,
.legal-body td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--ov);
  text-align: left;
  vertical-align: top;
}

@container (max-width: 900px) {
  .nav-links,
  .header-cta,
  .legal-toc {
    display: none;
  }

  /* Logo and Menu share the first row; the open panel takes the next one and
     pushes the page down. */
  .site-header {
    position: relative;
    flex-wrap: wrap;
    height: auto;
    gap: 0 12px;
  }

  .brand {
    min-height: 64px;
  }

  .menu {
    display: block;
    flex: 1 0 100%;
  }

  .menu-button {
    position: absolute;
    top: 10px;
    right: 32px;
  }

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

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

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

  .hero-copy {
    align-items: center;
    padding-top: 48px;
    text-align: center;
  }

  .hero-phone {
    justify-content: center;
  }

  /* Same corner of the centred phone, never past the column's left edge. */
  .hero-watch {
    right: auto;
    left: max(0px, calc(50% - 190px));
    bottom: 20px;
    width: 96px;
    border-width: 6px;
    border-radius: 28px;
  }

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

  .span2 {
    grid-column: span 1;
  }

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

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

@container (max-width: 520px) {
  /* Sides only: sections keep their vertical padding. */
  .wrap {
    padding-right: 16px;
    padding-left: 16px;
  }

  .table-frame {
    border-width: 16px;
    border-radius: 28px;
  }

  .diamonds {
    display: none;
  }

  /* Not in the artboard: its 56 px left a 214 px column at 390 px and broke
     the kicker mid-word. */
  .hero-grid {
    padding: 0 24px;
  }

  /* Not in the artboard either: logo, name and Menu fit one line down to
     320 px. */
  .brand {
    gap: 10px;
  }

  .brand img {
    width: 32px;
    height: 32px;
  }

  .brand span {
    font-size: clamp(16px, 5cqi, 19px);
  }

  .menu-button {
    right: 16px;
  }

  .download-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .download-actions .btn {
    justify-content: center;
  }

  .store-row {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .hero-phone-inner {
    transform: scale(0.92);
    transform-origin: bottom center;
  }

  .legal-body {
    padding: 28px 20px;
  }
}

/* Page head of every page but Home (N-WebApp). */
.page-top {
  padding-top: 48px;
}

.page-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}

.h-page {
  margin: 0;
  font-size: clamp(36px, 4cqi, 56px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.page-lead {
  max-width: 480px;
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.page-note {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

/* Play page (Website · Play in the browser, N-WebApp). */
.btn-large {
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  font-size: 15px;
}

.web-app-link svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.play-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: center;
}

/* The web app in a browser window: the page's colours, so it follows the
   visitor's theme like the real app. */
.browser {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--ov);
  border-radius: var(--radius-card);
  background: var(--card);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 14px;
  background: var(--color-inverse-surface);
}

.browser-lights {
  display: flex;
  gap: 6px;
}

.browser-lights span {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
}

/* macOS window buttons, the same in both themes. */
.browser-lights span:nth-child(1) {
  background: #ff5f57;
}

.browser-lights span:nth-child(2) {
  background: #febc2e;
}

.browser-lights span:nth-child(3) {
  background: #28c840;
}

.browser-address {
  flex: 1;
  max-width: 320px;
  margin: 0 auto;
  padding: 5px 12px;
  border-radius: 8px;
  background: var(--color-on-inverse-surface);
  color: var(--color-inverse-surface);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  opacity: 0.85;
}

.browser-app {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px 16px;
  background: var(--page);
  color: var(--on);
  line-height: 1.2;
}

.app-glyph {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
  font-size: 14px;
  font-weight: 800;
}

.app-bar .app-glyph {
  width: 20px;
  height: 20px;
}

.app-help {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--outline);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--muted);
}

.app-board {
  display: flex;
  gap: 12px;
}

.app-players {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.app-player {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 230px;
  border-radius: 22px;
  background: var(--card);
}

.app-player-active {
  background: var(--primary);
  color: var(--on-primary);
}

.app-at-table {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--on-primary);
  color: var(--primary);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.app-clock {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.app-name {
  font-size: 16px;
  font-weight: 800;
}

.app-score {
  font-size: 104px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.app-rail {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 76px;
  padding: 8px;
  border-radius: 20px;
  background: var(--card);
}

.app-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 0;
  border-radius: 14px;
  background: var(--tile);
  font-size: 9px;
  font-weight: 700;
}

.app-action-on {
  background: var(--pc);
  color: var(--on-pc);
}

.play-section {
  padding-top: 112px;
}

.play-section + .play-section {
  padding-top: 96px;
}

.compare {
  align-items: start;
}

.compare .cue-mark {
  height: 40px;
}

.compare .band-lead {
  max-width: 440px;
}

.compare-box {
  padding: 12px 28px;
  border-radius: 28px;
  background: var(--card);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.4;
  text-align: left;
}

.compare-table th,
.compare-table td {
  height: 56px;
  padding: 0 16px 0 0;
  border-bottom: 1px solid var(--ov);
}

.compare-table tr > :first-child {
  width: 46%;
}

.compare-table tbody th {
  font-weight: 700;
}

.compare-table thead th {
  height: auto;
  padding-top: 14px;
  padding-bottom: 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.compare-yes {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--primary);
}

.compare-yes svg {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.compare-app-only {
  font-weight: 600;
  color: var(--muted);
}

.browser-data {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px 40px;
  padding: 40px;
  border-radius: var(--radius-band);
  background: var(--sc);
  color: var(--on-sc);
}

.browser-data-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--card);
  color: var(--primary);
}

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

.browser-data-copy {
  display: flex;
  flex: 1 1 420px;
  flex-direction: column;
  gap: 8px;
}

.browser-data-copy h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
}

.browser-data-copy p {
  margin: 0;
}

.browser-data > a {
  font-size: 15px;
  font-weight: 800;
}

@container (max-width: 1000px) {
  .play-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
}

@container (max-width: 520px) {
  .compare-box {
    padding: 8px 16px;
  }

  .compare-table {
    font-size: 13px;
  }

  .compare-table th,
  .compare-table td {
    padding-right: 8px;
  }

  .compare-table tr > :first-child {
    width: 42%;
  }

  /* The drawing keeps its proportions in the narrow column. */
  .app-player {
    height: 150px;
  }

  .app-score {
    font-size: 64px;
  }

  .app-rail {
    width: 60px;
  }

  /* The chip goes above the name in the narrow cards; the clock has no room. */
  .app-at-table {
    position: static;
    margin-bottom: 6px;
    padding: 3px 6px;
    font-size: 7px;
    letter-spacing: 0.06em;
  }

  .app-clock {
    display: none;
  }
}

/* Help page (N-Help). */
.page-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.badge-beta {
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: var(--gold);
  color: var(--on-gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-title .badge-beta {
  padding: 4px 10px;
  font-size: 11px;
}

.guides-section {
  padding-top: 56px;
}

.guides-heading {
  margin: 0 0 20px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.guide-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 28px;
  border-radius: var(--radius-feature);
  background: var(--card);
  color: var(--on);
  text-decoration: none;
}

.guide-card:hover {
  outline: 2px solid var(--primary);
}

.guide-number {
  display: flex;
  flex: 0 0 52px;
  align-items: center;
  justify-content: center;
  height: 52px;
  border-radius: var(--radius-card);
  background: var(--sc);
  color: var(--on-sc);
  font-size: 20px;
  font-weight: 800;
}

.guide-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.h-guide {
  font-size: 20px;
  font-weight: 800;
}

.guide-summary {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.faq-section {
  padding-top: 96px;
}

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.4fr);
  gap: 48px;
  align-items: start;
}

.faq-intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-intro .cue-mark {
  height: 40px;
}

.faq-intro p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

.faq {
  padding: 8px 28px;
  border-radius: 28px;
  background: var(--card);
}

.faq details {
  border-bottom: 1px solid var(--ov);
}

.faq details:last-child {
  border-bottom: none;
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  list-style: none;
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
}

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

.chevron {
  flex: 0 0 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.faq details[open] .chevron {
  transform: rotate(180deg);
}

.faq p {
  max-width: 640px;
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

.faq p a {
  font-weight: 800;
  color: var(--primary);
}

/* Guides (N-HelpGuide). */
.breadcrumb {
  display: flex;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

.guide-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-start;
  padding-top: 40px;
}

.guide-toc {
  position: sticky;
  top: 24px;
  display: flex;
  flex: 1 1 220px;
  flex-direction: column;
  gap: 4px;
  max-width: 260px;
}

.guide-toc span {
  padding: 0 12px 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.guide-toc a {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.guide-toc a:hover {
  background: var(--card);
  color: var(--on);
}

.guide-body {
  flex: 999 1 560px;
  min-width: 0;
  overflow-wrap: break-word;
}

/* jaspr_content wraps the Markdown in <section class="content">;
   GuideSectionsExtension puts each ## section in a .guide-section. */
.guide-body > .content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.guide-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 32px;
  border-radius: var(--radius-feature);
  background: var(--card);
  font-size: 16px;
  line-height: 1.6;
}

.guide-section > * {
  margin: 0;
}

/* The checklist before the steps. */
.guide-section:first-child {
  background: var(--sc);
  color: var(--on-sc);
}

.guide-section h2 {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  scroll-margin-top: 24px;
}

.guide-step {
  padding: 32px;
}

.guide-step h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 24px;
}

.step-number {
  display: flex;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: var(--on-primary);
  font-size: 16px;
  font-weight: 800;
}

.guide-section h3 {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 700;
}

.guide-section p,
.guide-section li {
  color: var(--muted);
}

.guide-section:first-child li {
  color: inherit;
}

.guide-section strong {
  font-weight: 800;
  color: var(--on);
}

.guide-section ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 20px;
}

.guide-section a {
  font-weight: 800;
  color: var(--primary);
}

@container (max-width: 900px) {
  .guides,
  .faq-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .guide-toc {
    display: none;
  }

  .guide-section,
  .guide-step {
    padding: 24px;
  }
}

@container (max-width: 520px) {
  .guide-card {
    padding: 20px;
  }

  .faq {
    padding: 4px 20px;
  }

  .guide-section,
  .guide-step {
    padding: 24px 20px;
  }
}

/* Shared shot (/shot/<id>, artboards "Shared shot" on the website canvas):
   the table card with the player, and a card offering the app. The table
   lies flat with the head rail on the left, so a replay's x runs left to
   right and its y top to bottom. */
.shot-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding-top: 28px;
}

.shot-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-feature);
}

.shot-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.shot-clock {
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  font-variant-numeric: tabular-nums;
}

.shot-table {
  position: relative;
  margin: 0 20px 20px;
}

/* The table as the app draws it (TableSurface): 1.1 by 0.6 table lengths,
   the 1 by 0.5 cloth inset by the 0.05 rail. */
.shot-rail {
  position: relative;
  aspect-ratio: 11 / 6;
}

.shot-surface {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

/* Hairlines stay one pixel at every table size. */
.shot-surface * {
  vector-effect: non-scaling-stroke;
}

.shot-cloth {
  position: absolute;
  left: 4.5455%;
  top: 8.3333%;
  width: 90.9091%;
  height: 83.3333%;
  /* A 2¼ in ball on a 100, 88 or 78 in long cloth. */
  --ball: 2.25%;
}

.shot-cloth-eightFoot {
  --ball: 2.56%;
}

.shot-cloth-sevenFoot {
  --ball: 2.88%;
}

.shot-ball {
  position: absolute;
  aspect-ratio: 1;
  width: var(--ball);
  border-radius: var(--radius-full);
  transform: translate(-50%, -50%);
  box-shadow: inset -1px -1px 2px rgba(0, 0, 0, 0.3);
}

.shot-notice {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  color: var(--on-felt);
  font-size: 15px;
  font-weight: 700;
}

.shot-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 20px 20px;
}

.shot-progress {
  height: 4px;
  overflow: hidden;
  border-radius: var(--radius-full);
  background: var(--tile);
}

.shot-progress span {
  display: block;
  height: 100%;
  background: var(--primary);
}

.shot-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shot-pocketed {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.shot-pocketed-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.shot-pocketed-none {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.shot-pocketed-ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
}

.shot-pocketed-ball span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: #ffffff;
  color: #111111;
  font-size: 10px;
  font-weight: 800;
}

.shot-action {
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

.shot-app {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border-radius: var(--radius-feature);
}

.shot-app p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

.shot-open-app {
  justify-content: center;
}

.shot-open-app svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Try-in-app popup after the shot (P-Prompt): a modal <dialog>, so the
   browser draws it above the page with its backdrop. */
.app-prompt {
  width: min(440px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: var(--card);
  color: var(--on);
}

.app-prompt::backdrop {
  background: rgb(0 0 0 / 45%);
}

.app-prompt-body,
.app-prompt-desktop {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.app-prompt-body {
  padding: 28px;
}

.app-prompt-head,
.app-prompt-actions,
.app-prompt-stores {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.app-prompt-head p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

.app-prompt-actions .btn {
  justify-content: center;
}

.app-prompt-scan {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px;
  border-radius: 20px;
}

.app-prompt-scan p {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.qr-code {
  flex: none;
  width: 168px;
  height: 168px;
  border-radius: var(--radius-tile);
}

.app-prompt-stores {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.app-prompt-close {
  display: flex;
  justify-content: flex-end;
}

/* A narrow desktop window: the code above its line, still full size. */
@container (max-width: 420px) {
  .app-prompt-scan {
    flex-direction: column;
    text-align: center;
  }
}

.shot-facts {
  padding-top: 16px;
  border-top: 1px solid var(--ov);
}

.shot-facts-heading {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.shot-facts dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.shot-fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
}

.shot-fact dt {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.shot-fact dd {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.shot-noscript {
  padding-top: 20px;
  color: var(--muted);
}

/* Ball colours from the app (lib/themes/ball_colors.dart): 1–8 solid,
   9–15 a band of the solid eight below on the stripe white. */
.ball-0 {
  background: #f5f5f0;
}

.ball-1 {
  --ball-colour: #f2c80f;
}

.ball-2 {
  --ball-colour: #1f4fd8;
}

.ball-3 {
  --ball-colour: #d62828;
}

.ball-4 {
  --ball-colour: #6a2c91;
}

.ball-5 {
  --ball-colour: #f77f00;
}

.ball-6 {
  --ball-colour: #1b7f3b;
}

.ball-7 {
  --ball-colour: #7a1f1f;
}

.ball-8 {
  --ball-colour: #111111;
}

.ball-9 {
  --ball-colour: #f2c80f;
}

.ball-10 {
  --ball-colour: #1f4fd8;
}

.ball-11 {
  --ball-colour: #d62828;
}

.ball-12 {
  --ball-colour: #6a2c91;
}

.ball-13 {
  --ball-colour: #f77f00;
}

.ball-14 {
  --ball-colour: #1b7f3b;
}

.ball-15 {
  --ball-colour: #7a1f1f;
}

.ball-1,
.ball-2,
.ball-3,
.ball-4,
.ball-5,
.ball-6,
.ball-7,
.ball-8 {
  background: var(--ball-colour);
}

.ball-9,
.ball-10,
.ball-11,
.ball-12,
.ball-13,
.ball-14,
.ball-15 {
  background: linear-gradient(
    #f8f8f4 0 28%,
    var(--ball-colour) 28% 72%,
    #f8f8f4 72%
  );
}

@container (max-width: 1000px) {
  .shot-stage {
    grid-template-columns: minmax(0, 1fr);
  }
}

@container (max-width: 520px) {
  .shot-table {
    margin: 0 12px 16px;
  }

  .shot-controls {
    padding: 0 16px 16px;
  }

  .shot-app {
    padding: 20px;
  }
}

/* Physics pages (website-physics-showcase POC), artboards "Nav v2 · Physics"
   and "Nav v2 · Physics shot". */
.physics-label {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.physics-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding-top: 56px;
}

.physics-step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--sc);
  color: var(--on-sc);
}

.physics-step .physics-label {
  color: var(--on-sc);
}

.physics-step .h-card,
.physics-step p {
  margin: 0;
}

.physics-shots {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 72px;
}

.physics-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.physics-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-feature);
  color: var(--on);
  text-decoration: none;
}

.physics-card:hover {
  outline: 2px solid var(--primary);
}

.physics-card-table {
  padding: 16px 16px 0;
}

.physics-card-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 22px 24px;
}

.physics-card-text .h-card,
.physics-card-text p {
  margin: 0;
}

.physics-card-text p {
  font-size: 14px;
  color: var(--muted);
}

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

.physics-tag {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--tile);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.physics-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
  padding-top: 28px;
}

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

.physics-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-feature);
}

.physics-video {
  position: relative;
  flex: 1;
  aspect-ratio: 16 / 9;
  /* A video's letterbox, dark in both themes like the felt. */
  background: #1b2122;
}

.physics-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.physics-video-gate {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  color: #dee3e5;
}

.physics-video-gate p {
  margin: 0;
  max-width: 420px;
}

.physics-video-title {
  font-size: 17px;
  font-weight: 800;
}

.physics-video-credit {
  font-size: 14px;
  color: #bfc8cb;
}

.physics-video-play,
.physics-video-play:hover {
  gap: 10px;
  min-height: 56px;
  padding: 0 26px;
  background: #ffffff;
  color: #0e5f6e;
}

.physics-video-note {
  font-size: 13px;
}

.physics-video-note a {
  color: #84d2e6;
  font-weight: 800;
}

.physics-paths {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.physics-path {
  fill: none;
  stroke: var(--ball-colour, #f5f5f0);
  stroke-opacity: 0.75;
  stroke-width: 2;
  stroke-dasharray: 5 4;
  vector-effect: non-scaling-stroke;
}

.physics-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 0 20px 20px;
}

.physics-play {
  min-width: 104px;
}

.physics-time {
  flex: 1 1 160px;
  min-height: 44px;
  accent-color: var(--primary);
}

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

.physics-chip {
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--tile);
  color: var(--on);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.physics-chip[aria-pressed='true'] {
  background: var(--sc);
  color: var(--on-sc);
}

.physics-below {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
  padding-top: 20px;
}

.physics-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border-radius: var(--radius-feature);
}

.physics-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.physics-spin dd {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* The app's spin ball (table_spin_ball.dart): the cue ball's white, the
   3-ball's red tip, and the cross in the outline role. */
.spin-ball {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
}

.spin-ball-face {
  fill: #f5f5f0;
  stroke: rgba(0, 0, 0, 0.2);
  stroke-width: 0.02;
}

.spin-ball-cross {
  stroke: var(--ov);
  stroke-width: 0.03;
}

.spin-ball-tip {
  fill: #d62828;
  stroke: #ffffff;
  stroke-width: 0.03;
}

.physics-try {
  padding-top: 20px;
}

.physics-note {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.physics-events {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.physics-events li {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 40px;
  font-size: 15px;
  font-weight: 600;
}

.physics-events li.is-ahead {
  opacity: 0.45;
}

.physics-event-time {
  flex: 0 0 64px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.physics-next {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 40px;
}

@container (max-width: 1000px) {
  .physics-stage,
  .physics-below {
    grid-template-columns: minmax(0, 1fr);
  }

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

@container (max-width: 900px) {
  .physics-steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

@container (max-width: 620px) {
  .physics-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

@container (max-width: 520px) {
  .physics-controls {
    padding: 0 16px 16px;
  }
}
