/* ==========================================================================
   EBENEZER Help Center
   --------------------------------------------------------------------------
   Design intent: the help center should look like the product it documents.
   Tokens below mirror web/static/css/brand.css so a pastor moving between
   app.ebenezer.rest and the guides never feels like they changed websites.

   Body copy is a UI sans, not a serif. Serif body text reads like a church
   bulletin; these are software instructions and want the same voice as the
   screen being described. Georgia survives in exactly one place — the
   scripture line — where it is the brand signature rather than an accident.
   ========================================================================== */

:root {
  /* Brand — matches web/static/css/brand.css */
  --navy:        #1a365d;
  --navy-deep:   #152238;
  --blue:        #2c5282;
  --gold:        #d4af37;
  --gold-dark:   #b8941f;

  /* Neutrals */
  --ink:         #1f2937;
  --ink-soft:    #4b5563;
  --ink-faint:   #6b7280;
  --rule:        #e5e7eb;
  --rule-strong: #d1d5db;
  --page:        #ffffff;
  --panel:       #f9fafb;

  /* Semantic */
  --tip-bg:      #eff6ff;
  --tip-edge:    #3b82f6;
  --warn-bg:     #fffbeb;
  --warn-edge:   #d4af37;
  --stop-bg:     #fef2f2;
  --stop-edge:   #ef4444;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;

  --sidebar-w: 290px;
  --measure: 720px;      /* content column: ~75 characters per line */
  --radius: 10px;
  --shadow: 0 1px 3px rgba(26, 54, 93, .08), 0 8px 24px rgba(26, 54, 93, .06);
}

* { box-sizing: border-box; }

html { font-size: 17px; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------- masthead
   Mirrors the marketing site header (public_html/faq.html) exactly so the help
   center wears the same nav everywhere it's served. Scoped under `header` so
   the two-column shell's <nav class="sidenav"> is untouched. Kept in-flow
   sticky (not fixed) to suit the help layout. */

header {
  background: #152238;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header nav.container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 20px;
}

header .logo-link { display: block; text-decoration: none; transition: opacity 0.3s; }
header .logo-link:hover { opacity: 0.8; }
header .logo-img { height: 40px; width: auto; }

.nav-links { display: flex; list-style: none; gap: 2rem; margin: 0; padding: 0; }
.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  padding: 0.5rem 1rem;
  border-radius: 6px;
}
.nav-links a:hover { color: #d4af37; background: rgba(212, 175, 55, 0.1); }

.nav-cta {
  background: #d4af37;
  color: #1a365d !important;
  font-weight: bold;
  border-radius: 8px;
  padding: 0.5rem 1.5rem !important;
}
.nav-cta:hover { background: #b8941f !important; color: #1a365d !important; }

.nav-cta-secondary {
  border: 2px solid #d4af37 !important;
  color: #d4af37 !important;
  font-weight: bold;
  border-radius: 8px;
  padding: 0.4rem 1rem !important;
  background: transparent;
}
.nav-cta-secondary:hover { background: rgba(212, 175, 55, 0.15) !important; }

.hamburger { display: none; flex-direction: column; cursor: pointer; padding: 10px; z-index: 1002; }
.hamburger span { width: 25px; height: 3px; background-color: #d4af37; margin: 3px 0; transition: 0.3s; border-radius: 3px; }
.hamburger.active span:nth-child(1) { transform: rotate(-45deg) translate(-5px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(45deg) translate(-5px, -6px); }

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: #152238;
    flex-direction: column;
    padding: 2rem 0;
    gap: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 999;
  }
  .nav-links.active { display: flex; }
  .nav-links li { width: 100%; text-align: center; padding: 0; }
  .nav-links a { display: block; padding: 1rem; border-radius: 0; width: 100%; }
  .nav-links a:hover { background: rgba(212, 175, 55, 0.2); }
  .nav-cta { margin: 1rem 20px 0; display: inline-block; width: calc(100% - 40px); }
  .nav-cta-secondary { margin: 1rem 20px; display: inline-block; width: calc(100% - 40px); }
  .hamburger { display: flex; }
}

/* ------------------------------------------------------------------ layout */

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: 3rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
  align-items: start;
}

main { max-width: var(--measure); min-width: 0; }

/* ----------------------------------------------------------------- sidebar */

.sidenav {
  position: sticky;
  top: 5.5rem;
  font-size: .94rem;
}

.sidenav h2 {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-faint);
  margin: 1.6rem 0 .5rem;
  font-weight: 700;
}

.sidenav h2:first-child { margin-top: 0; }

.sidenav ol, .sidenav ul { list-style: none; margin: 0; padding: 0; }

.sidenav li { margin: 0; }

.sidenav a {
  display: block;
  padding: .42rem .7rem;
  border-radius: 7px;
  color: var(--ink-soft);
  text-decoration: none;
  border-left: 3px solid transparent;
}

.sidenav a:hover { background: var(--panel); color: var(--navy); }

.sidenav a[aria-current="page"] {
  background: var(--panel);
  color: var(--navy);
  font-weight: 600;
  border-left-color: var(--gold);
}

.sidenav .filter {
  width: 100%;
  font: inherit;
  font-size: .92rem;
  padding: .5rem .7rem;
  border: 1px solid var(--rule-strong);
  border-radius: 7px;
  margin-bottom: 1.2rem;
}

