/* ============================================================
   Paraclette Docs — shared stylesheet (light theme)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
  --bg:           #ffffff;
  --bg-soft:      #f6f8fa;
  --bg-card:      #fbfcfd;
  --sidebar-bg:   #f9fafb;
  --border:       #e3e8ee;
  --border-soft:  #eef1f5;
  --text:         #1a2129;
  --text-dim:     #525c66;
  --text-faint:   #8a939d;

  --emerald:      #059669;   /* link / accent text — brand green, dark enough for light bg */
  --emerald-br:   #10b981;   /* brand highlight fill */
  --emerald-soft: #ecfdf5;
  --amber:        #b45309;   /* scripture refs / local */
  --amber-soft:   #fdf3e3;
  --blue:         #2563eb;   /* analytics / semantic */
  --blue-soft:    #eaf1fe;
  --crimson:      #dc2626;   /* alert / blackout / delete */
  --crimson-soft: #fdeded;
  --forge:        #d97706;   /* warnings */
  --indigo:       #4f46e5;
  --indigo-soft:  #eeeefc;

  /* themeable surface tokens (overridden in dark) */
  --topbar-bg:    rgba(255,255,255,0.86);
  --kbd-bg:       #ffffff;
  --zebra-even:   #fafbfc;
  --shot-a:       #fafbfc;
  --shot-b:       #f4f6f8;
  --step-bg:      #ffffff;
  --shadow-soft:  rgba(0,0,0,0.08);

  --radius: 12px;
  --sidebar-w: 290px;
  --content-w: 820px;
  --font: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Code", "Roboto Mono", Menlo, monospace;
}

/* ── Dark theme overrides ────────────────────────────── */
:root[data-theme="dark"] {
  --bg:           #0a0c0f;
  --bg-soft:      #11151a;
  --bg-card:      #161b22;
  --sidebar-bg:   #0d1117;
  --border:       #232a33;
  --border-soft:  #1c222b;
  --text:         #e6edf3;
  --text-dim:     #9aa7b4;
  --text-faint:   #6b7785;

  --emerald:      #34d399;
  --emerald-br:   #10b981;
  --emerald-soft: rgba(16,185,129,0.10);
  --amber:        #e7c887;
  --amber-soft:   rgba(245,158,11,0.10);
  --blue:         #60a5fa;
  --blue-soft:    rgba(96,165,250,0.10);
  --crimson:      #ef4444;
  --crimson-soft: rgba(239,68,68,0.10);
  --forge:        #f59e0b;
  --indigo:       #818cf8;
  --indigo-soft:  rgba(129,140,248,0.12);

  --topbar-bg:    rgba(10,12,15,0.82);
  --kbd-bg:       #1c222b;
  --zebra-even:   rgba(255,255,255,0.02);
  --shot-a:       #11151a;
  --shot-b:       #161b22;
  --step-bg:      #161b22;
  --shadow-soft:  rgba(0,0,0,0.5);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; font-family: var(--font);
  background: var(--bg); color: var(--text);
  line-height: 1.65; font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--emerald); text-decoration: none; font-weight: 550; }
a:hover { text-decoration: underline; }

/* ── Top bar ─────────────────────────────────────────── */
header.topbar {
  position: sticky; top: 0; z-index: 60;
  background: var(--topbar-bg); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 22px; display: flex; align-items: center; gap: 12px;
}
.brand-mark {
  height: 26px; width: auto; display: block;
}
.topbar .sub { color: var(--text-faint); font-size: 13px; font-weight: 500; }
.topbar .spacer { flex: 1; }
.topbar .home-link { font-size: 13.5px; color: var(--text-dim); font-weight: 550; }
.menu-toggle {
  display: none; background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 11px; font-size: 15px; cursor: pointer; color: var(--text);
}

/* ── Shell ───────────────────────────────────────────── */
.shell { display: flex; max-width: 1320px; margin: 0 auto; }

/* Sidebar */
aside.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: var(--sidebar-bg);
  position: sticky; top: 55px; align-self: flex-start;
  height: calc(100vh - 55px); overflow-y: auto; padding: 26px 18px 60px;
}
.sidebar .grp { margin-bottom: 22px; }
.sidebar .grp-title {
  text-transform: uppercase; letter-spacing: 0.13em; font-size: 11px;
  color: var(--text-faint); font-weight: 700; margin: 0 10px 8px;
}
.sidebar a.navitem {
  display: block; padding: 7px 11px; border-radius: 8px; font-size: 14px;
  color: var(--text-dim); font-weight: 500; margin: 1px 0;
}
.sidebar a.navitem:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.sidebar a.navitem.active {
  background: var(--emerald-soft); color: var(--emerald);
  font-weight: 650; box-shadow: inset 2px 0 0 var(--emerald);
}

