/* =====================================================================
   Dylanu · Platform UI — "Midnight Signal" design system
   Shared by the public storefront and the client portal.
   RTL-first (logical properties everywhere), dark, motion-aware.
   ===================================================================== */

@view-transition { navigation: auto; }

:root {
    color-scheme: dark;

    /* surfaces */
    --bg: #0e0920;
    --bg-2: #140d2c;
    --bg-3: #1b1238;
    --surface: rgba(255, 255, 255, 0.035);
    --surface-2: rgba(255, 255, 255, 0.06);
    --surface-3: rgba(255, 255, 255, 0.09);
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);

    /* brand — Royal Lattice (primary #3C2A7D) */
    --brand: #3c2a7d;
    --brand-400: #5b45b0;
    --brand-300: #8a76d9;
    --brand-glow: rgba(91, 69, 176, 0.55);
    --lattice: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M14 0 28 14 14 28 0 14Z' fill='none' stroke='%23b9a7ff' stroke-opacity='.16' stroke-width='1'/%3E%3Ccircle cx='14' cy='14' r='1.2' fill='%23ffb547' fill-opacity='.35'/%3E%3C/svg%3E");

    /* text */
    --ink: #f3efff;
    --ink-2: #cdc4ea;
    --muted: #9a90bd;
    --faint: #6c6290;

    /* signal palette */
    --volt: #ffb547;
    --cyan: #ff7a6b;
    --violet: #9d86ff;
    --rose: #ff5c8a;
    --amber: #ffb547;

    --accent: var(--volt);
    --accent-2: #ffd08a;
    --accent-soft: rgba(255, 181, 71, 0.12);
    --accent-ink: #2a1700;
    --signal: linear-gradient(110deg, var(--volt) 0%, var(--cyan) 50%, var(--violet) 100%);

    --ok: #4ade80;
    --warn: var(--amber);
    --danger: var(--rose);

    --radius: 22px;
    --radius-sm: 14px;
    --shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
    --glow: 0 0 0 1px rgba(255, 181, 71, 0.25), 0 18px 50px -12px rgba(255, 181, 71, 0.35);

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

    --font-display: "Alexandria", "Readex Pro", system-ui, sans-serif;
    --font-body: "Readex Pro", "Segoe UI", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

::selection { background: var(--volt); color: var(--accent-ink); }

body.platform-body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: var(--bg);
    font-family: var(--font-body);
    font-size: 15.5px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ---------- Ambient background: aurora + grid + grain ---------- */
body.platform-body::before {
    content: "";
    position: fixed;
    inset: -20vmax;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(42vmax 42vmax at 18% 10%, rgba(60, 42, 125, 0.75), transparent 62%),
        radial-gradient(34vmax 34vmax at 88% 6%, rgba(157, 134, 255, 0.2), transparent 60%),
        radial-gradient(30vmax 30vmax at 92% 70%, rgba(255, 122, 107, 0.1), transparent 60%),
        radial-gradient(40vmax 40vmax at 30% 100%, rgba(255, 181, 71, 0.08), transparent 60%);
    filter: blur(10px);
    animation: aurora 26s var(--ease-out) infinite alternate;
}

body.platform-body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    /* diamond lattice — the brand motif — fading out from the top */
    background-image:
        var(--lattice),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
    background-size: 28px 28px, 160px 160px;
    mask-image: radial-gradient(ellipse 85% 65% at 50% 0%, #000 15%, transparent 80%);
    opacity: 0.9;
    animation: latticeDrift 40s linear infinite;
}

@keyframes latticeDrift {
    to { background-position: 28px 28px, 0 0; }
}

@keyframes aurora {
    0%   { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
    50%  { transform: translate3d(-3%, 2%, 0) rotate(8deg) scale(1.08); }
    100% { transform: translate3d(3%, -2%, 0) rotate(-6deg) scale(1.04); }
}

/* ---------- Typography ---------- */
a { color: var(--accent-2); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--volt); }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; }

.display,
.page-title {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.08;
}

[dir="ltr"] .display,
[dir="ltr"] .page-title { letter-spacing: -0.035em; }

.page-title {
    font-size: clamp(1.9rem, 4.2vw, 2.9rem);
    margin: 0 0 .5rem;
    background: linear-gradient(180deg, #fff 30%, rgba(238, 242, 255, 0.62));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.text-signal {
    background: var(--signal);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: signalShift 8s ease-in-out infinite alternate;
}

@keyframes signalShift {
    from { background-position: 0% 50%; }
    to   { background-position: 100% 50%; }
}

.lede { color: var(--muted); margin: 0 0 1.75rem; max-width: 46rem; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-family: var(--font-mono);
    font-size: .74rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: var(--accent-2);
}

[dir="rtl"] .eyebrow { font-family: var(--font-body); letter-spacing: 0; font-size: .82rem; font-weight: 600; }

.eyebrow::before {
    content: "";
    width: .5rem;
    height: .5rem;
    border-radius: 2px;
    background: var(--volt);
    box-shadow: 0 0 12px var(--volt);
    animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: .45; transform: scale(.7); }
}

.num,
.mono {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    direction: ltr;
    unicode-bidi: isolate;
}

.num { font-size: .95em; }

/* ---------- Layout ---------- */
.shell {
    width: min(1200px, calc(100% - 2rem));
    margin-inline: auto;
    position: relative;
    z-index: 1;
}

.grid-2 { display: grid; gap: 1.1rem; grid-template-columns: 1fr 1fr; align-items: start; }

/* ---------- Buttons ---------- */
.btn {
    --bx: 0px; --by: 0px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: .85rem 1.4rem;
    font: inherit;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
    cursor: pointer;
    color: var(--ink);
    transform: translate3d(var(--bx), var(--by), 0);
    transition: transform .35s var(--ease-out), background .25s ease, box-shadow .3s ease, color .2s ease, border-color .25s ease;
}

.btn:active { transform: translate3d(var(--bx), var(--by), 0) scale(.97); }

.btn:focus-visible { outline: 2px solid var(--volt); outline-offset: 3px; }

