/* =====================================================
   Layout
   ===================================================== */

body {
    margin: 0;
    background: var(--color-page-bg);
    color: var(--color-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    margin: 0 auto;
    max-width: 720px;
	padding: 24px var(--page-gutter);
}

section {
    margin-top: 32px;
}

main > section:first-of-type {
    margin-top: 0;
}

.card > p + *,
.card > h2 + *,
.card > h3 + *,
.card > .form-group + *,
.card > .result + * {
    margin-top: 16px;
}

.actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.actions + * {
    margin-top: 16px;
}

.actions > * {
    width: auto;
    flex: 0 0 auto;
}

.actions + .hint {
    margin-top: 6px;
}

/* =====================================================
   Typography
   ===================================================== */

p {
    margin: 0 0 16px;
}

h2,
h3 {
    margin-top: 0;
    margin-bottom: 12px;
}

h2 {
    font-size: 1.3rem;
    font-weight: 700;
}

h3 {
    font-size: 1.05rem;
    font-weight: 600;
}

p + h2,
p + h3 {
    margin-top: 32px;
}

section > p + .card {
    margin-top: 24px;
}

section > h2,
section > h3 {
    margin-top: 32px;
}

section > h2:first-child {
    margin-top: 0;
}

strong {
    font-weight: 700;
}

/* =====================================================
   Forms
   ===================================================== */

input,
select,
textarea,
button {
    font-family: inherit;
    font-size: 1rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="url"],
input[type="date"],
select {
    width: 100%;
    height: var(--input-height);
    padding: 0 var(--input-padding-x);
    border: 1px solid var(--color-border-dark);
    border-radius: 8px;
}

textarea {
    width: 100%;
    min-height: 120px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--color-border-dark);
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-btn-primary);
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

.form-group label {
    margin-bottom: 6px;
    font-weight: 600;
}

.form-group > p:last-child {
    margin-bottom: 0;
}

.hint {
    font-size: 0.85rem;
    color: var(--color-text-soft);
	margin: 6px 0 0;
}

.form-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.radio-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.radio-row .radio-option {
    margin: 0;
    padding: 0;
}

.hidden-field {
    display: none;
}

/* =====================================================
   File Inputs
   ===================================================== */

input[type="file"] {
    height: var(--input-height);
    line-height: var(--input-height);
    font-family: var(--font-base);
}

input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
    height: var(--input-height);
    padding: 0 16px;
    margin-right: 10px;

    border-radius: 8px;
    border: 1px solid var(--color-border-dark);

    background: var(--color-surface-soft);
    color: var(--color-text-strong);

    font-family: inherit;
    font-weight: 600;
    cursor: pointer;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    white-space: nowrap;
}

input[type="file"]::file-selector-button:hover,
input[type="file"]::-webkit-file-upload-button:hover {
    background: var(--color-surface);
}

/* =====================================================
   Radio / Choice Controls
   ===================================================== */

.radio-option {
    display: flex;
    align-items: center;
	font-size: 1rem;
    line-height: 1.35;
    gap: 8px;
    margin: 1px 0;
    padding: 2px 6px;
    border-radius: 6px;
    cursor: pointer;
}

.radio-option:hover {
    background: var(--color-surface-soft);
}

.radio-option input[type="radio"] {
    margin: 0;
    flex: 0 0 auto;
    transform: translateY(1px);
}

.dot-string {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    font-size: 0.92em;
    font-weight: 600;
    color: var(--color-text-soft);
    white-space: nowrap;
}

.dot-string::before {
    content: "·";
    color: var(--color-border-dark);
    font-weight: 700;
}

.radio-group {
    display: flex;
    flex-direction: column;
	gap: 3px;
}

.radio-group input[type="radio"] {
    margin: 0;
    transform: translateY(1px);
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
    cursor: pointer;
}

.radio-option,
.radio-option label,
.radio-group label {
    font-weight: normal;
}

/* =====================================================
   Buttons
   ===================================================== */

button,
input[type="submit"],
.btn-primary {
    height: var(--input-height);
    padding: 0 22px;
	min-width: 110px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

button,
.btn-primary,
.btn-secondary,
.btn-icon {
    transition:
        background .15s ease,
        border-color .15s ease,
        transform .08s ease;
}

.btn-primary,
.btn-secondary {
    line-height: 1;
}

button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--color-btn-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-btn-primary-hover);
}

button:focus,
button:focus-visible {
    outline: none;
    box-shadow: none;
}

