:root {
  color-scheme: light dark;
  --bg: #fbfaf6;
  --surface: #ffffff;
  --surface-subtle: #f5f3ed;
  --text: #151719;
  --muted: #5c6168;
  --line: #e6e3da;
  --line-strong: #d0ccc0;
  --accent: #0b638a;
  --good: #166e3b;
  --warning: #8a5a00;
  --pass: #1c7a45;
  --miss: #b83b22;
  --miss-bg: #fdf2ef;
  --tab-track: #efede6;
  --table-stripe: #f8f7f2;
  --shadow: 0 4px 16px rgb(24 22 18 / 4%);
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, monospace;
  --h1-hero: clamp(34px, 5.5vw, 56px);
  --h1-page: clamp(28px, 4vw, 38px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0d0f;
    --surface: #141619;
    --surface-subtle: #1c1f24;
    --text: #f0f0ed;
    --muted: #9a9fa8;
    --line: #292d34;
    --line-strong: #3c424d;
    --accent: #74c7ec;
    --good: #72d296;
    --warning: #ffd166;
    --pass: #5cc283;
    --miss: #f07b62;
    --miss-bg: rgb(224 93 64 / 13%);
    --tab-track: #1b1e24;
    --table-stripe: #181b20;
    --shadow: 0 6px 20px rgb(0 0 0 / 28%);
  }

  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  .support-button {
    box-shadow: 0 1px 3px rgb(0 0 0 / 28%);
  }

  .app-icon {
    filter: drop-shadow(0 0 1px rgb(255 255 255 / 26%))
            drop-shadow(0 8px 18px rgb(0 0 0 / 50%));
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font-sans);
  font-optical-sizing: auto;
  font-kerning: normal;
  font-feature-settings: "kern" 1, "liga" 1;
  hanging-punctuation: first allow-end last;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  text-decoration-skip-ink: auto;
  text-decoration-color: color-mix(in srgb, currentColor 42%, transparent);
  transition: text-decoration-color 140ms ease, color 140ms ease;
}

a:hover {
  text-decoration-color: currentColor;
}

:where(a, button, [tabindex="0"]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 530;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 140ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

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

code,
.mono,
.number,
.eyebrow,
.metric,
.numbers {
  font-family: var(--font-mono);
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 580;
  text-wrap: balance;
}

p,
li,
figcaption {
  text-wrap: pretty;
}

table,
.fact strong,
.metric,
.number,
.numbers,
.legend-labels {
  font-variant-numeric: tabular-nums;
}

strong,
b {
  font-weight: 540;
}

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

.small {
  color: var(--muted);
  font-size: 13px;
}

/* Containers */

.container {
  width: min(980px, calc(100% - 36px));
  margin-inline: auto;
}

.container-wide {
  width: min(1140px, calc(100% - 36px));
  margin-inline: auto;
}

.container-prose {
  width: min(680px, calc(100% - 36px));
  margin-inline: auto;
}

/* Main site common header & tabs */

.site-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 20px 0 10px;
}

.brand-block {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
}

.brand-name {
  font-size: 15px;
  font-weight: 580;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

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

.support-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 47px;
  padding: 10px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--tab-track);
  color: var(--text);
  font-size: 15px;
  font-weight: 530;
  line-height: 1.6;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgb(24 22 18 / 6%);
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.support-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: color-mix(in srgb, var(--text) 72%, var(--muted));
  transition: color 140ms ease;
}

.support-button:hover {
  background: color-mix(in srgb, var(--tab-track) 72%, var(--line-strong));
  border-color: color-mix(in srgb, var(--text) 35%, var(--line-strong));
  box-shadow: var(--shadow);
  transform: translateY(-0.5px);
}

.support-button:hover svg {
  color: var(--text);
}

.support-button:active {
  transform: translateY(0);
}

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

.app-tabs-bar {
  display: flex;
  justify-content: center;
  padding: 20px 0 32px;
  border-top: 1px solid var(--line);
}

.app-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px;
  max-width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--tab-track);
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 6%);
}

.app-tabs a {
  padding: 9px 22px;
  border-radius: 999px;
  color: color-mix(in srgb, var(--text) 72%, var(--muted));
  font-size: 15px;
  font-weight: 530;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 140ms ease, color 140ms ease;
}

.app-tabs a:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 45%, transparent);
}

.app-tabs a[aria-selected="true"],
.app-tabs a[aria-selected="true"]:hover {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 2px 6px rgb(0 0 0 / 16%);
}

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

