/* Interlock's site. Colours are the app's: SpreadGreen and the strokes gained gain and loss
   tones (StrokesGainedTone.swift), on iOS's grouped backgrounds. */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-alt: #f2f2f7;
  --card: #ffffff;
  --card-2: #f2f2f7;
  --text: #0b0b0c;
  --text-2: #6e6e73;
  --line: rgba(60, 60, 67, 0.16);
  --accent: #2a9142;
  --accent-text: #1a6b3c;
  --accent-tint: rgba(42, 145, 66, 0.12);
  --on-accent: #ffffff;
  --gain: #1a6b3c;
  --loss: #b3261e;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.08);
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', system-ui, sans-serif;
  --font-display:
    -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', system-ui, sans-serif;
  --font-rounded: ui-rounded, 'SF Pro Rounded', -apple-system, system-ui, sans-serif;
  --gain-bar: #2a9142;
  --loss-bar: #d0574f;
  --bezel: #111113;
  --font-condensed: 'Archivo', 'Arial Narrow', -apple-system, system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --muted-bar: rgba(60, 60, 67, 0.18);
  /* Text over course footage stays light in either scheme; the scrim keeps it readable. */
  --on-image: #ffffff;
  --on-image-2: rgba(255, 255, 255, 0.78);
  --image-ground: #17321f;
  --scrim: rgba(5, 18, 9, 0.62);
  --scrim-soft: rgba(5, 18, 9, 0.18);
  --glass: rgba(255, 255, 255, 0.14);
  --glass-line: rgba(255, 255, 255, 0.32);
}

/* Dark when the device is dark and no Light choice overrides it, and whenever Dark is chosen. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #000000;
    --bg-alt: #0d0d0f;
    --card: #1c1c1e;
    --card-2: #2c2c2e;
    --text: #f5f5f7;
    --text-2: #98989f;
    --line: rgba(235, 235, 245, 0.14);
    --accent: #46b864;
    --accent-text: #5bd08e;
    --accent-tint: rgba(70, 184, 100, 0.16);
    --on-accent: #04170a;
    --gain: #5bd08e;
    --loss: #ff8a80;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px rgba(0, 0, 0, 0.5);
    --gain-bar: #46b864;
    --loss-bar: #e06a60;
    --bezel: #2c2c2e;
    --muted-bar: rgba(235, 235, 245, 0.16);
    --scrim: rgba(0, 0, 0, 0.66);
    --scrim-soft: rgba(0, 0, 0, 0.3);
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #000000;
  --bg-alt: #0d0d0f;
  --card: #1c1c1e;
  --card-2: #2c2c2e;
  --text: #f5f5f7;
  --text-2: #98989f;
  --line: rgba(235, 235, 245, 0.14);
  --accent: #46b864;
  --accent-text: #5bd08e;
  --accent-tint: rgba(70, 184, 100, 0.16);
  --on-accent: #04170a;
  --gain: #5bd08e;
  --loss: #ff8a80;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px rgba(0, 0, 0, 0.5);
  --gain-bar: #46b864;
  --loss-bar: #e06a60;
  --bezel: #2c2c2e;
  --muted-bar: rgba(235, 235, 245, 0.16);
  --scrim: rgba(0, 0, 0, 0.66);
  --scrim-soft: rgba(0, 0, 0, 0.3);
}

.theme-changing,
.theme-changing * {
  transition:
    background-color 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease,
    fill 0.35s ease,
    stroke 0.35s ease !important;
}

@media (prefers-reduced-motion: reduce) {
  .theme-changing,
  .theme-changing * {
    transition: none !important;
  }
}

/* The landing page's condensed display face and its figures' monospace, served from the site
   itself under the SIL Open Font License (fonts/OFL-*.txt). */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 500 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('/fonts/archivo.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/plex-mono-400.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/plex-mono-500.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/plex-mono-600.woff2') format('woff2');
}

/* Base */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.022em;
  line-height: 1.1;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent-text);
  text-underline-offset: 3px;
}

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

.num {
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--text-2);
}

.gain {
  color: var(--gain);
}

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 720px) {
  .wrap {
    padding: 0 32px;
  }
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 10;
  background: var(--card);
  padding: 8px 12px;
  border-radius: 8px;
}

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

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.badge {
  width: 30px;
  height: 30px;
}

.badge-fill {
  fill: var(--accent);
}

.badge-mark {
  fill: #fff;
}

.site-nav {
  display: none;
  gap: 24px;
  margin-right: auto;
}

.site-nav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a[aria-current] {
  color: var(--text);
}

@media (min-width: 860px) {
  .site-nav {
    display: flex;
  }
}

