/* ==========================================================================
   Ghaem Reza — the shared kit: buttons, chips, cards (news, live and completed projects, fields, licences, posts),
   the progress dial, the FAQ, the call to action. Used by the phones' build (m/) and by the inner pages (pages/) of
   both builds; markup in app/cards.php. One set of tokens: the phones' ground is night with a hair of green, the
   desktop's inner pages keep the desktop's own night (blue-slate), the accent and the faces are the same.
   ========================================================================== */
:root {
  --m-bg: #0A0E0D;
  --m-bg-2: #0D1211;
  --m-card: #121816;
  --m-card-2: #182019;
  --m-line: rgb(255 255 255 / .075);
  --m-line-2: rgb(255 255 255 / .14);
  --m-text: #F1F4F0;
  --m-sub: rgb(241 244 240 / .7);
  --m-faint: rgb(241 244 240 / .5);
  --m-accent: #3DDC97;
  --m-accent-2: #17B86C;
  --m-accent-ink: #04200F;
  --m-accent-soft: rgb(61 220 151 / .12);
  --m-amber: #FFB347;
  --m-r: 26px;
  --m-r-sm: 18px;
  --m-gut: 16px;
  --m-bar-h: 60px;
  --m-tabs-h: 66px;
  --m-col: 520px;
  --m-ease: cubic-bezier(.16, 1, .3, 1);
}
html.v-d {
  --m-bg: #121A23;
  --m-bg-2: #0F161E;
  --m-card: #172029;
  --m-card-2: #1D2731;
  --m-line: rgb(255 255 255 / .08);
  --m-line-2: rgb(255 255 255 / .15);
  --m-accent: #4FD99A;
  --m-accent-soft: rgb(79 217 154 / .12);
}
.ico { width: 1.25em; height: 1.25em; flex: none; }
.mbtn, .ncrd, .lcrd, .dcrd, .ftile, .prow, .ccrd, .mcall, .msec__all, .fcrd, .bcrd, .bfeat { text-decoration: none; }

/* ---------- buttons and chips ---------- */
.mbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 20px;
  border-radius: 999px; border: 0; font: 600 15px/1 var(--font-body); color: var(--m-text); cursor: pointer;
  background: rgb(255 255 255 / .06); box-shadow: inset 0 0 0 1px var(--m-line-2);
  transition: transform .25s var(--m-ease), background-color .25s;
}
.mbtn:active { transform: scale(.97); }
.mbtn .ico { width: 20px; height: 20px; }
.mbtn--accent { background: var(--m-accent); color: var(--m-accent-ink); box-shadow: 0 14px 30px -14px rgb(61 220 151 / .7); }
.mbtn--ghost { background: rgb(255 255 255 / .05); }
.mbtn--wide { flex: 1; justify-content: space-between; padding-inline-end: 6px; }
.mbtn--round { width: 50px; padding: 0; flex: none; background: rgb(10 14 13 / .5); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .22); }
.mbtn__go { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--m-accent-ink); color: var(--m-accent); }
.mbtn--ghost .mbtn__go { background: var(--m-accent-soft); }
.mbtn__go .ico { width: 18px; height: 18px; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px; border-radius: 999px; font: 600 12.5px/1 var(--font-body); }
.chip--glass { background: rgb(10 14 13 / .52); color: var(--m-text); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .2); }
.chip[lang="en"] { font: 700 12.5px/1 var(--font-label); letter-spacing: .06em; }
.chip b { color: var(--m-accent); font-weight: inherit; }

/* the news kinds (base.css .tag), quieter on the phone */
.v-m .tag { height: 26px; font-size: 12px; padding: 0 10px; }