.app-panel {
  padding-bottom: 12px;
}

.app-panel[hidden] {
  display: none;
}

.app-panel:not([hidden]) + .app-panel:not([hidden]) {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

/* Subpage sticky header */

.sub-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px);
}

.sub-header-inner {
  min-height: 54px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  padding: 8px 0;
}

.sub-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 14px;
}

.back-link {
  color: var(--text);
  font-weight: 550;
  text-decoration: none;
}

.back-link:hover {
  color: var(--accent);
}

.sep {
  color: var(--line-strong);
}

.sub-title {
  color: var(--muted);
  font-size: 14px;
}

/* App detail sections */

.app-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "summary summary";
  column-gap: 20px;
  row-gap: 12px;
  align-items: center;
}

.app-icon {
  grid-area: icon;
  width: 96px;
  height: 96px;
  filter: drop-shadow(0 1px 2px rgb(24 22 18 / 14%))
          drop-shadow(0 7px 16px rgb(24 22 18 / 11%));
}

.app-title-group {
  grid-area: title;
}

.app-header h1 {
  margin: 0 0 6px -0.045em;
  font-size: var(--h1-hero);
  font-weight: 590;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

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

.app-summary {
  grid-area: summary;
  max-width: 64ch;
  margin: 0 0 12px;
  font-size: 17px;
  line-height: 1.55;
}

.screens-landscape {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 26px 0 30px;
}

.screens-portrait {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 26px 0 30px;
}

.shot-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.shot-card img {
  width: 100%;
}

.screens-landscape .shot-card img {
  background: #000;
}

.shot-card figcaption {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  text-align: right;
}

.link-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.link-card {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.link-card:hover {
  border-color: var(--line-strong);
}

.link-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
  font-weight: 550;
  font-size: 16px;
}

.link-card-title .arrow {
  color: var(--accent);
}

.link-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.notes-box {
  margin-top: 32px;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
}

.notes-box h2 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 530;
  color: var(--muted);
}

.notes-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
}

.notes-list li + li {
  margin-top: 6px;
}

.notes-list strong {
  color: color-mix(in srgb, var(--text) 82%, var(--muted));
  font-weight: 500;
}

.site-footer {
  margin-top: 52px;
  padding: 22px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
}

/* Prose pages (Privacy policy, Evidence) */

.prose-main {
  padding: 36px 0 64px;
}

