/* Lumenal Reference Site — shared styles
   Theme: conservative white/blue — neutral ground so design comps read true. */
:root {
  --bg: #ffffff;
  --bg-raised: #f5f7fa;
  --bg-card: #fafbfd;
  --border: #d9e1ea;
  --text: #1d2836;
  --text-dim: #46566a;
  --text-faint: #7e8fa3;
  --accent: #1a4f96;
  --accent-soft: #2f66b3;
  --violet: #34567e;
  --violet-soft: #1f5eb0;
  --good: #1e7d4f;
  --warn: #a8700f;
  --bad: #bf3f3f;
  --info: #21679e;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Cascadia Code", Consolas, monospace;
  --sidebar-w: 264px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 15.5px;
}

/* ---------- Layout ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-raised);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  padding: 28px 0 40px;
  z-index: 50;
}
.content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  padding: 48px 56px 96px;
  max-width: 1120px;
}

/* ---------- Sidebar ---------- */
.brand {
  padding: 0 24px 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.brand a { text-decoration: none; }
.brand .word {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 600;
}
.brand .sub {
  display: block;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 2px;
}
.nav-group { margin-bottom: 20px; }
.nav-group h4 {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 0 24px;
  margin-bottom: 6px;
  font-weight: 600;
}
.nav-group a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 24px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  border-left: 2px solid transparent;
  transition: color .15s, background .15s;
}
.nav-group a svg { width: 15px; height: 15px; stroke: currentColor; flex-shrink: 0; }
.nav-group a:hover { color: var(--text); background: rgba(26,79,150,.06); }
.nav-group a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: rgba(26,79,150,.07);
}

/* ---------- Typography ---------- */
h1 {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
  line-height: 1.15;
  margin-bottom: 8px;
}
.page-kicker {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
}
.page-lede {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 760px;
  margin-bottom: 40px;
}
h2 {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 600;
  margin: 48px 0 14px;
  padding-top: 8px;
  color: var(--accent);
}
h3 { font-size: 17px; font-weight: 600; margin: 28px 0 10px; color: var(--text); }
p { margin-bottom: 14px; color: var(--text-dim); max-width: 780px; }
p strong, li strong { color: var(--text); font-weight: 600; }
ul, ol { margin: 0 0 16px 22px; color: var(--text-dim); max-width: 760px; }
li { margin-bottom: 6px; }
a { color: var(--violet-soft); }
code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--accent);
}
hr { border: none; border-top: 1px solid var(--border); margin: 40px 0; }

/* ---------- Components ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px 24px;
  margin-bottom: 18px;
}
.card h3 { margin-top: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 1000px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 24px 0 8px; }
.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
}
.stat .num { font-family: var(--serif); font-size: 32px; color: var(--accent); font-weight: 600; line-height: 1.1; }
.stat .lbl { font-size: 12px; color: var(--text-faint); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 4px; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 28px;
  font-size: 14px;
}
th {
  text-align: left;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  border-bottom: 1px solid var(--border);
  padding: 8px 14px 8px 0;
  font-weight: 600;
}
td {
  padding: 9px 14px 9px 0;
  border-bottom: 1px solid #e7edf4;
  color: var(--text-dim);
  vertical-align: top;
}
td:first-child { color: var(--text); }
.table-wrap { overflow-x: auto; }

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 2px 9px;
  border-radius: 20px;
  white-space: nowrap;
}
.badge.good { background: rgba(30,125,79,.1); color: var(--good); }
.badge.warn { background: rgba(168,112,15,.1); color: var(--warn); }
.badge.bad  { background: rgba(191,63,63,.09); color: var(--bad); }
.badge.info { background: rgba(33,103,158,.1); color: var(--info); }
.badge.dim  { background: rgba(126,143,163,.13); color: var(--text-dim); }

.callout {
  border-left: 3px solid var(--accent);
  background: rgba(26,79,150,.05);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin: 18px 0 24px;
  max-width: 780px;
}
.callout.violet { border-left-color: var(--info); background: rgba(33,103,158,.05); }
.callout.red { border-left-color: var(--bad); background: rgba(191,63,63,.05); }
.callout p:last-child { margin-bottom: 0; }
.callout .co-title { font-weight: 600; color: var(--text); font-size: 14px; margin-bottom: 4px; }

/* progress bars */
.prog { margin-bottom: 18px; max-width: 780px; }
.prog .prog-head { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 5px; }
.prog .prog-head .pct { color: var(--text-faint); font-variant-numeric: tabular-nums; }
.prog .bar { height: 7px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.prog .fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, #2f66b3, #1a4f96); }

/* decision blocks */
.decision {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 20px;
}
.decision .d-q { font-weight: 600; font-size: 16px; color: var(--text); margin-bottom: 10px; }
.decision .d-opts { display: grid; gap: 10px; margin-bottom: 10px; }
.decision .d-opt {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-dim);
}
.decision .d-opt.rec { border-color: rgba(26,79,150,.45); background: rgba(26,79,150,.04); }
.decision .d-opt .o-name { font-weight: 600; color: var(--text); }
.decision .d-opt.rec .o-name::after {
  content: "Recommended";
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(26,79,150,.35);
  border-radius: 12px;
  padding: 1px 8px;
  margin-left: 10px;
  vertical-align: 2px;
}

