:root {
  color-scheme: light;
  --background: #f6f8fb;
  --surface: #ffffff;
  --surface-strong: #eef4ff;
  --text: #172033;
  --muted: #667085;
  --line: #d8e0ee;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --danger: #dc2626;
  --docs: #7c3aed;
  --shadow: 0 18px 42px rgba(23, 32, 51, 0.12);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
}

.page {
  width: calc(100% - clamp(24px, 5vw, 72px));
  max-width: none;
  margin: 0 auto;
  padding: 40px 0 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
}

.brand {
  font-size: 1rem;
  font-weight: 900;
}

.home-link {
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}

.doc-icon {
  width: 2.15rem;
  height: 2.15rem;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 10px;
  background: #eff6ff;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.doc-icon::before {
  content: "";
  width: 1.15rem;
  height: 1.15rem;
  background: currentColor;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.icon-chat::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3Cpath d='M8 9h8'/%3E%3Cpath d='M8 13h6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3Cpath d='M8 9h8'/%3E%3Cpath d='M8 13h6'/%3E%3C/svg%3E");
}

.icon-image::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='3' rx='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-3.1-3.1a2 2 0 0 0-2.8 0L6 21'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='3' rx='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-3.1-3.1a2 2 0 0 0-2.8 0L6 21'/%3E%3C/svg%3E");
}

.icon-code::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m16 18 6-6-6-6'/%3E%3Cpath d='m8 6-6 6 6 6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m16 18 6-6-6-6'/%3E%3Cpath d='m8 6-6 6 6 6'/%3E%3C/svg%3E");
}

.icon-settings::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.38a2 2 0 0 0-.73-2.73l-.15-.09a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.38a2 2 0 0 0-.73-2.73l-.15-.09a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}

.icon-book::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 7v14'/%3E%3Cpath d='M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 7v14'/%3E%3Cpath d='M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z'/%3E%3C/svg%3E");
}

.icon-license::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z'/%3E%3Cpath d='m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z'/%3E%3Cpath d='M7 21h10'/%3E%3Cpath d='M12 3v18'/%3E%3Cpath d='M3 7h2c2 0 5-1 7-4 2 3 5 4 7 4h2'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z'/%3E%3Cpath d='m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z'/%3E%3Cpath d='M7 21h10'/%3E%3Cpath d='M12 3v18'/%3E%3Cpath d='M3 7h2c2 0 5-1 7-4 2 3 5 4 7 4h2'/%3E%3C/svg%3E");
}

.icon-logs::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3Cpath d='M10 9H8'/%3E%3Cpath d='M16 13H8'/%3E%3Cpath d='M16 17H8'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3Cpath d='M10 9H8'/%3E%3Cpath d='M16 13H8'/%3E%3Cpath d='M16 17H8'/%3E%3C/svg%3E");
}

.icon-download::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3Cpath d='M12 15V3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3Cpath d='M12 15V3'/%3E%3C/svg%3E");
}

.icon-send::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m22 2-7 20-4-9-9-4Z'/%3E%3Cpath d='M22 2 11 13'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m22 2-7 20-4-9-9-4Z'/%3E%3Cpath d='M22 2 11 13'/%3E%3C/svg%3E");
}

.icon-trash::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3Cpath d='M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3Cpath d='M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6'/%3E%3C/svg%3E");
}

.icon-key::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15.5 7.5 3 3L22 7l-3-3Z'/%3E%3Cpath d='m2 22 10.5-10.5'/%3E%3Cpath d='m7 17 3 3'/%3E%3Cpath d='m10 14 3 3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15.5 7.5 3 3L22 7l-3-3Z'/%3E%3Cpath d='m2 22 10.5-10.5'/%3E%3Cpath d='m7 17 3 3'/%3E%3Cpath d='m10 14 3 3'/%3E%3C/svg%3E");
}

.icon-globe::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20'/%3E%3Cpath d='M2 12h20'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20'/%3E%3Cpath d='M2 12h20'/%3E%3C/svg%3E");
}

.icon-save::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z'/%3E%3Cpath d='M17 21v-7H7v7'/%3E%3Cpath d='M7 3v5h8'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z'/%3E%3Cpath d='M17 21v-7H7v7'/%3E%3Cpath d='M7 3v5h8'/%3E%3C/svg%3E");
}

.icon-heart::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19.5 12.6 12 20l-7.5-7.4a5 5 0 0 1 7.1-7.1l.4.4.4-.4a5 5 0 1 1 7.1 7.1Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19.5 12.6 12 20l-7.5-7.4a5 5 0 0 1 7.1-7.1l.4.4.4-.4a5 5 0 1 1 7.1 7.1Z'/%3E%3C/svg%3E");
}

