/* ==========================================================================
   Mentor (mentor.html, core/mentorPage.js) and its home card (core/mentorCard.js)
   Built on portal.css / pages.css tokens; everything here is mt- prefixed.
   ========================================================================== */

.mt-root {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* --------------------------------------------------------------- the mentor */

.mt-hero {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    padding: 24px 26px;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 60%),
        var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.mt-avatar {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    font-size: 1.7rem;
    color: #fff;
    background: linear-gradient(140deg, var(--brand), #7b4cf6);
    box-shadow: 0 12px 28px rgba(47, 109, 246, 0.3);
    flex-shrink: 0;
}

.mt-hero h2 {
    font-size: clamp(1.15rem, 2.4vw, 1.45rem);
    line-height: 1.3;
    margin: 2px 0 6px;
}

.mt-say {
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-soft);
    max-width: 70ch;
}

.mt-say b {
    color: var(--text);
}

.mt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.mt-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

/* ------------------------------------------------------------------ layout */

.mt-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

@media (max-width: 980px) {
    .mt-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ------------------------------------------------------------- today's list */

.mt-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    font-weight: 650;
    color: var(--text-soft);
}

.mt-progress-bar {
    width: 110px;
    height: 8px;
    border-radius: 99px;
    background: var(--surface-3);
    overflow: hidden;
}

.mt-progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--good);
    transition: width 0.3s ease;
}

.mt-tasks {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mt-task {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 13px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface-2);
    border-left: 4px solid var(--tone, var(--brand));
}

.mt-task.is-done {
    opacity: 0.62;
}

.mt-task.is-done .mt-task-title {
    text-decoration: line-through;
    text-decoration-color: color-mix(in srgb, var(--text) 40%, transparent);
}

.mt-check {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    border: 2px solid var(--line);
    background: var(--surface);
    display: grid;
    place-items: center;
    cursor: pointer;
    color: transparent;
    font-size: 0.8rem;
    margin-top: 1px;
    transition: all 0.15s ease;
}

.mt-check:hover {
    border-color: var(--good);
}

.mt-task.is-done .mt-check {
    background: var(--good);
    border-color: var(--good);
    color: #fff;
}

.mt-task-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
}

.mt-kind {
    font-size: 0.66rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 99px;
    background: color-mix(in srgb, var(--tone, var(--brand)) 14%, transparent);
    color: var(--tone, var(--brand));
}

.mt-task-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
}

.mt-task-action {
    margin-top: 4px;
    font-size: 0.84rem;
    color: var(--text-soft);
    line-height: 1.45;
}

.mt-task-why {
    margin-top: 3px;
    font-size: 0.76rem;
    color: var(--muted);
}

.mt-task-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.mt-min {
    font-size: 0.74rem;
    font-weight: 650;
    color: var(--muted);
    white-space: nowrap;
}

.mt-go {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

.mt-go:hover {
    filter: brightness(1.06);
}

.mt-auto {
    font-size: 0.7rem;
    color: var(--good);
    font-weight: 650;
}

@media (max-width: 560px) {
    .mt-task {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .mt-task-side {
        grid-column: 2;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .mt-hero {
        grid-template-columns: minmax(0, 1fr);
        padding: 20px 18px;
    }

    .mt-avatar {
        width: 52px;
        height: 52px;
        font-size: 1.35rem;
        border-radius: 16px;
    }
}

/* ------------------------------------------------------------ stuck points */

.mt-stuck {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mt-stuck-row {
    padding: 13px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface-2);
}

.mt-stuck-row summary {
    list-style: none;
    cursor: pointer;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.mt-stuck-row summary::-webkit-details-marker {
    display: none;
}

.mt-dot {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-size: 0.9rem;
    background: color-mix(in srgb, var(--sev) 15%, transparent);
    color: var(--sev);
}

.mt-stuck-title {
    font-weight: 700;
    font-size: 0.9rem;
}

.mt-stuck-title {
    display: block;
}

.mt-stuck-facts {
    display: block;
    font-size: 0.76rem;
    color: var(--muted);
    margin-top: 2px;
}

.mt-caret {
    color: var(--muted);
    transition: transform 0.2s ease;
}

.mt-stuck-row[open] .mt-caret {
    transform: rotate(180deg);
}

.mt-stuck-body {
    margin: 12px 0 0 44px;
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--text-soft);
}

.mt-stuck-body p + p {
    margin-top: 6px;
}

.mt-stuck-body .mt-go {
    margin-top: 10px;
}

/* --------------------------------------------------------------- the week */

.mt-week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}

@media (max-width: 1100px) {
    .mt-week {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .mt-week {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.mt-day {
    text-align: left;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface-2);
    cursor: pointer;
    color: inherit;
    font: inherit;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 118px;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.mt-day:hover {
    border-color: var(--brand);
}

.mt-day.is-today {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
}

.mt-day.is-selected {
    background: var(--brand-soft);
    border-color: var(--brand);
}

.mt-day.is-past {
    opacity: 0.7;
}

.mt-day-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 6px;
}

.mt-day-name {
    font-weight: 750;
    font-size: 0.86rem;
}

.mt-day-date {
    font-size: 0.7rem;
    color: var(--muted);
}

.mt-day-focus {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.mt-day-focus span {
    font-size: 0.68rem;
    font-weight: 650;
    padding: 2px 7px;
    border-radius: 99px;
    background: color-mix(in srgb, var(--tone, var(--brand)) 15%, transparent);
    color: var(--tone, var(--brand));
}

.mt-day-foot {
    margin-top: auto;
    font-size: 0.72rem;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
}

.mt-day-detail {
    margin-top: 14px;
}

.mt-day-detail h4 {
    font-size: 0.95rem;
    margin-bottom: 10px;
}

/* Locked week: a real preview, blurred, under the unlock card. */
.mt-locked {
    position: relative;
}

.mt-locked .mt-week {
    filter: blur(5px);
    pointer-events: none;
    user-select: none;
}

.mt-lock-card {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 16px;
}

.mt-lock-inner {
    max-width: 420px;
    text-align: center;
    padding: 20px 22px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.mt-lock-inner i.fa-lock {
    font-size: 1.3rem;
    color: var(--brand);
    margin-bottom: 8px;
}

.mt-lock-inner strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 6px;
}

.mt-lock-inner p {
    font-size: 0.83rem;
    color: var(--muted);
    margin-bottom: 14px;
    line-height: 1.5;
}

/* ------------------------------------------------------------------ AI note */

.mt-ai-text {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text-soft);
    white-space: pre-line;
}

.mt-ai-meta {
    margin-top: 10px;
    font-size: 0.74rem;
    color: var(--muted);
}

/* ------------------------------------------------------------- review, wins */

.mt-review {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mt-stat {
    flex: 1 1 140px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    border: 1px solid var(--line);
}

.mt-stat strong {
    display: block;
    font-size: 1.25rem;
}

.mt-stat span {
    font-size: 0.76rem;
    color: var(--muted);
}

/* -------------------------------------------------------------------- setup */

.mt-steps {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 0;
    padding: 0;
}

.mt-steps li {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 14px 7px 7px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-soft);
}

.mt-steps li b {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    background: var(--line);
    color: var(--text-soft);
}

.mt-steps li.is-now {
    border-color: var(--brand);
    color: var(--text);
}

.mt-steps li.is-now b {
    background: var(--brand);
    color: #fff;
}

.mt-setup-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(280px, 24vw, 340px);
    gap: 22px;
    align-items: start;
}

.mt-setup {
    padding: 28px 30px;
}

.mt-qgrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 28px;
}

.mt-q {
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
}

.mt-qgrid .mt-q {
    padding-top: 0;
}

.mt-q-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.mt-q-num {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--brand);
    background: color-mix(in srgb, var(--brand) 14%, transparent);
}

.mt-q-head label,
.mt-q-head .mt-q-label {
    display: block;
    font-weight: 750;
    font-size: 1rem;
    line-height: 1.35;
    margin-bottom: 3px;
}

.mt-q-head small {
    display: block;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--muted);
}