.btn-primary {
    background: var(--volt);
    color: var(--accent-ink);
    box-shadow: 0 0 0 1px rgba(255, 181, 71, .4), 0 12px 32px -10px rgba(255, 181, 71, .55);
}

.btn-primary:hover { color: var(--accent-ink); box-shadow: var(--glow); }

/* light sweep */
.btn-primary::after,
.btn-on-dark::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .65) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform .7s var(--ease-out);
}

.btn-primary:hover::after,
.btn-on-dark:hover::after { transform: translateX(120%); }

.btn-ghost {
    background: var(--surface-2);
    color: var(--ink);
    border: 1px solid var(--line-strong);
    backdrop-filter: blur(10px);
}

.btn-ghost:hover {
    color: var(--ink);
    background: var(--surface-3);
    border-color: rgba(255, 181, 71, .45);
}

.btn-on-dark { background: #fff; color: #0e0920; }
.btn-on-dark:hover { color: #0e0920; box-shadow: 0 16px 40px -12px rgba(255, 255, 255, .45); }

.btn-ghost-light {
    background: rgba(255, 255, 255, .04);
    color: var(--ink);
    border: 1px solid var(--line-strong);
}

.btn-ghost-light:hover { color: var(--ink); border-color: var(--volt); background: rgba(255, 181, 71, .06); }

.btn-danger {
    background: rgba(255, 92, 138, .12);
    color: #ff9db8;
    border: 1px solid rgba(255, 92, 138, .35);
}

.btn-danger:hover { color: #fff; background: rgba(255, 92, 138, .3); }

.btn-sm { padding: .55rem 1rem; font-size: .86rem; }

.btn[disabled],
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- Panels (glass + spotlight + gradient edge) ---------- */
.panel {
    --mx: 50%; --my: -20%;
    position: relative;
    background:
        radial-gradient(520px circle at var(--mx) var(--my), rgba(255, 181, 71, .06), transparent 40%),
        linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.panel::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: radial-gradient(360px circle at var(--mx) var(--my), rgba(255, 181, 71, .55), rgba(255, 122, 107, .25) 35%, transparent 65%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity .4s ease;
    pointer-events: none;
}

.panel:hover::before { opacity: 1; }

.section { padding: 1.4rem 1.5rem; margin-bottom: 1.1rem; }

.section h2,
.section-head h2 {
    margin: 0 0 1rem;
    font-size: 1.12rem;
    font-family: var(--font-display);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .6rem;
}

.section h2::before {
    content: "";
    width: 4px;
    height: 1.05em;
    border-radius: 4px;
    background: var(--signal);
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.section-head h2 { margin: 0; }

.empty {
    margin: 0;
    padding: 1.6rem 1rem;
    color: var(--muted);
    text-align: center;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-sm);
    background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(255, 255, 255, .015) 10px 20px);
}

/* ---------- Stats ---------- */
.stats {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 1.25rem;
}

.stat {
    --mx: 50%; --my: 0%;
    position: relative;
    overflow: hidden;
    padding: 1.2rem 1.3rem 1.3rem;
    border-radius: 20px;
    background:
        radial-gradient(300px circle at var(--mx) var(--my), rgba(255, 122, 107, .09), transparent 45%),
        var(--surface);
    border: 1px solid var(--line);
    transition: transform .45s var(--ease-out), border-color .3s ease;
}

.stat::after {
    content: "";
    position: absolute;
    inset-inline: 1.3rem;
    top: 0;
    height: 2px;
    background: var(--signal);
    transform: scaleX(.25);
    transform-origin: inline-start;
    transition: transform .6s var(--ease-out);
}

[dir="rtl"] .stat::after { transform-origin: right; }
[dir="ltr"] .stat::after { transform-origin: left; }

.stat:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.stat:hover::after { transform: scaleX(1); }

.stat small {
    display: block;
    margin-bottom: .55rem;
    color: var(--muted);
    font-size: .84rem;
}

.stat b {
    display: block;
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.15;
}

.stat b span { font-family: var(--font-mono); }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: separate; border-spacing: 0; }

th, td {
    text-align: start;
    padding: .85rem .6rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

th {
    color: var(--faint);
    font-weight: 500;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-family: var(--font-mono);
}

[dir="rtl"] th { font-family: var(--font-body); letter-spacing: 0; font-size: .82rem; }

tbody tr { transition: background .2s ease; }
tbody tr:hover { background: rgba(255, 255, 255, .025); }
tbody tr:last-child td { border-bottom: 0; }

.tfoot-row td { font-weight: 700; border-bottom: 0; border-top: 1px solid var(--line-strong); }

/* ---------- Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .25rem .7rem;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 600;
    background: var(--accent-soft);
    color: var(--accent-2);
    border: 1px solid rgba(255, 181, 71, .2);
    white-space: nowrap;
}

.badge::before {
    content: "";
    width: .4rem;
    height: .4rem;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}

.badge-ok { background: rgba(74, 222, 128, .1); color: #86efac; border-color: rgba(74, 222, 128, .25); }
.badge-warn { background: rgba(255, 181, 71, .1); color: #fcd38a; border-color: rgba(255, 181, 71, .25); }
.badge-danger { background: rgba(255, 92, 138, .1); color: #ff9db8; border-color: rgba(255, 92, 138, .28); }
.badge-muted { background: rgba(255, 255, 255, .05); color: var(--muted); border-color: var(--line); }
.badge-muted::before { box-shadow: none; }
.badge-ok::before { animation: pulse 2.4s ease-in-out infinite; }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 1.05rem; }

.field > span {
    display: block;
    margin-bottom: .45rem;
    color: var(--ink-2);
    font-size: .88rem;
    font-weight: 500;
}

.field input,
.field select,
.field textarea,
input.input,
select.input,
textarea.input {
    width: 100%;
    border: 1px solid var(--line-strong);
    background: rgba(14, 9, 32, .55);
    border-radius: var(--radius-sm);
    padding: .85rem 1rem;
    font: inherit;
    color: var(--ink);
    transition: border-color .2s ease, box-shadow .25s ease, background .2s ease;
}

.field textarea { min-height: 8rem; resize: vertical; }

.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
[dir="ltr"] .field select { background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; padding-right: 2.5rem; }
[dir="rtl"] .field select { background-position: 14px 55%, 20px 55%; padding-left: 2.5rem; }
.field select option { background: var(--bg-3); color: var(--ink); }

.field input::placeholder,
.field textarea::placeholder { color: var(--faint); }

.field input:hover,
.field select:hover,
.field textarea:hover { border-color: rgba(255, 255, 255, .26); }

.field input:focus,
.field select:focus,
.field textarea:focus,
input.input:focus {
    outline: none;
    border-color: var(--volt);
    background: rgba(14, 9, 32, .8);
    box-shadow: 0 0 0 4px rgba(255, 181, 71, .12);
}

.field input[readonly],
.field input:disabled {
    background: rgba(255, 255, 255, .03);
    color: var(--muted);
    cursor: not-allowed;
}

.field small,
.field-hint { display: block; margin-top: .4rem; color: var(--muted); font-size: .8rem; }

.field-error { display: block; margin-top: .4rem; color: #ff9db8; font-size: .84rem; }

input[type="checkbox"],
input[type="radio"] { accent-color: var(--volt); width: 1.05rem; height: 1.05rem; }

/* ---------- Alerts ---------- */
.alert {
    position: relative;
    border-radius: var(--radius-sm);
    padding: .9rem 1.1rem;
    padding-inline-start: 1.35rem;
    margin-bottom: 1rem;
    background: rgba(255, 92, 138, .08);
    color: #ffc2d3;
    border: 1px solid rgba(255, 92, 138, .3);
    overflow: hidden;
    animation: alertIn .55s var(--ease-spring) both;
}

.alert::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 3px;
    background: currentColor;
}

.alert-success { background: rgba(74, 222, 128, .08); color: #a7f3c4; border-color: rgba(74, 222, 128, .3); }
.alert-info { background: rgba(255, 122, 107, .08); color: #a5f3ec; border-color: rgba(255, 122, 107, .3); }

@keyframes alertIn {
    from { opacity: 0; transform: translateY(-8px) scale(.98); }
    to   { opacity: 1; transform: none; }
}

/* ---------- Key/Value + Timeline ---------- */
.kv { display: grid; grid-template-columns: 10rem 1fr; gap: .75rem 1rem; margin: 0; }
.kv dt { color: var(--muted); font-size: .87rem; }
.kv dd { margin: 0; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }

.timeline { list-style: none; margin: 0; padding: 0; }

.timeline li {
    position: relative;
    padding-block: 0 1.1rem;
    padding-inline: 1.6rem 0;
}

.timeline li::before {
    content: "";
    position: absolute;
    inset-inline-start: .15rem;
    top: .45rem;
    width: .65rem;
    height: .65rem;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--volt);
    box-shadow: 0 0 10px rgba(255, 181, 71, .6);
    z-index: 1;
}

.timeline li::after {
    content: "";
    position: absolute;
    inset-inline-start: .45rem;
    top: 1.1rem;
    bottom: -.2rem;
    width: 1px;
    background: linear-gradient(var(--line-strong), transparent);
}

.timeline li:last-child::after { display: none; }
.timeline b { display: block; font-weight: 600; }
.timeline span { display: block; color: var(--ink-2); font-size: .92rem; }
.timeline small { display: block; color: var(--faint); margin-top: .15rem; }

.breadcrumb {
    display: inline-flex;
    gap: .45rem;
    align-items: center;
    color: var(--muted);
    font-size: .86rem;
    margin-bottom: .6rem;
}

/* ---------- Locale switcher (sliding pill) ---------- */
.locale-switch {
    display: inline-flex;
    align-items: center;
    gap: .15rem;
    padding: .2rem;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: rgba(14, 9, 32, .5);
    backdrop-filter: blur(10px);
}

.locale-switch__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.7rem;
    padding: .4rem .75rem;
    border-radius: 999px;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 600;
    line-height: 1;
    transition: color .2s ease, background .3s var(--ease-out);
}

.locale-switch__item:hover { color: var(--ink); background: var(--surface-2); }
.locale-switch__item.is-active { color: var(--accent-ink); background: var(--volt); }
.locale-switch-light { border-color: var(--line-strong); }

/* ---------- Public nav ---------- */
.pub-nav,
.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: .9rem 0;
    transition: padding .35s var(--ease-out), background .35s ease, border-color .35s ease, backdrop-filter .35s ease;
    border-bottom: 1px solid transparent;
}

.is-scrolled .pub-nav,
.is-scrolled .site-nav {
    padding: .55rem 0;
    background: rgba(14, 9, 32, .72);
    backdrop-filter: blur(16px) saturate(160%);
    border-bottom-color: var(--line);
}

.pub-nav .shell,
.site-nav .shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.pub-brand,
.brand {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.08rem;
}

.pub-brand:hover,
.brand:hover { color: var(--ink); }

/* animated logo mark */
.logo-mark,
.pub-brand i,
.brand i,
.brand-mark i {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 11px;
    background: conic-gradient(from var(--spin, 0deg), var(--volt), var(--cyan), var(--violet), var(--volt));
    box-shadow: 0 0 24px -4px rgba(255, 181, 71, .55);
    animation: spinMark 6s linear infinite;
}

.logo-mark::after,
.pub-brand i::after,
.brand i::after,
.brand-mark i::after {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 7px;
    background: var(--bg);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}

.logo-mark::before,
.pub-brand i::before,
.brand i::before,
.brand-mark i::before {
    content: "";
    position: absolute;
    z-index: 1;
    width: 7px;
    height: 7px;
    top: 50%;
    left: 50%;
    border-radius: 2px;
    background: var(--volt);
    transform: translate(-50%, -50%) rotate(45deg);
    box-shadow: 0 0 10px var(--volt);
}

@property --spin {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

@keyframes spinMark { to { --spin: 360deg; } }

.pub-nav-links {
    display: flex;
    gap: .25rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-pill {
    position: relative;
    padding: .5rem .9rem;
    border-radius: 999px;
    color: var(--ink-2);
    font-size: .92rem;
    font-weight: 500;
    transition: color .2s ease, background .25s ease;
}

.nav-pill:hover { color: var(--ink); background: var(--surface-2); }
.nav-pill.is-active { color: var(--ink); background: var(--surface-3); }

.nav-toggle { display: none; }

.pub-footer {
    position: relative;
    z-index: 1;
    margin-top: 4rem;
    padding: 2rem 0 2.5rem;
    color: var(--faint);
    font-size: .88rem;
    border-top: 1px solid var(--line);
}

.pub-footer .shell { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }

/* ---------- Client portal shell ---------- */
.topbar {
    position: sticky;
    top: .75rem;
    z-index: 40;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: .65rem .75rem;
    padding-inline-start: 1rem;
    margin: .75rem 0 2rem;
    border-radius: 20px;
    background: rgba(20, 13, 44, .7);
    border: 1px solid var(--line);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .7);
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-weight: 600;
}

.brand-mark small,
.brand-mark .brand-sub { display: block; font-size: .74rem; color: var(--muted); font-weight: 400; }

.topbar-actions { display: flex; align-items: center; gap: .2rem; flex-wrap: wrap; }

.nav-link {
    position: relative;
    padding: .5rem .85rem;
    border-radius: 12px;
    color: var(--ink-2);
    font-weight: 500;
    font-size: .9rem;
    transition: color .2s ease, background .25s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    inset-inline: .85rem;
    bottom: .2rem;
    height: 2px;
    border-radius: 2px;
    background: var(--volt);
    transform: scaleX(0);
    transition: transform .4s var(--ease-out);
}

.nav-link:hover { color: var(--ink); background: var(--surface-2); }
.nav-link.active { color: var(--ink); }
.nav-link.active::after { transform: scaleX(1); box-shadow: 0 0 10px var(--volt); }

/* ---------- Auth split screen ---------- */
.auth-stage {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
}

.auth-art {
    position: relative;
    overflow: hidden;
    padding: clamp(1.75rem, 4vw, 3.25rem);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: var(--ink);
    border-inline-end: 1px solid var(--line);
    background:
        radial-gradient(60% 50% at 30% 30%, rgba(157, 134, 255, .35), transparent 70%),
        radial-gradient(50% 45% at 80% 75%, rgba(255, 122, 107, .22), transparent 70%),
        var(--bg-2);
}

/* orbital rings */
.auth-art::before {
    content: "";
    position: absolute;
    width: 140%;
    aspect-ratio: 1;
    top: -55%;
    inset-inline-end: -55%;
    border-radius: 50%;
    background:
        repeating-radial-gradient(circle, transparent 0 46px, rgba(255, 255, 255, .06) 47px 48px);
    mask-image: radial-gradient(circle, #000 30%, transparent 70%);
    animation: orbit 60s linear infinite;
}

.auth-art::after {
    content: "";
    position: absolute;
    width: 18rem;
    height: 18rem;
    top: 18%;
    inset-inline-start: 12%;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255, 181, 71, .75), rgba(255, 122, 107, .35) 40%, transparent 70%);
    filter: blur(40px);
    animation: floaty 9s ease-in-out infinite alternate;
}

.auth-art > * { position: relative; z-index: 1; }

.auth-art h1 {
    font-family: var(--font-display);
    font-size: clamp(2.3rem, 4.8vw, 3.9rem);
    font-weight: 700;
    margin: .7rem 0 .9rem;
    line-height: 1.06;
}

.auth-art p { color: var(--ink-2) !important; }
.auth-art .eyebrow { color: var(--accent-2) !important; }

.auth-panel {
    display: grid;
    place-items: center;
    padding: 2rem 1.25rem;
}

.auth-box { width: min(440px, 100%); padding: 2rem 1.8rem; }

.auth-box .page-title { font-size: 2rem !important; }

.auth-locale {
    position: absolute;
    top: 1.25rem;
    inset-inline-end: 1.25rem;
    z-index: 2;
}

@keyframes orbit { to { transform: rotate(360deg); } }

@keyframes floaty {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(12%, 18%, 0) scale(1.2); }
}

