/* ═══════════════════════════════════════════════════════════════
   HelmHero v1 — base.css
   Reset, font loading, body defaults, layout shell.
   ═══════════════════════════════════════════════════════════════ */

/* ── Google Fonts ──────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Hanken+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }

/* ── Body ──────────────────────────────────────────────────────── */
body {
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--hh-ink);
  background: var(--hh-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── App shell ─────────────────────────────────────────────────── */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* ── Header bar — copied from v8 lines 61-67 exactly ──────────── */
.app-hdr { background: var(--hh-navy); padding: 12px 20px 10px; flex-shrink: 0; }
.app-hdr h1 { font-family: var(--display); font-size: 18px; font-weight: 700; color: #fff; letter-spacing: -.2px; margin-bottom: 1px; display: flex; align-items: center; gap: 9px; }
.app-hdr h1::before { content: ''; width: 30px; height: 30px; background: url(/assets/helmhero-mark.svg) no-repeat center/contain; flex-shrink: 0; }
.app-hdr h1 .hero { color: var(--hh-blue-bright); }
.app-hdr .sub { font-size: 11px; color: rgba(255,255,255,.45); font-family: var(--sans); }
.hdr-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.version-tag { font-family: var(--mono); font-size: 9px; color: rgba(255,255,255,.35); letter-spacing: .03em; }

@media (min-width: 900px) {
  .app-hdr { padding: 16px 32px 14px; }
  .app-hdr h1 { font-size: 22px; }
}

/* ── Nav tabs ──────────────────────────────────────────────────── */
.nav-tabs {
  background: var(--nav-bg);
  display: flex;
  align-items: stretch;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-tabs::-webkit-scrollbar { display: none; }

.nav-tab {
  font-family: var(--display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: -0.01em;
  color: rgba(255,255,255,.4);
  padding: 10px 14px;
  white-space: nowrap;
  position: relative;
  transition: color .15s;
  flex-shrink: 0;
}
.nav-tab:hover { color: rgba(255,255,255,.75); }
.nav-tab.active {
  color: #fff;
}
.nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 14px; right: 14px;
  height: 2.5px;
  border-radius: 2px 2px 0 0;
  background: var(--hh-grad);
}

/* back-tab handled by .nav-tab.back-tab below */

/* ── Content area ──────────────────────────────────────────────── */
.content {
  flex: 1;
  overflow-y: auto;
}

.page-inner {
  padding: 14px 14px 32px;
}

@media (min-width: 900px) {
  .page-inner { padding: 24px 24px 48px; }
}

/* ── Screen visibility ─────────────────────────────────────────── */
.screen { display: none; }
.screen.active { display: block; }

/* ── Auth badge ────────────────────────────────────────────────── */
.auth-badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--hh-aqua-bright);
  background: rgba(0,210,166,.12);
  border: 1px solid rgba(0,210,166,.25);
  border-radius: var(--r-pill);
  padding: 4px 10px;
  white-space: nowrap;
}

/* ── Section headers ───────────────────────────────────────────── */
.sh {
  margin: 22px 0 10px;
}
.sh h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--hh-ink-2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sh h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 13px;
  border-radius: 2px;
  background: var(--hh-grad);
  flex-shrink: 0;
}

/* ── What is this? box ─────────────────────────────────────────── */
.witi {
  background: var(--hh-tint-blue);
  border: 1px solid var(--hh-border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.witi-header {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.witi-label {
  font-family: var(--display);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--hh-blue);
}
.witi-toggle {
  margin-left: auto;
  color: var(--hh-muted);
  font-size: 11px;
  transition: transform .2s;
}
.witi.open .witi-toggle { transform: rotate(180deg); }
.witi-body {
  font-size: 12px;
  color: var(--hh-ink-2);
  line-height: 1.6;
  margin-top: 8px;
  display: none;
}
.witi.open .witi-body { display: block; }

/* ── Caution box ───────────────────────────────────────────────── */
.caution-box {
  background: var(--hh-caution-bg);
  border: 1px solid var(--hh-caution-border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 12px;
  color: var(--hh-caution-text);
  line-height: 1.55;
}

/* ── Loading spinner ───────────────────────────────────────────── */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--hh-border);
  border-top-color: var(--hh-blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty state ───────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--hh-muted);
}
.empty-state p {
  font-size: 13px;
  line-height: 1.6;
}

/* ── Top nav (tab bar) — copied from v8 lines 73-79, 271-273 ──── */
.top-nav { background: var(--hh-navy); border-top: 1px solid rgba(255,255,255,.08); display: flex; padding: 0 16px; overflow-x: auto; flex-shrink: 0; scrollbar-width: none; }
.top-nav::-webkit-scrollbar { display: none; }
.nav-tab { background: transparent; border: none; border-bottom: 2px solid transparent; color: rgba(255,255,255,.4); font-family: var(--display); font-size: 12px; font-weight: 600; padding: 9px 14px; cursor: pointer; white-space: nowrap; transition: color .15s; position: relative; letter-spacing: -.01em; }
.nav-tab:hover { color: rgba(255,255,255,.75); }
.nav-tab.active { color: #fff; border-bottom-color: transparent; }
.nav-tab.active::after { content: ''; position: absolute; bottom: -2px; left: 10px; right: 10px; height: 2.5px; background: var(--hh-grad); border-radius: 2px; }
.nav-tab.right { margin-left: auto; }
.nav-tab.back-tab { color: rgba(255,255,255,.7); font-weight: 700; margin-right: 6px; padding-right: 18px; border-right: 1px solid rgba(255,255,255,.12); }
.nav-tab.back-tab:hover { color: #fff; }
.nav-tab.back-tab::after { display: none; }

@media (max-width: 600px) {
  .top-nav { display: none; }
}
