/* Ghid NexiGrow — pagină publică, stilul „hârtie" al NexiGrow
   (aceleași tokenuri ca /tenant/nexipilot/blog.ejs din aplicație, vezi
   public/css/nexibook/nexigrow-editorial.css + studio-atelier.css).

   Rescris 2026-08-25 la cererea owner-ului: „ghidul să arate ca restul
   paginilor NexiGrow", nu ca documentul PDF pandoc de dinainte (stil
   propriu, DejaVu Sans, aur #c9a227, page-break-uri de print).

   FONTURI — Fraunces (display) + Lora (corp), încărcate din Google Fonts
   în pandoc-template.html (preconnect + stylesheet), exact pattern-ul
   folosit de blog.ejs. NU „Playfair Display": contractul vechi (
   /tmp/nexigrow-kit-contract.md) documenta Playfair fiindcă asta declară
   blog.ejs în <style>-ul lui local (--pg-display), dar pe pagina live
   regula sitewide din studio-atelier.css (`body:has(#tenantSidebar) h1,
   h2 { font-family: var(--font-display) !important }`) are specificitate
   mai mare — (1,0,2) vs (1,0,1) — și câștigă cu Fraunces. Măsurat în
   browser 2026-08-25 pe pagina de referință: h1 randează Fraunces. Aici,
   document de sine stătător fără acea coliziune de specificitate, aplic
   Fraunces peste tot pentru consistență vizuală (h1/h2/h3) — reproduc
   intenția sistemului, nu accidentul de selector care lasă h3 pe Playfair
   în aplicație.

   TEMĂ — o singură temă, luminoasă („hârtie" caldă), fără dark mode.
   Pagina publică nu are switch de temă și nu injectează [data-theme] —
   un prefers-color-scheme fără control ar produce o pagină pe jumătate
   migrată. Dacă se cere vreodată dark, se adaugă explicit, nu implicit.

   CONTRAST — pragurile WCAG măsurate în sursă (vezi nexigrow-editorial.css
   header): --pg-focus (#a8761f, ~3.75:1 pe hârtie) trece doar pragul de
   3:1 pentru elemente NON-text (subliniere, punct decorativ, bară) — NU
   se folosește niciodată ca și culoare de TEXT. Linkurile din corpul de
   text rămân --pg-ink (cerneală, >13:1) cu subliniere aurie decorativă,
   exact ca #ngBlogPage a în blog.ejs.

   STRUCTURA HTML nu se atinge de mână — orice clasă nouă (.pg-wrap,
   .pg-article) vine din pandoc-template.html, ca să supraviețuiască
   următoarei recompilări (`pandoc GHID.md --template=... -o index.html`).
*/

:root {
  --pg-paper: #faf8f4;
  --pg-card: #f7f3ec;
  --pg-card-2: #f3eee6;
  --pg-ink: #111111;
  --pg-ink-soft: #2a2925;
  --pg-mute: #6f6a60;
  --pg-rule: #e7e0d6;
  --pg-rule-soft: #e8e1d8;
  --pg-accent: #c18a2d;   /* decorativ, NICIODATĂ text — 2.85:1 */
  --pg-focus: #a8761f;    /* decorativ (subliniere/punct), NICIODATĂ text — ~3.75:1 */
  --pg-ok: #3a7a3a;
  --pg-danger: #b33a3a;
  --pg-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --pg-body: 'Lora', Georgia, 'Times New Roman', serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--pg-paper);
  color: var(--pg-ink);
  font-family: var(--pg-body);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

/* ── Coloana unică, centrată ─────────────────────────────────────────── */
.pg-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 28px 96px;
}
@media (max-width: 640px) {
  .pg-wrap { padding: 32px 18px 64px; }
}

/* ── Titlu (header#title-block-header) + h1 duplicat din corpul GHID.md —
   aceeași regulă acoperă ambele, fără să distingem structura. ──────────── */
.pg-wrap h1 {
  font-family: var(--pg-display);
  font-weight: 600;
  font-variation-settings: "opsz" 96;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-size: 28px;
  color: var(--pg-ink);
  margin: 0 0 10px;
}
#title-block-header { margin-bottom: 4px; }
#title-block-header h1.title { margin-bottom: 0; }

/* Subtitlu: primul h3 imediat după h1-ul din corp ("Pas cu pas, de la
   zero. Nimic complicat.") — selector structural, nu ID/clasă nouă. */
.pg-article > h1 + h3:first-of-type {
  font-family: var(--pg-body);
  font-weight: 400;
  font-style: normal;
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0;
  color: var(--pg-mute);
  max-width: 60ch;
  margin: 0 0 40px;
  padding: 0;
  border: none;
}

