/* ==========================================================================
   Legal documents: /confidentialitate/ and /informatii-legale/
   Set like the rest of the site. From 900px: a label column (cols 1–3, the
   running number and the section title) and a text column (cols 4–11), the
   same split as the section heads on the home page. Hairline rules between
   sections. Only what site.css cannot do lives here.
   ========================================================================== */

/* ---------- Head: breadcrumb, label | title, subtitle, date ---------- */
.legal-head { padding-top: clamp(36px, 2rem + 2vw, 64px); padding-bottom: clamp(32px, 1.5rem + 2vw, 56px); }
.legal-head__grid { margin-top: clamp(24px, 1rem + 1.5vw, 40px); }
.legal-head__label { margin-bottom: 14px; }
.legal-head__title { max-width: 14em; }
.legal-head__sub { margin-top: 20px; max-width: 42rem; }
.legal-head__meta { margin-top: 22px; }
@media (min-width: 900px) {
  .legal-head__label { grid-column: 1 / span 3; margin: 0; padding-top: 18px; }
  .legal-head__body { grid-column: 4 / span 8; }
}

/* ---------- Intro: contents in the label column, "Pe scurt" in the text column ---------- */
.legal-intro { row-gap: 32px; padding-bottom: clamp(40px, 2rem + 2vw, 72px); }
@media (min-width: 900px) {
  .legal-intro__summary { grid-column: 4 / span 8; grid-row: 1; }
  .legal-intro__toc { grid-column: 1 / span 3; grid-row: 1; }
}
.legal-toc { margin-top: 12px; border-top: 1px solid var(--ink); counter-reset: none; }
.legal-toc > li { border-bottom: 1px solid var(--rule); }
.legal-toc a {
  display: flex; align-items: baseline; gap: 12px;
  min-height: 44px; padding: 11px 0;
  color: var(--ink); text-decoration: none;
  font-size: var(--fs-small); line-height: 1.45;
}
.legal-toc a:hover { color: var(--accent); }
.legal-toc a:hover .legal-toc__label { text-decoration: underline; text-underline-offset: 0.18em; }
.legal-toc .num { flex: 0 0 1.8em; font-size: 0.75rem; }

/* ---------- Sections ---------- */
.legal-doc { padding-bottom: var(--section-y); }
.legal-sec { border-top: 1px solid var(--rule); padding-block: clamp(32px, 1.5rem + 1.6vw, 56px); }
.legal-doc > .legal-sec:first-child { border-top-color: var(--ink); }
.legal-doc > .legal-sec:last-child { border-bottom: 1px solid var(--rule); }
.legal-sec__head { margin-bottom: 22px; }
.legal-sec__num { display: block; margin-bottom: 10px; }
.legal-sec__title { font-size: var(--fs-h3); line-height: 1.2; }
@media (min-width: 900px) {
  .legal-sec { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 var(--col-gap); align-items: start; }
  /* The title stays in view while its section scrolls past. */
  .legal-sec__head { grid-column: 1 / span 3; margin: 0; padding-right: 12px; position: sticky; top: 24px; }
  .legal-sec__body { grid-column: 4 / span 8; }
}

/* Running text of a section */
.legal-sec__body > * + * { margin-top: 1.1em; }
.legal-sec__body p { max-width: var(--measure); color: var(--muted); line-height: 1.8; }
.legal-sec__body strong { color: var(--ink); font-weight: 500; }
.legal-sec__body > .facts,
.legal-sec__body > .note,
.legal-sec__body > .legal-table,
.legal-sec__body > .legal-docs,
.legal-sec__body > .gate { margin-top: 28px; }
.legal-sec__body > .facts + p,
.legal-sec__body > .note + p,
.legal-sec__body > .legal-table + p,
.legal-sec__body > .legal-docs + p { margin-top: 28px; }
.legal-sec__body > :first-child { margin-top: 0; }
/* A list that ends a section closes against the next section's rule, not against its own. */
.legal-sec__body > .facts:last-child > .facts__row:last-child,
.legal-sec__body > .legal-docs:last-child > li:last-child { border-bottom: 0; padding-bottom: 0; }
/* Preview only: blocks wrapped in a gate keep the same rhythm */
.legal-sec__body > .gate > * + * { margin-top: 20px; }
.legal-sub { font-family: var(--mono); font-size: var(--fs-label); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
.legal-sec__body > .legal-sub { margin-top: 36px; }
.legal-sec__body > .legal-sub + * { margin-top: 10px; }

/* Dash list, as in .prose */
.legal-list > li { position: relative; padding-left: 1.4em; max-width: var(--measure); color: var(--muted); line-height: 1.8; }
.legal-list > li + li { margin-top: 0.5em; }
.legal-list > li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }

/* Key–value blocks (.facts from site.css): what, why, legal basis, who, how long */
.legal-sec .facts dd { overflow-wrap: break-word; line-height: 1.7; }
/* A value that is just a link (phone, e-mail, a site) or a pair of phone numbers: a ≥ 44px tap target, same layout.
   Links inside a sentence (e.g. the U.N.B.R. row) keep wrapping normally. */
.legal-sec .facts dd > a:only-child,
.legal-sec .facts dd > a.nowrap { display: inline-block; padding-block: 11px; margin-block: -11px; }
.legal-sec .facts dd > * + * { margin-top: 10px; }
.legal-sec .facts dd p { max-width: none; color: inherit; line-height: inherit; }
.legal-sec .facts dt small { display: block; margin-top: 2px; font-size: inherit; font-weight: 400; letter-spacing: 0.08em; color: var(--subtle); }
.legal-sec .facts dd .legal-list > li { color: var(--ink); line-height: 1.7; }
.legal-sec .facts dd .legal-list > li + li { margin-top: 8px; }
.legal-cite { display: block; margin-top: 6px; font-size: var(--fs-small); line-height: 1.6; color: var(--muted); }

/* A right that must be shown "clearly and separately" (RGPD art. 21 alin. (4)) */
.legal-sec .note p { max-width: var(--measure); color: var(--ink); }

/* Cookie table */
.legal-table { width: 100%; }
@media (min-width: 900px) {
  .legal-table th, .legal-table td { padding: 18px 20px; }
}
.legal-table tbody th { font-family: var(--mono); font-size: 0.9375rem; font-weight: 500; line-height: 1.5; color: var(--ink); white-space: nowrap; }
.legal-table td { font-size: var(--fs-body); }
@media (max-width: 899px) {
  .legal-table tbody th { white-space: normal; padding-bottom: 10px; }
}

/* List of documents (professional rules) */
.legal-docs { border-top: 1px solid var(--ink); }
.legal-docs > li { border-bottom: 1px solid var(--rule); padding: 18px 0; }
.legal-docs a { display: inline-block; padding-block: 10px; margin-block: -10px; font-family: var(--serif); font-size: var(--fs-h4); line-height: 1.25; color: var(--ink); text-decoration: none; }
.legal-docs a:hover { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.legal-docs__src { display: block; margin-top: 6px; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.06em; color: var(--subtle); }
.legal-docs__note { display: block; margin-top: 6px; font-size: var(--fs-small); line-height: 1.6; color: var(--muted); }
