* {
    margin: 0;




















































</html></body>    </main>        </section>            <p>Notes: {{ anti_cheat.review.notes or 'none' }}</p>            <p>Current decision: <strong>{{ anti_cheat.review.decision or 'none' }}</strong></p>            <h2>Reviewer Decision</h2>        <section>        </section>            {% endif %}                <p>No anti-cheat events recorded yet.</p>            {% else %}                </ol>                    {% endfor %}                        </li>                            {% endif %}                                <pre>{{ row.metadata | tojson(indent=2) }}</pre>                            {% if row.metadata %}                            <code>{{ row.event_ts }}</code> - <strong>{{ row.event_type }}</strong>                        <li>                    {% for row in anti_cheat.timeline %}                <ol>            {% if anti_cheat.timeline %}            <h2>Timeline</h2>        <section>        </section>            <pre>{{ anti_cheat.summary.evidence_summary | tojson(indent=2) }}</pre>            <h3>Evidence</h3>            <pre>{{ anti_cheat.summary.metrics | tojson(indent=2) }}</pre>            <h2>Aggregate Metrics</h2>        <section>        </section>            <p>Flags: {{ anti_cheat.summary.flags|join(', ') if anti_cheat.summary.flags else 'none' }}</p>            <p>Risk level: <strong>{{ anti_cheat.summary.risk_level }}</strong></p>            <p>Risk score: <strong>{{ anti_cheat.summary.risk_score }}</strong></p>            <h2>Risk Summary</h2>        <section>        <p>Runtime Test: <code>{{ anti_cheat.runtime_test_id }}</code></p>        <h1>Anti-Cheat Review</h1>    <main class="content-area" style="padding: 1.5rem;"><body></head>    <link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}">    <title>Anti-Cheat Review</title>    <meta name="viewport" content="width=device-width, initial-scale=1.0">    <meta charset="UTF-8"><head>    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Welcome / login screen layout */
.welcome-body {
    background: linear-gradient(90deg, #0b4fd9 0%, #0b4fd9 50%, #f5f7fb 50%, #f5f7fb 100%);
    color:white
}

.welcome-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    height: 100vh;
}

.welcome-left {
    padding: 3rem 4rem;
    display: flex;
    flex-direction: column;
}

.welcome-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.welcome-logo-circle {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-logo-circle sl-icon {
    font-size: 1.4rem;
}

.welcome-logo-text {
    font-weight: 600;
    letter-spacing: 0.03em;
}

.welcome-logo-image {
    height: 32px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    display: block;
}

.welcome-copy {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.welcome-copy h1 {
    font-size: 2.4rem;
    margin-bottom: 1rem;
    color:white
}

.welcome-subtitle {
    max-width: 32rem;
    line-height: 1.5;
    opacity: 0.9;
    color:white;
}

.welcome-benefits {
    list-style: none;
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    max-width: 34rem;
}

.welcome-benefits li {
    display: flex;
    gap: 1rem;
}

.benefit-icon-circle {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.benefit-icon-circle sl-icon {
    font-size: 1.2rem;
}

.benefit-text h2 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.benefit-text p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.welcome-footer {
    margin-top: auto;
    font-size: 0.8rem;
    opacity: 0.75;
}

.welcome-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.welcome-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.15);
    padding: 2.25rem 2.5rem;
    max-width: 420px;
    width: 100%;
}

.welcome-card h2 {
    font-size: 1.35rem;
    margin-bottom: 0.4rem;
    color: #111827;
}

.welcome-card-subtitle {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

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

.welcome-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.field-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
}

.welcome-field input[type="email"],
.welcome-field input[type="text"] {
    border-radius: 999px;
    padding: 0.65rem 0.9rem;
    font-size: 0.9rem;
    outline: none;
}

.field-help {
    font-size: 0.75rem;
    color: #9ca3af;
}

.welcome-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: #4b5563;
    margin-top: 0.5rem;
}

.welcome-checkbox input[type="checkbox"] {
    margin-top: 0.18rem;
}

.welcome-primary-button {
    margin-top: 0.5rem;
    padding: 0.7rem 1rem;
    cursor: pointer;
    width: 100%;
}

.welcome-secondary-link {
    display: block;
    margin-top: 0.35rem;
    text-align: center;
    color: #64748b;
    font-size: 0.86rem;
    text-decoration: underline;
}

.welcome-inline-info {
    min-height: 1.25rem;
    margin: 0.5rem 0;
    color: #475569;
    font-size: 0.9rem;
}

.welcome-inline-error {
    min-height: 1.25rem;
    margin: 0.5rem 0;
    padding: 0.7rem;
    border-radius: 8px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 0.9rem;
}

.welcome-inline-error:empty {
    display: none;
}

.welcome-legal-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #9ca3af;
}

.welcome-legal-links a {
    color: inherit;
    text-decoration: none;
}

@media (max-width: 900px) {
    .welcome-body {
        background: linear-gradient(180deg, #0b4fd9 0%, #0b4fd9 45%, #f5f7fb 45%, #f5f7fb 100%);
    }

    .welcome-layout {
        grid-template-columns: 1fr;
    }

    .welcome-left {
        padding: 2.5rem 1.75rem;
    }

    .welcome-right {
        padding: 1.5rem;
    }

    .welcome-card {
        max-width: 100%;
    }
}

/* Character development page */
.character-body {
    background: #f3f4f6;
}

.character-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: #2c3e50;
    color: #ffffff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.character-header h1 {
    font-size: 1rem;
    color: #ffffff;
}

