:root {
  color-scheme: light;
  font: 16px/1.6 "Segoe UI", system-ui, sans-serif;
  --bg: #d8d8d8;
  --ink: #172033;
  --muted: #535353;
  --brand-navy: #101325;
  --surface: #fff;
  --line: #d4d4d4;
  --line-strong: #bdbdbd;
  --field: #eeeeee;
  --orange: #ff853d;
  --orange-ink: #20170e;
  --accent: #d65d1f;
  --r-sm: 10px;
  --r-md: 18px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
}
.topbar, .page-wrap, .site-footer {
  width: min(1160px, calc(100% - 80px));
  margin-inline: auto;
}
.topbar, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar {
  height: 80px;
  border-bottom: 1px solid #10132580;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.045em;
}
.brand-labs { font-weight: 400; }
.brand-mark {
  display: grid;
  place-items: center;
  background: var(--brand-navy);
  border-radius: 10px;
  width: 40px;
  height: 40px;
}
.brand-mark img { object-fit: contain; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.back-link:hover { background: #e8e8e8; border-color: #a5a5a5; }
.page-wrap {
  flex: 1 0 auto;
  padding-block: clamp(28px, 5vh, 56px);
}
.doc-card {
  max-width: 780px;
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: clamp(24px, 4vw, 44px);
}
.doc-card h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -.04em;
  font-weight: 650;
}
.doc-meta {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}
.doc-card h2 {
  margin: 28px 0 8px;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -.02em;
  color: var(--brand-navy);
}
.doc-card p, .doc-card li {
  color: var(--ink);
  line-height: 1.65;
}
.doc-card p { margin: 0 0 14px; }
.doc-card ul { margin: 0 0 16px; padding-left: 20px; }
.doc-card li { margin-bottom: 6px; }
.doc-card a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.doc-card a:hover { color: var(--brand-navy); }
.callout {
  margin: 20px 0;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--field);
  border: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.notice-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
}
.notice-table th, .notice-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.notice-table th {
  font-weight: 600;
  color: var(--brand-navy);
  background: #f7f7f7;
}
.license-pre {
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
}
.doc-actions {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.doc-card .cta-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: var(--r-sm);
  background: var(--orange);
  border: 1px solid #ffb07a;
  color: var(--orange-ink);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.doc-card .cta-btn:hover { background: #ff9858; color: var(--orange-ink); text-decoration: none; }
.site-footer {
  flex-shrink: 0;
  background: var(--bg);
  border-top: 1px solid #10132580;
  padding: 18px 0 max(18px, env(safe-area-inset-bottom));
  font-size: 12px;
  color: var(--muted);
}
.engine-credit {
  order: 2;
  margin-inline-start: auto;
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
}
.engine-credit strong { color: var(--brand-navy); font-weight: 700; margin-left: 4px; }
.engine-credit::before {
  content: "";
  align-self: center;
  width: 3px;
  height: 1em;
  margin-right: 6px;
  border-radius: 2px;
  background: #ff6f00;
}
.footer-links {
  order: 1;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 14px;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
}
.footer-links a:hover, .footer-links a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
:focus-visible { outline: 2px solid var(--brand-navy); outline-offset: 3px; }
@media (max-width: 820px) {
  .topbar, .page-wrap, .site-footer { width: calc(100% - 32px); max-width: 680px; }
  .topbar { height: 60px; }
  .brand { font-size: 18px; }
  .brand-mark { width: 34px; height: 34px; }
  .site-footer { flex-wrap: wrap; gap: 6px 16px; }
}