/* ---------- the news slider ---------- */
.ncrd {
  position: relative; display: grid; align-content: start; gap: 10px; height: 100%; padding: 10px 10px 16px; border-radius: var(--m-r);
  background: var(--m-card); box-shadow: inset 0 0 0 1px var(--m-line); color: var(--m-text);
}
.ncrd__pic { display: grid; place-items: center; aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; background: var(--m-card-2); }
.ncrd__pic img { width: 100%; height: 100%; object-fit: contain; }
.ncrd__meta { display: flex; align-items: center; gap: 10px; padding-inline: 6px; font-size: 12.5px; color: var(--m-faint); }
.ncrd__title { padding-inline: 6px; font-size: 16px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ncrd__sum { padding-inline: 6px; font-size: 13.5px; line-height: 1.8; color: var(--m-sub); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ncrd__go {
  position: absolute; top: 18px; inset-inline-end: 18px; display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; background: rgb(10 14 13 / .75); color: var(--m-text); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .18);
}
.ncrd__go .ico { width: 18px; height: 18px; }
/* ---------- EPC+F: a route of five stops ---------- */
.route { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.route__stop { position: relative; display: grid; grid-template-columns: 48px 1fr; gap: 14px; padding-bottom: 20px; }
.route__stop:not(:last-child)::before {
  content: ""; position: absolute; top: 50px; bottom: 2px; inset-inline-start: 23px; width: 2px;
  background: repeating-linear-gradient(to bottom, var(--m-line-2) 0 5px, transparent 5px 10px);
}
.route__letter {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  font: 700 14px/1 var(--font-label); color: var(--m-accent); background: var(--m-card); box-shadow: inset 0 0 0 1.5px rgb(61 220 151 / .45);
}
.route__stop--f .route__letter { background: var(--m-accent); color: var(--m-accent-ink); box-shadow: 0 0 0 6px rgb(61 220 151 / .14); }
.route__body { padding-top: 4px; }
.route__body b { font-size: 16px; line-height: 1.6; }
.route__body p { font-size: 14px; line-height: 1.85; color: var(--m-sub); }

/* ---------- the live projects: a map, then a dial for each ---------- */
.mmap {
  position: relative; margin: 0 0 12px; padding: 14px 14px 10px; border-radius: var(--m-r); overflow: hidden;
  background:
    linear-gradient(rgb(255 255 255 / .025) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgb(255 255 255 / .025) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--m-card);
  box-shadow: inset 0 0 0 1px var(--m-line);
}
.mmap__svg { width: 100%; height: auto; overflow: visible; }
.mmap__land { fill: rgb(61 220 151 / .05); stroke: rgb(61 220 151 / .55); stroke-width: .9; stroke-linejoin: round; }
.mmap__prov { fill: none; stroke: rgb(255 255 255 / .08); stroke-width: .5; }
.mmap__pin { cursor: pointer; }
.mmap__hit { fill: transparent; }   /* a finger-sized target round each dot */
.mmap__dot { fill: var(--m-accent); stroke: var(--m-bg); stroke-width: 1.4; }
.mmap__cut { filter: drop-shadow(0 3px 3px rgb(0 0 0 / .6)); transform-box: fill-box; transform-origin: 50% 100%; transition: transform .35s var(--m-ease); }
.mmap__pin:hover .mmap__cut, .mmap__pin:focus-visible .mmap__cut { transform: scale(1.15); }
.mmap__pulse { fill: rgb(61 220 151 / .3); transform-box: fill-box; transform-origin: center; animation: m-pin 2.4s var(--m-ease) infinite; animation-delay: calc(var(--i) * .35s); }
@keyframes m-pin { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }
.mmap__cap { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 12.5px; color: var(--m-faint); }
.mmap__cap span:first-child { display: inline-flex; align-items: center; gap: 8px; color: var(--m-text); font-weight: 600; }

.mrail--live > li { width: min(78%, 360px); }
.lcrd {
  display: grid; gap: 6px; height: 100%; padding: 16px 18px 18px; border-radius: var(--m-r);
  background: radial-gradient(90% 60% at 50% 0%, rgb(61 220 151 / .1), transparent 70%), var(--m-card);
  box-shadow: inset 0 0 0 1px var(--m-line); color: var(--m-text);
}
.lcrd__top { position: relative; display: grid; justify-items: center; margin-bottom: 4px; }
.lcrd__live { position: absolute; top: 0; inset-inline-start: 0; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--m-accent); font-weight: 600; }
.lcrd__name { font-size: 17px; line-height: 1.55; }
.lcrd__sub { font-size: 13.5px; color: var(--m-sub); }
.lcrd__row { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--m-faint); }
.lcrd__row span { display: inline-flex; align-items: center; gap: 5px; }
.lcrd__row .ico { width: 15px; height: 15px; }
.lcrd__chips { display: flex; gap: 6px; margin-top: 6px; }
.lcrd__chips span { height: 28px; padding: 0 11px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; background: rgb(255 255 255 / .06); box-shadow: inset 0 0 0 1px var(--m-line); }
.lcrd__chips [lang="en"] { font: 700 12px/1 var(--font-label); letter-spacing: .04em; color: var(--m-accent); }

