/* ==========================================================================
   Mansoura Top Stars Awards — dark maroon + gold theme
   Works in both RTL (Arabic) and LTR (English); logical properties are used
   throughout so nothing needs mirroring by hand.
   ========================================================================== */

/* ---- Fonts (self-hosted, variable weight) ------------------------------- */

@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url('../fonts/cairo-arabic.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
                   U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF,
                   U+FE70-FEFF, U+102E0-102FB, U+10E60-10E7E, U+1EC70-1ECC0;
}

@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url('../fonts/cairo-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                   U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url('../fonts/cairo-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                   U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                   U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Design tokens ------------------------------------------------------ */

:root {
    --maroon-900: #1B0610;
    --maroon-800: #2B0A18;
    --maroon-700: #3A0F22;
    --maroon-600: #4A1530;

    --gold-400:   #F0C97B;
    --gold-500:   #D4A24C;
    --gold-600:   #B8862F;
    --gold-dim:   rgba(212, 162, 76, 0.28);
    --gold-faint: rgba(212, 162, 76, 0.10);

    --ink:        #F7EFE2;
    --ink-muted:  #C7B39A;
    --ink-faint:  #8E7A66;

    --ok:    #4FBF7B;
    --warn:  #E5A93C;
    --danger:#E06A5B;
    --info:  #6FA8DC;

    --radius-sm: 8px;
    --radius:    14px;
    --radius-lg: 22px;

    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 0 1px var(--gold-500), 0 0 24px rgba(212, 162, 76, 0.35);

    --page-max: 1180px;
    --font: 'Cairo', 'Segoe UI', Tahoma, system-ui, -apple-system, sans-serif;
}

/* ---- Base -------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background:
        radial-gradient(1100px 620px at 50% -10%, var(--maroon-600) 0%, transparent 62%),
        linear-gradient(180deg, var(--maroon-800) 0%, var(--maroon-900) 55%, #120409 100%);
    background-attachment: fixed;
}

/* Faint gold speckles, echoing the awards artwork. */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(1.5px 1.5px at 12% 22%, var(--gold-dim) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 78% 14%, var(--gold-dim) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 33% 72%, var(--gold-dim) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 88% 64%, var(--gold-dim) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 58% 40%, var(--gold-dim) 50%, transparent 51%);
    background-size: 520px 520px;
    opacity: 0.7;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold-400); text-decoration: none; }
a:hover { color: var(--gold-500); text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 0.6em; line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(1.6rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; }

:focus-visible {
    outline: 2px solid var(--gold-400);
    outline-offset: 3px;
}

/* ---- Layout ------------------------------------------------------------ */

.page {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.wrap {
    width: 100%;
    max-width: var(--page-max);
    margin-inline: auto;
    padding-inline: 20px;
}

.main { flex: 1 0 auto; padding-block: 32px 64px; }

/* ---- Header ------------------------------------------------------------ */

.site-header {
    border-block-end: 1px solid var(--gold-dim);
    background: rgba(20, 5, 12, 0.72);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: 0.2px;
}
.brand:hover { text-decoration: none; color: var(--gold-400); }
.brand img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.brand span { font-size: 1.02rem; }

.site-nav {
    margin-inline-start: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.site-nav a {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--ink-muted);
    font-size: 0.92rem;
    font-weight: 600;
}
.site-nav a:hover {
    text-decoration: none;
    color: var(--gold-400);
    border-color: var(--gold-dim);
    background: var(--gold-faint);
}

.lang-toggle { border: 1px solid var(--gold-dim) !important; color: var(--gold-400) !important; }

/* ---- Hero -------------------------------------------------------------- */

.hero {
    text-align: center;
    padding-block: 40px 24px;
}
.hero__logo {
    width: min(210px, 52vw);
    margin-inline: auto;
    margin-block-end: 18px;
    filter: drop-shadow(0 8px 26px rgba(212, 162, 76, 0.3));
}
.hero h1 {
    background: linear-gradient(180deg, #FFF6E4 0%, var(--gold-400) 55%, var(--gold-600) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.3em;
}
.hero p { color: var(--ink-muted); max-width: 640px; margin-inline: auto; }

/* ---- Year tabs --------------------------------------------------------- */

.year-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-block: 26px 34px;
}
.year-tab {
    padding: 8px 20px;
    border-radius: 999px;
    border: 1px solid var(--gold-dim);
    color: var(--ink-muted);
    font-weight: 700;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.02);
}
.year-tab:hover { text-decoration: none; color: var(--gold-400); background: var(--gold-faint); }
.year-tab.is-active {
    color: var(--maroon-900);
    background: linear-gradient(180deg, var(--gold-400), var(--gold-600));
    border-color: var(--gold-400);
}

/* ---- Section headings -------------------------------------------------- */

.section-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-block: 34px 20px;
    color: var(--gold-400);
    font-size: 1.15rem;
    font-weight: 800;
}
.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to var(--to-end, left), var(--gold-dim), transparent);
}
[dir="ltr"] .section-title::after { --to-end: right; }

