/* ============================================================
   BOLANDILA EQ Profile — обща дизайн система (admin + участник)
   Палитра: жълто / черно / бяло / сиви (spec §10.5, §21).
   Mobile-first; без външни ресурси (CSP self).
   ============================================================ */

:root {
    --c-yellow: #F5C400;
    --c-yellow-soft: #FFF6D6;
    --c-black: #111111;
    --c-white: #FFFFFF;
    --c-grey-1: #F4F4F4;
    --c-grey-2: #D9D9D9;
    --c-grey-3: #6B6B6B;
    --c-ink-2: #3A3A3A;
    --radius: 12px;
    --radius-s: 8px;
    --shadow: 0 1px 3px rgba(17, 17, 17, .07), 0 4px 14px rgba(17, 17, 17, .05);
    --pad: 1.25rem;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: 'Montserrat', -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--c-black);
    background: var(--c-grey-1);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.55;
}

h1 { font-size: 1.45rem; margin: 0 0 .75rem; letter-spacing: .01em; }
h2 { font-size: 1.1rem; margin: 1.75rem 0 .6rem; }
h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
p { margin: .4rem 0 .8rem; }

a { color: var(--c-black); text-decoration-thickness: 2px; text-underline-offset: 2px; }
a:hover { background: var(--c-yellow-soft); }

code, .mono {
    font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
    font-size: .88em;
    background: var(--c-grey-1);
    padding: .1em .35em;
    border-radius: 4px;
}

.muted, .hint { color: var(--c-grey-3); font-size: .9rem; }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible, label:focus-within {
    outline: 3px solid var(--c-yellow);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* ---------- Горна лента + навигация ---------- */

.topbar {
    background: var(--c-black);
    color: var(--c-white);
    border-bottom: 4px solid var(--c-yellow);
}

.topbar-inner {
    max-width: 74rem;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 3.4rem;
    flex-wrap: wrap;
}

.brand {
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--c-white);
    text-decoration: none;
    padding: .55rem 0;
    white-space: nowrap;
}
.brand:hover { background: none; color: var(--c-yellow); }
.brand .dot { color: var(--c-yellow); }

.nav-toggle { display: none; }

.nav-burger {
    display: none;
    margin-left: auto;
    cursor: pointer;
    padding: .6rem .4rem;
    border-radius: var(--radius-s);
}
.nav-burger span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--c-white);
    margin: 5px 0;
    border-radius: 2px;
}

nav.main {
    display: flex;
    align-items: center;
    gap: .15rem;
    flex: 1;
    flex-wrap: wrap;
}

nav.main a {
    color: var(--c-white);
    text-decoration: none;
    padding: .5rem .8rem;
    border-radius: var(--radius-s);
    font-size: .92rem;
    font-weight: 500;
    white-space: nowrap;
}
nav.main a:hover { background: var(--c-ink-2); color: var(--c-white); }
nav.main a[aria-current="page"] {
    background: var(--c-yellow);
    color: var(--c-black);
    font-weight: 700;
}

nav.main .nav-logout { margin-left: auto; }
nav.main .nav-logout button {
    background: none;
    border: 2px solid var(--c-grey-3);
    color: var(--c-white);
    border-radius: var(--radius-s);
    padding: .35rem .8rem;
    font: inherit;
    font-size: .88rem;
    cursor: pointer;
    min-height: 0;
}
nav.main .nav-logout button:hover { border-color: var(--c-yellow); color: var(--c-yellow); }

@media (max-width: 860px) {
    .nav-burger { display: block; }
    nav.main {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        padding: .25rem 0 .75rem;
        gap: .25rem;
    }
    .nav-toggle:checked ~ nav.main { display: flex; }
    nav.main a { padding: .7rem .8rem; }
    nav.main .nav-logout { margin: .5rem 0 0; }
    nav.main .nav-logout button { width: 100%; min-height: 44px; }
}

/* ---------- Основно съдържание ---------- */

main.site {
    flex: 1;
    width: 100%;
    max-width: 74rem;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

main.site.narrow { max-width: 30rem; padding-top: 3rem; }

footer.site {
    padding: 1rem 1.5rem 1.25rem;
    color: var(--c-grey-3);
    font-size: .85rem;
    text-align: center;
}

.page-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: .75rem;
}
.page-head h1 { margin: 0; }

