/* Shared style of the legal pages (privacy.html, terms.html,
   delete-account.html) and the help pages (sellers.html, faq.html,
   contact.html). Same palette ("Saffron & Ink") and font (Readex Pro,
   fonts/readex-pro.css) as index.html. */
:root {
  /* Winou "Saffron & Ink" (see .claude/docs/design-system.md) */
  --ink: #17140F;
  --ink-soft: #2C2823;
  --paper: #FFFFFF;
  --stone: #F4F3F0;
  --stone-dark: #EFEDE9;
  --line: #E2DFD8;
  --muted: #66625A;
  --saffron: #FFB81C;
  --saffron-deep: #E09A00;
  --accent-soft: #FFF0C7;
  --on-accent-soft: #6B4A00;
  --chili: #D93A20;
  --chili-text: #B8301A;
  --error: var(--chili-text);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* ─── Wordmark: "winou" with the ping (ring + dot) as the o ─── */
.wordmark {
  display: inline-flex;
  align-items: baseline;
  direction: ltr;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
}
.wordmark .wm-o { width: 0.575em; height: 0.575em; margin: 0 0.0125em; flex-shrink: 0; }
.wordmark .wm-ring { stroke: var(--saffron-deep); }
.wordmark.rev { color: #FFFFFF; }
.wordmark.rev .wm-ring { stroke: var(--saffron); }

body {
  font-family: 'Readex Pro', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  color: var(--ink);
  background: var(--stone);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

body:lang(ar), [lang="ar"] {
  font-family: 'Readex Pro', 'Noto Kufi Arabic', 'Noto Sans Arabic', 'Geeza Pro', Tahoma, sans-serif;
}

/* One block per language: the one matching <html lang> is shown (the
   <head> script sets it before the first paint; without JS, English). */
.l10n { display: none; }
html[lang="en"] .l10n[lang="en"],
html[lang="fr"] .l10n[lang="fr"],
html[lang="ar"] .l10n[lang="ar"] { display: contents; }

/* ─── Header ─── */
.legal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: rgba(244, 243, 240, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(23, 20, 15, 0.1);
}

.legal-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 800;
}

.legal-logo .wordmark { font-size: 1.75rem; }

.lang-switcher {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: rgba(23, 20, 15, 0.06);
  border: 1.5px solid rgba(23, 20, 15, 0.12);
  border-radius: 100px;
}

.lang-option {
  min-height: 30px;
  padding: 0.2rem 0.7rem;
  border: none;
  border-radius: 100px;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}

.lang-option:hover { background: rgba(23, 20, 15, 0.1); }
.lang-option[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.lang-option:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* ─── Draft banner: remove the #draft-banner element once a lawyer has
   reviewed the texts. ─── */
#draft-banner {
  background: var(--accent-soft);
  border-bottom: 1px solid var(--saffron);
  color: var(--on-accent-soft);
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
}

/* ─── Content ─── */
main {
  max-width: 820px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

main h1 {
  color: var(--ink);
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  line-height: 1.3;
  margin-bottom: 0.4rem;
}

.meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 2rem; }

main h2 {
  color: var(--ink);
  font-size: 1.25rem;
  margin: 2.2rem 0 0.6rem;
  line-height: 1.4;
}

main h3 { font-size: 1.05rem; margin: 1.4rem 0 0.4rem; }

main p, main li { font-size: 1rem; }
main p { margin-bottom: 0.8rem; }
main ul, main ol { padding-inline-start: 1.4rem; margin-bottom: 0.9rem; }
main li { margin-bottom: 0.35rem; }
main a { color: var(--ink); text-decoration-color: var(--saffron-deep); text-decoration-thickness: 2px; text-underline-offset: 3px; }

.toc {
  background: white;
  border: 1px solid rgba(23, 20, 15, 0.15);
  border-radius: 14px;
  padding: 1rem 1.4rem;
  margin-bottom: 1.5rem;
}

.toc ol { margin: 0; }

.table-wrap { overflow-x: auto; margin-bottom: 1rem; }

table { border-collapse: collapse; width: 100%; font-size: 0.95rem; background: white; }
th, td { border: 1px solid var(--line); padding: 0.5rem 0.7rem; text-align: start; vertical-align: top; }
th { background: var(--paper); }

/* Placeholders the owner fills in legal.js (LEGAL_INFO); highlighted
   while empty. */
.ph { background: var(--accent-soft); border-radius: 4px; padding: 0 0.2em; }
.ph.filled { background: none; padding: 0; }

.note {
  background: white;
  border-inline-start: 4px solid var(--saffron);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  margin: 1rem 0;
}

/* ─── Delete account form ─── */
.card {
  background: white;
  border: 1px solid rgba(23, 20, 15, 0.15);
  border-radius: 16px;
  padding: 1.4rem;
  margin: 1.5rem 0;
}

.card label { display: block; font-weight: 700; margin-bottom: 0.3rem; }

.card input[type="email"], .card input[type="text"] {
  width: 100%;
  font: inherit;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  margin-bottom: 0.9rem;
}

.card input[dir="ltr"] { text-align: start; }

.check { display: flex; gap: 0.6rem; align-items: flex-start; margin-bottom: 1rem; font-weight: 400 !important; }
.check input { margin-top: 0.45rem; }

.btn {
  font: inherit;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  min-height: 44px;
  padding: 0.6rem 1.5rem;
  cursor: pointer;
  background: var(--ink);
  color: var(--paper);
}

.btn:disabled { opacity: 0.55; cursor: default; }
.btn-danger { background: var(--chili); color: #FFFFFF; }
.btn-link { background: none; color: var(--ink); padding-inline: 0.5rem; }

.status { margin-top: 0.9rem; font-weight: 600; }
.status.error { color: var(--error); }
.status.ok { color: var(--ink); }

[hidden] { display: none !important; }

/* ─── Footer ─── */
.legal-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.6);
  padding: 2rem 1.5rem;
  font-size: 0.9rem;
}

.legal-footer-inner {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  justify-content: space-between;
}

.legal-footer nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }
.legal-footer a { color: rgba(255, 255, 255, 0.75); text-decoration: none; }
.legal-footer a:hover { color: var(--saffron); }

