/* =========================================================
   Dokumenty prawne (Regulamin, Polityka prywatności)
   ========================================================= */
.legal-hero { max-width: 860px; padding-block: 72px 32px; text-align: left; }
.legal-title { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.05; letter-spacing: -0.035em; }
.legal-lead { margin-top: 18px; font-size: 1.15rem; color: var(--text-muted); max-width: 640px; line-height: 1.6; }
.legal-meta { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.legal-meta > span { display: inline-flex; gap: 6px; align-items: center; padding: 7px 13px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-size: 13px; color: var(--text); }
.legal-meta b { color: var(--text-muted); font-weight: 600; }
.legal-meta a { color: var(--text-strong); text-decoration: underline; text-decoration-color: rgba(255, 107, 82, 0.6); text-underline-offset: 3px; }

.legal-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; align-items: start; padding-bottom: 96px; max-width: calc(var(--container) + 48px); }

/* table of contents */
.legal-toc { position: sticky; top: 92px; max-height: calc(100vh - 120px); overflow-y: auto; padding: 4px 0; scrollbar-width: thin; }
.legal-toc-title { font-size: 11.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }
.legal-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.legal-toc a { display: block; padding: 7px 0 7px 14px; margin-left: -1px; border-left: 2px solid transparent; font-size: 13.5px; line-height: 1.35; color: var(--text-muted); transition: color 0.2s var(--ease), border-color 0.25s var(--ease), padding-left 0.3s var(--ease); }
.legal-toc a:hover { color: var(--text-strong); }
.legal-toc a.is-active { color: var(--text-strong); font-weight: 600; border-left-color: var(--accent); padding-left: 17px; }

/* body */
.legal-body { min-width: 0; max-width: 760px; }
.legal-body section { scroll-margin-top: 96px; }
.legal-body section + section { margin-top: 44px; padding-top: 38px; border-top: 1px dashed var(--line-strong); }
.legal-body h2 { font-size: 1.4rem; line-height: 1.25; letter-spacing: -0.02em; margin-bottom: 18px; }
.legal-body p, .legal-body li, .legal-body dd { font-size: 16px; line-height: 1.7; color: var(--text); }
.legal-body strong { color: var(--text-strong); font-weight: 650; }
.legal-body a { color: var(--text-strong); text-decoration: underline; text-decoration-color: rgba(255, 107, 82, 0.55); text-underline-offset: 3px; transition: text-decoration-color 0.2s var(--ease); }
.legal-body a:hover { text-decoration-color: var(--accent); }

/* numbered clauses: 1. 2. 3.  →  a) b) c) */
.legal-body ol.cl { list-style: none; counter-reset: cl; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.legal-body ol.cl > li { counter-increment: cl; position: relative; padding-left: 38px; }
.legal-body ol.cl > li::before { content: counter(cl) "."; position: absolute; left: 0; top: 0; width: 30px; font-weight: 650; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.legal-body ol.sub { list-style: none; counter-reset: sub; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.legal-body ol.sub > li { counter-increment: sub; position: relative; padding-left: 30px; }
.legal-body ol.sub > li::before { content: counter(sub, lower-alpha) ")"; position: absolute; left: 0; top: 0; color: var(--text-muted); font-weight: 600; }

.legal-dl { margin: 12px 0 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); }
.legal-dl > div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.legal-dl > div:last-child { border-bottom: none; }
.legal-dl dt { font-size: 13.5px; color: var(--text-muted); font-weight: 500; }
.legal-dl dd { margin: 0; font-weight: 600; color: var(--text-strong); font-size: 15px; }

/* "w skrócie" box */
.legal-key { background: linear-gradient(180deg, #fffaf8, #fff); border: 1px solid #ffd9cf; border-radius: var(--radius-lg); padding: 24px 26px; margin-bottom: 44px; box-shadow: 0 0 0 4px rgba(255, 241, 237, 0.6); }
.legal-key-title { font-size: 1.05rem !important; margin-bottom: 12px !important; display: flex; align-items: center; gap: 10px; }
.legal-key-title::before { content: ""; width: 20px; height: 20px; border-radius: 6px; background: var(--accent); -webkit-mask: url('/assets/img/icons/info.svg') center / contain no-repeat; mask: url('/assets/img/icons/info.svg') center / contain no-repeat; }
.legal-key ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.legal-key li { position: relative; padding-left: 24px; font-size: 15px; line-height: 1.55; }
.legal-key li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.legal-key-note { margin-top: 14px; font-size: 13px !important; color: var(--text-muted) !important; }
.legal-signoff { margin-top: 28px; padding: 16px 18px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 14.5px !important; }

/* placeholders that MUST be filled in before going live */
.legal-todo { background: #fff3b0; color: #6b4f00; padding: 1px 6px; border-radius: 6px; border: 1px dashed #d7a900; font-weight: 600; }

@media (max-width: 960px) {
  .legal-layout { grid-template-columns: 1fr; gap: 28px; }
  .legal-toc { position: static; max-height: none; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
  .legal-toc ol { columns: 1; border-left: none; }
  .legal-toc a { padding-left: 0; border-left: none; }
  .legal-toc a.is-active { padding-left: 0; }
  .legal-hero { padding-top: 48px; }
}
@media (max-width: 560px) {
  .legal-dl > div { grid-template-columns: 1fr; gap: 2px; }
  .legal-body p, .legal-body li, .legal-body dd { font-size: 15.5px; }
  .legal-body ol.cl > li { padding-left: 30px; }
  .legal-key { padding: 20px; }
}
@media print {
  .site-header, .site-footer, .legal-toc, .iac, .page-progress { display: none !important; }
  .legal-layout { display: block; }
  .legal-body { max-width: none; }
  .legal-key, .legal-dl { box-shadow: none; }
  body { font-size: 12pt; }
}

/* tables (polityka prywatności) */
.legal-intro { margin-bottom: 18px; }
.legal-note { margin-top: 14px; font-size: 14px !important; color: var(--text-muted) !important; }
.legal-table-wrap { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.legal-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.legal-table th { background: var(--card); text-align: left; font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.legal-table td { padding: 14px; vertical-align: top; border-bottom: 1px solid var(--line); line-height: 1.55; color: var(--text); font-size: 14px; }
.legal-table tr:last-child td { border-bottom: none; }
.legal-table td:first-child { font-weight: 600; color: var(--text-strong); width: 24%; }
@media (max-width: 760px) {
  .legal-table thead { display: none; }
  .legal-table, .legal-table tbody, .legal-table tr, .legal-table td { display: block; width: 100%; }
  .legal-table tr { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .legal-table tr:last-child { border-bottom: none; }
  .legal-table td { border: none; padding: 5px 12px; width: 100% !important; }
  .legal-table td::before { content: attr(data-label); display: block; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; margin-bottom: 2px; }
  .legal-table td:first-child { font-size: 15px; }
}
@media print { .legal-table-wrap { box-shadow: none; } }

/* Cookie settings trigger inside legal text */
.legal-linkbtn { appearance: none; border: 0; background: none; padding: 0; font: inherit; color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.legal-linkbtn:hover { color: var(--accent, #ff6b52); }