.mt-q-warn {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin: 0 0 10px;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--bad);
    background: color-mix(in srgb, var(--bad) 10%, transparent);
}

.mt-q-warn i {
    margin-top: 2px;
}

.mt-field-wrap {
    position: relative;
}

.mt-field-wrap > i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.mt-field {
    width: 100%;
    padding: 13px 14px 13px 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color-scheme: light dark;
}

.mt-field:focus {
    outline: 2px solid var(--brand-soft);
    border-color: var(--brand);
}

.mt-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: 12px;
}

#mt-weak {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.mt-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-height: 100px;
    padding: 16px;
    border-radius: 14px;
    border: 1.5px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .15s;
}

.mt-tile.is-subject {
    min-height: 0;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.mt-tile > i {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 1rem;
    color: var(--brand);
    background: color-mix(in srgb, var(--brand) 12%, transparent);
}

.mt-tile strong {
    font-size: 0.95rem;
    font-weight: 750;
}

.mt-tile small {
    font-size: 0.76rem;
    line-height: 1.35;
    color: var(--muted);
}

.mt-tile:hover {
    border-color: var(--brand);
    transform: translateY(-1px);
}

.mt-tile-tick {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.62rem;
    color: #fff;
    background: var(--brand);
    opacity: 0;
    transform: scale(.6);
    transition: opacity .15s, transform .15s;
}

.mt-tile.is-subject .mt-tile-tick {
    top: 50%;
    margin-top: -10px;
}

.mt-tile[aria-pressed="true"] {
    border-color: var(--brand);
    background: color-mix(in srgb, var(--brand) 10%, var(--surface));
}

.mt-tile[aria-pressed="true"] > i {
    color: #fff;
    background: var(--brand);
}

.mt-tile[aria-pressed="true"] .mt-tile-tick {
    opacity: 1;
    transform: none;
}

/* Kept for the "strong subject" chips elsewhere on the page. */
.mt-opts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mt-opt {
    padding: 9px 15px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text-soft);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
}

.mt-opt[aria-pressed="true"] {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.mt-opt.is-strong[aria-pressed="true"] {
    background: var(--good);
    border-color: var(--good);
}

.mt-setup-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    padding-top: 24px;
}

.mt-go {
    padding: 14px 26px;
    font-size: 1rem;
}

.mt-summary {
    position: sticky;
    top: 92px;
    padding: 22px;
}

.mt-sum-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mt-sum-list li {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed var(--line);
}

.mt-sum-list li > i {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 0.9rem;
    color: var(--good);
    background: color-mix(in srgb, var(--good) 13%, transparent);
}

.mt-sum-list li.is-empty > i {
    color: var(--muted);
    background: var(--line);
}

.mt-sum-list small {
    display: block;
    font-size: 0.72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 700;
}

.mt-sum-list strong {
    display: block;
    font-size: 0.92rem;
    line-height: 1.35;
}

.mt-sum-list li.is-empty strong {
    color: var(--muted);
    font-weight: 600;
}

