/* Ecomnorme legal pages (privacy, terms, data deletion), Arabic and English.
   One reading column, the sections listed beside it from 1024 px, the same top bar and footer as the landing page.
   Placeholders the owner fills are .fill (yellow); the draft bar is removed before publishing. */
.n { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.fill { padding: 0 5px; border-radius: 4px; background: #FFF3C4; color: #6B4E00; box-shadow: inset 0 -1.5px 0 #E0A82E; font-weight: 500; }
.draft { background: #FFF3C4; color: #6B4E00; font-size: 13.5px; line-height: 1.6; }
.draft .wrap { padding-block: 10px; }
.draft b { color: #3B2A08; }

.nav .wrap { gap: 10px; }
.nav .lang { margin-inline-start: auto; display: inline-flex; align-items: center; min-height: 40px; padding-inline: 10px; border-radius: 8px; font-size: 14px; color: var(--text-secondary); text-decoration: none; }
.nav .lang:hover { color: var(--text-primary); background: color-mix(in srgb, var(--text-primary) 5%, transparent); }
.nav .lang + .btn { margin-inline-start: 0; }
.nav .mark { min-height: 40px; }

.legal { padding-block: 40px 72px; }
@media (min-width: 768px) { .legal { padding-block: 64px 96px; } }
.legal .grid { display: grid; gap: 32px; }
@media (min-width: 1024px) { .legal .grid { grid-template-columns: 240px minmax(0, 1fr); gap: 64px; align-items: start; } }
.toc { display: none; }
@media (min-width: 1024px) {
  .toc { display: block; position: sticky; top: 96px; font-size: 14px; }
  .toc b { display: block; margin-block-end: 10px; font-size: 13px; font-weight: 500; color: var(--text-secondary); }
  .toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
  .toc a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--text-secondary); text-decoration: none; line-height: 1.45; }
  .toc a:hover { color: var(--text-primary); background: var(--bg-sunken); }
  .toc a.on { color: var(--text-primary); background: var(--bg-surface); box-shadow: inset 0 0 0 1px var(--border); }
}
.doc { max-width: 720px; }
.doc header { margin-block-end: 28px; }
.doc h1 { margin: 0 0 10px; font-size: clamp(30px, 4vw, 40px); line-height: 1.2; font-weight: 600; }
.doc .meta { margin: 0; font-size: 14px; color: var(--text-secondary); }
.doc .lead { margin: 18px 0 0; font-size: 17px; line-height: 1.8; color: var(--text-secondary); }
.short { margin: 0 0 36px; padding: 18px 20px; border-radius: 16px; background: var(--bg-surface); box-shadow: inset 0 0 0 1px var(--border); }
.short b.t { display: block; margin-block-end: 8px; font-size: 15px; font-weight: 600; }
.short ul { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; font-size: 15px; line-height: 1.7; }
.doc section { scroll-margin-top: 88px; padding-block-start: 8px; }
.doc h2 { margin: 36px 0 12px; font-size: 21px; line-height: 1.35; font-weight: 600; }
.doc h3 { margin: 22px 0 8px; font-size: 16.5px; font-weight: 600; }
.doc p, .doc li { font-size: 16px; line-height: 1.85; }
.doc p { margin: 0 0 12px; }
.doc ul, .doc ol { margin: 0 0 14px; padding-inline-start: 22px; display: grid; gap: 6px; }
.doc a { color: var(--text-primary); text-underline-offset: 3px; }
.doc .box { margin: 14px 0 18px; padding: 14px 16px; border-radius: 12px; background: var(--bg-sunken); font-size: 15px; line-height: 1.75; }
.doc .box b { font-weight: 600; }
.doc table { width: 100%; border-collapse: collapse; margin: 6px 0 18px; font-size: 14.5px; line-height: 1.6; }
.doc th, .doc td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: start; vertical-align: top; }
.doc th { font-weight: 600; background: var(--bg-surface); }
@media (max-width: 599px) {
  .doc table, .doc thead, .doc tbody, .doc tr, .doc th, .doc td { display: block; }
  .doc thead { display: none; }
  .doc tr { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .doc td { padding: 2px 0; border: 0; }
  .doc td:first-child { font-weight: 600; }
}
.steps { counter-reset: s; list-style: none; padding: 0 !important; }
.steps > li { counter-increment: s; position: relative; padding-inline-start: 42px; }
.steps > li::before { content: counter(s); position: absolute; inset-inline-start: 0; top: 2px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--ink-900); color: #fff; font-size: 13px; font-weight: 600; }
.mailto { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding-inline: 16px; border-radius: 10px; background: var(--bg-surface); box-shadow: inset 0 0 0 1px var(--border-strong); font-weight: 500; text-decoration: none !important; direction: ltr; }

.foot .wrap { align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.foot nav a { display: inline-flex; align-items: center; min-height: 40px; color: var(--text-secondary); text-underline-offset: 3px; }
.foot nav a:hover { color: var(--text-primary); }
.foot .mail { direction: ltr; unicode-bidi: isolate; }

/* ---------- improvements (owner 2026-11-28): a summary per section, a data map, account cards, the section list on
   phones, a link per section, print / PDF, a change log ---------- */
.tldr { margin: 0 0 14px !important; padding: 10px 14px; border-radius: 10px; background: var(--bg-sunken); font-size: 15.5px !important; line-height: 1.7 !important; }
.tldr b { font-weight: 600; }

.doc h2 { display: flex; align-items: center; gap: 6px; }
.anchor { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-inline-start: 2px; border: 0; border-radius: 8px; background: none; color: var(--ink-300); cursor: pointer; opacity: 0; transition: opacity .15s, color .15s, background .15s; }
.doc h2:hover .anchor, .anchor:focus-visible { opacity: 1; }
@media (hover: none) { .anchor { opacity: .7; } }
.anchor:hover { color: var(--text-primary); background: var(--bg-sunken); }
.anchor svg { width: 17px; height: 17px; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-block-start: 6px; }
.printbtn { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding-inline: 12px; border: 0; border-radius: 9px; background: var(--bg-surface); box-shadow: inset 0 0 0 1px var(--border-strong); font: inherit; font-size: 14px; color: var(--text-primary); cursor: pointer; }
.printbtn:hover { box-shadow: inset 0 0 0 1px var(--text-secondary); }
.printbtn svg { width: 17px; height: 17px; }
.copied { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 60; padding: 9px 14px; border-radius: 10px; background: var(--ink-900); color: #fff; font-size: 14px; }
.copied[hidden] { display: none; }

/* the section list on phones: folded under the title */
.toc-m { margin: 0 0 28px; border-radius: 14px; background: var(--bg-surface); box-shadow: inset 0 0 0 1px var(--border); }
@media (min-width: 1024px) { .toc-m { display: none; } }
.toc-m summary { display: flex; align-items: center; gap: 8px; min-height: 48px; padding-inline: 16px; font-size: 15px; font-weight: 500; cursor: pointer; list-style: none; }
.toc-m summary::-webkit-details-marker { display: none; }
.toc-m summary::after { content: ""; margin-inline-start: auto; width: 9px; height: 9px; border-inline-end: 2px solid currentColor; border-block-end: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
.toc-m[open] summary::after { transform: rotate(-135deg); }
.toc-m ol { list-style: none; margin: 0; padding: 0 8px 10px; display: grid; }
.toc-m a { display: flex; align-items: center; min-height: 40px; padding-inline: 10px; border-radius: 8px; color: var(--text-secondary); text-decoration: none; font-size: 15px; }
.toc-m a:hover { background: var(--bg-sunken); color: var(--text-primary); }

/* the data map: where a buyer's data comes from, where it goes, what never leaves */
.map { margin: 8px 0 22px; display: grid; gap: 10px; }
@media (min-width: 760px) { .map { grid-template-columns: 1fr auto 1.05fr auto 1fr; align-items: stretch; } }
.m-col, .m-core { padding: 14px 16px; border-radius: 14px; background: var(--bg-surface); box-shadow: inset 0 0 0 1px var(--border); display: grid; gap: 8px; align-content: start; }
.m-h { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.m-col span:not(.m-h) { position: relative; display: block; padding-inline-start: 14px; font-size: 14.5px; line-height: 1.55; }
.m-col span:not(.m-h)::before { content: ""; position: absolute; inset-inline-start: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-300); }
.m-col span b { font-weight: 600; }
.m-core { background: var(--ink-900); color: #fff; box-shadow: none; justify-items: start; }
.m-core .m-h { color: rgb(255 255 255 / .65); }
.m-core strong { font-size: 18px; font-weight: 600; }
.m-core small { font-size: 13.5px; line-height: 1.6; color: rgb(255 255 255 / .8); }
.m-arrow { display: grid; place-items: center; color: var(--ink-300); }
.m-arrow svg { width: 22px; height: 22px; transform: rotate(90deg); }
@media (min-width: 760px) { .m-arrow svg { transform: none; } [dir="rtl"] .m-arrow svg { transform: scaleX(-1); } }
.m-never { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 12px; background: var(--red-100); color: var(--red-600); font-size: 14.5px; line-height: 1.6; }
.m-never b { color: var(--ink-900); font-weight: 600; }
.m-never svg { width: 20px; height: 20px; flex: none; }

/* connected accounts at a glance */
.accts { display: grid; gap: 12px; margin: 6px 0 18px; }
@media (min-width: 640px) { .accts { grid-template-columns: 1fr 1fr; } }
.acct { padding: 16px; border-radius: 14px; background: var(--bg-surface); box-shadow: inset 0 0 0 1px var(--border); display: grid; gap: 10px; align-content: start; }
.acct header { display: flex; align-items: center; gap: 10px; margin: 0 !important; }
.acct header svg { width: 22px; height: 22px; fill: currentColor; }
.acct header b { font-size: 15.5px; font-weight: 600; }
.acct header a { margin-inline-start: auto; font-size: 13.5px; color: var(--text-secondary); }
.acct dl { margin: 0; display: grid; gap: 8px; }
.acct dt { font-size: 12.5px; font-weight: 500; color: var(--text-secondary); }
.acct dd { margin: 0; font-size: 14.5px; line-height: 1.55; }
.acct dd.no { color: var(--red-600); }

/* change log */
.log { list-style: none !important; padding: 0 !important; }
.log li { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding-block: 8px; border-bottom: 1px solid var(--border); }
.log time { font-size: 14px; color: var(--text-secondary); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* print / PDF: the text alone */
@media print {
  .draft, .nav, .toc, .toc-m, .foot, .anchor, .tools .printbtn, .copied { display: none !important; }
  body { background: #fff; }
  .legal { padding: 0; }
  .legal .grid { display: block; }
  .doc { max-width: none; }
  .doc a { color: inherit; }
  .tldr, .short, .acct, .m-col, .box { box-shadow: none; border: 1px solid #ccc; }
  .m-core { background: #fff; color: #000; border: 1px solid #000; }
  .m-core .m-h, .m-core small { color: #333; }
  section { break-inside: avoid-page; }
}
/* on phones a table becomes rows: each cell shows its column's name above it */
@media (max-width: 599px) {
  .doc td[data-l]:not(:first-child)::before { content: attr(data-l); display: block; margin-block-start: 6px; font-size: 12.5px; font-weight: 500; color: var(--text-secondary); }
}