/* ---------- Motion primitives ---------- */
.fade-up { animation: fadeUp .9s var(--ease-out) both; }
.fade-up-delay { animation: fadeUp .9s var(--ease-out) .12s both; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); filter: blur(6px); }
    to   { opacity: 1; transform: none; filter: blur(0); }
}

/* scroll reveal — only hides content once JS has confirmed it can reveal it */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    filter: blur(6px);
    transition:
        opacity .9s var(--ease-out) calc(var(--i, 0) * 70ms),
        transform .9s var(--ease-out) calc(var(--i, 0) * 70ms),
        filter .9s var(--ease-out) calc(var(--i, 0) * 70ms);
}

.js [data-reveal].is-in { opacity: 1; transform: none; filter: none; }

/* page enter curtain */
.page-curtain {
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    background: var(--bg);
    animation: curtain .7s var(--ease-out) .05s forwards;
}

.page-curtain::after {
    content: "";
    position: absolute;
    top: 0;
    inset-inline: 0;
    height: 2px;
    background: var(--signal);
    transform-origin: inline-start;
    animation: loadbar .6s var(--ease-out) forwards;
}

@keyframes curtain { to { opacity: 0; visibility: hidden; } }
@keyframes loadbar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .stats { grid-template-columns: 1fr 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .kv { grid-template-columns: 7.5rem 1fr; }
    .auth-stage { grid-template-columns: 1fr; }
    .auth-art { min-height: 260px; border-inline-end: 0; border-bottom: 1px solid var(--line); }
    .auth-art p { display: none; }
    .topbar { position: relative; top: 0; }
}

