:root {
  --color-base: #dfe2ea;
  --color-sidebar: #f9fafc;
  --color-sidebar-border: rgba(15, 23, 42, 0.1);
  --color-ink: #0c0c0e;
  --color-ink-soft: #1a1a1f;
  --color-muted: #5c6370;
  --color-brand: #2563eb;
  --color-brand-dim: #1d4ed8;
  --color-gem-light: #3b82f6;
  --color-gem-bright: #60a5fa;
  --color-ai: #7c3aed;
  --color-ai-bright: #9333ea;
  --color-ai-light: #a855f7;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-logo: "Montserrat", ui-sans-serif, system-ui, sans-serif;
  --header-h: 4.5rem;
  --sidebar-w: 19.5rem;
  --floating-bottom: 1.25rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--color-base);
  color: var(--color-ink);
  font-family: var(--font-sans);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: color-mix(in srgb, var(--color-ai-light) 35%, transparent);
  color: var(--color-ink);
}

.container-wide {
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 640px) {
  .container-wide { padding-inline: 1.5rem; }
}

@media (min-width: 1024px) {
  .container-wide { padding-inline: 2rem; }
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.04);
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.site-header--scrolled {
  background: rgba(255, 255, 255, 0.88);
  border-bottom-color: rgba(226, 232, 240, 0.9);
  box-shadow:
    0 8px 32px rgba(15, 23, 42, 0.07),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.header-shine {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(37, 99, 235, 0.28) 22%,
    rgba(168, 85, 247, 0.42) 50%,
    rgba(37, 99, 235, 0.28) 78%,
    transparent 100%
  );
  opacity: 0.85;
  pointer-events: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
}

.header-start {
  display: flex;
  align-items: center;
  min-width: 0;
}

.logo-link {
  display: inline-flex;
  flex-shrink: 0;
  text-decoration: none;
  transition: transform 0.25s ease;
}

.logo-link:hover {
  transform: scale(1.02);
}

.logo-img {
  display: block;
  height: 2.75rem;
  width: auto;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.lang-switcher { position: relative; }

.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4375rem 0.75rem 0.4375rem 0.4375rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.72);
  color: #475569;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
}

.lang-trigger:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(37, 99, 235, 0.18);
  color: #1e293b;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
}

.lang-trigger[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow:
    0 0 0 3px rgba(37, 99, 235, 0.08),
    0 4px 16px rgba(37, 99, 235, 0.1);
  color: #1e293b;
}

.lang-trigger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(124, 58, 237, 0.1));
  color: var(--color-brand-dim);
}

.lang-trigger-label {
  max-width: 5.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .lang-trigger-label { max-width: none; }
}

.icon-globe, .icon-chevron {
  width: 0.9375rem;
  height: 0.9375rem;
  flex-shrink: 0;
}

.icon-chevron {
  margin-right: 0.125rem;
  color: #94a3b8;
  transition: transform 0.2s ease, color 0.2s ease;
}

.lang-trigger[aria-expanded="true"] .icon-chevron {
  transform: rotate(180deg);
  color: var(--color-brand);
}

.lang-menu {
  position: fixed;
  top: var(--lang-menu-top, auto);
  right: var(--lang-menu-right, 1rem);
  min-width: 10.5rem;
  padding: 0.3125rem;
  border-radius: 0.875rem;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 16px 40px rgba(15, 23, 42, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
  z-index: 55;
}

.lang-menu-header {
  display: none;
}

.lang-menu-options {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.lang-option-leading {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
}

.lang-option-code {
  display: none;
}

.lang-option-label {
  min-width: 0;
}

.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.5625rem 0.75rem;
  border: none;
  border-radius: 0.625rem;
  background: transparent;
  color: #475569;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.lang-option:hover {
  background: rgba(37, 99, 235, 0.06);
  color: #0f172a;
}

.lang-option--active {
  background: rgba(37, 99, 235, 0.1);
  color: var(--color-brand-dim);
  font-weight: 600;
}

.lang-check {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
  opacity: 0;
  color: var(--color-brand);
  transition: opacity 0.16s ease;
}

.lang-option--active .lang-check {
  opacity: 1;
}

.lang-backdrop {
  display: none !important;
}

@media (max-width: 639px) {
  .lang-trigger {
    padding: 0.375rem 0.625rem 0.375rem 0.375rem;
    gap: 0.4375rem;
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(226, 232, 240, 0.95);
    box-shadow:
      0 2px 10px rgba(15, 23, 42, 0.05),
      0 1px 0 rgba(255, 255, 255, 0.95) inset;
  }

  .lang-trigger-icon {
    width: 1.625rem;
    height: 1.625rem;
  }

  .lang-trigger-label {
    max-width: 4.5rem;
    font-size: 0.75rem;
  }

  .lang-menu {
    min-width: 11rem;
    max-width: calc(100vw - 1rem);
  }

  .lang-option {
    padding: 0.6875rem 0.75rem;
    font-size: 0.875rem;
  }
}

.toc-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.375rem;
  height: 2.375rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.72);
  color: #64748b;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
}