/* The sign-in to the web app, in view at every width. Outlined, so the page's one green button
   stays its primary action. */
.header-login {
  margin-left: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.header-login:hover {
  border-color: var(--text-2);
}

.site-header .appearance + .header-login {
  margin-left: 12px;
}

/* The app's segmented Appearance picker. Without script it cannot act, so it is hidden. */
.appearance {
  display: none;
  margin-left: auto;
  padding: 2px;
  border-radius: 9px;
  background: var(--card-2);
  border: 1px solid var(--line);
}

.js .appearance {
  display: inline-flex;
}

.appearance button {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 5px 11px;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font: 500 13px/1.2 var(--font);
  cursor: pointer;
}

.appearance button[aria-checked='true'] {
  background: var(--card);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.15),
    0 0 0 0.5px rgba(0, 0, 0, 0.06);
  font-weight: 600;
}

:root[data-theme='dark'] .appearance button[aria-checked='true'] {
  background: #636366;
}

@media (min-width: 860px) {
  .appearance {
    margin-left: 0;
  }
}

/* A phone has no room for the brand, the picker and Log in on one row; Log in matters more, and
   the page follows the phone's own appearance without the picker. */
@media (max-width: 559px) {
  .js .appearance {
    display: none;
  }

  .header-login,
  .site-header .appearance + .header-login {
    margin-left: auto;
    flex-shrink: 0;
  }
}

/* Buttons and pills */

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid transparent;
}

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

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 14px;
}

.lead {
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--text-2);
  max-width: 34em;
}

/* Strokes gained explainer */

.explainer {
  display: grid;
  gap: 24px;
  margin-top: 64px;
}

@media (min-width: 900px) {
  .explainer {
    grid-template-columns: 1.1fr 1fr 1fr;
  }
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
}

.panel h3 {
  font-size: 22px;
}

.formula {
  font-family: var(--font-rounded);
  font-size: 22px;
  font-weight: 600;
  margin: 12px 0 16px;
  letter-spacing: -0.01em;
}

.worked {
  font-variant-numeric: tabular-nums;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  font-size: 15px;
}

.worked dt {
  color: var(--text-2);
}

.worked dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
}

.worked .total {
  border-top: 1px solid var(--line);
  padding-top: 8px;
  font-size: 17px;
}

.fine {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 20px;
}

/* Legal and support pages */

.doc {
  max-width: 760px;
  padding-top: 56px;
  padding-bottom: 88px;
}

.doc h1 {
  font-size: clamp(34px, 5vw, 46px);
  font-weight: 800;
}

.doc h2 {
  font-size: 24px;
  margin-top: 2.2em;
}

.doc h3 {
  font-size: 18px;
  margin-top: 1.6em;
}

.doc li {
  margin-bottom: 0.5em;
}

.doc .updated {
  color: var(--text-2);
  font-size: 15px;
}

.summary-box {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 24px;
  margin: 28px 0;
}

.summary-box ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.table-scroll {
  overflow-x: auto;
}

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

.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
}

.doc th {
  font-weight: 600;
}

/* The price comparison: a note or the source links under a cell's main text. */
.price-table small {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 400;
}

.price-table th[scope='row'] {
  min-width: 220px;
}

.contact-card {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 24px;
  margin: 28px 0;
}

.not-found {
  text-align: center;
  padding: 120px 16px;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  padding: 48px 0 32px;
  font-size: 15px;
}

.footer-grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-grid nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-grid h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-2);
  margin: 0 0 4px;
}

.footer-grid nav a {
  color: var(--text);
  text-decoration: none;
}

.footer-grid nav a:hover {
  color: var(--accent-text);
}

.footer-grid .brand + p {
  margin-top: 12px;
}

