/* ══════════════════════════════════════════════════════════════════════
   KonHR — the store-facing legal pages (/privacy, /support, /delete-account)
   Leo, 27/10/2026. Static HTML, no script (the server's CSP allows none inline, and a store
   reviewer's bot should read them as plain documents). Kon HR Brand Identity v1.0: Navy and
   Turquoise, IBM Plex Sans Arabic for text, Noto Kufi Arabic for titles. Light and dark follow
   the system. One bold element per page: the Navy "in short" panel; everything else is a quiet
   reading column.
   ══════════════════════════════════════════════════════════════════════ */
:root {
  color-scheme: light dark;
  --navy: #0B2D6B;
  --navy-deep: #071C45;
  --turquoise: #22C7D0;
  --bg: #F3F6FA;
  --paper: #FFFFFF;
  --ink: #0B1B3A;
  --head: #0B2D6B;
  --muted: #566785;
  --line: #D5DEEA;
  --wash: #EEF2F8;
  --link: #0B2D6B;
  --mark: #0B7C84;              /* section numbers, ticks on light: turquoise-ink, 4.96:1 */
  --panel: #071C45;
  --panel-ink: #FFFFFF;
  --panel-muted: rgba(232, 238, 249, .78);
  --note-bg: #DDF6F7;
  --note-line: #A9E6EA;
  --shadow: 0 1px 2px rgba(11, 45, 107, .06);
  --text: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Noto Kufi Arabic", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --gutter: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #06101F;
    --paper: #0D1A30;
    --ink: #E8EEF9;
    --head: #F3F6FD;
    --muted: #97A8C6;
    --line: #213456;
    --wash: #112039;
    --link: #4FD6DE;
    --mark: #4FD6DE;
    --panel: #0B2D6B;
    --note-bg: #0F2D3F;
    --note-line: #1B4A5E;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--text); font-size: 16.5px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
[dir="rtl"] body { line-height: 1.85; }
a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 10; padding: 10px 14px; background: var(--paper); border-radius: 8px; }
.skip:focus { top: 12px; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.num { font-variant-numeric: tabular-nums; }

/* ── top bar ── */
.bar { background: var(--paper); border-bottom: 1px solid var(--line); }
.bar__in {
  max-width: 1120px; margin-inline: auto; padding: 12px var(--gutter);
  display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap;
}
.bar__logo { display: inline-flex; align-items: center; min-height: 44px; }
.bar__logo img { display: block; height: 28px; width: auto; }
.bar__nav { display: flex; gap: 4px 18px; flex-wrap: wrap; margin-inline-start: auto; font-size: 15px; }
.bar__nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; }
.bar__nav a:hover { color: var(--head); }
.bar__nav a[aria-current="page"] { color: var(--head); font-weight: 600; box-shadow: inset 0 -2px 0 var(--turquoise); }
.bar__lang {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; text-decoration: none;
  color: var(--head); font-weight: 600; font-size: 15px;
}
.bar__lang:hover { background: var(--wash); }
@media (max-width: 640px) {
  .bar__nav { order: 3; width: 100%; margin-inline-start: 0; gap: 0 16px; overflow-x: auto; }
  .bar__lang { margin-inline-start: auto; }
}

/* ── page head ── */
.head { max-width: 1120px; margin-inline: auto; padding: 40px var(--gutter) 8px; }
.head h1 {
  margin: 0; max-width: 22ch;
  font-family: var(--display); font-weight: 700; color: var(--head);
  font-size: clamp(28px, 5.2vw, 40px); line-height: 1.3;
}
.head p { margin: 14px 0 0; max-width: 62ch; color: var(--muted); font-size: 17.5px; }
.head .stamp { font-size: 14px; margin-top: 10px; }
[dir="ltr"] .head h1 { letter-spacing: -0.01em; }

/* ── layout: a contents rail at the inline start on wide screens, one column on phones ── */
.layout {
  max-width: 1120px; margin-inline: auto; padding: 24px var(--gutter) 64px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px;
}
@media (min-width: 980px) {
  .layout { grid-template-columns: 240px minmax(0, 72ch); gap: 56px; }
  .toc { position: sticky; top: 24px; align-self: start; }
}
.toc { font-size: 14.5px; }
/* The privacy policy's 13 entries would fill a phone screen before the text starts; there the "In short"
   panel is the overview and the contents list appears from 980px. Shorter pages keep theirs. */
@media (max-width: 979.98px) { .toc--long { display: none; } }
.toc summary { cursor: pointer; font-weight: 600; color: var(--head); min-height: 44px; display: flex; align-items: center; }
.toc ol { list-style: none; margin: 4px 0 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; padding: 7px 0; color: var(--muted); text-decoration: none; line-height: 1.4; }
.toc a::before { content: counter(toc); min-width: 1.4em; color: var(--mark); font-variant-numeric: tabular-nums; font-weight: 600; }
.toc a:hover { color: var(--head); }
@media (min-width: 980px) { .toc summary { pointer-events: none; list-style: none; } .toc summary::-webkit-details-marker { display: none; } }