.toc-toggle svg { width: 1.125rem; height: 1.125rem; }

.toc-toggle:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(124, 58, 237, 0.18);
  color: var(--color-ai);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.08);
}

.toc-toggle[aria-expanded="true"] {
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.22);
  color: var(--color-ai);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.08);
}

@media (min-width: 1024px) {
  .toc-toggle { display: none; }
}

/* Layout */
.page-layout {
  display: flex;
  align-items: flex-start;
  padding-top: var(--header-h);
  min-height: calc(100vh - var(--header-h));
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(88vw, 22rem);
  padding: var(--header-h) 0 0;
  overflow: hidden;
  z-index: 40;
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 0 1.25rem 1.25rem 0;
  background:
    radial-gradient(ellipse 90% 40% at 0% 0%, rgba(37, 99, 235, 0.08) 0%, transparent 58%),
    radial-gradient(ellipse 70% 35% at 100% 100%, rgba(124, 58, 237, 0.06) 0%, transparent 55%),
    linear-gradient(180deg, #fcfdfe 0%, #f4f6fc 100%);
  box-shadow:
    -12px 0 48px rgba(79, 70, 229, 0.12),
    -2px 0 0 rgba(255, 255, 255, 0.8) inset;
}

.sidebar.is-open { transform: translateX(0); }

@media (min-width: 1024px) {
  .sidebar {
    position: sticky;
    top: var(--header-h);
    flex-shrink: 0;
    width: var(--sidebar-w);
    height: calc(100vh - var(--header-h));
    padding: 1rem 0.875rem;
    transform: none;
    border-radius: 0;
    background: var(--color-sidebar);
    border-right: 1px solid var(--color-sidebar-border);
    box-shadow: 1px 0 0 rgba(255, 255, 255, 0.85);
    z-index: 10;
  }
}

.toc-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

@media (max-width: 1023px) {
  .toc-panel {
    border-radius: 0 1.25rem 1.25rem 0;
  }
}

@media (min-width: 1024px) {
  .toc-panel {
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
  }
}

.toc-panel::before {
  display: none;
}

.toc-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1rem 0.75rem;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(37, 99, 235, 0.08);
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.toc-panel-title-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
}

.toc-panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(124, 58, 237, 0.1));
  border: 1px solid rgba(37, 99, 235, 0.14);
  color: var(--color-brand-dim);
}

.toc-panel-icon svg {
  width: 1.125rem;
  height: 1.125rem;
}

.toc-panel-title-wrap {
  min-width: 0;
  padding-top: 0.125rem;
}

.toc-heading {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-ink);
  line-height: 1.3;
}

.toc-subheading {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: var(--color-muted);
  line-height: 1.4;
}

.toc-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border: 1.5px solid rgba(124, 58, 237, 0.18);
  border-radius: 50%;
  background: #fff;
  color: #6366f1;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.toc-close svg {
  width: 1rem;
  height: 1rem;
}

.toc-close:hover {
  background: #f5f3ff;
  border-color: rgba(124, 58, 237, 0.35);
  color: #7c3aed;
}

