:root {
  --ink: #2a211a; --muted: #6b5f55; --line: #e8ddd0; --bg: #fdfaf5; --panel: #ffffff;
  /* palette derived from #f4922c (orange) and #b8892b (gold) */
  --brand: #f4922c; --brand-dark: #c4681a; --brand-deep: #8a4a10; --gold: #b8892b; --gold-dark: #8f6a1f;
  --dark: #33241a; --on-brand: #2b1a0c; --mark: #ffe2bf;
  --red: #b23a3a; --green: #2f7a4f; --amber: #a86a12; --blue: #8f6a1f; --grey: #6b7280;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font-family: Georgia, "Times New Roman", "Liberation Serif", serif; line-height: 1.55; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: "Segoe UI", "Helvetica Neue", Arial, "Liberation Sans", sans-serif; line-height: 1.25; color: var(--dark); }
h1 { font-size: 1.7rem; margin: 0.6em 0 0.4em; }
h2 { font-size: 1.25rem; margin: 1.6em 0 0.5em; }
h3 { font-size: 1.05rem; margin: 1.2em 0 0.4em; }
code { font-family: Consolas, "Liberation Mono", monospace; font-size: 0.92em; background: #f1f1ec; padding: 0 3px; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 18px; }
mark { background: var(--mark); padding: 0 1px; }

/* header */
.top { background: var(--dark); color: #fff; border-bottom: 3px solid var(--brand); }
.top .wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.logo { font-family: "Segoe UI", Arial, sans-serif; font-size: 1.5rem; font-weight: 700; letter-spacing: 0.02em; color: #fff; }
.logo .lex { color: #fff; } .logo .justa { color: var(--brand); }
.logo:hover { text-decoration: none; }
.topsearch { flex: 1 1 320px; display: flex; }
.topsearch input { flex: 1; padding: 7px 10px; border: 1px solid #1f140c; border-radius: 4px 0 0 4px; font-size: 0.95rem; min-width: 0; }
.topsearch button, .bigsearch button, .filters button { background: var(--brand); color: var(--on-brand); border: 0; padding: 7px 14px; font-weight: 600; cursor: pointer; border-radius: 0 4px 4px 0; }
.mainnav a { color: #f3e6d6; margin-left: 16px; font-family: "Segoe UI", Arial, sans-serif; font-size: 0.95rem; }
.mainnav a:hover { color: #fff; }

/* home */
.hero { text-align: center; padding: 36px 0 18px; }
.hero h1 { font-size: 2.3rem; margin: 0 0 0.3em; } .hero h1 em { color: var(--brand); font-style: normal; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 760px; margin: 0 auto 1em; }
.bigsearch { max-width: 720px; margin: 0 auto; display: flex; flex-wrap: wrap; }
.bigsearch input { flex: 1 1 400px; padding: 12px 14px; font-size: 1.1rem; border: 2px solid var(--brand); border-radius: 4px 0 0 4px; min-width: 0; }
.bigsearch button { font-size: 1.05rem; padding: 12px 22px; }
.modes { flex-basis: 100%; margin-top: 8px; font-size: 0.95rem; color: var(--muted); }
.modes label { margin-right: 18px; }
.hint { color: var(--muted); font-size: 0.92rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.famlist { list-style: none; padding: 0; margin: 0; columns: 2; }
.famlist li { display: flex; justify-content: space-between; border-bottom: 1px dotted var(--line); padding: 4px 0; break-inside: avoid; }
.n { color: var(--muted); font-size: 0.85rem; font-family: "Segoe UI", Arial, sans-serif; white-space: nowrap; }

/* act lists */
.actlist { list-style: none; padding: 0; margin: 0; }
.act-row { padding: 9px 0; border-bottom: 1px solid var(--line); }
.act-name { font-family: "Segoe UI", Arial, sans-serif; font-weight: 700; }
.act-title { color: var(--ink); }
.act-title.small { display: block; color: var(--muted); font-size: 0.88rem; }
.act-meta { color: var(--muted); font-size: 0.85rem; font-family: "Segoe UI", Arial, sans-serif; margin-top: 2px; }
.snip { margin: 5px 0 0 14px; font-size: 0.93rem; color: #333; border-left: 3px solid var(--line); padding-left: 8px; }
.compact li { padding: 4px 0; border-bottom: 1px dotted var(--line); }
.compact .act-title { font-size: 0.92rem; }
.count { font-weight: normal; color: var(--muted); font-size: 0.95rem; }
.warn { background: #fff0e0; border: 1px solid var(--brand); padding: 8px 12px; border-radius: 4px; }
.notice { background: #fff3e4; border: 1px solid #f2cfa3; padding: 8px 12px; border-radius: 4px; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; background: var(--panel); border: 1px solid var(--line); padding: 10px 14px; border-radius: 4px; font-size: 0.92rem; font-family: "Segoe UI", Arial, sans-serif; }
.filters label { display: flex; flex-direction: column; gap: 3px; color: var(--muted); }
.filters .modes { flex-basis: auto; margin: 0 0 4px; display: flex; gap: 14px; align-items: center; }
.filters .modes label { flex-direction: row; align-items: center; gap: 4px; color: var(--ink); }
.filters input, .filters select { padding: 5px 7px; border: 1px solid #b9c0cc; border-radius: 3px; font-size: 0.92rem; }
.filters input[type=number] { width: 6em; }
.filters button { border-radius: 3px; }

/* browse */
.browse { display: grid; grid-template-columns: 240px 1fr; gap: 30px; margin-top: 10px; }
.facets { font-family: "Segoe UI", Arial, sans-serif; font-size: 0.9rem; }
.facets h3 { margin: 14px 0 6px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.facets ul { list-style: none; margin: 0; padding: 0; }
.facets li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.facets li.on a { font-weight: 700; color: var(--brand-deep); }
.yearbar { font-family: "Segoe UI", Arial, sans-serif; font-size: 0.85rem; line-height: 1.9; }
.yearbar a { display: inline-block; padding: 0 5px; border: 1px solid var(--line); border-radius: 3px; margin: 0 3px 3px 0; background: var(--panel); }
.yearbar a.on { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.sortbar { font-family: "Segoe UI", Arial, sans-serif; font-size: 0.88rem; color: var(--muted); }
.pager { margin: 18px 0; font-family: "Segoe UI", Arial, sans-serif; }
.pager a, .pager span { display: inline-block; padding: 4px 9px; margin-right: 4px; border: 1px solid var(--line); border-radius: 3px; background: var(--panel); }
.pager .cur { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }

/* act page */
.act-head { border-bottom: 2px solid var(--brand); padding-bottom: 10px; }
.kicker { font-family: "Segoe UI", Arial, sans-serif; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-top: 16px; }
.act-head h1 { margin: 0.2em 0 0.1em; }
.act-fulltitle { font-size: 1.15rem; margin: 0.2em 0 0.6em; }
.badges { margin: 0 0 0.6em; }
.badge { display: inline-block; font-family: "Segoe UI", Arial, sans-serif; font-size: 0.75rem; font-weight: 600; padding: 1px 8px; border-radius: 10px; color: #fff; background: var(--grey); }
.badge.red { background: var(--red); } .badge.green { background: var(--green); } .badge.amber { background: var(--amber); } .badge.blue { background: var(--blue); } .badge.grey { background: var(--grey); }
.meta { display: grid; grid-template-columns: max-content 1fr; gap: 3px 14px; font-size: 0.93rem; margin: 0; }
.meta dt { color: var(--muted); font-family: "Segoe UI", Arial, sans-serif; }
.meta dd { margin: 0; }
.relations { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 6px 16px 14px; margin-top: 18px; }
.relations h2 { margin-top: 0.5em; }
.relcols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.relcol h4 { margin: 0.9em 0 0.2em; font-size: 0.92rem; color: var(--ink); }
.rel { list-style: none; padding: 0; margin: 0; font-size: 0.92rem; }
.rel li { padding: 2px 0; border-bottom: 1px dotted var(--line); }
.rel .dt { color: var(--muted); font-size: 0.85rem; }
.toc { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 6px 16px 10px; margin-top: 18px; font-family: "Segoe UI", Arial, sans-serif; font-size: 0.9rem; max-height: 420px; overflow: auto; }
.toc h2 { margin-top: 0.5em; }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li.d1 { padding-left: 16px; } .toc li.d2 { padding-left: 32px; } .toc li.d3 { padding-left: 48px; } .toc li.d4 { padding-left: 64px; }
.act-body { margin-top: 22px; max-width: 820px; }
.act-body p { margin: 0.35em 0; text-align: justify; hyphens: auto; }
.act-body pre { white-space: pre; overflow-x: auto; font-size: 0.8rem; line-height: 1.3; background: #f6f6f2; padding: 8px; border: 1px solid var(--line); }
.struct > h2, .struct > h3, .struct > h4, .struct > h5 { text-align: center; margin: 1.6em 0 0.6em; }
.struct .lbl { display: block; font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.struct .hd { display: block; }
.anexa > h3 { border-top: 1px solid var(--line); padding-top: 1em; margin-top: 2em; }
.anexa .lbl { color: var(--gold-dark); }
.art { margin: 1.1em 0; }
.art > h4 { margin: 0 0 0.2em; font-size: 1rem; }
.art > h4 a { color: var(--dark); }
.art > h4 .hd { font-weight: normal; color: var(--muted); }
.alin { position: relative; padding-left: 2.2em; margin: 0.25em 0; }
.alnum { position: absolute; left: 0; color: var(--muted); font-family: "Segoe UI", Arial, sans-serif; font-size: 0.9rem; top: 0.15em; }
.blk.preambul { font-style: italic; color: #333; margin: 1em 0; }
.blk.nota { font-size: 0.9rem; color: #444; border-left: 3px solid var(--gold); padding-left: 10px; margin: 0.8em 0; }
.blk.semnaturi { margin-top: 2em; }
.blk.semnaturi pre { background: none; border: 0; font-family: inherit; font-size: 0.95rem; white-space: pre-wrap; }
.blk.corp p, .blk.bloc p { text-align: left; }
.act-body a.ref { border-bottom: 1px dotted var(--brand-dark); }
.u { display: block; position: relative; top: -60px; visibility: hidden; height: 0; }
:target > h4, :target > h3, :target.alin { background: var(--mark); }
.foot-note { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 8px; }

/* statistics */
.stats { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.stats th { text-align: left; font-weight: normal; padding: 2px 8px 2px 0; white-space: nowrap; }
.stats td.num { text-align: right; padding: 2px 8px; font-family: "Segoe UI", Arial, sans-serif; white-space: nowrap; }
.stats td.barcell { width: 40%; }
.bar { display: block; height: 10px; background: var(--brand); opacity: 0.85; border-radius: 2px; }
.toplist li { margin: 4px 0; }
.prose { max-width: 780px; }
.prose li { margin: 0.3em 0; }

/* legal pages, footer links, cookie banner */
.legal-links { margin-top: 8px; }
.operator { font-size: 0.8rem; }
.prose h2 { margin-top: 1.6em; }
.prose table { border-collapse: collapse; font-size: 0.92rem; margin: 0.6em 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: 4px 8px; text-align: left; vertical-align: top; }
.cookie-bar { position: fixed; right: 16px; bottom: 16px; max-width: 380px; background: var(--dark); color: #fff; padding: 14px 16px; border-top: 3px solid var(--brand); border-radius: 6px; font-family: "Segoe UI", Arial, sans-serif; font-size: 0.88rem; line-height: 1.45; box-shadow: 0 4px 18px rgba(0,0,0,0.3); z-index: 50; }
.cookie-bar[hidden] { display: none; }
.cookie-bar p { margin: 0; }
.cookie-bar a { color: var(--brand); text-decoration: underline; }
.cookie-bar .btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cookie-bar button { background: var(--brand); color: var(--on-brand); border: 0; padding: 7px 14px; font-weight: 600; cursor: pointer; border-radius: 4px; }
.cookie-bar button.secondary { background: transparent; border: 1px solid #a68a70; color: #fff; font-weight: normal; }
@media (max-width: 480px) { .cookie-bar { left: 10px; right: 10px; bottom: 10px; max-width: none; } }

/* footer */
.foot { margin-top: 50px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; padding: 16px 0 30px; }
.foot p { margin: 0.3em 0; }

@media (max-width: 800px) {
  .grid2, .browse, .relcols { grid-template-columns: 1fr; }
  .famlist { columns: 1; }
  .hero h1 { font-size: 1.7rem; }
  .mainnav { flex-basis: 100%; } .mainnav a { margin: 0 16px 0 0; }
  .meta { grid-template-columns: 1fr; gap: 0; } .meta dt { margin-top: 6px; }
  .act-body p { text-align: left; }
}

/* contact form */
.contact { max-width: 620px; font-family: "Segoe UI", Arial, sans-serif; font-size: 0.95rem; }
.contact label { display: block; margin: 12px 0 4px; color: var(--muted); }
.contact input[type=text], .contact input[type=email], .contact select, .contact textarea { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid #b9c0cc; border-radius: 4px; font-size: 1rem; font-family: inherit; background: #fff; }
.contact textarea { font-family: Georgia, serif; resize: vertical; }
.contact .req { color: var(--red); }
.contact .hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }
.contact .captcha { margin-top: 14px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
.contact .captcha img { display: block; border: 1px solid var(--line); border-radius: 4px; }
.contact .captcha input { max-width: 200px; letter-spacing: 0.15em; text-transform: uppercase; }
.contact .captcha label { margin-top: 8px; }
.contact button { background: var(--brand); color: var(--on-brand); border: 0; padding: 10px 22px; font-weight: 600; font-size: 1rem; cursor: pointer; border-radius: 4px; }
.warn ul { margin: 0; padding-left: 20px; }