.footer-fine {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.footer-fine p {
  margin: 0 0 4px;
}

/* A document page wide enough for a row of panels. */
.doc-wide {
  max-width: 1160px;
}

.doc-wide .explainer {
  margin-top: 32px;
}

.cta-row {
  margin-top: 40px;
}

/* Landing page. One idea, everything you need and nothing you don't, carried by type and air:
   a centred opening over the owner's photo, four numbered sections each with one real screen or
   working example, what the app leaves out, the levels footage and a closing line. Green is kept
   for the mark, the primary action and the examples' data. */

.home {
  --rhythm: clamp(96px, 11vw, 160px);
  --measure: 30em;
}
.home h1,
.home h2,
.home h3 {
  margin: 0;
  text-wrap: balance;
}
.home h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.home p {
  margin: 0;
}
.home button {
  font: inherit;
  color: inherit;
}

.loss {
  color: var(--loss);
}

/* Archivo at its lightest served weight and a slightly narrowed width reads calm rather than
   loud; the negative tracking keeps large sizes tight. */
.display {
  font-family: var(--font-condensed);
  font-stretch: 88%;
  font-weight: 500;
  letter-spacing: -0.028em;
  line-height: 1;
}
h1.display {
  font-size: clamp(46px, 7.4vw, 104px);
  line-height: 0.98;
}
h2.display {
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 1.04;
}
.home .lead,
.home .body {
  color: var(--text-2);
  max-width: var(--measure);
  text-wrap: pretty;
}
.home .lead {
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.5;
}
.home .body {
  font-size: 17px;
  line-height: 1.6;
}

/* Small mono labels: the section numbers, the kicker and the examples' captions. */
.home .eyebrow,
.kicker,
.home .label {
  margin: 0;
  font: 500 12px/1.4 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
}
.home .eyebrow {
  display: flex;
  gap: 14px;
  align-items: baseline;
}
.home .eyebrow span {
  color: var(--accent-text);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
}
.home .button {
  padding: 13px 24px;
  font-size: 16px;
}
.text-link {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  padding-block: 6px;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s ease;
}
.text-link:hover {
  border-color: var(--text);
}
.text-link span {
  display: inline-block;
  margin-left: 4px;
  transition: transform 0.2s ease;
}
.text-link:hover span {
  transform: translateX(3px);
}

/* Sections are separated by space and a hairline, never by a change of ground. */
.section {
  padding-block: var(--rhythm);
}
.section + .section {
  border-top: 1px solid var(--line);
}
.home .wrap {
  max-width: 1200px;
}
.section-head {
  display: grid;
  gap: 22px;
  align-content: start;
  margin-bottom: clamp(48px, 6vw, 80px);
  max-width: 40em;
}
.split {
  display: grid;
  gap: 64px;
  align-items: center;
}
.split > * {
  min-width: 0;
}
.split .section-head {
  margin-bottom: 0;
}
@media (min-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(64px, 8vw, 128px);
  }
  .split-reverse > :first-child {
    order: 2;
  }
}

/* The opening */
.hero-inner {
  padding-block: clamp(64px, 7vw, 104px) clamp(56px, 6vw, 88px);
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 26px;
}
.hero h1 span {
  display: block;
}
.hero h1 .quiet {
  color: var(--text-2);
}
.hero .lead {
  max-width: 28em;
}
.hero .actions {
  justify-content: center;
  margin-top: 8px;
}
.hero-image {
  margin: 0;
  overflow: hidden;
  background: var(--bg-alt);
}
.hero-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  /* Low in the frame, so the horizon and the cliff edge show rather than open sky. */
  object-position: 62% 85%;
}
@media (min-width: 600px) {
  .hero-image img {
    aspect-ratio: 16 / 9;
  }
}
@media (min-width: 1100px) {
  .hero-image img {
    aspect-ratio: 21 / 9;
    max-height: 760px;
  }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .hero-image img {
    filter: brightness(0.86);
  }
}
:root[data-theme='dark'] .hero-image img {
  filter: brightness(0.86);
}