@media (min-width: 1024px) {
  .toc-close { display: none; }
}

.toc-progress {
  height: 3px;
  margin: 0.625rem 1rem 0.625rem;
  border-radius: 9999px;
  background: rgba(37, 99, 235, 0.08);
  overflow: hidden;
  flex-shrink: 0;
}

.toc-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-brand), var(--color-ai));
  transition: width 0.15s ease-out;
}

.toc-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 0.75rem calc(1rem + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.toc-nav::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3125rem;
}

.toc-item + .toc-item--group-start {
  margin-top: 0.625rem;
  padding-top: 0.625rem;
  border-top: none;
  position: relative;
}

.toc-item + .toc-item--group-start::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0.75rem;
  right: 0.75rem;
  height: 1px;
  background: rgba(92, 99, 112, 0.1);
}

.toc-item a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem 0.5rem 0.5rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  color: var(--color-muted);
  font-size: 0.8125rem;
  line-height: 1.45;
  text-decoration: none;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease;
}

.toc-item a::before {
  display: none;
}

.toc-item a:hover {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  color: var(--color-ink-soft);
}

.toc-item a.is-active {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(219, 228, 255, 0.9) 52%,
    rgba(237, 228, 255, 0.86) 100%
  );
  border-color: rgba(147, 168, 255, 0.38);
  color: var(--color-brand-dim);
  box-shadow:
    0 4px 16px rgba(37, 99, 235, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.toc-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.625rem;
  height: 1.625rem;
  min-width: 1.625rem;
  flex-shrink: 0;
  padding: 0;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #64748b;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.toc-item--preface .toc-num {
  font-size: 0.75rem;
  color: var(--color-ai);
  background: rgba(124, 58, 237, 0.06);
  border-color: rgba(124, 58, 237, 0.12);
}

.toc-item a:hover .toc-num {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(37, 99, 235, 0.14);
  color: var(--color-brand);
}

.toc-item a.is-active .toc-num {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(124, 58, 237, 0.08));
  border-color: rgba(37, 99, 235, 0.2);
  color: var(--color-brand-dim);
}

.toc-item--preface a.is-active .toc-num {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(168, 85, 247, 0.08));
  border-color: rgba(124, 58, 237, 0.2);
  color: var(--color-ai);
}

.toc-label {
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}

.toc-item a.is-active .toc-label {
  font-weight: 600;
}

@media (min-width: 1024px) {
  .toc-panel-header {
    padding: 0.625rem 0.625rem 0.75rem;
    border-bottom: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .toc-panel-icon {
    border-radius: 9999px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.07), rgba(124, 58, 237, 0.05));
    border-color: rgba(37, 99, 235, 0.1);
  }

  .toc-progress {
    margin: 0 0.625rem 0.75rem;
    height: 3px;
  }

  .toc-nav {
    padding: 0 0.5rem 0.625rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
  }

  .toc-nav::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .toc-list {
    gap: 0.3125rem;
  }

  .toc-item + .toc-item--group-start {
    margin-top: 0.625rem;
    padding-top: 0.625rem;
    border-top: none;
    position: relative;
  }

  .toc-item + .toc-item--group-start::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0.75rem;
    right: 0.75rem;
    height: 1px;
    background: rgba(92, 99, 112, 0.1);
  }

  .toc-item a {
    align-items: center;
    padding: 0.4375rem 0.75rem 0.4375rem 0.4375rem;
    border-radius: 9999px;
    border: 1px solid transparent;
    transition:
      background 0.18s ease,
      border-color 0.18s ease,
      box-shadow 0.18s ease,
      color 0.18s ease;
  }

  .toc-item a::before {
    display: none;
  }

  .toc-item a:hover {
    background: rgba(255, 255, 255, 0.45);
    border-color: rgba(255, 255, 255, 0.65);
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.03);
    color: var(--color-ink-soft);
  }

  .toc-item a.is-active {
    background: rgba(255, 255, 255, 0.62);
    border-color: rgba(37, 99, 235, 0.12);
    color: var(--color-brand-dim);
    box-shadow:
      0 0 0 2px rgba(37, 99, 235, 0.04),
      0 2px 10px rgba(37, 99, 235, 0.05);
  }

  .toc-num {
    width: 1.625rem;
    height: 1.625rem;
    min-width: 1.625rem;
    padding: 0;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.14);
    font-size: 0.625rem;
    color: #64748b;
  }

  .toc-item--preface .toc-num {
    font-size: 0.75rem;
    color: var(--color-ai);
    background: rgba(124, 58, 237, 0.05);
    border-color: rgba(124, 58, 237, 0.1);
  }

  .toc-item a:hover .toc-num {
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(37, 99, 235, 0.12);
    color: var(--color-brand);
  }

  .toc-item a.is-active .toc-num {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(124, 58, 237, 0.06));
    border-color: rgba(37, 99, 235, 0.16);
    color: var(--color-brand-dim);
  }

  .toc-item--preface a.is-active .toc-num {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(168, 85, 247, 0.06));
    border-color: rgba(124, 58, 237, 0.16);
    color: var(--color-ai);
  }
}

