/* ============================================================
   AL-MAJLIS · rsi-prestige-vcard
   Consulting Prestige theme for the Research & Studies Institute (SEU)
   World: a brass plaque on a majlis door + a fine annual-report ledger.
   Charcoal graphite + one antique-bronze accent. Hairline ledger geometry,
   corner-tick frames, expensive whitespace. Motion verb: "settle":
   opacity-led fades, hairlines that draw themselves once, then stillness.
   Mobile-first · RTL-first (logical properties) · reduced-motion aware
   ============================================================ */

:root {
    /* palette — warm graphite + antique bronze (from the institute's own signage monogram) */
    --bg: var(--tk-bg, #161519);
    --bg-2: #1B1A1F;
    --panel: #1D1C22;
    --panel-2: #24232A;
    --line: rgba(233, 222, 199, .11);
    --line-2: rgba(233, 222, 199, .20);
    --bronze: var(--tk-primary, #C09A5E);
    --bronze-2: var(--tk-secondary, #DCC08A);
    --bronze-deep: #8A6B3E;
    --bronze-dim: rgba(192, 154, 94, .38);
    --txt: var(--tk-text, #EDE9E0);
    --accent: var(--tk-primary, #C09A5E); /* consumed by shared partials (review form) */
    --muted: #A9A499;
    --dim: #74706A;
    --ok: #9CBF97;
    --err: #D9938A;
    /* the ONE metal gradient — spent only on the plaque rule, the primary CTA sheen and the dock save key */
    --metal: linear-gradient(100deg, #8A6B3E 0%, #C09A5E 38%, #EEDDB0 50%, #C09A5E 62%, #8A6B3E 100%);
    --r: 3px;
    --font-d: var(--tk-font-header, 'Marcellus'), 'Reem Kufi', serif;
    --font-b: var(--tk-font-content, 'Almarai'), system-ui, sans-serif;
    --dock-h: 66px;
    --ease: cubic-bezier(.25, .6, .25, 1);
    /* native widgets (time pickers, select popups, scrollbars) render dark */
    color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }

body {
    background: var(--bg);
    color: var(--txt);
    font-family: var(--font-b);
    font-size: 15.5px;
    font-weight: 400;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }
::selection { background: var(--bronze); color: #17130C; }

:focus-visible { outline: 1px solid var(--bronze); outline-offset: 3px; }

/* ---------- Ambient layer: laid-paper grain + ghosted khatam watermark. Still. ---------- */
.fx { position: fixed; inset: 0; z-index: -2; pointer-events: none; background: radial-gradient(120% 90% at 50% 0%, #1D1B21 0%, var(--bg) 58%); }
.fx::before { /* grain */
    content: ""; position: absolute; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='0.5'/%3E%3C/svg%3E");
    opacity: .04; mix-blend-mode: overlay;
}
.fx::after { /* ghosted seal watermark: one monumental khatam, centered on the viewport so
                every scroll depth shows a broad deliberate sweep of it, never a small
                fragment cut at a section edge (P2). Physical coords: no RTL branch needed. */
    content: ""; position: absolute; top: 50%; left: 50%;
    width: min(165vw, 1080px); aspect-ratio: 1; transform: translate(-50%, -50%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120' fill='none' stroke='%23C09A5E' stroke-width='0.5'%3E%3Crect x='24' y='24' width='72' height='72'/%3E%3Crect x='24' y='24' width='72' height='72' transform='rotate(45 60 60)'/%3E%3Ccircle cx='60' cy='60' r='27'/%3E%3Ccircle cx='60' cy='60' r='50'/%3E%3C/svg%3E");
    background-size: contain; background-repeat: no-repeat;
    opacity: .055;
}

/* the ledger margin rule — one continuous bronze hairline threading the whole page */
.mj-rule { position: fixed; inset-block: 0; inset-inline-start: max(10px, calc(50% - 360px)); width: 1px; background: linear-gradient(to bottom, transparent, var(--bronze-dim) 10%, var(--bronze-dim) 90%, transparent); z-index: -1; pointer-events: none; }

/* ---------- Layout ---------- */
.mj-wrap { max-width: 680px; margin-inline: auto; padding-inline: 22px; padding-block-end: calc(var(--dock-h) + 34px); }
/* rhythm compressed (S3): 40px mobile bands, and every divider carries a khatam stud
   so the space between sections reads set, not abandoned */
.sec { position: relative; padding-block: 40px; border-block-start: 1px solid var(--line); }
.sec::before {
    content: ""; position: absolute; inset-block-start: -3.5px; inset-inline-start: 50%;
    width: 6px; height: 6px; transform: translateX(-50%) rotate(45deg);
    background: var(--bg); border: 1px solid var(--bronze-dim);
}
[dir=rtl] .sec::before { transform: translateX(50%) rotate(45deg); }
.sec:first-of-type { border-block-start: 0; }
.sec:first-of-type::before { display: none; }
.sec-head { margin-block-end: 22px; }

.kicker {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--font-b); font-size: 11px; font-weight: 700;
    letter-spacing: .3em; text-transform: uppercase; color: var(--bronze);
}
.kicker::before { content: ""; width: 30px; height: 1px; background: var(--bronze); }
/* connected Arabic script must never be letterspaced */
[dir=rtl] .kicker, [dir=rtl] .plaque-org, [dir=rtl] .tally-label, [dir=rtl] .eng-badge,
[dir=rtl] .f-label, [dir=rtl] .qr-caption, [dir=rtl] .dock-btn, [dir=rtl] .lang-btn,
[dir=rtl] .btn-primary { letter-spacing: 0; }

.sec-title { font-family: var(--font-d); font-size: clamp(1.7rem, 5.8vw, 2.3rem); font-weight: 500; letter-spacing: .01em; line-height: 1.22; margin-block-start: 10px; }
.sec-sub { color: var(--muted); font-size: 14.5px; line-height: 1.7; margin-block-start: 8px; max-width: 54ch; }

/* corner-tick frame — the plaque-screw brackets, pure CSS */
.tk-frame {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background-color: var(--panel);
    background-image:
        linear-gradient(var(--bronze), var(--bronze)), linear-gradient(var(--bronze), var(--bronze)),
        linear-gradient(var(--bronze), var(--bronze)), linear-gradient(var(--bronze), var(--bronze)),
        linear-gradient(var(--bronze), var(--bronze)), linear-gradient(var(--bronze), var(--bronze)),
        linear-gradient(var(--bronze), var(--bronze)), linear-gradient(var(--bronze), var(--bronze));
    background-repeat: no-repeat;
    background-size: 12px 1px, 1px 12px, 12px 1px, 1px 12px, 12px 1px, 1px 12px, 12px 1px, 1px 12px;
    background-position: left top, left top, right top, right top, left bottom, left bottom, right bottom, right bottom;
}
/* second elevation tier: raised panel with catch-light top border + soft shadow */
.tier-2 { background-color: var(--panel-2); border-block-start-color: var(--line-2); box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .65); }

/* ---------- Reveal: "settle" (opacity-led, tiny drop, once) ---------- */
.rv { opacity: 0; transform: translateY(10px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rv.in { opacity: 1; transform: none; }

/* hairlines that draw themselves */
.hr-draw { height: 1px; background: var(--metal); transform: scaleX(0); transform-origin: center; transition: transform 1.2s var(--ease) .2s; }
.rv.in .hr-draw, .in > .hr-draw { transform: scaleX(1); }

/* numbers settle into focus (no count-up theatrics) */
.tally-item .tally-num { filter: blur(7px); opacity: 0; transition: filter 1s var(--ease) .15s, opacity 1s var(--ease) .15s; }
.tally-item.in .tally-num { filter: none; opacity: 1; }

/* ---------- Topbar ---------- */
.topbar {
    position: sticky; inset-block-start: 0; z-index: 60;
    display: flex; align-items: center; gap: 12px;
    margin-inline: -22px; padding: 11px 22px;
    background: rgba(22, 21, 25, .82);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-block-end: 1px solid var(--line);
}
.topbar-mark {
    width: 34px; height: 34px; flex: none;
    display: grid; place-items: center;
    border: 1px solid var(--line-2); border-radius: var(--r);
    color: var(--bronze-2); font-family: var(--font-d); font-size: 15px; line-height: 1;
    padding-block-start: 2px;
}
/* the ornate display face stays for hero and headings; the tiny topbar name is set in
   the body face for legibility at 13.5px (P3) */
.topbar-name { font-family: var(--font-b); font-size: 13.5px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-spacer { flex: 1; }

/* language switcher — hairline pill + in-frame menu */
.lang-wrap { position: relative; }
.lang-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: transparent; border: 1px solid var(--line-2); border-radius: var(--r);
    color: var(--muted); font-size: 12.5px; font-weight: 700; letter-spacing: .08em;
    padding: 8px 13px; transition: color .3s var(--ease), border-color .3s var(--ease);
}
.lang-btn:hover { color: var(--bronze-2); border-color: var(--bronze-dim); }
.lang-menu {
    position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + 8px);
    min-width: 150px; max-height: 260px; overflow-y: auto;
    background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r);
    padding: 5px; z-index: 80; box-shadow: 0 18px 44px -14px rgba(0, 0, 0, .7);
}
.lang-item { display: flex; align-items: center; padding: 9px 12px; border-radius: 2px; font-size: 13.5px; color: var(--muted); transition: background .25s, color .25s; }
.lang-item:hover { background: rgba(233, 222, 199, .06); color: var(--txt); }
.lang-item.is-active { color: var(--bronze-2); }

/* ---------- The Plaque (hero) ---------- */
.plaque { margin-block-start: 34px; padding: 40px 24px 36px; text-align: center; }

.plaque-chip {
    display: inline-flex; align-items: center; gap: 9px;
    font-size: 12px; font-weight: 700; color: var(--muted);
    border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
    margin-block-end: 26px;
}
.plaque-chip .chip-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); flex: none; }

/* seal composition: avatar held inside the khatam (two interlocking squares) */
.seal-wrap { position: relative; width: 168px; height: 168px; margin-inline: auto; margin-block-end: 22px; }
.seal { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--bronze); }
.seal path, .seal rect, .seal circle { stroke: currentColor; fill: none; stroke-width: .9; vector-effect: non-scaling-stroke; }
.seal .seal-stroke { stroke-dasharray: 1; stroke-dashoffset: 1; animation: sealDraw 1.7s var(--ease) .35s forwards; }
.seal .seal-stroke.s1 { animation-delay: .35s; }
.seal .seal-stroke.s2 { animation-delay: .65s; }
.seal .seal-stroke.s3 { animation-delay: 1s; }
@keyframes sealDraw { to { stroke-dashoffset: 0; } }
/* portrait container tuned for a real human photo (N1): cover-fit with the crop focus
   held on the face, charcoal fill behind while loading (no letterbox flash), and a
   fine double ring inside the khatam */
.plaque-avatar {
    position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%);
    width: 110px; height: 110px; border-radius: 50%; overflow: hidden;
    background: var(--panel-2);
    border: 1px solid var(--bronze-dim); box-shadow: 0 10px 34px -12px rgba(0, 0, 0, .8);
}
.plaque-avatar::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; border: 1px solid rgba(233, 222, 199, .14); pointer-events: none; }
.plaque-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }

.plaque-org { font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-block-end: 10px; }
.plaque-name { font-family: var(--font-d); font-size: clamp(2.1rem, 8.4vw, 3rem); font-weight: 500; line-height: 1.18; letter-spacing: .01em; }

.plaque-rule { width: min(220px, 60%); margin-inline: auto; margin-block: 18px; }

.plaque-role { display: inline-flex; align-items: center; gap: 14px; font-size: 14px; font-weight: 700; color: var(--bronze-2); }
.plaque-role .role-tick { width: 18px; height: 1px; background: var(--bronze-dim); flex: none; }

.plaque-desc { color: var(--muted); font-size: 14.5px; font-weight: 300; line-height: 1.85; max-width: 46ch; margin-inline: auto; margin-block-start: 16px; }
.plaque-desc p { margin-block-end: 8px; }
.plaque-desc p:last-child { margin-block-end: 0; }

/* load choreography: settle in order */
.pl-load { opacity: 0; animation: plSettle 1s var(--ease) forwards; }
.pl-1 { animation-delay: .1s; } .pl-2 { animation-delay: .25s; } .pl-3 { animation-delay: .45s; }
.pl-4 { animation-delay: .65s; } .pl-5 { animation-delay: .85s; }
@keyframes plSettle { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.plaque .plaque-rule.hr-draw { transform: scaleX(0); }
.plaque.in .plaque-rule.hr-draw, .plaque .plaque-rule.hr-draw.go { transform: scaleX(1); }

.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-block-start: 26px; }

/* ---------- Buttons ---------- */
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    background: var(--bronze); background-image: linear-gradient(180deg, rgba(255, 244, 214, .28), rgba(255, 244, 214, 0) 55%);
    color: #17130C; border: 0; border-radius: var(--r);
    font-family: var(--font-b); font-size: 14px; font-weight: 800; letter-spacing: .02em;
    padding: 13px 24px; transition: filter .3s var(--ease), transform .3s var(--ease);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .6; }
.btn-ghost {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    background: transparent; color: var(--txt);
    border: 1px solid var(--line-2); border-radius: var(--r);
    font-size: 14px; font-weight: 700; padding: 12px 22px;
    transition: border-color .3s var(--ease), color .3s var(--ease);
}
.btn-ghost:hover { border-color: var(--bronze-dim); color: var(--bronze-2); }
.btn-mini {
    display: inline-flex; align-items: center; gap: 8px;
    background: transparent; color: var(--bronze-2);
    border: 1px solid var(--line); border-radius: var(--r);
    font-size: 12.5px; font-weight: 700; padding: 8px 14px;
    transition: border-color .3s var(--ease);
}
.btn-mini:hover { border-color: var(--bronze-dim); }

/* ---------- Cover plates ---------- */
.cover-plate { margin-block-start: 14px; padding: 8px; }
.cover-plate img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 2px; }
.video-plate { margin-block-start: 14px; padding: 8px; }
.video-plate iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; border-radius: 2px; }