/* A figure, set large, with its caption beside it. */
.figure-note {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin: 12px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.figure-note dt {
  font-family: var(--font-condensed);
  font-stretch: 88%;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: 44px;
  line-height: 1;
}
.figure-note dd {
  margin: 0;
  color: var(--text-2);
}
.credit {
  font-size: 12.5px;
  color: var(--text-2);
}

/* App screens: the shipped app, in the scheme the page shows. */
.phone {
  margin: 0;
  justify-self: center;
  width: 100%;
  max-width: 300px;
  padding: 7px;
  border-radius: 46px;
  background: var(--bezel);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 30px 60px -20px rgba(0, 0, 0, 0.25);
}
.phone img {
  width: 100%;
  height: auto;
  border-radius: 39px;
}
@media (min-width: 900px) {
  .phone {
    max-width: 330px;
  }
}
.phone .shot-dark {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .phone .shot-light {
    display: none;
  }
  :root:not([data-theme='light']) .phone .shot-dark {
    display: block;
  }
}
:root[data-theme='dark'] .phone .shot-light {
  display: none;
}
:root[data-theme='dark'] .phone .shot-dark {
  display: block;
}

/* Shared pieces of the working examples. */
.avatar {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 600 12.5px/1 var(--font);
  color: var(--text);
  background: var(--card-2);
}
.step {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.step span:last-child {
  font-size: 13px;
  color: var(--text-2);
}
.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.seg button {
  appearance: none;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 14px;
  font-weight: 500;
}
.seg button[aria-pressed='true'] {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.seg button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* The Spread: one quiet panel, a hairline between choosing and the result. */
.spread {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  overflow: hidden;
}
@media (min-width: 900px) {
  .spread {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  }
}
.spread-setup,
.spread-result {
  padding: 24px 20px;
  display: grid;
  gap: 20px;
  align-content: start;
}
.spread-setup {
  border-bottom: 1px solid var(--line);
}
@media (min-width: 900px) {
  .spread-setup {
    border-bottom: 0;
    border-right: 1px solid var(--line);
    padding: 36px;
  }
  .spread-result {
    padding: 36px 40px;
    gap: 28px;
  }
}
.roster {
  display: grid;
}
.pick {
  appearance: none;
  /* The hover ground reaches past the column, so names line up with the headings above. */
  width: calc(100% + 20px);
  text-align: left;
  cursor: pointer;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 10px;
  margin-inline: -10px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  transition: background-color 0.15s ease;
}
.pick:hover {
  background: var(--bg-alt);
}
.pick[aria-pressed='true'] .avatar {
  color: var(--on-accent);
  background: var(--accent);
}
.pick:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}
.pick-name {
  font-weight: 600;
  display: block;
}
.pick-sub {
  font-size: 13px;
  color: var(--text-2);
  display: block;
}
.pick-hcp {
  text-align: right;
}
.pick-hcp b {
  font: 500 17px/1 var(--font-mono);
  display: block;
}
.pick-hcp span {
  font-size: 11px;
  color: var(--text-2);
}
.verdict {
  font-family: var(--font-condensed);
  font-stretch: 88%;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: clamp(30px, 3.2vw, 40px);
  line-height: 1.05;
  text-wrap: balance;
}
.shots {
  display: grid;
  gap: 10px;
}
.shot-row,
.hole-key {
  display: grid;
  grid-template-columns: 4.6em minmax(0, 1fr) 2.2em;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}
.shot-row > span:first-child,
.chance-row > span:first-child {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shot-row > b {
  font: 500 15px var(--font-mono);
  text-align: right;
}
.holes {
  display: grid;
  grid-template-columns: repeat(18, minmax(0, 1fr));
  gap: 3px;
}
.holes i {
  height: 12px;
  border-radius: 3px;
  background: var(--card-2);
}
.holes i.on {
  background: var(--accent);
}
.holes i.two {
  background: var(--accent-text);
}
.hole-key .holes i {
  height: auto;
  background: none;
  font: 500 9.5px/1 var(--font-mono);
  color: var(--text-2);
  text-align: center;
  font-style: normal;
}
@media (max-width: 560px) {
  .hole-key .holes i:nth-child(even) {
    visibility: hidden;
  }
}
.chances {
  display: grid;
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.chance-head {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 13px;
  color: var(--text-2);
}
.legend {
  display: inline-flex;
  gap: 14px;
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend span::before {
  content: '';
  width: 10px;
  height: 4px;
  border-radius: 2px;
  background: var(--muted-bar);
}
.legend span.with::before {
  background: var(--accent);
}
.chance-row {
  display: grid;
  grid-template-columns: 4.6em minmax(0, 1fr) 6.2em;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}
.chance-bars {
  display: grid;
  gap: 4px;
}
.chance-bars i {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--muted-bar);
  transition: width 0.3s ease;
}
.chance-bars i.with {
  height: 8px;
  border-radius: 4px;
  background: var(--accent);
}
.chance-row output {
  font: 500 13px var(--font-mono);
  text-align: right;
  color: var(--text-2);
  white-space: nowrap;
}
.chance-row output b {
  color: var(--text);
  font-weight: 600;
}

/* Insights: the benchmark sits under the words, with no card around it. */
.bench {
  display: grid;
  gap: 18px;
  margin-top: 16px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.bench-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.bench-top output {
  font-family: var(--font-condensed);
  font-stretch: 88%;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: 32px;
  line-height: 1;
}
.home input[type='range'] {
  width: 100%;
  accent-color: var(--accent);
  margin: 0;
}
.bench-scale {
  display: flex;
  justify-content: space-between;
  font: 500 11px var(--font-mono);
  color: var(--text-2);
  margin-top: -8px;
}
.bars {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}
.bar-row {
  display: grid;
  grid-template-columns: 9em minmax(0, 1fr) 3.6em;
  gap: 14px;
  align-items: center;
  font-size: 15px;
}
.bar-row output {
  font: 500 14px var(--font-mono);
  text-align: right;
}
.track {
  position: relative;
  height: 10px;
}
.track::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -4px;
  bottom: -4px;
  width: 1px;
  background: var(--line);
}
.fill {
  position: absolute;
  top: 2px;
  height: 6px;
  border-radius: 3px;
  background: var(--gain-bar);
  transition:
    left 0.25s ease,
    width 0.25s ease;
}
.fill.loss-fill {
  background: var(--loss-bar);
}
.bar-row.total {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-weight: 600;
}
@media (max-width: 560px) {
  .bar-row {
    grid-template-columns: 8.6em minmax(0, 1fr) 3.4em;
    gap: 10px;
    font-size: 14px;
  }
}

/* Together: one calm feed rather than a row of cards. */
.feed {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
}
.feed-item {
  display: flex;
  gap: 16px;
  padding: 24px 22px;
}
@media (min-width: 900px) {
  .feed-item {
    padding: 32px;
  }
}
.feed-item + .feed-item {
  border-top: 1px solid var(--line);
}
.feed-item > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.feed-title {
  font-weight: 600;
}
.feed-meta {
  font-size: 14px;
  color: var(--text-2);
}
.feed-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-block: 6px;
}
.feed-tags span {
  font: 500 12.5px/1 var(--font-mono);
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--card-2);
}
.feed-tags span.up {
  color: var(--gain);
  background: var(--accent-tint);
}
.feed-note {
  margin-top: 6px;
  padding-left: 14px;
  border-left: 2px solid var(--line);
  line-height: 1.5;
}

/* What the app leaves out */
.leaves-out h2 {
  margin-bottom: clamp(40px, 5vw, 64px);
}
.quiet-list {
  display: grid;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 800px) {
  .quiet-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 48px;
  }
}
.quiet-list li {
  display: grid;
  gap: 8px;
  align-content: start;
  padding-top: 20px;
  border-top: 1px solid var(--text);
}
.quiet-list p {
  color: var(--text-2);
  max-width: 22em;
}

/* Footage: text on it is always light, over a scrim, in either scheme. */
.footage {
  position: relative;
  overflow: hidden;
  background: var(--image-ground);
  color: var(--on-image);
  isolation: isolate;
}
.footage video,
.footage .poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  z-index: -2;
}
.footage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
}
.footage h2,
.footage h3 {
  color: var(--on-image);
}
.motion-toggle {
  position: absolute;
  z-index: 2;
  right: 16px;
  bottom: 16px;
  appearance: none;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  font: 500 12px/1.2 var(--font-mono);
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.home .motion-toggle {
  color: var(--on-image);
}
.levels::after {
  background: linear-gradient(180deg, var(--scrim-soft) 0%, var(--scrim) 100%);
}
.levels-inner {
  padding-block: clamp(160px, 22vw, 300px) clamp(64px, 7vw, 96px);
  display: grid;
  gap: 48px;
}
.levels h2 {
  max-width: 14em;
}
.levels-list {
  display: grid;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 800px) {
  .levels-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 48px;
  }
}
.levels-list li {
  border-top: 1px solid var(--glass-line);
  padding-top: 16px;
  display: grid;
  gap: 6px;
}
.levels-list p {
  color: var(--on-image-2);
  font-size: 15px;
}