.character-back {
    font-size: 0.85rem;
    color: #6b7280;
    text-decoration: none;
}

.character-main {
    max-width: 1400px;
    margin: 1.5rem auto 2.5rem;
    padding: 0 2.5rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 1.5rem;
}

.character-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 1.4rem 1.5rem 1.6rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.profile-card {
    padding: 2rem 1.5rem;
    text-align: center;
}

.profile-header {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    margin-bottom: 1rem;
}

.profile-avatar-wrapper {
    margin: 0 auto 1rem;
}

.character-avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 999px;
    background: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    margin: 0 auto 1rem;
}

.character-avatar-circle sl-icon {
    font-size: 2rem;
}

.character-name {
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.character-role-pill {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: #dcfce7;
    color: #15803d;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.character-description {
    text-align: center;
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.character-meta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.85rem;
    text-align: left;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.meta-label {
    color: #6b7280;
    font-size: 0.8rem;
}

.meta-value {
    font-weight: 600;
    color: #111827;
}

.meta-progress {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.4rem;
}

.xp-bar-track {
    height: 6px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.xp-bar-fill {
    height: 100%;
    background: #111827;
}

.achievements-card {
    margin-top: 1.2rem;
}

.achievement-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.achievement {
    display: flex;
    gap: 0.7rem;
    padding: 0.5rem 0.6rem;
    border-radius: 12px;
    background: #f9fafb;
}

.achievement.active {
    background: #eff6ff;
}

.achievement-icon {
    font-size: 1.1rem;
}

.achievement-title {
    font-size: 0.9rem;
    font-weight: 500;
}

.achievement-subtitle {
    font-size: 0.8rem;
    color: #6b7280;
}

.character-right .character-card + .character-card {
    margin-top: 1rem;
}

.character-right .character-card h2 {
    margin-bottom: 0.75rem;
}

/* Anti-cheat overlays are visual-only and must not block editor interactions. */
#anti-cheat-watermark-layer {
    position: fixed;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    padding: 2rem;
    overflow: hidden;
}

.anti-cheat-watermark-item {
    color: rgba(11, 79, 217, 0.18);
    font-size: 12px;
    letter-spacing: 0.04em;
    transform: rotate(-17deg);
    white-space: nowrap;
    user-select: none;
}

.anti-cheat-warning-banner {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 20;
    background: #fff4cc;
    color: #5b3a00;
    border: 1px solid #f0cc7a;
    border-radius: 10px;
    padding: 0.55rem 0.8rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    font-size: 0.86rem;
    max-width: 24rem;
}

.character-right .skill-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1fr auto;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    margin-top: 0.4rem;
}

.skill-label span {
    display: block;
    font-size: 0.75rem;
    color: #9ca3af;
}

.skill-track {
    height: 6px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    background: #2563eb;
}

.skill-value {
    font-size: 0.8rem;
    color: #6b7280;
}

.archetype-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: #f3f4f6;
    color: #6b7280;
}

.archetype-intro {
    font-size: large;
    color: #6b7280;
    margin-top: 2rem;
}

.choose-archetype__header {
    display: block;
    margin-bottom: 2rem;
}

.choose-archetype__sidebar {
    margin-bottom: 1.5rem;
}

.choose-archetype__sidebar h2 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.choose-archetype__sidebar p {
    margin-bottom: 0.75rem;
}

.choose-archetype__sidebar .archetype-badge {
    display: inline-flex;
}

.archetype-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.archetype-card {
    background-color: transparent;
    border-radius: 14px;
    padding: 0.8rem 0.9rem;
    display: flex;
    gap: 0.7rem;
    text-align: left;
    cursor: pointer;
}

.archetype-card:hover {
    background: #f9fafb;
}

.archetype-card.selected {
    box-shadow: 0 0 0 2px #2563eb;
    background-color: #eff6ff;
}
.archetype-icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 18px;
    background: hwb(0 89% 9%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d4ed8;
    flex-shrink: 0;
}

.archetype-icon-circle sl-icon {
    font-size: 1.25rem;
}

.archetype-card.selected .archetype-icon-circle{
    background-color: green;
    color: white;
}

.archetype-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #111827;
}

.archetype-subtitle {
    font-size: 0.8rem;
    color: #111827;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin-left: 2.7rem; /* align with text under icon */
    line-height: 1.5;
}

/* Make the button's clickable area a vertical stack: 
   [ icon + title ] on first row, subtitle underneath */
sl-button.archetype-card::part(base) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

/* First inner <div> = icon + title row */
.archetype-card > div:first-child {
  display: flex;
  align-items: center;
  gap: 0.5rem;      /* space between icon and title */
}

/* Subtitle block underneath */
.archetype-text {
  margin-top: 0.25rem;
}







