:root{
  --bg: #ffffff;
  --panel: #f2f8fc;
  --panel-border: #dbe7f0;
  --ink: #0f2438;
  --accent: #1d5a8a;
  --accent-deep: #143d5c;
  --accent-soft: #dcedf9;
  --text: #1c2733;
  --text-muted: #62727e;
  --rule: #e2e9ee;
  --content-width: 700px;
}

*{ box-sizing: border-box; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Source Sans 3", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a{ color: var(--accent); text-underline-offset: 2px; }
a:hover{ color: var(--accent-deep); }

/* Top bar */
.topbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 40px;
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfe 100%);
}
.topbar .brand{
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar .brand svg{ flex-shrink: 0; }
.topbar .mark{
  font-family: "Source Serif 4", serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--ink);
}
.topbar .mark span{ color: var(--accent); }
.topbar .tagline{
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 1px;
}
.topbar .updated{
  font-size: 0.82rem;
  color: var(--text-muted);
}
.topbar .updated strong{
  color: var(--text);
  font-weight: 600;
}

/* Layout */
.layout{
  display: grid;
  grid-template-columns: 240px 1fr;
  max-width: 1100px;
  margin: 0 auto;
}

/* Sidebar */
.sidebar{
  border-right: 1px solid var(--rule);
  padding: 32px 20px;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
}
.sidebar h2{
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 14px 4px;
}
.doc-nav{
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
}
.doc-nav li + l { margin-top: 3px; }
.doc-nav a{
  display: block;
  width: 100%;
  padding: 10px 13px;
  border-radius: 7px;
  font-size: 0.94rem;
  color: var(--text);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background 0.15s ease, color 0.15s ease;
}
.doc-nav a:hover{ background: var(--panel); color: var(--text); }
.doc-nav a.active{
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  color: var(--accent-deep);
  font-weight: 600;
}

.section-jump{
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
  padding-top: 18px;
}
.section-jump li{ margin: 0; }
.section-jump a{
  display: block;
  padding: 6px 13px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 7px;
  border-left: 3px solid transparent;
}
.section-jump a:hover{ background: var(--panel); color: var(--accent-deep); border-left: 3px solid var(--panel-border); }

/* Content */
.content{
  padding: 48px 56px 96px;
  max-width: var(--content-width);
}

.doc h1{
  font-family: "Source Serif 4", serif;
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 8px 0;
  letter-spacing: -0.01em;
}
.doc .intro{
  color: var(--text-muted);
  margin: 0 0 24px 0;
  font-size: 1.05rem;
  max-width: 56ch;
}

.doc-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  padding: 16px 0 28px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.doc-meta div{ min-width: 120px; }
.doc-meta dt{
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 3px 0;
}
.doc-meta dd{
  font-size: 0.92rem;
  color: var(--ink);
  margin: 0;
  font-weight: 500;
}

.doc section{
  padding: 30px 0;
  border-top: 1px solid var(--rule);
}
.doc section:first-of-type{ border-top: none; padding-top: 4px; }

.doc h3{
  font-family: "Source Serif 4", serif;
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 12px 0;
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.doc h3 .num{
  color: var(--accent);
  font-family: "Source Sans 3", sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  background: var(--accent-soft);
  border-radius: 5px;
  padding: 1px 7px;
}
.doc p{ margin: 0 0 14px 0; color: var(--text); }
.doc ul{ margin: 0 0 14px 0; padding-left: 22px; }
.doc li{ margin-bottom: 7px; }
.doc li::marker{ color: var(--accent); }

.note{
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 16px 18px;
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-top: 10px;
}
.note strong{ color: var(--ink); }

.doc-footer{
  margin-top: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.doc-footer .contact{
  font-size: 0.88rem;
  color: var(--text-muted);
}
.doc-footer .contact a{ font-weight: 600; }
.doc-footer .to-top{
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
}
.doc-footer .to-top:hover{ color: var(--accent-deep); }

@media (max-width: 820px){
  .layout{ grid-template-columns: 1fr; }
  .sidebar{
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--rule);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  .sidebar h2, .section-jump{ display: none; }
  .doc-nav{ display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
  .doc-nav li{ margin: 0; }
  .content{ padding: 32px 24px 64px; }
}

@media print{
  .sidebar{ display: none; }
  .layout{ isplay: block; }
  .topbar{ padding: 0 0 16px; border-bottom: 2px solid var(--ink); }
  .doc-footer .to-top{ display: none; }
  body{ font-size: 13px; }
}
