:root {
    --tt-orange: #f57c00;
    --tt-orange-2: #ff9f43;
    --tt-orange-soft: #fff4e8;
    --tt-orange-soft-2: #fffaf5;
    --tt-navy: #17324d;
    --tt-navy-2: #234f73;
    --tt-green: #20a464;
    --tt-red: #dc4c4c;
    --tt-yellow: #f6b73c;
    --tt-blue: #2f80ed;
    --tt-gray: #6c7783;
    --tt-border: #e9edf2;
    --tt-bg: #f6f8fb;
    --tt-shadow: 0 10px 30px rgba(23,50,77,.08);
}

body {
    background: var(--tt-bg);
}

.tt-page {
    width: 100%;
    max-width: 1540px;
    margin: 0 auto;
    padding: 30px 28px 60px;
    color: #263442;
    font-size: 15px;
}

.tt-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #fff 0%, #fff8f0 58%, #ffead5 100%);
    border: 1px solid #ffe0bd;
    border-radius: 24px;
    box-shadow: var(--tt-shadow);
    padding: 36px 38px;
    margin-bottom: 26px;
}

.tt-hero:before,
.tt-hero:after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.tt-hero:before {
    width: 220px;
    height: 220px;
    background: rgba(245,124,0,.08);
    right: -80px;
    top: -85px;
}

.tt-hero:after {
    width: 100px;
    height: 100px;
    border: 18px solid rgba(23,50,77,.04);
    right: 100px;
    bottom: -50px;
}

.tt-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--tt-orange);
    background: #fff;
    border: 1px solid #ffd7ae;
    border-radius: 999px;
    padding: 8px 13px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.tt-hero h1 {
    margin: 14px 0 10px;
    color: var(--tt-navy);
    font-size: 38px;
    line-height: 1.18;
    font-weight: 800;
}

.tt-hero h1 span {
    color: var(--tt-orange);
}

.tt-hero p {
    margin: 0;
    color: #65717d;
    font-size: 16px;
    max-width: 940px;
    line-height: 1.75;
}

.tt-userbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    background: #fff;
    border: 1px solid var(--tt-border);
    border-radius: 16px;
    padding: 14px 17px;
    margin-bottom: 18px;
    box-shadow: 0 5px 20px rgba(23,50,77,.05);
}

.tt-user {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.tt-avatar {
    flex: 0 0 43px;
    width: 43px;
    height: 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    background: linear-gradient(135deg, var(--tt-orange), var(--tt-orange-2));
    box-shadow: 0 6px 14px rgba(245,124,0,.22);
}

.tt-user-name {
    color: var(--tt-navy);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
}

.tt-user-meta {
    margin-top: 4px;
    color: #89939e;
    font-size: 13px;
}

.tt-login-wrap {
    max-width: 610px;
    margin: 34px auto 14px;
}

.tt-login-card {
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--tt-border);
    box-shadow: 0 18px 50px rgba(23,50,77,.12);
}

.tt-login-head {
    padding: 30px 32px 22px;
    background: linear-gradient(135deg, var(--tt-navy), #274f70);
    color: #fff;
}

.tt-login-head .tt-login-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 15px;
    background: linear-gradient(135deg, #ff981f, #f16800);
    margin-bottom: 15px;
    font-size: 20px;
}

.tt-login-head h2 {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 7px;
}

.tt-login-head p {
    color: rgba(255,255,255,.78);
    margin: 0;
    font-size: 14px;
}

.tt-login-body {
    padding: 30px 32px 34px;
}

.tt-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--tt-navy);
    font-weight: 700;
}

.tt-control {
    width: 100%;
    height: 49px;
    border: 1px solid #dce2e8;
    border-radius: 12px;
    padding: 10px 14px;
    background: #fff;
    outline: none;
    font-size: 15px;
    transition: .2s ease;
}

.tt-control:focus {
    border-color: #ffad5a;
    box-shadow: 0 0 0 4px rgba(245,124,0,.09);
}

.tt-form-group {
    margin-bottom: 17px;
}

