:root {
  color-scheme: light;
  --ink: #1c1c1e;
  --muted: #636366;
  --line: #e3e3e8;
  --paper: #ffffff;
  --wash: #f5f5f7;
  --accent: #1c1c1e;
  --accent-dark: #1c1c1e;
  --max: 72rem;
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body { margin: 0; min-height: 100vh; }
a { color: var(--accent-dark); text-underline-offset: 0.18em; }
a:hover { color: var(--muted); }
a:focus-visible { outline: 3px solid rgba(28, 28, 30, 0.3); outline-offset: 4px; border-radius: 0.2rem; }

.site-header,
.site-footer,
.home-shell,
.document-shell {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
}

.site-header {
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-weight: 760;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-mark,
.app-icon {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  font-weight: 850;
}

.brand-mark { width: 2rem; height: 2rem; border-radius: 0.6rem; }
.contact-link { font-weight: 650; text-decoration: none; }

.home-shell { padding-block: clamp(4rem, 10vw, 8rem); }
.intro { max-width: 47rem; }
.eyebrow,
.card-label,
.document-meta {
  margin: 0 0 0.8rem;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.035em; }
h1 { margin: 0; max-width: 13ch; font-size: clamp(2.8rem, 8vw, 5.8rem); }
.lede { margin: 1.8rem 0 0; max-width: 43rem; color: var(--muted); font-size: clamp(1.1rem, 2vw, 1.35rem); }

.app-list {
  display: grid;
  gap: 1.5rem;
  margin-top: clamp(4rem, 9vw, 7rem);
}
.app-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.4rem;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: linear-gradient(135deg, var(--paper), var(--wash));
  box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, 0.06);
}

.app-icon { width: 4.25rem; height: 4.25rem; border-radius: 1.25rem; font-size: 1.8rem; }
.app-card h2 { margin: 0; font-size: 1.7rem; }
.app-card p:not(.card-label) { margin: 0.45rem 0 0; color: var(--muted); }
.card-label { margin-bottom: 0.25rem; }
.document-links { display: grid; gap: 0.55rem; }
.document-links a.primary { background: var(--ink); border-color: var(--ink); color: white; }
.document-links a {
  display: flex;
  justify-content: space-between;
  gap: 1.4rem;
  min-width: 12rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: rgba(255,255,255,0.75);
  font-weight: 700;
  text-decoration: none;
}

.document-shell {
  display: grid;
  grid-template-columns: minmax(12rem, 16rem) minmax(0, 46rem);
  gap: clamp(2rem, 7vw, 7rem);
  padding-block: clamp(3rem, 7vw, 6rem);
}

.document-nav { position: sticky; top: 2rem; align-self: start; }
.document-nav p { margin: 0 0 0.75rem; font-weight: 800; }
.document-nav a { display: block; padding-block: 0.38rem; color: var(--muted); text-decoration: none; }
.document-nav a:hover { color: var(--accent-dark); }

.document article > header {
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}
.document h1 { max-width: none; font-size: clamp(2.4rem, 6vw, 4.7rem); }
.document .summary { margin: 1.4rem 0 0; color: var(--muted); font-size: 1.18rem; }
.document h2 { margin: 3.2rem 0 1rem; font-size: 1.65rem; }
.document h3 { margin: 2rem 0 0.65rem; font-size: 1.15rem; }
.document p, .document li { color: #35313e; }
.document ul { padding-left: 1.3rem; }
.document li + li { margin-top: 0.6rem; }
.callout {
  margin-top: 2rem;
  padding: 1.2rem 1.3rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 0.8rem 0.8rem 0;
  background: var(--wash);
}
.callout p { margin: 0; color: var(--ink); }

.site-footer {
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.94rem;
}
.site-footer p { margin: 0; }

@media (max-width: 760px) {
  .app-card { grid-template-columns: auto minmax(0, 1fr); }
  .document-links { grid-column: 1 / -1; }
  .document-links a { min-width: 0; }
  .document-shell { display: block; }
  .document-nav { position: static; margin-bottom: 3rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
  .document-nav div { display: flex; flex-wrap: wrap; gap: 0.2rem 1.1rem; }
}

@media (prefers-reduced-motion: no-preference) {
  a { transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease; }
  .document-links a:hover { border-color: rgba(28, 28, 30, 0.45); background: white; }
}