.mt-sum-next {
    margin-top: 16px;
    padding: 14px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--brand) 9%, transparent);
}

.mt-sum-next strong {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.88rem;
    color: var(--brand);
}

.mt-sum-next p {
    margin: 6px 0 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-soft);
}

@media (max-width: 1020px) {
    .mt-setup-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .mt-summary {
        position: static;
        order: -1;
    }

    .mt-sum-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 16px;
    }

    .mt-sum-next {
        display: none;
    }
}

@media (max-width: 640px) {
    .mt-setup {
        padding: 18px 16px;
    }

    .mt-summary {
        display: none;
    }

    .mt-qgrid {
        grid-template-columns: minmax(0, 1fr);
    }

    .mt-qgrid .mt-q + .mt-q {
        padding-top: 22px;
    }

    .mt-tiles,
    #mt-weak {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .mt-tile {
        min-height: 0;
        padding: 13px;
    }

    .mt-tile small {
        display: none;
    }

    .mt-go {
        width: 100%;
        justify-content: center;
    }
}

.mt-err {
    color: var(--bad);
    font-size: 0.82rem;
    font-weight: 600;
}

/* ------------------------------------------------------------ home card */

.mt-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 18px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background:
        radial-gradient(120% 160% at 100% 0%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 62%),
        var(--surface);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
}

.mt-card .mt-avatar {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
    border-radius: 16px;
}

.mt-card-copy strong {
    display: block;
    font-size: 1rem;
}

.mt-card-copy > small {
    display: block;
    margin-top: 3px;
    font-size: 0.82rem;
    color: var(--muted);
}

.mt-card-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mt-card-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    color: var(--text-soft);
    min-width: 0;
}

.mt-card-item i {
    width: 16px;
    text-align: center;
    color: var(--muted);
}

.mt-card-item.is-done {
    text-decoration: line-through;
    color: var(--muted);
}

.mt-card-item.is-done i {
    color: var(--good);
}

.mt-card-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .mt-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .mt-card > .ak-mock-cta {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

/* The AI gateway's "add a key" card (AkshAiSetup.promptHtml()). Its own
   styles live in the study app's premium-ui.css, which the portal does not
   load; this is the same card in portal tokens. */
.mt-root .aksh-ai-setup {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 14px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
    background: var(--brand-soft);
}

.mt-root .aksh-ai-setup-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
}

.mt-root .aksh-ai-setup-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.84rem;
    color: var(--text-soft);
}

.mt-root .aksh-ai-setup-copy strong {
    color: var(--text);
    font-size: 0.95rem;
}

.mt-root .aksh-ai-setup-btn {
    grid-column: 2;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 0.83rem;
    font-weight: 600;
    text-decoration: none;
}

/* portal.css drops .ak-ghost labels on phones (the top bar wants icons); the
   mentor's two actions mean nothing as bare icons, so they keep their words. */
.mt-root .mt-hero-actions .ak-ghost span,
.mt-root .mt-ai-meta .ak-ghost span {
    display: inline;
}

/* ------------------------------------------------- pehchaan test (step 1) */

.mt-diag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}

.mt-diag-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    border-top: 4px solid var(--tone, var(--brand));
    background: var(--surface-2);
}

.mt-diag-card.is-done {
    background: color-mix(in srgb, var(--good) 6%, var(--surface-2));
}

.mt-diag-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--tone, var(--brand)) 15%, transparent);
    color: var(--tone, var(--brand));
    margin-bottom: 4px;
}

.mt-diag-card strong {
    font-size: 1rem;
}

.mt-diag-card small {
    font-size: 0.78rem;
    color: var(--muted);
}

.mt-diag-foot {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.mt-diag-again {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--brand-ink);
}

/* ------------------------------------------------ EN | हिं (top bar) */

.mt-lang {
    display: inline-flex;
    padding: 3px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.mt-lang button {
    min-width: 40px;
    padding: 6px 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.mt-lang button[aria-pressed="true"] {
    background: var(--brand);
    color: #fff;
}

.mt-setup small.mt-err {
    color: var(--bad);
}

/* ------------------------------------------------------ daily improvement */

.mt-trend .ak-panel-head {
    align-items: flex-start;
    gap: 14px;
}

.mt-seg {
    display: inline-flex;
    padding: 3px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: var(--surface);
    flex-shrink: 0;
}

.mt-seg button {
    border: 0;
    background: transparent;
    color: var(--text-soft);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.mt-seg button[aria-pressed="true"] {
    background: var(--brand);
    color: #fff;
}

.mt-trend-subs {
    margin-top: 2px;
}

.mt-trend-subs .mt-opt {
    padding: 6px 13px;
    font-size: 0.8rem;
}

.mt-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.mt-kpi {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface);
    min-width: 0;
}

.mt-kpi > small {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted);
}

.mt-kpi > strong {
    display: block;
    margin: 4px 0 6px;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.mt-delta {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--muted);
}

.mt-delta small {
    font-weight: 600;
    color: var(--muted);
}

.mt-delta.is-up {
    color: var(--good);
}

.mt-delta.is-down {
    color: var(--bad);
}

.mt-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

.mt-dots i {
    width: 8px;
    height: 8px;
    border-radius: 3px;
    background: var(--line);
}

.mt-dots i.is-on {
    background: var(--brand);
}

.mt-trend-say {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-soft);
    background: color-mix(in srgb, var(--brand) 8%, transparent);
}

.mt-trend-say i {
    margin-top: 3px;
    color: var(--brand);
}

