/* ===========================================================
   AJORA ACADEMY — CORE STYLESHEET
   Sharp corners, no gradients, no shadows, 2px black borders,
   red reserved for CTAs/icons/highlights. Mobile-first.
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&display=swap');

:root {
  --bg: #FFFFFF;
  --bg-alt: #111111;
  --text: #111111;
  --text-on-dark: #FFFFFF;
  --accent: #E50914;
  --accent-hover: #B00710;
  --border: #111111;
  --muted: #6b6b6b;
  --muted-line: #d8d8d8;
  --radius: 10px;
  --radius-lg: 18px;

  --font-head: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  --nav-h: 64px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--text); }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* focus visibility for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: 14px 26px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--bg);
  color: var(--text);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover { background: var(--text); color: var(--bg); }

.btn-outline-light {
  background: transparent;
  border-color: #fff;
  color: #fff;
}
.btn-outline-light:hover { background: #fff; color: var(--bg-alt); }

.btn-dark {
  background: var(--bg-alt);
  border-color: var(--bg-alt);
  color: #fff;
}
.btn-dark:hover { background: #000; }

.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 12px; }
.btn:disabled, .btn.is-disabled {
  cursor: not-allowed;
  opacity: .5;
}

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: 20px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nav-brand img { height: 34px; width: auto; }
.nav-brand span {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.nav-links {
  display: none;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a.active { border-bottom-color: var(--accent); }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-toggle {
  display: inline-flex;
  background: none;
  border: 2px solid var(--border);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: '';
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  position: relative;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

.nav-mobile-panel {
  display: none;
  border-top: 2px solid var(--border);
  padding: 14px 0 20px;
}
.nav-mobile-panel.is-open { display: block; }
.nav-mobile-panel ul { list-style: none; margin: 0; padding: 0; }
.nav-mobile-panel li { border-bottom: 1px solid var(--muted-line); }
.nav-mobile-panel a { display: block; padding: 13px 4px; font-weight: 500; }
.nav-mobile-panel .nav-actions { margin-top: 14px; flex-direction: column; align-items: stretch; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 12px 6px 6px;
  font-size: 13px;
  font-weight: 700;
}
.user-avatar {
  width: 26px; height: 26px;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-size: 12px;
  border-radius: 6px;
}

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
  .nav-mobile-panel { display: none !important; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 56px;
  border-bottom: 2px solid var(--border);
}
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 2px solid var(--border);
  padding: 5px 10px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(32px, 6.4vw, 62px);
  text-transform: uppercase;
  max-width: 16ch;
}
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-sub {
  font-size: 18px;
  color: var(--muted);
  max-width: 52ch;
  margin-bottom: 28px;
}
.hero-search {
  display: flex;
  max-width: 560px;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}
.hero-search input {
  flex: 1;
  border: none;
  padding: 15px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
}
.hero-search input:focus { outline: none; }
.hero-search button {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 0 22px;
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 13px;
}
.hero-search button:hover { background: var(--accent-hover); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Trust bar ---------- */
.trust-bar {
  background: var(--bg-alt);
  color: #fff;
  border-bottom: 2px solid var(--border);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}