.toc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

@media (min-width: 1024px) {
  .toc-backdrop { display: none !important; }
}

.main-content {
  flex: 1;
  min-width: 0;
  min-height: calc(100vh - var(--header-h));
  background:
    radial-gradient(ellipse 75% 48% at 50% -8%, rgba(37, 99, 235, 0.14) 0%, transparent 62%),
    radial-gradient(ellipse 55% 38% at 100% 12%, rgba(124, 58, 237, 0.11) 0%, transparent 58%),
    radial-gradient(ellipse 45% 40% at 0% 85%, rgba(59, 130, 246, 0.08) 0%, transparent 55%),
    linear-gradient(180deg, #eaeaf7 0%, #e3e7f4 45%, #dce3f2 100%);
}

@media (min-width: 1024px) {
  .main-content {
    border-left: none;
    box-shadow: none;
  }
}

/* Hero */
.manual-hero {
  position: relative;
  overflow: hidden;
  padding: 3rem 1rem 2rem;
}

@media (min-width: 640px) {
  .manual-hero { padding: 4rem 1.5rem 2.25rem; }
}

@media (min-width: 1024px) {
  .manual-hero { padding: 5rem 2rem 2.5rem; }
}

.hero-aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}

.aurora-blob-1 {
  width: 55vw;
  height: 55vw;
  max-width: 600px;
  max-height: 600px;
  top: -20%;
  left: -10%;
  background: radial-gradient(circle, #2563eb 0%, transparent 70%);
}

.aurora-blob-2 {
  width: 45vw;
  height: 45vw;
  max-width: 500px;
  max-height: 500px;
  top: 10%;
  right: -5%;
  background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
}

.aurora-blob-3 {
  width: 35vw;
  height: 35vw;
  max-width: 400px;
  max-height: 400px;
  bottom: -10%;
  left: 30%;
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
}

.hero-content {
  position: relative;
  max-width: 48rem;
  margin-inline: auto;
}

.section-label {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: var(--color-brand-dim);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.08);
}

.hero-title {
  margin: 1rem 0 0;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--color-ink);
}

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-top: 1.25rem;
}

.meta-chip {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.875rem;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(219, 228, 255, 0.95) 52%,
    rgba(237, 228, 255, 0.92) 100%
  );
  border: 1px solid rgba(147, 168, 255, 0.35);
  box-shadow:
    0 6px 20px rgba(37, 99, 235, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.meta-chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 0.625rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(124, 58, 237, 0.1));
  border: 1px solid rgba(37, 99, 235, 0.14);
  color: var(--color-brand-dim);
}

.meta-chip-icon svg {
  width: 1.125rem;
  height: 1.125rem;
}

.meta-chip-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  min-width: 0;
  flex: 1;
}

.meta-chip-label {
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--color-muted);
  white-space: nowrap;
}

.meta-chip-value {
  display: block;
  width: 100%;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-ink);
  word-break: break-word;
}

