/* legal.css — privacy.html («سياسة المعطيات») and terms.html (24 Nov 2026). Design system 09-kufi:
   white, paper, ink; red only for focus. Colours are solid (no alpha on text). Dark = [data-theme="dark"]. */
.lg{padding-block:24px 64px}
.lg .wrap{max-width:760px}
.lg h1{font-family:"Noto Kufi Arabic","Readex Pro",sans-serif;font-weight:900;font-size:clamp(28px,7vw,40px);line-height:1.3;margin:0 0 12px;color:#0B0B0B}
.lg .lead{font-size:19px;line-height:1.8;margin:0 0 20px;color:#2B2B28}
.lg h2{font-family:"Noto Kufi Arabic","Readex Pro",sans-serif;font-weight:800;font-size:22px;line-height:1.45;margin:36px 0 10px;padding-top:16px;border-top:2px solid #0B0B0B;color:#0B0B0B;scroll-margin-top:96px}
.lg h3{font-family:"Noto Kufi Arabic","Readex Pro",sans-serif;font-weight:800;font-size:18px;line-height:1.5;margin:20px 0 6px;color:#0B0B0B}
.lg p,.lg li,.lg dd,.lg dt{font-size:17px;line-height:1.85;color:#1B1B19}
.lg p{margin:0 0 12px}
.lg ul,.lg ol{margin:6px 0 14px;padding-inline-start:22px}
.lg li{margin:4px 0}
.lg b{font-weight:700}
.lg a{color:#0B0B0B;text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}
.lg a:focus-visible,.lg .lg-tbl:focus-visible{outline:3px solid var(--action, #1739A8);outline-offset:2px}

/* summary */
.lg .sum{background:#F1F0EC;padding:16px 18px 6px;margin:0 0 20px;border-radius:var(--card-r)}
.lg .sum-t{font-family:"Noto Kufi Arabic","Readex Pro",sans-serif;font-weight:800;font-size:18px;margin:0 0 4px}
.lg .sum ul{margin:0 0 10px}

/* table of contents */
.lg .toc{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 8px;padding:0;list-style:none}
.lg .toc li{margin:0}
.lg .toc a{display:inline-flex;align-items:center;min-height:44px;padding:0 12px;background:#F1F0EC;color:#0B0B0B;text-decoration:none;font-weight:600;font-size:15px}

/* tables: scroll inside their own box on narrow screens, never the page */
.lg .lg-tbl{max-width:100%;overflow-x:auto;margin:10px 0 16px}
.lg table{width:100%;border-collapse:collapse;font-size:16px;line-height:1.6}
.lg th,.lg td{text-align:right;vertical-align:top;padding:10px 8px;border-bottom:1px solid #CFCDC6;color:#1B1B19;font-size:16px}
.lg thead th{font-weight:700;background:#F1F0EC}
.lg tbody th{font-weight:700;width:34%}
.lg td[dir="ltr"]{text-align:left;white-space:nowrap;font-weight:600}
.lg th{white-space:normal}

/* key / value lists (contact, status) */
.lg .kvl,.lg .st{display:grid;grid-template-columns:minmax(120px,30%) 1fr;gap:0;margin:8px 0 16px}
.lg .kvl dt,.lg .st dt{font-weight:700;padding:10px 0 10px 12px;border-bottom:1px solid #CFCDC6}
.lg .kvl dd,.lg .st dd{margin:0;padding:10px 0;border-bottom:1px solid #CFCDC6}
.lg .st dd p:last-child,.lg .st dd ul:last-child{margin-bottom:0}
.lg .ph{background:#F1F0EC;padding:1px 6px;font-weight:600}

/* «عن هذه النسخة» */
.lg .about{margin-top:44px;background:#F1F0EC;padding:4px 18px 10px;scroll-margin-top:80px}
.lg .about h2{border-top:0;margin-top:14px}
.lg .about .st dt,.lg .about .st dd{border-bottom-color:#C4C2BA}
.lg .about .ph{background:#FFFFFF}

.lg .meta{font-size:15px;color:#4A4A46;margin-top:32px}

@media (max-width:560px){
  .lg .kvl,.lg .st{grid-template-columns:1fr}
  .lg .kvl dt,.lg .st dt{padding:12px 0 0;border-bottom:0}
  .lg .kvl dd,.lg .st dd{padding:2px 0 12px}
  .lg .about{padding:2px 14px 8px}
  /* tables become one block per row, each cell with its column name */
  .lg .lg-tbl table,.lg .lg-tbl tbody,.lg .lg-tbl tr,.lg .lg-tbl th,.lg .lg-tbl td{display:block;width:auto}
  .lg .lg-tbl thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .lg .lg-tbl tr{border-bottom:1px solid #CFCDC6;padding:10px 0}
  .lg .lg-tbl tbody th,.lg .lg-tbl td{border:0;padding:2px 0;font-size:16px}
  .lg .lg-tbl tbody th{font-size:17px;margin-bottom:4px}
  .lg .lg-tbl td[data-label]::before{content:attr(data-label) ": ";font-weight:700;color:#4A4A46}
  .lg .lg-tbl td[dir="ltr"]{text-align:right;direction:rtl}
}
@media (max-width:560px){[data-theme="dark"] .lg .lg-tbl tr{border-bottom-color:#3A3A37}}

/* dark */
[data-theme="dark"] .lg h1,[data-theme="dark"] .lg h2,[data-theme="dark"] .lg h3,[data-theme="dark"] .lg p,[data-theme="dark"] .lg li,

/* print: A4, ink on white, everything visible */
@media print{
  @page{size:A4;margin:16mm 14mm}
  .appbar,.lg .toc{display:none}
  .lg{padding:0}
  .lg .wrap{max-width:none;padding:0}
  .lg h1{font-size:26px}
  .lg h2{font-size:17px;margin:18px 0 6px;padding-top:8px;break-after:avoid}
  .lg h3{font-size:14px;break-after:avoid}
  html[data-theme] .lg p,html[data-theme] .lg li,html[data-theme] .lg dd,html[data-theme] .lg dt,html[data-theme] .lg th,html[data-theme] .lg td{font-size:11.5pt;line-height:1.6;color:#000}
  html[data-theme] .lg h1,html[data-theme] .lg h2,html[data-theme] .lg h3,html[data-theme] .lg .lead,html[data-theme] .lg .meta{color:#000}
  html[data-theme] .lg h2{border-top-color:#000}
  html[data-theme] .lg .sum,html[data-theme] .lg .about,html[data-theme] .lg thead th,html[data-theme] .lg .ph,html[data-theme] .lg .about .ph{background:#fff;color:#000}
  .lg .sum{border:1.5px solid #000}
  .lg .about{border:1.5px solid #000;padding:2px 12px}
  .lg .lg-tbl{overflow:visible}
  .lg tr,.lg .st dd,.lg .kvl dd{break-inside:avoid}
  html[data-theme] .lg a{color:#000}
  html[data-theme] body{background:#fff}
}