.character-primary-wide {
    margin-top: 0.5rem;
    width: auto;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.choose-archetype__actions {
    display: flex;
    justify-content: flex-end;
}

.save-archetype-button {
    padding: 0.75rem 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.character-stats-footer {
    margin-top: 1rem;
    display: flex;
    gap: 0.75rem;
}

.stat-pill {
    flex: 1;
    background: #f9fafb;
    border-radius: 14px;
    padding: 0.6rem 0.7rem;
    text-align: center;
}

.stat-value {
    display: block;
    font-weight: 600;
}

.stat-label {
    font-size: 0.75rem;
    color: #6b7280;
}

.character-metrics-row {
    margin-top: 1.2rem;
    display: flex;
    gap: 0.85rem;
}

.metric-pill {
    flex: 1;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    padding: 0.7rem 0.8rem;
    text-align: center;
}

.metric-value {
    display: block;
    font-weight: 600;
    font-size: 1.05rem;
}

.metric-label {
    font-size: 0.75rem;
    color: #6b7280;
}

@media (max-width: 900px) {
    .character-main {
        grid-template-columns: 1fr;
        padding: 0 1.25rem;
    }

    .character-metrics-row {
        flex-direction: column;
    }

    .character-primary-wide {
        width: 100%;
    }
}

/* Assessment complete screen */
.complete-body {
    background-color: #f3f4f6;
}

.complete-hero {
    background: linear-gradient(135deg, #2563eb, #1e3a8a);
    color: #ffffff;
    padding: 0.375rem 2.5rem 2.75rem;
}

.complete-hero-inner {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}


.complete-hero h1 {
    font-size: 2.1rem;
    margin-bottom: 0.5rem;
    text-align: center;
    margin-left: 30%;
    margin-top: 2.5rem;
}

.complete-hero p {
    font-size: 0.98rem;
    opacity: 0.9;
}

.complete-metrics {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.metric-card {
    background: rgba(15, 23, 42, 0.25);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    min-width: 150px;
}

.metric-value {
    font-size: 1.35rem;
    font-weight: 600;
}

.metric-label {
    font-size: 0.8rem;
    opacity: 0.85;
}

.complete-main {
    max-width: 1400px;
    margin: -1.5rem auto 2.5rem;
    padding: 0 2.5rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 1.5rem;
}

.card {
    background: #ffffff;
    padding: 1.4rem 1.5rem 1.6rem;
    border-radius: 4px;
}

.card-header-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.card-title-icon {
    font-size: 1rem;
}

.skill-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.skill-bar-track {
    height: 6px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
}

.skill-bar-secure {
    background: #22c55e;
}

.skill-bar-arch {
    background: #3b82f6;
}

.skill-bar-debug {
    background: #a855f7;
}

.skill-bar-perf {
    background: #f97316;
}

.skill-percent {
    font-size: 0.8rem;
    color: #6b7280;
}

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

.primary-wide,
.secondary-wide {
    width: 100%;
    margin: .6rem .4rem;
    margin-top: 0.5rem;
    border:none;
}


.breakdown-card {
    margin-top: 1rem;
}

.breakdown-summary {
    margin-top: 0.6rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
    color: #334155;
}

.breakdown-summary p {
    margin: 0;
}

.breakdown-summary p + p {
    margin-top: 0.25rem;
}

.breakdown-failed-card {
    margin-top: 0.65rem;
    border-radius: 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    padding: 0.6rem 0.75rem;
}

.breakdown-failed-card h3 {
    margin: 0;
    font-size: 0.9rem;
    color: #9a3412;
}

.breakdown-failed-list {
    margin: 0.4rem 0 0;
    padding-left: 1.1rem;
    color: #7c2d12;
    font-size: 0.85rem;
}

.breakdown-failed-list li + li {
    margin-top: 0.2rem;
}

.breakdown-item {
    margin-top: 0.9rem;
}

.breakdown-header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
}

.breakdown-title-row {
    display: flex;
    gap: 0.6rem;
}

.breakdown-icon {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.breakdown-icon.success {
    background: #dcfce7;
    color: #15803d;
}

.breakdown-icon.warning {
    background: #fef9c3;
    color: #92400e;
}

.breakdown-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.15rem;
}

.breakdown-score {
    font-size: 0.8rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
}

.breakdown-score.success {
    background: #dcfce7;
    color: #15803d;
}

.breakdown-score.warning {
    background: #fef9c3;
    color: #92400e;
}

.breakdown-bar-track {
    margin-top: 0.4rem;
    height: 5px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.breakdown-bar-fill {
    height: 100%;
    background: #111827;
}

.breakdown-bar-fill.success {
    background: #22c55e;
}

.breakdown-bar-fill.warning {
    background: #f97316;
}

.suggested-card {
    margin-top: 1rem;
}

.suggested-list {
    margin-top: 0.5rem;
    padding-left: 1.2rem;
    font-size: 0.9rem;
    color: #4b5563;
}

.suggested-list li {
    margin-bottom: 0.3rem;
}

.summary-footer {
    margin-top: 1rem;
}

.back-dashboard-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.45rem 1.1rem;
}

@media (max-width: 900px) {
    .complete-metrics {
        flex-direction: column;
        align-items: center;
    }

    .complete-main {
        grid-template-columns: 1fr;
        padding: 0 1.25rem;
    }
}

/* Persona selection screen */
.persona-body {
    background-color: #f3f4f6;
}

.persona-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #2c3e50;
    color: #ffffff;
    padding: 1.2rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.persona-header-left h1 {
    font-size: 1.4rem;
    margin-bottom: 0.15rem;
}

.persona-header-left p {
    font-size: 0.9rem;
    color: #cbd5e1;
}

.persona-secondary-button {
    padding: 0.45rem 0.95rem;

}

.persona-main {
    padding: 1.75rem 2.5rem 2.5rem;
}

.persona-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.persona-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    cursor: pointer;
}

.persona-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.persona-card-image {
    height: 160px;
    background-size: cover;
    background-position: center;
}

.persona-image-memory {
    background-image: linear-gradient(120deg, #111827, #ef4444);
}

.persona-image-crypto {
    background-image: linear-gradient(120deg, #111827, #8b5cf6);
}

.persona-image-generic {
    background-image: linear-gradient(120deg, #111827, #0ea5e9);
}

.persona-card-content {
    padding: 1.25rem 1.4rem 1.4rem;
}

.persona-card-title-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.persona-card-title-row h2 {
    font-size: 1.05rem;
}

.persona-icon-chip {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.persona-icon-chip-purple {
    background: #8b5cf6;
}

.persona-icon-chip-gold {
    background: #f59e0b;
}

.persona-icon-chip-teal {
    background: #14b8a6;
}

.persona-domain-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    background: #e5e7eb;
    color: #374151;
    margin-top: 0.15rem;
}

.persona-domain-pill-purple {
    background: #ede9fe;
    color: #5b21b6;
}

.persona-domain-pill-gold {
    background: #fffbeb;
    color: #92400e;
}

.persona-domain-pill-teal {
    background: #ecfeff;
    color: #115e59;
}

.persona-responsibilities {
    margin-top: 1.2rem;
}

.persona-focus h3,
.persona-responsibilities h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin-bottom: 0.3rem;
}

.persona-focus p {
    font-size: 0.9rem;
    color: #4b5563;
}

.persona-responsibilities ul {
    margin-top: 0.2rem;
    padding-left: 1rem;
    font-size: 0.9rem;
    color: #4b5563;
}

.persona-card input[type="radio"]:focus-visible + .persona-card-image,
.persona-card:focus-within {
    outline: none;
}

.persona-card input[type="radio"]:checked ~ .persona-card-content,
.persona-card input[type="radio"]:checked ~ .persona-card-content::before,
.persona-card input[type="radio"]:checked ~ .persona-card-content .persona-responsibilities,
.persona-card input[type="radio"]:checked ~ .persona-card-content .persona-responsibilities h3,
.persona-card input[type="radio"]:checked ~ .persona-card-content .persona-responsibilities p,
.persona-card input[type="radio"]:checked ~ .persona-card-content .persona-responsibilities ul,
.persona-card input[type="radio"]:checked ~ .persona-card-content .persona-responsibilities li,
.persona-card input[type="radio"]:checked ~ .persona-card-content .persona-focus,
.persona-card input[type="radio"]:checked ~ .persona-card-content .persona-focus h3,
.persona-card input[type="radio"]:checked ~ .persona-card-content .persona-focus p  {
    content: "";
    inset: 0;
    pointer-events: none;
    background-color: #6b7280;
    color: white
}

.persona-card-disabled {
    opacity: 0.6;
    cursor: default;
}

.persona-footer {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.persona-footer p {
    font-size: 0.9rem;
    color: #6b7280;
}

.persona-primary-button {
    padding: 0.6rem 1.4rem;
    font-size: 0.9rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .persona-header {
        padding: 1rem 1.25rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .persona-main {
        padding: 1.25rem 1.25rem 1.75rem;
    }

    .persona-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .persona-primary-button {
        width: 100%;
        text-align: center;
    }
}

/* Assessment dashboard */
.dashboard-body {
    background-color: #f9fafb;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 2.5rem;
    background: #2c3e50;
    color: #ffffff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.dashboard-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.dashboard-logo-circle {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.dashboard-logo-image {
    height: 36px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    display: block;
}

.dashboard-brand-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.dashboard-brand-subtitle {
    font-size: 0.8rem;
    color: #cbd5e1;
}

.dashboard-progress {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.assessment-header-controls {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.assessment-header-actions {
    display: flex;
    gap: 0.75rem;
}

.progress-label {
    font-size: 0.75rem;
    color: #cbd5e1;
}

.progress-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-bar-track {
    width: 160px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: #93c5fd;
}

.progress-caption {
    font-size: 0.75rem;
    color: #cbd5e1;
}

.dashboard-user {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.user-email {
    font-size: 0.8rem;
    color: #cbd5e1;
}

.user-avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    object-fit: cover;
    display: block;
}

.dashboard-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 1.5rem;
    padding: 1.5rem 2.5rem 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
    min-width: 1400px;
}

.dashboard-left {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

html:has(body.admin-body) {
    scrollbar-gutter: stable;
}

.admin-body {
    min-height: 100vh;
}

.admin-main {
    grid-template-columns: minmax(250px, 290px) minmax(0, 1fr);
    align-items: start;
    min-width: 1720px;
}

body.admin-terms-editor-wide .dashboard-main {
    max-width: 1720px;
    min-width: 1720px;
}

.admin-sidebar-column,
.admin-content-column {
    min-width: 0;
}

.admin-sidebar-card {
    position: sticky;
    top: 5.75rem;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    background: #f3f4f6;
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.admin-nav-link:hover,
.admin-nav-link:focus-visible {
    background: #dbeafe;
    color: #0b4fd9;
    transform: translateX(2px);
}

.admin-nav-link.is-active {
    background: #ff5630;
    color: #ffffff;
}

.admin-nav-link-secondary {
    margin-left: 0.9rem;
    min-height: 40px;
    font-size: 0.92rem;
}

.admin-header-progress {
    min-width: 260px;
}

.admin-progress-caption {
    max-width: 34ch;
}

.admin-hero-card,
.admin-section-card,
.admin-form-card {
    align-items: flex-start;
}

.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.admin-kpi-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 1rem;
}

.admin-body-copy {
    color: #4b5563;
    font-size: 0.92rem;
    line-height: 1.5;
}

.admin-inline-link {
    width: fit-content;
    margin-top: 0.9rem;
    background: #2c3e50;
    border-color: #2c3e50;
    cursor: pointer;
}

.admin-inline-link:hover,
.admin-inline-link:focus-visible {
    background-color: #1f3347;
    border-color: #1f3347;
    color: #ffffff;
}

.admin-form-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.admin-field {
    display: grid;
    gap: 0.45rem;
    color: #1f2937;
    font-weight: 600;
}

.admin-field-full {
    grid-column: 1 / -1;
}

.admin-field input,
.admin-field textarea,
.admin-field select,
.admin-filter-bar input,
.admin-filter-bar select {
    width: 100%;
    min-height: 44px;
    padding: 0.7rem 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #ffffff;
    color: #111827;
    font: inherit;
}

.admin-field textarea {
    min-height: 88px;
    resize: vertical;
}

.admin-field-file input {
    padding: 0.55rem 0.7rem;
}

.admin-form-actions {
    display: flex;
    justify-content: flex-start;
}

.admin-primary-button {
    min-height: 44px;
    padding: 0.75rem 1rem;
    border: 0;
    border-radius: 12px;
    background: #0b4fd9;
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.admin-primary-button:hover,
.admin-primary-button:focus-visible {
    background: #0a43b6;
}

.admin-primary-button.is-loading,
.admin-inline-link.is-loading {
    position: relative;
    color: transparent;
    pointer-events: none;
    cursor: not-allowed;
}

.admin-primary-button.is-loading::after,
.admin-inline-link.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: admin-btn-spin 0.7s linear infinite;
}

@keyframes admin-btn-spin {
    to { transform: rotate(360deg); }
}

.admin-danger-button {
    background: #b42318;
}

.admin-danger-button:hover,
.admin-danger-button:focus-visible {
    background: #912018;
}

.admin-result-panel,
.admin-json-panel {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #1f2937;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
}

.admin-result-panel.is-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.admin-flash-card {
    margin-bottom: 1rem;
}

.admin-flash-message {
    margin: 0;
    color: #065f46;
    font-weight: 600;
}

.admin-flash-message + .admin-flash-message {
    margin-top: 0.35rem;
}

.admin-flash-message.is-error {
    color: #991b1b;
}

.admin-category-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.admin-category-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    padding: 0.85rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
}

.admin-category-meta p {
    margin: 0.15rem 0;
    color: #111827;
    font-weight: 600;
}

.admin-category-meta small {
    color: #4b5563;
}

.admin-inline-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-inline-form input {
    min-height: 40px;
    min-width: 220px;
    padding: 0.5rem 0.65rem;
    border: 1px solid #d1d5db;
    border-radius: 10px;
}

.admin-protected-pill {
    align-self: center;
    justify-self: end;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.82rem;
    font-weight: 700;
}

.admin-bullet-list {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
    color: #374151;
}

.admin-membership-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.admin-filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) minmax(140px, 1fr) minmax(140px, 1fr) auto;
    gap: 0.75rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.admin-table-shell {
    overflow-x: auto;
}

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

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 0.9rem 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.admin-table th {
    color: #4b5563;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-table-link {
    color: #0b4fd9;
    font-weight: 600;
    text-decoration: none;
}

.admin-table-link:hover,
.admin-table-link:focus-visible {
    text-decoration: underline;
}

.admin-tests-toggle {
    min-height: 38px;
    padding: 0.45rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #ffffff;
    color: #1f2937;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.admin-tests-toggle:hover,
.admin-tests-toggle:focus-visible {
    border-color: #0b4fd9;
    color: #0b4fd9;
}

.admin-tests-panel {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.6rem;
}

.admin-tests-panel.is-hidden {
    display: none;
}

.admin-test-item {
    display: grid;
    gap: 0.25rem;
    padding: 0.6rem 0.7rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.admin-test-item-title {
    color: #111827;
    font-weight: 700;
}

.admin-test-item-meta {
    color: #4b5563;
    font-size: 0.84rem;
    line-height: 1.4;
}

.admin-timeline {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.admin-timeline-item {
    align-items: flex-start;
}

.admin-nested-card {
    margin-top: 1rem;
    box-shadow: none;
    border: 1px solid #e5e7eb;
}

.assessment-category-group {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    background: #ffffff;
    border-radius: 18px;
    padding: 0.3rem 0.3rem 0.85rem;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
    min-width: 0;
}

.assessment-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    list-style: none;
    cursor: pointer;
    padding: 0.9rem 1rem 0.5rem;
}

.assessment-category-header::-webkit-details-marker {
    display: none;
}

.assessment-category-header::after {
    content: ">";
    font-size: 1rem;
    font-weight: 700;
    color: #0b4fd9;
    transform: rotate(90deg);
    transition: transform 0.18s ease;
}

.assessment-category-group:not([open]) .assessment-category-header::after {
    transform: rotate(0deg);
}

.assessment-category-header h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #0b4fd9;
}

.assessment-category-header p {
    margin: 0.2rem 0 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.assessment-category-summary {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1f2937;
    background: #f3f4f6;
    border-radius: 999px;
    padding: 0.3rem 0.65rem;
    white-space: nowrap;
}

.assessment-category-summary-list {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-left: auto;
    margin-right: 0.35rem;
    flex-wrap: wrap;
}

.assessment-category-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 0.7rem;
    min-width: 0;
}

.assessment-subcategory-block {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.assessment-subcategory-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
    padding: 0.1rem 0.1rem 0.75rem;
}

.assessment-subcategory-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    list-style: none;
    cursor: pointer;
    padding: 0.75rem 0.8rem 0.5rem;
}

.assessment-subcategory-header::-webkit-details-marker {
    display: none;
}

.assessment-subcategory-header::after {
    content: ">";
    font-size: 0.95rem;
    font-weight: 700;
    color: #1d4ed8;
    transform: rotate(90deg);
    transition: transform 0.16s ease;
}

.assessment-subcategory-group:not([open]) .assessment-subcategory-header::after {
    transform: rotate(0deg);
}

.assessment-subcategory-summary {
    font-size: 0.76rem;
    font-weight: 600;
    color: #1f2937;
    background: #f3f4f6;
    border-radius: 999px;
    padding: 0.22rem 0.55rem;
    white-space: nowrap;
    margin-left: auto;
    margin-right: 0.35rem;
}

.assessment-subcategory-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0 0.6rem;
}

.assessment-subcategory-title {
    margin: 0.2rem 0 0;
    color: #1f2937;
    font-size: 0.96rem;
    font-weight: 700;
}

.admin-user-filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: end;
}

.admin-user-directory-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-top: 1rem;
}

.admin-user-directory-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #d7deea;
    border-radius: 16px;
    background: #f8fafc;
}

.admin-user-directory-meta {
    min-width: 20rem;
}

.admin-user-directory-meta p {
    margin: 0.35rem 0 0;
    color: #64748b;
}

.admin-user-directory-groups {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.45rem;
}

.admin-user-group-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem;
}

.admin-user-group-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.5rem 0.3rem 0.7rem;
    border-radius: 999px;
    background: #e6eefc;
    color: #1d4ed8;
    font-size: 0.88rem;
    font-weight: 600;
}