/* ---------- Quick actions: ONE balanced hairline row, no orphan wrap ----------
   equal flex keeps 2, 3 or 4 chips on a single centered line at 320-680px */
.qa-row { display: flex; flex-wrap: nowrap; justify-content: center; gap: 8px; margin-block-start: 22px; }
.qa-item {
    display: inline-flex; align-items: center; gap: 8px;
    flex: 1 1 0; min-width: 0; justify-content: center;
    border: 1px solid var(--line); border-radius: var(--r); background: var(--panel);
    color: var(--txt); font-size: 12.5px; font-weight: 700; padding: 12px 8px;
    transition: border-color .3s var(--ease), background .3s var(--ease);
}
.qa-item i { color: var(--bronze); font-size: 14px; flex: none; }
.qa-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qa-item:hover { border-color: var(--bronze-dim); background: var(--panel-2); }

/* ---------- The Record (metrics tally) ---------- */
.tally { display: flex; flex-wrap: wrap; justify-content: center; margin-block-start: 34px; border-block: 1px solid var(--line); }
.tally-item { flex: 1 1 30%; min-width: 110px; text-align: center; padding: 20px 10px; position: relative; }
.tally-item + .tally-item::before { content: ""; position: absolute; inset-block: 18%; inset-inline-start: 0; width: 1px; background: var(--line); }
/* plaintext bidi: numeric records stay LTR, Arabic records stay RTL, both isolated (S6) */
.tally-num { font-family: var(--font-d); font-size: clamp(1.9rem, 6.6vw, 2.5rem); line-height: 1.1; color: var(--bronze-2); unicode-bidi: plaintext; font-variant-numeric: tabular-nums; }
.tally-label { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-block-start: 6px; }