/* ---- Poll cards (landing) ---------------------------------------------- */

.poll-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.poll-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--gold-dim);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(74, 21, 48, 0.55), rgba(27, 6, 16, 0.85));
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.poll-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold-500);
    box-shadow: var(--shadow-card), 0 0 26px rgba(212, 162, 76, 0.2);
}

.poll-card__cover {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--maroon-700), var(--maroon-900));
    display: grid;
    place-items: center;
    border-block-end: 1px solid var(--gold-dim);
    overflow: hidden;
}
.poll-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.poll-card__cover .star-mark { font-size: 2.6rem; opacity: 0.55; }

.poll-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.poll-card__body h3 { color: var(--ink); margin-bottom: 6px; }
.poll-card__desc { color: var(--ink-muted); font-size: 0.93rem; margin-bottom: 14px; flex: 1; }
.poll-card__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: var(--ink-faint);
}
.poll-card__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- Badges ------------------------------------------------------------ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid transparent;
    white-space: nowrap;
}
.badge--open   { color: var(--ok);     border-color: rgba(79, 191, 123, 0.4); background: rgba(79, 191, 123, 0.1); }
.badge--closed { color: var(--ink-faint); border-color: rgba(142, 122, 102, 0.4); background: rgba(142, 122, 102, 0.1); }
.badge--soon   { color: var(--info);   border-color: rgba(111, 168, 220, 0.4); background: rgba(111, 168, 220, 0.1); }
.badge--gold   { color: var(--gold-400); border-color: var(--gold-dim); background: var(--gold-faint); }
.badge--warn   { color: var(--warn);   border-color: rgba(229, 169, 60, 0.4);  background: rgba(229, 169, 60, 0.1); }
.badge--danger { color: var(--danger); border-color: rgba(224, 106, 91, 0.4);  background: rgba(224, 106, 91, 0.1); }

/* ---- Buttons ----------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border: 1px solid var(--gold-dim);
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.16s ease;
    text-decoration: none;
}
.btn:hover { text-decoration: none; border-color: var(--gold-500); background: var(--gold-faint); color: var(--gold-400); }

.btn--primary {
    background: linear-gradient(180deg, var(--gold-400), var(--gold-600));
    border-color: var(--gold-400);
    color: #2A0A17;
    box-shadow: 0 6px 20px rgba(212, 162, 76, 0.28);
}
.btn--primary:hover {
    background: linear-gradient(180deg, #FFDFA0, var(--gold-500));
    color: #2A0A17;
    box-shadow: 0 8px 26px rgba(212, 162, 76, 0.42);
}

.btn--ghost   { color: var(--ink-muted); }
.btn--danger  { border-color: rgba(224, 106, 91, 0.5); color: var(--danger); }
.btn--danger:hover { background: rgba(224, 106, 91, 0.12); border-color: var(--danger); color: var(--danger); }
.btn--block   { width: 100%; }
.btn--lg      { padding: 15px 34px; font-size: 1.06rem; }
.btn--sm      { padding: 7px 14px; font-size: 0.85rem; }
.btn[disabled], .btn.is-disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* ---- Flash messages ---------------------------------------------------- */

.flash-stack { display: grid; gap: 10px; margin-bottom: 22px; }

.flash {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 17px;
    border-radius: var(--radius);
    border: 1px solid var(--gold-dim);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.94rem;
    font-weight: 600;
}
.flash--success { border-color: rgba(79, 191, 123, 0.45); background: rgba(79, 191, 123, 0.1);  color: #B6EFCB; }
.flash--error   { border-color: rgba(224, 106, 91, 0.45); background: rgba(224, 106, 91, 0.1);  color: #F6C6BF; }
.flash--info    { border-color: rgba(111, 168, 220, 0.45); background: rgba(111, 168, 220, 0.1); color: #CBE1F5; }

/* ---- Panels ------------------------------------------------------------ */

.panel {
    border: 1px solid var(--gold-dim);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(58, 15, 34, 0.5), rgba(27, 6, 16, 0.75));
    box-shadow: var(--shadow-card);
    padding: 26px;
}
.panel--narrow { max-width: 520px; margin-inline: auto; }
.panel__title { color: var(--gold-400); margin-bottom: 6px; }
.panel__hint  { color: var(--ink-muted); font-size: 0.92rem; }

/* ---- Candidate grid (voting) ------------------------------------------- */

.cand-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    margin-block: 26px;
}

.cand {
    position: relative;
    display: block;
    cursor: pointer;
    border: 1.5px solid var(--gold-dim);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(74, 21, 48, 0.5), rgba(27, 6, 16, 0.8));
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}
.cand:hover { transform: translateY(-3px); border-color: var(--gold-500); }
.cand input { position: absolute; opacity: 0; pointer-events: none; }