@media (min-width: 640px) {
  .hero-meta {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .meta-chip {
    flex-direction: row;
    align-items: center;
    gap: 0.375rem;
    width: auto;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: none;
  }

  .meta-chip-icon {
    display: none;
  }

  .meta-chip-body {
    flex-direction: row;
    align-items: center;
    gap: 0.375rem;
    flex: none;
  }

  .meta-chip-label::after {
    content: ":";
  }

  .meta-chip-value {
    width: auto;
    font-size: 0.8125rem;
    line-height: 1.3;
  }
}

/* Manual body */
.manual-body {
  position: relative;
  z-index: 2;
  max-width: 48rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}

@media (min-width: 640px) {
  .manual-body {
    padding-top: 2rem;
    padding-inline: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .manual-body {
    padding-top: 2.5rem;
    padding-inline: 2rem;
  }
}

@media (max-width: 768px) {
  .manual-body {
    padding-bottom: 2rem;
  }

  .site-footer {
    padding: 1.75rem 0;
  }

  :root {
    --floating-bottom: 4rem;
  }
}

.manual-section {
  scroll-margin-top: calc(var(--header-h) + 1rem);
  margin-bottom: 1.25rem;
  padding: 1.5rem 1.25rem;
  border-radius: 1rem;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(248, 250, 255, 0.96) 100%
  );
  border: 1px solid rgba(147, 168, 255, 0.28);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
}

@media (min-width: 640px) {
  .manual-section {
    margin-bottom: 1.5rem;
    padding: 1.75rem;
    border-radius: 1.125rem;
  }
}

.manual-section--preface {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(219, 228, 255, 0.96) 48%,
    rgba(237, 228, 255, 0.94) 100%
  );
  border-color: rgba(147, 168, 255, 0.42);
  box-shadow:
    0 10px 32px rgba(37, 99, 235, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.section-title {
  margin: 0 0 1rem;
  padding-bottom: 0.875rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--color-ink);
  border-bottom: 1px solid rgba(37, 99, 235, 0.1);
}

@media (min-width: 640px) {
  .section-title {
    font-size: 1.4375rem;
    padding-bottom: 1rem;
  }
}

.section-content p {
  margin: 0 0 1rem;
  color: color-mix(in srgb, var(--color-ink) 85%, transparent);
  font-size: 0.9375rem;
  line-height: 1.75;
}

.section-content p:last-child { margin-bottom: 0; }

.section-content ul,
.section-content ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: color-mix(in srgb, var(--color-ink) 85%, transparent);
  font-size: 0.9375rem;
  line-height: 1.75;
}

.section-content li { margin-bottom: 0.375rem; }

.section-content li:last-child { margin-bottom: 0; }

.section-content strong {
  color: var(--color-ink);
  font-weight: 600;
}

.highlight-box {
  margin: 1rem 0;
  padding: 1rem 1.125rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(124, 58, 237, 0.06) 100%);
  border-left: 3px solid var(--color-brand);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-ink-soft);
}

.callout-negative {
  margin: 1rem 0;
  padding: 1rem 1.125rem;
  border-radius: 0.75rem;
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.callout-negative ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.callout-negative li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  color: color-mix(in srgb, var(--color-ink) 85%, transparent);
}

.callout-negative li::before {
  content: "✕";
  position: absolute;
  left: 0;
  color: #ef4444;
  font-weight: 700;
}

.data-table-wrap {
  margin: 1rem 0;
  overflow-x: auto;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.5);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th,
.data-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.data-table th {
  background: rgba(37, 99, 235, 0.06);
  color: var(--color-brand-dim);
  font-weight: 600;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.data-table tr:last-child td { border-bottom: none; }

.data-table td { color: color-mix(in srgb, var(--color-ink) 85%, transparent); }

.rating-badge {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.125rem;
  min-width: 3.25rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.rating-badge__letter {
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
}

.rating-badge__suffix {
  font-size: 0.6875rem;
  font-weight: 600;
  opacity: 0.88;
}

.rating-badge--a {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(37, 99, 235, 0.08));
  border-color: rgba(37, 99, 235, 0.22);
  color: var(--color-brand-dim);
}

.rating-badge--b {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.13), rgba(124, 58, 237, 0.07));
  border-color: rgba(124, 58, 237, 0.2);
  color: var(--color-ai);
}

