/* ============================================================
   Mezmur · App shell (sidebar + topbar + content)
   Shared by every page under /app/*
   ============================================================ */
@import url("/static/colors_and_type.css");

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg-canvas);
  color: var(--fg-1);
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--fg-1); }

/* ============================================================
   Layout
   ============================================================ */
.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar {
  background: var(--brand-cream-100);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 24px;
  flex: 0 0 auto;
}
.brand img { height: 36px; width: auto; display: block; }
.brand-text { display: flex; align-items: baseline; }
.brand-text .wm {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: var(--fw-semibold);
  font-size: 22px;
  letter-spacing: var(--ls-tight);
  color: var(--fg-1);
}
.brand-text .tld {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--fg-3);
  font-weight: var(--fw-medium);
}

.nav-section { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.nav-divider { height: 1px; background: var(--border-subtle); margin: 12px 8px; }
.nav-eyebrow {
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 0 12px;
  margin: 4px 0 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: var(--fw-medium);
  color: var(--fg-2);
  text-align: left;
  text-decoration: none;
  transition: all 150ms var(--ease-standard);
}
.nav-item:hover { background: rgba(20,17,13,0.04); color: var(--fg-1); }
.nav-item.active { background: var(--accent); color: var(--fg-on-brand); }
.nav-item.active .nav-ic { color: var(--fg-on-brand); }
.nav-ic { display: inline-flex; flex: 0 0 auto; }
.nav-lbl { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--bg-surface);
  color: var(--fg-3);
  padding: 2px 7px;
  border-radius: var(--r-pill);
}
.nav-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--gold-bg);
  color: var(--brand-gold-500);
  padding: 2px 6px;
  border-radius: var(--r-xs);
  font-weight: var(--fw-bold);
}

/* ============================================================
   Main / Topbar / Content
   ============================================================ */
.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-canvas);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}
.search-wrap {
  flex: 1;
  max-width: 600px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--bg-sunken);
  color: var(--fg-3);
  transition: all 150ms var(--ease-standard);
}
.search-wrap:focus-within {
  background: var(--bg-surface);
  box-shadow: var(--shadow-glow-red);
  color: var(--fg-1);
}
.search-wrap input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: 0;
  font-size: 15px;
  color: var(--fg-1);
  font-family: inherit;
}
.search-wrap input::placeholder { color: var(--fg-3); }
.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg-raised);
  color: var(--fg-3);
  padding: 2px 6px;
  border-radius: var(--r-xs);
}

.topbar-right { display: flex; align-items: center; gap: 14px; }
.lang-toggle {
  display: flex; gap: 4px; align-items: center;
  font-family: var(--font-mono); font-size: 12px; color: var(--fg-2);
  padding: 6px 12px; border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 1.5px var(--border-default);
}
.lang-toggle .active { color: var(--accent); font-weight: var(--fw-bold); }
.lang-toggle .sep { color: var(--fg-4); }

.content {
  padding: 32px 40px 64px;
  max-width: 1280px;
  width: 100%;
  align-self: center;
}

/* ============================================================
   Common content typography
   ============================================================ */
.eyebrow {
  font-size: 12px;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 8px;
}
.eyebrow.am { font-family: var(--font-ethiopic); color: var(--accent); text-transform: none; letter-spacing: 0.02em; }
.hero-h {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 48px);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-snug);
  color: var(--fg-1);
  font-variation-settings: "opsz" 96;
  margin-bottom: 12px;
  max-width: 720px;
}
.hero-h em { font-style: italic; color: var(--accent); }
.lede {
  font-size: 17px;
  color: var(--fg-2);
  max-width: 560px;
  line-height: var(--lh-base);
  margin-bottom: 32px;
}
.section-h {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: var(--fw-semibold);
  margin: 32px 0 16px;
}

/* ============================================================
   Buttons (per design system)
   ============================================================ */
.btn {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-snug);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--r-pill);
  transition: all 200ms var(--ease-standard);
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--fg-on-brand); }
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(201, 58, 35, 0.3);
}
.btn-primary:active { transform: scale(0.98); background: var(--accent-press); }
.btn-secondary {
  background: transparent;
  color: var(--fg-1);
  box-shadow: inset 0 0 0 1.5px var(--border-default);
}
.btn-secondary:hover { box-shadow: inset 0 0 0 1.5px var(--fg-1); }
.btn-ghost { background: transparent; color: var(--fg-2); padding: 11px 16px; border-radius: 8px; }
.btn-ghost:hover { background: var(--bg-raised); color: var(--fg-1); }

/* ============================================================
   Mobile
   ============================================================ */
@media (max-width: 800px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border-subtle);
    padding: 14px 18px;
  }
  .sidebar .brand { padding: 0 0 12px; }
  .sidebar-scroll-wrap { display: none; }
  .topbar { padding: 12px 18px; }
  .content { padding: 24px 18px 48px; }
}