.admin-chip-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #1d4ed8;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0 0.1rem;
    opacity: 0.6;
}

.admin-chip-remove-btn:hover {
    opacity: 1;
}

.admin-user-directory-empty {
    color: #64748b;
    font-size: 0.9rem;
}

.admin-group-add-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.admin-group-add-select {
    height: 38px;
    padding: 0 0.65rem;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 0.9rem;
    background: #fff;
    min-width: 160px;
    max-width: 220px;
}

.admin-group-add-form .admin-primary-button {
    white-space: nowrap;
    flex-shrink: 0;
}

.admin-category-subsections {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.admin-category-subsections h3 {
    margin: 0;
    font-size: 0.95rem;
    color: #1f2937;
}

.admin-subcategory-row {
    min-height: 32px;
    padding: 0.45rem 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
}

.admin-subcategory-row .admin-danger-button {
    border-radius: 10px;
    font-size: 0.9rem;
    padding: 0rem 0.35rem;
}

.admin-inline-form-wrap {
    flex-wrap: wrap;
}

@media (max-width: 720px) {
    .admin-user-directory-item {
        flex-direction: column;
    }

    .admin-user-directory-groups {
        justify-content: flex-start;
    }
}

.start-test-warning {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(107, 114, 128, 0.36);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.start-test-warning[hidden] {
    display: none !important;
}

.start-test-warning-card {
    width: min(94vw, 820px);
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fdba74;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(124, 45, 18, 0.18);
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.9rem;
    font-size: 0.92rem;
}

.start-test-warning-text {
    flex: 1 1 auto;
}

.start-test-warning-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 0.7rem;
}

#start-test-warning-countdown {
    font-weight: 700;
    white-space: nowrap;
}