/* The close: the mark, one line and the two ways in. */
.closing {
  padding-block: var(--rhythm);
}
.closing-inner {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 24px;
}
.closing-mark svg {
  width: 44px;
  height: 44px;
  fill: var(--accent);
}
.closing h2 {
  max-width: 12em;
}
.closing .actions {
  justify-content: center;
  margin-top: 12px;
}

/* A gentle rise into place as each block first scrolls in. landing.js sets `reveal-ready` only
   when it can also clear it, so without script, or with reduced motion, nothing is hidden. */
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal-ready .reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .fill,
  .chance-bars i,
  .pick,
  .text-link,
  .text-link span {
    transition: none;
  }
}

/* Footer */
.site-footer {
  padding-block: 48px 32px;
  font-size: 15px;
}
.footer-grid {
  display: grid;
  gap: 28px;
}
@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr;
  }
}
.footer-grid nav {
  display: grid;
  gap: 8px;
  align-content: start;
}
.footer-grid nav h2 {
  font: 600 13px/1.2 var(--font);
  color: var(--text-2);
  margin-bottom: 4px;
}
.footer-grid nav a {
  color: var(--text);
  text-decoration: none;
}
.footer-fine {
  margin-top: 36px;
  font-size: 13px;
  color: var(--text-2);
  display: grid;
  gap: 6px;
}
.footer-fine a {
  color: var(--text-2);
}
