* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f8fafc;
  color: var(--text);
}

body { padding-bottom: 84px; }

button, input, select, textarea { font: inherit; }

button { cursor: pointer; }

button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(56, 189, 248, .45);
  outline-offset: 2px;
}

.topbar {
  background: var(--bg);
  color: var(--text-inverse);
  padding: calc(18px + env(safe-area-inset-top)) 20px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.eyebrow {
  color: #94a3b8;
  font-size: 11px;
  letter-spacing: .12em;
  font-weight: 700;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 25px; }
h2 { font-size: 21px; margin-bottom: 8px; }
h3 { font-size: 16px; margin-bottom: 6px; }

.page-container {
  width: min(100% - 32px, 860px);
  margin: 0 auto;
  padding: 24px 0;
}

.bottom-nav {
  position: fixed;
  z-index: 20;
  bottom: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--border);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  backdrop-filter: blur(12px);
}

.nav-item {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 4px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

.nav-item.active {
  background: var(--bg);
  color: white;
}

@media (min-width: 700px) {
  body { padding-bottom: 24px; }
  .bottom-nav {
    position: static;
    width: min(100% - 32px, 860px);
    margin: 0 auto 24px;
    border: 1px solid var(--border);
    border-radius: 16px;
  }
}
