:root {
  --bg: #f2f4f7;
  --page: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --highlight: rgba(145, 206, 255, 0.383);
  --panel-bg: #0f172a;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, #ffffff 0, #eef1f6 55%);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text);
}

/* keep 2-column layout even on smaller width */
.layout {
  display: grid;
  grid-template-columns: minmax(620px, 1fr) 320px;
  gap: 1.1rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 2.5rem;
  min-width: 960px;
}
@media (max-width: 980px) {
  body {
    overflow-x: auto;
  }
  .layout {
    width: 980px;
  }
}

/* left column (article) */
.page {
  background: var(--page);
  border-radius: 1rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 1.6rem 1.9rem 2.5rem;
}

.page-header h1 {
  font-size: clamp(1.65rem, 3vw, 2.1rem);
  margin-bottom: 0.35rem;
}
.page-header .meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 1.3rem;
}

.article-body p {
  line-height: 1.65;
  margin-bottom: 1rem;
  font-size: 0.97rem;
}
.article-body h2 {
  margin-top: 1.7rem;
  margin-bottom: 0.4rem;
  font-size: 1.08rem;
}
.footnote {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 1.6rem;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  padding-top: 0.7rem;
}

/* practical sections (repo, install, links) */
.practical {
  margin-top: 1.6rem;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding-top: 1rem;
}
.compact-list {
  margin: 0.35rem 0 1rem 1.1rem;
  padding: 0;
  line-height: 1.5;
}
.link-list {
  list-style: disc;
  margin: 0.45rem 0 0 1.1rem;
  padding: 0;
}
.link-list a {
  color: #0f4ccf;
  text-decoration: none;
}
.link-list a:hover {
  text-decoration: underline;
}

/* highlight targets */
.hl-target {
  transition: background 0.2s ease;
  border-radius: 0.3rem;
  padding: 0.05rem 0.25rem;
}
.is-highlighted {
  background: var(--highlight);
  box-shadow: 0 0 0 1px rgba(145, 206, 255, 0.35);
}

/* right column (side panel) */
.sidepanel {
  background: var(--panel-bg);
  border-radius: 1rem;
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.4);
  display: flex;
  flex-direction: column;
  height: fit-content;
  position: sticky;
  top: 1.2rem;
  max-height: calc(100vh - 2.5rem);
}
.sidepanel-header {
  padding: 0.8rem 0.8rem 0.35rem;
}
.sidepanel-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e2e8f0;
}
.sidepanel-sub {
  font-size: 0.68rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}
.summary-list {
  padding: 0.4rem 0.6rem 0.5rem;
  overflow-y: auto;
}
.summary-item {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.15);
  border-radius: 0.6rem;
  padding: 0.45rem 0.5rem 0.45rem 0.55rem;
  margin-bottom: 0.42rem;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  cursor: pointer;
  text-align: left;
  transition:
    background 0.15s,
    border 0.15s;
}
.summary-item:hover {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.6);
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #38bdf8;
  margin-top: 0.35rem;
  flex: 0 0 auto;
}
.summary-text {
  font-size: 0.75rem;
  line-height: 1.3;
  color: #dbeafe;
}
.panel-hint {
  font-size: 0.65rem;
  color: #94a3b8;
  padding: 0.3rem 0.7rem 0.8rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.welcome-block {
  background: #edf4ff;
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 0.8rem;
  padding: 1rem 1.1rem 0.9rem;
  margin-bottom: 1rem;
}
.welcome-block h1 {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
}
.welcome-text {
  margin: 0;
  color: #4b5563;
  font-size: 0.9rem;
}
.page-title {
  margin-top: 0.4rem;
}
