/* مناوبة — Mounawaba · واجهة المنصة
   Arabic-first, right-to-left by default; every rule uses logical properties so that the
   French version (dir="ltr") mirrors without extra code. */

/* ---------- Typeface (self-hosted, SIL Open Font License) ---------- */
@font-face { font-family: "Plex Arabic"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Plex Arabic"; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Plex Arabic"; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Plex Arabic"; font-weight: 700; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Plex Arabic"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Arabic"; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Arabic"; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Arabic"; font-weight: 700; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens ---------- */
:root {
  --bg: #f3f6f4;
  --surface: #ffffff;
  --surface-2: #eaf0ec;
  --text: #0c1e17;
  --muted: #55655e;
  --faint: #7d8c85;
  --line: #dbe5df;
  --line-strong: #c4d2ca;
  --brand: #0a8754;
  --brand-strong: #066a41;
  --brand-soft: #e2f5ea;
  --brand-ink: #064a2e;
  --on-brand: #ffffff;
  --glow: #2ee59d;
  --amber: #b97400;
  --amber-soft: #fff3d6;
  --amber-line: #f1d48a;
  --danger: #b93227;
  --danger-soft: #fdecea;
  --night-0: #030d09;
  --night-1: #06130f;
  --night-2: #0a2a1f;
  --night-3: #0f3b2b;
  --on-night: #eef7f2;
  --on-night-muted: #a9c4b8;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --shadow-1: 0 1px 2px rgba(12, 30, 23, .05), 0 2px 8px rgba(12, 30, 23, .04);
  --shadow-2: 0 2px 4px rgba(12, 30, 23, .05), 0 12px 32px rgba(12, 30, 23, .09);
  --shadow-3: 0 24px 60px rgba(3, 13, 9, .28);
  --wrap: 1120px;
  --gutter: 20px;
  --topbar-h: 62px;
  --tabbar-h: 0px;
  --font: "Plex Arabic", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #07120e;
  --surface: #0d1d17;
  --surface-2: #13281f;
  --text: #e8f2ed;
  --muted: #a3b6ad;
  --faint: #7f958b;
  --line: #1d362c;
  --line-strong: #2a4a3d;
  --brand: #2fd08d;
  --brand-strong: #6ae5ae;
  --brand-soft: #0f2e22;
  --brand-ink: #c9f6de;
  --on-brand: #04130d;
  --amber: #f0b84a;
  --amber-soft: #2c2410;
  --amber-line: #5c4a1c;
  --danger: #ff8d82;
  --danger-soft: #331613;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-2: 0 12px 32px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #07120e;
    --surface: #0d1d17;
    --surface-2: #13281f;
    --text: #e8f2ed;
    --muted: #a3b6ad;
    --faint: #7f958b;
    --line: #1d362c;
    --line-strong: #2a4a3d;
    --brand: #2fd08d;
    --brand-strong: #6ae5ae;
    --brand-soft: #0f2e22;
    --brand-ink: #c9f6de;
    --on-brand: #04130d;
    --amber: #f0b84a;
    --amber-soft: #2c2410;
    --amber-line: #5c4a1c;
    --danger: #ff8d82;
    --danger-soft: #331613;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-2: 0 12px 32px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
html[lang="fr"] body { line-height: 1.6; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 70%, transparent); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--brand) 28%, transparent); }
.ltr { direction: ltr; unicode-bidi: isolate; }
.rtl { direction: rtl; unicode-bidi: isolate; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--brand); color: var(--on-brand); padding: 10px 16px; border-radius: 10px; font-weight: 600; transition: top .15s; }
.skip:focus { top: 12px; }
#app { min-height: 100dvh; display: flex; flex-direction: column; }
#main { flex: 1; outline: none; }
.icon { width: 20px; height: 20px; flex: none; }
.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 24px; height: 24px; }
[dir="rtl"] .flip { transform: scaleX(-1); }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 40; height: var(--topbar-h); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent); }
.topbar__in { height: 100%; display: flex; align-items: center; gap: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.22rem; letter-spacing: -.01em; }
.brand__mark { width: 34px; height: 34px; border-radius: 10px; flex: none; box-shadow: 0 4px 14px rgba(10, 135, 84, .28); }
.brand small { display: block; font-weight: 500; font-size: .7rem; color: var(--muted); letter-spacing: 0; line-height: 1.2; margin-top: -3px; }
.nav { display: flex; align-items: center; gap: 2px; margin-inline-start: 18px; }
.nav a { padding: 8px 13px; border-radius: 10px; font-weight: 500; font-size: .95rem; color: var(--muted); transition: background .15s, color .15s; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--brand-ink); background: var(--brand-soft); }
.topbar__tools { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.tool { height: 40px; min-width: 40px; padding-inline: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: .86rem; color: var(--text); transition: border-color .15s, background .15s; }
.tool:hover { border-color: var(--line-strong); background: var(--surface-2); }

/* ---------- Bottom tab bar (phones) ---------- */
.tabbar { display: none; }
@media (max-width: 800px) {
  :root { --tabbar-h: 64px; --gutter: 16px; --topbar-h: 56px; }
  .nav { display: none; }
  .tabbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(4, 1fr); height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .72rem; font-weight: 600; color: var(--faint); }
  .tabbar a .icon { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { color: var(--brand); }
  .tabbar a[aria-current="page"] .icon { filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--brand) 40%, transparent)); }
  #app { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .brand small { display: none; }
}