/* ── the one bold element: "In short" ── */
.short {
  background: var(--panel); color: var(--panel-ink);
  border-radius: 16px; padding: 22px 22px 18px; margin-bottom: 40px;
}
.doc .short h2 { margin: 0 0 12px; font-family: var(--display); font-size: 19px; line-height: 1.4; color: var(--panel-ink); }
.short ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.short li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; }
.short svg { width: 22px; height: 22px; margin-top: 2px; color: var(--turquoise); }
.short strong { color: var(--panel-ink); font-weight: 600; }
.short span { color: var(--panel-muted); }
.short span strong { color: var(--panel-ink); }
.short a { color: var(--panel-ink); }

/* ── the document ── */
.doc { min-width: 0; }
.doc section { scroll-margin-top: 20px; padding-top: 8px; margin-bottom: 36px; }
.doc h2 {
  display: flex; gap: 12px; align-items: baseline;
  margin: 0 0 12px; font-family: var(--display); font-weight: 700; color: var(--head);
  font-size: 22px; line-height: 1.4;
}
.doc h2 .n { color: var(--mark); font-variant-numeric: tabular-nums; min-width: 1.2em; }
.doc h3 { margin: 22px 0 6px; font-size: 17px; line-height: 1.45; color: var(--head); font-weight: 600; }
.doc p { margin: 0 0 12px; }
.doc ul, .doc ol { margin: 0 0 12px; padding-inline-start: 1.3em; }
.doc li { margin-bottom: 6px; }
.doc li::marker { color: var(--mark); }

/* What we collect: one card per kind of data — a table would not survive a phone. */
.inventory { list-style: none; padding: 0 !important; display: grid; gap: 10px; margin: 8px 0 16px !important; }
.inventory > li { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.inventory h3 { margin: 0 0 4px; }
.inventory dl { margin: 6px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 15.5px; }
.inventory dt { color: var(--muted); }
.inventory dd { margin: 0; }
@media (max-width: 480px) { .inventory dl { grid-template-columns: 1fr; gap: 0; } .inventory dd { margin-bottom: 6px; } }

/* A note that matters (location, what is kept). */
.note { background: var(--note-bg); border: 1px solid var(--note-line); border-radius: 12px; padding: 14px 16px; margin: 8px 0 16px; }
.note p:last-child, .note ul:last-child { margin-bottom: 0; }

/* Two ways to do one thing (delete account). */
.ways { display: grid; gap: 12px; margin: 8px 0 20px; }
@media (min-width: 720px) { .ways { grid-template-columns: 1fr 1fr; } }
.way { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.way h3 { margin-top: 0; font-family: var(--display); font-size: 18px; }
.way ol { margin-bottom: 0; }
.mailto {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; margin-top: 6px;
  background: var(--navy); color: #FFFFFF; border-radius: 10px; text-decoration: none; font-weight: 600;
}
.mailto:hover { background: var(--navy-deep); }
@media (prefers-color-scheme: dark) { .mailto { background: #2556B5; } .mailto:hover { background: #1D4794; } }

/* Questions (support): native disclosure, no script. */
.faq { display: grid; gap: 8px; margin: 8px 0 20px; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.faq summary {
  cursor: pointer; list-style: none; min-height: 52px; padding: 13px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-weight: 600; color: var(--head);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 9px; height: 9px; flex: none; margin-inline-end: 4px;
  border-inline-end: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
}
.faq details[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.faq .a { padding: 0 16px 14px; }
.faq .a p:last-child, .faq .a ol:last-child, .faq .a ul:last-child { margin-bottom: 0; }

.contact-card {
  display: grid; gap: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px; margin: 8px 0 20px; box-shadow: var(--shadow);
}
.contact-card .big { font-family: var(--display); font-size: 20px; font-weight: 700; color: var(--head); }
.kbd { font-weight: 600; color: var(--head); }

/* ── foot ── */
.foot { background: var(--navy-deep); color: rgba(232, 238, 249, .8); font-size: 14.5px; }
.foot__in { max-width: 1120px; margin-inline: auto; padding: 28px var(--gutter) 36px; display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; }
.foot img { height: 24px; width: auto; display: block; }
.foot a { color: #FFFFFF; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot nav a { display: inline-flex; min-height: 44px; align-items: center; }
.foot small { flex-basis: 100%; font-size: 13.5px; color: rgba(232, 238, 249, .7); }

@media print {
  .bar__nav, .bar__lang, .toc, .skip { display: none; }
  .short { background: none; color: inherit; border: 1px solid #999; }
  .short span, .short strong, .short h2 { color: inherit; }
  .foot { background: none; color: inherit; }
  .foot a { color: inherit; }
}