/* comp gallery */
.comp-frame-wrap { margin: 20px 0 36px; }
.comp-frame-wrap .comp-meta { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.comp-frame-wrap .comp-title { font-weight: 600; font-size: 16px; color: var(--text); }
.comp-frame-wrap .comp-link { font-size: 13px; }
iframe.comp-desktop {
  width: 100%;
  height: 720px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
.phone-row { display: flex; gap: 28px; flex-wrap: wrap; margin: 20px 0 36px; }
.phone-shell {
  width: 375px;
  border: 10px solid #3a4552;
  border-radius: 38px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 14px 38px rgba(29,40,54,.18);
  flex-shrink: 0;
}
.phone-shell iframe { width: 375px; height: 740px; border: none; display: block; background: #fff; }
.phone-caption { text-align: center; font-size: 13px; color: var(--text-faint); margin-top: 10px; }

/* archive */
.nav-group.archive { border-top: 1px solid var(--border); padding-top: 16px; }
.nav-group.archive a { opacity: .68; }
.nav-group.archive a.active, .nav-group.archive a:hover { opacity: 1; }
.archive-banner {
  border-left: 3px solid var(--warn);
  background: rgba(168,112,15,.07);
  border-radius: 0 8px 8px 0;
  padding: 11px 16px;
  margin-bottom: 28px;
  max-width: 780px;
  font-size: 13.5px;
  color: var(--text-dim);
}
.archive-banner strong { color: var(--warn); }

/* prev/next footer */
.page-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}
.page-nav a { text-decoration: none; color: var(--violet-soft); }
.page-nav a:hover { color: var(--text); }

/* ---------- Mobile nav drawer ---------- */
.nav-toggle {
  display: none;
  position: fixed;
  top: 12px; left: 12px;
  z-index: 70;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(29,40,54,.10);
  color: var(--accent);
  padding: 0;
}
.nav-toggle svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-toggle .icon-close { display: none; }
body.nav-open .nav-toggle .icon-menu { display: none; }
body.nav-open .nav-toggle .icon-close { display: block; }
.nav-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(29,40,54,.45);
  z-index: 55;
}
body.nav-open .nav-backdrop { display: block; }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .sidebar {
    display: block;
    transform: translateX(-100%);
    transition: transform .22s ease;
    z-index: 60;
    box-shadow: none;
    width: min(300px, 84vw);
    padding-top: 64px; /* clear the fixed toggle button */
  }
  body.nav-open .sidebar {
    transform: translateX(0);
    box-shadow: 0 0 40px rgba(29,40,54,.30);
  }
  body.nav-open { overflow: hidden; }
  .content { margin-left: 0; padding: 68px 20px 80px; }
}