/* Content */
main.content { flex: 1; min-width: 0; padding: 46px clamp(22px, 5vw, 64px) 90px; }
.content-inner { max-width: var(--content-w); margin: 0 auto; }

.eyebrow {
  display: inline-block; font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--emerald); font-weight: 700; margin-bottom: 12px;
}
h1 { font-size: clamp(30px, 5vw, 42px); line-height: 1.1; margin: 0 0 14px; letter-spacing: -0.025em; font-weight: 800; }
.page-lede { font-size: 18.5px; color: var(--text-dim); margin: 0 0 8px; }
h2 { font-size: 25px; letter-spacing: -0.02em; margin: 48px 0 6px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
h3 { font-size: 18.5px; margin: 30px 0 8px; letter-spacing: -0.01em; }
h4 { font-size: 15px; margin: 20px 0 4px; }
p { margin: 12px 0; color: var(--text-dim); }
strong { color: var(--text); font-weight: 650; }
ul, ol { color: var(--text-dim); padding-left: 22px; }
li { margin: 7px 0; }

code {
  font-family: var(--mono); font-size: 0.85em; background: var(--bg-soft);
  border: 1px solid var(--border); padding: 1.5px 6px; border-radius: 5px; color: var(--amber);
}
pre {
  background: #0f1419; border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 18px; overflow-x: auto; font-family: var(--mono); font-size: 13px;
  line-height: 1.6; color: #e6edf3;
}
pre code { background: none; border: none; padding: 0; color: inherit; }

/* Hero (index) */
.hero {
  position: relative; overflow: hidden; border-radius: 18px;
  padding: 60px 40px; margin-bottom: 8px;
  background:
    radial-gradient(560px 280px at 78% -20%, var(--emerald-soft), transparent 70%),
    radial-gradient(420px 260px at 8% 120%, var(--blue-soft), transparent 70%),
    var(--bg-card);
  border: 1px solid var(--border);
}
.hero h1 { font-size: clamp(34px, 6vw, 54px); }
.hero h1 .accent { color: var(--emerald); }
.hero .verse { margin-top: 22px; font-style: italic; color: var(--text-faint); font-size: 15px; }

/* Cards */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; margin: 16px 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.feature-card h4 { margin-top: 0; display: flex; align-items: center; gap: 8px; }
.feature-card p { margin: 6px 0 0; font-size: 14px; }

/* Callouts */
.callout { border-radius: 11px; padding: 13px 17px; margin: 18px 0; border: 1px solid; font-size: 14.5px; display: flex; gap: 11px; align-items: flex-start; }
.callout .ico { flex-shrink: 0; font-weight: 700; }
.callout p { margin: 0; color: var(--text); }
.callout.tip  { border-color: #c9e29a; background: var(--emerald-soft); }
.callout.tip .ico { color: var(--emerald); }
.callout.note { border-color: #bcd4fb; background: var(--blue-soft); }
.callout.note .ico { color: var(--blue); }
.callout.warn { border-color: #f3d28a; background: var(--amber-soft); }
.callout.warn .ico { color: var(--forge); }
.callout.pro  { border-color: #cdcbf7; background: var(--indigo-soft); }
.callout.pro .ico { color: var(--indigo); }

/* Steps */
ol.steps { list-style: none; padding: 0; counter-reset: step; margin: 18px 0; }
ol.steps > li { position: relative; padding: 3px 0 18px 50px; counter-increment: step; border-left: 2px solid var(--border); margin-left: 16px; }
ol.steps > li:last-child { border-left-color: transparent; }
ol.steps > li::before {
  content: counter(step); position: absolute; left: -17px; top: -2px; width: 32px; height: 32px;
  border-radius: 50%; background: var(--step-bg); border: 1.5px solid var(--emerald); color: var(--emerald);
  font-weight: 700; font-size: 14px; display: grid; place-items: center;
}
ol.steps > li .st-title { font-weight: 650; color: var(--text); display: block; margin-bottom: 2px; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
th { color: var(--text); font-weight: 650; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
td { color: var(--text-dim); }
table.zebra tr:nth-child(even) td { background: var(--zebra-even); }

/* Chips & kbd */
.chip { display: inline-block; font-size: 11px; font-weight: 650; padding: 2px 9px; border-radius: 999px; border: 1px solid; }
.chip.green  { color: var(--emerald); border-color: #c4dd92; background: var(--emerald-soft); }
.chip.amber  { color: var(--amber);   border-color: #f0cf8e; background: var(--amber-soft); }
.chip.red    { color: var(--crimson); border-color: #f3b6b6; background: var(--crimson-soft); }
.chip.blue   { color: var(--blue);    border-color: #b6cefb; background: var(--blue-soft); }
.chip.indigo { color: var(--indigo);  border-color: #c7c4f5; background: var(--indigo-soft); }
kbd { font-family: var(--font); font-size: 12px; font-weight: 600; background: var(--kbd-bg); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; padding: 2px 8px; color: var(--text); min-width: 22px; display: inline-block; text-align: center; }

/* Screenshots */
figure.shot { margin: 22px 0; }
figure.shot .shot-frame {
  border: 2px dashed var(--border); border-radius: var(--radius);
  background: repeating-linear-gradient(45deg, var(--shot-a), var(--shot-a) 14px, var(--shot-b) 14px, var(--shot-b) 28px);
  min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--text-faint); text-align: center; padding: 24px;
}
figure.shot .shot-ico { font-size: 30px; opacity: 0.7; }
figure.shot .shot-label { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
figure.shot .shot-hint { font-size: 11.5px; color: var(--text-faint); max-width: 380px; }
figure.shot img.shot-img {
  display: block; width: 100%; height: auto; border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: 0 4px 20px var(--shadow-soft); background: #0a0c0f;
}
figure.shot figcaption { margin-top: 9px; font-size: 13px; color: var(--text-dim); text-align: center; font-style: italic; }

/* Theme toggle */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px; cursor: pointer;
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
  font-size: 15px; line-height: 1; flex-shrink: 0; transition: background 0.15s, border-color 0.15s;
}
.theme-toggle:hover { border-color: var(--emerald); background: var(--emerald-soft); }
.theme-toggle .sun { display: none; }
.theme-toggle .moon { display: inline; }
:root[data-theme="dark"] .theme-toggle .sun { display: inline; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }

/* Tier cards */
.tiers { display: grid; grid-template-columns: repeat(4,1fr); gap: 13px; margin: 22px 0; }
.tier { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 16px; display: flex; flex-direction: column; }
.tier.feat { border-color: var(--indigo); box-shadow: 0 0 0 1px var(--indigo-soft); }
.tier .tname { font-weight: 700; font-size: 15px; }
.tier .price { font-size: 24px; font-weight: 800; margin: 8px 0 2px; letter-spacing: -0.02em; color: var(--text); }
.tier .price small { font-size: 13px; color: var(--text-faint); font-weight: 500; }
.tier .tag { font-size: 12.5px; color: var(--text-faint); margin-bottom: 13px; min-height: 34px; }
.tier ul { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.tier ul li { padding-left: 19px; position: relative; margin: 7px 0; color: var(--text-dim); }
.tier ul li::before { content: "✓"; position: absolute; left: 0; color: var(--emerald); font-weight: 700; }

/* FAQ */
details { border: 1px solid var(--border); border-radius: 10px; padding: 0 17px; margin: 10px 0; background: var(--bg-card); }
details summary { cursor: pointer; padding: 13px 0; font-weight: 600; color: var(--text); list-style: none; display: flex; justify-content: space-between; align-items: center; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--emerald); font-size: 20px; }
details[open] summary::after { content: "−"; }
details[open] summary { border-bottom: 1px solid var(--border-soft); }
details .body { padding: 4px 0 14px; }
details .body p:first-child { margin-top: 13px; }

/* Prev/next */
.docnav { display: flex; justify-content: space-between; gap: 14px; margin-top: 60px; padding-top: 26px; border-top: 1px solid var(--border); }
.docnav a {
  flex: 1; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px; background: var(--bg-card); color: var(--text);
}
.docnav a:hover { border-color: var(--emerald); text-decoration: none; background: var(--emerald-soft); }
.docnav a.next { text-align: right; }
.docnav .dir { font-size: 12px; color: var(--text-faint); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.docnav .ttl { font-weight: 650; font-size: 15px; margin-top: 2px; }
.docnav a.empty { visibility: hidden; }

hr.soft { border: none; border-top: 1px solid var(--border-soft); margin: 28px 0; }

footer.docfoot { border-top: 1px solid var(--border); padding: 26px clamp(22px,5vw,64px); color: var(--text-faint); font-size: 13px; }

/* Responsive */
@media (max-width: 920px) {
  .menu-toggle { display: inline-block; }
  aside.sidebar {
    position: fixed; top: 55px; left: 0; z-index: 55;
    transform: translateX(-100%); transition: transform 0.22s ease;
    box-shadow: 4px 0 24px var(--shadow-soft); height: calc(100vh - 55px);
  }
  body.nav-open aside.sidebar { transform: translateX(0); }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .tiers { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) { .tiers { grid-template-columns: 1fr; } .docnav { flex-direction: column; } }
