/* Site header and footer for the static lessons and blog posts in public/.
   Mirrors components/Navbar.tsx and components/Footer.tsx; the markup comes
   from lib/static-chrome.ts. Every rule is scoped to .rs-* and sets its own
   values, because each page also styles bare nav, footer, a and ul. */

.rs-header, .rs-header *, .rs-footer, .rs-footer * { box-sizing: border-box; }
.rs-header, .rs-footer {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  text-align: left;
}

/* Header: fixed and 80px tall, like the main site. Pages were laid out under a
   60px fixed bar, so the body moves down the 20px difference. */
body { padding-top: 20px !important; }
body[data-chrome-offset="full"] { padding-top: 80px !important; }
/* Lesson sidebars stuck at 64-100px under the old bar; keep them clear of the new one. */
.sidebar, .sidebar-card { top: 100px !important; }
.rs-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 80px; margin: 0; padding: 0;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0;
}
.rs-header-inner {
  max-width: 80rem; height: 80px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.rs-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.rs-mark { width: 56px; height: 56px; border-radius: 9999px; background: #f5f3ff; display: grid; place-items: center; }
.rs-mark img { width: 44px; height: 44px; display: block; }
.rs-wordmark { display: flex; flex-direction: column; line-height: 1; }
.rs-wordmark strong { font-size: 18px; font-weight: 800; color: #6d28d9; letter-spacing: -0.01em; }
.rs-wordmark span { margin-top: 4px; font-size: 12px; font-weight: 600; color: #64748b; letter-spacing: 0.1em; text-transform: uppercase; }

/* Pages style bare nav as their old fixed 60px bar; undo all of it here. */
.rs-nav {
  display: flex; align-items: center; justify-content: flex-start; gap: 20px;
  position: static; inset: auto; top: auto; left: auto; right: auto; z-index: auto;
  width: auto; height: auto; margin: 0; padding: 0; border: 0; box-shadow: none;
  background: none; -webkit-backdrop-filter: none; backdrop-filter: none; transform: none;
}
.rs-nav a, .rs-menu-panel a { font-size: 14px; font-weight: 500; color: #475569; text-decoration: none; white-space: nowrap; }
.rs-nav a:hover { color: #0f172a; }
.rs-nav a.rs-tool, .rs-menu-panel a.rs-tool { color: #7c3aed; }
.rs-nav a.rs-tool:hover { color: #5b21b6; }
.rs-soon {
  margin-left: 4px; padding: 2px 6px; border-radius: 9999px; background: #fef3c7; color: #b45309;
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: middle;
}
.rs-apply {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 20px; border-radius: 9999px; background: #6d28d9; color: #fff !important;
  font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.rs-apply:hover { background: #5b21b6; }

/* Mobile menu: a details element, so it works without JavaScript. */
.rs-menu { display: none; position: relative; }
.rs-menu summary { list-style: none; cursor: pointer; width: 40px; height: 40px; padding: 11px 9px; border-radius: 6px; display: flex; flex-direction: column; justify-content: space-between; }
.rs-menu summary::-webkit-details-marker { display: none; }
.rs-menu summary span { display: block; height: 2px; border-radius: 2px; background: #475569; }
.rs-menu summary:hover { background: #f1f5f9; }
.rs-menu-panel {
  position: fixed; top: 80px; left: 0; right: 0;
  display: flex; flex-direction: column; gap: 14px; padding: 16px 24px 20px;
  background: #fff; border-bottom: 1px solid #e2e8f0; box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}
.rs-apply-block { width: 100%; margin-top: 4px; padding: 10px 20px; }

@media (max-width: 1279px) { .rs-nav { gap: 16px; } }
@media (max-width: 1023px) {
  .rs-nav, .rs-header-inner > .rs-apply { display: none; }
  .rs-menu { display: block; }
}

/* Footer */
.rs-footer {
  display: block; width: auto; max-width: none; margin: 0; padding: 0; border: 0;
  background: #0f172a; color: #94a3b8; font-size: 14px;
}
.rs-footer a { text-decoration: none; }
.rs-footer p { margin: 0; }
.rs-footer-strip, .rs-footer-grid, .rs-footer-bottom { max-width: 80rem; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.rs-footer-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 24px; padding-bottom: 24px; border-bottom: 1px solid #1e293b;
}
.rs-footer-strip p { color: #94a3b8; font-size: 14px; }
.rs-footer-strip p a { color: #fff; font-weight: 600; }
.rs-footer-strip p a:hover { color: #a78bfa; }
.rs-footer-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 40px;
  padding-top: 64px; padding-bottom: 64px;
}
.rs-col h4 { margin: 0 0 16px; color: #fff; font-size: 14px; font-weight: 700; letter-spacing: 0.02em; }
.rs-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rs-col li { margin: 0; padding: 0; }
.rs-col li a { color: #94a3b8; font-size: 14px; }
.rs-col li a:hover { color: #fff; }
.rs-footer-brand { display: inline-block; margin-bottom: 16px; color: #fff; font-size: 18px; font-weight: 400; }
.rs-footer-brand strong { color: #a78bfa; font-weight: 800; }
.rs-col-brand p { max-width: 20rem; color: #94a3b8; font-size: 14px; line-height: 1.6; }
.rs-footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 24px; padding-bottom: 24px; border-top: 1px solid #1e293b;
}
.rs-footer-bottom p, .rs-legal a { color: #64748b; font-size: 12px; }
.rs-legal a:hover { color: #cbd5e1; }

@media (max-width: 1023px) { .rs-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rs-col-brand { grid-column: 1 / -1; } }
@media (max-width: 639px) { .rs-footer-grid { grid-template-columns: 1fr; gap: 32px; padding-top: 48px; padding-bottom: 48px; } }