/* ---------- The Ledger (services / advisory fields) ---------- */
.ledger { border-block-start: 1px solid var(--line-2); }
.ledger-row { display: flex; gap: 18px; padding-block: 22px; border-block-end: 1px solid var(--line); position: relative; }
.ledger-ord {
    flex: none; width: 44px; padding-block-start: 3px;
    font-family: var(--font-d); font-size: 20px; color: var(--bronze); line-height: 1;
    text-align: center;
}
.ledger-ord::after { content: ""; display: block; width: 16px; height: 1px; background: var(--bronze-dim); margin: 9px auto 0; }
.ledger-body { flex: 1; min-width: 0; }
.ledger-name { font-family: var(--font-d); font-size: 18.5px; font-weight: 500; line-height: 1.35; }
.ledger-desc { color: var(--muted); font-size: 13.5px; font-weight: 300; line-height: 1.75; margin-block-start: 6px; }
.ledger-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-block-start: 12px; }
.ledger-thumb { flex: none; width: 52px; height: 52px; border-radius: 2px; overflow: hidden; border: 1px solid var(--line); }
.ledger-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Engagements (products) ---------- */
.eng-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.eng-card { padding: 22px; }
.eng-card.is-featured { border-color: var(--bronze-dim); }
.eng-badge {
    position: absolute; inset-block-start: -1px; inset-inline-start: 22px;
    background: var(--bronze); color: #17130C;
    font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
    padding: 4px 12px; border-radius: 0 0 2px 2px;
}
.eng-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 2px; margin-block-end: 16px; }
.eng-name { font-family: var(--font-d); font-size: 19px; font-weight: 500; }
.eng-desc { color: var(--muted); font-size: 13.5px; font-weight: 300; line-height: 1.75; margin-block-start: 6px; }
.eng-price-row { display: flex; align-items: baseline; gap: 12px; margin-block-start: 14px; }
.eng-price { font-family: var(--font-d); font-size: 24px; color: var(--bronze-2); unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.eng-price-old { font-size: 14px; color: var(--dim); text-decoration: line-through; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.eng-stock { font-size: 12px; font-weight: 700; margin-block-start: 4px; }
.eng-stock.ok { color: var(--ok); }
.eng-stock.out { color: var(--dim); }
.eng-card .btn-primary { width: 100%; margin-block-start: 16px; }

/* ---------- Gallery: slow-drift dossier plates ---------- */
.car { position: relative; }
.car-track {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity;
    scrollbar-width: none; -ms-overflow-style: none;
    padding-block-end: 6px;
}
.car-track::-webkit-scrollbar { display: none; }
.car-item {
    flex: 0 0 min(78%, 300px); scroll-snap-align: center;
    border: 1px solid var(--line); border-radius: var(--r); background: var(--panel);
    padding: 7px; margin: 0;
}
.car-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; }
.car-cap { font-size: 12px; color: var(--muted); padding: 10px 6px 4px; text-align: center; }
.car-nav {
    display: none; position: absolute; inset-block-start: 50%; transform: translateY(-50%);
    width: 38px; height: 38px; border-radius: 50%; z-index: 5;
    background: var(--panel-2); border: 1px solid var(--line-2); color: var(--bronze-2);
    align-items: center; justify-content: center;
    transition: border-color .3s var(--ease);
}
.car-nav:hover { border-color: var(--bronze-dim); }
.car-nav.prev { inset-inline-start: -8px; }
.car-nav.next { inset-inline-end: -8px; }

/* ---------- Video briefings ---------- */
.reel-item { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 7px; margin-inline: auto; }
.reel-item + .reel-item { margin-block-start: 16px; }
.reel-item iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; border-radius: 2px; }
.reel-label { font-size: 12.5px; color: var(--muted); text-align: center; padding: 10px 6px 4px; }