.mt-trend-chart {
    position: relative;
    margin-top: 16px;
    overflow: hidden;
}

.mt-trend-chart svg {
    display: block;
    max-width: 100%;
    height: auto;
}

.mt-ch-title {
    font-size: 12px;
    font-weight: 700;
    fill: var(--text-soft);
}

.mt-ch-axis {
    font-size: 11px;
    fill: var(--muted);
    font-variant-numeric: tabular-nums;
}

.mt-ch-axis.is-today {
    fill: var(--text);
    font-weight: 700;
}

.mt-ch-grid {
    stroke: var(--line);
    stroke-width: 1;
    opacity: .7;
}

.mt-ch-base {
    stroke: var(--muted);
    stroke-width: 1;
    opacity: .6;
}

.mt-ch-bar {
    fill: color-mix(in srgb, var(--brand) 55%, var(--surface));
}

.mt-ch-bar.is-today {
    fill: var(--brand);
}

.mt-ch-line {
    fill: none;
    stroke: var(--brand);
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.mt-ch-bridge {
    stroke: var(--brand);
    stroke-width: 1.5;
    stroke-dasharray: 3 4;
    opacity: .55;
}

.mt-ch-dot {
    fill: var(--brand);
    stroke: var(--surface);
    stroke-width: 2;
}

.mt-ch-dot.is-today {
    fill: var(--surface);
    stroke: var(--brand);
    stroke-width: 2.5;
}

.mt-ch-val {
    font-size: 12px;
    font-weight: 800;
    fill: var(--text);
}

.mt-ch-cross {
    stroke: var(--muted);
    stroke-width: 1;
    stroke-dasharray: 2 3;
    pointer-events: none;
}

.mt-ch-hit {
    fill: transparent;
    cursor: crosshair;
}

.mt-ch-tip {
    position: absolute;
    top: 30px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    font-size: 0.78rem;
    color: var(--text-soft);
    white-space: nowrap;
    pointer-events: none;
    z-index: 2;
}

.mt-ch-tip[hidden] {
    display: none;
}

.mt-ch-tip strong {
    color: var(--text);
    font-size: 0.82rem;
}

.mt-ch-tip span {
    display: flex;
    align-items: center;
    gap: 7px;
}

.mt-key {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: color-mix(in srgb, var(--brand) 55%, var(--surface));
}

.mt-key.is-acc {
    height: 3px;
    border-radius: 2px;
    background: var(--brand);
}

.mt-trend-table {
    margin-top: 12px;
    font-size: 0.84rem;
}

.mt-trend-table summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--brand);
}

.mt-trend-table table {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

.mt-trend-table th,
.mt-trend-table td {
    padding: 7px 8px;
    border-bottom: 1px solid var(--line);
    text-align: right;
}

.mt-trend-table th:first-child,
.mt-trend-table td:first-child {
    text-align: left;
}

.mt-trend-table th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
}

@media (max-width: 900px) {
    .mt-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .mt-trend .ak-panel-head {
        flex-direction: column;
    }

    .mt-kpi {
        padding: 12px;
    }

    .mt-kpi > strong {
        font-size: 1.2rem;
    }
}

/* ------------------------------------------------------- Pro Plus extras */

.mt-note {
    margin: 10px 0 0;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--muted);
}

.mt-bar {
    display: block;
    height: 8px;
    border-radius: 999px;
    background: var(--line);
    overflow: hidden;
}

.mt-bar > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--brand);
}

/* habit strip + check-in */
.mt-habit {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 16px 20px;
}

.mt-ring {
    position: relative;
    width: 64px;
    height: 64px;
}

.mt-ring svg {
    transform: rotate(-90deg);
}

.mt-ring circle {
    fill: none;
    stroke-width: 7;
}

.mt-ring-bg {
    stroke: var(--line);
}

.mt-ring-fg {
    stroke: var(--good);
    stroke-linecap: round;
    transition: stroke-dashoffset .4s;
}

.mt-ring > span {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 0.82rem;
}

.mt-habit-copy strong {
    display: block;
    font-size: 1.05rem;
}

.mt-habit-copy strong i {
    color: #f07b16;
}

.mt-habit-copy small {
    color: var(--muted);
    font-size: 0.8rem;
}

.mt-checkin {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

.mt-checkin > span {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-soft);
}

.mt-checkin .mt-opt {
    padding: 6px 12px;
    font-size: 0.78rem;
}

.mt-opt.is-reset {
    border-style: dashed;
}

/* run-in checklist */
.mt-final {
    border-color: color-mix(in srgb, var(--warn) 45%, var(--line));
    background: linear-gradient(135deg, color-mix(in srgb, var(--warn) 9%, var(--surface)), var(--surface));
}

.mt-final-day,
.mt-final-eve {
    border-color: color-mix(in srgb, var(--brand) 50%, var(--line));
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 12%, var(--surface)), var(--surface));
}

.mt-final-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 8px;
}

.mt-final-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    text-align: left;
    padding: 11px 13px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.86rem;
    line-height: 1.4;
    cursor: pointer;
}

.mt-final-item i {
    margin-top: 2px;
    color: var(--muted);
}

.mt-final-item.is-done {
    color: var(--muted);
    text-decoration: line-through;
}

.mt-final-item.is-done i {
    color: var(--good);
}