#start-test-warning-cancel {
    min-width: 9.5rem;
}

#start-test-warning-cancel::part(base) {
    font-weight: 700;
}

.section-title {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.assessment-card {
    background: #e4e2e2;
    border-radius: 16px;
    padding: 1rem 1.25rem;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
    border: 1px solid transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.assessment-card:hover {
    background: #2564eb28;
}

.card-state-not-started {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.card-state-not-started:hover {
    background: #e5e7eb;
}

.card-state-in-progress {
    background: #dbeafe;
    border-color: #93c5fd;
}

.card-state-in-progress:hover {
    background: #bfdbfe;
}

.card-state-completed-passed {
    background: #dcfce7;
    border-color: #86efac;
}

.card-state-completed-passed:hover {
    background: #bbf7d0;
}

.card-state-completed-failed {
    background: #fee2e2;
    border-color: #fca5a5;
}

.card-state-completed-failed:hover {
    background: #fecaca;
}

.assessment-main {
    display: flex;
    gap: 0.8rem;
}

.assessment-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    margin-top: 0.4rem;
    background: #799de44d;
    cursor: pointer;
    transition: background 0.2s ease;
}

.assessment-status-dot-active {
    background: #2563eb;
}

.assessment-status-dot[data-status="created"] {
    background: #d1d5db;
}

.assessment-status-dot[data-status="in_progress"] {
    background: #2563eb;
}

.assessment-status-dot[data-status="checked"] {
    background: #f59e0b;
}

.assessment-status-dot[data-status="submitted"] {
    background: #60a5fa;
}

.assessment-status-dot[data-status="completed"] {
    background: #10b981;
}

.assessment-description {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 0.15rem;
}

.assessment-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.tag {
    font-size: 0.75rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
}

.tag-domain {
    background: #eff6ff;
    color: #1d4ed8;
}

.tag-level {
    background: #fee2e2;
    color: #b91c1c;
}

.tag-level-easy {
    background: #dcfce7;
    color: #166534;
}

.tag-level-medium {
    background: #fef3c7;
    color: #92400e;
}

.tag-level-hard {
    background: #fee2e2;
    color: #b91c1c;
}

.tag-time {
    background: #f3f4f6;
    color: #4b5563;
}

.assessment-primary-button,
.assessment-secondary-button {
    padding: 0.45rem 0.9rem;
    cursor: pointer;
}

.assessment-start-lock {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.assessment-start-lock::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    height: 0.65rem;
}

.assessment-start-lock .assessment-primary-button {
    cursor: not-allowed;
}

.assessment-start-lock-tooltip {
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 240px;
    max-width: 320px;
    display: none;
    z-index: 30;
    background: #111827;
    color: #f9fafb;
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.35);
    font-size: 0.8rem;
    line-height: 1.4;
    margin-top: 0.55rem;
}

.assessment-start-lock-tooltip::before {
    content: "";
    position: absolute;
    right: 0.95rem;
    top: -6px;
    width: 12px;
    height: 12px;
    background: #111827;
    transform: rotate(45deg);
}

.assessment-start-lock-link {
    display: inline-block;
    margin-top: 0.3rem;
    color: #93c5fd;
    text-decoration: underline;
    font-weight: 600;
}

.assessment-start-lock-link:hover,
.assessment-start-lock-link:focus-visible {
    color: #dbeafe;
}

.assessment-start-lock:hover .assessment-start-lock-tooltip,
.assessment-start-lock:focus-within .assessment-start-lock-tooltip {
    display: block;
}

.assessment-progress-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.7rem;
    font-size: 0.8rem;
}