/* ---------- Buttons, chips, badges ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 13px; font-weight: 600; font-size: .97rem; border: 1px solid transparent; transition: transform .12s, background .15s, border-color .15s, box-shadow .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 30%, transparent); }
.btn--primary:hover { background: var(--brand-strong); }
.btn--soft { background: var(--brand-soft); color: var(--brand-ink); }
.btn--soft:hover { background: color-mix(in srgb, var(--brand-soft) 80%, var(--brand)); }
.btn--line { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.btn--line:hover { border-color: var(--brand); color: var(--brand-ink); }
.btn--glass { background: rgba(255, 255, 255, .1); color: var(--on-night); border-color: rgba(255, 255, 255, .2); }
.btn--glass:hover { background: rgba(255, 255, 255, .17); }
.btn--glow { background: var(--glow); color: #03130c; box-shadow: 0 8px 26px rgba(46, 229, 157, .35); }
.btn--glow:hover { background: #55efb2; }
.btn--sm { min-height: 38px; padding: 0 13px; font-size: .88rem; border-radius: 11px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .9rem; font-weight: 500; transition: border-color .15s, background .15s, color .15s; }
.chip:hover { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }
.chip--night { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: var(--on-night); }
.chip--night:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); color: #fff; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge--ok { background: var(--brand-soft); color: var(--brand-ink); }
.badge--amber { background: var(--amber-soft); color: var(--amber); }
.badge--line { background: transparent; border: 1px solid var(--line-strong); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; }
.dot--live { box-shadow: 0 0 0 0 color-mix(in srgb, var(--glow) 70%, transparent); animation: pulse 2s infinite; background: var(--glow); }
.dot--off { background: var(--line-strong); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(46, 229, 157, .55); } 70% { box-shadow: 0 0 0 9px rgba(46, 229, 157, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 229, 157, 0); } }

/* ---------- Hero ---------- */
.hero { position: relative; color: var(--on-night); background:
    radial-gradient(900px 420px at 12% -8%, rgba(46, 229, 157, .2), transparent 62%),
    radial-gradient(700px 380px at 96% 108%, rgba(46, 229, 157, .1), transparent 60%),
    linear-gradient(168deg, var(--night-0) 0%, var(--night-1) 34%, var(--night-2) 78%, var(--night-3) 100%);
  padding-block: 54px 76px; }