@media (max-width: 760px) {
    .section { padding: 1.1rem 1rem; }
    .section table,
    .panel table { display: block; overflow-x: auto; white-space: nowrap; }
    .stat b { font-size: 1.4rem; }
    .display { font-size: clamp(2rem, 10vw, 2.8rem) !important; }
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.6rem;
        height: 2.6rem;
        border-radius: 12px;
        border: 1px solid var(--line-strong);
        background: var(--surface-2);
        color: var(--ink);
        cursor: pointer;
    }
    .pub-nav-links,
    .site-nav .nav-collapse {
        display: none;
        position: absolute;
        top: calc(100% + .5rem);
        inset-inline: 1rem;
        flex-direction: column;
        align-items: stretch;
        padding: .75rem;
        border-radius: 18px;
        background: rgba(20, 13, 44, .96);
        border: 1px solid var(--line);
        box-shadow: var(--shadow);
    }
    .nav-open .pub-nav-links,
    .nav-open .site-nav .nav-collapse { display: flex; animation: alertIn .35s var(--ease-out) both; }
    .pub-nav-links .btn,
    .pub-nav-links .nav-pill { justify-content: center; text-align: center; }
    .topbar-actions { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: .25rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    .js [data-reveal] { opacity: 1; transform: none; filter: none; }
}