.btn-secondary {
    height: var(--input-height);
    padding: 0 18px;
	min-width: 110px;
    border-radius: 8px;
    border: 1px solid var(--color-border-dark);
    background: linear-gradient(to bottom, #ffffff, var(--color-surface-soft));
    color: var(--color-text-strong);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;

    white-space: nowrap;
}

.btn-secondary:hover {
    background: linear-gradient(
        to bottom,
        #ffffff,
        var(--color-surface-soft)
    );
    border-color: var(--color-border-dark);

    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.btn-secondary:active {
    background: linear-gradient(
        to bottom,
        var(--color-surface-soft),
        #ffffff
    );
    transform: scale(0.96);

    box-shadow: inset 0 2px 4px rgba(0,0,0,0.08);
}

.btn-secondary[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
}

.actions-row > .btn-primary,
.actions-row > .btn-secondary {
    min-width: 110px;
}

/* =====================================================
   Copy Button
===================================================== */

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid var(--color-border-dark);
    background: var(--color-surface);

    cursor: pointer;
    position: relative;

    font-size: 0;
}

.btn-icon:hover {
    background: var(--color-surface-soft);
}

.btn-icon:active {
    transform: scale(0.95);
}

.btn-icon::before {
    content: attr(aria-label);

    position: absolute;

    bottom: calc(100% + 6px);
    left: 50%;

    transform: translateX(-50%);

    font-size: 11px;

    padding: 3px 6px;

    background: var(--color-surface);

    border: 1px solid var(--color-border);
    border-radius: 4px;

    max-width: 160px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    opacity: 0;
    pointer-events: none;

    transition: opacity .15s ease;
}

.btn-icon:hover::before {
    opacity: 1;
}

.btn-copy {
    width: 22px;
    min-width: 22px;
    height: 22px;

    border-radius: 5px;
}

.btn-copy::after {
    content: "💾";

    font-family:
        system-ui,
        -apple-system,
        "Segoe UI Emoji",
        sans-serif;

    font-size: 11px;

    transition: transform .15s ease;
}

.btn-copy:hover::after {
    transform: scale(1.15);
}

.btn-copy.copied {
    background: hsl(120 39% 92%);
    border-color: hsl(120 39% 54%);
}

.btn-copy.copied::after {
    content: "✅";
    animation: copyPop .25s ease;
}

@keyframes copyPop {

    0% {
        transform: scale(.7);
        opacity: .3;
    }

    70% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }

}

.result-row {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-top: 10px;
    padding: 6px 0;

    flex-wrap: wrap;
}

.result-code {
    padding: 6px 10px;

    background: #f4f4f4;
    border-radius: 6px;

    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.92em;
    font-weight: 600;

    letter-spacing: 0.02em;

    word-break: break-word;
    overflow-wrap: anywhere;
}

/* =====================================================
   Tables
   ===================================================== */

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 10px 12px;
	vertical-align: top;
    text-align: left;
}

th {
    background: var(--color-surface-soft);
    border-bottom: 2px solid var(--color-border);
    white-space: nowrap;
	font-weight: 600;
}

td {
    border-bottom: 1px solid var(--color-border-light);
}

tbody tr:hover {
    background: var(--color-surface-soft);
}

table a {
    font-weight: 600;
    color: var(--color-link);
}

table a:hover {
    color: var(--color-link-hover);
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;

    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;

    margin: 10px 0;
    position: relative;
}

.table-scroll::before,
.table-scroll::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 16px;
    pointer-events: none;
    z-index: 2;
}

.table-scroll::before {
    left: 0;
    background: linear-gradient(to right, var(--color-surface), transparent);
}

.table-scroll::after {
    right: 0;
    background: linear-gradient(to left, var(--color-surface), transparent);
}

.table-scroll:not(.is-scrollable)::before,
.table-scroll:not(.is-scrollable)::after {
    display: none;
}

.table-scroll > table {
    min-width: 100%;
    width: max-content;
    border-collapse: collapse;
}

/* =====================================================
   Users
   ===================================================== */

.user-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.user-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.user-heading .plan-icon {
    font-size: 1.05em;
    line-height: 1;
}

.user-name {
    line-height: 1.1;
}

.btn-user-edit {
    width: 32px;
    height: 32px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 32px;

    border-radius: 8px;
    border: 1px solid transparent;

    background: transparent;
    color: var(--color-text-soft);

    text-decoration: none;
    font-size: 0.9rem;

    transition:
        background .15s ease,
        border-color .15s ease,
        color .15s ease,
        transform .08s ease,
        box-shadow .12s ease;
}