.assessment-progress-track {
    flex: 1;
    height: 5px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.assessment-progress-fill {
    height: 100%;
    background: #111827;
}

.assessment-progress-percent {
    font-size: 0.75rem;
    color: #6b7280;
}

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

.details-card,
.stats-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.1rem 1.25rem 1.3rem;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.details-card h2,
.stats-card h2 {
    font-size: 1rem;
    margin-bottom: 0.7rem;
}

.details-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    font-size: 0.85rem;
}

.details-list dt {
    font-weight: 500;
    color: #4b5563;
}

.details-list dd {
    margin: 0;
    color: #6b7280;
}

.details-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #9ca3af;
    margin-right: 0.35rem;
}

.full-width {
    width: 100%;
    margin-top: 0.9rem;
}

.stats-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.stats-list li {
    display: flex;
    justify-content: space-between;
    color: #4b5563;
}

.execution-diagnostics-list li {
    align-items: flex-start;
}

.execution-diagnostics-list .diagnostic-value {
    white-space: pre-wrap;
    word-break: break-word;
    text-align: right;
    max-width: 65ch;
}

@media (max-width: 900px) {
    .dashboard-main {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .dashboard-user {
        align-self: stretch;
        justify-content: space-between;
        width: 100%;
    }

    .admin-kpi-grid,
    .admin-filter-bar {
        grid-template-columns: 1fr;
    }

    .admin-sidebar-card {
        position: static;
    }
}

header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.dashboard-header-link:not(.admin-inline-link):hover,
.dashboard-header-link:not(.admin-inline-link):focus-visible {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.6);
}

