:root {
  color-scheme: light dark;
  --surface: #faf9fd;
  --ink: #1b1e24;
  --muted: #4b5260;
  --primary: #1a73e8;
  --on-primary: #ffffff;
  --tonal: #d7e5fc;
  --on-tonal: #06214d;
  --panel: #eef2f8;
  --line: #cfd6e1;
  --outline: #747d8c;
  --shot-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  font: 100%/1.55 var(--font-sans);
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #111318;
    --ink: #e4e7ee;
    --muted: #a6b0bf;
    --primary: #8ab4f8;
    --on-primary: #062e6f;
    --tonal: #183459;
    --on-tonal: #d7e5fc;
    --panel: #1b1f28;
    --line: #323946;
    --outline: #8590a2;
    --shot-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
  }
}

* {
  box-sizing: border-box;
}

body, figure, h1, h2, h3, p, ul, dl, dd {
  margin: 0;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.page__width {
  width: min(1100px, calc(100% - 48px));
  margin-inline: auto;
}

/* Header */
.app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
}

.app-bar__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.app-bar__brand img {
  border-radius: 8px;
}

.app-bar__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-bar__nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.app-bar__link {
  padding: 8px 12px;
  text-decoration: none;
  border-radius: 999px;
  font-size: 0.94rem;
}

.app-bar__link:hover {
  background: var(--panel);
}

.menu {
  display: none;
}

section {
  scroll-margin-top: 20px;
}

/* Hero */
.overview {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.95fr);
  align-items: center;
  gap: clamp(24px, 4vw, 52px);
  padding: clamp(28px, 4.2vw, 54px);
  background: var(--tonal);
  color: var(--on-tonal);
  border-radius: 28px;
}

.overview__title {
  font-size: clamp(1.85rem, 3.2vw, 2.65rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.overview__text {
  max-width: 44ch;
  margin-top: 14px;
  font-size: 1.05rem;
  opacity: 0.9;
}

.overview__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
}

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

.button_filled:hover {
  filter: brightness(0.93);
}

.button_outlined {
  border-color: var(--outline);
}

.button_outlined:hover {
  background: color-mix(in srgb, currentColor 8%, transparent);
}

/* Screenshots */
.capture {
  width: 100%;
  max-width: 440px;
  justify-self: end;
}

.capture__trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: 18px;
}

.capture__trigger:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

.capture__frame {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shot-shadow);
}

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

.capture__caption {
  margin-top: 10px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
}

/* Native Lightbox Dialog */
.lightbox {
  padding: 16px;
  border: 0;
  background: transparent;
  max-width: min(94vw, 960px);
  max-height: 94vh;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(8, 10, 15, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.lightbox__panel {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox__close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: var(--shot-shadow);
}

.lightbox__close:hover {
  background: var(--panel);
}

.lightbox__caption {
  max-width: 56ch;
  text-align: center;
  font-size: 0.9rem;
  color: #e4e7ee;
}

/* Features + Compatibility */
.guide {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(28px, 4.5vw, 64px);
  padding: 40px 4px;
  align-items: start;
}

.features__title,
.hardware__title,
.installation__title,
.recordings__title,
.editor__title {
  font-size: clamp(1.35rem, 2.1vw, 1.7rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.features__list {
  list-style: none;
  padding: 0;
  margin-top: 12px;
}

.features__item {
  display: flex;
  align-items: start;
  gap: 16px;
  padding: 14px 0;
}

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

.features__icon {
  flex: 0 0 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--tonal);
  display: grid;
  place-items: center;
}

@media (prefers-color-scheme: dark) {
  .features__icon img {
    filter: invert(1);
  }
}

.features__name {
  font-size: 1.03rem;
  font-weight: 600;
}

.features__text,
.hardware__note,
.hardware__requirements,
.hardware__row dd {
  color: var(--muted);
}

.features__text {
  margin-top: 3px;
  font-size: 0.95rem;
}

.hardware {
  background: var(--panel);
  padding: clamp(20px, 2.5vw, 32px);
  border-radius: 24px;
}

.hardware__requirements {
  margin: 12px 0 18px;
  padding-inline-start: 1.25em;
  font-size: 0.95rem;
}

.hardware__row {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.hardware__row dt {
  font-weight: 500;
}

.hardware__row dd,
.hardware__note {
  font-size: 0.92rem;
}

.hardware__note {
  margin-top: 12px;
}

/* Recordings & Editor */
.recordings,
.editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5.5vw, 76px);
  padding: clamp(32px, 4.5vw, 56px) 4px;
  border-top: 1px solid var(--line);
}

.recordings__intro p,
.editor__copy p {
  margin-top: 12px;
  color: var(--muted);
  max-width: 48ch;
}

.formats {
  margin-top: 22px;
}

.formats__title {
  font-size: 1.02rem;
  font-weight: 600;
}

.formats__list {
  margin-top: 8px;
}

.formats__row {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 10px 0;
  font-size: 0.94rem;
}

.formats__row dt {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--on-tonal);
}

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

/* First Launch / Installation */
.installation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 4vw, 56px);
  background: var(--panel);
  border-radius: 24px;
  padding: clamp(22px, 3.4vw, 40px);
  margin-top: 8px;
}