/* ---------- Testimonials: horizontal register ---------- */
.tm-track {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity;
    scrollbar-width: none; padding-block-end: 8px;
}
.tm-track::-webkit-scrollbar { display: none; }
.tm-card { flex: 0 0 min(84%, 320px); scroll-snap-align: center; padding: 22px; }
.tm-mark { font-family: var(--font-d); font-size: 40px; line-height: .6; color: var(--bronze-dim); display: block; margin-block-end: 12px; }
.tm-stars { color: var(--bronze); font-size: 12px; display: flex; gap: 3px; margin-block-end: 10px; }
.tm-text { font-size: 14px; font-weight: 300; line-height: 1.8; color: var(--txt); }
.tm-who { display: flex; align-items: center; gap: 12px; margin-block-start: 16px; padding-block-start: 14px; border-block-start: 1px solid var(--line); }
.tm-who img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-2); }
.tm-name { font-size: 13.5px; font-weight: 800; }
.tm-sub { font-size: 12px; color: var(--dim); }

/* empty attestation register (S4): a bronze ledger awaiting its first entry */
.tm-empty { position: relative; padding: 22px 20px 16px; }
.tm-empty-seal {
    position: absolute; inset-block-start: 18px; inset-inline-end: 18px;
    width: 34px; height: 34px; transform: rotate(45deg);
    border: 1px dashed var(--bronze-dim); display: grid; place-items: center;
}
.tm-empty-seal i { transform: rotate(-45deg); color: var(--bronze-dim); font-size: 12px; }
.tm-ghost { display: flex; align-items: center; gap: 12px; padding-block: 15px; border-block-end: 1px solid var(--line); }
.tm-ghost:first-of-type { padding-block-start: 6px; }
.tm-ghost-ord { flex: none; width: 6px; height: 6px; transform: rotate(45deg); border: 1px solid var(--bronze-dim); }
.tm-ghost-line { flex: 1; border-block-end: 1px dotted rgba(192, 154, 94, .28); }
.tm-ghost-bar { flex: none; height: 7px; border-radius: 2px; background: rgba(233, 222, 199, .09); }
.tm-ghost-bar.b1 { width: 32%; }
.tm-ghost-bar.b2 { width: 22%; }
.tm-empty-note { text-align: center; color: var(--muted); font-size: 13px; line-height: 1.8; max-width: 44ch; margin-inline: auto; padding-block: 16px 4px; }

