/* ====================================
   HonPUF / hpuf.org  —  VeraCrypt 风格
   ==================================== */

:root {
  --brand: #0f9d58;
  --brand-dark: #0b7a44;
  --brand-light: #e8f8ef;
  --sidebar-bg: #f7f8f9;
  --sidebar-text: #1c1c1c;
  --sidebar-muted: #989dab;
  --sidebar-hover: #0f9d58;
  --sidebar-active-bg: #e8f8ef;
  --sidebar-width: 220px;
  --text: #222;
  --muted: #666;
  --gray: #f7f8fa;
  --border: #e0e0e0;
  --font: -apple-system, "Segoe UI", "Noto Sans SC", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--text);
  line-height: 1.8;
  background: #fff;
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  border-right: 1px solid #eee;
}

.sidebar-logo {
  padding: 24px 20px 16px;
}
.sidebar-logo a {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--sidebar-text);
  text-decoration: none;
}

.sidebar-nav { flex: 1; padding: 0 8px; margin-top: 4px; }
.sidebar-nav a {
  display: block;
  color: var(--sidebar-text);
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 0.88rem;
  transition: all .15s;
  margin-bottom: 1px;
}
.sidebar-nav a:hover {
  color: var(--sidebar-hover);
  background: var(--brand-light);
}
.sidebar-nav a.active {
  color: var(--brand);
  background: var(--brand-light);
  font-weight: 600;
}
.sidebar-nav .nav-section {
  font-size: 0.72rem;
  color: var(--sidebar-muted);
  padding: 16px 12px 4px;
  font-weight: 500;
}

.sidebar-footer {
  padding: 12px 20px 20px;
  font-size: 0.78rem;
}
.sidebar-footer a { color: var(--sidebar-muted); text-decoration: none; display: block; padding: 3px 0; }
.sidebar-footer a:hover { color: var(--sidebar-text); }

/* ---- Main Content ---- */
.main {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 40px 56px;
  max-width: 960px;
}

.main h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 6px; }
.main h2 { font-size: 1.25rem; font-weight: 600; margin: 36px 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--brand); display: inline-block; }
.main h3 { font-size: 1.02rem; font-weight: 600; margin: 24px 0 8px; }
.main p { margin-bottom: 14px; }
.main ul, .main ol { margin: 8px 0 16px 20px; }
.main li { margin-bottom: 4px; }
.main a { color: var(--brand); text-decoration: none; }
.main a:hover { text-decoration: underline; }

/* ---- Hero ---- */
.hero {
  padding: 30px 0 24px;
}
.hero h1 { font-size: 2.4rem; font-weight: 700; }
.subtitle { font-size: 1.05rem; color: var(--muted); margin-bottom: 24px; line-height: 1.6; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.main a.btn {
  display: inline-block;
  padding: 8px 22px;
  border-radius: 4px;
  font-size: 0.88rem;
  text-decoration: none;
  background: var(--brand);
  color: #fff;
  transition: background .2s;
}
.main a.btn:hover { background: var(--brand-dark); text-decoration: none; }
.main a.btn-outline {
  background: transparent;
  border: 1px solid var(--brand);
  color: var(--brand);
}
.main a.btn-outline:hover { background: var(--brand); color: #fff; }

/* ---- Grid / Cards ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin: 20px 0; }
.card {
  background: var(--gray);
  padding: 24px;
  border-radius: 4px;
  border: 1px solid var(--border);
  transition: box-shadow .2s;
}
.card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.card h3 { font-size: 1rem; margin-bottom: 8px; color: var(--brand-dark); }
.card p { font-size: 0.88rem; color: var(--muted); }

/* ---- Spec Table ---- */
.spec-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin: 12px 0 20px; }
.spec-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.spec-table td:first-child { font-weight: 600; white-space: nowrap; color: var(--muted); width: 28%; }

/* ---- Code Block ---- */
.code-block {
  background: #1e1e2e;
  color: #e0e0e0;
  padding: 18px 20px;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.82rem;
  margin: 12px 0 20px;
}
.code-block pre { font-family: "SF Mono", "Cascadia Code", "Fira Code", "Consolas", monospace; }

/* ---- Note ---- */
.note {
  background: #fff8e1;
  border-left: 3px solid #f6a623;
  padding: 14px 16px;
  border-radius: 2px;
  margin: 12px 0 20px;
  font-size: 0.88rem;
}

/* ---- Footer ---- */
.main-footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
}
.main-footer a { color: var(--muted); text-decoration: none; }
.main-footer a:hover { color: var(--text); }

/* ---- Responsive ---- */
@media (max-width: 720px) {
  .sidebar { width: 100%; height: auto; position: relative; }
  .main { margin-left: 0; padding: 24px 20px; }
  .grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.6rem; }
}
