:root {
  color-scheme: light;
  --page: #f3f2ed;
  --surface: #e9e7df;
  --surface-strong: #dddcd4;
  --ink: #16191c;
  --muted: #5d6267;
  --quiet: #7c8185;
  --line: #c7c5bd;
  --line-strong: #9d9c96;
  --accent: #075fc8;
  --accent-hover: #004da8;
  --signal: #b65118;
  --screen: #10151f;
  --screen-line: #303745;
  --screen-text: #ecf0f6;
  --header: rgba(243, 242, 237, 0.96);
  --selection: #c6dcf7;
  --mono: "SFMono-Regular", "SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Helvetica, Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Helvetica, Arial, sans-serif;
  --max: 1240px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --page: #11151a;
    --surface: #181d23;
    --surface-strong: #222931;
    --ink: #edf0f2;
    --muted: #a6adb4;
    --quiet: #7f878f;
    --line: #30373e;
    --line-strong: #4b545d;
    --accent: #6cabf2;
    --accent-hover: #91c2f8;
    --signal: #ef8c4b;
    --screen: #090c11;
    --screen-line: #303745;
    --screen-text: #f1f4f7;
    --header: rgba(17, 21, 26, 0.96);
    --selection: #214f7c;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --page: #f3f2ed;
  --surface: #e9e7df;
  --surface-strong: #dddcd4;
  --ink: #16191c;
  --muted: #5d6267;
  --quiet: #7c8185;
  --line: #c7c5bd;
  --line-strong: #9d9c96;
  --accent: #075fc8;
  --accent-hover: #004da8;
  --signal: #b65118;
  --screen: #10151f;
  --screen-line: #303745;
  --screen-text: #ecf0f6;
  --header: rgba(243, 242, 237, 0.96);
  --selection: #c6dcf7;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #11151a;
  --surface: #181d23;
  --surface-strong: #222931;
  --ink: #edf0f2;
  --muted: #a6adb4;
  --quiet: #7f878f;
  --line: #30373e;
  --line-strong: #4b545d;
  --accent: #6cabf2;
  --accent-hover: #91c2f8;
  --signal: #ef8c4b;
  --screen: #090c11;
  --screen-line: #303745;
  --screen-text: #f1f4f7;
  --header: rgba(17, 21, 26, 0.96);
  --selection: #214f7c;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--selection);
}

[hidden] {
  display: none !important;
}

img {
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

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

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

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 650;
}

h1 {
  max-width: 15ch;
  margin-bottom: 28px;
  font-size: clamp(3rem, 6vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.058em;
}

h2 {
  max-width: 17ch;
  margin-bottom: 16px;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

code,
pre {
  font-family: var(--mono);
}

code {
  color: var(--accent);
  font-size: 0.9em;
}

.shell {
  width: min(calc(100% - 48px), var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: var(--header);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 7px;
}

.brand small {
  color: var(--quiet);
  font-size: 0.65rem;
  font-weight: 500;
}

.brand small::before {
  content: "/";
  margin-right: 10px;
  color: var(--line-strong);
}

nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 21px;
}

nav a {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-decoration: none;
}

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

.intro {
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
  border-inline: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.intro-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(70px, 9vw, 118px) clamp(28px, 6vw, 78px);
}

.eyebrow,
.kicker,
.section-number,
.document-meta {
  margin-bottom: 28px;
  color: var(--signal);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead {
  max-width: 64ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
}

.availability-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 680px;
  margin-top: 46px;
  border-block: 1px solid var(--line);
}

.release-placeholder,
.repository-link {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 17px 18px;
  text-decoration: none;
}

.release-placeholder {
  border-right: 1px solid var(--line);
}

.release-placeholder > span,
.repository-link > span {
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.release-placeholder strong,
.repository-link strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.release-placeholder {
  opacity: 0.65;
}

.repository-link:hover {
  background: var(--surface);
  color: var(--ink);
}

.system-summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--line);
  padding: clamp(40px, 5vw, 64px);
}

.summary-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.summary-heading img {
  width: 68px;
  height: 68px;
  border-radius: 13px;
}

.summary-heading p,
.summary-heading span {
  display: block;
}

.summary-heading p {
  margin: 0 0 3px;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
}

.summary-heading span {
  color: var(--signal);
  font-family: var(--mono);
  font-size: 0.65rem;
}

.system-summary dl {
  margin: 0;
}

.system-summary dl > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-block: 14px;
}

.system-summary dt,
.system-summary dd {
  font-family: var(--mono);
  font-size: 0.7rem;
}

.system-summary dt {
  color: var(--quiet);
}

.system-summary dd {
  margin: 0;
  text-align: right;
}

