/* Contab SQL - documentație - stil modern responsive
   Rescris 2026 (înlocuiește stilul din 2001). */

:root {
  --brand: #ff6600;
  --brand-dark: #cc5200;
  --link: #0b62c4;
  --ink: #1f2733;
  --muted: #5b6672;
  --line: #e3e8ef;
  --bg: #ffffff;
  --soft: #f6f8fb;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  max-width: 880px;
  margin: 0 auto;
  padding: 24px clamp(16px, 4vw, 40px) 64px;
}

p { margin: 0 0 14px; }

td, li, dd, dt { font-family: inherit; font-size: inherit; }

small { font-size: 0.8rem; color: var(--muted); }

big { font-size: 1.15rem; font-weight: 600; }

strong { font-weight: 700; }

h1, h2, h3, h4, h5, h6 {
  font-family: inherit;
  line-height: 1.3;
  color: var(--ink);
  margin: 1.6em 0 0.5em;
  font-weight: 700;
}

h1 { font-size: 1.9rem; }
h2 {
  font-size: 1.5rem;
  padding-bottom: 0.3em;
  border-bottom: 2px solid var(--brand);
}
h2 center { display: block; }
h3 { font-size: 1.2rem; color: var(--brand-dark); }
h4 { font-size: 1.05rem; }
h5 { font-size: 0.95rem; }
h6 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

code, pre {
  font-family: "Cascadia Code", "Courier New", monospace;
  font-size: 0.9em;
}
code { color: var(--brand-dark); background: var(--soft); padding: 1px 5px; border-radius: 4px; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}

ul, ol { padding-left: 1.4em; margin: 0 0 14px; }
li { margin: 3px 0; }

/* Tabele - inclusiv barele de navigare prev/next și tabelele de date */
table { border-collapse: collapse; width: 100%; margin: 16px 0; }
th, td { padding: 8px 10px; text-align: left; vertical-align: top; }
/* Respectă alinierea din atributele HTML vechi (align="right"/"center") */
td[align="right"], th[align="right"] { text-align: right; }
td[align="center"], th[align="center"] { text-align: center; }
td[align="left"], th[align="left"] { text-align: left; }
thead th { background: var(--soft); border-bottom: 2px solid var(--line); }
tbody tr + tr td { border-top: 1px solid var(--line); }

/* Bara de navigare (tabelul cu 2 celule prev/next din paginile de conținut) */
body > table:first-of-type,
body > table:last-of-type {
  background: var(--soft);
  border-radius: 8px;
  margin: 0 0 20px;
}
body > table:first-of-type td,
body > table:last-of-type td { border: 0; font-weight: 600; }
body > table:last-of-type { margin: 28px 0 0; }

/* Blocuri de cod / exemple din documentația veche */
.source {
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  padding: 12px 14px;
  background: var(--soft);
  border-radius: 6px;
  overflow-x: auto;
}
.output {
  border: 1px solid var(--line);
  padding: 12px 14px;
  background: #fff8ef;
  border-radius: 6px;
  overflow-x: auto;
}
.fwx { color: var(--link); }
.comment { color: var(--muted); font-style: italic; }

@media (max-width: 600px) {
  body { font-size: 15px; padding: 16px; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
}