.btn-user-edit:hover {
    background: var(--color-surface-soft);

    border-color: var(--color-border-light);
    color: var(--color-btn-primary);

    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.btn-user-edit:active {
    transform: scale(0.94);
}

/* =====================================================
   Portfolio
   ===================================================== */

.portfolio-parent {
    display: inline-flex;
    align-items: center;
    padding: 0.08rem 0.55rem;
    border-radius: 999px;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    color: var(--color-text-soft);
    font-size: 0.9rem;
    font-weight: 700;

    transition:
        background .15s ease,
        border-color .15s ease,
        color .15s ease;
}

.portfolio-parent:hover {
    background: var(--color-text);
    border-color: var(--color-text-soft);
    color: var(--color-text-inv);
}

.portfolio-category {
    margin-bottom: 0.15rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-soft);
}

.portfolio-project {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.15;
}

.portfolio-project a {
    color: var(--color-text-strong);
    transition: color .15s ease;
}

.portfolio-project a:hover {
    color: var(--color-link);
}

.portfolio-project + .portfolio-subtitle {
    margin-top: 0.15rem;
}

.portfolio-subtitle {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text-soft);
}

.card + .card {
    margin-top: 24px;
}


/* =====================================================
   Payments
===================================================== */

.payment-disabled {
    cursor: not-allowed;
}