/* the shared review CTA and modal speak the bronze plaque system (P5). The partial
   paints inline styles from inside the body, so these overrides must carry weight. */
#testimony .scaan-review-btn, #testimony .scaan-review-submit {
    background-color: var(--bronze) !important;
    background-image: linear-gradient(180deg, rgba(255, 244, 214, .28), rgba(255, 244, 214, 0) 55%) !important;
    color: #17130C !important;
    border-radius: var(--r) !important;
    font-family: var(--font-b) !important;
    font-weight: 800 !important;
    letter-spacing: .02em !important;
    box-shadow: 0 14px 30px -18px rgba(192, 154, 94, .55) !important;
}
#testimony .scaan-review-btn:hover, #testimony .scaan-review-submit:hover { filter: brightness(1.08) !important; transform: translateY(-1px); }
#testimony .scaan-review-btn { padding: 13px 26px !important; }
#testimony #scaanReviewModal { background: rgba(10, 9, 12, .78) !important; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#testimony #scaanReviewModal > div {
    background: var(--panel-2) !important; color: var(--txt) !important;
    border: 1px solid var(--line-2); border-radius: var(--r) !important;
    font-family: var(--font-b) !important;
    box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .65);
}
#testimony #scaanReviewModal h3 { font-family: var(--font-d) !important; font-weight: 500 !important; }
#testimony #scaanReviewModal input[type="text"], #testimony #scaanReviewModal textarea {
    background: rgba(233, 222, 199, .04) !important; color: var(--txt) !important;
    border: 1px solid var(--line) !important; border-block-end-color: var(--bronze-dim) !important;
    border-radius: var(--r) !important;
}
#testimony #scaanReviewModal input[type="file"] { color: var(--muted) !important; }
#testimony #scaanReviewModal button[onclick] { color: var(--muted) !important; }
/* star picker recolored through the fill attributes the picker script writes */
#testimony #scaanStarPick svg[fill="#cbd5e1"] { fill: rgba(233, 222, 199, .22); }
#testimony #scaanStarPick svg[fill="#f59e0b"] { fill: var(--bronze-2); }
#testimony #scaanReviewThanks { background: rgba(156, 191, 151, .12) !important; color: var(--ok) !important; }

/* ---------- Panels & forms ---------- */
/* conversion panels sit raised: catch-light top rule + deep soft shadow */
.panel { padding: 24px 20px; background-color: var(--panel-2); border-block-start-color: var(--line-2); box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .65); }
.f-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-block: 14px 7px; }
/* inputs in the theme's material (S5): inked charcoal field, bronze ledger baseline,
   bronze focus ring. Never a bare grey default box. */
.f-input {
    width: 100%; background: rgba(233, 222, 199, .04); color: var(--txt);
    border: 1px solid var(--line); border-block-end-color: var(--bronze-dim);
    border-radius: var(--r);
    font-family: var(--font-b); font-size: 14.5px; padding: 12px 14px;
    transition: border-color .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}
.f-input:focus {
    outline: none; border-color: var(--bronze);
    background: rgba(233, 222, 199, .06);
    box-shadow: 0 0 0 3px rgba(192, 154, 94, .14);
}
.f-input::placeholder { color: var(--dim); }
.f-input:disabled { opacity: .55; }
/* Latin-run fields (phone, email, numbers): LTR plaintext so digits and addresses
   never reorder inside an RTL page (S6) */
