/* Benvela, the shop-window web (ADR 0011).
 *
 * Calm and legible first: the reader may be at A2 in French and on a phone.
 * Large type, one accent colour, short lines. Motion is small and only
 * confirms what just happened (a screen arriving, a choice taken); it is
 * switched off for people who ask for reduced motion. Logical properties
 * (inline/block) everywhere, so Arabic mirrors without a second stylesheet.
 */

:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --ink: #1d1c1a;
  --muted: #6b675f;
  --line: #e4e0d6;
  --accent: #1f3a8a;
  --accent-ink: #ffffff;
  --pass: #2f6f4f;
  --fail: #a4492b;
  --radius: 14px;
  --space: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", sans-serif;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}

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

main {
  max-width: 640px;
  margin-inline: auto;
  padding: calc(var(--space) * 1.5) var(--space) calc(var(--space) * 4);
}

.screen { animation: enter 320ms var(--ease) both; outline: none; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }

.brand { display: flex; justify-content: space-between; align-items: center; margin-block-end: 32px; }
.logo { display: block; height: 28px; width: auto; }

h1, h2 { line-height: 1.2; letter-spacing: -0.02em; }
.hero { font-size: 1.9rem; margin-block: 0 24px; }
h2 { font-size: 1.2rem; margin-block: 32px 12px; }
.muted, .fine { color: var(--muted); }
.fine { font-size: 0.85rem; margin-block-start: 24px; }

.notice {
  background: #fff6db; border: 1px solid #f0dfa6; border-radius: var(--radius);
  padding: 10px 14px; font-size: 0.9rem;
}

.field { display: grid; gap: 6px; margin-block-end: 16px; font-weight: 600; }
select {
  font: inherit; font-weight: 400; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}

.primary, .secondary, .option {
  font: inherit; cursor: pointer; border-radius: 12px; text-decoration: none;
  transition: transform 100ms var(--ease), background-color 160ms var(--ease), border-color 160ms var(--ease);
}
.primary:active, .secondary:active, .option:active { transform: scale(0.98); }
.primary {
  display: block; width: 100%; text-align: center; margin-block-start: 8px;
  padding: 16px; border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 600;
}
.primary:disabled, .primary[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; }
.secondary {
  display: block; width: 100%; text-align: center; margin-block-start: 24px;
  padding: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}

.exam-bar { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.9rem; }
.progress { height: 4px; background: var(--line); border-radius: 2px; margin-block: 8px 24px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); transition: width 220ms var(--ease); }

.prompt { font-size: 1.2rem; font-weight: 600; }
.options { list-style: none; padding: 0; display: grid; gap: 10px; margin-block: 16px 24px; }
.option {
  width: 100%; text-align: start; padding: 14px 16px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
}
.option:hover { border-color: #c9c3b5; }
.option.chosen { border-color: var(--accent); background: #eef2fb; }

.verdict { font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.85rem; margin: 0; }
.verdict.pass { color: var(--pass); }
.verdict.fail { color: var(--fail); }
.score { font-size: 2rem; margin-block: 4px 4px; }

.get-app {
  margin-block: 24px; padding: 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.get-app h2 { margin-block-start: 0; }
.get-app .store + .store { margin-block-start: 10px; }

/* The non-official notice has to be easy to see, not fine print (ADR 0011). */
.notice.unofficial {
  background: #eef2fb; border-color: #c9d4f0; color: var(--ink);
  font-size: 0.95rem; margin-block: 0 24px;
}

.site-footer {
  max-width: 640px; margin-inline: auto; margin-block-start: 40px;
  padding-block-start: 8px; border-block-start: 1px solid var(--line);
}
.site-footer h2 { font-size: 1rem; }
.sources { padding-inline-start: 20px; font-size: 0.9rem; display: grid; gap: 6px; }
.sources a, .legal-links a { color: var(--accent); }
.legal-links { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.9rem; margin-block-start: 16px; }

.topics { list-style: none; padding: 0; display: grid; gap: 10px; }
.topics li { display: grid; grid-template-columns: 1fr 96px 44px; gap: 10px; align-items: center; font-size: 0.9rem; }
.bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); }

.review {
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  padding: 12px 16px; margin-block-end: 10px;
  border-inline-start: 4px solid var(--pass);
}
.review.ko { border-inline-start-color: var(--fail); }
.review summary { cursor: pointer; font-weight: 600; }
.explanation { background: var(--bg); border-radius: 10px; padding: 4px 12px; }

@media (prefers-reduced-motion: reduce) {
  .screen { animation: none; }
  * { transition: none !important; }
}
