:root {
  --navy: #0c1b3a;
  --indigo: #2a3ea8;
  --paper: #f4f6fb;
  --ink: #142033;
  --muted: #52627c;
  --line: #d7deeb;
  --sans: "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", monospace;
  color-scheme: light;
}

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

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
}

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

main {
  flex: 1;
}

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

a {
  color: inherit;
}

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

.skip {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 50;
  transform: translateY(-200%);
  border-radius: 0.5rem;
  background: white;
  padding: 0.5rem 0.75rem;
  color: var(--navy);
  text-decoration: none;
}

.skip:focus {
  transform: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(72rem, calc(100% - 2.5rem));
  margin-inline: auto;
}

@media (min-width: 640px) {
  .wrap {
    width: min(72rem, calc(100% - 3rem));
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block: 0.75rem;
}

.logo {
  min-width: 0;
  border-radius: 0.125rem;
  line-height: 0;
}

.logo img {
  height: 2rem;
  width: auto;
  max-width: min(100%, 16rem);
}

@media (min-width: 640px) {
  .logo img {
    height: 2.75rem;
    max-width: none;
  }
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: block;
  border-radius: 0.375rem;
  padding: 0.5rem 0.25rem;
  color: var(--navy);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: var(--indigo);
}

.nav-desktop {
  display: none;
}

.nav-toggle {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.menu-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 2.5rem;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0 0.75rem;
  background: white;
  color: var(--navy);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.when-open {
  display: none;
}

.menu-button:has(.nav-toggle:checked) .when-closed {
  display: none;
}

.menu-button:has(.nav-toggle:checked) .when-open {
  display: inline;
}

.menu-button:has(.nav-toggle:focus-visible) {
  outline: 2px solid var(--indigo);
  outline-offset: 2px;
}

.nav-mobile {
  display: none;
  width: 100%;
}

.nav-mobile .nav-list {
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
  padding-block: 0.5rem;
}

.header-inner:has(.nav-toggle:checked) .nav-mobile {
  display: block;
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: block;
  }

  .menu-button,
  .nav-mobile {
    display: none !important;
  }
}

.banner {
  background: var(--navy);
  color: white;
}

.banner p {
  padding-block: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.banner a {
  font-weight: 600;
  color: white;
  text-underline-offset: 4px;
  text-decoration-color: rgba(255, 255, 255, 0.5);
}

.banner a:hover {
  text-decoration-color: white;
}

.site-footer {
  margin-top: auto;
  background: var(--navy);
  color: white;
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
  padding-block: 3rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.site-footer h2 {
  font-size: 0.875rem;
  font-weight: 600;
}

.site-footer p,
.site-footer a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  line-height: 1.5;
  text-decoration: none;
}

.site-footer a:hover {
  color: white;
}

.site-footer .blurb {
  max-width: 20rem;
  margin-top: 0.75rem;
}

.footer-links {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.footer-links li + li {
  margin-top: 0.5rem;
}

.hero,
.page-hero {
  border-bottom: 1px solid var(--line);
  background: white;
}

.hero-home {
  display: grid;
  align-items: center;
  gap: 2.5rem;
  padding-block: 3.5rem;
}

@media (min-width: 1024px) {
  .hero-home {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    padding-block: 5rem;
  }
}

.eyebrow {
  color: var(--indigo);
  font-size: 0.875rem;
  font-weight: 600;
}

h1 {
  margin-top: 0.75rem;
  max-width: 48rem;
  color: var(--navy);
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

@media (min-width: 640px) {
  h1 {
    font-size: 3rem;
  }
}

.lede,
.muted-lg {
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 2rem;
}

.lede {
  margin-top: 1.25rem;
}

.lede + .lede,
.stack > * + * {
  margin-top: 1rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.btn-primary {
  background: var(--indigo);
  color: white;
}

.btn-primary:hover {
  background: var(--navy);
}

.btn-secondary {
  border-color: var(--line);
  background: white;
  color: var(--navy);
}

.btn-secondary:hover {
  border-color: var(--indigo);
}

.frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(12, 27, 58, 0.06);
}

.frame img {
  display: block;
  width: 100%;
  height: auto;
}

.section {
  padding-block: 4rem;
}

.section h2,
.block-title {
  color: var(--navy);
  font-size: 1.875rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.narrow {
  max-width: 48rem;
}

.text-link {
  color: var(--indigo);
  font-weight: 600;
  text-underline-offset: 4px;
  text-decoration-color: rgba(42, 62, 168, 0.3);
}

.text-link:hover {
  text-decoration-color: var(--indigo);
}

.card-grid,
.feature-grid,
.download-grid,
.support-grid {
  display: grid;
  gap: 1rem;
}

.card-grid,
.support-grid {
  margin: 0;
  padding: 0;
  list-style: none;
}

.card-grid {
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .card-grid,
  .support-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (min-width: 768px) {
  .download-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.card,
.panel,
article.feature,
.download-card,
.support-card {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: white;
}

.card {
  display: flex;
  height: 100%;
  flex-direction: column;
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgba(12, 27, 58, 0.06);
  text-decoration: none;
}

.card:hover,
.shot button:hover {
  border-color: var(--indigo);
}

.card h3,
.feature h3,
.download-card h2,
.support-card h2 {
  color: var(--navy);
  font-size: 1.125rem;
  font-weight: 600;
}

.card p,
.support-card p {
  margin-top: 0.5rem;
  flex: 1;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.card span {
  margin-top: 1rem;
  color: var(--indigo);
  font-size: 0.875rem;
  font-weight: 600;
}

.band {
  border-block: 1px solid var(--line);
  background: white;
}

.split,
.version-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .version-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: start;
  }
}

.video {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--navy);
}

.video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.panel {
  border-radius: 1rem;
  padding: 1.5rem;
}

.panel h2 {
  font-size: 1.125rem;
  letter-spacing: 0;
}

.panel > p {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.platform-list {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
}

@media (min-width: 640px) {
  .platform-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.platform-list li {
  border-radius: 0.5rem;
  background: var(--paper);
  padding: 0.5rem 0.75rem;
}

.page-hero .wrap {
  padding-block: 3rem;
}

@media (min-width: 640px) {
  .page-hero .wrap {
    padding-block: 4rem;
  }
}

.page-hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.page-hero-row > div {
  min-width: 0;
}

.box-art {
  width: 7rem;
  height: auto;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .box-art {
    width: 10rem;
  }
}

.page-body {
  padding-block: 3.5rem;
}

.download-card,
.support-card {
  display: flex;
  height: 100%;
  flex-direction: column;
  padding: 1.5rem;
}

.download-card .meta,
.support-card .meta {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.download-card p,
.feature p {
  margin-top: 1rem;
  font-size: 1rem;
  line-height: 1.75;
}

.feature p,
.answer p,
.tip p {
  margin-top: 0;
}

.download-card .btn,
.page-body > .btn {
  margin-top: 1.5rem;
  align-self: flex-start;
}

.notes {
  max-width: 48rem;
  margin-top: 2rem;
  padding-left: 1.25rem;
  font-size: 1rem;
  line-height: 1.75;
}

.notes li + li,
.toc li + li,
.plain-list li + li {
  margin-top: 0.5rem;
}

.table-wrap {
  margin-top: 1.5rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: white;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

caption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

th,
td {
  padding: 0.75rem 1rem;
  vertical-align: top;
}

thead {
  background: var(--paper);
  color: var(--navy);
}

tbody tr {
  border-top: 1px solid var(--line);
}

.edition {
  min-width: 36rem;
}

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

.pinout {
  min-width: 28rem;
}

.note {
  max-width: 48rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.feature-group {
  margin-top: 4rem;
  scroll-margin-top: 6rem;
}

.feature-group > .lead {
  max-width: 48rem;
  margin-top: 0.75rem;
}

.feature-grid {
  margin-top: 1.5rem;
}

.feature {
  padding: 1.25rem;
  scroll-margin-top: 6rem;
}

.feature h3 {
  font-size: 1.125rem;
}

.feature .stack p,
.feature li {
  font-size: 0.875rem;
  line-height: 1.5;
}

.feature ul,
.answer ul,
.tip ul {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
}

.feature li + li,
.answer li + li,
.tip li + li {
  margin-top: 0.25rem;
}

.toc {
  max-width: 48rem;
  margin: 0;
  padding-left: 1.25rem;
}

.answer,
.tip {
  max-width: 48rem;
  margin-top: 3.5rem;
  scroll-margin-top: 6rem;
  border-top: 1px solid var(--line);
  padding-top: 2.5rem;
}

.answer h2,
.tip h2 {
  color: var(--navy);
  font-size: 1.5rem;
  font-weight: 600;
}

.answer .stack,
.tip .stack {
  margin-top: 1rem;
  font-size: 1rem;
  line-height: 1.75;
}

.answer h3,
.tip h3 {
  color: var(--navy);
  font-size: 1.125rem;
  font-weight: 600;
}

.article-img {
  display: block;
  margin-top: 1rem;
  height: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: white;
}

code,
.mono {
  font-family: var(--mono);
  font-size: 0.875em;
}

pre.code {
  margin: 1rem 0 0;
  overflow-x: auto;
  border-radius: 0.75rem;
  background: var(--navy);
  padding: 1rem;
  color: white;
  font-size: 0.875rem;
  line-height: 1.5;
}

pre.code code {
  font-size: inherit;
}

.steps {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
}

.steps > li + li {
  margin-top: 1.5rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  padding: 0.375rem 0.75rem;
  color: var(--navy);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.filter:hover,
.filter[aria-pressed="true"] {
  border-color: transparent;
}

.filter[aria-pressed="true"] {
  background: var(--indigo);
  color: white;
}

.shot-count {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.shot-grid {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .shot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .shot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.shot button {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: white;
  padding: 0;
  box-shadow: 0 1px 2px rgba(12, 27, 58, 0.06);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.shot-frame {
  display: flex;
  aspect-ratio: 4 / 3;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  padding: 0.75rem;
}

.shot-frame img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.shot-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
}

.shot-cat {
  color: var(--indigo);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.shot-title {
  color: var(--navy);
  font-weight: 600;
}

.shot-caption {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(12, 27, 58, 0.8);
  padding: 1rem;
}

@media (min-width: 640px) {
  .lightbox {
    align-items: center;
  }
}

.lightbox[hidden] {
  display: none;
}

.dialog {
  width: min(64rem, 100%);
  max-height: 100%;
  overflow: auto;
  border-radius: 0.75rem;
  background: white;
  padding: 1rem;
  box-shadow: 0 20px 40px rgba(12, 27, 58, 0.25);
}

@media (min-width: 640px) {
  .dialog {
    padding: 1.5rem;
  }
}

.dialog-head,
.dialog-nav {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.dialog h2 {
  margin-top: 0.25rem;
  color: var(--navy);
  font-size: 1.25rem;
  font-weight: 600;
}

.dialog-frame {
  display: flex;
  min-height: 12rem;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  border-radius: 0.5rem;
  background: var(--paper);
  padding: 0.75rem;
}

.dialog-frame img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
}

.dialog > p {
  margin-top: 1rem;
  line-height: 1.75;
}

.dialog-nav {
  align-items: center;
  margin-top: 1rem;
}

.dialog-nav p {
  color: var(--muted);
  font-size: 0.875rem;
}

.ghost {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: white;
  padding: 0.375rem 0.75rem;
  color: var(--navy);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.ghost:hover:enabled {
  border-color: var(--indigo);
}

.ghost:disabled {
  color: var(--muted);
  cursor: default;
}

.support-card .text-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.875rem;
}