.summary-note {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.interface-section,
.architecture-section,
.components-section,
.security-section,
.release-section {
  border-bottom: 1px solid var(--line);
  padding-block: clamp(76px, 10vw, 124px);
}

.interface-section,
.components-section,
.release-section {
  background: var(--surface);
}

.section-header {
  display: grid;
  grid-template-columns: minmax(150px, 0.3fr) minmax(0, 1fr);
  gap: clamp(30px, 7vw, 110px);
  margin-bottom: clamp(44px, 7vw, 78px);
}

.section-header .section-number {
  margin: 9px 0 0;
}

.section-header > div > p {
  max-width: 68ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.03rem;
}

.capture-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.55fr);
  gap: 20px;
  align-items: stretch;
}

.desktop-captures {
  display: grid;
  gap: 20px;
}

.capture {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line-strong);
  background: var(--page);
}

.capture-label {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line-strong);
  padding: 8px 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.capture > img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--screen);
}

.capture figcaption {
  min-height: 49px;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--line-strong);
  padding: 11px 13px;
  color: var(--muted);
  font-size: 0.76rem;
}

.capture-mobile {
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.phone-stage {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: clamp(24px, 4vw, 48px);
  background: var(--screen);
}

.phone-stage img {
  display: block;
  width: min(100%, 320px);
  height: auto;
  border: 1px solid var(--screen-line);
  border-radius: 28px;
}

.capture-note {
  margin: 18px 0 0;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.connection-model {
  border-block: 1px solid var(--line-strong);
}

.connection-path {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(70px, 0.45fr) minmax(150px, 1fr) minmax(70px, 0.45fr) minmax(170px, 1fr);
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.connection-path:last-child {
  border-bottom: 0;
}

.connection-path > p {
  min-height: 108px;
  display: grid;
  align-content: center;
  gap: 5px;
  margin: 0;
  padding: 20px;
}

.connection-path > p span,
.connection-path > div span {
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.connection-path > p strong {
  font-size: 0.95rem;
  font-weight: 650;
}

.connection-core {
  background: var(--surface);
}

.connection-core strong {
  color: var(--accent);
}

.connection-path > div {
  display: grid;
  gap: 8px;
  padding-inline: 14px;
  text-align: center;
}

.connection-path > div i {
  position: relative;
  display: block;
  height: 1px;
  background: var(--line-strong);
}

.connection-path > div i::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 7px;
  height: 7px;
  border-top: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
  transform: rotate(45deg);
}

.component-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line-strong);
}

.component-list article {
  min-height: 290px;
  padding: clamp(24px, 4vw, 42px);
  border-right: 1px solid var(--line);
}

.component-list article:last-child {
  border-right: 0;
}

.component-list article > p:first-child {
  margin-bottom: 50px;
  color: var(--signal);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.component-list article > span {
  display: block;
  margin-bottom: 24px;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
}

.component-list article > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.fact-table {
  margin: 0;
  border-top: 1px solid var(--line-strong);
}

.fact-table > div {
  display: grid;
  grid-template-columns: minmax(190px, 0.35fr) 1fr;
  gap: 32px;
  border-bottom: 1px solid var(--line);
  padding-block: 19px;
}

.fact-table dt,
.release-layout dt,
.support-list dt {
  font-family: var(--mono);
  font-size: 0.72rem;
}

.fact-table dd,
.release-layout dd,
.support-list dd {
  margin: 0;
  color: var(--muted);
}

.release-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.75fr);
  gap: clamp(48px, 10vw, 150px);
}

.release-layout > div > p:last-child {
  max-width: 62ch;
  color: var(--muted);
}

.release-layout dl {
  margin: 0;
}

.release-layout dl > div {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: 22px;
  border-top: 1px solid var(--line);
  padding-block: 15px;
}

.release-layout dl > div:last-child {
  border-bottom: 1px solid var(--line);
}

.site-footer {
  padding-block: 42px 104px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  width: 36px;
  height: 36px;
  border-radius: 7px;
}

.footer-brand strong,
.footer-brand span {
  display: block;
}

.footer-brand strong {
  font-family: var(--mono);
  font-size: 0.78rem;
}

.footer-brand span,
.site-footer p {
  margin: 0;
  color: var(--quiet);
  font-size: 0.7rem;
}

.site-footer p {
  grid-column: 1 / -1;
}

.theme-picker {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 40;
  font-family: var(--mono);
}

.theme-trigger {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: 8px 11px;
  background: var(--page);
  color: var(--ink);
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  font-size: 0.68rem;
}

.theme-trigger:hover,
.theme-trigger[aria-expanded="true"] {
  background: var(--surface);
}

.theme-swatch,
.theme-option-swatch {
  display: block;
  width: 12px;
  height: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: linear-gradient(90deg, #f3f2ed 50%, #11151a 50%);
}

.theme-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  width: 176px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: 5px;
  background: var(--page);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.16);
}

