:root {
  color-scheme: light;
  --bg: #f7f7f4;
  --surface: #ffffff;
  --text: #1c1c1a;
  --muted: #6a6a64;
  --line: #deded8;
  --link: #2d2d2a;
  --max: 760px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}

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

a:hover { text-decoration-thickness: 2px; }

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

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

.reference {
  min-height: 100vh;
  padding: clamp(58px, 9vw, 104px) 0 56px;
}

.reference header {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 34px;
}

h1 {
  margin: 0;
  max-width: 700px;
  font-size: clamp(1.7rem, 4vw, 2.25rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
  font-weight: 600;
}

.reference p {
  margin: 0 0 1.22em;
}

.reference p:last-child { margin-bottom: 0; }

.site-footer {
  margin-top: 52px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.landing {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 0;
}

.landing-card {
  width: min(calc(100% - 40px), 540px);
  padding: clamp(34px, 7vw, 54px);
  background: var(--surface);
  border: 1px solid var(--line);
}

.landing h1 {
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  letter-spacing: -0.015em;
}

.landing p {
  color: var(--muted);
  margin: 14px 0 26px;
}

.landing a {
  display: inline-block;
  color: var(--text);
}

.error-page p { color: var(--muted); }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .shell { width: min(calc(100% - 30px), var(--max)); }
  .reference { padding-top: 46px; }
  .landing-card { width: min(calc(100% - 30px), 540px); padding: 30px; }
}

@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .reference { padding: 0; }
  .shell { width: 100%; max-width: none; }
  .site-footer { color: #555; }
}