/* the dial (app/cards.php gr_dial) */
.dial { position: relative; display: grid; place-items: center; width: 138px; aspect-ratio: 1; }
.dial svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dial__ticks { stroke: rgb(255 255 255 / .22); stroke-width: 1.3; stroke-linecap: round; fill: none; }
.dial__track { stroke: rgb(255 255 255 / .07); stroke-width: 7; fill: none; stroke-linecap: round; }
.dial__fill { stroke: var(--m-accent, var(--green-hi)); stroke-width: 7; fill: none; stroke-linecap: round; stroke-dasharray: var(--p) 100; filter: drop-shadow(0 0 6px rgb(61 220 151 / .45)); }
.dial__thumb { fill: var(--m-text, #fff); stroke: var(--m-accent, var(--green-hi)); stroke-width: 3; }
.dial__n { position: relative; font: 400 34px/1 var(--font-display); }
.dial__n small { font-size: .5em; margin-inline-start: 2px; color: var(--m-faint, rgb(255 255 255 / .6)); }

/* ---------- completed projects ---------- */
.mrail--done > li { width: min(72%, 330px); }
.dcrd { position: relative; display: grid; gap: 12px; color: var(--m-text); }
.dcrd__pic { display: block; aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; background: var(--m-card-2); box-shadow: inset 0 0 0 1px var(--m-line); }
.dcrd__pic img { width: 100%; height: 100%; object-fit: cover; }
.dcrd__body { display: grid; gap: 2px; padding-inline: 4px; }
.dcrd__body b { font-size: 16px; line-height: 1.6; }
.dcrd__body span { font-size: 13.5px; color: var(--m-sub); line-height: 1.7; }
.dcrd__body small { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 12.5px; color: var(--m-faint); }
.dcrd__body small .ico { width: 15px; height: 15px; }
.dcrd__go { position: absolute; top: 12px; inset-inline-end: 12px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgb(10 14 13 / .7); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .2); }
.dcrd__go .ico { width: 18px; height: 18px; }

/* ---------- the fields: tiles ---------- */
.mtiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ftile {
  position: relative; display: grid; align-content: space-between; gap: 18px; min-height: 156px; height: 100%; padding: 16px;
  border-radius: 24px; background: var(--m-card); box-shadow: inset 0 0 0 1px var(--m-line); color: var(--m-text);
}
.ftile__ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; color: var(--m-accent); background: var(--m-accent-soft); }
.ftile__ico .ico { width: 24px; height: 24px; }
.ftile__n { position: absolute; top: 16px; inset-inline-end: 16px; font: 400 15px/1 var(--font-display); color: var(--m-faint); }
.ftile__name { font-size: 15px; line-height: 1.6; }
.ftile__grade { margin-top: -14px; font-size: 12px; line-height: 1.6; color: var(--m-faint); }

