:root {
  color-scheme: light dark;
  --primary: #087a68;
  --primary-strong: #075447;
  --primary-soft: #d9f4ed;
  --accent: #b84b55;
  --background: #f7f7f8;
  --surface: #ffffff;
  --surface-raised: #f0f1f3;
  --text: #1b1b1f;
  --muted: #66686f;
  --border: #dddfe3;
  --code: #eceef0;
  --shadow: 0 18px 60px rgb(24 55 49 / 9%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.72;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}
a { color: var(--primary); text-underline-offset: 3px; }

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--background) 94%, transparent);
  backdrop-filter: blur(16px);
}
.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-weight: 760;
  text-decoration: none;
}
.brand img { flex: 0 0 auto; border-radius: 8px; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
nav { display: flex; align-items: center; gap: 18px; }
nav a { color: var(--muted); font-size: 14px; font-weight: 650; text-decoration: none; }
nav a:hover, nav a[aria-current="page"] { color: var(--primary); }
.language-link { padding-left: 18px; border-left: 1px solid var(--border); }

.document {
  width: min(920px, calc(100% - 40px));
  margin: 44px auto 80px;
  padding: 48px 56px 64px;
  border: 1px solid color-mix(in srgb, var(--border) 74%, transparent);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.document > h1:first-child { margin-top: 0; font-size: 2.45rem; }
h1, h2, h3, h4 { line-height: 1.3; letter-spacing: 0; scroll-margin-top: 86px; }
h2 { margin-top: 2.55em; padding-bottom: .42em; border-bottom: 1px solid var(--border); font-size: 1.55rem; }
h3 { margin-top: 2em; font-size: 1.22rem; }
h4 { margin-top: 1.7em; color: var(--primary-strong); }
p, li, td { overflow-wrap: anywhere; }
li + li { margin-top: .34em; }
blockquote { margin-left: 0; padding: .55em 1em; border-left: 4px solid var(--primary); background: var(--primary-soft); }
code { padding: .15em .38em; border-radius: 5px; background: var(--code); font-size: .9em; }
pre { overflow-x: auto; padding: 18px; border-radius: 8px; background: #171b1a; color: #eef8f5; }
pre code { padding: 0; background: transparent; color: inherit; }
table { display: block; overflow-x: auto; width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
th { background: var(--surface-raised); }
hr { margin: 3em 0; border: 0; border-top: 1px solid var(--border); }

.landing { width: min(1040px, calc(100% - 40px)); margin: 70px auto 88px; }
.product-intro { display: grid; grid-template-columns: 116px minmax(0, 1fr); align-items: center; gap: 30px; }
.app-icon { width: 116px; height: 116px; border-radius: 24px; box-shadow: 0 16px 40px rgb(8 82 69 / 20%); }
.eyebrow { margin: 0 0 6px; color: var(--primary); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.landing h1 { margin: 0; font-size: 3rem; line-height: 1.15; }
.lead { max-width: 690px; margin: 12px 0 0; color: var(--muted); font-size: 1.1rem; }
.document-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
.document-card {
  position: relative;
  display: grid;
  min-height: 220px;
  grid-template-rows: auto auto 1fr;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--muted);
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.document-card:hover { transform: translateY(-2px); border-color: var(--primary); box-shadow: var(--shadow); }
.document-card strong { color: var(--text); font-size: 1.16rem; }
.document-card b { position: absolute; right: 22px; bottom: 19px; color: var(--primary); font-size: 22px; }
.card-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 18px;
  font-weight: 800;
}
.document-card:nth-child(2) .card-icon { background: #f8e8ea; color: var(--accent); }
.local-note { margin: 34px 0 0; padding: 18px 20px; border-left: 4px solid var(--primary); background: var(--primary-soft); color: var(--primary-strong); }

.not-found { width: min(700px, calc(100% - 40px)); min-height: calc(100vh - 170px); margin: 0 auto; padding: 100px 0; text-align: center; }
.error-code { margin: 0; color: var(--primary); font-size: 5rem; font-weight: 850; line-height: 1; }
.not-found h1 { margin: 16px 0 8px; }
.not-found p { color: var(--muted); }
.home-link { display: inline-block; margin-top: 18px; font-weight: 700; }

footer { display: flex; justify-content: center; gap: 18px; padding: 28px 20px 40px; color: var(--muted); font-size: 14px; }

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #65dbc3;
    --primary-strong: #9cebd9;
    --primary-soft: #173a33;
    --accent: #ffb2b8;
    --background: #101114;
    --surface: #191a1e;
    --surface-raised: #222328;
    --text: #f2f2f4;
    --muted: #aaabb2;
    --border: #383a40;
    --code: #292b30;
    --shadow: none;
  }
}

@media (max-width: 760px) {
  .site-header { min-height: 58px; padding: 0 15px; }
  .brand span { max-width: 150px; }
  nav { gap: 11px; }
  nav a { font-size: 12px; }
  .language-link { padding-left: 11px; }
  .document { width: 100%; margin: 0; padding: 32px 20px 58px; border: 0; border-radius: 0; box-shadow: none; }
  .document > h1:first-child { font-size: 2rem; }
  .landing { margin: 46px auto 64px; }
  .product-intro { grid-template-columns: 76px minmax(0, 1fr); gap: 18px; }
  .app-icon { width: 76px; height: 76px; border-radius: 17px; }
  .landing h1 { font-size: 2rem; }
  .document-grid { grid-template-columns: 1fr; margin-top: 34px; }
  .document-card { min-height: 170px; }
}

@media (max-width: 500px) {
  .brand span { display: none; }
  .site-header { gap: 10px; }
  nav { flex: 1; justify-content: flex-end; }
  .landing { width: min(100% - 28px, 1040px); }
  .product-intro { align-items: start; }
  footer { flex-direction: column; align-items: center; gap: 5px; }
}
