﻿.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: -999px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 10;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 5;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img { width: 38px; height: 38px; }
.brand-title { font-weight: 700; letter-spacing: 0.2px; }
.brand-subtitle { color: var(--muted); font-size: 0.9rem; }

.nav-toggle { position: absolute; left: -9999px; }
.nav-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  width: 100%;
}

.sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  height: fit-content;
  position: sticky;
  top: 84px;
}

.content {
  min-width: 0;
}

.article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  max-width: var(--content-width);
}

.footer {
  margin-top: auto;
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    overflow-y: auto;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    z-index: 20;
  }
  .nav-toggle:checked ~ .page .sidebar {
    transform: translateX(0);
  }
  .nav-toggle:checked ~ .page .overlay {
    display: block;
  }
  .overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 15;
  }
}

@media (max-width: 600px) {
  .article { padding: 20px; }
  .nav-button span { display: none; }
}
