/* comment.ma — one stylesheet. Light and dark; left-to-right (French) and right-to-left (Arabic). */
:root {
  --bg: #faf7f2; --card: #fff; --ink: #1b2536; --muted: #5d6779; --line: #e9e2d6;
  --brand: #d81f26; --brand-ink: #b3141b; --navy: #223655; --soft: #f3ede3; --ok: #1b7a4b;
  --radius: 14px; --shadow: 0 1px 2px rgba(27,37,54,.06), 0 8px 24px -12px rgba(27,37,54,.18);
  --head: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #11151d; --card: #1a202b; --ink: #e8ecf3; --muted: #9aa5b8; --line: #2a3342;
  --brand: #ff5a60; --brand-ink: #ff7b80; --navy: #c9d6ee; --soft: #1f2632; --ok: #5fd39a;
  --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11151d; --card: #1a202b; --ink: #e8ecf3; --muted: #9aa5b8; --line: #2a3342;
    --brand: #ff5a60; --brand-ink: #ff7b80; --navy: #c9d6ee; --soft: #1f2632; --ok: #5fd39a;
    --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
  }
}
[dir="rtl"] { --head: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif; --body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--body); overflow-wrap: anywhere; }
[dir="rtl"] body { font-size: 18px; line-height: 1.85; }
img { max-width: 100%; height: auto; }
a { color: var(--brand-ink); text-underline-offset: 3px; }
a:hover { color: var(--brand); }
h1, h2, h3 { font-family: var(--head); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; text-wrap: balance; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; line-height: 1.4; }
h1 { font-size: clamp(1.75rem, 4.6vw, 2.6rem); font-weight: 800; }
h2 { font-size: clamp(1.25rem, 3vw, 1.6rem); font-weight: 800; margin-top: 1.6em; }
h3 { font-size: 1.08rem; font-weight: 600; }
p { margin: 0 0 1em; }
small { font-size: .8em; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--card); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { inset-inline-start: 8px; }
.muted { color: var(--muted); } .small { font-size: .85rem; }