input.f-ltr { direction: ltr; text-align: start; unicode-bidi: plaintext; font-variant-numeric: tabular-nums; }
textarea.f-input { resize: vertical; min-height: 74px; }
select.f-input, input.f-date {
    appearance: none; -webkit-appearance: none; padding-inline-end: 40px;
    background-repeat: no-repeat; background-position: right 14px center;
}
select.f-input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23C09A5E' fill='none' stroke-width='1.2'/%3E%3C/svg%3E"); }
input.f-date { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none' stroke='%23C09A5E' stroke-width='1'%3E%3Crect x='1.5' y='2.5' width='11' height='10' rx='1'/%3E%3Cpath d='M1.5 5.5h11M4.5 1v3M9.5 1v3'/%3E%3C/svg%3E"); cursor: pointer; }
[dir=rtl] select.f-input, [dir=rtl] input.f-date { background-position: left 14px center; }
input[type="time"].f-input { cursor: pointer; }
input[type="time"].f-input::-webkit-calendar-picker-indicator { opacity: .6; }
.grid-2f { display: grid; grid-template-columns: 1fr; gap: 0 14px; }

.alert-box {
    display: flex; align-items: center; gap: 10px;
    border-radius: var(--r); font-size: 13.5px; font-weight: 700;
    padding: 12px 15px; margin-block-end: 12px;
    overflow-wrap: anywhere;
}
.alert-error { background: rgba(217, 147, 138, .1); border: 1px solid rgba(217, 147, 138, .35); color: var(--err); }
.alert-success { background: rgba(156, 191, 151, .1); border: 1px solid rgba(156, 191, 151, .35); color: var(--ok); }

/* ---------- Hours: the reception register ---------- */
.hour-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-block: 11px; border-block-end: 1px solid var(--line); font-size: 14px; }
.hour-row:last-child { border-block-end: 0; }
.hour-day { color: var(--muted); font-weight: 700; }
.hour-time { unicode-bidi: isolate; color: var(--txt); font-weight: 400; font-variant-numeric: tabular-nums; }
.hour-row.today .hour-day { color: var(--bronze-2); }
.hour-row.today .hour-day::after { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--bronze); margin-inline-start: 8px; vertical-align: middle; }
.hour-24 { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 700; color: var(--ok); }

/* ---------- Links & resources ---------- */
.link-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.link-card {
    display: flex; align-items: center; gap: 14px;
    border: 1px solid var(--line); border-radius: var(--r); background: var(--panel);
    padding: 15px 16px; transition: border-color .3s var(--ease), background .3s var(--ease);
}
.link-card:hover { border-color: var(--bronze-dim); background: var(--panel-2); }
.link-ic { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r); color: var(--bronze); font-size: 14px; }
.link-body { flex: 1; min-width: 0; }
.link-label { display: block; font-size: 14px; font-weight: 800; }
/* values (S6/P4): addresses wrap to two natural lines, never a mid-word server cut;
   URLs keep one LTR-isolated line, CSS-ellipsized */
.link-val {
    font-size: 12px; color: var(--dim);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; word-break: break-word;
}
.link-val.is-url { display: block; white-space: nowrap; text-overflow: ellipsis; word-break: normal; direction: ltr; text-align: start; }
/* unified affordance: a bronze hairline chevron chip, mirrored in RTL */
.link-arrow {
    flex: none; width: 30px; height: 30px; display: grid; place-items: center;
    border: 1px solid var(--line); border-radius: var(--r);
    color: var(--bronze); font-size: 11px;
    transition: color .3s var(--ease), border-color .3s var(--ease);
}
.link-card:hover .link-arrow { color: var(--bronze-2); border-color: var(--bronze-dim); }
[dir=rtl] .link-arrow i { transform: scaleX(-1); }

.iframe-wrap { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 7px; margin-block-start: 14px; }
.iframe-wrap iframe { width: 100%; min-height: 320px; border: 0; display: block; border-radius: 2px; }

/* ---------- Map: archive-plate treatment, charcoal mat while the tiles load ---------- */
.map-wrap { padding: 7px; background-color: var(--panel); }
.map-wrap iframe { width: 100%; height: 300px; border: 0; display: block; border-radius: 2px; background: var(--bg-2); filter: grayscale(1) sepia(.14) contrast(1.04) brightness(.9); }
.map-actions { display: flex; justify-content: center; margin-block-start: 14px; }

/* ---------- Payments ---------- */
.pay-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.pay-card { flex: 1 1 240px; max-width: 320px; padding: 18px; text-align: center; }
.pay-label { font-size: 13px; font-weight: 800; color: var(--bronze-2); margin-block-end: 8px; }
.pay-img { max-width: 190px; margin-inline: auto; border-radius: 2px; }
.pay-val { font-size: 14px; color: var(--txt); unicode-bidi: isolate; overflow-wrap: anywhere; }

/* ---------- Socials ---------- */
.soc-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.soc-item {
    display: inline-flex; align-items: center; gap: 9px;
    flex: 0 1 auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel);
    color: var(--muted); font-size: 13px; font-weight: 700; padding: 11px 16px;
    transition: color .3s var(--ease), border-color .3s var(--ease);
}
.soc-item i { color: var(--bronze); }
.soc-item:hover { color: var(--txt); border-color: var(--bronze-dim); }

/* ---------- Wallet row ---------- */
.wallet-zone { padding-block: 10px; }

/* ---------- Footer ---------- */
.footer { text-align: center; color: var(--dim); font-size: 12.5px; padding-block: 28px 12px; border-block-start: 1px solid var(--line); }
.footer a { color: var(--muted); border-block-end: 1px solid var(--bronze-dim); padding-block-end: 1px; transition: color .3s; }
.footer a:hover { color: var(--bronze-2); }