.sidenav .filter:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  border-color: transparent;
}

.sidenav li[hidden] { display: none; }

/* -------------------------------------------------------------- typography */

h1 {
  font-size: 2.1rem;
  line-height: 1.2;
  color: var(--navy);
  margin: 0 0 .6rem;
  letter-spacing: -.015em;
}

h2 {
  font-size: 1.4rem;
  color: var(--navy);
  margin: 2.6rem 0 .8rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--rule);
}

h3 { font-size: 1.1rem; color: var(--navy); margin: 1.8rem 0 .5rem; }

p { margin: 0 0 1rem; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--navy); }

strong { font-weight: 650; color: var(--ink); }

/* An on-screen label the reader must find. Rendered as a subtle chip so the
   eye can jump between the sentence and the button in the screenshot. */
.ui {
  font-weight: 600;
  color: var(--navy);
  background: var(--panel);
  border: 1px solid var(--rule-strong);
  border-radius: 5px;
  padding: .05em .4em;
  white-space: nowrap;
}

/* ------------------------------------------------------------- page intro */

.intro {
  background: var(--panel);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.3rem;
  margin: 1.4rem 0 2rem;
}

.intro p { margin: 0; }
.intro p + p { margin-top: .5rem; }

.intro .time {
  font-size: .88rem;
  color: var(--ink-faint);
  font-weight: 600;
}

/* ------------------------------------------------------------------- steps */

/* The gold numbered discs deliberately match the gold markers burned into the
   screenshots by tools/annotate.py. Step 3 in the text and marker 3 in the
   picture are the same object; that correspondence is what lets someone read
   the picture without reading the caption. */

ol.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

ol.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1.3rem 3.1rem;
  margin: 0;
}

ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -.1rem;
  width: 2.1rem;
  height: 2.1rem;
  line-height: 2.1rem;
  text-align: center;
  background: var(--gold);
  color: var(--navy);
  border-radius: 50%;
  font-weight: 700;
  font-size: .95rem;
}

/* Connector line, so a long list reads as one sequence. */
ol.steps > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 1.05rem;
  top: 2.3rem;
  bottom: .2rem;
  width: 2px;
  background: var(--rule);
}

ol.steps > li > :last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------- media */

/* Accepts an <img> or a looping <video> with identical markup, so screenshots
   can be swapped for short screencasts later without touching any page. */

figure.shot {
  margin: 1.6rem 0 2rem;
}

figure.shot img,
figure.shot video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* Frame + shadow are baked into the PNG by annotate.py, so nothing is drawn
   here. A placeholder (missing file) still needs a visible box, though. */
figure.shot img:not([src$=".png"]):not([src$=".webp"]) {
  background: var(--panel);
  border: 2px dashed var(--rule-strong);
  min-height: 120px;
}

figure.shot figcaption {
  font-size: .88rem;
  color: var(--ink-faint);
  margin-top: .5rem;
  padding-left: .2rem;
}

/* ---------------------------------------------------------------- callouts */

.note {
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  border: 1px solid;
}

.note > :last-child { margin-bottom: 0; }

.note .label {
  display: block;
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  margin-bottom: .35rem;
}

.note.tip     { background: var(--tip-bg);  border-color: #bfdbfe; }
.note.tip .label     { color: #1d4ed8; }

.note.warning { background: var(--warn-bg); border-color: #fde68a; }
.note.warning .label { color: #92400e; }

/* Reserved for the handful of actions that reach the congregation and cannot
   be undone: publishing clips, sending the newsletter, publishing the blog. */
.note.stop    { background: var(--stop-bg); border-color: #fecaca; }
.note.stop .label    { color: #b91c1c; }

/* ------------------------------------------------------------------- cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  padding: 0;
  list-style: none;
}

.cards a {
  display: block;
  height: 100%;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  background: var(--page);
  transition: box-shadow .15s, border-color .15s;
}

.cards a:hover { border-color: var(--gold); box-shadow: var(--shadow); }

.cards .n {
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  color: var(--navy);
  background: var(--gold);
  border-radius: 999px;
  padding: .1rem .55rem;
  margin-bottom: .5rem;
}

.cards strong { display: block; color: var(--navy); margin-bottom: .2rem; }
.cards span { font-size: .9rem; color: var(--ink-soft); }

/* --------------------------------------------------------------- prev/next */

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: .93rem;
}

.pager a {
  text-decoration: none;
  font-weight: 600;
  padding: .55rem 1rem;
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  color: var(--navy);
}

.pager a:hover { border-color: var(--gold); background: var(--panel); }

/* ------------------------------------------------------------------ footer */

.foot {
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
  padding: 2rem 1.5rem 3rem;
  text-align: center;
  color: var(--ink-faint);
  font-size: .88rem;
}

.foot .scripture {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------------- print */

@media print {
  header, .sidenav, .pager { display: none; }
  .shell { display: block; padding: 0; }
  figure.shot img { border: 1px solid var(--rule-strong); }
}

/* --------------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem 1.1rem 3rem;
  }

  .sidenav {
    position: static;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    background: var(--panel);
  }

  h1 { font-size: 1.7rem; }
  html { font-size: 16px; }
}

@media (max-width: 560px) {
  .pager { flex-direction: column; }
  .pager a { text-align: center; }
}
