/* LYSS website: no external fonts, scripts or trackers. Font: Inter (SIL OFL 1.1, fonts/OFL.txt). */
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
/* zellige palette: green and gold on cream (same tiles as the application's sign-in page) */
:root {
  --bg: #fbf8f1;
  --surface: #ffffff;
  --border: #e5ddcb;
  --text: #17201b;
  --muted: #5a665f;
  --accent: #0d6b47;          /* zellige green */
  --on-accent: #ffffff;
  --gold: #b9811a;            /* zellige gold */
  --pass: #1a8f5a;
  --fail: #c23b32;
  --code-bg: #f3ecdc;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(23, 32, 27, .06), 0 4px 16px rgba(23, 32, 27, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1412;
    --surface: #161d1a;
    --border: #2a3530;
    --text: #e8ece9;
    --muted: #9aa8a0;
    --accent: #3fbf8a;
    --on-accent: #0b1310;
    --gold: #e0b14f;
    --pass: #4cc38a;
    --fail: #ff7a70;
    --code-bg: #1d2622;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .85em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* language switch: English unless the page says otherwise (works without JavaScript) */
.fr { display: none; }
html[data-lang="fr"] .fr { display: revert; }
html[data-lang="fr"] .en { display: none; }

/* header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--border);
}
.bar { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--accent); text-decoration: none; font-weight: 800; letter-spacing: .06em; }
.brand svg { width: 28px; height: 28px; }
.brand svg .lines { fill: var(--on-accent); }
.brand span { color: var(--text); font-size: 1.15rem; }
nav { display: flex; gap: 18px; margin-left: auto; }
nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
nav a:hover { color: var(--text); }
.langs { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.langs button { border: 0; background: transparent; color: var(--muted); padding: 4px 10px; font: inherit; font-size: .8rem; cursor: pointer; }
.langs button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

/* hero with zellige band */
/* zellige band under the header, as in the application */

/* screenshots page */
.gallery { display: grid; gap: 48px; }
.shot { margin: 0; }
.shot a { display: block; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--surface); }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { margin-top: 14px; }
.shot h2 { font-size: 1.2rem; margin: 0 0 4px; }
.shot p { margin: 0; color: var(--muted); }
.page-head { padding: 56px 0 24px; }
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.hero {
  padding: 72px 0 64px;
  background:
    linear-gradient(var(--bg), color-mix(in srgb, var(--bg) 82%, transparent)),
    url("zellige.svg") repeat;
  background-size: auto, 90px 90px;
  border-bottom: 1px solid var(--border);
}

/* "Designed in Morocco": the application's sign-in hero (zellige + map of Morocco) */
.morocco {
  position: relative; overflow: hidden; padding: 72px 0;
  background: #0d3b2b url("zellige.svg") repeat center / 120px 120px;
}
.morocco::before { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(8, 40, 30, .86), rgba(16, 38, 74, .82)); }
.morocco-inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; color: #f3ead7; text-align: center; }
.morocco-map { width: min(340px, 70%); height: auto; filter: drop-shadow(0 10px 28px rgba(0, 0, 0, .45)); }
.morocco-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 2rem; font-weight: 750; letter-spacing: .04em; }
.morocco-brand img { width: 34px; height: 34px; }
.morocco p { margin: 4px 0 0; }
.morocco .sub { color: #cfd9d3; font-size: .95rem; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; }
.kicker { color: var(--gold); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin: 0 0 12px; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); line-height: 1.12; margin: 0 0 18px; letter-spacing: -.02em; }
.lead { font-size: 1.12rem; color: var(--muted); margin: 0 0 28px; max-width: 36em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin: 14px 0 0; }
.btn {
  display: inline-block; padding: 11px 18px; border-radius: 10px; font-weight: 600; text-decoration: none;
  background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent);
}
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }

.report {
  margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px;
}
.report figcaption { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.dev { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.lvl { font-size: .75rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.l0 { background: color-mix(in srgb, var(--fail) 15%, transparent); color: var(--fail); }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: grid; grid-template-columns: 18px 76px 1fr; align-items: baseline; gap: 6px; padding: 7px 0; border-top: 1px solid var(--border); font-size: .9rem; }
.checks li::before { font-weight: 800; }
.checks .fail::before { content: "✕"; color: var(--fail); }
.checks .pass::before { content: "✓"; color: var(--pass); }
.checks code { color: var(--muted); }

/* sections */
section { padding: 64px 0; }
.section { font-size: 1.7rem; margin: 0 0 28px; letter-spacing: -.01em; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.two { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }
.why h2 { font-size: 1.1rem; margin: 0 0 6px; }
.why p, .level p, .steps p { color: var(--muted); margin: 0; }
.levels, .platforms { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.level { position: relative; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.level h3 { margin: 10px 0 6px; }
.badge { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-weight: 800; color: var(--on-accent); }
.b1 { background: var(--gold); }
.b2 { background: var(--accent); }
.b3 { background: var(--muted); }
.note { color: var(--muted); font-size: .95rem; margin: 24px 0 0; }

.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin: 0; padding: 0; }
.steps li { counter-increment: step; padding-top: 14px; border-top: 3px solid var(--accent); }
.steps li::before { content: "0" counter(step); color: var(--gold); font-weight: 800; font-size: .85rem; }
.steps h3 { margin: 4px 0 6px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

.contact { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.contact h3 { margin-top: 0; }
.small { font-size: .85rem; color: var(--muted); }

footer { border-top: 1px solid var(--border); padding: 24px 0; color: var(--muted); font-size: .85rem; }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.foot p { margin: 0; }
.made::before {
  content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px;
  background: url("zellige.svg") center / 40px 40px; border-radius: 3px;
}

/* in-browser audit (audit.html) */
.audit-tool { padding-top: 8px; }
.audit-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.audit-options { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; margin-bottom: 16px; }
.audit-options > label { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.audit-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
select, textarea {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
}
select { padding: 8px 10px; min-width: 12em; }
textarea {
  display: block; width: 100%; padding: 12px; resize: vertical; tab-size: 4;
  font: .85rem/1.45 ui-monospace, "Cascadia Code", Consolas, monospace;
}
textarea.drop { outline: 2px dashed var(--accent); outline-offset: 2px; }
select:focus-visible, textarea:focus-visible, .btn:focus-visible, .file-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.audit-label { display: block; font-weight: 600; margin-bottom: 6px; }
.audit-form .small { margin: 8px 0 0; }
.btn { font: inherit; font-weight: 600; cursor: pointer; }
.btn:disabled { opacity: .6; cursor: progress; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.audit-state { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.audit-state summary { cursor: pointer; font-weight: 600; }
.audit-state textarea { margin-top: 10px; }
.audit-run { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 18px; }
.msg { margin: 0; color: var(--muted); }
.msg-ok { color: var(--pass); }
.msg-error { color: var(--fail); }
.msg-busy::before {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px;
  border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .msg-busy::before { animation: none; } }

.audit-results { margin-top: 32px; scroll-margin-top: 76px; }
.result-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.result-head h2 { margin: 0; font-size: 1.5rem; }
.result-head .small { margin: 4px 0 0; }
.lvl { white-space: nowrap; font-size: .9rem; padding: 4px 14px; }
.l-ok { background: color-mix(in srgb, var(--pass) 15%, transparent); color: var(--pass); }
.counts { display: grid; grid-template-columns: repeat(3, minmax(0, 150px)); gap: 12px; margin: 18px 0 8px; }
.count { display: grid; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--muted); font-size: .85rem; }
.count strong { font-size: 1.7rem; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; }
.count-fail strong { color: var(--fail); }
.count-pass strong { color: var(--pass); }
.findings h3 { margin: 28px 0 10px; font-size: 1.05rem; }
.finding { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); margin-bottom: 8px; }
.finding summary {
  display: grid; grid-template-columns: 54px 78px 1fr auto; align-items: baseline; gap: 10px;
  padding: 10px 14px; cursor: pointer; list-style: none;
}
.finding summary::-webkit-details-marker { display: none; }
.finding summary code { color: var(--muted); }
.f-level { color: var(--muted); font-size: .8rem; }
.pill { justify-self: start; font-size: .7rem; font-weight: 800; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; }
.pill-fail { background: color-mix(in srgb, var(--fail) 15%, transparent); color: var(--fail); }
.pill-pass { background: color-mix(in srgb, var(--pass) 15%, transparent); color: var(--pass); }
.pill-unknown, .pill-not_applicable { background: var(--code-bg); color: var(--muted); }
.f-body { padding: 0 14px 14px; border-top: 1px solid var(--border); }
.f-body h4 { margin: 12px 0 4px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.evidence { margin: 0; padding-left: 18px; font: .82rem/1.5 ui-monospace, "Cascadia Code", Consolas, monospace; overflow-wrap: anywhere; }
.f-note { margin: 10px 0 0; color: var(--muted); font-size: .92rem; }
.fix { margin: 0; padding: 10px 12px; background: var(--code-bg); border-radius: 8px; overflow-x: auto; font-size: .82rem; }

@media (max-width: 820px) {
  .audit-buttons { margin-left: 0; }
  .finding summary { grid-template-columns: 48px 1fr auto; }
  .finding summary code { display: none; }
}

@media (max-width: 820px) {
  nav { display: none; }
  .langs { margin-left: auto; }
  .hero { padding: 44px 0; }
  .hero-grid, .three, .two, .steps { grid-template-columns: 1fr; gap: 28px; }
  section { padding: 44px 0; }
}