/* ---------- The brass-rail dock ---------- */
.dock {
    position: fixed; inset-block-end: 0; inset-inline: 0; z-index: 70;
    background: rgba(22, 21, 25, .94);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-block-start: 1px solid var(--line-2);
    transition: transform .45s var(--ease);
    padding-block-end: env(safe-area-inset-bottom, 0);
}
.dock::before { content: ""; position: absolute; inset-block-start: -1px; inset-inline-start: 50%; transform: translateX(-50%); width: 46px; height: 1px; background: var(--metal); }
.dock.dock-hide { transform: translateY(110%); }
.dock-inner { display: flex; align-items: stretch; justify-content: center; max-width: 680px; margin-inline: auto; height: var(--dock-h); }
.dock-btn {
    flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    background: transparent; border: 0; color: var(--muted);
    font-family: var(--font-b); font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
    border-inline-start: 1px solid var(--line);
    transition: color .3s var(--ease);
}
.dock-btn:first-child { border-inline-start: 0; }
.dock-btn i { font-size: 16px; color: var(--dim); transition: color .3s var(--ease); }
.dock-btn:hover { color: var(--txt); }
.dock-btn:hover i { color: var(--bronze-2); }
.dock-btn.dock-main { color: #17130C; background: var(--bronze); background-image: linear-gradient(180deg, rgba(255, 244, 214, .25), rgba(255, 244, 214, 0) 60%); }
.dock-btn.dock-main i { color: #17130C; }
.dock-btn.dock-main:hover { color: #17130C; filter: brightness(1.07); }

/* ---------- Modals ---------- */
.pm-overlay {
    position: fixed; inset: 0; z-index: 90;
    display: flex; align-items: center; justify-content: center;
    background: rgba(10, 9, 12, .78);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    padding: 18px; opacity: 0; transition: opacity .3s var(--ease);
    overflow-y: auto;
}
.pm-overlay.show { opacity: 1; }
.pm-box {
    position: relative; width: 100%; max-width: 420px; max-height: 88vh; overflow-y: auto;
    padding: 26px 22px;
    transform: translateY(10px); transition: transform .35s var(--ease);
    margin-block: auto;
}
.pm-overlay.show .pm-box { transform: none; }
.pm-head { padding-inline-end: 34px; margin-block-end: 8px; }
.pm-title { font-family: var(--font-d); font-size: 21px; font-weight: 500; line-height: 1.3; }
.pm-sub { color: var(--muted); font-size: 13.5px; margin-block-start: 5px; }
.pm-close {
    position: absolute; inset-block-start: 12px; inset-inline-end: 12px;
    width: 38px; height: 38px; display: grid; place-items: center;
    background: transparent; border: 1px solid var(--line); border-radius: var(--r);
    color: var(--muted); font-size: 14px; z-index: 3;
    transition: color .3s, border-color .3s;
}
.pm-close:hover { color: var(--bronze-2); border-color: var(--bronze-dim); }
.pm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-block-start: 20px; }

/* the Seal share sheet */
.qr-wrap { display: grid; place-items: center; padding: 18px; margin-block: 14px; }
.qr-wrap canvas { background: #fff; padding: 10px; border-radius: 2px; max-width: 100%; height: auto; }
.qr-caption { text-align: center; font-size: 11.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); margin-block-end: 12px; }
.share-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-block: 14px; }
.share-row a {
    width: 44px; height: 44px; display: grid; place-items: center;
    border: 1px solid var(--line); border-radius: var(--r); color: var(--muted); font-size: 16px;
    transition: color .3s, border-color .3s;
}
.share-row a:hover { color: var(--bronze-2); border-color: var(--bronze-dim); }

/* ---------- Flatpickr: charcoal skin (popup renders outside .mj-wrap) ---------- */
.flatpickr-calendar { background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: 0 18px 44px -14px rgba(0, 0, 0, .7); border-radius: var(--r); color: var(--txt); }
.flatpickr-calendar.arrowTop::before, .flatpickr-calendar.arrowTop::after { border-bottom-color: var(--panel-2); }
.flatpickr-calendar.arrowBottom::before, .flatpickr-calendar.arrowBottom::after { border-top-color: var(--panel-2); }
.flatpickr-months .flatpickr-month, .flatpickr-months .flatpickr-prev-month, .flatpickr-months .flatpickr-next-month { color: var(--txt); fill: var(--txt); }
.flatpickr-current-month .flatpickr-monthDropdown-months { background: var(--panel-2); color: var(--txt); }
.flatpickr-current-month input.cur-year { color: var(--txt); }
span.flatpickr-weekday { color: var(--dim); }
.flatpickr-day { color: var(--txt); }
.flatpickr-day:hover, .flatpickr-day:focus { background: var(--panel); border-color: var(--line); }
.flatpickr-day.today { border-color: var(--bronze-dim); }
.flatpickr-day.selected, .flatpickr-day.selected:hover { background: var(--bronze); border-color: var(--bronze); color: #17130C; }
.flatpickr-day.flatpickr-disabled, .flatpickr-day.flatpickr-disabled:hover, .flatpickr-day.prevMonthDay, .flatpickr-day.nextMonthDay { color: var(--dim); }

/* ---------- PWA install sheet: the majlis card-tray (S1) ----------
   Charcoal plate, bronze hairline frame with corner ticks, bronze-on-charcoal
   action. Sits above the brass rail, below every modal (overlays always win). */
.mj-pwa {
    position: fixed; inset-inline: 14px;
    inset-block-end: calc(var(--dock-h) + 16px + env(safe-area-inset-bottom, 0px));
    z-index: 82; max-width: 430px; margin-inline: auto;
    background-color: var(--panel-2);
    background-image:
        linear-gradient(var(--bronze), var(--bronze)), linear-gradient(var(--bronze), var(--bronze)),
        linear-gradient(var(--bronze), var(--bronze)), linear-gradient(var(--bronze), var(--bronze)),
        linear-gradient(var(--bronze), var(--bronze)), linear-gradient(var(--bronze), var(--bronze)),
        linear-gradient(var(--bronze), var(--bronze)), linear-gradient(var(--bronze), var(--bronze));
    background-repeat: no-repeat;
    background-size: 12px 1px, 1px 12px, 12px 1px, 1px 12px, 12px 1px, 1px 12px, 12px 1px, 1px 12px;
    background-position: left top, left top, right top, right top, left bottom, left bottom, right bottom, right bottom;
    border: 1px solid var(--line-2); border-radius: var(--r);
    box-shadow: 0 26px 56px -20px rgba(0, 0, 0, .8);
    padding: 16px 16px 14px;
    visibility: hidden; opacity: 0; transform: translateY(22px);
    transition: transform .5s var(--ease), opacity .4s var(--ease), visibility 0s linear .5s;
}
.mj-pwa.on { visibility: visible; opacity: 1; transform: none; transition: transform .5s var(--ease), opacity .4s var(--ease), visibility 0s; }
.mj-pwa-x {
    position: absolute; inset-block-start: 8px; inset-inline-end: 8px;
    width: 38px; height: 38px; display: grid; place-items: center;
    background: transparent; border: 1px solid var(--line); border-radius: var(--r);
    color: var(--muted); font-size: 14px; z-index: 2; padding: 0;
    transition: color .3s var(--ease), border-color .3s var(--ease);
}
.mj-pwa-x:hover { color: var(--bronze-2); border-color: var(--bronze-dim); }
.mj-pwa-row { display: flex; align-items: center; gap: 13px; padding-inline-end: 42px; }
.mj-pwa-seal { flex: none; width: 50px; height: 50px; padding: 3px; background: var(--bg-2); border: 1px solid var(--bronze-dim); border-radius: var(--r); }
.mj-pwa-seal img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; border-radius: 2px; }
.mj-pwa-txt { min-width: 0; }
.mj-pwa-txt strong { display: block; font-family: var(--font-d); font-size: 14.5px; font-weight: 500; color: var(--txt); line-height: 1.45; }
.mj-pwa-txt span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.6; margin-block-start: 3px; }
.mj-pwa-btn {
    display: flex; width: 100%; align-items: center; justify-content: center; gap: 9px;
    margin-block-start: 13px; padding: 12px 16px; border: 0; border-radius: var(--r);
    background: var(--bronze); background-image: linear-gradient(180deg, rgba(255, 244, 214, .28), rgba(255, 244, 214, 0) 55%);
    color: #17130C; font-family: var(--font-b); font-size: 13.5px; font-weight: 800; letter-spacing: .02em;
    transition: filter .3s var(--ease), transform .3s var(--ease);
}
.mj-pwa-btn:hover { filter: brightness(1.08); }
.mj-pwa-btn:active { transform: scale(.985); }