.prose-main h1 {
  margin: 0 0 4px;
  font-size: var(--h1-page);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.prose-main h2 {
  margin: 28px 0 8px;
  font-size: 19px;
  letter-spacing: -0.015em;
}

.prose-main h3 {
  margin: 22px 0 8px;
  font-size: 16px;
}

.updated {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.prose-main ul {
  padding-left: 20px;
}

.prose-main > p,
.prose-main > ul {
  max-width: 66ch;
  line-height: 1.65;
}

.prose-main li + li {
  margin-top: 6px;
}

/* Tables (shared across Evidence & Burn-in) */

.table-scroll {
  overflow-x: auto;
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  white-space: nowrap;
}

table.data-table th,
table.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

table.data-table th:first-child,
table.data-table td:first-child {
  text-align: left;
}

table.data-table th {
  position: relative;
  color: var(--muted);
  font-weight: 550;
}

table.data-table tbody tr:nth-child(even) {
  background: var(--table-stripe);
}

table.data-table tr:last-child td {
  border-bottom: 0;
}

/* Burn-in exposure study */

.study-main {
  padding-bottom: 0;
}

.study-section {
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}

.study-section.hero {
  padding-top: 48px;
}

.study-section:last-of-type {
  padding-bottom: 0;
  border-bottom: 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 560;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.study-section h1 {
  max-width: 820px;
  margin: 0 0 16px -0.045em;
  font-size: var(--h1-hero);
  font-weight: 590;
  letter-spacing: -0.04em;
  line-height: 1.03;
}

.study-section h2 {
  max-width: 780px;
  margin-bottom: 14px;
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 580;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.study-section h3 {
  margin-bottom: 8px;
  font-size: 19px;
  letter-spacing: -0.015em;
}

.lede {
  max-width: 720px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.48;
}

.plain-note {
  max-width: 780px;
  color: var(--muted);
}

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

.experiment-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.map-card,
.note-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.map-card img {
  width: 100%;
  background: #000;
}

.map-copy {
  padding: 15px 17px 17px;
}

.map-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.map-copy strong {
  display: block;
  margin-bottom: 3px;
}

.device-series {
  margin-top: 28px;
}

.format-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 8px 0 0;
}

.format-columns > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 2px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.format-columns strong {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 560;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.format-columns span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.device-series > .device:first-of-type {
  padding-top: 14px;
}

.map-copy-compact {
  padding: 12px 16px;
}

.map-copy-compact .metric-row {
  margin-top: 0;
}

.mobile-format {
  display: none;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 530;
}

.legend-wrap {
  margin: 28px 0;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.legend {
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: linear-gradient(
    90deg,
    #000 0%,
    #000060 10%,
    #0000ff 20%,
    #00ffff 30%,
    #00ff00 40%,
    #ffff00 50%,
    #ff8000 65%,
    #ff0000 80%,
    #fff 100%
  );
}

.legend-labels {
  position: relative;
  height: 28px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.legend-labels span {
  position: absolute;
  transform: translateX(-50%);
}

.legend-labels span:first-child {
  transform: none;
}

.legend-labels span:last-child {
  transform: translateX(-100%);
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.fact {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.fact strong {
  display: block;
  margin-bottom: 4px;
  color: var(--good);
  font-size: 26px;
  line-height: 1.15;
}

.fact span {
  color: var(--muted);
  font-size: 14px;
}

.device {
  padding-top: 36px;
}

.device + .device {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.device-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.device-heading h3 {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
}

.device-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 10px;
  font-size: 13px;
}

.metric {
  color: var(--text);
}

.metric b {
  color: var(--good);
  font-weight: 560;
}

.help-term {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  border-bottom: 1px dotted currentColor;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: help;
}

.help-term:focus-visible {
  border-radius: 2px;
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.help-icon {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  line-height: 1;
}

.help-popover {
  position: absolute;
  z-index: 2;
  top: calc(100% + 7px);
  right: 10px;
  width: 270px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.help-term:hover + .help-popover,
.help-term:focus-visible + .help-popover,
.help-term[aria-expanded="true"] + .help-popover {
  opacity: 1;
  transform: translateY(0);
}

.method-grid,
.limits-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.note-card {
  padding: 21px;
}

.study-link {
  display: block;
  color: var(--text);
  text-decoration: none;
}

.study-link:hover {
  border-color: var(--line-strong);
}

.study-link .arrow {
  color: var(--accent);
}

.note-card p,
.note-card li {
  color: var(--muted);
}

.note-card p:last-child {
  margin-bottom: 0;
}

.note-card ul {
  margin: 0;
  padding-left: 20px;
}

.note-card li + li {
  margin-top: 7px;
}

.info-block {
  margin-top: 28px;
}

.info-block .table-scroll {
  margin: 18px 0 12px;
}

.table-note {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 0;
}

.status {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 9px;
  border: 1px solid color-mix(in srgb, var(--good) 55%, var(--line));
  border-radius: 999px;
  color: var(--good);
  font-size: 12px;
  font-weight: 560;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.experiments-main {
  padding: 36px 0 64px;
}

.experiments-main h1 {
  margin: 0 0 10px;
  font-size: var(--h1-page);
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.experiments-main h2 {
  margin: 34px 0 14px;
  font-size: 21px;
}

.experiments-main > p {
  max-width: 76ch;
  color: var(--muted);
}

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

.exp-grid figure {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.exp-grid figure.reference {
  border-color: var(--line-strong);
}

.exp-grid img {
  width: 100%;
  background: #000;
}

.exp-grid figcaption {
  padding: 13px 15px 15px;
  color: var(--muted);
  font-size: 13px;
}

.exp-grid figcaption strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
}

/* City Bikes storybook */

.storybook-main {
  padding: 34px 0 64px;
}

.storybook-main h1 {
  margin: 0 0 8px;
  font-size: var(--h1-page);
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.storybook-main h2 {
  margin: 42px 0 10px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 21px;
  letter-spacing: -0.02em;
}

.storybook-main h3 {
  margin: 22px 0 6px;
  font-size: 16px;
}

.storybook-main > p {
  max-width: 66ch;
}

#voiceover {
  scroll-margin-top: 5.5rem;
}

.storybook-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.control-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.control-label {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--tab-track);
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 6%);
}

.segmented button {
  font: inherit;
  font-size: 13px;
  font-weight: 530;
  line-height: 1.3;
  padding: 5px 12px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: color-mix(in srgb, var(--text) 72%, var(--muted));
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}

.segmented button:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 45%, transparent);
}

.segmented button[aria-pressed="true"],
.segmented button[aria-pressed="true"]:hover {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 1px 4px rgb(0 0 0 / 16%);
}

.segmented button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hint {
  max-width: 66ch;
  margin: 14px 0 8px;
  padding: 10px 14px;
  border-left: 3px solid var(--line-strong);
  border-radius: 0 8px 8px 0;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 14px;
}

.hint kbd {
  display: inline-block;
  margin: 0 2px;
  padding: 1px 6px;
  font: 550 12px/1.3 var(--font-mono);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}

.shots {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 16px 0 12px;
}

.shot-groups {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px 44px;
  margin: 16px 0 12px;
}

.shot-group {
  display: flex;
  flex-direction: column;
}

.shot-group-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 560;
  letter-spacing: 0.01em;
}

.shot-group .shots {
  margin: 0;
}

.shots figure {
  margin: 0;
  width: 204px;
}

.shots figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.shots figcaption {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  margin-top: 6px;
}

.voiceover {
  margin: 8px 0 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  font-size: 13px;
}

.voiceover dt {
  font-size: 11px;
  font-weight: 560;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.voiceover dd {
  margin: 2px 0 0;
}

.voiceover dd + dt {
  margin-top: 7px;
}

.phrase-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

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

.phrase-table th:last-child,
.phrase-table td:last-child {
  border-right: 0;
}

.phrase-table tr:last-child th,
.phrase-table tr:last-child td {
  border-bottom: 0;
}

.phrase-table thead th {
  background: var(--surface-subtle);
  font-weight: 560;
}

.contrast-table th:not(:last-child),
.contrast-table .contrast-cell {
  width: 1%;
  white-space: nowrap;
}

.contrast-cell {
  white-space: nowrap;
}

.contrast-cell--miss {
  background: var(--miss-bg);
  box-shadow: inset 3px 0 0 var(--miss);
}

.contrast-pair {
  display: inline-grid;
  grid-template-columns: 42px 46px 14px;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.contrast-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contrast-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 22px;
  padding: 0 5px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 10%);
}

.contrast-swatch--bold {
  font-weight: 700;
}

.contrast-ratio {
  text-align: right;
}

.contrast-cell--miss .contrast-ratio {
  color: var(--miss);
  font-weight: 580;
}

.contrast-mark {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.contrast-mark--pass {
  color: var(--pass);
}

.contrast-mark--miss {
  color: var(--miss);
}

.todo {
  max-width: 66ch;
  padding-left: 20px;
  color: var(--muted);
}

.todo li + li {
  margin-top: 6px;
}

body.grayscale-filter .shots img,
body.grayscale-filter .contrast-swatch {
  filter: grayscale(1);
}

.shots img.missing-localized-shot {
  visibility: hidden;
}

@media screen and (max-width: 760px) {
  .container,
  .container-wide,
  .container-prose {
    width: min(100% - 28px, 1140px);
  }

  .format-columns {
    display: none;
  }

  .mobile-format {
    display: block;
  }

  .screens-landscape,
  .screens-portrait,
  .link-cards,
  .heatmap-grid,
  .experiment-grid,
  .experiment-grid.three,
  .exp-grid,
  .method-grid,
  .limits-grid,
  .facts {
    grid-template-columns: 1fr;
  }

  .screens-portrait .shot-card {
    max-width: 300px;
  }

  .study-section {
    padding: 40px 0;
  }

  .device-heading {
    flex-direction: column;
    gap: 4px;
  }

  .shots figure {
    width: calc(50% - 8px);
    min-width: 150px;
  }
}

@media screen and (max-width: 520px) {
  .app-header {
    column-gap: 16px;
  }

  .app-icon {
    width: 84px;
    height: 84px;
  }

  .app-tabs {
    display: flex;
    width: 100%;
  }

  .app-tabs a {
    flex: 1;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .support-button:hover,
  .link-card:hover {
    transform: none;
  }
}

@page {
  margin: 14mm;
}

@media print {
  :root {
    color-scheme: light;
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-subtle: #f5f5f5;
    --text: #111111;
    --muted: #4a4f55;
    --line: #d4d4d4;
    --line-strong: #aaaaaa;
    --accent: #0b638a;
    --good: #166e3b;
    --warning: #8a5a00;
    --pass: #1c7a45;
    --miss: #b83b22;
    --miss-bg: #fdf2ef;
    --tab-track: #efefef;
    --table-stripe: #f6f6f6;
    --shadow: none;
  }

  *,
  *::before,
  *::after {
    box-shadow: none !important;
    text-shadow: none !important;
    backdrop-filter: none !important;
  }

  body {
    min-height: auto;
    background: #ffffff;
    color: #111111;
    font-size: 13px;
    line-height: 1.5;
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
  }

  .container,
  .container-wide,
  .container-prose {
    width: 100%;
    max-width: none;
  }

  .skip-link,
  .app-tabs-bar,
  .support-button,
  .sub-header,
  .storybook-controls,
  .hint,
  .link-cards,
  .help-icon,
  .help-popover,
  .study-link .arrow,
  .print-hide {
    display: none !important;
  }

  .app-panel,
  .app-panel[hidden] {
    display: block !important;
    padding-bottom: 0;
  }

  .app-panel + .app-panel {
    margin-top: 0 !important;
    padding-top: 0;
    border-top: 0;
    break-before: page;
    page-break-before: always;
  }

  .site-top {
    padding: 0 0 10px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line);
  }

  .app-header {
    gap: 10px 16px;
    margin-bottom: 16px;
  }

  .app-icon {
    width: 64px;
    height: 64px;
    filter: none !important;
  }

  .app-header h1 {
    font-size: 30px;
  }

  .screens-landscape,
  .screens-portrait {
    gap: 12px;
    margin-bottom: 16px;
  }

  .site-footer {
    margin-top: 22px;
    padding: 12px 0 0;
  }

  .prose-main,
  .storybook-main,
  .experiments-main {
    padding: 0;
  }

  .study-main {
    padding-bottom: 0;
  }

  .study-section {
    padding: 20px 0;
  }

  .study-section.hero {
    padding-top: 0;
  }

  .study-section h1 {
    font-size: 32px;
  }

  .study-section h2 {
    font-size: 22px;
  }

  .storybook-main h2 {
    margin: 22px 0 8px;
    padding-top: 14px;
  }

  .device {
    padding-top: 16px;
  }

  .device + .device {
    margin-top: 16px;
  }

  .shot-groups,
  .shot-group {
    display: block;
  }

  .shot-group + .shot-group {
    margin-top: 14px;
  }

  .shots {
    display: block;
    font-size: 0;
    margin: 10px -5px 12px;
  }

  .shots figure {
    display: inline-block;
    vertical-align: top;
    width: 25%;
    min-width: 0;
    padding: 0 5px 14px;
    margin: 0;
    font-size: 11.5px;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .shots figcaption {
    font-size: 11px;
    line-height: 1.35;
    margin-top: 5px;
  }

  .voiceover {
    font-size: 10.5px;
    line-height: 1.35;
    padding: 6px 8px;
  }

  .heatmap-grid,
  .exp-grid {
    display: block;
    font-size: 0;
    margin: 0 -6px;
  }

  .heatmap-grid > .map-card,
  .exp-grid > figure {
    display: inline-block;
    vertical-align: top;
    width: calc(50% - 12px);
    margin: 0 6px 12px;
    font-size: 13px;
  }

  figure,
  .shot-card,
  .map-card,
  .note-card,
  .fact,
  .notes-box,
  .legend-wrap,
  .voiceover,
  .device,
  tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  h1,
  h2,
  h3,
  .shot-group-label,
  .device-heading {
    break-after: avoid;
    page-break-after: avoid;
  }

  p,
  li {
    orphans: 3;
    widows: 3;
  }

  .legend {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .table-scroll {
    overflow: visible;
    border-radius: 6px;
  }

  table.data-table,
  .phrase-table {
    font-size: 10.5px;
    white-space: normal;
  }

  table.data-table th,
  table.data-table td,
  .phrase-table th,
  .phrase-table td {
    padding: 6px 7px;
  }

  .contrast-pair {
    grid-template-columns: 36px 40px 12px;
    gap: 4px;
  }

  .contrast-swatch {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    font-size: 10.5px;
    height: 18px;
    padding: 0 4px;
  }

  .contrast-cell--miss {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    border-left: 3px solid var(--miss);
  }

  thead {
    display: table-header-group;
  }

  .help-term {
    border-bottom: 0;
  }

  a[href^="https://"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: var(--muted);
    word-break: break-all;
  }
}