.cand__photo {
    aspect-ratio: 1;
    overflow: hidden;
    background: linear-gradient(135deg, var(--maroon-700), var(--maroon-900));
    display: grid;
    place-items: center;
}
.cand__photo img { width: 100%; height: 100%; object-fit: cover; }
.cand__photo .initial {
    font-size: 2.6rem;
    font-weight: 900;
    color: var(--gold-dim);
}

.cand__body { padding: 14px 16px 18px; text-align: center; }
.cand__name { font-weight: 800; font-size: 1rem; margin-bottom: 4px; }
.cand__details { color: var(--ink-muted); font-size: 0.85rem; line-height: 1.5; }

.cand__check {
    position: absolute;
    inset-block-start: 12px;
    inset-inline-end: 12px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, var(--gold-400), var(--gold-600));
    color: #2A0A17;
    font-weight: 900;
    font-size: 0.95rem;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.18s ease;
}

.cand.is-selected {
    border-color: var(--gold-400);
    box-shadow: var(--shadow-glow);
}
.cand.is-selected .cand__check { opacity: 1; transform: scale(1); }
.cand.is-selected .cand__name  { color: var(--gold-400); }

/* Sticky vote bar */
.vote-bar {
    position: sticky;
    bottom: 0;
    z-index: 15;
    margin-inline: -20px;
    padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
    border-block-start: 1px solid var(--gold-dim);
    background: rgba(20, 5, 12, 0.92);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}
.vote-bar__hint { color: var(--ink-muted); font-size: 0.9rem; }

/* ---- Forms ------------------------------------------------------------- */

.field { margin-bottom: 18px; }
.field > label,
.field-label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ink-muted);
}
.field-label .req { color: var(--danger); }

.input, .select, .textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: var(--radius);
    border: 1px solid var(--gold-dim);
    background: rgba(0, 0, 0, 0.32);
    color: var(--ink);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(212, 162, 76, 0.16);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-faint); }
.textarea { min-height: 96px; resize: vertical; }
.select { appearance: none; background-image: none; cursor: pointer; }
.select option { background: var(--maroon-800); color: var(--ink); }

.field-hint { margin-top: 6px; font-size: 0.83rem; color: var(--ink-faint); }

.phone-input {
    direction: ltr;
    text-align: center;
    letter-spacing: 2px;
    font-size: 1.15rem;
    font-weight: 700;
}

.otp-input {
    direction: ltr;
    text-align: center;
    letter-spacing: 12px;
    font-size: 1.9rem;
    font-weight: 800;
    padding-inline: 10px;
    color: var(--gold-400);
}

.checkline { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.checkline input[type="checkbox"], .checkline input[type="radio"] {
    width: 18px; height: 18px; accent-color: var(--gold-500); cursor: pointer;
}
.checkline label { font-size: 0.93rem; color: var(--ink); cursor: pointer; margin: 0; }

/* The honeypot must be unreachable for humans but not display:none, which some
   bots detect and skip. */
.hp-wrap {
    position: absolute !important;
    inset-inline-start: -9999px;
    width: 1px; height: 1px;
    overflow: hidden;
}

/* ---- Chosen-candidate summary ------------------------------------------ */

.choice-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--gold-dim);
    border-radius: var(--radius);
    background: var(--gold-faint);
    margin-bottom: 22px;
}
.choice-summary img { width: 58px; height: 58px; border-radius: 12px; object-fit: cover; flex: none; }
.choice-summary__label { font-size: 0.8rem; color: var(--ink-faint); }
.choice-summary__name  { font-weight: 800; color: var(--gold-400); }
.choice-summary a { margin-inline-start: auto; font-size: 0.85rem; white-space: nowrap; }

/* ---- Results ----------------------------------------------------------- */

.stat-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    margin-bottom: 28px;
}
.stat {
    border: 1px solid var(--gold-dim);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.03);
    padding: 16px 18px;
}
.stat__label { font-size: 0.82rem; color: var(--ink-faint); margin-bottom: 4px; }
.stat__value { font-size: 1.7rem; font-weight: 800; color: var(--gold-400); line-height: 1.2; direction: ltr; }
.stat__value--sm { font-size: 1.15rem; }