@media print {
    body.platform-body { background: #fff; color: #000; }
    body.platform-body::before, body.platform-body::after, .topbar, .pub-nav, .site-nav, .page-curtain { display: none !important; }
    .panel { background: #fff; box-shadow: none; border-color: #ddd; backdrop-filter: none; }
    .page-title { color: #000; background: none; }
}

/* ---------- Site footer (v6) ---------- */
.site-footer {
    position: relative;
    z-index: 1;
    margin-top: clamp(4rem, 9vw, 6rem);
    padding-top: 3rem;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, transparent, rgba(60, 42, 125, .18));
}
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer__about p { margin: .9rem 0 1rem; max-width: 22rem; color: var(--muted); font-size: .92rem; }
.site-footer__mail { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .85rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-size: .88rem; }
.site-footer__mail:hover { color: var(--ink); border-color: rgba(255, 181, 71, .4); }
.site-footer nav { display: grid; align-content: start; gap: .55rem; }
.site-footer nav b { margin-bottom: .35rem; font-family: var(--font-display); font-weight: 600; color: var(--ink); }
.site-footer nav a { color: var(--muted); font-size: .92rem; width: fit-content; transition: color .2s ease, transform .3s var(--ease-out); }
.site-footer nav a:hover { color: var(--volt); transform: translateX(var(--nudge, 3px)); }
[dir="rtl"] .site-footer nav a:hover { --nudge: -3px; }
.site-footer__bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2.5rem; padding: 1.2rem 0 1.6rem; border-top: 1px solid var(--line); color: var(--faint); font-size: .85rem; }
@media (max-width: 900px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__about { grid-column: 1 / -1; } }
@media (max-width: 520px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* ---------- Brand logo + nav density (v8) ---------- */
/* v15 — the logo sits on a white plate wrapped in a slowly turning gradient ring, with a light sweep */
.brand__logo {
    --spin: 0deg;
    position: relative;
    display: grid;
    flex: 0 0 auto;
    width: 3.3rem;
    height: 2.7rem;
    padding: 2px;
    border-radius: 15px;
    background: conic-gradient(from var(--spin), var(--volt), var(--cyan), var(--violet), #fff, var(--volt));
    box-shadow: 0 0 0 4px rgba(157, 134, 255, .1), 0 10px 26px -8px rgba(255, 181, 71, .55), 0 0 34px -6px rgba(157, 134, 255, .55);
    animation: spinMark 7s linear infinite;
    transition: transform .45s var(--ease-spring), width .35s var(--ease-out), height .35s var(--ease-out);
}
.brand__plate {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 13px;
    background: radial-gradient(120% 120% at 30% 20%, #fff 55%, #f1edff);
}
.brand__logo img { position: relative; width: 78%; height: auto; display: block; }
.brand__logo > img { margin: auto; } /* legacy markup without a plate */
.brand__shine {
    position: absolute;
    inset: -20% auto -20% -60%;
    width: 45%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .95), transparent);
    transform: skewX(-18deg);
    animation: brandShine 5.5s ease-in-out 1.2s infinite;
    pointer-events: none;
}
@keyframes brandShine { 0% { left: -60%; } 22%, 100% { left: 130%; } }
.brand:hover .brand__logo { transform: rotate(-5deg) scale(1.07); }
.brand__text { display: grid; line-height: 1.15; }
.brand__text b { font-weight: 800; font-size: 1.18rem; letter-spacing: -.01em; }
.brand__text small { font-family: var(--font-body, inherit); font-weight: 500; font-size: .7rem; color: var(--muted); letter-spacing: .02em; white-space: nowrap; }
.is-scrolled .site-nav .brand__logo { width: 2.9rem; height: 2.35rem; }
.brand--footer .brand__logo { width: 3.8rem; height: 3.1rem; border-radius: 17px; }
.brand--footer .brand__plate { border-radius: 15px; }
.brand--footer .brand__text b { font-size: 1.35rem; }
@media (max-width: 520px) { .site-nav .brand__text small { display: none; } }
@media (prefers-reduced-motion: reduce) { .brand__logo, .brand__shine { animation: none; } }
@media (max-width: 1280px) and (min-width: 761px) { .nav-pill--minor { display: none; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- Language: one toggle to the *other* language (v9) ---------- */
.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    height: 2.3rem;
    padding: 0 .9rem;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: rgba(14, 9, 32, .5);
    color: var(--ink-2);
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    transition: color .2s ease, border-color .25s ease, background .25s ease;
}
.lang-toggle svg { color: var(--volt); transition: transform .6s var(--ease-spring); }
.lang-toggle:hover { color: var(--ink); border-color: rgba(255, 181, 71, .5); background: rgba(255, 181, 71, .08); }
.lang-toggle:hover svg { transform: rotate(180deg); }
.lang-toggle--light { background: rgba(14, 9, 32, .35); }

/* ---------- Drawer navigation (phones + tablets, ≤ 1100px) ---------- */
.drawer { display: none; }

@media (max-width: 1100px) {
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.75rem;
        height: 2.75rem;
        border-radius: 14px;
        border: 1px solid var(--line-strong);
        background: var(--surface-2);
        color: var(--ink);
        cursor: pointer;
        transition: background .2s ease, border-color .2s ease;
    }
    .nav-toggle:hover { background: var(--surface-3); border-color: rgba(255, 181, 71, .45); }

    /* the inline menus give way to the drawer */
    .pub-nav-links,
    .nav-open .pub-nav-links,
    .topbar .topbar-actions { display: none !important; }
    .topbar { flex-wrap: nowrap; }

    .drawer {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 200;
        visibility: hidden;
        pointer-events: none;
        transition: visibility 0s linear .45s;
    }
    .nav-open .drawer { visibility: visible; pointer-events: auto; transition: none; }
    .nav-open, .nav-open body { overflow: hidden; }

    .drawer__backdrop {
        position: absolute;
        inset: 0;
        background: rgba(8, 5, 20, .6);
        backdrop-filter: blur(4px);
        opacity: 0;
        transition: opacity .35s ease;
    }
    .nav-open .drawer__backdrop { opacity: 1; }

    .drawer__panel {
        --off: 105%;
        position: absolute;
        top: 0;
        bottom: 0;
        inset-inline-end: 0;
        width: min(380px, 88vw);
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 1rem 1.25rem;
        overflow-y: auto;
        overscroll-behavior: contain;
        background:
            var(--lattice),
            radial-gradient(120% 50% at 100% 0%, rgba(255, 181, 71, .14), transparent 60%),
            linear-gradient(170deg, #2b1d63 0%, #1d1240 45%, #120a2b 100%);
        background-size: 26px 26px, auto, auto;
        border-inline-start: 1px solid rgba(185, 167, 255, .2);
        box-shadow: -30px 0 80px -20px rgba(0, 0, 0, .8);
        transform: translateX(var(--off));
        transition: transform .45s var(--ease-out);
        outline: none;
    }
    [dir="rtl"] .drawer__panel { --off: -105%; box-shadow: 30px 0 80px -20px rgba(0, 0, 0, .8); }
    .nav-open .drawer__panel { transform: none; }

    .drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
    .drawer__close {
        display: grid;
        place-items: center;
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 12px;
        border: 1px solid var(--line-strong);
        background: rgba(255, 255, 255, .06);
        color: var(--ink);
        cursor: pointer;
        transition: transform .4s var(--ease-spring), background .2s ease;
    }
    .drawer__close:hover { background: rgba(255, 255, 255, .12); transform: rotate(90deg); }

    .drawer__links { display: grid; gap: .3rem; }
    .drawer__link {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: .8rem;
        padding: .75rem .8rem;
        border-radius: 14px;
        color: var(--ink);
        font-size: 1.02rem;
        font-weight: 600;
        opacity: 0;
        transform: translateX(calc(var(--off) * .12));
        transition: background .2s ease, opacity .4s var(--ease-out), transform .45s var(--ease-out);
    }
    .nav-open .drawer__link { opacity: 1; transform: none; transition-delay: calc(var(--i) * 45ms + .1s); }
    .drawer__link:hover, .drawer__link.is-active { background: rgba(255, 255, 255, .07); color: var(--ink); }
    .drawer__link.is-active { box-shadow: inset 3px 0 0 var(--volt); }
    [dir="rtl"] .drawer__link.is-active { box-shadow: inset -3px 0 0 var(--volt); }
    .drawer__icon { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 12px; background: rgba(255, 181, 71, .1); color: var(--volt); }
    .drawer__go { color: var(--faint); }
    [dir="rtl"] .drawer__go { transform: scaleX(-1); }

    .drawer__more { display: flex; flex-wrap: wrap; gap: .45rem; padding-top: .9rem; border-top: 1px solid var(--line); }
    .drawer__more a { padding: .45rem .85rem; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink-2); font-size: .86rem; }
    .drawer__more a:hover, .drawer__more a.is-active { color: var(--ink); border-color: rgba(255, 181, 71, .5); }

    .drawer__foot { margin-top: auto; display: grid; gap: .6rem; padding-top: 1rem; border-top: 1px solid var(--line); }
    .drawer__foot .btn, .drawer__foot form .btn { width: 100%; justify-content: center; padding-block: .85rem; }
    .drawer__lang { justify-content: center; height: 2.8rem; width: 100%; }
    .drawer__contact { display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem 1rem; margin: .3rem 0 0; font-size: .82rem; }
    .drawer__contact a { color: var(--muted); }
    .drawer__contact a:hover { color: var(--volt); }
}

@media (prefers-reduced-motion: reduce) {
    .drawer__panel, .drawer__link, .drawer__backdrop { transition: none !important; }
}

/* ---------- Display-currency switcher (v10) ---------- */
.cur-switch { position: relative; }
.cur-switch > summary {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    height: 2.3rem;
    padding: 0 .75rem;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: rgba(14, 9, 32, .5);
    color: var(--ink-2);
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    user-select: none;
    backdrop-filter: blur(10px);
    transition: color .2s ease, border-color .25s ease, background .25s ease;
}
.cur-switch > summary::-webkit-details-marker { display: none; }
.cur-switch > summary:hover,
.cur-switch[open] > summary { color: var(--ink); border-color: rgba(255, 181, 71, .5); background: rgba(255, 181, 71, .08); }
.cur-switch > summary:focus-visible { outline: 2px solid var(--volt); outline-offset: 2px; }
.cur-switch__sym { display: grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding-inline: .25rem; border-radius: 999px; background: rgba(255, 181, 71, .14); color: var(--volt); font-size: .72rem; }
.cur-switch__code { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .02em; }
.cur-switch__chev { transition: transform .35s var(--ease-spring); }
.cur-switch[open] .cur-switch__chev { transform: rotate(180deg); }

.cur-switch__menu {
    position: absolute;
    top: calc(100% + .5rem);
    inset-inline-end: 0;
    z-index: 70;
    width: 15.5rem;
    padding: .45rem;
    border-radius: 18px;
    background: rgba(20, 13, 44, .97);
    border: 1px solid var(--line-strong);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .85);
    animation: alertIn .3s var(--ease-out) both;
}
.cur-switch__title { display: block; padding: .3rem .6rem .45rem; font-size: .72rem; font-weight: 600; color: var(--faint); }
.cur-switch__menu a {
    display: grid;
    grid-template-columns: 2rem 1fr auto;
    align-items: center;
    gap: .6rem;
    padding: .5rem .55rem;
    border-radius: 12px;
    color: var(--ink-2);
    transition: background .2s ease, color .2s ease;
}
.cur-switch__menu a:hover { background: rgba(255, 255, 255, .06); color: var(--ink); }
.cur-switch__menu a.is-active { background: rgba(255, 181, 71, .1); color: var(--ink); }
.cur-switch__menu a svg { color: var(--volt); }
.cur-switch__badge { display: grid; place-items: center; height: 2rem; border-radius: 10px; background: var(--surface-2); font-size: .78rem; font-weight: 700; color: var(--ink); }
.cur-switch__name { display: grid; line-height: 1.25; font-size: .9rem; font-weight: 600; }
.cur-switch__name small { font-family: var(--font-mono); font-size: .7rem; color: var(--faint); font-weight: 500; }

/* inside the mobile drawer: full width, menu opens inline */
.cur-switch--block { width: 100%; }
.cur-switch--block > summary { width: 100%; justify-content: center; height: 2.8rem; }
.cur-switch--block .cur-switch__menu { position: static; width: 100%; margin-top: .5rem; box-shadow: none; }
.drawer__prefs { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; align-items: start; }
.drawer__prefs .cur-switch--block[open] { grid-column: 1 / -1; }

/* note under converted prices */
.cur-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 1.4rem;
    padding: .55rem 1rem;
    border-radius: 999px;
    background: rgba(255, 181, 71, .08);
    border: 1px solid rgba(255, 181, 71, .25);
    color: var(--ink-2);
    font-size: .85rem;
    text-align: center;
}
.cur-note svg { flex: 0 0 auto; color: var(--volt); }

