/* Qwalet public site — shared styles.
 *
 * No webfonts, no third-party requests. That is deliberate: these are
 * legal/compliance pages, they are served to Google Play reviewers and to data
 * subjects exercising their rights, and every external request would be a
 * disclosure we would then have to document in our own privacy policy. The only
 * script on the site is the inline account-deletion flow, which talks to our own
 * API and loads nothing.
 *
 * Colours are hand-copied from consumer/lib/core/theme/tokens.dart, which is the
 * source of truth. They are NOT generated — a codegen pipeline for six hex values
 * would not earn its build step. If the app's palette changes, update these by
 * hand and note it in the commit.
 */

:root {
  --primary: #536534;         /* AppColors.primary */
  --on-primary: #f0ffd0;      /* AppColors.onPrimary */
  --surface: #f9faf6;         /* AppColors.surface — page background */
  --surface-container: #ebefe9;
  --on-surface: #1a1c18;      /* AppColors.onSurface */
  --on-surface-variant: #45483d;
  --outline-variant: #c6c8b9;
  --error: #ba1a1a;           /* AppColors.error */

  --measure: 42rem;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 1.25rem 4rem;
  background: var(--surface);
  color: var(--on-surface);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

/* Arabic pages set dir="rtl" on <html>; everything below is direction-agnostic
   (logical properties only, no left/right). */
:lang(ar) body { line-height: 1.9; }

header, main, footer { max-width: var(--measure); margin-inline: auto; }

header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
  padding-block: 2.5rem 1.5rem;
  border-block-end: 1px solid var(--outline-variant);
}

.brand {
  font-size: 1.375rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--primary);
  text-decoration: none;
}

.lang a { font-size: 0.9375rem; }

main { padding-block-start: 2rem; }

h1 {
  font-size: 1.875rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin-block: 0 0.5rem;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.35;
  margin-block: 2.5rem 0.75rem;
}

h3 { font-size: 1.0625rem; margin-block: 1.75rem 0.5rem; }

p, ul, ol { margin-block: 0 1rem; }

ul, ol { padding-inline-start: 1.5rem; }

li { margin-block-end: 0.375rem; }

a { color: var(--primary); text-underline-offset: 2px; }

a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 3px;
}

.lede {
  font-size: 1.125rem;
  color: var(--on-surface-variant);
  margin-block-end: 2rem;
}

.updated {
  font-size: 0.9375rem;
  color: var(--on-surface-variant);
  margin-block-end: 2rem;
}

.card {
  background: var(--surface-container);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-block: 1.5rem;
}

.card > :last-child { margin-block-end: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin-block: 1rem 1.5rem;
  font-size: 0.9375rem;
}

th, td {
  text-align: start;
  vertical-align: top;
  padding: 0.625rem 0.75rem;
  border-block-end: 1px solid var(--outline-variant);
}

th { font-weight: 650; }

footer {
  margin-block-start: 4rem;
  padding-block-start: 1.5rem;
  border-block-start: 1px solid var(--outline-variant);
  font-size: 0.9375rem;
  color: var(--on-surface-variant);
}

footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-block-end: 1rem; }

/* Centred single-purpose pages (404, app-link landing). */
.centered { text-align: center; padding-block: 4rem 2rem; }
.centered h1 { margin-block-end: 1rem; }
.centered p { color: var(--on-surface-variant); }

/* Forms — used only by the account-deletion flow, the one interactive page here.
   Both language twins are hand-written, so these live in the shared sheet rather
   than being duplicated (and drifting) in two <style> blocks. */

[hidden] { display: none !important; }

.field { margin-block-end: 1.25rem; }

.field > label {
  display: block;
  font-weight: 650;
  font-size: 0.9375rem;
  margin-block-end: 0.375rem;
}

.field .hint {
  font-size: 0.875rem;
  color: var(--on-surface-variant);
  margin-block: 0 0.5rem;
}

input[type="email"],
input[type="text"] {
  inline-size: 100%;
  max-inline-size: 22rem;
  padding: 0.625rem 0.75rem;
  font: inherit;
  color: var(--on-surface);
  background: var(--surface);
  border: 1px solid var(--outline-variant);
  border-radius: 8px;
}

input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}

input[aria-invalid="true"] { border-color: var(--error); }

input.code {
  max-inline-size: 10rem;
  font-size: 1.25rem;
  letter-spacing: 0.3em;
  text-align: center;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-block-start: 1.25rem;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font: inherit;
  font-weight: 650;
  padding: 0.625rem 1.5rem;
  cursor: pointer;
}

.btn:hover { filter: brightness(1.1); }

.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.btn[disabled] { opacity: 0.5; cursor: default; filter: none; }

.btn-quiet {
  background: none;
  color: var(--primary);
  font-weight: 400;
  padding-inline: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.btn-quiet:hover { filter: none; }

.msg { margin-block: 1rem 0; font-size: 0.9375rem; }

.msg:empty { display: none; }

.msg.error { color: var(--error); }

.msg.note { color: var(--on-surface-variant); }

.step > h2:first-child,
.step > h3:first-child { margin-block-start: 0; }

.step:focus { outline: none; }