.installation__col {
  min-width: 0;
}

.installation p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

.installation__label {
  font-size: 1.02rem;
  font-weight: 600;
  margin-top: 16px;
}

.installation__col > .installation__label:first-child {
  margin-top: 0;
}

.abi {
  margin-top: 10px;
}

.abi__summary {
  width: fit-content;
  padding: 4px 0;
  font-size: 0.93rem;
  color: var(--on-tonal);
  cursor: pointer;
}

.abi__command {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}

/* Footer */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
  padding: 20px 4px 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer__links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer__link {
  text-decoration: none;
}

.footer__link:hover {
  text-decoration: underline;
}

@media (max-width: 860px) {
  .overview {
    grid-template-columns: minmax(0, 1.1fr) minmax(200px, 0.9fr);
    gap: 24px;
    padding: 28px;
  }
}

@media (max-width: 760px) {
  .page__width {
    width: calc(100% - 28px);
  }

  .app-bar {
    padding-block: 12px;
    gap: 10px;
  }

  .app-bar__brand {
    font-size: 1.08rem;
    gap: 8px;
  }

  .app-bar__brand img {
    width: 30px;
    height: 30px;
  }

  .app-bar__right {
    gap: 6px;
  }

  .app-bar__nav {
    display: none;
  }

  .menu {
    display: block;
    position: relative;
  }

  .menu__toggle {
    list-style: none;
    cursor: pointer;
    min-height: 36px;
    padding: 7px 13px;
    border-radius: 999px;
    background: var(--panel);
    font-size: 0.88rem;
    font-weight: 500;
  }

  .menu__toggle::-webkit-details-marker {
    display: none;
  }

  .menu__links {
    position: absolute;
    z-index: 10;
    right: 0;
    top: calc(100% + 6px);
    width: 205px;
    padding: 6px;
    border-radius: 16px;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shot-shadow);
  }

  .menu__links a {
    display: block;
    padding: 10px 12px;
    text-decoration: none;
    border-radius: 12px;
    font-size: 0.94rem;
  }

  .menu__links a:hover {
    background: var(--tonal);
  }

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

  .recordings,
  .editor,
  .installation {
    gap: 24px;
  }

  .capture__frame,
  .capture__trigger {
    border-radius: 14px;
  }
}

@media (max-width: 680px) {
  .overview {
    grid-template-columns: minmax(0, 1fr);
    padding: 24px 20px;
    gap: 20px;
  }

  .overview .capture {
    max-width: 320px;
    justify-self: center;
  }
}

@media (max-width: 650px) {
  .recordings,
  .editor,
  .installation {
    grid-template-columns: minmax(0, 1fr);
  }

  .recordings,
  .editor {
    gap: 20px;
    padding: 28px 0;
  }

  .installation {
    gap: 16px;
    padding: 20px 18px;
    border-radius: 20px;
  }

  .recordings .capture,
  .editor .capture {
    max-width: 320px;
    justify-self: center;
  }

  .recordings .capture__caption,
  .editor .capture__caption {
    text-align: center;
  }
}

@media (max-width: 520px) {
  .overview {
    padding: 22px 16px;
    gap: 20px;
    border-radius: 20px;
  }

  .overview__title {
    font-size: 1.65rem;
  }

  .overview__text {
    font-size: 0.96rem;
    margin-top: 10px;
  }

  .overview__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    margin-top: 18px;
  }

  .overview__actions .button {
    width: 100%;
    padding: 9px 12px;
    font-size: 0.9rem;
  }

  .features__item {
    gap: 12px;
    padding: 12px 0;
  }

  .features__icon {
    flex: 0 0 34px;
    height: 34px;
  }

  .features__icon img {
    width: 18px;
    height: 18px;
  }

  .hardware {
    padding: 20px 18px;
    border-radius: 20px;
  }

  .footer {
    margin-top: 28px;
    padding: 18px 0 24px;
    font-size: 0.85rem;
  }
}

@media (max-width: 360px) {
  .overview__actions {
    grid-template-columns: minmax(0, 1fr);
  }
}