/* ---- top bar ---- */
.site-topbar {
    position: relative;
    z-index: 51;
    font-size: .8rem;
    color: var(--muted);
    background:
        radial-gradient(600px 80px at 50% 0%, rgba(157, 134, 255, .16), transparent 70%),
        linear-gradient(180deg, rgba(60, 42, 125, .55), rgba(20, 13, 44, .75));
    animation: topbarIn .7s var(--ease-out) both;
}
@keyframes topbarIn { from { opacity: 0; transform: translateY(-100%); } }
/* animated brand line under the strip */
.site-topbar__line {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--volt), var(--cyan), var(--violet), transparent);
    background-size: 200% 100%;
    opacity: .7;
    animation: tbLine 8s linear infinite;
}
@keyframes tbLine { to { background-position: -200% 0; } }

.site-topbar__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    min-height: 2.75rem;
}

/* contact chips */
.site-topbar__contact { display: flex; align-items: center; gap: .45rem; min-width: 0; }
.tb-chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .22rem .7rem .22rem .25rem;
    border-radius: 999px;
    color: var(--ink-2);
    white-space: nowrap;
    border: 1px solid transparent;
    transition: color .25s ease, background .25s ease, border-color .25s ease;
}
[dir="rtl"] .tb-chip { padding: .22rem .25rem .22rem .7rem; }
.tb-chip i {
    display: grid;
    place-items: center;
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 50%;
    background: color-mix(in srgb, var(--volt) 18%, transparent);
    color: var(--volt);
    transition: background .25s ease, color .25s ease, transform .4s var(--ease-out);
}
.tb-chip:hover { color: var(--ink); background: rgba(255, 255, 255, .05); border-color: var(--line); }
.tb-chip:hover i { background: var(--volt); color: #1b1238; }

/* rotating announcements */
.site-topbar__news {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    justify-self: center;
    max-width: min(34rem, 100%);
    padding: .25rem .4rem .25rem .8rem;
    border-radius: 999px;
    background: rgba(14, 9, 32, .55);
    border: 1px solid rgba(185, 167, 255, .18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
[dir="rtl"] .site-topbar__news { padding: .25rem .8rem .25rem .4rem; }
.site-topbar__live { position: relative; width: .5rem; height: .5rem; flex: none; }
.site-topbar__live i, .site-topbar__live::after { position: absolute; inset: 0; border-radius: 50%; background: #3ddc97; }
.site-topbar__live::after { content: ""; animation: tbPulse 2s ease-out infinite; }
@keyframes tbPulse { to { transform: scale(2.8); opacity: 0; } }
.site-topbar__track { position: relative; display: grid; min-width: 0; overflow: hidden; height: 1.35rem; }
.tb-msg {
    grid-area: 1 / 1;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-width: 0;
    color: var(--ink-2);
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(110%);
    transition: opacity .45s ease, transform .55s var(--ease-out);
    pointer-events: none;
}
.tb-msg span { overflow: hidden; text-overflow: ellipsis; }
.tb-msg > svg:first-child { color: var(--volt); flex: none; }
.tb-msg.is-active { opacity: 1; transform: none; pointer-events: auto; }
.tb-msg.is-leaving { opacity: 0; transform: translateY(-110%); }
a.tb-msg:hover { color: var(--ink); }
.tb-msg__go { color: var(--volt); transition: translate .3s var(--ease-out); }
a.tb-msg:hover .tb-msg__go { translate: 3px 0; }
[dir="rtl"] a.tb-msg:hover .tb-msg__go { translate: -3px 0; }
.site-topbar__dots { display: inline-flex; gap: .25rem; padding-inline: .2rem; }
.site-topbar__dots i { width: .32rem; height: .32rem; border-radius: 999px; background: rgba(255, 255, 255, .22); transition: width .4s var(--ease-out), background .3s ease; }
.site-topbar__dots i.is-active { width: .95rem; background: linear-gradient(90deg, var(--volt), var(--cyan)); }

/* social capsule */
.site-topbar__social {
    display: flex;
    align-items: center;
    justify-self: end;
    gap: .5rem;
    padding: .15rem .15rem .15rem .7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--line);
}
[dir="rtl"] .site-topbar__social { padding: .15rem .7rem .15rem .15rem; }
.site-topbar__follow { font-weight: 600; color: var(--muted); font-size: .76rem; }

@media (max-width: 1100px) { .tb-chip--mail { display: none; } }
@media (max-width: 860px) {
    .site-topbar__inner { grid-template-columns: 1fr auto; }
    .site-topbar__contact { display: none; }
    .site-topbar__news { justify-self: start; }
    .site-topbar__follow { display: none; }
    .site-topbar__social { padding: .15rem; }
}
@media (max-width: 560px) {
    .site-topbar__inner { grid-template-columns: 1fr; justify-items: center; padding-block: .3rem; gap: .35rem; }
    .site-topbar__news { justify-self: center; max-width: 100%; }
    .site-topbar__social { justify-self: center; background: none; border: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .site-topbar { animation: none; }
    .site-topbar__live::after, .site-topbar__line { animation: none; }
    .tb-msg { transition: none; }
}

/* ================= Social icons (top bar · footer · contact · drawer) =================
   Restrained by design: official monochrome logos at rest, the network's colour only on hover/focus. */
.soc { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.soc li { display: contents; }
.soc__link {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    color: var(--ink-2);
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .02);
    transition: color .2s ease, border-color .2s ease, background-color .2s ease, transform .2s ease;
}
.soc__glyph { display: grid; place-items: center; width: 1.05rem; height: 1.05rem; }
.soc__glyph svg { display: block; width: 100%; height: 100%; }
.soc__link:hover, .soc__link:focus-visible {
    color: var(--soc);
    border-color: color-mix(in srgb, var(--soc) 45%, transparent);
    background: color-mix(in srgb, var(--soc) 10%, transparent);
    transform: translateY(-2px);
}
.soc__link:focus-visible { outline: 2px solid var(--volt); outline-offset: 3px; }

/* neutral tooltip with the network name (pointer devices) */
@media (hover: hover) {
    .soc--footer .soc__link::after, .soc--bar .soc__link::after, .soc--drawer .soc__link::after {
        content: attr(data-tip);
        position: absolute;
        bottom: calc(100% + .5rem);
        left: 50%;
        translate: -50% 3px;
        padding: .25rem .55rem;
        border-radius: 6px;
        background: #f4f1ff;
        color: #1b1238;
        font-size: .72rem;
        font-weight: 600;
        line-height: 1.3;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: opacity .15s ease, translate .15s ease;
    }
    .soc--bar .soc__link::after { bottom: auto; top: calc(100% + .45rem); translate: -50% -3px; }
    .soc__link:hover::after { opacity: 1; translate: -50% 0; transition-delay: .15s; }
}

/* ---- top bar: borderless, compact ---- */
.soc--bar { gap: .1rem; }
.soc--bar .soc__link { width: 1.85rem; height: 1.85rem; border-color: transparent; background: none; color: var(--muted); }
.soc--bar .soc__glyph { width: .85rem; height: .85rem; }
.soc--bar .soc__link:hover, .soc--bar .soc__link:focus-visible { transform: none; border-color: transparent; }

/* ---- footer ---- */
.site-footer__follow { display: grid; gap: .75rem; margin-top: 1.5rem; }
.site-footer__follow b { font-family: var(--font-display); font-weight: 600; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.soc--footer { gap: .5rem; }

/* ---- contact card: tidy link cards (logo · name · external arrow) ---- */
.soc--contact { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .5rem; margin-top: 1.4rem; }
.soc--contact .soc__link {
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .45rem .7rem .45rem .45rem;
    border-radius: 12px;
    color: var(--ink);
    font-size: .86rem;
    font-weight: 600;
}
[dir="rtl"] .soc--contact .soc__link { padding: .45rem .45rem .45rem .7rem; }
.soc--contact .soc__glyph {
    width: 2rem;
    height: 2rem;
    padding: .5rem;
    box-sizing: border-box;
    border-radius: 9px;
    color: var(--soc);
    background: color-mix(in srgb, var(--soc) 13%, transparent);
    flex: none;
}
.soc__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soc__out { flex: none; color: var(--faint, var(--muted)); transition: color .2s ease, transform .2s ease; }
[dir="rtl"] .soc__out { transform: scaleX(-1); }
.soc--contact .soc__link:hover { color: var(--ink); transform: none; }
.soc--contact .soc__link:hover .soc__out { color: var(--soc); transform: translate(2px, -2px); }
[dir="rtl"] .soc--contact .soc__link:hover .soc__out { transform: scaleX(-1) translate(2px, -2px); }

/* ---- mobile drawer ---- */
.soc--drawer { justify-content: center; gap: .5rem; margin-top: .4rem; }
.soc--drawer .soc__link { width: 2.75rem; height: 2.75rem; }

@media (prefers-reduced-motion: reduce) {
    .soc__link, .soc__out { transition: none; }
    .soc__link:hover { transform: none; }
}

@media print { .site-topbar { display: none !important; } }

/* ---------- Off-screen sections: looping animations pause until the section scrolls back into view ---------- */
[data-offscreen], [data-offscreen] *, [data-offscreen] *::before, [data-offscreen] *::after { animation-play-state: paused !important; }

/* ---------- Keyboard access: visible focus everywhere + "skip to content" link ---------- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--volt); outline-offset: 3px; }
.skip-link {
    position: fixed; top: -120px; inset-inline-start: 1rem; z-index: 1000;
    padding: .75rem 1.2rem; border-radius: 12px; background: var(--volt); color: #0e0920; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 1rem; }
main:focus { outline: none; }
.site-footer__about .site-footer__mail { margin-block-end: .5rem; margin-inline-end: .4rem; }
.site-footer__address { font-style: normal; }
.tb-msg { min-height: 24px; } /* WCAG 2.2 target size */