[dir="ltr"] .hero { background:
    radial-gradient(900px 420px at 88% -8%, rgba(46, 229, 157, .2), transparent 62%),
    radial-gradient(700px 380px at 4% 108%, rgba(46, 229, 157, .1), transparent 60%),
    linear-gradient(192deg, var(--night-0) 0%, var(--night-1) 34%, var(--night-2) 78%, var(--night-3) 100%); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .55; pointer-events: none;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 27% 64%, #cfeede 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 44% 14%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 44%, #cfeede 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 71% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 83% 58%, #cfeede 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 93% 30%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 80%, #cfeede 50%, transparent 51%),
    radial-gradient(1px 1px at 36% 88%, #fff 50%, transparent 51%),
    radial-gradient(1.1px 1.1px at 64% 82%, #cfeede 50%, transparent 51%); }
.hero__in { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: center; }
.hero__copy { max-width: 660px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 5px 13px; border-radius: 999px; background: rgba(46, 229, 157, .12); border: 1px solid rgba(46, 229, 157, .28); color: #b8f5d8; font-size: .84rem; font-weight: 600; }
.hero h1 { margin-top: 18px; font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.22; font-weight: 700; letter-spacing: -.015em; text-wrap: balance; }
html[lang="fr"] .hero h1 { line-height: 1.12; letter-spacing: -.025em; }
.hero h1 em { font-style: normal; color: var(--glow); }
.hero__lead { margin-top: 14px; font-size: 1.08rem; color: var(--on-night-muted); max-width: 56ch; text-wrap: pretty; }
.hero__search { margin-top: 26px; }
.hero__actions { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; }
.nowline { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: .9rem; color: var(--on-night-muted); }
.nowline strong { color: var(--on-night); font-weight: 600; }
.hero__art { position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.sign { position: relative; width: 190px; height: 190px; filter: drop-shadow(0 0 26px rgba(46, 229, 157, .55)) drop-shadow(0 0 70px rgba(46, 229, 157, .35)); animation: breathe 4.2s ease-in-out infinite; }
.sign::before, .sign::after { content: ""; position: absolute; inset: 0; clip-path: polygon(34% 0, 66% 0, 66% 34%, 100% 34%, 100% 66%, 66% 66%, 66% 100%, 34% 100%, 34% 66%, 0 66%, 0 34%, 34% 34%); }
.sign::before { background: linear-gradient(160deg, #7dffc9, #17c57e 60%, #0a8754); border-radius: 8px; }
.sign::after { inset: 13px; background: var(--night-1); opacity: .9; }
.sign i { position: absolute; inset: 26px; z-index: 1; clip-path: polygon(34% 0, 66% 0, 66% 34%, 100% 34%, 100% 66%, 66% 66%, 66% 100%, 34% 100%, 34% 66%, 0 66%, 0 34%, 34% 34%); background: linear-gradient(160deg, #a5ffd9, #2ee59d); }
.hero__art::after { content: ""; position: absolute; width: 74%; height: 12px; bottom: 6%; border-radius: 50%; background: radial-gradient(closest-side, rgba(46, 229, 157, .35), transparent); filter: blur(4px); }
.moon { position: absolute; top: 4%; inset-inline-end: 6%; width: 52px; height: 52px; border-radius: 50%; box-shadow: inset -13px 5px 0 0 #ffd87a; transform: rotate(-18deg); filter: drop-shadow(0 0 16px rgba(255, 216, 122, .5)); }
[dir="rtl"] .moon { box-shadow: inset 13px 5px 0 0 #ffd87a; transform: rotate(18deg); }
@keyframes breathe { 0%, 100% { filter: drop-shadow(0 0 22px rgba(46, 229, 157, .5)) drop-shadow(0 0 60px rgba(46, 229, 157, .28)); } 50% { filter: drop-shadow(0 0 30px rgba(46, 229, 157, .7)) drop-shadow(0 0 90px rgba(46, 229, 157, .42)); } }
@media (max-width: 900px) {
  .hero { padding-block: 34px 56px; }
  .hero__in { grid-template-columns: 1fr; }
  .hero__art { display: none; }
}

/* ---------- Search ---------- */
.search { position: relative; }
.search__box { display: flex; align-items: center; gap: 10px; height: 60px; padding-inline: 18px 8px; background: #fff; color: #0c1e17; border-radius: 17px; box-shadow: var(--shadow-3); border: 2px solid transparent; transition: border-color .15s, box-shadow .15s; }
.search--plain .search__box { box-shadow: var(--shadow-1); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); height: 54px; }
.search__box:focus-within { border-color: var(--glow); }
.search--plain .search__box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.search__box > .icon { color: #6b7c74; width: 22px; height: 22px; }
.search__input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 1.06rem; font-weight: 500; color: inherit; }
.search__input::placeholder { color: #8b9a93; font-weight: 400; }
.search__clear { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #6b7c74; }
.search__clear:hover { background: rgba(12, 30, 23, .07); }
.search__go { height: 44px; padding-inline: 16px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; }
:root[data-theme="dark"] .search__go { color: #04130d; }
.search__go:hover { background: var(--brand-strong); }
.search__panel { position: absolute; z-index: 30; inset-inline: 0; top: calc(100% + 8px); background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow-2); padding: 8px; max-height: min(62vh, 470px); overflow: auto; overscroll-behavior: contain; }
.search__group { padding: 8px 12px 4px; font-size: .78rem; font-weight: 600; color: var(--faint); }
.search__opt { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; cursor: pointer; }
.search__opt[aria-selected="true"], .search__opt:hover { background: var(--brand-soft); }
.search__ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: .86rem; }
.search__opt[data-type="w"] .search__ico { background: var(--brand); color: var(--on-brand); }
.search__name { font-weight: 600; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search__name mark { background: none; color: var(--brand); font-weight: 700; }
.search__meta { font-size: .84rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search__empty { padding: 18px 14px; color: var(--muted); font-size: .95rem; }
@media (max-width: 560px) {
  .search__box { height: 56px; padding-inline: 14px 6px; }
  .search__go span { display: none; }
  .search__go { padding-inline: 12px; }
}

/* ---------- Sections ---------- */
.section { padding-block: 52px; }
.section--tight { padding-block: 30px; }
.section--lift { margin-top: -38px; padding-top: 0; position: relative; z-index: 2; }
.section__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 20px; margin-bottom: 22px; }
.section__title { font-size: clamp(1.4rem, 2.6vw, 1.85rem); font-weight: 700; line-height: 1.35; letter-spacing: -.01em; }
.section__sub { color: var(--muted); margin-top: 4px; max-width: 62ch; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.card--pad { padding: 22px; }

/* quick access strip under the hero */
.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.qcard { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-2); transition: transform .15s, border-color .15s; }
.qcard:hover { transform: translateY(-2px); border-color: var(--brand); }
.qcard__ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.qcard__ico--amber { background: var(--amber-soft); color: var(--amber); }
.qcard b { display: block; font-weight: 600; line-height: 1.4; }
.qcard span { display: block; font-size: .86rem; color: var(--muted); line-height: 1.5; }
.qcard .icon.go { margin-inline-start: auto; color: var(--faint); }
@media (max-width: 860px) { .quick { grid-template-columns: 1fr; gap: 10px; } .section--lift { margin-top: -30px; } }

/* ---------- Wilaya grid ---------- */
.filter { display: flex; align-items: center; gap: 10px; height: 46px; padding-inline: 14px; min-width: min(100%, 300px); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 13px; color: var(--muted); }
.filter:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.filter input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .86rem; color: var(--muted); margin-bottom: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 10px; }
.wcard { position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; transition: transform .14s, border-color .14s, box-shadow .14s; }
.wcard:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: var(--shadow-2); }
.plate { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--surface-2); color: var(--text); font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.wcard--on .plate { background: var(--brand); color: var(--on-brand); }
.wcard b { display: block; font-weight: 600; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wcard small { display: block; color: var(--muted); font-size: .82rem; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wcard .dot { position: absolute; top: 10px; inset-inline-end: 10px; }
.wgrid__none { grid-column: 1 / -1; padding: 26px; text-align: center; color: var(--muted); }
@media (max-width: 480px) { .wgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .wcard { grid-template-columns: 38px minmax(0, 1fr); gap: 9px; padding: 10px; } .plate { width: 38px; height: 38px; font-size: .95rem; border-radius: 11px; } }

/* ---------- Steps, facts, FAQ ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: step; }
.step { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.step__n { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 14px; }
.step h3 { font-size: 1.08rem; font-weight: 600; }
.step p { color: var(--muted); margin-top: 6px; font-size: .96rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.cover { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; padding: 30px; border-radius: 22px; color: var(--on-night); background: radial-gradient(600px 300px at 0% 0%, rgba(46, 229, 157, .16), transparent 60%), linear-gradient(150deg, var(--night-1), var(--night-2)); }
.cover h2 { font-size: 1.5rem; line-height: 1.4; font-weight: 700; }
.cover p { color: var(--on-night-muted); margin-top: 10px; }
.cover__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-content: center; }
.cstat { padding: 14px 16px; border-radius: 15px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.cstat b { display: block; font-size: 1.7rem; font-weight: 700; line-height: 1.2; color: #fff; font-variant-numeric: tabular-nums; }
.cstat span { font-size: .86rem; color: var(--on-night-muted); }
@media (max-width: 860px) { .cover { grid-template-columns: 1fr; padding: 22px; } }
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 0 18px; transition: border-color .15s; }
.faq details[open] { border-color: var(--line-strong); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 0; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 10px; height: 10px; flex: none; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint); transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(225deg) translateY(-3px); }
.faq p { padding-bottom: 18px; color: var(--muted); max-width: 70ch; }

/* ---------- Page header (wilaya, daira, commune) ---------- */
.pagehead { background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); padding-block: 22px 26px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: .88rem; color: var(--muted); }
.crumbs a { padding: 2px 4px; border-radius: 6px; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.crumbs .icon { width: 14px; height: 14px; color: var(--faint); }
.pagehead__row { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.pagehead .plate { width: 62px; height: 62px; border-radius: 17px; font-size: 1.5rem; background: var(--brand); color: var(--on-brand); box-shadow: 0 8px 22px color-mix(in srgb, var(--brand) 26%, transparent); }
.pagehead .plate--ico { background: var(--brand-soft); color: var(--brand); box-shadow: none; }
.pagehead h1 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }
.pagehead__alt { color: var(--muted); font-size: .98rem; }
.pagehead__tools { margin-inline-start: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.facts { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.fact { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 11px; background: var(--surface); border: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.fact b { color: var(--text); font-weight: 600; }
.fact .icon { width: 16px; height: 16px; color: var(--brand); }
@media (max-width: 640px) {
  .pagehead { padding-block: 16px 18px; }
  .pagehead .plate { width: 50px; height: 50px; border-radius: 14px; font-size: 1.25rem; }
  .pagehead__row { gap: 10px 12px; }
  .pagehead__tools { margin-inline-start: 0; width: 100%; }
  .facts { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: none; }
  .facts::-webkit-scrollbar { display: none; }
  .fact { flex: none; }
}

/* ---------- Layout for place pages ---------- */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 26px; align-items: start; }
.cols__side { position: sticky; top: calc(var(--topbar-h) + 18px); display: grid; gap: 16px; }
@media (max-width: 1000px) { .cols { grid-template-columns: 1fr; } .cols__side { position: static; } }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.cols > *, .stack > * { min-width: 0; }
.h2 { font-size: 1.22rem; font-weight: 700; line-height: 1.4; }
.h2 + .sub, .sub { color: var(--muted); font-size: .93rem; }
.blockhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; margin-bottom: 12px; }

/* ---------- Duty card ---------- */
.duty { position: relative; overflow: hidden; border-radius: 22px; color: var(--on-night); background: radial-gradient(520px 240px at 100% 0%, rgba(46, 229, 157, .22), transparent 62%), linear-gradient(160deg, var(--night-1), var(--night-2) 70%, var(--night-3)); box-shadow: var(--shadow-2); }
[dir="ltr"] .duty { background: radial-gradient(520px 240px at 0% 0%, rgba(46, 229, 157, .22), transparent 62%), linear-gradient(200deg, var(--night-1), var(--night-2) 70%, var(--night-3)); }
.duty--day { background: radial-gradient(520px 240px at 100% 0%, rgba(255, 216, 122, .2), transparent 62%), linear-gradient(160deg, #0b2a20, #0f3b2b 70%, #14503a); }
.duty__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 18px 22px 0; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 13px; border-radius: 999px; font-size: .86rem; font-weight: 700; background: rgba(46, 229, 157, .16); color: #b8f5d8; border: 1px solid rgba(46, 229, 157, .3); }
.pill--next { background: rgba(255, 216, 122, .14); color: #ffe2a0; border-color: rgba(255, 216, 122, .3); }
.duty__when { font-size: .92rem; color: var(--on-night-muted); }
.duty__when b { color: var(--on-night); font-weight: 600; }
.duty__kind { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 600; color: var(--on-night-muted); }
.duty__sector { padding: 16px 22px 0; font-size: .84rem; font-weight: 600; color: #8fd9b6; display: flex; align-items: center; gap: 7px; }
.duty__list { padding: 6px 22px 18px; }
.ph { padding: 14px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; align-items: center; }
.ph + .ph { border-top: 1px solid rgba(255, 255, 255, .1); }
.ph__name { font-size: 1.28rem; font-weight: 700; line-height: 1.4; }
.ph__name small { font-size: .82rem; font-weight: 500; color: var(--on-night-muted); margin-inline-end: 2px; }
.ph__addr { margin-top: 2px; color: var(--on-night-muted); font-size: .96rem; display: flex; gap: 7px; align-items: flex-start; }
.ph__addr .icon { width: 16px; height: 16px; margin-top: 5px; color: #8fd9b6; }
.ph__tel { margin-top: 2px; font-weight: 600; color: var(--on-night); display: inline-flex; gap: 7px; align-items: center; }
.ph__acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
@media (max-width: 640px) { .ph { grid-template-columns: 1fr; } .ph__acts { justify-content: flex-start; } .ph__name { font-size: 1.16rem; } .duty__head, .duty__sector { padding-inline: 16px; } .duty__list { padding-inline: 16px; } }
.duty__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 22px; background: rgba(0, 0, 0, .22); border-top: 1px solid rgba(255, 255, 255, .08); font-size: .82rem; color: var(--on-night-muted); }
.duty__foot a { color: #b8f5d8; text-decoration: underline; text-underline-offset: 3px; }
.duty__foot a:hover { color: #fff; }
.duty__note { flex-basis: 100%; display: flex; gap: 7px; align-items: flex-start; color: #ffe2a0; }
.duty__note .icon { margin-top: 4px; flex: none; }
.duty--quiet .duty__note { color: var(--amber); }
@media (max-width: 640px) { .duty__foot { padding-inline: 16px; } }
.duty--quiet { background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.duty--quiet .duty__when, .duty--quiet .ph__addr, .duty--quiet .duty__kind, .duty--quiet .ph__name small { color: var(--muted); }
.duty--quiet .duty__when b, .duty--quiet .ph__tel { color: var(--text); }
.duty--quiet .duty__sector, .duty--quiet .ph__addr .icon { color: var(--brand); }
.duty--quiet .ph + .ph { border-top-color: var(--line); }
.duty--quiet .pill { background: var(--brand-soft); color: var(--brand-ink); border-color: transparent; }
.duty--quiet .pill--next { background: var(--amber-soft); color: var(--amber); }
.duty--quiet .duty__foot { background: var(--surface-2); border-top-color: var(--line); color: var(--muted); }
.duty--quiet .duty__foot a { color: var(--brand-ink); }
.duty--quiet .btn--glass { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.duty--quiet .btn--glass:hover { border-color: var(--brand); }
.duty--quiet .btn--glow { background: var(--brand); color: var(--on-brand); box-shadow: none; }

/* ---------- Date strip ---------- */
.dates { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; margin-inline: -2px; scrollbar-width: thin; scroll-snap-type: x proximity; }
.date { flex: none; width: 62px; padding: 9px 0 8px; border-radius: 15px; border: 1px solid var(--line); background: var(--surface); text-align: center; scroll-snap-align: start; transition: border-color .15s, background .15s; position: relative; }
.date:hover { border-color: var(--brand); }
.date small { display: block; font-size: .74rem; color: var(--muted); line-height: 1.3; }
.date b { display: block; font-size: 1.2rem; font-weight: 700; line-height: 1.35; font-variant-numeric: tabular-nums; }
.date em { display: block; font-style: normal; font-size: .7rem; color: var(--faint); line-height: 1.2; }
.date[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); box-shadow: 0 8px 18px color-mix(in srgb, var(--brand) 28%, transparent); }
.date[aria-pressed="true"] small, .date[aria-pressed="true"] em { color: color-mix(in srgb, var(--on-brand) 82%, transparent); }
.date--fri:not([aria-pressed="true"]) { background: var(--amber-soft); border-color: var(--amber-line); }
.date--none:not([aria-pressed="true"]) b { color: var(--faint); }
.date i { position: absolute; top: 6px; inset-inline-end: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.date[aria-pressed="true"] i { background: var(--on-brand); }

/* ---------- Notices ---------- */
.notice { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.notice__ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.notice h3 { font-size: 1.05rem; font-weight: 600; line-height: 1.45; }
.notice p { color: var(--muted); margin-top: 4px; font-size: .95rem; }
.notice__acts { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.notice--warn { background: var(--amber-soft); border-color: var(--amber-line); }
.notice--warn .notice__ico { background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); }
.notice--warn p { color: color-mix(in srgb, var(--text) 78%, var(--amber)); }
.notice--ok .notice__ico { background: var(--brand-soft); color: var(--brand); }
.tip { display: flex; gap: 9px; align-items: flex-start; font-size: .88rem; color: var(--muted); }
.tip .icon { width: 16px; height: 16px; margin-top: 5px; color: var(--amber); }

/* ---------- Directory list ---------- */
.dir { display: grid; gap: 8px; }
.phitem { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; transition: border-color .15s; }
.phitem:hover, .phitem.is-hot { border-color: var(--brand); }
.phitem__ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.phitem--duty .phitem__ico { background: var(--brand); color: var(--on-brand); }
.phitem b { display: block; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.phitem__meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: .85rem; color: var(--muted); line-height: 1.5; }
.phitem__meta span { display: inline-flex; align-items: center; gap: 5px; }
.phitem__acts { display: flex; gap: 6px; }
.iconbtn { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--text); transition: border-color .15s, color .15s, background .15s; }
.iconbtn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.iconbtn--call { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.iconbtn--call:hover { background: var(--brand-strong); color: var(--on-brand); }
.more { margin-top: 10px; }
.dist { font-weight: 600; color: var(--brand-ink); font-variant-numeric: tabular-nums; }

/* ---------- Map ---------- */
.map { height: 340px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); position: relative; z-index: 0; }
.map--tall { height: 440px; }
.map__ph { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; gap: 10px; padding: 20px; color: var(--muted); font-size: .93rem; }
.leaflet-container { font-family: var(--font); background: var(--surface-2); }
.leaflet-popup-content-wrapper { border-radius: 13px; box-shadow: var(--shadow-2); }
.leaflet-popup-content { margin: 12px 14px; font-size: .9rem; line-height: 1.55; }
.leaflet-popup-content b { display: block; font-size: .98rem; }
.leaflet-popup-content a { color: #0a8754; font-weight: 600; text-decoration: underline; }
.pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #fff; border: 2px solid #0a8754; display: grid; place-items: center; box-shadow: 0 4px 10px rgba(3, 13, 9, .28); }
.pin::after { content: ""; width: 14px; height: 14px; transform: rotate(45deg); background: #0a8754; clip-path: polygon(34% 0, 66% 0, 66% 34%, 100% 34%, 100% 66%, 66% 66%, 66% 100%, 34% 100%, 34% 66%, 0 66%, 0 34%, 34% 34%); }
.pin--duty { background: #0a8754; border-color: #fff; width: 36px; height: 36px; }
.pin--duty::after { background: #fff; width: 16px; height: 16px; }
.pin--me { border-radius: 50%; transform: none; width: 20px; height: 20px; background: #2f7df6; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(47, 125, 246, .25); }
.pin--me::after { display: none; }

/* ---------- Dairas and communes ---------- */
.dgroup { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.dgroup__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface-2) 50%, var(--surface)); }
.dgroup__head h3 { font-size: 1.04rem; font-weight: 600; }
.dgroup__head a:hover { color: var(--brand); }
.dgroup__head .badge { margin-inline-start: auto; }
.clist { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
.citem { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); border-inline-end: 1px solid var(--line); margin-top: -1px; margin-inline-end: -1px; transition: background .12s; min-width: 0; }
.citem:hover { background: var(--brand-soft); }
.citem__txt { min-width: 0; flex: 1; }
.citem b { display: block; font-weight: 600; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.citem small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.citem .n { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.citem .n .icon { width: 11px; height: 11px; color: var(--brand); opacity: .7; }
.tonight { display: grid; gap: 8px; }
.trow { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s; }
.trow:hover { border-color: var(--brand); }
.trow__c { font-weight: 600; }
.trow__c small { display: block; margin-top: 2px; font-weight: 400; font-size: .8rem; color: var(--muted); }
.trow__p { min-width: 0; }
.trow__p b { display: block; font-weight: 600; line-height: 1.4; }
.trow__p small { display: block; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.trow .icon { color: var(--faint); }
@media (max-width: 640px) { .trow { grid-template-columns: minmax(0, 1fr) auto; } .trow__c { grid-column: 1 / -1; font-size: .86rem; color: var(--brand-ink); } }

/* ---------- Near me ---------- */
.locate { text-align: center; padding: 44px 24px; display: grid; justify-items: center; gap: 14px; }
.locate__ico { width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.locate__ico .icon { width: 38px; height: 38px; }
.locate h2 { font-size: 1.4rem; font-weight: 700; }
.locate p { color: var(--muted); max-width: 46ch; }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Prose pages ---------- */
.prose { max-width: 780px; display: grid; gap: 14px; }
.prose h2 { font-size: 1.3rem; font-weight: 700; margin-top: 18px; line-height: 1.4; }
.prose p, .prose li { color: color-mix(in srgb, var(--text) 82%, var(--muted)); }
.prose ul { display: grid; gap: 8px; }
.prose li { position: relative; padding-inline-start: 22px; }
.prose li::before { content: ""; position: absolute; inset-inline-start: 4px; top: .75em; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.prose a { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }
:root[data-theme="dark"] .prose a { color: var(--brand); }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.t { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.t th, table.t td { padding: 12px 16px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th { font-weight: 600; color: var(--muted); font-size: .84rem; background: color-mix(in srgb, var(--surface-2) 50%, var(--surface)); white-space: nowrap; }
table.t tr:last-child td { border-bottom: 0; }
.sos { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.sos a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 15px; background: var(--surface); border: 1px solid var(--line); }
.sos a:hover { border-color: var(--danger); }
.sos b { font-size: 1.35rem; font-weight: 700; color: var(--danger); font-variant-numeric: tabular-nums; line-height: 1.2; }
.sos span { font-size: .86rem; color: var(--muted); line-height: 1.4; }

/* ---------- Footer ---------- */
.footer { margin-top: 30px; border-top: 1px solid var(--line); background: var(--surface); padding-block: 34px 28px; font-size: .9rem; color: var(--muted); }
.footer__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)); gap: 28px; }
.footer h4 { font-size: .9rem; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.footer li + li { margin-top: 6px; }
.footer a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.footer__legal { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; font-size: .82rem; }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; gap: 22px; } }

/* ---------- Misc ---------- */
.boot { min-height: 60vh; display: grid; place-content: center; justify-items: center; gap: 16px; color: var(--muted); }
.boot__mark { width: 46px; height: 46px; background: var(--brand); clip-path: polygon(34% 0, 66% 0, 66% 34%, 100% 34%, 100% 66%, 66% 66%, 66% 100%, 34% 100%, 34% 66%, 0 66%, 0 34%, 34% 34%); animation: bootpulse 1.2s ease-in-out infinite; }
@keyframes bootpulse { 0%, 100% { opacity: .35; transform: scale(.9); } 50% { opacity: 1; transform: scale(1); } }
.sk { border-radius: 14px; background: linear-gradient(90deg, var(--surface-2) 25%, color-mix(in srgb, var(--surface-2) 55%, var(--surface)) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; min-height: 64px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.toast { position: fixed; z-index: 90; inset-inline: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 18px); margin-inline: auto; width: fit-content; max-width: calc(100% - 32px); padding: 11px 18px; border-radius: 13px; background: #0c1e17; color: #fff; font-size: .92rem; font-weight: 500; box-shadow: var(--shadow-2); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.is-on { opacity: 1; transform: none; }
.noscript { padding: 30px; text-align: center; }
.empty { padding: 34px 20px; text-align: center; color: var(--muted); }
.view { animation: rise .28s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media print {
  .topbar, .tabbar, .footer, .map, .ph__acts, .phitem__acts, .pagehead__tools, .dates { display: none !important; }
  .duty { background: #fff !important; color: #000 !important; box-shadow: none; border: 1px solid #999; }
  .duty * { color: #000 !important; }
}
