:root {
    --bg: #efe9ff;
    --bg-2: #fff4ea;
    --panel: rgba(255, 255, 255, 0.88);
    --panel-solid: #ffffff;
    --text: #1b1433;
    --muted: #6b6280;
    --primary: #6d4aff;
    --primary-dark: #5533f0;
    --primary-soft: #efe9ff;
    --accent: #ff6b57;
    --accent-dark: #e84f3b;
    --teal: #12b8a8;
    --teal-soft: #d9f6f2;
    --pink: #f43f8b;
    --gold: #f5a524;
    --danger: #e11d48;
    --success: #0f9f6e;
    --border: rgba(109, 74, 255, 0.12);
    --shadow: 0 18px 50px rgba(73, 42, 160, 0.12);
    --shadow-soft: 0 10px 28px rgba(73, 42, 160, 0.08);
    --radius: 22px;
    --radius-sm: 14px;
    --font: "Nunito", "Segoe UI", system-ui, sans-serif;
    --display: "Unbounded", "Nunito", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: var(--font);
    line-height: 1.55;
    background:
        radial-gradient(circle at 8% -10%, #ffd4c4 0, transparent 32%),
        radial-gradient(circle at 92% 0%, #c9c0ff 0, transparent 34%),
        radial-gradient(circle at 80% 88%, #b8f3e8 0, transparent 28%),
        linear-gradient(180deg, var(--bg) 0%, #f7f4ff 48%, var(--bg-2) 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image:
        radial-gradient(circle at 18% 22%, rgba(255, 107, 87, 0.12) 0 8px, transparent 9px),
        radial-gradient(circle at 72% 64%, rgba(109, 74, 255, 0.1) 0 6px, transparent 7px);
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1,
h2,
h3 {
    font-family: var(--display);
    letter-spacing: -0.03em;
    line-height: 1.2;
}

h1 {
    margin: 0 0 12px;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
}

h2 {
    margin: 0 0 10px;
    font-size: 1.25rem;
}

h3 {
    margin: 0 0 8px;
}

.container {
    margin: 0 auto;
    max-width: 1120px;
    padding: 28px 24px 48px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.72);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
}

.topbar-inner {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin: 0 auto;
    max-width: 1120px;
    padding: 14px 24px;
}

.brand {
    align-items: center;
    color: var(--text);
    display: flex;
    gap: 10px;
    font-family: var(--display);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    align-items: center;
    background: linear-gradient(135deg, #6d4aff 0%, #ff6b57 100%);
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(109, 74, 255, 0.28);
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    font-family: var(--display);
    font-size: 1rem;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nav > a:not(.btn) {
    border-radius: 999px;
    color: var(--text);
    font-weight: 700;
    padding: 8px 12px;
}

.nav > a:not(.btn):hover {
    background: var(--primary-soft);
    text-decoration: none;
}

.nav-user {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    padding: 7px 12px;
}

.hero {
    overflow: hidden;
    position: relative;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.55)),
        linear-gradient(120deg, #efe8ff, #fff1ea 55%, #e7fff9);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 32px;
    box-shadow: var(--shadow);
    padding: 48px 48px 42px;
}

.hero::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -50px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 107, 87, 0.28), transparent 68%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 16px;
    padding: 6px 12px;
}

.hero h1 {
    max-width: 18ch;
    font-size: clamp(2rem, 4.4vw, 3.3rem);
}

.hero-highlights {
    margin-top: 20px;
}

.section-head {
    margin-bottom: 16px;
}

.section-head h2 {
    font-family: var(--display);
    font-size: clamp(1.35rem, 2.4vw, 1.8rem);
    letter-spacing: -0.03em;
    margin: 0 0 8px;
}

.section-head .muted {
    max-width: 70ch;
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.check-list {
    margin: 14px 0 0;
    padding-left: 18px;
}

.check-list li {
    color: var(--muted);
    margin-bottom: 8px;
}

.landing-cta {
    align-items: center;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.62)),
        linear-gradient(120deg, #efe8ff, #fff1ea);
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: space-between;
}

.landing-cta h2 {
    font-family: var(--display);
}

.text-gradient {
    background: linear-gradient(120deg, #6d4aff, #ff6b57 70%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero .muted {
    max-width: 62ch;
    font-size: 1.05rem;
}

.hero .form-actions {
    margin-top: 24px;
}

.grid {
    display: grid;
    gap: 18px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.section-gap {
    margin-top: 24px;
}

.card {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    overflow: visible;
    padding: 24px;
    backdrop-filter: blur(12px);
}

.card-tint-violet { box-shadow: var(--shadow-soft), inset 0 3px 0 #6d4aff; }
.card-tint-coral { box-shadow: var(--shadow-soft), inset 0 3px 0 #ff6b57; }
.card-tint-teal { box-shadow: var(--shadow-soft), inset 0 3px 0 #12b8a8; }
.card-tint-gold { box-shadow: var(--shadow-soft), inset 0 3px 0 #f5a524; }

.feature-icon {
    align-items: center;
    border-radius: 16px;
    display: inline-flex;
    font-size: 1.25rem;
    height: 48px;
    justify-content: center;
    margin-bottom: 14px;
    width: 48px;
}

.feature-icon.violet { background: var(--primary-soft); }
.feature-icon.coral { background: #ffe8e3; }
.feature-icon.teal { background: var(--teal-soft); }
.feature-icon.gold { background: #fff3d6; }

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.chip {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
    padding: 6px 12px;
}

.muted {
    color: var(--muted);
}

.btn {
    background: linear-gradient(135deg, var(--primary) 0%, #8b6bff 100%);
    border: 0;
    border-radius: 14px;
    box-shadow: 0 10px 22px rgba(109, 74, 255, 0.28);
    color: #ffffff;
    cursor: pointer;
    display: inline-block;
    font: inherit;
    font-weight: 800;
    padding: 11px 18px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn:hover {
    filter: brightness(1.05);
    text-decoration: none;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #fff;
    box-shadow: none;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--primary-soft);
    filter: none;
}

.btn-danger {
    background: linear-gradient(135deg, #ff4d6d, var(--danger));
    box-shadow: 0 8px 18px rgba(225, 29, 72, 0.22);
}

input,
select,
textarea {
    background: #fff;
    border: 1px solid #ddd4f3;
    border-radius: var(--radius-sm);
    display: block;
    font: inherit;
    margin-top: 6px;
    padding: 12px 13px;
    width: 100%;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #b39dff;
    box-shadow: 0 0 0 4px rgba(109, 74, 255, 0.12);
    outline: none;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

label {
    display: block;
    font-weight: 800;
    margin-bottom: 14px;
}

.label-row {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

.field-hint {
    display: inline-flex;
    position: relative;
    vertical-align: middle;
}

.field-hint-icon {
    align-items: center;
    background: var(--primary-soft);
    border: 1px solid #d7ccff;
    border-radius: 999px;
    color: var(--primary);
    cursor: help;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    height: 18px;
    justify-content: center;
    line-height: 1;
    width: 18px;
}

.field-hint-text {
    background: #1b1433;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(27, 20, 51, 0.22);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    left: 50%;
    line-height: 1.4;
    max-width: 260px;
    opacity: 0;
    padding: 10px 12px;
    pointer-events: none;
    position: absolute;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    visibility: hidden;
    width: max-content;
    z-index: 30;
}

.field-hint-text::after {
    border: 6px solid transparent;
    border-top-color: #1b1433;
    content: "";
    left: 50%;
    position: absolute;
    top: 100%;
    transform: translateX(-50%);
}

.field-hint:hover .field-hint-text,
.field-hint:focus .field-hint-text,
.field-hint:focus-within .field-hint-text {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    visibility: visible;
}

.form-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.alert {
    border-radius: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    padding: 13px 16px;
}

.alert-success {
    background: #d9f7ea;
    color: #065f46;
}

.alert-error {
    background: #ffe1e7;
    color: #9f1239;
}

.alert-warning {
    background: #fff1c9;
    color: #92400e;
}

.import-textarea {
    min-height: 180px;
}

.import-help {
    background: #f7f4ff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin: 14px 0 8px;
    padding: 10px 14px 4px;
}

.import-help summary {
    cursor: pointer;
    font-weight: 800;
    padding: 6px 0 10px;
}

.import-example {
    background: #fff;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.45;
    overflow: auto;
    padding: 12px 14px;
    white-space: pre-wrap;
}

.table-wrap {
    overflow-x: auto;
}

.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.table th,
.table td {
    border-bottom: 1px solid var(--border);
    padding: 14px 10px;
    text-align: left;
    vertical-align: top;
}

.table th {
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.table tbody tr {
    transition: background 0.15s ease;
}

.table tbody tr:hover {
    background: rgba(109, 74, 255, 0.04);
}

.badge {
    background: var(--primary-soft);
    border-radius: 999px;
    color: #4c2fd4;
    display: inline-block;
    font-size: 13px;
    font-weight: 800;
    padding: 5px 11px;
}

.badge-success,
.badge-auto_checked,
.badge-reviewed {
    background: #d9f7ea;
    color: #047857;
}

.badge-muted {
    background: #eeeaf8;
    color: #6b6280;
}

.badge-warning,
.badge-needs_review {
    background: #fff1c9;
    color: #b45309;
}

.question {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--border);
    border-radius: 18px;
    margin-top: 16px;
    padding: 18px;
}

.question-head {
    align-items: center;
    display: flex;
    gap: 12px;
}

.question-head h2,
.question-head h3 {
    margin: 0;
}

.question ol {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    margin: 12px 0;
    padding: 12px 12px 12px 36px;
}

.question-num {
    align-items: center;
    background: linear-gradient(135deg, #6d4aff, #ff6b57);
    border-radius: 12px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    font-family: var(--display);
    font-size: 14px;
    font-weight: 700;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.option-line {
    align-items: center;
    background: #fff;
    border: 2px solid #efe9ff;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    gap: 10px;
    margin: 8px 0;
    padding: 11px 13px;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.option-line:hover {
    border-color: #cbbdff;
    transform: translateX(2px);
}

.option-line:has(input:checked) {
    background: var(--primary-soft);
    border-color: var(--primary);
}

.option-line input[type="radio"],
.option-line input[type="checkbox"] {
    accent-color: var(--primary);
    margin: 0;
    width: auto;
}

.card-auth {
    margin: 28px auto 0;
    max-width: 460px;
}

.editor-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 16px;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    font-weight: 800;
    padding: 9px 16px;
}

.tab-btn:hover {
    background: var(--primary-soft);
    text-decoration: none;
}

.tab-btn.is-active {
    background: linear-gradient(135deg, var(--primary) 0%, #8b6bff 100%);
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(109, 74, 255, 0.22);
    color: #fff;
}

.tab-panel h3 {
    margin: 22px 0 12px;
}

.password-code {
    background: var(--primary-soft);
    border-radius: 8px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 4px 8px;
}

.welcome-kicker {
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin: 0 0 6px;
    text-transform: uppercase;
}

.site-footer {
    color: var(--muted);
    padding: 8px 24px 36px;
}

.site-footer-inner {
    align-items: center;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin: 0 auto;
    max-width: 1120px;
    padding-top: 22px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .btn,
    .option-line,
    .table tbody tr {
        transition: none;
    }

    .btn:hover,
    .option-line:hover {
        transform: none;
    }
}

@media (max-width: 980px) {
    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 28px 22px;
    }

    .topbar-inner,
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .brand-text {
        max-width: 180px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

body.no-copy,
body.no-copy * {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

body.no-copy input,
body.no-copy textarea,
body.no-copy select {
    -webkit-user-select: text;
    -moz-user-select: text;
    user-select: text;
    -webkit-touch-callout: default;
}

@media print {
    body.no-copy {
        display: none !important;
    }
}

.answer-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}

.answer-row {
    align-items: center;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 10px 12px;
}

.btn-tiny {
    font-size: 13px;
    font-weight: 700;
    padding: 6px 10px;
}

.question-editing {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(109, 74, 255, 0.12);
}

.modal-overlay {
    align-items: flex-start;
    background: rgba(28, 18, 62, 0.52);
    backdrop-filter: blur(4px);
    bottom: 0;
    display: none;
    justify-content: center;
    left: 0;
    overflow: auto;
    padding: 28px 16px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1000;
}

.modal-overlay.is-open {
    display: flex;
}

.modal {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(40, 20, 90, 0.28);
    margin: auto;
    max-width: 720px;
    padding: 0;
    width: min(100%, 720px);
}

.modal-lg {
    max-width: 820px;
    width: min(100%, 820px);
}

.modal-header {
    align-items: flex-start;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 20px 22px 16px;
}

.modal-header h2 {
    margin: 0;
}

.modal-body {
    max-height: min(72vh, 760px);
    overflow: auto;
    padding: 18px 22px 8px;
}

.modal-footer {
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    padding: 14px 22px 18px;
}

.modal-close {
    align-items: center;
    background: #f4f0ff;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    font: inherit;
    font-size: 18px;
    font-weight: 800;
    height: 36px;
    justify-content: center;
    line-height: 1;
    text-decoration: none;
    width: 36px;
}

.modal-close:hover {
    background: var(--primary-soft);
}

body.modal-open {
    overflow: hidden;
}

.print-toolbar {
    margin-bottom: 18px;
}

.print-sheet {
    background: #fff;
}

.print-header h1 {
    margin-bottom: 8px;
}

.print-meta {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.print-question {
    border-top: 1px solid var(--border);
    margin-top: 18px;
    padding-top: 16px;
    page-break-inside: avoid;
}

.print-question h2 {
    font-size: 18px;
    margin: 0 0 6px;
}

.print-points {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.print-type {
    color: var(--muted);
    font-size: 13px;
    margin: 0 0 10px;
}

.print-options {
    list-style: none;
    margin: 0;
    padding: 0;
}

.print-options li {
    margin: 8px 0;
}

.print-mark {
    display: inline-block;
    margin-right: 8px;
    width: 1.2em;
}

.print-lines div {
    border-bottom: 1px solid #bbb;
    height: 28px;
    margin-top: 8px;
}

.print-lines.tall div {
    height: 34px;
}

.print-matching {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.print-hint {
    color: var(--muted);
    margin: 10px 0 6px;
}

.print-answer-blank {
    margin-top: 8px;
}

.print-answers-table td,
.print-answers-table th {
    vertical-align: top;
}

@media (max-width: 760px) {
    .print-matching {
        grid-template-columns: 1fr;
    }
}

@media print {
    body {
        background: #fff !important;
    }

    .topbar,
    .site-footer,
    .no-print,
    .alert {
        display: none !important;
    }

    .container {
        max-width: none;
        padding: 0;
    }

    .card,
    .print-sheet {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
    }

    .print-question {
        break-inside: avoid;
    }

    body.no-copy {
        display: block !important;
    }
}

.folder-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.folder-chip {
    align-items: center;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    display: inline-flex;
    font-weight: 800;
    gap: 8px;
    padding: 8px 14px;
    text-decoration: none;
}

.folder-chip:hover {
    background: var(--primary-soft);
    text-decoration: none;
}

.folder-chip.is-active {
    background: linear-gradient(135deg, var(--primary) 0%, #8b6bff 100%);
    border-color: transparent;
    color: #fff;
}

.folder-count {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    font-size: 12px;
    padding: 2px 8px;
}

.folder-chip.is-active .folder-count {
    background: rgba(255, 255, 255, 0.22);
}

.folder-list {
    display: grid;
    gap: 10px;
}

.folder-row {
    align-items: center;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--border);
    border-radius: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    padding: 12px 14px;
}

.folder-row a {
    color: var(--text);
    text-decoration: none;
}

.folder-row a:hover {
    color: var(--primary);
}

.icon-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.icon-actions form {
    margin: 0;
}

.icon-btn {
    align-items: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    height: 38px;
    justify-content: center;
    padding: 0;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
    width: 38px;
}

.icon-btn svg {
    fill: none;
    height: 18px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
    width: 18px;
}

.icon-btn:hover {
    background: var(--primary-soft);
    border-color: #cbbdff;
    color: var(--primary);
    text-decoration: none;
    transform: translateY(-1px);
}

.icon-btn-danger {
    color: var(--danger);
}

.icon-btn-danger:hover {
    background: #ffe8ee;
    border-color: #ffb3c2;
    color: #c01030;
}

.stat-block {
    border-top: 1px solid var(--border);
    margin-top: 18px;
    padding-top: 14px;
}

.stat-row {
    margin: 10px 0 14px;
}

.stat-chart {
    align-items: center;
    display: flex;
    gap: 18px;
    margin-top: 12px;
}

.stat-donut {
    flex: 0 0 156px;
    text-align: center;
}

.stat-donut-svg {
    display: block;
    height: 148px;
    margin: 0 auto;
    width: 148px;
}

.stat-donut-note {
    font-size: 12px;
    margin: 4px 0 0;
}

.stat-chart .stat-bars {
    flex: 1;
    min-width: 0;
}

.stat-swatch {
    border-radius: 4px;
    display: inline-block;
    height: 12px;
    margin-right: 8px;
    vertical-align: -1px;
    width: 12px;
}

.stat-columns {
    align-items: flex-end;
    display: flex;
    gap: 8px;
    height: 180px;
    margin-top: 14px;
}

.stat-column {
    align-items: center;
    display: flex;
    flex: 1;
    flex-direction: column;
    height: 100%;
    min-width: 0;
}

.stat-column-value,
.stat-column-label {
    font-size: 12px;
    font-weight: 800;
}

.stat-column-track {
    align-items: flex-end;
    background: #efe9ff;
    border-radius: 10px 10px 4px 4px;
    display: flex;
    flex: 1;
    margin: 6px 0;
    max-width: 42px;
    overflow: hidden;
    width: 100%;
}

.stat-column-fill {
    width: 100%;
}

.stat-row-head {
    display: flex;
    font-weight: 800;
    gap: 12px;
    justify-content: space-between;
}

.stat-track {
    background: #efe9ff;
    border-radius: 999px;
    height: 10px;
    margin-top: 6px;
    overflow: hidden;
}

.stat-fill {
    background: linear-gradient(90deg, var(--primary), #8b6bff);
    height: 100%;
    min-width: 0;
}

.stat-texts {
    margin: 8px 0 0;
    padding-left: 18px;
}

.scale-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.scale-item {
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 8px 12px;
}

.stat-answer {
    background: #f6f3ff;
    border-radius: 12px;
    font-weight: 800;
    margin: 8px 0 0;
    padding: 10px 14px;
    white-space: pre-wrap;
}

.stat-choice {
    margin: 0 0 8px;
    max-width: 520px;
}

.stats-toggle {
    margin-top: 8px;
}

.stat-view-switch {
    margin-bottom: 8px;
}

@media (max-width: 700px) {
    .stat-chart {
        align-items: stretch;
        flex-direction: column;
    }

    .stat-donut {
        flex-basis: auto;
    }
}