/* ---------- Карти ---------- */

.card {
    background: var(--c-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: var(--pad);
    margin: 0 0 1rem;
}

.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.card.accent { border-left: 6px solid var(--c-yellow); }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.stat-card {
    background: var(--c-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem 1.25rem;
    text-decoration: none;
    display: block;
}
.stat-card:hover { background: var(--c-yellow-soft); }
.stat-card .num { font-size: 1.9rem; font-weight: 700; display: block; line-height: 1.2; }
.stat-card .lbl { color: var(--c-grey-3); font-size: .9rem; }

/* ---------- Таблици ---------- */

.table-wrap {
    overflow-x: auto;
    background: var(--c-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: .75rem 0 1.25rem;
}

table {
    border-collapse: collapse;
    width: 100%;
    font-size: .93rem;
}

th, td {
    text-align: left;
    padding: .65rem .9rem;
    border-bottom: 1px solid var(--c-grey-2);
    vertical-align: top;
}

thead th {
    background: var(--c-grey-1);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--c-grey-3);
    border-bottom: 2px solid var(--c-grey-2);
    white-space: nowrap;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #FCFCF7; }

/* ---------- Бутони ---------- */

button, .btn {
    font: inherit;
    font-weight: 600;
    font-size: .95rem;
    min-height: 44px;
    padding: .55rem 1.3rem;
    border-radius: var(--radius-s);
    border: 2px solid var(--c-black);
    background: var(--c-white);
    color: var(--c-black);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
}

button:hover, .btn:hover { background: var(--c-grey-1); }

button.primary, .btn.primary { background: var(--c-yellow); border-color: var(--c-black); }
button.primary:hover, .btn.primary:hover { background: #FFD526; }

button.quiet, .btn.quiet { border-color: var(--c-grey-2); font-weight: 500; }
button.small, .btn.small { min-height: 36px; padding: .3rem .8rem; font-size: .88rem; }

button.danger, .btn.danger { border-color: var(--c-black); background: var(--c-white); color: var(--c-black); }
button.danger:hover { background: var(--c-grey-2); }

.actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin: .75rem 0; }

/* ---------- Форми ---------- */

.field { margin: 0 0 1rem; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .3rem; }
.field .help { color: var(--c-grey-3); font-size: .85rem; margin-top: .25rem; }

input[type="text"], input[type="search"], input[type="password"], input[type="email"],
input[type="number"], input[type="date"], input[type="datetime-local"], select, textarea {
    font: inherit;
    padding: .6rem .8rem;
    border: 2px solid var(--c-grey-2);
    border-radius: var(--radius-s);
    background: var(--c-white);
    width: 100%;
    max-width: 28rem;
    min-height: 44px;
}

textarea { min-height: 8rem; max-width: 100%; }

input:focus, select:focus, textarea:focus { border-color: var(--c-black); }

.check { display: flex; align-items: center; gap: .5rem; font-size: .95rem; }
.check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--c-black); }

form.inline { display: inline-flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

.searchbar {
    display: flex;
    gap: .6rem;
    align-items: center;
    flex-wrap: wrap;
    background: var(--c-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: .8rem 1rem;
    margin-bottom: 1rem;
}
.searchbar input[type="search"] { flex: 1; min-width: 12rem; max-width: none; }

/* ---------- Съобщения ---------- */

.msg-error, .alert-error {
    background: var(--c-white);
    border-left: 6px solid var(--c-black);
    box-shadow: var(--shadow);
    padding: .8rem 1rem;
    border-radius: var(--radius-s);
    margin: .75rem 0;
    font-weight: 500;
}

.msg-notice, .alert-notice {
    background: var(--c-yellow-soft);
    border-left: 6px solid var(--c-yellow);
    box-shadow: var(--shadow);
    padding: .8rem 1rem;
    border-radius: var(--radius-s);
    margin: .75rem 0;
}

/* ---------- Значки (badges) ---------- */

.badge {
    display: inline-block;
    font-size: .78rem;
    font-weight: 700;
    padding: .18rem .6rem;
    border-radius: 999px;
    white-space: nowrap;
    letter-spacing: .02em;
}

.badge.dark { background: var(--c-black); color: var(--c-yellow); }
.badge.yellow { background: var(--c-yellow); color: var(--c-black); }
.badge.grey { background: var(--c-grey-2); color: var(--c-black); }
.badge.outline { background: var(--c-white); border: 2px solid var(--c-grey-2); color: var(--c-grey-3); }
td .badge { margin: 1px 3px 1px 0; }

/* ---------- Quality review ---------- */

.signal-card {
    background: var(--c-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem 1.25rem;
    margin: 0 0 .9rem;
    border-left: 6px solid var(--c-grey-2);
}
.signal-card.sev-high { border-left-color: var(--c-black); }
.signal-card.sev-medium { border-left-color: var(--c-yellow); }

.signal-card .sig-head {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
    margin-bottom: .35rem;
}
.signal-card .sig-head strong { font-size: 1rem; }
.signal-card .sig-question { margin: .1rem 0 .5rem; color: var(--c-ink-2); font-weight: 600; }
.signal-card .sig-explain { margin: .25rem 0 .6rem; }
.signal-card .sig-evidence {
    margin: .4rem 0 .75rem;
    padding: 0;
    list-style: none;
    display: flex;
    gap: .4rem .9rem;
    flex-wrap: wrap;
    font-size: .88rem;
    color: var(--c-grey-3);
}
.signal-card .sig-evidence li {
    background: var(--c-grey-1);
    padding: .2rem .6rem;
    border-radius: 6px;
}
.signal-card form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.signal-card form select, .signal-card form input { max-width: 16rem; min-height: 40px; }

.filterbar { display: flex; gap: .4rem; flex-wrap: wrap; margin: .5rem 0 1rem; }
.filterbar a {
    text-decoration: none;
    border: 2px solid var(--c-grey-2);
    border-radius: 999px;
    padding: .25rem .9rem;
    font-size: .88rem;
    font-weight: 600;
}
.filterbar a.active { background: var(--c-black); color: var(--c-white); border-color: var(--c-black); }

/* ---------- Вграден rich-text редактор ---------- */

textarea.rt-source { display: none; }

.rt-editor {
    border: 2px solid var(--c-grey-2);
    border-radius: var(--radius-s);
    background: var(--c-white);
    margin: 0 0 .5rem;
    overflow: hidden;
}
.rt-editor:focus-within { border-color: var(--c-black); }

.rt-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .2rem;
    padding: .35rem .4rem;
    background: var(--c-grey-1);
    border-bottom: 1px solid var(--c-grey-2);
}
.rt-btn {
    min-height: 32px;
    min-width: 32px;
    padding: .2rem .5rem;
    font-size: .85rem;
    font-weight: 600;
    border: 1px solid var(--c-grey-2);
    border-radius: 6px;
    background: var(--c-white);
    color: var(--c-black);
    cursor: pointer;
    line-height: 1;
}
.rt-btn:hover { background: var(--c-yellow-soft); border-color: var(--c-grey-3); }

.rt-area {
    padding: .7rem .9rem;
    min-height: 6rem;
    font: inherit;
    line-height: 1.55;
    outline: none;
}
.rt-area:focus { outline: none; }
.rt-area p { margin: 0 0 .6rem; }
.rt-area h3 { font-size: 1.05rem; margin: .8rem 0 .4rem; }
.rt-area h4 { font-size: .95rem; margin: .7rem 0 .3rem; }
.rt-area ul, .rt-area ol { margin: .4rem 0 .6rem 1.4rem; }
.rt-area blockquote {
    margin: .5rem 0; padding: .3rem .9rem;
    border-left: 3px solid var(--c-yellow); color: var(--c-ink-2);
}

/* ---------- Диаграма на архетипите ---------- */

.arch-group-label {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--c-grey-3);
    margin: 1rem 0 .5rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.arch-group-label:first-child { margin-top: 0; }
.arch-group-label .swatch { width: 14px; height: 14px; border-radius: 4px; background: var(--c-grey-2); }
.arch-group-label .swatch.leading { background: var(--c-yellow); }
.arch-group-label .swatch.supporting { background: #C9CDD4; }
.arch-group-label .swatch.other { background: var(--c-grey-2); }

.arch-bars { display: flex; flex-direction: column; gap: .55rem; }

.arch-row {
    display: grid;
    grid-template-columns: 1.6rem minmax(9rem, 15rem) 1fr auto;
    align-items: center;
    gap: .6rem;
}
.arch-row .rank {
    width: 1.6rem; height: 1.6rem; border-radius: 50%;
    background: var(--c-grey-1); color: var(--c-grey-3);
    font-size: .8rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.arch-row.leading .rank { background: var(--c-black); color: var(--c-yellow); }
.arch-row .arch-name { font-size: .92rem; font-weight: 600; }
.arch-row .arch-name small { display: block; font-weight: 400; color: var(--c-grey-3); font-size: .78rem; }

/* CSP-safe bar: native <progress>, coloured per group. */
progress.arch-bar {
    appearance: none; -webkit-appearance: none;
    border: none; width: 100%; height: 16px; min-width: 60px;
    border-radius: 999px; background: var(--c-grey-1); overflow: hidden;
}
progress.arch-bar::-webkit-progress-bar { background: var(--c-grey-1); border-radius: 999px; }
progress.arch-bar.leading::-webkit-progress-value { background: var(--c-yellow); border-radius: 999px; }
progress.arch-bar.supporting::-webkit-progress-value { background: #C9CDD4; border-radius: 999px; }
progress.arch-bar.other::-webkit-progress-value { background: var(--c-grey-2); border-radius: 999px; }
progress.arch-bar.leading::-moz-progress-bar { background: var(--c-yellow); }
progress.arch-bar.supporting::-moz-progress-bar { background: #C9CDD4; }
progress.arch-bar.other::-moz-progress-bar { background: var(--c-grey-2); }

.arch-row .pts { font-size: .85rem; font-weight: 700; white-space: nowrap; min-width: 3.5rem; text-align: right; }
.arch-row .pts small { font-weight: 400; color: var(--c-grey-3); }

@media (max-width: 620px) {
    .arch-row { grid-template-columns: 1.4rem 1fr auto; }
    .arch-row progress.arch-bar { grid-column: 1 / -1; }
}

/* ---------- Блокове съдържание на профила ---------- */

.content-block {
    background: var(--c-white);
    border: 1px solid var(--c-grey-2);
    border-left: 5px solid var(--c-yellow);
    border-radius: var(--radius-s);
    padding: 1rem 1.25rem;
    margin: 0 0 1rem;
}
.content-block.editing { border-left-color: var(--c-grey-3); background: #FCFCF7; }

.content-block .cb-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: .6rem;
    padding-bottom: .5rem;
    border-bottom: 1px dashed var(--c-grey-2);
}
.content-block .cb-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--c-black);
    margin: 0;
}
.content-block h3.cb-title { border-bottom: none; padding: 0; }
.content-block .cb-controls { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.content-block .cb-body { color: var(--c-ink-2); }
.content-block .cb-body > :first-child { margin-top: 0; }
.content-block .cb-body > :last-child { margin-bottom: 0; }
.content-block .cb-body h3, .content-block .cb-body h4 { color: var(--c-black); }
.content-block .cb-body blockquote {
    border-left: 3px solid var(--c-yellow); background: var(--c-grey-1);
    margin: .6rem 0; padding: .5rem .9rem; border-radius: 0 6px 6px 0; color: var(--c-ink-2);
}

/* Инструментни секции: зелен header за водещ, син за подкрепящ (само админ). */
.content-block.tool-leading { border-left-color: #2E7D32; }
.content-block.tool-supporting { border-left-color: #1565C0; }
.content-block.tool-leading .cb-title,
.content-block.tool-supporting .cb-title {
    color: #fff;
    padding: .5rem .9rem;
    border-radius: var(--radius-s);
    border-bottom: none;
    margin: -.25rem -.25rem .75rem;
}
.content-block.tool-leading .cb-title { background: #2E7D32; }
.content-block.tool-supporting .cb-title { background: #1565C0; }

/* Четирите подраздела (Кога помага, Рискове, Тема, Практика) като блокчета. */
.content-block .cb-body h4 {
    margin: 1rem 0 0;
    padding: .45rem .8rem;
    background: var(--c-yellow-soft);
    border-left: 4px solid var(--c-yellow);
    border-radius: 6px 6px 0 0;
    font-size: .95rem;
    color: var(--c-black);
}
.content-block .cb-body h4 + p {
    margin-top: 0;
    padding: .6rem .8rem;
    background: var(--c-grey-1);
    border-left: 4px solid var(--c-grey-2);
    border-radius: 0 0 6px 6px;
}

/* ---------- Сравнение: двойни барове ---------- */

.cmp-legend { display: flex; gap: 1.2rem; flex-wrap: wrap; margin: .5rem 0 1rem; font-size: .9rem; }
.cmp-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.cmp-legend .box { width: 14px; height: 14px; border-radius: 4px; }
.cmp-legend .box.a { background: var(--c-grey-2); }
.cmp-legend .box.b { background: var(--c-yellow); }

.cmp-rows { display: flex; flex-direction: column; gap: .9rem; }
.cmp-row {
    display: grid;
    grid-template-columns: minmax(9rem, 14rem) 1fr auto;
    align-items: center;
    gap: .75rem;
}
.cmp-row .cmp-name { font-size: .92rem; font-weight: 600; }
.cmp-row .cmp-name small { display: block; font-weight: 400; color: var(--c-grey-3); font-size: .78rem; }
.cmp-bars { display: flex; flex-direction: column; gap: .3rem; }
.cmp-bar-line { display: grid; grid-template-columns: 1.3rem 1fr 3.2rem; align-items: center; gap: .4rem; }
.cmp-bar-line .tag { font-size: .72rem; font-weight: 700; color: var(--c-grey-3); }
.cmp-bar-line .val { font-size: .8rem; font-weight: 700; text-align: right; white-space: nowrap; }
progress.cmp-bar {
    appearance: none; -webkit-appearance: none; border: none;
    width: 100%; height: 12px; border-radius: 999px; background: var(--c-grey-1); overflow: hidden;
}
progress.cmp-bar::-webkit-progress-bar { background: var(--c-grey-1); border-radius: 999px; }
progress.cmp-bar.a::-webkit-progress-value { background: var(--c-grey-2); border-radius: 999px; }
progress.cmp-bar.b::-webkit-progress-value { background: var(--c-yellow); border-radius: 999px; }
progress.cmp-bar.a::-moz-progress-bar { background: var(--c-grey-2); }
progress.cmp-bar.b::-moz-progress-bar { background: var(--c-yellow); }

.cmp-dir {
    font-size: .78rem; font-weight: 700; white-space: nowrap;
    padding: .18rem .55rem; border-radius: 999px; border: 1px solid var(--c-grey-2);
}
.cmp-dir.up::before { content: '\2191 '; }
.cmp-dir.down::before { content: '\2193 '; }
.cmp-dir.same { color: var(--c-grey-3); }

@media (max-width: 620px) {
    .cmp-row { grid-template-columns: 1fr auto; }
    .cmp-row .cmp-bars { grid-column: 1 / -1; order: 3; }
}

.change-arrow { font-weight: 700; padding: 0 .2rem; }
.change-arrow.up { color: var(--c-black); }
.change-arrow.down { color: var(--c-grey-3); }

/* ---------- Открояване на секции ---------- */

.section-head {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin: 0 0 .35rem;
}
.section-head .ico {
    width: 2rem; height: 2rem; flex-shrink: 0;
    border-radius: 8px;
    background: var(--c-yellow-soft);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem;
}
.section-head h2 { margin: 0; font-size: 1.1rem; }

.answer-block {
    border-left: 4px solid var(--c-grey-2);
    padding: .1rem 0 .1rem 1rem;
    margin: 0 0 1rem;
}
.answer-block.reviewed { border-left-color: var(--c-yellow); }
.answer-block .q { font-weight: 600; margin: 0 0 .35rem; }
.answer-block blockquote {
    margin: 0 0 .5rem; padding: .6rem .9rem;
    background: var(--c-grey-1); border-radius: 8px; border: none;
    color: var(--c-ink-2); font-style: normal;
}

.stack { display: flex; flex-direction: column; gap: 1rem; }

fieldset.box {
    border: 1px solid var(--c-grey-2);
    border-radius: var(--radius-s);
    padding: 1rem;
    margin: 0 0 1rem;
}
fieldset.box legend { font-weight: 700; padding: 0 .4rem; }

/* ---------- Описателни списъци ---------- */

dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1.25rem; margin: .5rem 0; }
dl.kv dt { font-weight: 600; color: var(--c-grey-3); font-size: .9rem; }
dl.kv dd { margin: 0; }

@media (max-width: 560px) {
    dl.kv { grid-template-columns: 1fr; gap: 0; }
    dl.kv dt { margin-top: .5rem; }
}

/* ---------- Участнически изгледи ---------- */

main.p {
    flex: 1;
    width: 100%;
    max-width: 36rem;
    margin: 0 auto;
    padding: 1.25rem 1rem 3rem;
    font-size: 1.05rem;
}

main.p .card { padding: 1.5rem 1.4rem; }

.p-hero { text-align: center; padding: 1rem 0 .5rem; }
.p-hero .emoji { font-size: 2.6rem; display: block; margin-bottom: .5rem; }

.progress {
    background: var(--c-grey-2);
    border-radius: 999px;
    height: 12px;
    margin: .5rem 0 1.25rem;
    overflow: hidden;
}
.progress > div { background: var(--c-yellow); height: 100%; border-radius: 999px; }

/* Native progress (CSP-safe: без inline style). */
progress.bar {
    width: 100%;
    height: 12px;
    margin: .5rem 0 1.25rem;
    appearance: none;
    -webkit-appearance: none;
    border: none;
    border-radius: 999px;
    background: var(--c-grey-2);
    overflow: hidden;
}
progress.bar::-webkit-progress-bar { background: var(--c-grey-2); border-radius: 999px; }
progress.bar::-webkit-progress-value { background: var(--c-yellow); border-radius: 999px; }
progress.bar::-moz-progress-bar { background: var(--c-yellow); border-radius: 999px; }

.radio-cards {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    margin: 1rem 0;
    padding: 0;
}

.radio-cards label {
    display: flex;
    align-items: center;
    gap: .8rem;
    background: var(--c-white);
    border: 2px solid var(--c-grey-2);
    border-radius: var(--radius);
    padding: .95rem 1.1rem;
    min-height: 52px;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.radio-cards label:hover { border-color: var(--c-grey-3); }
.radio-cards input { width: 22px; height: 22px; min-height: 0; accent-color: var(--c-black); flex-shrink: 0; }
.radio-cards label:has(input:checked) {
    border-color: var(--c-black);
    background: var(--c-yellow-soft);
    font-weight: 600;
}

.nav-buttons {
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    margin-top: 1.25rem;
}

.nav-buttons button { min-height: 50px; flex: 1; max-width: 48%; }

.pin-input {
    font-size: 1.6rem !important;
    letter-spacing: .45em;
    text-align: center;
    max-width: 12rem !important;
    font-family: ui-monospace, Consolas, monospace;
}

/* ---------- Списъци без водачи / файлове ---------- */

ul.clean-list { list-style: none; margin: .5rem 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
ul.clean-list > li { padding: 0; }
ul.clean-list > li + li { border-top: 1px solid var(--c-grey-2); padding-top: .7rem; }

.file-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}
.file-row a { font-weight: 600; }
.file-row .inline { margin-left: auto; }

/* <details>/<summary> as a button (no disclosure triangle). */
summary.btn { list-style: none; display: inline-flex; }
summary.btn::-webkit-details-marker { display: none; }
summary.btn::marker { content: ''; }
details.row-edit { display: inline-block; }
details.row-edit[open] > summary.btn { background: var(--c-grey-1); }
details.row-edit textarea { max-width: 22rem; margin-bottom: .4rem; }
details > summary { cursor: pointer; }

/* ---------- Помощни ---------- */

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 1rem; }
.mt-half { margin-top: .5rem; }
.mb-0 { margin-bottom: 0; }
.mb-block { margin-bottom: 1.25rem; }
.w-narrow { max-width: 5rem; }
.w-narrow-2 { max-width: 11rem; }
.card.flat { box-shadow: none; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.w-100 { width: 100%; }

@media (max-width: 560px) {
    main.site { padding: 1rem .75rem 2.5rem; }
    .card { padding: 1rem; }
    h1 { font-size: 1.25rem; }
    .actions button, .actions .btn { flex: 1 1 auto; }
}