.system-health-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(248, 113, 113, 0.9);
    background: rgba(127, 29, 29, 0.92);
    color: #fee2e2;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.assessment-header-logo {
    height: 36px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

h1 {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timer-container {
    display: flex;
    align-items: center;
}

#timer-badge {
    font-size: 1.25rem;
}

#timer-badge::part(base) {
    padding: 0.75rem 1rem;
}

#timer-badge.timer-warning-5m::part(base) {
    background: #fef3c7;
    color: #92400e;
    border-color: #f59e0b;
}

#timer-badge.timer-warning-1m::part(base) {
    background: #fee2e2;
    color: #991b1b;
    border-color: #ef4444;
}

#timer-badge.timer-expired::part(base) {
    background: #fee2e2;
    color: #7f1d1d;
    border-color: #dc2626;
}

.actions {
    display: flex;
    gap: 1rem;
}

a {
    color: inherit;
}

sl-button {
    font-weight: 900;
    font-size: inherit;
    border-radius: 14px;
    background-color: #111827;
    padding: 1rem 1.5rem;
}

sl-button::part(base) {
    border: none;
    color:white;
}

sl-button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

sl-button[disabled]:hover{
    background-color: #111827;
}

sl-button:hover {
    background-color: #0704c2;
    transform: translateX(-2px);
}