.hero h1.title-with-icon {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero h1 .doc-icon {
  width: 3.25rem;
  height: 3.25rem;
  flex: 0 0 auto;
}

.hero h1.title-with-icon span:last-child {
  min-width: 0;
}

.button-card--icon .doc-icon {
  float: left;
  margin: 2px 12px 8px 0;
}

.button-card.button-card--icon::before {
  content: "";
  width: 1.25rem;
  height: 1.25rem;
  float: left;
  margin: 4px 12px 10px 0;
  background: var(--primary);
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.hero {
  margin-bottom: 32px;
}

.hero h1 {
  max-width: 780px;
  margin: 0 0 12px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.language-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.language-hero {
  width: min(760px, 100%);
  padding: 48px 24px;
  text-align: center;
}

.app-logo {
  width: 132px;
  height: 132px;
  object-fit: contain;
  margin-bottom: 24px;
}

.language-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(3rem, 8vw, 5rem);
  line-height: 1;
}

.language-hero p {
  margin: 0 auto 32px;
  max-width: 520px;
  color: var(--muted);
  font-size: 1.08rem;
}

.language-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.language-button {
  min-height: 68px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 900;
  overflow-wrap: anywhere;
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.language-button:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 24px 48px rgba(23, 32, 51, 0.16);
}

.external-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.external-link {
  min-height: 46px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.external-link:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.38);
  background: #ffffff;
}

.external-link .doc-icon {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 8px;
  flex: 0 0 auto;
}

.external-link .doc-icon::before {
  width: 0.95rem;
  height: 0.95rem;
}

.os-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.os-button {
  min-height: 150px;
  padding: 22px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.os-button:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 24px 48px rgba(23, 32, 51, 0.16);
}

.os-button strong {
  font-size: 1.55rem;
}

.os-button span {
  color: var(--muted);
  font-weight: 700;
}

.content {
  display: grid;
  gap: 18px;
}

.book-cover {
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.08), transparent 18%),
    var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.book-cover__intro {
  padding: 28px;
  border-bottom: 1px solid var(--line);
}

.book-cover__intro p {
  max-width: 760px;
}

.book-toc {
  display: grid;
  gap: 0;
}

.book-toc a {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 18px;
}

.book-toc a:last-child {
  border-bottom: 0;
}

.book-toc a:hover {
  background: var(--surface-strong);
}

.book-toc__number {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.book-toc__number .doc-icon {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 8px;
  flex: 0 0 auto;
}

.book-toc__number .doc-icon::before {
  width: 0.95rem;
  height: 0.95rem;
}

.book-toc strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.book-toc span:last-child {
  color: var(--muted);
  font-weight: 700;
}

.chapter-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 22px;
  align-items: start;
}

.chapter-sidebar {
  position: sticky;
  top: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(23, 32, 51, 0.08);
}

.chapter-sidebar strong {
  display: block;
  margin-bottom: 10px;
}

.chapter-sidebar a {
  display: block;
  padding: 8px 0;
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}

.chapter-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.chapter-nav a {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  font-weight: 900;
  text-decoration: none;
}

.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(23, 32, 51, 0.08);
}

.panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
}

.panel summary::-webkit-details-marker {
  display: none;
}

.panel summary::after {
  content: "+";
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--primary);
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1;
}

.panel[open] summary {
  margin-bottom: 14px;
}

.panel[open] summary::after {
  content: "-";
}

.panel h2 {
  margin: 0;
  font-size: 1.4rem;
}

.panel h3 {
  margin: 22px 0 8px;
  font-size: 1.05rem;
}

.panel p,
.panel ol,
.panel ul {
  margin-top: 0;
}

.panel li + li {
  margin-top: 8px;
}

.command {
  display: block;
  width: 100%;
  margin: 10px 0 16px;
  padding: 14px;
  border-radius: 10px;
  overflow-x: auto;
  background: #101828;
  color: #e6edf7;
  font: 0.9rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.button-list {
  display: grid;
  gap: 12px;
}

.button-card {
  padding: 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.button-card strong {
  display: block;
  margin-bottom: 4px;
}

.path-examples {
  margin: 14px 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
}

.path-examples strong {
  display: block;
  margin-bottom: 10px;
}

.path-examples ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.path-examples li {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.path-examples span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.path-examples code {
  min-width: 0;
  padding: 3px 6px;
  border-radius: 6px;
  background: #ffffff;
  overflow-wrap: anywhere;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.model-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 0.92rem;
}

.model-table th,
.model-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.model-table th {
  background: var(--surface-strong);
  color: var(--text);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.model-table tbody tr:last-child td {
  border-bottom: 0;
}

.model-table code {
  white-space: nowrap;
}

.resource-badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.resource-low {
  background: #0f766e;
}

.resource-light {
  background: #16a34a;
}

.resource-standard {
  background: #2563eb;
}

.resource-comfort {
  background: #7c3aed;
}

.resource-heavy {
  background: #ca8a04;
}

.resource-gamer {
  background: #dc2626;
}

.tag {
  display: inline-flex;
  margin-right: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
}

.tag-start {
  background: var(--success);
}

.tag-stop {
  background: var(--danger);
}

.tag-access {
  background: var(--primary);
}

.tag-docs {
  background: var(--docs);
}

.note {
  padding: 14px;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 700;
}

.sources {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .book-toc a {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .chapter-layout {
    grid-template-columns: 1fr;
  }

  .chapter-sidebar {
    position: static;
    order: -1;
  }

  .os-grid {
    grid-template-columns: 1fr;
  }

  .language-actions {
    grid-template-columns: 1fr;
  }

  .external-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .external-link {
    justify-content: center;
  }

  .panel {
    padding: 18px;
  }

  .path-examples li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