/* daily test report */
.mt-dt-last {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.mt-dt-score {
    min-width: 110px;
    padding: 14px 16px;
    border-radius: 16px;
    text-align: center;
    background: color-mix(in srgb, var(--brand) 10%, var(--surface));
    border: 1px solid var(--line);
}

.mt-dt-score strong {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.mt-dt-score span {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-soft);
}

.mt-dt-last b {
    display: block;
    margin-bottom: 4px;
}

.mt-dt-line {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin: 6px 0 0;
    font-size: 0.84rem;
    color: var(--text-soft);
}

.mt-dt-line.is-good i {
    color: var(--good);
}

.mt-dt-line.is-bad i {
    color: var(--bad);
}

.mt-dt-chart {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 130px;
    margin-top: 18px;
    padding: 0 0 0 18px;
    border-bottom: 1px solid var(--line);
}

.mt-dt-axis {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 0.7rem;
    color: var(--muted);
}

.mt-dt-col {
    flex: 1;
    min-width: 0;
    max-width: 46px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
}

.mt-dt-col small {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-soft);
    font-variant-numeric: tabular-nums;
}

.mt-dt-bar {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: flex-end;
}

.mt-dt-bar > span {
    width: 100%;
    border-radius: 4px 4px 0 0;
    background: color-mix(in srgb, var(--brand) 60%, var(--surface));
}

.mt-dt-col:last-child .mt-dt-bar > span {
    background: var(--brand);
}

.mt-dt-col em {
    font-style: normal;
    font-size: 0.66rem;
    color: var(--muted);
    transform: translateY(16px);
    height: 0;
}

/* predictor + mock rows */
.mt-pr-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 28px;
    margin-bottom: 14px;
}

.mt-pr-big strong {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.mt-pr-big span {
    margin-left: 6px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--muted);
}

.mt-pr-side {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mt-pr-side small {
    color: var(--muted);
    font-size: 0.76rem;
}

.mt-spark polyline {
    fill: none;
    stroke: var(--brand);
    stroke-width: 2;
    stroke-linejoin: round;
}

.mt-spark circle {
    fill: var(--brand);
    stroke: var(--surface);
    stroke-width: 2;
}

.mt-pr-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mt-pr-row {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) 80px minmax(0, 200px);
    gap: 12px;
    align-items: center;
    font-size: 0.86rem;
}

.mt-pr-row > span:first-child {
    font-weight: 700;
}

.mt-pr-row b {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.mt-pr-row b small {
    color: var(--muted);
    font-weight: 600;
}

.mt-pr-row > small {
    color: var(--muted);
    font-size: 0.76rem;
}

.mt-pr-row.is-missing {
    opacity: .6;
}

.mt-tips {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.mt-tips li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--brand) 7%, transparent);
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--text-soft);
}

.mt-tips li i {
    margin-top: 3px;
    color: var(--brand);
}

/* syllabus map */
.mt-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 12px 0;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-soft);
}

.mt-leg i {
    margin-right: 5px;
    color: var(--st);
}

.mt-map {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 8px;
}

.mt-cell {
    --st: var(--muted);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 9px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--st);
    background: color-mix(in srgb, var(--st) 8%, var(--surface));
    color: var(--text);
    text-decoration: none;
    min-width: 0;
}

.mt-cell i {
    grid-row: span 2;
    color: var(--st);
}

.mt-cell span {
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mt-cell small {
    font-size: 0.72rem;
    color: var(--muted);
}

.mt-cell:hover {
    border-color: var(--st);
}

.mt-cell.is-slow::after {
    content: "\f625";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

.mt-cell.is-strong, .mt-leg.is-strong { --st: var(--good); }
.mt-cell.is-good, .mt-leg.is-good { --st: color-mix(in srgb, var(--good) 60%, var(--brand)); }
.mt-cell.is-started, .mt-leg.is-started { --st: var(--brand); }
.mt-cell.is-weak, .mt-leg.is-weak { --st: var(--warn); }
.mt-cell.is-critical, .mt-leg.is-critical { --st: var(--bad); }
.mt-cell.is-new, .mt-leg.is-new { --st: var(--muted); }

.mt-cell.is-new {
    background: var(--surface);
}

.mt-slow {
    margin-top: 16px;
    padding: 14px;
    border-radius: 14px;
    border: 1px dashed var(--line);
}

.mt-slow > strong {
    display: block;
    font-size: 0.92rem;
}

.mt-slow > p {
    margin: 4px 0 10px;
    font-size: 0.8rem;
    color: var(--muted);
}

.mt-slow-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    padding: 8px 0;
    border-top: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
    font-size: 0.84rem;
}

.mt-slow-row small {
    color: var(--muted);
}

.mt-slow-time {
    font-size: 0.78rem;
    color: var(--warn);
    font-weight: 700;
}

/* badges */
.mt-badges {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.mt-badge {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface);
    opacity: .75;
}

.mt-badge > i {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--muted);
    background: var(--line);
}

.mt-badge strong {
    font-size: 0.85rem;
}

.mt-badge small {
    font-size: 0.74rem;
    color: var(--muted);
}