/* ---------- licences: paper cards ---------- */
.mrail--certs > li { width: min(44%, 200px); }
.ccrd { display: grid; gap: 8px; color: var(--m-text); }
.ccrd__pic { display: block; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: #EDEDE6; box-shadow: 0 18px 30px -18px rgb(0 0 0 / .9), inset 0 0 0 1px rgb(255 255 255 / .1); }
.ccrd__pic img { width: 100%; height: 100%; object-fit: cover; }
.ccrd b { font-size: 14px; line-height: 1.6; }
.ccrd small { font-size: 12px; line-height: 1.6; color: var(--m-faint); }

/* ---------- blog rows ---------- */
.mrows { display: grid; gap: 10px; }
.prow { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center; padding: 10px; border-radius: 22px; background: var(--m-card); box-shadow: inset 0 0 0 1px var(--m-line); color: var(--m-text); }
.prow__pic { display: block; width: 92px; height: 92px; border-radius: 16px; overflow: hidden; background: var(--m-card-2); }
.prow__pic img { width: 100%; height: 100%; object-fit: cover; }
.prow__body { display: grid; gap: 4px; min-width: 0; }
.prow__tag { font-size: 12px; font-weight: 600; color: var(--m-accent); }
.prow__body b { font-size: 14.5px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prow__body small { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--m-faint); }
.prow__body small .ico { width: 14px; height: 14px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 8px; }
.faq__item { border-radius: 20px; background: var(--m-card, rgb(255 255 255 / .04)); box-shadow: inset 0 0 0 1px var(--m-line, rgb(255 255 255 / .08)); }
.faq__item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 12px 18px; font-weight: 700; font-size: 15px; line-height: 1.7; cursor: pointer; list-style: none; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__chev { width: 20px; height: 20px; color: var(--m-accent, var(--green-hi)); transition: transform .3s var(--m-ease, ease); }
[dir="rtl"] .faq__chev { transform: scaleX(-1); }
.faq__item[open] .faq__chev { transform: rotate(90deg); }
.faq__item p { padding: 0 18px 18px; font-size: 14.5px; line-height: 2; color: var(--m-sub, rgb(255 255 255 / .7)); }

/* ---------- the call to action ---------- */
.mcta {
  position: relative; isolation: isolate; overflow: hidden; display: grid; gap: 14px; padding: 26px 18px 18px; border-radius: 30px;
  background: linear-gradient(160deg, #13241C, #0B110F 60%); box-shadow: inset 0 0 0 1px rgb(61 220 151 / .2);
}
.mcta__glow { position: absolute; z-index: -1; inset: -40% -30% auto auto; width: 90%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgb(61 220 151 / .26), transparent); }
.mcta h2 { font-size: 27px; margin: 0; line-height: 1.45; }
.mcta h2 span { color: var(--m-accent); }
.mcta > p { color: var(--m-sub); font-size: 14.5px; }
.mcall {
  display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 8px 8px 8px 18px; border-radius: 999px;
  background: var(--m-accent); color: var(--m-accent-ink);
}
[dir="rtl"] .mcall { padding: 8px 8px 8px 18px; }
.mcall__ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--m-accent-ink); color: var(--m-accent); flex: none; }
.mcall__text { display: grid; flex: 1; line-height: 1.4; }
.mcall__text b { font-size: 15.5px; }
.mcall__text bdi { font: 700 14px/1.4 var(--font-latin); opacity: .8; }
.mcall__chev { display: flex; margin-inline-end: 6px; }
.mcall__chev .ico { width: 16px; height: 16px; margin-inline-start: -7px; stroke-width: 2.4; opacity: .2; animation: m-chev 1.6s linear infinite; }
.mcall__chev .ico:nth-child(2) { animation-delay: .2s; } .mcall__chev .ico:nth-child(3) { animation-delay: .4s; }
@keyframes m-chev { 0%, 100% { opacity: .2; } 30% { opacity: 1; } }
.mcta__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mcta__row .mbtn { min-height: 48px; font-size: 14px; padding: 0 12px; }