.payment-disabled input {
    cursor: not-allowed;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dot-string {
    display: flex;
    align-items: center;
    gap: 6px;
}

.payment-status.badge {
    padding: 2px 6px;
    border-radius: 10px;
    background: rgba(0,0,0,0.12);
    font-size: 11px;
    margin-left: 4px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

/* =====================================================
   Project Specific
   ===================================================== */

.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.access-code {
    display: inline-block;
    background-color: #f0f4ff;
    color: #1a1a1a;
    font-weight: bold;
    padding: 0.3em 0.6em;
    border-radius: 6px;
    border: 1px solid #a0b4ff;
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
    margin-top: 0.5em;
}

/* =====================================================
   Console
   ===================================================== */

.actions-row > form {
    margin: 0;
}

.actions-row > * {
    min-width: 84px;
}

.actions-row .btn-console,
.actions-row .btn-code {
    height: 37px;
    min-width: 96px;
    padding: 0 14px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;

    border-radius: 10px;
    border: 1px solid var(--color-border);

    background: #fff;
    color: #111;
}

.actions-row .status-enabled {
    background: hsl(174, 65%, 92%);
    color: hsl(174, 80%, 22%);
    border-color: hsl(174, 50%, 60%);
}

.actions-row .status-disabled {
    background: hsl(2, 70%, 94%);
    color: hsl(2, 75%, 34%);
    border-color: hsl(2, 65%, 70%);
}

.actions-row .status-enabled:hover {
    background: hsl(174, 57%, 90%);
}

.actions-row .status-disabled:hover {
    background: hsl(2, 80%, 92%);
}

.btn-console {
    height: 37px;
    min-width: 96px;
    padding: 0 14px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 0.9rem;
    font-weight: 600;

    border-radius: 10px;
    border: 1px solid var(--color-border-dark);

    background: linear-gradient(
        to bottom,
        #ffffff,
        var(--color-surface-soft)
    );

    color: var(--color-text-strong);

    cursor: pointer;
    white-space: nowrap;

    box-shadow: 0 1px 0 rgba(0,0,0,0.04);

    transition:
        background .15s ease,
        border-color .15s ease,
        transform .08s ease,
        box-shadow .12s ease;
}

.btn-console:hover {
    background: linear-gradient(
        to bottom,
        #ffffff,
        var(--color-surface-soft)
    );
    border-color: var(--color-border-dark);

    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.btn-console:active {
    background: linear-gradient(
        to bottom,
        var(--color-surface-soft),
        #ffffff
    );
    transform: scale(0.96);

    box-shadow: inset 0 2px 4px rgba(0,0,0,0.08);
}

.btn-console:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-code {
    cursor: default;
}

.btn-code.is-empty {
    opacity: 0.6;
    font-family: inherit;
}

/* =====================================================
   Student Console
   ===================================================== */

.student-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.student-actions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

#btnSave {
    display: none;
}

.btn-console,
.btn-code {
	position: relative;
}

[data-tooltip]::after {

	content: attr(data-tooltip);

	position: absolute;

	left: 50%;
	bottom: calc(100% + 10px);

	transform: translateX(-50%);

	width: max-content;
	max-width: 260px;

	padding: 0.7rem 0.85rem;

	border-radius: 12px;

	background: rgba(15,15,15,0.96);
	color: #fff;

	font-size: 0.82rem;
	line-height: 1.45;

	text-align: center;

	opacity: 0;
	visibility: hidden;

	pointer-events: none;

	transition:
		opacity 0.18s ease,
		transform 0.18s ease;

	z-index: 9999;
}

[data-tooltip]::before {

	content: '';

	position: absolute;

	left: 50%;
	bottom: calc(100% + 4px);

	transform: translateX(-50%);

	border-width: 6px;
	border-style: solid;

	border-color:
		rgba(15,15,15,0.96)
		transparent
		transparent
		transparent;

	opacity: 0;
	visibility: hidden;

	transition: opacity 0.18s ease;

	z-index: 9998;
}

[data-tooltip]:hover::after,
[data-tooltip]:hover::before,
[data-tooltip]:focus-visible::after,
[data-tooltip]:focus-visible::before {

	opacity: 1;
	visibility: visible;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {

	transform:
		translateX(-50%)
		translateY(-2px);
}

/* =====================================================
   Accounts
   ===================================================== */
   
.plan-icon,
.status-badge {
    flex: 0 0 auto;
}

.is-disabled {
    opacity: 0.5;
}

.role-label {
    margin-left: 0.4rem;
    font-size: 0.85em;
    color: #666;
}

.status-muted {
    margin-left: 0.4rem;
    font-size: 0.8em;
    color: #999;
}

.role-icon.blocked {
    opacity: 0.6;
}

/* =====================================================
   Plan Panel
   ===================================================== */

.quiz-summary {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--color-text);
}

.quiz-summary strong {
    font-weight: 700;
}

.quiz-summary .label {
    font-weight: 400;
}

.quiz-summary .dot {
    opacity: 0.5;
}

.quiz-quota {
    font-size: 0.95rem;
    color: var(--color-text-soft);
}

.quiz-quota strong {
    color: var(--color-text);
    font-weight: 600;
}

.card.quiz-quota {
    transition:
        border-color .18s ease,
        background .18s ease,
        box-shadow .18s ease;
}

.card.quiz-quota h3 {
    margin-bottom: 10px;
}

.card.quiz-quota > p {
    color: var(--color-text-soft);
}

.card.quiz-quota .radio-group {
    margin-top: 18px;
}

.card.quiz-quota .actions {
    margin-top: 16px;
}

.card.quiz-quota.panel-g {
    background: linear-gradient(
        to bottom,
        hsl(174, 52%, 98%),
        hsl(174, 40%, 95%)
    );

    border-color: hsl(174, 42%, 72%);

    box-shadow:
        0 6px 20px rgba(0,0,0,0.05),
        0 1px 0 rgba(255,255,255,0.6) inset;
}

.card.quiz-quota.panel-g h3 {
    color: hsl(174, 78%, 20%);
}

.card.quiz-quota.panel-g .radio-option:hover {
    background: hsl(174, 52%, 92%);
}

.card.quiz-quota.panel-y {
    background: hsl(45, 100%, 97%);
    border-color: hsl(45, 72%, 76%);

    box-shadow:
        0 6px 20px rgba(0,0,0,0.05),
        0 1px 0 rgba(255,255,255,0.55) inset;
}

.card.quiz-quota.panel-y h3 {
    color: hsl(42, 82%, 24%);
}

.card.quiz-quota.panel-y .radio-option:hover {
    background: hsl(45, 100%, 93%);
}

.card.quiz-quota.panel-r {
    background: hsl(2, 100%, 98%);
    border-color: hsl(2, 72%, 82%);

    box-shadow:
        0 6px 20px rgba(0,0,0,0.05),
        0 1px 0 rgba(255,255,255,0.55) inset;
}

.card.quiz-quota.panel-r h3 {
    color: hsl(2, 72%, 28%);
}

.card.quiz-quota.panel-r .radio-option:hover {
    background: hsl(2, 100%, 94%);
}

/* =====================================================
   Results & Feedback
   ===================================================== */

.results-table tbody tr:nth-child(even) {
    background: var(--color-surface-soft);
}

.results-table tbody tr:hover {
    background: #eef5ff;
}

.feedback-table tr.is-correct {
    background: hsl(174, 100%, 95%);
}

.feedback-table tr.is-wrong {
    background: hsl(2, 100%, 96%);
}

.table-summary {
    margin-top: 10px;
    padding-top: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* =====================================================
   Feedback Table
   ===================================================== */

.feedback-table {
    table-layout: auto;
    width: 100%;
	font-size: 0.9rem;
}

/* # (small, fixed proportion) */
.feedback-table th:nth-child(1),
.feedback-table td:nth-child(1) {
    width: 60px;
    text-align: center;
}

/* Question (dominant column) */
.feedback-table th:nth-child(2),
.feedback-table td:nth-child(2) {
    width: 240px;
	max-width: 420px;
}

/* Answer + Correct (equal width, centered) */
.feedback-table th:nth-child(3),
.feedback-table td:nth-child(3),
.feedback-table th:nth-child(4),
.feedback-table td:nth-child(4) {
    width: 120px;
}

/* Result (compact) */
.feedback-table th:nth-child(5),
.feedback-table td:nth-child(5) {
    width: 60px;
    text-align: center;
}

/* Content handling */
.feedback-table td {
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Optional polish */
.feedback-table td:nth-child(3),
.feedback-table td:nth-child(4) {
    font-weight: 500;
}

.feedback-table td:nth-child(5) {
    font-size: 1.05rem;
}

/* =====================================================
   Questions
   ===================================================== */

fieldset {
    position: relative;
    margin-bottom: 26px;
    padding: 22px 18px 18px;
    border: 1px solid var(--color-border-light);
    border-radius: 12px;
}

fieldset label {
    margin: 6px 0;
}

.question-prompt {
    position: absolute;
    top: -0.8rem;
    left: 18px;
    right: 18px;
    padding: 0 8px;
    background: var(--color-bg, #fff);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #666;
    white-space: normal;
    line-height: 1.2;
}

.question-text {
    line-height: 1.35;
	font-weight: 400;
    margin-bottom: 0.65rem;
}

.question-blank {
    display: inline-block;
    width: 120px;
    height: 1em;
    margin: 0 6px;
    border-bottom: 1.4px solid currentColor;
    vertical-align: baseline;
}

.question-image {
    display: block;
    max-width: 100%;
    margin: 10px 0 14px;
    border-radius: 8px;
}

.mc-text {
    line-height: 1.3;
	font-weight: 400;
}

.radio-option input[type="radio"]:checked + .mc-text {
    font-weight: 600;
}

.quiz-timer {
    position: sticky;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;

    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    margin: 0 auto 1.4rem;
    padding: 8px 16px;

    background: #fff7cc;
    border: 2px solid #e0c200;
    border-radius: 999px;

    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;

    box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}

.quiz-timer strong {
    margin-top: 2px;

    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.quiz-timer.warning {
    background: #fff0f0;
    border-color: hsl(2, 100%, 38%);
    color: hsl(2, 100%, 28%);
    animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(196,7,7,0.15); }
    50%  { box-shadow: 0 0 0 6px rgba(196,7,7,0.08); }
    100% { box-shadow: 0 0 0 0 rgba(196,7,7,0.15); }
}

/* =====================================================
   Editor 
   ===================================================== */

.question-card {
    position: relative;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 14px;
    padding: 12px 14px;

    background: linear-gradient(
        to bottom,
        var(--color-surface-soft),
        var(--color-surface)
    );
    color: var(--color-text-strong);

    border: 1px solid var(--color-border);
    border-radius: 10px;
}

.question-header strong {
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    color: var(--color-text-strong);
}

.btn-small {
    width: 32px;
    height: 32px;
    min-width: 32px;

    padding: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 32px;

    border-radius: 6px;
    border: 1px solid var(--color-border);

    background: var(--color-surface);

    box-sizing: border-box;
    cursor: pointer;

    line-height: 1;
}

.btn-small span {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    font-size: 13px;
    line-height: 1;
}

.btn-small:hover {
    background: var(--color-surface-soft);
}

.btn-move {
    color: var(--color-btn-primary);
    border-color: hsl(174, 45%, 75%);
}

.btn-move:hover {
    background: hsl(174, 60%, 92%);
    border-color: var(--color-btn-primary);
}

.btn-delete {
    color: hsl(2, 69%, 39%);
    border-color: hsl(2, 45%, 80%);
}

.btn-delete:hover {
    background: hsl(2, 100%, 96%);
}

.question-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.answer-block {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--color-border-light);
}

.question-card:has(.btn-move:hover) {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.question-image.editor-preview {
    max-width: 100%;
    max-height: 260px;
    object-fit: contain;
    background: var(--color-surface-soft);
    padding: 6px;
    border: 1px solid var(--color-border-light);
}
