/*
 * The public legal pages: the privacy policy and the deletion request.
 * Written by hand; the HTML beside it is generated by scripts/buildLegalSite.mjs.
 * The palette is the app's own — ruby black, gold — so the page reads as
 * «يلا فون» rather than as a generic document host.
 */

:root {
  --bg: #0b0406;
  --bg-deep: #070203;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --gold: #f2b23c;
  --gold-soft: #ffd98a;
  --gold-wash: rgba(242, 178, 60, 0.1);
  --gold-line: rgba(242, 178, 60, 0.3);
  --text: #f7efe4;
  --muted: #c9b9a6;
  --danger: #ff9db1;
  --danger-wash: rgba(255, 122, 148, 0.1);
  --success: #8fe3b0;
  --success-wash: rgba(80, 200, 130, 0.1);
  --radius: 16px;
  --font: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--bg-deep); color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(242, 178, 60, 0.12), transparent 60%),
    radial-gradient(700px 420px at 0% 110%, rgba(160, 20, 45, 0.18), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-soft); text-underline-offset: 3px; }
a:hover { color: var(--gold); }

.skip {
  position: absolute;
  inset-inline-start: -999px;
  top: 8px;
  background: var(--gold);
  color: #2a090c;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  z-index: 10;
}
.skip:focus { inset-inline-start: 16px; }

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(11, 4, 6, 0.78);
  border-bottom: 1px solid var(--border);
}

.top-inner, main, .foot-inner {
  max-width: 820px;
  margin: 0 auto;
  padding-inline: 16px;
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
}
.brand img { width: 36px; height: 36px; border-radius: 10px; }

.nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.nav a:hover { color: var(--text); border-color: var(--border); }
.nav a[aria-current='page'] { color: var(--gold-soft); border-color: var(--gold-line); background: var(--gold-wash); }

main { padding-top: 32px; padding-bottom: 48px; }

.eyebrow { color: var(--gold); font-weight: 700; font-size: 14px; margin: 0; }

h1 {
  font-size: clamp(28px, 6vw, 38px);
  line-height: 1.3;
  margin: 4px 0 6px;
}

.updated { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 14px;
}

.card.intro { background: var(--gold-wash); border-color: var(--gold-line); }
.card.intro p { margin: 0 0 8px; }
.card.intro p:last-child { margin-bottom: 0; }

.toc { padding: 14px 20px; }
.toc h2 { font-size: 15px; margin: 0 0 6px; color: var(--muted); font-weight: 600; }
.toc ol {
  margin: 0;
  padding-inline-start: 22px;
  columns: 2;
  column-gap: 28px;
}
.toc li { break-inside: avoid; font-size: 15px; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--gold-soft); text-decoration: underline; }

section.card { scroll-margin-top: 80px; }

.section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
}
.section-heading h2 { font-size: 19px; margin: 0; color: var(--gold); line-height: 1.5; }
.num {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gold-wash);
  color: var(--gold);
  font-weight: 700;
  font-size: 14px;
}

h3 { font-size: 16px; margin: 14px 0 4px; color: var(--text); }

section p, .card p { color: var(--muted); margin: 6px 0; }

ul.list { margin: 6px 0; padding-inline-start: 20px; }
ul.list li { color: var(--muted); margin: 4px 0; }
ul.list li::marker { color: var(--gold); }

.closing { text-align: center; color: var(--muted); font-size: 15px; margin-top: 24px; }

.foot { border-top: 1px solid var(--border); }
.foot-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-top: 18px;
  padding-bottom: 28px;
  color: var(--muted);
  font-size: 14px;
}
.foot-inner nav { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---- deletion request ---- */

.steps { margin: 6px 0; padding-inline-start: 22px; }
.steps li { color: var(--muted); margin: 4px 0; }
.steps li::marker { color: var(--gold); font-weight: 700; }

form { display: grid; gap: 14px; margin-top: 8px; }

fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
legend { font-weight: 700; margin-bottom: 6px; padding: 0; }

.choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--gold-line); background: var(--gold-wash); }
.choice input { margin-top: 6px; accent-color: var(--gold); }
.choice strong { display: block; }
.choice span { color: var(--muted); font-size: 14px; }

label.field { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
label.field small { color: var(--muted); font-weight: 400; }

input[type='text'], input[type='password'], textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 14px;
  line-height: 1.6;
}
input[type='text'], input[type='password'] { direction: ltr; text-align: left; }
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--gold-line); outline-offset: 1px; border-color: var(--gold); }

.confirm { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 15px; }
.confirm input { margin-top: 6px; accent-color: var(--gold); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

button {
  font: inherit;
  font-weight: 700;
  border-radius: 999px;
  padding: 11px 22px;
  cursor: pointer;
  border: 1px solid transparent;
}
button.primary { background: linear-gradient(180deg, var(--gold-soft), var(--gold)); color: #2a090c; }
button.primary[data-tone='danger'] { background: linear-gradient(180deg, #ffb3c3, #f07a93); }
button.link { background: none; color: var(--gold-soft); padding: 8px 4px; text-decoration: underline; }
button:disabled { opacity: 0.55; cursor: not-allowed; }

.notice {
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0;
  border: 1px solid var(--border);
}
.notice[data-tone='error'] { background: var(--danger-wash); border-color: rgba(255, 122, 148, 0.4); color: var(--danger); }
.notice[data-tone='success'] { background: var(--success-wash); border-color: rgba(80, 200, 130, 0.4); color: var(--success); }
.notice[data-tone='info'] { background: var(--gold-wash); border-color: var(--gold-line); color: var(--gold-soft); }

[hidden] { display: none !important; }

@media (max-width: 560px) {
  .toc ol { columns: 1; }
  .brand span { display: none; }
  .card { padding: 16px; }
  .nav a { padding: 6px 10px; font-size: 13px; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
