* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Manrope', sans-serif; }

.dochead {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 24px; background: var(--sidebar-bg); border-bottom: 1px solid var(--sidebar-border);
}
.dochead .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.dochead .brand img { height: 26px; display: block; }
.dochead .brand span { font-family: 'Newsreader', serif; font-size: 15px; color: var(--sidebar-ink); }
.dochead .back { font-size: 12.5px; color: var(--sidebar-muted); text-decoration: none; white-space: nowrap; }
.dochead .back:hover { color: var(--sidebar-ink); }
.dochead .toc-toggle {
  display: none; background: none; border: 1px solid var(--sidebar-border); color: var(--sidebar-ink);
  border-radius: 7px; padding: 7px 11px; font-size: 12.5px; font-family: inherit; cursor: pointer;
}

.docwrap { display: grid; grid-template-columns: 268px minmax(0, 1fr); max-width: 1180px; margin: 0 auto; }

.toc {
  position: sticky; top: 57px; align-self: start; max-height: calc(100vh - 57px); overflow-y: auto;
  padding: 28px 18px 40px 24px; border-right: 1px solid var(--border);
}
.toc .tocgroup { margin-bottom: 22px; }
.toc .tocgroup-h {
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px; padding-left: 10px;
}
.toc a {
  display: block; font-size: 13px; color: var(--ink-soft); text-decoration: none; padding: 6px 10px;
  border-radius: 7px; line-height: 1.4;
}
.toc a:hover { background: var(--surface-alt); color: var(--ink); }
.toc a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.doccontent { padding: 32px 32px 100px; min-width: 0; }
.doc-intro { margin-bottom: 36px; }
.doc-intro h1 { font-family: 'Newsreader', serif; font-weight: 500; font-size: 32px; margin: 0 0 10px; }
.doc-intro p { font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; max-width: 62ch; margin: 0; }

.doccat { margin-bottom: 8px; padding-top: 28px; border-top: 1px solid var(--border); }
.doccat:first-of-type { border-top: none; padding-top: 0; }
.doccat-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
/* Titlul de categorie folosește `.sec-head` (iconiță în cerc, shared/style.css), puțin mai mare decât în aplicație. */
.doccat-h h2.sec-head { font-size: 24px; margin: 0; }
.doccat-num { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--accent); }
.doccat-lede { font-size: 14px; color: var(--ink-soft); line-height: 1.6; max-width: 62ch; margin: 0 0 26px; }

.docsec { margin-bottom: 40px; scroll-margin-top: 70px; }
.docsec-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.docsec-h h3 { font-family: 'Newsreader', serif; font-weight: 500; font-size: 19px; margin: 0; }
.docsec p { font-size: 14px; line-height: 1.65; color: var(--ink); max-width: 68ch; margin: 0 0 14px; }
.docsec p.muted { color: var(--ink-soft); font-size: 13.5px; }
.docsec ul, .docsec ol { margin: 0 0 14px; padding-left: 22px; max-width: 66ch; }
.docsec li { font-size: 14px; line-height: 1.6; margin-bottom: 7px; }
.docsec ol.steps { list-style: none; padding-left: 0; counter-reset: step; }
.docsec ol.steps li {
  counter-increment: step; position: relative; padding-left: 34px; margin-bottom: 12px;
}
.docsec ol.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-family: 'JetBrains Mono', monospace; font-size: 11px;
  font-weight: 700; display: flex; align-items: center; justify-content: center;
}

.plan-badge {
  display: inline-flex; align-items: center; font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: .02em; padding: 3px 9px; border-radius: 999px; white-space: nowrap; font-weight: 600;
}
.plan-badge.all { background: var(--surface-alt); color: var(--ink-soft); border: 1px solid var(--border-strong); }
.plan-badge.pro { background: var(--amber-soft); color: #6B4416; border: 1px solid #E4C692; }
.plan-badge.review { background: var(--review-soft); color: #2C4468; border: 1px solid #C6D3EA; }

.honest {
  background: var(--review-soft); border: 1px solid #C6D3EA; border-radius: 10px; padding: 13px 16px;
  font-size: 13px; line-height: 1.6; color: #2C4468; margin: 0 0 14px; max-width: 68ch;
}
.honest b { color: #1E3352; }

table.doctable { border-collapse: collapse; width: 100%; max-width: 720px; font-size: 13.5px; margin: 0 0 14px; }
table.doctable th, table.doctable td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; }
table.doctable th { background: var(--surface-alt); font-weight: 700; font-size: 12px; }
table.doctable td.center, table.doctable th.center { text-align: center; }

.chanlist { display: grid; gap: 10px; margin: 0 0 14px; max-width: 68ch; }
.chan-card { border: 1px solid var(--border); border-radius: 10px; padding: 13px 15px; background: var(--surface); }
.chan-card .cn { font-weight: 700; font-size: 13.5px; margin-bottom: 4px; }
.chan-card .cd { font-size: 13px; color: var(--ink-soft); line-height: 1.55; }

@media (max-width: 900px) {
  .docwrap { grid-template-columns: 1fr; }
  .dochead .toc-toggle { display: inline-block; }
  .toc {
    position: fixed; top: 53px; left: 0; right: 0; bottom: 0; background: var(--bg); z-index: 15;
    max-height: none; border-right: none; padding: 18px 20px 40px; transform: translateX(-100%);
    transition: transform .2s ease;
  }
  .toc.open { transform: translateX(0); }
  .doccontent { padding: 22px 18px 80px; }
  .doc-intro h1 { font-size: 26px; }
  .doccat-h h2.sec-head { font-size: 20px; }
}
/* Telefon (375px): antetul și tabelele ieșeau din ecran (derulare orizontală a paginii) —
   linkul „Înapoi" se poate rupe pe două rânduri, iar tabelele derulează în interiorul lor. */
@media (max-width: 600px) {
  .dochead { padding: 12px 16px; gap: 10px; }
  .dochead .back { white-space: normal; text-align: right; }
  table.doctable { display: block; overflow-x: auto; }
}
.docsec h4 { font-family: 'Newsreader', serif; font-weight: 500; font-size: 18px; margin: 28px 0 10px; scroll-margin-top: 70px; }

/* Subsol pe toată lățimea și la baza paginii (cerere Costi, 2026-09-25) — scos din coloana de conținut. */
body { min-height: 100vh; display: flex; flex-direction: column; }
.docwrap { flex: 1 0 auto; width: 100%; }
body > .app-footer { flex-shrink: 0; }
