:root {
  color-scheme: light dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  --background: #fff;
  --text: #171717;
  --muted: #595959;
  --border: #d9d9d9;
  --hover: #f5f5f5;
  --accent: #006b53;
  --focus: #005fcc;
  --radius: 8px;
  --content-width: 544px;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); }
a { color: inherit; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
p, li { font-size: 1rem; }
p { margin: 0 0 20px; }
h1 { font-size: 2rem; line-height: 1.15; margin: 0; letter-spacing: -.025em; }
h2 { font-size: 1.15rem; line-height: 1.35; margin: 32px 0 8px; }

.page {
  width: min(calc(100% - 48px), var(--content-width));
  min-height: 100svh;
  margin: 0 auto;
  padding: 48px 0 44px;
  display: flex;
  flex-direction: column;
}
body:not(.expiry):not(.ink) .page { --content-width: 528px; padding-top: 72px; }
.document .page { padding-top: 24px; }
.document .back-link { margin-bottom: 8px; }
.document .updated { margin-bottom: 8px; }
.back-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  margin: 0 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 1rem;
}
.back-link:hover, .navigation-card:hover { background: var(--hover); }
.icon { width: 18px; height: 18px; flex: 0 0 18px; }
.subtitle { margin: 12px 0 28px; color: var(--muted); }
.product-label { margin: 0 0 4px; color: var(--muted); font-size: .875rem; }
.updated { color: var(--muted); margin: 8px 0 20px; }
.navigation-cards { display: grid; gap: 12px; }
.navigation-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
}
.project-title { display: block; font-weight: 600; }
.project-subtitle { display: block; color: var(--muted); margin-top: 2px; }
.document-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.document-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
}
.document-nav a[aria-current="page"] {
  border-bottom-color: var(--accent);
  color: var(--text);
  font-weight: 600;
}
.document-body { overflow-wrap: anywhere; }
.document-body a { color: var(--accent); }
.document-body > :last-child { margin-bottom: 0; }
.site-footer {
  margin-top: auto;
  padding-top: 48px;
  color: var(--muted);
  font-size: .875rem;
}
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.skip-link { position: absolute; top: 12px; left: 12px; padding: 10px 14px; background: var(--background); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.ink { --accent: var(--text); }

@media (max-width: 480px) {
  .page { width: calc(100% - 40px); padding-top: 32px; padding-bottom: 24px; }
  body:not(.expiry):not(.ink) .page { padding-top: 32px; }
  .document .page { padding-top: 24px; }
  .document-nav { gap: 0 16px; }
  .site-footer { padding-top: 32px; }
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #161616;
    --text: #f4f4f4;
    --muted: #b8b8b8;
    --border: #505050;
    --hover: #232323;
    --accent: #6edcc0;
    --focus: #91bfff;
  }
  .icon { filter: invert(1); }
}