.tt-btn {
    border: 0;
    border-radius: 11px;
    min-height: 43px;
    padding: 10px 17px;
    font-size: 14px;
    font-weight: 700;
    transition: all .18s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none !important;
}

.tt-btn:hover {
    transform: translateY(-1px);
}

.tt-btn:disabled,
.tt-btn.disabled {
    cursor: not-allowed;
    opacity: .55;
    transform: none;
}

.tt-btn-primary {
    color: #fff !important;
    background: linear-gradient(135deg, #ff950f, #f36c00);
    box-shadow: 0 7px 17px rgba(245,124,0,.22);
}

.tt-btn-navy {
    color: #fff !important;
    background: linear-gradient(135deg, var(--tt-navy), #285677);
}

.tt-btn-light {
    color: var(--tt-navy) !important;
    background: #f4f6f9;
    border: 1px solid #e4e8ed;
}

.tt-btn-green {
    color: #fff !important;
    background: linear-gradient(135deg, #1fa963, #168b51);
}

.tt-btn-danger {
    color: #fff !important;
    background: linear-gradient(135deg, #ea5a5a, #cf3d3d);
}

.tt-btn-block {
    width: 100%;
}

.tt-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin: 18px 2px 13px;
}

.tt-section-head h2 {
    margin: 0;
    color: var(--tt-navy);
    font-size: 25px;
    font-weight: 800;
}

.tt-section-head p {
    margin: 5px 0 0;
    color: #89939d;
    font-size: 14px;
}

.tt-exam-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 22px;
}

.tt-exam-card {
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--tt-border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 6px 22px rgba(23,50,77,.06);
    transition: all .18s ease;
}

.tt-exam-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(23,50,77,.10);
}

.tt-exam-card:before {
    content: "";
    position: absolute;
    width: 5px;
    top: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(180deg, var(--tt-orange), #ffb45d);
}

.tt-exam-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.tt-subject-chip {
    display: inline-flex;
    border-radius: 9px;
    background: var(--tt-orange-soft);
    color: #c75d00;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 9px;
}

.tt-exam-title {
    color: var(--tt-navy);
    font-size: 21px;
    font-weight: 800;
    line-height: 1.35;
    margin: 0;
}

.tt-exam-subtitle {
    color: #7f8b96;
    font-size: 13px;
    margin-top: 6px;
}

.tt-status {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.tt-status-open { color: #0e8049; background: #e9f8f0; }
.tt-status-doing { color: #a95000; background: #fff0df; }
.tt-status-upcoming { color: #2c69a5; background: #edf5fd; }
.tt-status-done { color: #68439b; background: #f3edfb; }
.tt-status-closed { color: #69747e; background: #eff1f3; }

.tt-exam-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 11px;
    margin: 20px 0;
}

.tt-info-box {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
    min-width: 0;
}

.tt-info-label {
    color: #9aa3ab;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.tt-info-value {
    margin-top: 4px;
    color: var(--tt-navy);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tt-result-mini {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #fff9ef, #fff);
    border: 1px solid #ffe2bb;
    border-radius: 11px;
    margin-bottom: 13px;
}

.tt-result-mini strong {
    color: var(--tt-orange);
    font-size: 18px;
}

.tt-exam-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tt-empty {
    text-align: center;
    background: #fff;
    border: 1px dashed #d6dde4;
    border-radius: 18px;
    padding: 45px 20px;
    color: #84909b;
}

.tt-empty-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tt-orange);
    background: var(--tt-orange-soft);
    font-size: 25px;
}

.tt-skeleton {
    height: 180px;
    border-radius: 18px;
    background: linear-gradient(90deg,#f0f2f5 25%,#f7f8fa 37%,#f0f2f5 63%);
    background-size: 400% 100%;
    animation: ttShimmer 1.4s ease infinite;
}

@keyframes ttShimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

.tt-modal .modal-content {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

.tt-modal .modal-header {
    background: linear-gradient(135deg,var(--tt-navy),#275675);
    color: #fff;
    border: 0;
    padding: 19px 21px;
}

.tt-modal .modal-title {
    font-weight: 800;
}

.tt-modal .modal-header .close {
    color: #fff;
    opacity: .8;
}

.tt-modal .modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(220%);
    opacity: .85;
}

.tt-modal .modal-header .btn-close:focus {
    box-shadow: 0 0 0 3px rgba(255,255,255,.18);
}

.tt-modal .modal-body {
    padding: 22px;
}

.tt-modal .modal-footer {
    padding: 14px 20px;
    background: #fafbfc;
    border-top: 1px solid #edf0f2;
}

.tt-code-input {
    width: 100%;
    height: 58px;
    border: 2px solid #ffd8ad;
    border-radius: 13px;
    font-size: 25px;
    font-weight: 900;
    text-align: center;
    letter-spacing: 8px;
    text-transform: uppercase;
    color: var(--tt-navy);
    outline: none;
}

.tt-code-input:focus {
    border-color: var(--tt-orange);
    box-shadow: 0 0 0 4px rgba(245,124,0,.09);
}

.tt-entry-summary {
    display: none;
    margin-top: 16px;
    background: #f8fafc;
    border: 1px solid #e6eaf0;
    border-radius: 12px;
    padding: 14px;
}

.tt-entry-summary h4 {
    color: var(--tt-navy);
    font-weight: 800;
    margin: 0 0 8px;
}

.tt-toast-wrap {
    position: fixed;
    right: 18px;
    top: 18px;
    width: 330px;
    max-width: calc(100vw - 36px);
    z-index: 99999;
}

.tt-toast {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #fff;
    border-radius: 12px;
    padding: 13px 14px;
    margin-bottom: 9px;
    box-shadow: 0 10px 30px rgba(23,50,77,.18);
    border-left: 4px solid var(--tt-blue);
    color: #3f4b56;
    font-size: 13px;
}

.tt-toast-success { border-left-color: var(--tt-green); }
.tt-toast-error { border-left-color: var(--tt-red); }
.tt-toast-warning { border-left-color: var(--tt-yellow); }

/* ============================================================
   LÀM BÀI
============================================================ */
.tt-test-page {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 22px 28px 55px;
    font-size: 15px;
}

.tt-test-header {
    position: sticky;
    top: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(10px);
    border: 1px solid #e7ebef;
    border-radius: 15px;
    padding: 11px 14px;
    box-shadow: 0 8px 25px rgba(23,50,77,.10);
    margin-bottom: 15px;
}

.tt-test-brand {
    min-width: 0;
}

.tt-test-brand h1 {
    margin: 0;
    color: var(--tt-navy);
    font-size: 20px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 760px;
}

.tt-test-brand div {
    color: #89949e;
    font-size: 13px;
    margin-top: 4px;
}

.tt-timer-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tt-save-state {
    color: #7d8994;
    font-size: 12px;
    white-space: nowrap;
}

.tt-save-state.is-saving { color: #b46b00; }
.tt-save-state.is-saved { color: var(--tt-green); }
.tt-save-state.is-error { color: var(--tt-red); }

.tt-timer {
    min-width: 112px;
    text-align: center;
    border-radius: 11px;
    padding: 9px 13px;
    background: var(--tt-navy);
    color: #fff;
    font-size: 19px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 1px;
}

.tt-timer.warning {
    background: #f39c12;
}

.tt-timer.danger {
    background: #d94848;
    animation: ttPulse 1s infinite;
}

@keyframes ttPulse {
    50% { box-shadow: 0 0 0 5px rgba(217,72,72,.12); }
}

.tt-test-layout {
    display: grid;
    grid-template-columns: minmax(0,1fr) 310px;
    gap: 22px;
    align-items: start;
}

.tt-paper {
    min-width: 0;
}

.tt-group-card {
    border-radius: 16px;
    background: linear-gradient(135deg,#fff6eb,#fff);
    border: 1px solid #ffdcb6;
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: 0 5px 18px rgba(23,50,77,.05);
}

.tt-group-card h3 {
    margin: 0 0 7px;
    color: var(--tt-navy);
    font-size: 16px;
    font-weight: 800;
}

.tt-group-content {
    line-height: 1.7;
}

.tt-question {
    background: #fff;
    border: 1px solid var(--tt-border);
    border-radius: 18px;
    padding: 24px;
    margin-bottom: 18px;
    box-shadow: 0 5px 19px rgba(23,50,77,.05);
    scroll-margin-top: 90px;
}

.tt-question.is-review {
    border-color: #f7c85d;
    box-shadow: 0 0 0 3px rgba(247,200,93,.10), 0 5px 19px rgba(23,50,77,.05);
}

.tt-question-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 13px;
}

.tt-question-number {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--tt-navy);
    font-size: 17px;
    font-weight: 900;
}

.tt-question-number span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg,var(--tt-orange),#ff9d32);
}

.tt-question-point {
    color: #8d98a2;
    font-size: 12px;
    font-weight: 600;
}

.tt-review-btn {
    background: #f7f9fb;
    border: 1px solid #e1e6eb;
    color: #68737e;
    border-radius: 9px;
    padding: 7px 10px;
    font-size: 11px;
    font-weight: 700;
}

.tt-review-btn.active {
    color: #a46b00;
    border-color: #f6cf75;
    background: #fff8e6;
}

.tt-question-content {
    color: #25313c;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 16px;
}

.tt-options {
    display: grid;
    gap: 9px;
}

.tt-option {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 15px;
    border: 1px solid #e1e6eb;
    border-radius: 13px;
    background: #fff;
    cursor: pointer;
    transition: .15s ease;
}

.tt-option:hover {
    border-color: #ffc37f;
    background: #fffaf5;
}

.tt-option.selected {
    border-color: var(--tt-orange);
    background: #fff7ef;
    box-shadow: 0 0 0 2px rgba(245,124,0,.08);
}

.tt-option-radio {
    flex: 0 0 25px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 2px solid #cfd6dc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

.tt-option.selected .tt-option-radio {
    border-color: var(--tt-orange);
    background: var(--tt-orange);
}

.tt-option-body {
    min-width: 0;
    flex: 1;
    font-size: 15px;
    line-height: 1.7;
}

.tt-media {
    margin-top: 10px;
}

.tt-media img {
    max-width: 100%;
    max-height: 420px;
    object-fit: contain;
    border-radius: 9px;
    border: 1px solid #e6e9ed;
    background: #fff;
}

.tt-media audio {
    width: 100%;
    max-width: 620px;
}

.tt-navigator {
    position: sticky;
    top: 80px;
    background: #fff;
    border: 1px solid var(--tt-border);
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 6px 22px rgba(23,50,77,.07);
}

.tt-nav-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    color: var(--tt-navy);
    font-size: 15px;
    font-weight: 800;
}

.tt-nav-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 7px;
}

.tt-nav-q {
    height: 39px;
    border: 1px solid #dfe4e9;
    background: #fff;
    color: #5a6671;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    position: relative;
}

.tt-nav-q.answered {
    background: #ecf8f2;
    border-color: #8fd3ae;
    color: #157647;
}

.tt-nav-q.review:after {
    content: "";
    position: absolute;
    right: 3px;
    top: 3px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f3b729;
}

.tt-nav-legend {
    display: grid;
    gap: 7px;
    margin: 14px 0;
    font-size: 11px;
    color: #818c96;
}

.tt-legend-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 3px;
    margin-right: 5px;
    vertical-align: -1px;
}

.tt-dot-answer { background: #8fd3ae; }
.tt-dot-review { background: #f3b729; }
.tt-dot-empty { background: #e3e7eb; }

.tt-progress-line {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf0f3;
    margin-bottom: 8px;
}

.tt-progress-line span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg,#23a567,#55c88d);
    transition: width .2s ease;
}

/* ============================================================
   KẾT QUẢ
============================================================ */
.tt-result-page {
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
    padding: 30px 28px 60px;
    font-size: 15px;
}

.tt-score-hero {
    overflow: hidden;
    position: relative;
    display: grid;
    grid-template-columns: 210px minmax(0,1fr);
    gap: 24px;
    align-items: center;
    background: linear-gradient(135deg,var(--tt-navy),#224d6d);
    color: #fff;
    border-radius: 22px;
    padding: 26px;
    box-shadow: 0 14px 40px rgba(23,50,77,.18);
    margin-bottom: 17px;
}

.tt-score-hero:after {
    content: "";
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: rgba(255,255,255,.035);
    right: -70px;
    top: -90px;
}

.tt-score-circle {
    width: 170px;
    height: 170px;
    margin: auto;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,#ff9c2b,#f26b00);
    border: 7px solid rgba(255,255,255,.18);
    box-shadow: 0 12px 30px rgba(0,0,0,.18);
}

.tt-score-number {
    font-size: 48px;
    line-height: 1;
    font-weight: 900;
}

.tt-score-caption {
    margin-top: 6px;
    font-size: 11px;
    opacity: .8;
    text-transform: uppercase;
    letter-spacing: .7px;
}

.tt-result-title h1 {
    margin: 0 0 8px;
    font-size: 31px;
    font-weight: 900;
}

.tt-result-title p {
    color: rgba(255,255,255,.76);
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
}

.tt-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 18px;
}

.tt-stat {
    border-radius: 11px;
    padding: 10px 12px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.08);
}

.tt-stat strong {
    display: block;
    font-size: 20px;
}

.tt-stat span {
    font-size: 11px;
    opacity: .74;
}

.tt-result-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

.tt-result-question {
    background: #fff;
    border-radius: 17px;
    border: 1px solid var(--tt-border);
    box-shadow: 0 5px 20px rgba(23,50,77,.05);
    margin-bottom: 13px;
    overflow: hidden;
}

.tt-result-qhead {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 15px 19px;
    background: #fafbfc;
    border-bottom: 1px solid #edf0f2;
}

.tt-result-qhead strong {
    color: var(--tt-navy);
}

.tt-result-question.correct .tt-result-qhead {
    background: #f0faf5;
}

.tt-result-question.wrong .tt-result-qhead {
    background: #fff3f3;
}

.tt-result-badge {
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 10px;
    font-weight: 800;
}

.tt-result-badge.correct { color:#147644; background:#dff4e9; }
.tt-result-badge.wrong { color:#b63838; background:#fde1e1; }
.tt-result-badge.blank { color:#7b6a24; background:#fff4cc; }

.tt-result-qbody {
    padding: 20px;
    font-size: 15px;
}

.tt-result-option {
    display: flex;
    gap: 11px;
    padding: 12px 14px;
    border: 1px solid #e5e9ed;
    border-radius: 12px;
    margin-top: 9px;
    font-size: 15px;
    line-height: 1.7;
}

.tt-result-option.correct-answer {
    background: #ecf8f2;
    border-color: #84cda7;
}

.tt-result-option.selected-wrong {
    background: #fff0f0;
    border-color: #efa2a2;
}

.tt-result-option.selected-correct {
    box-shadow: inset 4px 0 #1fa463;
}

.tt-answer-letter {
    flex: 0 0 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f1f3f5;
    color: var(--tt-navy);
    font-size: 11px;
    font-weight: 900;
}

.tt-answer-tags {
    margin-left: auto;
    flex: 0 0 auto;
}

.tt-answer-tags span {
    display: inline-block;
    margin-left: 4px;
    border-radius: 999px;
    padding: 3px 6px;
    font-size: 9px;
    font-weight: 800;
}

.tt-tag-correct { color:#137747; background:#d9f1e5; }
.tt-tag-selected { color:#9b4b00; background:#ffead4; }

.tt-solution {
    margin-top: 15px;
    border-radius: 13px;
    padding: 15px 16px;
    background: linear-gradient(135deg,#fff8ed,#fff);
    border: 1px solid #ffdfb7;
    font-size: 15px;
    line-height: 1.7;
}

.tt-solution-title {
    color: #b85a00;
    font-weight: 900;
    margin-bottom: 6px;
}

.tt-loading-panel {
    background: #fff;
    border: 1px solid var(--tt-border);
    border-radius: 18px;
    padding: 45px 20px;
    text-align: center;
    color: #84909b;
}

.tt-spinner {
    width: 32px;
    height: 32px;
    margin: 0 auto 11px;
    border: 3px solid #ffe0bc;
    border-top-color: var(--tt-orange);
    border-radius: 50%;
    animation: ttSpin .7s linear infinite;
}

@keyframes ttSpin { to { transform: rotate(360deg); } }


/* ============================================================
   DESKTOP WIDE / TYPOGRAPHY ENHANCEMENT
============================================================ */

.tt-page,
.tt-test-page,
.tt-result-page {
    box-sizing: border-box;
}

.tt-page p,
.tt-test-page p,
.tt-result-page p {
    line-height: 1.7;
}

.tt-entry-summary {
    font-size: 14px;
    line-height: 1.65;
}

.tt-toast {
    font-size: 14px;
}

.tt-group-content {
    font-size: 15px;
    line-height: 1.8;
}

.tt-review-btn {
    font-size: 12px;
    padding: 8px 11px;
}

.tt-navigator {
    padding: 17px;
}

.tt-nav-q {
    height: 42px;
    font-size: 13px;
}

.tt-result-qhead strong {
    font-size: 16px;
}

.tt-result-badge {
    font-size: 11px;
    padding: 6px 10px;
}

.tt-solution-title {
    font-size: 15px;
}

@media (min-width: 1600px) {
    .tt-page { max-width: 1580px; }
    .tt-test-page { max-width: 1660px; }
    .tt-result-page { max-width: 1440px; }
}

@media (max-width: 1199px) {
    .tt-page,
    .tt-test-page,
    .tt-result-page {
        max-width: 100%;
        padding-left: 22px;
        padding-right: 22px;
    }

    .tt-hero {
        padding: 30px;
    }

    .tt-hero h1 {
        font-size: 34px;
    }
}

@media (max-width: 991px) {
    .tt-exam-grid { grid-template-columns: 1fr; }
    .tt-test-layout { grid-template-columns: 1fr; }
    .tt-navigator { position: static; order: -1; }
    .tt-nav-grid { grid-template-columns: repeat(10, 1fr); }
    .tt-score-hero { grid-template-columns: 160px minmax(0,1fr); }
    .tt-score-circle { width: 140px; height: 140px; }
    .tt-score-number { font-size: 40px; }
}

@media (max-width: 767px) {
    .tt-page, .tt-test-page, .tt-result-page {
        padding: 18px 12px 40px;
        font-size: 14px;
    }
    .tt-hero { padding: 24px 19px; border-radius: 18px; }
    .tt-hero h1 { font-size: 28px; }
    .tt-hero p { font-size: 14px; }
    .tt-login-wrap { max-width: 100%; margin-top: 18px; }
    .tt-login-head { padding: 24px 21px 18px; }
    .tt-login-head h2 { font-size: 23px; }
    .tt-login-body { padding: 24px 21px 27px; }
    .tt-control { height: 47px; font-size: 14px; }
    .tt-userbar { align-items: flex-start; }
    .tt-exam-info { grid-template-columns: 1fr 1fr; }
    .tt-exam-info .tt-info-box:last-child { grid-column: 1 / -1; }
    .tt-test-header { align-items: flex-start; flex-wrap: wrap; border-radius: 12px; }
    .tt-test-brand { width: calc(100% - 125px); }
    .tt-test-brand h1 { max-width: 100%; }
    .tt-save-state { display: none; }
    .tt-question { padding: 15px; border-radius: 13px; }
    .tt-question-content { font-size: 14px; }
    .tt-nav-grid { grid-template-columns: repeat(7, 1fr); }
    .tt-score-hero { grid-template-columns: 1fr; text-align: center; padding: 22px 16px; }
    .tt-stat-grid { grid-template-columns: 1fr 1fr; }
    .tt-result-toolbar { flex-direction: column; align-items: stretch; }
    .tt-answer-tags { display: block; margin-left: 0; margin-top: 4px; }
}

@media (max-width: 420px) {
    .tt-exam-info { grid-template-columns: 1fr; }
    .tt-exam-info .tt-info-box:last-child { grid-column: auto; }
    .tt-exam-actions .tt-btn { width: 100%; }
    .tt-nav-grid { grid-template-columns: repeat(5, 1fr); }
    .tt-timer { min-width: 96px; font-size: 17px; }
}