:root {
  color-scheme: light;
  --shell-bg: #f7f7f2;
  --shell-panel: #ffffff;
  --shell-ink: #1f272b;
  --shell-muted: #667276;
  --shell-line: #d9ddd8;
  --shell-accent: #d85d4f;
  --shell-accent-2: #1b6f7a;
  --shell-gold: #d99b2b;
  --sidebar-w: 264px;
  font-family: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(27,111,122,0.08), transparent 38%),
    linear-gradient(180deg, var(--shell-bg), #eef3f1);
  color: var(--shell-ink);
  font: 16px/1.55 Arial, Helvetica, sans-serif;
}
a { color: var(--shell-accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-shell { min-height: 100vh; display: flex; }
.site-sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  min-height: 100vh;
  position: sticky;
  top: 0;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  background: #102f35;
  color: #eef7f6;
  border-right: 1px solid rgba(255,255,255,0.14);
}
.sidebar-brand { padding: 22px 18px 18px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.sidebar-brand a {
  display: block;
  color: #fff6df;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}
.brand-card {
  display: grid;
  place-items: center;
  width: 176px;
  height: 72px;
  margin-bottom: 12px;
  border: 1px solid rgba(255,246,223,0.24);
  border-radius: 10px;
  background: linear-gradient(135deg, #fffaf0, #d9ece9);
  color: #13383d;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.4px;
}
.brand-sub { display: block; margin-top: 3px; color: #a9c6c3; font-size: 0.72rem; }
.sidebar-section {
  padding: 18px 18px 6px;
  color: #9dbab7;
  font-size: 0.64rem;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}
.sidebar-nav { list-style: none; margin: 0; padding: 4px 10px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 39px;
  padding: 9px 10px;
  border-radius: 8px;
  color: #d8e8e6;
  font-size: 0.9rem;
}
.nav-item:hover { background: rgba(255,255,255,0.08); text-decoration: none; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(216,93,79,0.22), rgba(217,155,43,0.08));
  box-shadow: inset 3px 0 0 var(--shell-gold);
  color: #ffffff;
}
.nav-icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 6px;
  color: #fff6df;
  font-size: 0.74rem;
  flex: 0 0 22px;
}
.nav-label { flex: 1; min-width: 0; }
.nav-badge {
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid rgba(217,155,43,0.35);
  color: #ffe4a7;
  font-size: 0.56rem;
  letter-spacing: 0.6px;
}
.sidebar-footer {
  margin-top: auto;
  padding: 10px 10px 18px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.sidebar-toggle {
  display: none;
  position: fixed;
  top: 13px;
  left: 13px;
  z-index: 80;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(16,47,53,0.22);
  border-radius: 9px;
  background: rgba(255,255,255,0.94);
  color: #13383d;
  font-size: 1.1rem;
  cursor: pointer;
}
.sidebar-overlay { display: none; }

.site-main { flex: 1; min-width: 0; }
.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 30px;
  border-bottom: 1px solid var(--shell-line);
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-title {
  color: var(--shell-ink);
  font-weight: 700;
  letter-spacing: 0.2px;
}
.topbar-links { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.9rem; }
.content-frame {
  width: min(980px, calc(100% - 44px));
  margin: 34px auto 56px;
  padding: 34px;
  border: 1px solid var(--shell-line);
  border-radius: 14px;
  background: var(--shell-panel);
  box-shadow: 0 18px 48px rgba(33,44,48,0.08);
}
.content-frame h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.04;
  color: var(--shell-ink);
}
.content-frame h2 { margin: 30px 0 10px; font-size: 1.35rem; }
.content-frame p { color: #374348; }
.content-frame .lede { color: var(--shell-muted); font-size: 1.15rem; }
.content-frame ul, .content-frame ol { padding-left: 1.3rem; }
.content-frame li { margin: 0.35rem 0; }
.content-frame img { max-width: 100%; height: auto; border-radius: 10px; }
.page-meta {
  margin-bottom: 18px;
  color: var(--shell-accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

@media (max-width: 820px) {
  .site-sidebar {
    position: fixed;
    z-index: 70;
    transform: translateX(-100%);
    transition: transform 0.24s ease;
  }
  .site-sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: grid; place-items: center; }
  .sidebar-overlay.open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(0,0,0,0.45);
  }
  .topbar { padding-left: 68px; }
  .topbar-links { display: none; }
  .content-frame { width: min(100% - 28px, 980px); padding: 24px; margin-top: 22px; }
}
