:root {
  color-scheme: light dark;

  --accent: #5b5fef;
  --bg: #fff;
  --ink: #12303f;
  --ink-muted: rgba(18, 48, 63, 0.72);
  --ink-faint: rgba(18, 48, 63, 0.45);
  --card: rgba(255, 255, 255, 0.62);
  --rim: rgba(255, 255, 255, 0.75);
  --hairline: rgba(18, 48, 63, 0.13);
  --shadow: 0 8px 32px rgba(27, 27, 58, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121416;
    --ink: #e9f3f9;
    --ink-muted: rgba(233, 243, 249, 0.72);
    --ink-faint: rgba(233, 243, 249, 0.45);
    --card: rgba(255, 255, 255, 0.06);
    --rim: rgba(255, 255, 255, 0.14);
    --hairline: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  }
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

.wrap.wide {
  max-width: 960px;
}

main {
  flex: 1;
  padding: 24px 0 64px;
}

/* header and footer */

.site-header {
  padding: 20px 0 8px;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-button {
  padding: 6px 16px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.header-button:hover {
  text-decoration: none;
  border-color: var(--accent);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.site-footer {
  padding: 24px 0 40px;
  border-top: 1px solid var(--hairline);
  color: var(--ink-muted);
  font-size: 14px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-bottom: 10px;
}

.site-footer p {
  margin: 0;
  color: var(--ink-faint);
}

/* card */

.card {
  background: var(--card);
  border: 1px solid var(--rim);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

/* documents */

.doc-head h1 {
  margin: 16px 0 6px;
  font-size: clamp(30px, 6vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.updated {
  margin: 0;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intro {
  margin: 18px 0 28px;
  font-size: 18px;
}

.doc {
  padding: 8px 24px 20px;
}

.doc.numbered {
  counter-reset: section;
}

.doc.numbered h2::before {
  counter-increment: section;
  content: counter(section) '. ';
}

.doc h2 {
  margin: 28px 0 8px;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.doc h2:first-child {
  margin-top: 16px;
}

.doc p,
.doc li {
  color: var(--ink-muted);
}

.doc p {
  margin: 0 0 12px;
}

.doc ul {
  margin: 0 0 12px;
  padding-left: 22px;
}

.doc li {
  margin-bottom: 4px;
}

.doc li::marker {
  color: var(--ink-faint);
}

.doc a {
  color: var(--ink);
}

.address {
  white-space: pre-line;
}

/* app landing */

.hero {
  padding: 24px 0 40px;
}

.hero h1 {
  margin: 20px 0 24px;
  font-size: clamp(44px, 10vw, 68px);
  line-height: 1;
  letter-spacing: -0.035em;
}

@media (min-width: 760px) {
  .hero {
    padding: 48px 0 64px;
  }
}

/* home */

.app-list {
  display: grid;
  gap: 14px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.app-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
}

.app-link:hover {
  text-decoration: none;
}

.app-link img {
  width: 56px;
  height: 56px;
  border-radius: 13px;
}

.app-link strong {
  font-size: 18px;
}