.assessment-body main {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.content-area {
    max-width: 1400px;
    margin: 0 auto;
}

#results {
    margin-bottom: 1rem;
}

.problem-section {
    margin-bottom: 1.5rem;
}

.problem-section h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.problem-description {
    line-height: 1.6;
    color: #34495e;
    margin-bottom: 1rem;
}

.problem-metadata {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #e8f4f8;
    color: #2c5282;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #b3dfe0;
    align-items: center;
    gap: 0.5rem;
}

.badge sl-icon {
    font-size: 1rem;
    vertical-align: middle;
    margin-right: 0.25rem;
}

.badge-difficulty-easy {
    background-color: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.badge-difficulty-medium {
    background-color: #fef3c7;
    border-color: #fcd34d;
    color: #92400e;
}

.badge-difficulty-hard {
    background-color: #fee2e2;
    border-color: #fca5a5;
    color: #b91c1c;
}

.editor-container {
    border-radius: 4px;
    overflow: hidden;
}

#editor {
    height: 500px;
    width: 100%;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: stretch;
    }

    .header-left {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .actions {
        width: 100%;
    }

    .assessment-header-controls {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .actions sl-button {
        flex: 1;
    }

    #editor {
        height: 400px;
    }
}

.content-area {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.split-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    height: calc(100vh - 400px);
    min-height: 600px;
}

.editor-panel,
.results-panel {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.editor-panel > h3,
.results-panel h3 {
    padding: 1rem;
    margin: 0;
    background-color: #f8f9fa;
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
}

.editor-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    min-height: 64px;
    box-sizing: border-box;
    background-color: #f8f9fa;
}

.results-panel h3 {
    min-height: 64px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.editor-panel-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
}

#check-button {
    padding: 0;
    background-color: transparent;
    height: auto;
}

#check-button::part(base) {
    height: auto;
    min-height: 0;
    padding: 0.38rem 0.78rem;
    border: 1px solid #334155;
    border-radius: 8px;
    background: #0f172a;
    color: #e2e8f0;
    font-weight: 700;
    letter-spacing: 0.01em;
    font-size: 0.84rem;
}

#check-button:hover::part(base) {
    background: #1e293b;
    border-color: #475569;
}

#check-button::part(prefix) {
    color: #22c55e;
}

.editor-container {
    flex: 1;
    border-radius: 0;
}

#editor {
    height: 100%;
    width: 100%;
}

.results-panel {
    position: relative;
    overflow-y: auto;
}

#results {
    padding: 1rem;
    flex: 1;
}

.check-results-loading {
    position: absolute;
    top: 3.5rem;
    right: 0;
    bottom: 0;
    left: 0;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.88);
    z-index: 3;
}

.check-results-loading.htmx-request {
    display: flex;
}

.check-results-loading p {
    margin: 0;
    font-size: 0.95rem;
    color: #2c3e50;
    font-weight: 600;
}

.check-results-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #d5dde8;
    border-top-color: #1f4f82;
    border-radius: 50%;
    animation: check-results-spin 0.8s linear infinite;
}

@keyframes check-results-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #7f8c8d;
    text-align: center;
}

.terms-page-body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #f7fbff 0%, #eef4fb 100%);
    color: #0f172a;
    font-family: "Inter", "Segoe UI", sans-serif;
}

.terms-page-shell {
    max-width: 940px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

.terms-page-card {
    background: #ffffff;
    border: 1px solid #dbe6f2;
    border-radius: 14px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
    padding: 1.25rem 1.5rem;
}

.terms-page-content {
    margin: 1rem 0 0;
    white-space: pre-wrap;
    line-height: 1.55;
    font: 500 0.95rem/1.55 "Inter", "Segoe UI", sans-serif;
    color: #1e293b;
}

.terms-page-links {
    margin-top: 1rem;
}

.admin-terms-textarea {
    min-height: 380px;
    font-family: "JetBrains Mono", "Consolas", monospace;
    line-height: 1.45;
}

.no-results sl-icon {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

.no-results p {
    margin: 0;
}

/* Update alert styles for the results panel */
#results sl-alert {
    margin-bottom: 0.75rem;
}

#results sl-alert:last-child {
    margin-bottom: 0;
}

/* Responsive design */
@media (max-width: 1024px) {
    .split-container {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 0;
    }

    .editor-panel {
        min-height: 500px;
    }

    .results-panel {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: stretch;
    }

    .header-left {
        flex-direction: column;
        gap: 1rem;
    }

    .actions {
        width: 100%;
    }

    .actions sl-button {
        flex: 1;
    }

    .editor-panel {
        min-height: 400px;
    }
}

.editor-container.disabled {
    opacity: 0.6;
    pointer-events: none;
}


.editor-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.overlay-message {
    text-align: center;
    color: #7f8c8d;
}

.overlay-message sl-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}