.rating-badge--c {
  background: linear-gradient(135deg, rgba(92, 99, 112, 0.12), rgba(92, 99, 112, 0.06));
  border-color: rgba(92, 99, 112, 0.18);
  color: var(--color-muted);
}

.rating-badge--d {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0.06));
  border-color: rgba(239, 68, 68, 0.2);
  color: #dc2626;
}

.rating-table {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(147, 168, 255, 0.32);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.06);
}

.rating-table .data-table td {
  vertical-align: middle;
}

.rating-table .data-table th:first-child,
.rating-table .data-table td.rating-cell {
  width: 5.5rem;
  text-align: center;
}

.rating-table .data-table th:first-child {
  padding-inline: 0.75rem;
}

.rating-table .data-table td.rating-cell {
  padding-inline: 0.75rem;
}

.rating-table .data-table tbody tr {
  transition: background 0.18s ease;
}

.rating-table .data-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.025);
}

.rating-table .data-table td:not(.rating-cell) {
  line-height: 1.65;
}

.faq-table .data-table td {
  vertical-align: middle;
}

.faq-table .data-table td:first-child {
  font-weight: 600;
  color: var(--color-brand-dim);
  white-space: nowrap;
}

@media (max-width: 639px) {
  .data-table-wrap {
    overflow: visible;
    background: transparent;
    border: none;
  }

  .data-table {
    display: block;
    width: 100%;
  }

  .data-table thead {
    display: none;
  }

  .data-table tbody {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
  }

  .data-table tr {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 0.875rem 1rem;
    border-radius: 0.875rem;
    background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(219, 228, 255, 0.95) 52%,
      rgba(237, 228, 255, 0.92) 100%
    );
    border: 1px solid rgba(147, 168, 255, 0.35);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.12);
  }

  .data-table td {
    display: block;
    padding: 0;
    border: none;
    white-space: normal;
  }

  .faq-table .data-table td:first-child {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--color-brand-dim);
  }

  .faq-table .data-table td:last-child {
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--color-ink-soft);
  }

  .rating-table .data-table td.rating-cell {
    width: auto;
    text-align: left;
    padding-bottom: 0.5rem;
    border-top: none;
  }

  .rating-table .data-table td:not(.rating-cell) {
    padding-top: 0.375rem;
    border-top: 1px solid rgba(37, 99, 235, 0.1);
  }

  .data-table-wrap:not(.faq-table):not(.rating-table) .data-table td:first-child {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-brand-dim);
    line-height: 1.4;
  }

  .data-table-wrap:not(.faq-table) .data-table td:not(:first-child) {
    padding-top: 0.375rem;
    border-top: 1px solid rgba(37, 99, 235, 0.1);
    font-size: 0.875rem;
    line-height: 1.6;
  }
}

/* Footer */
.site-footer {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 0;
  background:
    radial-gradient(ellipse 55% 40% at 8% 92%, rgba(37, 99, 235, 0.12) 0%, transparent 58%),
    radial-gradient(ellipse 45% 50% at 92% 28%, rgba(124, 58, 237, 0.14) 0%, transparent 62%),
    linear-gradient(180deg, #0c0c14 0%, #080810 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.35) 25%, rgba(168, 85, 247, 0.5) 50%, rgba(37, 99, 235, 0.35) 75%, transparent);
  opacity: 0.7;
}

.footer-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-logo {
  height: 2rem;
  width: auto;
}

.footer-copy {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.42);
}

.footer-icp-link {
  margin-left: 0.375rem;
  color: rgba(255, 255, 255, 0.42);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-icp-link:hover {
  color: rgba(255, 255, 255, 0.72);
}

/* Back to top */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: var(--floating-bottom);
  z-index: 45;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--color-gem-light), var(--color-ai));
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35);
  transition: transform 0.2s, opacity 0.2s;
}

.back-to-top svg { width: 1.25rem; height: 1.25rem; }

.back-to-top:hover { transform: translateY(-2px); }

.back-to-top[hidden] { display: none; }