.theme-menu button {
  width: 100%;
  min-height: 39px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 2px;
  padding: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.7rem;
  text-align: left;
}

.theme-menu button:hover,
.theme-menu button:focus-visible {
  background: var(--surface);
}

.theme-option-light {
  background: #f3f2ed;
}

.theme-option-dark {
  background: #11151a;
}

.theme-check {
  visibility: hidden;
  color: var(--accent);
}

.theme-menu button[aria-checked="true"] .theme-check {
  visibility: visible;
}

.document {
  max-width: 980px;
  border-inline: 1px solid var(--line);
  padding: 0;
}

.document-header {
  padding: clamp(62px, 9vw, 104px) clamp(24px, 6vw, 78px);
  border-bottom: 1px solid var(--line);
}

.document-header h1 {
  max-width: none;
  margin-bottom: 22px;
}

.document-header .lead {
  max-width: 55ch;
}

.document-meta {
  margin: 32px 0 0;
  color: var(--quiet);
}

.document-body {
  padding: 0 clamp(24px, 6vw, 78px) 80px;
}

.document-body section {
  padding-block: 38px;
  border-bottom: 1px solid var(--line);
}

.document-body h2 {
  max-width: none;
  font-size: clamp(1.45rem, 3vw, 2.05rem);
  letter-spacing: -0.025em;
}

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

.document-body li {
  margin-bottom: 8px;
}

.document-body strong {
  color: var(--ink);
}

pre {
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 19px;
  background: var(--screen);
  color: var(--screen-text);
  line-height: 1.75;
}

.notice {
  position: relative;
}

.notice::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 45px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
}

.support-list {
  margin: 0;
}

.support-list > div {
  display: grid;
  grid-template-columns: minmax(120px, 0.3fr) 1fr;
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-block: 17px;
}

.support-list > div:last-child {
  border-bottom: 1px solid var(--line);
}

.not-found {
  min-height: 100svh;
  display: grid;
  align-content: center;
  justify-items: start;
  max-width: 760px;
  padding-block: 80px;
}

.not-found > img {
  width: 68px;
  height: 68px;
  margin-bottom: 32px;
  border-radius: 13px;
}

.not-found h1 {
  max-width: none;
}

.not-found > p:not(.eyebrow) {
  color: var(--muted);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid currentColor;
  padding-block: 7px;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-decoration: none;
}

@media (max-width: 920px) {
  .intro {
    grid-template-columns: 1fr;
  }

  .system-summary {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .capture-layout {
    grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.7fr);
  }

  .component-list article {
    padding: 28px 22px;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(calc(100% - 28px), var(--max));
  }

  .header-inner {
    min-height: 58px;
  }

  .brand small,
  .site-header nav a:nth-child(-n + 2) {
    display: none;
  }

  nav {
    gap: 15px;
  }

  .intro-copy,
  .system-summary {
    padding: 54px 22px;
  }

  h1 {
    font-size: clamp(2.5rem, 11vw, 3rem);
  }

  .availability-actions {
    grid-template-columns: 1fr;
  }

  .release-placeholder {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .section-header {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .section-header .section-number {
    margin: 0;
  }

  .capture-layout {
    grid-template-columns: 1fr;
  }

  .capture-mobile {
    min-height: 680px;
  }

  .phone-stage img {
    width: min(72vw, 310px);
  }

  .connection-path,
  .connection-path-local {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .connection-path > p {
    min-height: 86px;
    border-bottom: 1px solid var(--line);
  }

  .connection-path > div {
    height: 54px;
    place-items: center;
  }

  .connection-path > div i {
    width: 1px;
    height: 28px;
  }

  .connection-path > div i::after {
    right: -3px;
    top: auto;
    bottom: 0;
    transform: rotate(135deg);
  }

  .component-list {
    grid-template-columns: 1fr;
  }

  .component-list article {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .component-list article:last-child {
    border-bottom: 0;
  }

  .component-list article > p:first-child {
    margin-bottom: 25px;
  }

  .fact-table > div,
  .support-list > div {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .release-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .site-footer nav {
    align-items: flex-start;
  }

  .site-footer p {
    grid-column: auto;
  }

  .document {
    width: calc(100% - 28px);
  }

  .notice::before {
    display: none;
  }
}

@media (max-width: 430px) {
  .site-header nav {
    gap: 12px;
  }

  .site-header nav a {
    font-size: 0.68rem;
  }

  .release-placeholder strong,
  .repository-link strong {
    white-space: normal;
  }

  .system-summary dl > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .system-summary dd {
    text-align: left;
  }

  .release-layout dl > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

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