:root {
  color-scheme: light dark;
  --color-bg: #f6f7fb;
  --color-surface: #ffffff;
  --color-text: #121417;
  --color-muted: #5c6570;
  --color-border: #d9dee6;
  --color-accent: #2f80ed;
  --color-accent-dark: #1b4fa0;
  --color-info: #0b7285;
  --color-warning: #ad5f00;
  --color-tip: #0c8d50;
  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.08);
  font-size: 16px;
  font-family: "Segoe UI", "Hiragino Sans", "Yu Gothic UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

html[data-i18n-state="loading"] body {
  opacity: 0;
  pointer-events: none;
}

html[data-i18n-state="loaded"] body {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.18s ease-in;
}

.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

.app-header {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 1.125rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #2f80ed, #7f7ff0);
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.header-tools select {
  min-width: 150px;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 0.95rem;
  background: #fff;
}

.last-updated {
  font-size: 0.85rem;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.toc {
  padding: 2rem 1.5rem;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  position: sticky;
  top: 5.5rem;
  height: calc(100vh - 5.5rem);
  overflow-y: auto;
}

.toc h2 {
  margin-top: 0;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.toc li {
  margin-bottom: 0.7rem;
}

.toc a {
  display: block;
  padding: 0.35rem 0;
  border-radius: 4px;
  color: var(--color-muted);
}

.toc a:hover,
.toc a:focus {
  color: var(--color-accent);
  background: rgba(47, 128, 237, 0.08);
}

main {
  padding: 2.5rem 3rem 4rem;
}

.hero {
  background: linear-gradient(135deg, rgba(47, 128, 237, 0.12), rgba(127, 127, 240, 0.12));
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.5rem;
}

.hero-eyebrow {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  margin: 0 0 0.75rem;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: 2.2rem;
}

.hero-lead {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.hero-description {
  max-width: 720px;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.6rem;
  border-radius: 30px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 6px 12px rgba(47, 128, 237, 0.25);
}

.btn.secondary {
  background: #fff;
  border: 1px solid var(--color-border);
  color: var(--color-accent);
}

.btn:hover {
  transform: translateY(-1px);
}

.content-section {
  margin-bottom: 3rem;
}

.content-section header h2 {
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
}

.section-lead {
  margin: 0 0 1.8rem;
  font-size: 1.05rem;
  color: var(--color-muted);
  max-width: 780px;
}

.overview-grid,
.columns,
.installation-grid {
  display: grid;
  gap: 1.5rem;
}

.overview-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.columns {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.installation-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card,
.detail article,
.columns article,
.content-section article {
  background: var(--color-surface);
  border-radius: 16px;
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(217, 222, 230, 0.6);
}

.card h3,
.detail h3,
.columns h3 {
  margin-top: 0;
}

.card ul,
.detail ul,
.columns ul,
.bullet-list,
.workflow-steps {
  margin: 1rem 0 0;
  padding-left: 1.4rem;
}

.card li,
.detail li,
.columns li,
.bullet-list li,
.workflow-steps li {
  margin-bottom: 0.6rem;
  line-height: 1.6;
}

.subsection {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.subsection h4 {
  margin: 0 0 0.6rem;
}

.timeline {
  position: relative;
  margin-top: 2rem;
  padding-left: 1.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(47, 128, 237, 0.6), rgba(26, 86, 219, 0.1));
}

.timeline-item {
  position: relative;
  margin-bottom: 1.8rem;
  padding-left: 2rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -0.3rem;
  top: 0.4rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(47, 128, 237, 0.2);
}

.callout {
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.callout.info {
  background: rgba(11, 114, 133, 0.1);
  border: 1px solid rgba(11, 114, 133, 0.35);
  color: #0b4856;
}

.callout.warning {
  background: rgba(173, 95, 0, 0.12);
  border: 1px solid rgba(173, 95, 0, 0.4);
  color: #5c3a00;
}

.callout.tip {
  background: rgba(12, 141, 80, 0.12);
  border: 1px solid rgba(12, 141, 80, 0.3);
  color: #075c34;
}

.faq-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.faq-list article {
  background: var(--color-surface);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.glossary {
  margin: 0;
}

.glossary dt {
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.glossary dd {
  margin: 0 0 1rem;
  color: var(--color-muted);
}

.page-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.back-to-top {
  font-weight: 600;
}

@media (max-width: 1080px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    display: none;
  }

  main {
    padding: 2rem 1.5rem 3rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0f172a;
    --color-surface: #111c32;
    --color-text: #f1f5f9;
    --color-muted: #94a3b8;
    --color-border: rgba(148, 163, 184, 0.3);
    --shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.45);
  }

  .btn.secondary {
    background: transparent;
    border-color: rgba(148, 163, 184, 0.4);
    color: #e2e8f0;
  }

  .header-tools select {
    background: rgba(15, 23, 42, 0.6);
    color: var(--color-text);
  }

  .toc {
    background: var(--color-surface);
  }
}