.trust-item {
  padding: 26px 20px;
  text-align: center;
  border-right: 1px solid #333;
  border-bottom: 1px solid #333;
}
.trust-grid .trust-item:nth-child(2n) { border-right: none; }
.trust-num {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--accent);
  font-size: 30px;
  display: block;
}
.trust-label {
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #cfcfcf;
}
@media (min-width: 700px) {
  .trust-grid { grid-template-columns: repeat(4, 1fr); }
  .trust-grid .trust-item:nth-child(2n) { border-right: 1px solid #333; }
  .trust-grid .trust-item:last-child { border-right: none; }
  .trust-item { border-bottom: none; }
}

/* ---------- Sections ---------- */
.section { padding: 64px 0; border-bottom: 2px solid var(--border); }
.section:last-of-type { border-bottom: none; }
.section-alt { background: #FAFAFA; }
.section-head { margin-bottom: 36px; max-width: 60ch; }
.section-head .eyebrow {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
}
.section-head h2 { font-size: clamp(26px, 4vw, 38px); text-transform: uppercase; }
.section-head p { color: var(--muted); font-size: 16px; }

/* ---------- How it works ---------- */
.steps-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) { .steps-grid { grid-template-columns: repeat(3, 1fr); } }
.step-card {
  background: var(--bg-alt);
  color: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.step-num {
  font-family: var(--font-head);
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .1em;
  margin-bottom: 14px;
}
.step-card h3 { font-size: 19px; margin-bottom: 8px; }
.step-card p { color: #cfcfcf; margin: 0; font-size: 14.5px; }

/* ---------- Cards / grid ---------- */
.card {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  padding: 24px;
}
.grid-3 { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-2 { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Comparison table (free vs premium) ---------- */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  border: none;
}
.compare-table th, .compare-table td {
  border: 1px solid var(--border);
  padding: 14px 16px;
  text-align: left;
  font-size: 14.5px;
}
.compare-table thead th {
  background: var(--bg-alt);
  color: #fff;
  font-family: var(--font-head);
  text-transform: uppercase;
  font-size: 12.5px;
  letter-spacing: .05em;
}
.compare-table tbody tr:nth-child(odd) { background: #FAFAFA; }
.compare-table td.yes { color: #0a8a3d; font-weight: 700; }
.compare-table td.no { color: var(--muted); }
.compare-table td.lock { color: var(--accent); font-weight: 700; }
.table-scroll {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: auto;
}

/* ---------- Bundle / paper cards ---------- */
.bundle-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}
.bundle-card-top {
  background: var(--bg-alt);
  color: #fff;
  padding: 20px 22px;
}
.bundle-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--bg-alt);
  background: var(--accent);
  padding: 3px 8px;
  border-radius: var(--radius);
  margin-bottom: 10px;
}
.bundle-card-top h3 { font-size: 20px; margin-bottom: 2px; }
.bundle-card-top .unit-name { color: #cfcfcf; font-size: 13.5px; }
.bundle-card-body { padding: 22px; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.bundle-includes { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.bundle-includes li { padding: 6px 0; border-bottom: 1px solid var(--muted-line); display: flex; gap: 8px; }
.bundle-includes li:last-child { border-bottom: none; }
.bundle-includes li::before { content: '—'; color: var(--accent); font-weight: 700; }
.bundle-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
}
.bundle-price { font-family: var(--font-head); font-weight: 700; font-size: 22px; }
.bundle-price small { font-size: 12px; color: var(--muted); font-weight: 500; }

/* ---------- Filters / library ---------- */
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  padding: 16px 0;
  border-bottom: 1px solid var(--muted-line);
}
.breadcrumb a:hover { color: var(--accent); }
.filter-bar {
  border-bottom: 2px solid var(--border);
  padding: 18px 0;
}
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filter-select, .filter-input {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 12px;
}
.filter-input { flex: 1; min-width: 160px; }
.filter-select { min-width: 130px; }
.filter-toggle-btn { display: none; }

@media (max-width: 720px) {
  .filter-row.desktop-filters { display: none; }
  .filter-toggle-btn { display: inline-flex; }
  .filter-row.mobile-filters {
    display: none;
    flex-direction: column;
    align-items: stretch;
    margin-top: 12px;
  }
  .filter-row.mobile-filters.is-open { display: flex; }
}

.lib-toggle {
  display: inline-flex;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}
.lib-toggle a {
  padding: 10px 20px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  border-right: 2px solid var(--border);
}
.lib-toggle a:last-child { border-right: none; }
.lib-toggle a.active { background: var(--bg-alt); color: #fff; }

.results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0 10px;
  font-size: 13.5px;
  color: var(--muted);
}

.table-wrap {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.paper-table { width: 100%; border-collapse: collapse; border: none; }
.paper-table th, .paper-table td {
  border-bottom: 1px solid var(--muted-line);
  padding: 13px 14px;
  text-align: left;
  font-size: 14px;
}
.paper-table thead th {
  background: var(--bg-alt);
  color: #fff;
  font-family: var(--font-head);
  font-size: 12px;
  letter-spacing: .05em;
  text-transform: uppercase;
  border-bottom: none;
}
.paper-table tbody tr:hover { background: #FAFAFA; }
.paper-table tbody tr:last-child td { border-bottom: none; }

.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 2px solid var(--accent);
  color: var(--accent);
  background: var(--bg);
  border-radius: var(--radius);
  padding: 7px 12px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  cursor: pointer;
}
.dl-btn:hover { background: var(--accent); color: #fff; }
.dl-btn.locked {
  border-color: var(--muted-line);
  color: var(--muted);
}
.dl-btn.locked:hover { background: var(--bg-alt); color: #fff; border-color: var(--bg-alt); }

.paper-cards { display: none; flex-direction: column; gap: 12px; }
.paper-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.paper-card-meta { font-size: 13.5px; }
.paper-card-meta strong { display: block; font-family: var(--font-head); font-size: 15px; }
.paper-card-meta span { color: var(--muted); }

@media (max-width: 720px) {
  .paper-table { display: none; }
  .paper-cards { display: flex; }
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  border: 2px dashed var(--muted-line);
  border-radius: var(--radius-lg);
  color: var(--muted);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 30px 0 10px;
}
.pagination button {
  width: 38px; height: 38px;
  border: 2px solid var(--border);
  background: var(--bg);
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.pagination button.active { background: var(--bg-alt); color: #fff; border-color: var(--bg-alt); }
.pagination button:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- Forms ---------- */
.form-field { margin-bottom: 16px; }
.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.form-field input {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
}
.form-field input:focus { outline: none; border-color: var(--accent); }
.form-hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.auth-shell {
  max-width: 440px;
  margin: 0 auto;
}
.auth-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--muted-line);
}
.auth-tabs { display: flex; border: 2px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; }
.auth-tabs button {
  flex: 1;
  padding: 12px;
  border: none;
  background: var(--bg);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  cursor: pointer;
  border-right: 2px solid var(--border);
}
.auth-tabs button:last-child { border-right: none; }
.auth-tabs button.active { background: var(--bg-alt); color: #fff; }
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 2px solid var(--border); border-radius: var(--radius);
  padding: 12px; width: 100%; background: var(--bg); cursor: pointer;
  font-family: var(--font-body); font-weight: 500; font-size: 14.5px;
}
.google-btn:hover { background: #FAFAFA; }

.why-list { list-style: none; margin: 26px 0 0; padding: 0; }
.why-list li {
  display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--muted-line); font-size: 14.5px;
}
.why-list li:last-child { border-bottom: none; }
.why-list li::before { content: '✓'; color: var(--accent); font-weight: 700; }

/* ---------- Dashboard ---------- */
.dash-head {
  padding: 40px 0 0;
}
.dash-welcome { color: var(--muted); font-size: 15px; }
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin: 24px 0 30px;
  overflow-x: auto;
}
.tab-btn {
  padding: 12px 18px;
  border: none;
  background: none;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  color: var(--muted);
}
.tab-btn.active { color: var(--text); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
}
.list-row-meta strong { display: block; font-family: var(--font-head); font-size: 15px; }
.list-row-meta span { color: var(--muted); font-size: 13px; }

.stat-strip { display: grid; grid-template-columns: repeat(1,1fr); gap: 12px; margin-bottom: 26px; }
@media (min-width: 560px) { .stat-strip { grid-template-columns: repeat(3,1fr); } }
.stat-box { border: 2px solid var(--border); border-radius: var(--radius-lg); padding: 18px; text-align: center; }
.stat-box b { display: block; font-family: var(--font-head); font-size: 26px; }
.stat-box span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Ad slots ---------- */
.ad-slot {
  border: 2px dashed var(--muted-line);
  background: #FAFAFA;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: var(--radius-lg);
  min-height: 90px;
  text-align: center;
  padding: 8px;
}
.ad-slot small { display: block; margin-top: 4px; font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: 11px; }
.ad-leaderboard { width: 100%; min-height: 90px; margin: 24px 0; }
.ad-inline { width: 100%; min-height: 100px; margin: 20px 0; }
.ad-rail { width: 160px; min-height: 600px; }
.ad-anchor-mobile {
  display: none;
}
@media (max-width: 899px) {
  body:has(.ad-anchor-mobile) { padding-bottom: 60px; }
  .ad-anchor-mobile {
    display: block;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 90;
    min-height: 54px;
    border-top: 2px solid var(--border);
    border-bottom: none;
    border-left: none;
    border-right: none;
    background: #fff;
  }
}
.ad-anchor-mobile .ad-close {
  position: absolute;
  top: 4px; right: 6px;
  background: var(--bg-alt);
  color: #fff;
  width: 18px; height: 18px;
  border-radius: 5px;
  border: none;
  font-size: 11px;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-alt);
  color: #fff;
  padding: 56px 0 26px;
}
.footer-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  padding-bottom: 34px;
  border-bottom: 1px solid #333;
}
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand img { height: 30px; }
.footer-brand span { font-family: var(--font-head); font-weight: 700; text-transform: uppercase; font-size: 16px; }
.footer-desc { color: #b8b8b8; font-size: 14px; max-width: 34ch; }
.footer-col h4 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #999; margin-bottom: 14px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #e6e6e6; font-size: 14px; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: space-between;
  padding-top: 22px;
  font-size: 12.5px;
  color: #999;
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.muted { color: var(--muted); }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.stack-sm > * + * { margin-top: 10px; }
.page-header { padding: 44px 0 8px; }
.page-header .eyebrow {
  font-family: var(--font-head); font-size: 12px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 10px;
}
.page-header h1 { font-size: clamp(28px, 5vw, 44px); text-transform: uppercase; }
.page-header p { color: var(--muted); max-width: 60ch; font-size: 16px; }

.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.tag-free { border-color: #0a8a3d; color: #0a8a3d; }
.tag-locked { border-color: var(--accent); color: var(--accent); }

/* layout with sticky rails for pdf viewer / library pages */
.rail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 1080px) {
  .rail-layout.with-rails { grid-template-columns: 160px 1fr 160px; }
}
.rail-sticky { position: sticky; top: calc(var(--nav-h) + 16px); align-self: start; display: none; }
@media (min-width: 1080px) { .rail-sticky { display: flex; flex-direction: column; gap: 16px; } }

/* toast */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-alt);
  color: #fff;
  padding: 13px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  border: 2px solid var(--accent);
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