/* ── h2 / h3 din corpul ghidului ─────────────────────────────────────── */
.pg-article h2 {
  font-family: var(--pg-display);
  font-weight: 600;
  font-variation-settings: "opsz" 96;
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-size: 26px;
  color: var(--pg-ink);
  margin: 3rem 0 1rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--pg-rule);
}
.pg-article > h2:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }

.pg-article h3 {
  font-family: var(--pg-display);
  font-weight: 600;
  font-variation-settings: "opsz" 32;
  letter-spacing: -0.012em;
  line-height: 1.3;
  font-size: 19px;
  color: var(--pg-ink);
  margin: 1.8rem 0 0.6rem;
}

/* ── Corp de text ─────────────────────────────────────────────────────── */
.pg-article p {
  margin: 0 0 1.1rem;
  color: var(--pg-ink);
}
.pg-article strong { color: var(--pg-ink); font-weight: 600; }
.pg-article em { font-style: italic; }

.pg-article a {
  color: var(--pg-ink);
  text-decoration: underline;
  text-decoration-color: var(--pg-focus);
  text-underline-offset: 3px;
}
.pg-article a:hover { text-decoration-thickness: 2px; }
.pg-article a:focus-visible { outline: 2px solid var(--pg-focus); outline-offset: 2px; }

.pg-article code {
  font-family: 'Geist Mono', 'SF Mono', Menlo, monospace;
  font-size: 0.9em;
  background: var(--pg-card-2);
  border: 1px solid var(--pg-rule);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--pg-ink-soft);
}

.pg-article hr {
  border: none;
  border-top: 1px solid var(--pg-rule);
  margin: 2.5rem 0;
}

/* ── Liste ────────────────────────────────────────────────────────────── */
.pg-article ul, .pg-article ol {
  margin: 0 0 1.1rem;
  padding-left: 1.4rem;
}
.pg-article li { margin-bottom: 0.4rem; }
.pg-article li > ul, .pg-article li > ol { margin-top: 0.4rem; }

/* Cuprinsul: lista ordonată imediat după h3#cuprins, ca un card cu
   numerotare aurie — selector structural pe ID-ul deja existent, fără
   să adaug clase noi în markdown. */
#cuprins + ol {
  list-style: none;
  counter-reset: pg-toc;
  background: var(--pg-card);
  border: 1px solid var(--pg-rule);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin: 0 0 2rem;
}
#cuprins + ol li {
  counter-increment: pg-toc;
  position: relative;
  padding-left: 2.1rem;
  margin-bottom: 0.65rem;
  font-size: 15.5px;
}
#cuprins + ol li:last-child { margin-bottom: 0; }
#cuprins + ol li::before {
  content: counter(pg-toc);
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--pg-card-2);
  border: 1px solid var(--pg-rule);
  color: var(--pg-ink-soft);
  font-family: var(--pg-body);
  font-weight: 600;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Blockquote — cutii de atenționare, ca .blg-card / .blg-flash ───────── */
.pg-article blockquote {
  margin: 1.5rem 0;
  padding: 1.1rem 1.4rem;
  background: var(--pg-card);
  border-left: 3px solid var(--pg-focus);
  border-radius: 4px;
}
.pg-article blockquote p { margin: 0; color: var(--pg-ink-soft); }
.pg-article blockquote p + p { margin-top: 0.6rem; }

/* ── Tabele — antet cu majuscule mute, rânduri pare pe fundal de card,
   ca .blg-table din blog.ejs. ────────────────────────────────────────── */
.pg-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 15px;
}
.pg-article thead th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--pg-mute);
  border-bottom: 1px solid var(--pg-rule);
}
.pg-article tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--pg-rule-soft);
  vertical-align: top;
  color: var(--pg-ink-soft);
}
.pg-article tbody tr:last-child td { border-bottom: none; }
.pg-article tbody tr.even td { background: var(--pg-card-2); }
@media (max-width: 640px) {
  .pg-article table { display: block; overflow-x: auto; }
}

/* ── Imagini — capturi de ecran, cadru fin, colțuri rotunjite ────────────── */
.pg-article img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
  border: 1px solid var(--pg-rule);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(17, 17, 17, 0.08);
}

/* ── Mobil — fără scroll orizontal, spațiere redusă ──────────────────────── */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .pg-wrap h1 { font-size: 24px; }
  .pg-article h2 { font-size: 22px; margin: 2.25rem 0 0.85rem; }
  .pg-article h3 { font-size: 18px; }
}