/* ---------- header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 14px; min-height: 62px; }
.logo { font: 800 1.5rem/1 var(--head); color: var(--navy); text-decoration: none; letter-spacing: -.04em; flex: none; }
.logo span { color: var(--brand); }
.logo.small { font-size: 1.25rem; }
.search { position: relative; display: flex; flex: 1; min-width: 0; max-width: 460px; margin-inline: auto; }
.search input { flex: 1; min-width: 0; width: 100%; height: 42px; padding: 0 16px; border: 1px solid var(--line); border-inline-end: 0; border-radius: 999px 0 0 999px; background: var(--card); color: var(--ink); font: inherit; font-size: 1rem; }
[dir="rtl"] .search input { border-radius: 0 999px 999px 0; }
.search button { height: 42px; padding: 0 16px; border: 0; border-radius: 0 999px 999px 0; background: var(--brand); color: #fff; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font: 600 1rem var(--body); }
:root[data-theme="dark"] .search button, :root[data-theme="dark"] .btn { color: #16191f; }
[dir="rtl"] .search button { border-radius: 999px 0 0 999px; }
.search button:hover { background: var(--brand-ink); }
.suggest { position: absolute; inset-inline: 0; top: calc(100% + 6px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; z-index: 30; }
.suggest a { display: block; padding: 10px 16px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); font-size: .95rem; }
.suggest a:last-child { border: 0; }
.suggest a:hover, .suggest a.on { background: var(--soft); }
.nav { display: flex; align-items: center; gap: 4px; flex: none; }
.nav a { padding: 8px 12px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover, .nav a[aria-current] { background: var(--soft); color: var(--brand-ink); }
.theme-btn, .menu-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 0; border-radius: 999px; background: none; color: var(--ink); cursor: pointer; }
.theme-btn:hover, .menu-btn:hover { background: var(--soft); }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: inline; } :root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .i-sun { display: inline; } :root:not([data-theme="light"]) .i-moon { display: none; } }
.menu-btn { display: none; }
@media (max-width: 860px) {
  .menu-btn { display: inline-grid; }
  .nav { display: none; position: absolute; inset-inline: 0; top: 100%; flex-direction: column; align-items: stretch; padding: 10px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .logo { font-size: 1.3rem; }
  .top-in { gap: 8px; }
  .search.big button span { display: none; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -18px; padding-inline: 18px; scrollbar-width: none; }
  .chips.more { flex-wrap: wrap; margin-inline: 0; padding-inline: 0; }
}

main { padding: 22px 0 56px; min-height: 60vh; }

/* ---------- hero */
.hero { position: relative; margin: 6px 0 30px; padding: clamp(26px, 6vw, 56px) clamp(18px, 5vw, 48px); border-radius: 24px; background: var(--navy); color: #fff; overflow: hidden; isolation: isolate; }
:root[data-theme="dark"] .hero { background: #1c2740; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero { background: #1c2740; } }
/* an eight-point star, as in zellige tiling */
.hero::after { content: ""; position: absolute; z-index: -1; inset-block: -40px; inset-inline-end: -60px; width: 420px; opacity: .13;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23fff' stroke-width='2'%3E%3Crect x='22' y='22' width='56' height='56'/%3E%3Crect x='22' y='22' width='56' height='56' transform='rotate(45 50 50)'/%3E%3Ccircle cx='50' cy='50' r='15'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 140px 140px; }
.hero h1 { color: #fff; max-width: 16ch; font-size: clamp(2rem, 6.4vw, 3.6rem); }
.hero h1 em { font-style: normal; color: #ff8a8f; }
.hero > p { max-width: 52ch; color: #d5ddec; font-size: 1.08rem; }
.search.big { max-width: 620px; margin: 18px 0 0; }
.search.big input { height: 54px; font-size: 1.05rem; border-color: transparent; padding-inline: 22px; }
.search.big button { height: 54px; padding-inline: 22px; }
.search.inline input { border-color: var(--line); }
.search.inline { margin-bottom: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip { padding: 6px 13px; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; text-decoration: none; font-size: .9rem; font-weight: 600; white-space: nowrap; }
.chip small { opacity: .7; font-weight: 400; }
.chip:hover { background: #fff; color: var(--brand-ink); }
.chips.more { margin-top: 34px; }
.chips.more .chip { background: var(--soft); color: var(--ink); }
.chips.more .chip:hover { background: var(--brand); color: #fff; }

/* ---------- cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin: 0 0 22px; }
.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-pic { display: block; aspect-ratio: 16 / 10; background: var(--soft); }
.card-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph { display: grid; place-items: center; width: 100%; height: 100%; font: 800 3.4rem var(--head); color: var(--brand); background: repeating-linear-gradient(45deg, var(--soft), var(--soft) 12px, transparent 12px, transparent 24px); text-transform: uppercase; }
.card-body { padding: 14px 16px 16px; }
.kicker { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-ink); margin-bottom: 6px; }
[dir="rtl"] .kicker { letter-spacing: 0; font-size: .85rem; }
.card h3 { margin: 0 0 6px; font-size: 1.1rem; line-height: 1.25; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--brand-ink); }
.card p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.45; }
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .card { flex-direction: row; }
  .card-pic { flex: none; width: 116px; aspect-ratio: 1; }
  .card-body { padding: 10px 12px; min-width: 0; }
  .card h3 { font-size: 1rem; }
  .card p { display: none; }
  .ph { font-size: 2.2rem; }
}

/* ---------- tools */
.tool-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 8px; }
.tool-row.big { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.tool { display: block; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.tool:hover { border-color: var(--brand); color: var(--ink); }
.tool svg { color: var(--brand); width: 26px; height: 26px; display: block; margin-bottom: 8px; }
.tool b { display: block; font-family: var(--head); font-size: 1.02rem; }
.tool span { display: block; color: var(--muted); font-size: .86rem; line-height: 1.4; margin-top: 2px; }

/* ---------- lists */
.cols2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 40px; }
.links { list-style: none; margin: 0; padding: 0; }
.links li { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); }
.links a { color: var(--ink); text-decoration: none; font-weight: 600; }
.links a:hover { color: var(--brand-ink); text-decoration: underline; }
.links time, .links span { flex: none; color: var(--muted); font-size: .82rem; }
.links.tight li { padding: 8px 0; }
.links.tight a { font-weight: 500; font-size: .95rem; line-height: 1.35; }
.head { margin: 4px 0 20px; }
.head p { color: var(--muted); margin: 0; }
.head h1 small { display: block; font-size: .5em; color: var(--muted); font-weight: 600; margin-top: 6px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .86rem; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 26px 0; }
.pager a, .pager b, .pager span { min-width: 42px; height: 42px; padding: 0 12px; display: inline-grid; place-items: center; border-radius: 10px; text-decoration: none; }
.pager a { background: var(--card); border: 1px solid var(--line); color: var(--ink); font-weight: 600; }
.pager a:hover { border-color: var(--brand); }
.pager b { background: var(--brand); color: #fff; }

/* ---------- article */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
@media (min-width: 1000px) { .layout { grid-template-columns: minmax(0, 1fr) 280px; } }
.post { min-width: 0; }
.post.narrow { max-width: 760px; }
.post > h1 { margin-bottom: 10px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: .88rem; margin-bottom: 18px; }
.cover { display: block; width: 100%; max-width: 760px; height: auto; max-height: 430px; object-fit: cover; border-radius: var(--radius); margin: 0 0 22px; background: var(--soft); }
.toc { background: var(--soft); border-radius: var(--radius); padding: 16px 20px; margin: 0 0 22px; font-size: .95rem; }
.toc ol { margin: 8px 0 0; padding-inline-start: 20px; }
.toc li { margin: 4px 0; }
.toc a { color: var(--ink); }
.prose { font-size: 1.08rem; line-height: 1.75; max-width: 760px; }
[dir="rtl"] .prose { font-size: 1.18rem; line-height: 2; }
.prose.small { font-size: 1rem; line-height: 1.6; }
.prose h2 { margin: 1.7em 0 .6em; padding-top: .2em; }
.prose h3, .prose h4 { margin: 1.4em 0 .5em; font-size: 1.15rem; }
.prose ul, .prose ol { padding-inline-start: 1.3em; margin: 0 0 1.1em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--brand); font-weight: 700; }
.prose img { border-radius: 10px; height: auto !important; max-width: 100% !important; }
.prose iframe { max-width: 100%; aspect-ratio: 16 / 9; height: auto; width: 100%; border: 0; border-radius: 10px; }
.prose blockquote { margin: 1em 0; padding: 4px 18px; border-inline-start: 4px solid var(--brand); color: var(--muted); }
.prose pre, .whois { background: var(--soft); padding: 14px; border-radius: 10px; overflow-x: auto; font-size: .85rem; line-height: 1.5; white-space: pre-wrap; }
.prose input, .prose select, .prose textarea { max-width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); }
.prose button, .prose input[type=button], .prose input[type=submit] { cursor: pointer; }
.tablewrap { overflow-x: auto; margin: 0 0 1.1em; }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: start; }
.prose th { background: var(--soft); }
.sources { max-width: 760px; margin: 24px 0; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); font-size: .9rem; }
.sources ul { margin: 6px 0 0; padding-inline-start: 18px; }
.side section { margin-bottom: 26px; }
.side h2 { font-size: 1.05rem; margin: 0 0 6px; padding-bottom: 8px; border-bottom: 2px solid var(--brand); }
@media (min-width: 1000px) { .side { position: sticky; top: 80px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; } }

/* ---------- ads: the space is kept, so the text never jumps */
.ad { margin: 22px 0; min-height: 280px; text-align: center; clear: both; }
.ad-label { display: block; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.ad-local { display: grid; place-content: center; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: .85rem; padding: 12px; }
.grid + .ad { margin-top: 0; }

/* ---------- buttons, forms, notes */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px; border: 1px solid var(--brand); border-radius: 999px; background: var(--brand); color: #fff; font: 600 .95rem var(--body); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
.btn.ghost { background: none; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand-ink); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: .88rem; }
.btn svg { width: 16px; height: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.note { padding: 12px 16px; border-radius: 12px; background: var(--soft); border-inline-start: 4px solid var(--navy); font-size: .95rem; max-width: 760px; }
.note.warn { border-color: var(--brand); } .note.ok { border-color: var(--ok); }
.form label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 14px; }
.form.narrow { max-width: 560px; }
input, textarea, select { font: inherit; }
.form input, .form textarea, .cmt-form input, .cmt-form textarea, .helpful textarea, .filter { display: block; width: 100%; margin-top: 5px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); }
.hp { position: absolute !important; inset-inline-start: -9999px; width: 1px; height: 1px; opacity: 0; }
.filter { max-width: 420px; margin: 0 0 18px; }
.empty { text-align: center; padding: 30px 0; }

/* ---------- feedback and comments */
.helpful { max-width: 760px; margin: 26px 0; padding: 18px 20px; background: var(--soft); border-radius: var(--radius); }
.helpful .row { margin-top: 10px; }
.helpful form { margin-top: 12px; }
.helpful label { display: block; font-size: .95rem; }
.helpful form .btn { margin-top: 10px; }
.comments { max-width: 760px; }
.comments h2 small { color: var(--muted); font-weight: 600; }
.cmt { position: relative; padding: 14px 0; padding-inline-end: 64px; border-bottom: 1px solid var(--line); }
.cmt p { margin: 0 0 4px; }
.cmt-head { display: flex; gap: 12px; align-items: baseline; font-size: .88rem; }
.cmt-head time { color: var(--muted); font-size: .8rem; }
.vote { position: absolute; inset-inline-end: 0; top: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--muted); cursor: pointer; font: 600 .85rem var(--body); }
.vote svg { width: 16px; height: 16px; }
.vote:hover, .vote.on { color: var(--brand-ink); border-color: var(--brand); }
.more-cmt { margin-top: 14px; }
.cmt-form { margin-top: 26px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.cmt-form h3 { margin-bottom: 10px; }
.cmt-form .row > * { flex: 1 1 200px; margin-top: 0; }
.cmt-form textarea { margin: 10px 0; }

/* ---------- pharmacies */
.citygrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.citygrid a { padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.citygrid a:hover { border-color: var(--brand); }
.citygrid b { display: block; font-family: var(--head); }
.citygrid span { color: var(--muted); font-size: .85rem; }
.phgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 22px; }
.phgrid .ad { grid-column: 1 / -1; }
.ph { padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.ph b { font-family: var(--head); }
.ph p { margin: 4px 0 10px; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.ph .kicker { margin: 2px 0 0; }

/* ---------- text decoration tool */
.deco { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin-bottom: 26px; }
.deco button { text-align: start; padding: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); cursor: pointer; font-size: 1.15rem; min-height: 68px; overflow: hidden; }
.deco button small { display: block; color: var(--muted); font: 600 .72rem var(--body); text-transform: uppercase; letter-spacing: .06em; }
.deco button:hover { border-color: var(--brand); }

/* ---------- footer */
.foot { background: var(--card); border-top: 1px solid var(--line); padding: 34px 0 20px; font-size: .92rem; }
.foot-in { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.foot nav { display: flex; flex-direction: column; gap: 7px; }
.foot nav b { font-family: var(--head); margin-bottom: 2px; }
.foot nav a { color: var(--muted); text-decoration: none; }
.foot nav a:hover { color: var(--brand-ink); }
.foot-about p { color: var(--muted); max-width: 34ch; margin-top: 10px; }
.copy { color: var(--muted); font-size: .82rem; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr 1fr; } .foot-about { grid-column: 1 / -1; } }
.toast { position: fixed; inset-inline: 0; bottom: 18px; margin-inline: auto; width: max-content; max-width: calc(100% - 32px); padding: 11px 18px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: .92rem; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s; z-index: 40; }
.toast.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .top, .foot, .ad, .side, .helpful, .cmt-form, .toast { display: none !important; } body { background: #fff; } }
@media (max-width: 860px) {
  .hero .chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -18px; padding-inline: 18px; scrollbar-width: none; }
}