/* ─── Site nav (header) ─── */
.legal-header { flex-wrap: wrap; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.1rem;
  margin-inline-start: auto;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--saffron-deep);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

@media (max-width: 680px) {
  .site-nav { order: 3; width: 100%; justify-content: center; margin-inline-start: 0; }
}

/* ─── Help pages: sellers, FAQ, contact ─── */
.lead { font-size: 1.1rem; color: var(--muted); margin-bottom: 1.5rem; }
.muted { color: var(--muted); font-size: 0.92rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
main a.btn { color: var(--paper); }
main a.btn-outline { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.4rem; }

.hero-block {
  background: var(--saffron);
  border-radius: 24px;
  padding: 2rem 1.6rem;
  margin-bottom: 1rem;
}
.hero-block .lead { color: var(--ink); margin-bottom: 0; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 1rem;
}
.feature {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
}
.feature h3 { margin: 0 0 0.3rem; font-size: 1.05rem; }
.feature p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }

.steps { counter-reset: step; list-style: none; padding-inline-start: 0 !important; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-inline-start: 2.8rem;
  margin-bottom: 0.9rem;
  min-height: 2rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--saffron);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.plan {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--saffron);
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
}
.plan h3 { margin: 0 0 0.3rem; }
.plan-price { font-size: 1.5rem; font-weight: 700; margin: 0 !important; }
.plan-period { color: var(--muted); font-size: 0.9rem; }
.plan ul { margin: 0.6rem 0 0; }

.faq-topic { margin-top: 1.8rem; }
.faq {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 0.6rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.85rem 1.1rem;
  list-style-position: inside;
}
.faq[open] summary { border-bottom: 1px solid var(--line); }
.faq p { padding: 0.8rem 1.1rem 0.2rem; }
.faq summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 14px; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
}
.contact-grid .card { margin: 0; }
.contact-grid .card h2 { margin-top: 0; }

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media (max-width: 600px) {
  .legal-header { padding-inline: 1rem; }
  .lang-option { padding-inline: 0.55rem; }
  main { padding-inline: 1rem; }
}