.rank-list { display: grid; gap: 12px; }

.rank-row {
    display: grid;
    grid-template-columns: auto 56px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--gold-dim);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.03);
}
.rank-row--top {
    border-color: var(--gold-500);
    background: linear-gradient(90deg, var(--gold-faint), rgba(255, 255, 255, 0.03));
}

.rank-row__num {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border-radius: 50%;
    border: 1px solid var(--gold-dim);
    font-weight: 800; font-size: 0.92rem;
    color: var(--ink-muted);
    flex: none;
}
.rank-row--top .rank-row__num {
    background: linear-gradient(180deg, var(--gold-400), var(--gold-600));
    border-color: var(--gold-400);
    color: #2A0A17;
}

.rank-row__photo { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; }
.rank-row__photo--empty {
    width: 56px; height: 56px; border-radius: 12px; flex: none;
    background: linear-gradient(135deg, var(--maroon-700), var(--maroon-900));
    display: grid; place-items: center;
    color: var(--gold-dim); font-weight: 900;
}

.rank-row__name { font-weight: 700; margin-bottom: 6px; }

.bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.bar__fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gold-600), var(--gold-400));
    transition: width 0.5s ease;
}

.rank-row__figures { text-align: center; min-width: 78px; }
.rank-row__votes   { font-size: 1.25rem; font-weight: 800; color: var(--gold-400); direction: ltr; }
.rank-row__percent { font-size: 0.82rem; color: var(--ink-faint); direction: ltr; }

.chart-box {
    border: 1px solid var(--gold-dim);
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.22);
    padding: 18px;
    margin-block: 26px;
}
.chart-box h3 { color: var(--gold-400); font-size: 1rem; margin-bottom: 14px; }
.chart-box__canvas { position: relative; height: 300px; }

/* ---- Success / empty states ------------------------------------------- */

.state-box { text-align: center; max-width: 560px; margin-inline: auto; padding-block: 40px; }
.state-box__icon { font-size: 3.6rem; margin-bottom: 14px; }
.state-box h1 { color: var(--gold-400); }
.state-box p  { color: var(--ink-muted); }
.state-box__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }

.empty {
    text-align: center;
    padding: 44px 20px;
    color: var(--ink-faint);
    border: 1px dashed var(--gold-dim);
    border-radius: var(--radius-lg);
}

/* ---- Countdown --------------------------------------------------------- */

.countdown {
    display: inline-flex;
    gap: 10px;
    margin-block: 14px;
    direction: ltr;
}
.countdown__unit {
    min-width: 62px;
    padding: 8px 6px;
    border: 1px solid var(--gold-dim);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.28);
    text-align: center;
}
.countdown__num   { font-size: 1.35rem; font-weight: 800; color: var(--gold-400); line-height: 1.1; }
.countdown__label { font-size: 0.7rem; color: var(--ink-faint); }

/* ---- Footer ------------------------------------------------------------ */

.site-footer {
    border-block-start: 1px solid var(--gold-dim);
    padding-block: 24px;
    color: var(--ink-faint);
    font-size: 0.87rem;
    text-align: center;
}

/* ---- Utilities --------------------------------------------------------- */

.text-center { text-align: center; }
.text-muted  { color: var(--ink-muted); }
.text-faint  { color: var(--ink-faint); }
.text-gold   { color: var(--gold-400); }
.text-danger { color: var(--danger); }
.text-ok     { color: var(--ok); }
.ltr         { direction: ltr; unicode-bidi: isolate; }
.nowrap      { white-space: nowrap; }
.mt-0  { margin-top: 0; }
.mt-1  { margin-top: 8px; }
.mt-2  { margin-top: 16px; }
.mt-3  { margin-top: 24px; }
.mb-0  { margin-bottom: 0; }
.mb-2  { margin-bottom: 16px; }
.mb-3  { margin-bottom: 24px; }
.row   { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row--end { justify-content: flex-end; }
.grow  { flex: 1; }
.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;
}

/* ---- Responsive -------------------------------------------------------- */

@media (max-width: 640px) {
    body { font-size: 15px; }
    .wrap { padding-inline: 14px; }
    .vote-bar { margin-inline: -14px; padding-inline: 14px; }
    .cand-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .panel { padding: 20px 16px; }
    .rank-row { grid-template-columns: auto 44px 1fr; row-gap: 8px; }
    .rank-row__photo, .rank-row__photo--empty { width: 44px; height: 44px; }
    .rank-row__figures { grid-column: 1 / -1; text-align: start; display: flex; gap: 10px; align-items: baseline; }
    .brand span { font-size: 0.9rem; }
    .otp-input { font-size: 1.5rem; letter-spacing: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