.mt-badge.is-earned {
    opacity: 1;
    border-color: color-mix(in srgb, #f5a623 50%, var(--line));
}

.mt-badge.is-earned > i {
    color: #fff;
    background: linear-gradient(140deg, #f5a623, #f07b16);
}

.mt-badge.is-earned small {
    color: var(--good);
    font-weight: 700;
}

/* report */
.mt-report .mt-kpis {
    margin-top: 4px;
}

.mt-report .ak-ghost[aria-pressed="true"] {
    border-color: var(--good);
    color: var(--good);
}

/* chat */
.mt-chat {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.mt-chat-h {
    display: block;
    margin-bottom: 10px;
}

.mt-chat-log {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
    padding: 2px;
}

.mt-msg {
    max-width: 82%;
    padding: 10px 13px;
    border-radius: 14px;
    font-size: 0.88rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.mt-msg.is-mentor {
    align-self: flex-start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-bottom-left-radius: 4px;
}

.mt-msg.is-me {
    align-self: flex-end;
    background: var(--brand);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.mt-chat .mt-opts {
    margin-top: 10px;
}

.mt-chat .mt-opt {
    font-size: 0.78rem;
    padding: 7px 12px;
}

.mt-chat-form {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.mt-chat-form .mt-field {
    padding-left: 14px;
    max-width: none;
}

/* lock (no Pro Plus) */
.mt-lock-list {
    list-style: none;
    margin: 6px 0 14px;
    padding: 0;
    text-align: left;
    font-size: 0.84rem;
    line-height: 1.7;
}

.mt-lock-list i {
    margin-right: 8px;
    color: var(--good);
}

@media (max-width: 900px) {
    .mt-habit {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .mt-checkin {
        grid-column: 1 / -1;
        align-items: flex-start;
    }

    .mt-pr-row {
        grid-template-columns: 90px minmax(0, 1fr) 70px;
    }

    .mt-pr-row > small {
        grid-column: 2 / -1;
        margin-top: -6px;
    }
}

@media (max-width: 560px) {
    .mt-dt-last {
        grid-template-columns: minmax(0, 1fr);
    }

    .mt-pr-big strong {
        font-size: 2.4rem;
    }

    .mt-map {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mt-msg {
        max-width: 92%;
    }
}

.mt-locked-plan {
    min-height: 420px;
}

.mt-locked-plan .mt-tasks {
    filter: blur(4px);
    pointer-events: none;
    user-select: none;
}

/* The tick is the records' word, not a button (2026-11-19). */
.mt-check.is-locked {
    cursor: not-allowed;
}

.mt-check.is-locked:hover {
    border-color: var(--line);
}

.mt-task.is-done .mt-check.is-locked {
    cursor: default;
}

/* ---------------------------------------- home: this week's study ranking */

.sr-board {
    padding: 22px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background:
        radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, #f5b301 10%, transparent), transparent 55%),
        var(--surface);
    box-shadow: var(--shadow-sm);
}

.sr-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.sr-head h2 {
    margin: 0;
    font-size: 1.15rem;
}

.sr-head h2 i {
    color: #f5b301;
}

.sr-head p {
    margin: 4px 0 0;
    font-size: 0.84rem;
    color: var(--muted);
}

.sr-tabs {
    display: inline-flex;
    padding: 3px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.sr-tabs button {
    border: 0;
    background: transparent;
    color: var(--text-soft);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.sr-tabs button[aria-pressed="true"] {
    background: var(--brand);
    color: #fff;
}

.sr-me {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--brand) 10%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line));
}

.sr-me-rank {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--brand);
    font-variant-numeric: tabular-nums;
}

.sr-me-rank small {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 700;
}

.sr-me strong {
    display: block;
    font-size: 0.95rem;
}

.sr-me span > small {
    font-size: 0.8rem;
    color: var(--text-soft);
}

.sr-list {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sr-row {
    display: grid;
    grid-template-columns: 42px minmax(110px, 200px) minmax(0, 1fr) 110px;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 12px;
}

.sr-row.is-me {
    background: color-mix(in srgb, var(--brand) 12%, transparent);
    outline: 1px solid color-mix(in srgb, var(--brand) 40%, transparent);
}

.sr-rank {
    position: relative;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--line);
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.sr-rank.is-medal {
    background: color-mix(in srgb, var(--medal) 22%, var(--surface));
    color: var(--medal);
}

.sr-rank.is-medal i {
    position: absolute;
    font-size: 1.25rem;
    opacity: .25;
}

.sr-rank.is-medal b {
    position: relative;
    color: var(--text);
}

.sr-name {
    min-width: 0;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sr-name em {
    font-style: normal;
    font-size: 0.7rem;
    padding: 1px 7px;
    margin-left: 4px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
}

.sr-name small {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--muted);
}

.sr-bar {
    height: 10px;
    border-radius: 999px;
    background: var(--line);
    overflow: hidden;
}

.sr-bar > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand) 70%, var(--surface));
}

.sr-row.is-me .sr-bar > span {
    background: var(--brand);
}

.sr-time {
    text-align: right;
    font-weight: 700;
    font-size: 0.86rem;
    font-variant-numeric: tabular-nums;
}

.sr-gapline {
    text-align: center;
    color: var(--muted);
    line-height: 1;
}

.sr-empty {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 16px;
    padding: 18px;
    border-radius: 12px;
    border: 1px dashed var(--line);
    color: var(--text-soft);
    font-size: 0.88rem;
}

.sr-note {
    margin: 14px 0 0;
    font-size: 0.74rem;
    color: var(--muted);
}

@media (max-width: 640px) {
    .sr-board {
        padding: 18px 16px;
    }

    .sr-row {
        grid-template-columns: 36px minmax(0, 1fr) auto;
        row-gap: 4px;
    }

    .sr-bar {
        grid-column: 2 / -1;
        grid-row: 2;
        height: 7px;
    }
}

/* ------------------------------------------- home: quick cards (bento) */
/* index.html .ak-bento: the Mentor and "continue" beside this week's study
   ranking, so they take one screen. Areas fall back when the Mentor or the
   ranking is hidden (signed out, not loaded). The Study Lab tile is hidden
   for now (2026-11-20), so it has no area: give it one back with it. */

.ak-bento {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 2fr) minmax(330px, 1.15fr);
    grid-template-areas:
        "mentor rank"
        "resume rank";
    align-items: stretch;
}

.ak-bento > [hidden] {
    display: none !important;
}

.ak-bento > #mentor-card { grid-area: mentor; min-width: 0; }
.ak-bento > .ak-lab-promo { grid-area: lab; }
.ak-bento > .ak-resume { grid-area: resume; align-self: end; }
.ak-bento > #study-rank { grid-area: rank; min-width: 0; }

.ak-bento:has(> #study-rank[hidden]) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "mentor" "resume";
}

.ak-bento:has(> #mentor-card[hidden]) {
    grid-template-areas: "resume rank";
}

.ak-bento:has(> #mentor-card[hidden]):has(> #study-rank[hidden]) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "resume";
}

/* Mentor tile */
.ak-bento #mentor-card,
.ak-bento #mentor-card .mt-card {
    height: 100%;
}

.ak-bento .mt-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 18px;
    border-radius: var(--radius-lg);
}

.ak-bento .mt-card .mt-avatar {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
    border-radius: 13px;
}

.ak-bento .mt-card-copy {
    min-width: 0;
    width: 100%;
}

.ak-bento .mt-card-copy strong {
    margin-top: 6px;
    font-size: 0.98rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ak-bento .mt-card-copy > small {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ak-bento .mt-card-list {
    margin-top: 8px;
}

.ak-bento .mt-card > .ak-mock-cta {
    margin-top: auto;
    width: auto;
    padding: 9px 14px;
    font-size: 0.84rem;
}

/* Study Lab tile */
.ak-bento .ak-lab-promo {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 18px;
}

.ak-bento .ak-lab-promo-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 18px;
}

.ak-bento .ak-lab-promo strong {
    font-size: 0.98rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ak-bento .ak-lab-promo small {
    display: none;
}

.ak-bento .ak-lab-promo-copy {
    gap: 6px;
    width: 100%;
}

.ak-bento .ak-lab-promo-src {
    font-size: 12px;
    gap: 4px 10px;
}

.ak-bento .ak-lab-promo-cta {
    margin-top: auto;
    padding: 9px 14px;
    font-size: 0.84rem;
}

/* Continue tile */
.ak-bento .ak-resume {
    padding: 12px 16px;
    border-radius: var(--radius-lg);
}

/* Ranking, compact */
.ak-bento .sr-board {
    padding: 18px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ak-bento .sr-head h2 {
    font-size: 1.02rem;
}

.ak-bento .sr-head p {
    font-size: 0.76rem;
}

.ak-bento .sr-tabs button {
    padding: 5px 10px;
    font-size: 0.74rem;
}

.ak-bento .sr-me {
    margin-top: 12px;
    padding: 9px 12px;
    gap: 10px;
}

.ak-bento .sr-me-rank {
    font-size: 1.3rem;
}

.ak-bento .sr-me strong {
    font-size: 0.85rem;
}

.ak-bento .sr-me span > small {
    font-size: 0.74rem;
}

.ak-bento .sr-list {
    margin-top: 10px;
    gap: 2px;
}

.ak-bento .sr-row {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    column-gap: 10px;
    row-gap: 3px;
    padding: 5px 8px;
}

.ak-bento .sr-rank {
    width: 28px;
    height: 28px;
    font-size: 0.78rem;
    grid-row: span 2;
}

.ak-bento .sr-name {
    font-size: 0.84rem;
}

.ak-bento .sr-name small {
    display: none;
}

.ak-bento .sr-bar {
    grid-column: 2 / -1;
    grid-row: 2;
    height: 5px;
}

.ak-bento .sr-time {
    font-size: 0.8rem;
}

.ak-bento .sr-more {
    align-self: flex-start;
    margin-top: 8px;
    border: 0;
    background: transparent;
    color: var(--brand);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 0;
}

.ak-bento .sr-note {
    display: none;
}

.ak-bento .sr-empty {
    margin-top: 12px;
    padding: 14px;
    font-size: 0.82rem;
}

@media (max-width: 1280px) {
    .ak-bento,
    .ak-bento:has(> #mentor-card[hidden]) {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "mentor"
            "resume"
            "rank";
    }

    .ak-bento:has(> #mentor-card[hidden]) {
        grid-template-areas: "resume" "rank";
    }
}

@media (max-width: 640px) {
    .ak-bento,
    .ak-bento:has(> #mentor-card[hidden]),
    .ak-bento:has(> #study-rank[hidden]) {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "resume" "mentor" "rank";
        gap: 12px;
    }

    .ak-bento .mt-card,
    .ak-bento .ak-lab-promo {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 6px 12px;
        padding: 14px;
    }

    .ak-bento .mt-card > .ak-mock-cta,
    .ak-bento .ak-lab-promo-cta {
        grid-column: 1 / -1;
        justify-self: stretch;
        justify-content: center;
        margin-top: 4px;
    }

    .ak-bento .ak-lab-promo-src {
        display: none;
    }
}

/* ── Coming soon (2026-11-20) ─────────────────────────────────────────
   Home: the Mentor tile lists what it will do (core/mentorCard.js).
   mentor.html: a banner over a look-only page (core/mentorPage.js). */

.mt-soon-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    color: #8a5a00;
    background: rgba(251, 188, 4, 0.18);
    border: 1px solid rgba(251, 188, 4, 0.45);
}

html[data-theme="dark"] .mt-soon-pill {
    color: #fdd663;
    background: rgba(253, 214, 99, 0.12);
    border-color: rgba(253, 214, 99, 0.35);
}

#mentor-card .mt-soon {
    height: 100%;
}

.mt-soon {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background:
        radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, #7b4cf6 16%, transparent), transparent 60%),
        radial-gradient(70% 90% at 0% 100%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 65%),
        var(--surface);
    box-shadow: var(--shadow-sm);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s, transform 0.15s;
}

.mt-soon:hover {
    border-color: color-mix(in srgb, #7b4cf6 45%, var(--line));
}

.mt-soon-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.mt-soon-head .mt-avatar {
    width: 56px;
    height: 56px;
    font-size: 1.45rem;
    border-radius: 17px;
}

.mt-soon-titles {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.mt-soon-titles strong {
    font-size: clamp(1.1rem, 1.6vw, 1.35rem);
    line-height: 1.3;
    letter-spacing: -0.2px;
}

.mt-soon-sub {
    color: var(--text-soft);
    font-size: 0.92rem;
    line-height: 1.55;
}

.mt-soon-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.mt-soon-feat {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.mt-soon-feat > i {
    flex: 0 0 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #7b4cf6;
    background: color-mix(in srgb, #7b4cf6 14%, transparent);
}

html[data-theme="dark"] .mt-soon-feat > i {
    color: #b9a2ff;
}

.mt-soon-feat > span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.mt-soon-feat b {
    font-size: 0.9rem;
}

.mt-soon-feat small {
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.4;
}

.mt-soon-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: auto;
}

.mt-soon-foot small {
    color: var(--muted);
    font-size: 0.82rem;
}

.mt-soon-foot .ak-mock-cta {
    width: auto;
    margin: 0;
    padding: 12px 20px;
    border-color: transparent;
    background: linear-gradient(135deg, var(--brand), #7b4cf6);
    color: #fff;
}

.mt-soon-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding: 16px 18px;
    border-radius: var(--radius);
    border: 1px solid rgba(251, 188, 4, 0.45);
    background: linear-gradient(120deg, rgba(251, 188, 4, 0.14), transparent 75%), var(--surface);
}

.mt-soon-icon {
    flex: 0 0 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #8a5a00;
    background: rgba(251, 188, 4, 0.22);
}

html[data-theme="dark"] .mt-soon-icon {
    color: #fdd663;
}

.mt-soon-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.mt-soon-copy span {
    color: var(--text-soft);
    font-size: 0.88rem;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .mt-soon-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Look, don't touch: actions read as switched off. */
.mt-root.is-preview a:not([data-day]),
.mt-root.is-preview button:not([data-day]):not([data-trend-days]):not([data-trend-subj]) {
    cursor: not-allowed;
}

@media (max-width: 640px) {
    .mt-soon {
        padding: 18px;
        gap: 14px;
    }

    .mt-soon-head .mt-avatar {
        width: 46px;
        height: 46px;
        font-size: 1.2rem;
    }

    .mt-soon-head {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 12px 14px;
        align-items: center;
    }

    .mt-soon-head .mt-soon-pill {
        grid-column: 1 / -1;
        grid-row: 1;
        justify-self: start;
    }

    .mt-soon-titles strong {
        font-size: 1.05rem;
    }

    .mt-soon-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .mt-soon-foot .ak-mock-cta {
        width: 100%;
        justify-content: center;
    }

    .mt-soon-banner {
        align-items: flex-start;
        flex-wrap: wrap;
    }
}

/* ---------------------------------------- Mentor waitlist: Register */

.mt-soon-copy .mt-soon-pill {
    margin-left: 8px;
    padding: 3px 10px;
    font-size: 0.72rem;
    vertical-align: middle;
    color: #8a5a00;
}

html[data-theme="dark"] .mt-soon-copy .mt-soon-pill {
    color: #fdd663;
}

.mt-reg {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
    text-align: right;
}

.mt-reg small,
.mt-soon-copy .mt-reg small {
    font-size: 0.74rem;
    color: var(--muted);
}

.mt-reg-count {
    font-weight: 700;
}

.mt-reg-btn {
    padding: 11px 22px;
    font-size: 0.95rem;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.28);
}

.mt-root.is-preview .mt-reg-btn {
    cursor: pointer;
}

.mt-reg-btn[disabled] {
    opacity: 0.75;
    cursor: wait;
}

.mt-reg-done {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--good);
    background: color-mix(in srgb, var(--good) 13%, transparent);
    border: 1px solid color-mix(in srgb, var(--good) 40%, transparent);
}

.mt-soon-actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.mt-soon-actions .mt-reg-btn {
    padding: 12px 20px;
}

@media (max-width: 640px) {
    .mt-soon-banner {
        flex-wrap: wrap;
    }

    .mt-reg {
        width: 100%;
        align-items: stretch;
        text-align: left;
    }

    .mt-reg-btn {
        justify-content: center;
    }

    .mt-soon-actions {
        width: 100%;
    }

    .mt-soon-actions > * {
        flex: 1;
        justify-content: center;
    }
}

/* Not on Pro Plus: the Register button offers the plan instead. */
.mt-reg-btn.is-plus {
    background: linear-gradient(135deg, #7b4cf6, #c026d3);
    box-shadow: 0 8px 20px rgba(123, 76, 246, 0.28);
}

.mt-root.is-preview .mt-reg-btn.is-plus {
    cursor: pointer;
}