/* ---------- Desktop refinements ---------- */
@media (min-width: 760px) {
    .mj-wrap { max-width: 760px; }
    .plaque { padding: 56px 48px 48px; }
    .sec { padding-block: 56px; }
    .eng-grid { grid-template-columns: 1fr 1fr; }
    .grid-2f { grid-template-columns: 1fr 1fr; }
    .car-nav { display: flex; }
    .car-item { flex-basis: 300px; }
    .link-grid { grid-template-columns: 1fr 1fr; }
    .ledger-row { padding-block: 26px; }
    .mj-rule { inset-inline-start: calc(50% - 410px); }
    .qa-row { gap: 12px; }
    .qa-item { flex: 0 1 180px; font-size: 13px; padding: 12px 14px; }
}

/* ---------- Reduced motion: total stillness ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .rv, .pl-load, .tally-item .tally-num { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; animation: none !important; }
    .hr-draw, .plaque .plaque-rule.hr-draw { transform: scaleX(1) !important; transition: none !important; }
    .seal .seal-stroke { animation: none !important; stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
    .dock, .pm-overlay, .pm-box { transition: none !important; }
    .mj-pwa { transition: opacity .001s !important; transform: none !important; }
    .btn-primary, .btn-ghost, .btn-mini, .qa-item, .link-card, .link-arrow, .soc-item,
    .f-input, .dock-btn, .lang-btn, .mj-pwa-btn, .mj-pwa-x, .pm-close, .share-row a { transition: none !important; }
    .btn-primary:hover, .mj-pwa-btn:active { transform: none !important; }
    * { animation-duration: .001s !important; }
}
