/* Marocyber: one stylesheet, no outside fonts, no scripts. */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #121a2b;
  --muted: #55607a;
  --line: #dde2ee;
  --navy: #0b1530;
  --navy-2: #13224a;
  --accent: #0f9e7a;
  --accent-text: #0b7a5e;
  --alert: #c2410c;
  --alert-bg: #fff1e8;
  --guide-bg: #e6f7f1;
  --quote-bg: #f0f2f8;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-ar: "Segoe UI", "Noto Naskh Arabic", "Noto Sans Arabic", Tahoma, "Geeza Pro", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070e22;
    --surface: #0e1a38;
    --text: #e7ecf7;
    --muted: #a3aec8;
    --line: #1e2c52;
    --accent-text: #5fe0bd;
    --alert: #ffa477;
    --alert-bg: #3a1d10;
    --guide-bg: #0d3329;
    --quote-bg: #142246;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--font);
}
html[lang="ar"] body { font-family: var(--font-ar); font-size: 18px; line-height: 1.85; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; inset-inline-start: -9999px; }
.skip:focus { inset-inline-start: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }

/* Header */
.top { background: var(--navy); color: #e7ecf7; }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.3rem; letter-spacing: -.3px; direction: ltr; }
.brand img { width: 45px; height: 24px; }
.brand span b { color: #5fe0bd; font-weight: 800; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-inline-start: auto; }
.nav a { color: #c9d3ea; text-decoration: none; font-size: .95rem; padding: 4px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; text-decoration: underline; }
.langs { display: flex; gap: 6px; }
.langs a { color: #c9d3ea; text-decoration: none; font-size: .85rem; border: 1px solid #2a3a66; border-radius: 999px; padding: 2px 10px; }
.langs a[aria-current="true"] { background: #5fe0bd; color: var(--navy); border-color: #5fe0bd; font-weight: 600; }

/* Hero */
.hero { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%); color: #e7ecf7; padding: 36px 0 44px; }
.hero h1 { margin: 0 0 10px; font-size: clamp(1.6rem, 4.5vw, 2.4rem); line-height: 1.25; color: #fff; }
.hero p { margin: 0; max-width: 640px; color: #c9d3ea; font-size: 1.05rem; }

/* Cards */
main { padding: 28px 0 48px; }
.section-title { font-size: 1.15rem; margin: 8px 0 14px; color: var(--muted); font-weight: 600; text-transform: none; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 28px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 8px; }
.card h3 { margin: 0; font-size: 1.1rem; line-height: 1.4; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.meta { display: flex; align-items: center; gap: 10px; font-size: .82rem; color: var(--muted); }
.tag { display: inline-block; border-radius: 999px; padding: 1px 10px; font-size: .78rem; font-weight: 600; }
.tag-alert { background: var(--alert-bg); color: var(--alert); }
.tag-guide { background: var(--guide-bg); color: var(--accent-text); }

.promo { background: var(--navy); color: #e7ecf7; border-radius: var(--radius); padding: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.promo img { width: 78px; height: 42px; }
.promo div { flex: 1 1 260px; }
.promo h2 { margin: 0 0 4px; font-size: 1.2rem; color: #fff; }
.promo p { margin: 0; color: #c9d3ea; }
.promo a.btn { background: #5fe0bd; color: var(--navy); font-weight: 700; text-decoration: none; padding: 10px 18px; border-radius: 999px; }

/* Article */
.article h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1.3; margin: 6px 0 8px; }
.article .lead { color: var(--muted); font-size: 1.05rem; margin: 0 0 22px; }
.article h2 { font-size: 1.3rem; margin: 30px 0 8px; }
.article h3 { font-size: 1.1rem; margin: 22px 0 6px; }
.article ul, .article ol { padding-inline-start: 24px; }
.article li { margin: 4px 0; }
.article blockquote { margin: 16px 0; padding: 12px 16px; background: var(--quote-bg); border-inline-start: 4px solid var(--alert); border-radius: 8px; }
.article blockquote p { margin: 0; }
.back { display: inline-block; margin-top: 28px; }

/* Language chooser */
.choose { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 8px; }
.choose a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--text); }
.choose a strong { display: block; font-size: 1.25rem; margin-bottom: 4px; }
.choose a span { color: var(--muted); font-size: .95rem; }
.choose a:hover { border-color: var(--accent); }

/* Footer */
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; padding: 22px 0 30px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot a { color: var(--muted); }
