:root {
    --learning-ink: #1b2333;
    --learning-muted: #77839a;
    --learning-line: rgba(37, 50, 76, .12);
    --learning-surface: #ffffff;
    --learning-soft: #f6f8fc;
    --learning-accent: #635bff;
    --learning-accent-dark: #4e45dc;
    --learning-shadow: 0 22px 60px rgba(61, 70, 102, .13);
}

.fuuvo-learning-app {
    background:
        radial-gradient(circle at 78% 2%, rgba(219, 229, 255, .7), transparent 34%),
        #f7f8fc;
    color: var(--learning-ink);
}

.fuuvo-learning-main {
    position: relative;
    min-height: 100%;
    overflow-x: hidden;
    padding-bottom: 112px;
}

.learning-page {
    width: min(1140px, calc(100% - 68px));
    margin: 0 auto;
    padding: 36px 0 28px;
}

.learning-intro {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 172px;
    margin-bottom: 22px;
    padding: 28px 36px;
    overflow: hidden;
    border: 1px solid rgba(109, 124, 170, .14);
    border-radius: 30px;
    background:
        linear-gradient(105deg, rgba(255,255,255,.94), rgba(245,247,255,.84)),
        radial-gradient(circle at 76% 38%, rgba(158, 174, 255, .28), transparent 32%);
    box-shadow: 0 14px 40px rgba(69, 86, 134, .08);
}

.learning-intro::after {
    position: absolute;
    right: 18%;
    bottom: -72px;
    width: 290px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 203, 126, .18);
    content: "";
    filter: blur(5px);
    transform: rotate(-10deg);
}

.learning-intro-copy {
    position: relative;
    z-index: 1;
    max-width: 650px;
}

.learning-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    color: #6b5cf6;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.learning-eyebrow::before {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    content: "";
}

.learning-intro h1 {
    margin: 0;
    color: #20283c;
    font-size: clamp(29px, 4vw, 46px);
    font-weight: 760;
    letter-spacing: -.04em;
    line-height: 1.12;
}

.learning-intro p {
    max-width: 540px;
    margin: 12px 0 0;
    color: var(--learning-muted);
    font-size: 15px;
    line-height: 1.65;
}

.learning-intro-orbit {
    position: relative;
    width: 178px;
    height: 140px;
    margin-right: 12px;
    transform: rotate(-9deg);
}

.learning-intro-orbit::before,
.learning-intro-orbit::after {
    position: absolute;
    inset: 14px 4px;
    border: 1px solid rgba(115, 102, 242, .23);
    border-radius: 50%;
    content: "";
    transform: rotate(26deg);
}

.learning-intro-orbit::after {
    inset: 26px -2px;
    border-color: rgba(251, 179, 112, .35);
    transform: rotate(-35deg);
}

.learning-orbit-book {
    position: absolute;
    top: 43px;
    left: 62px;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 21px;
    background: linear-gradient(145deg, #756bff, #9a8dff);
    color: #fff;
    box-shadow: 0 16px 28px rgba(99, 91, 255, .28);
}

.learning-orbit-book svg {
    width: 28px;
    height: 28px;
    stroke-width: 1.35;
}

.learning-orbit-dot {
    position: absolute;
    z-index: 1;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.learning-orbit-dot.dot-one {
    top: 15px;
    right: 36px;
    background: #ffc66f;
}

.learning-orbit-dot.dot-two {
    right: 8px;
    bottom: 27px;
    width: 14px;
    height: 14px;
    background: #86d3c4;
}

.learning-orbit-dot.dot-three {
    bottom: 19px;
    left: 23px;
    background: #fa9dbe;
}

.learning-category-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    margin: 0 2px 18px;
    padding: 0 2px 4px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.learning-category-tabs::-webkit-scrollbar {
    display: none;
}

.learning-category-tabs button {
    flex: 0 0 auto;
    min-height: 37px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #7d879b;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    transition: background .18s ease, color .18s ease, transform .18s ease;
    scroll-snap-align: start;
}

.learning-category-tabs button:hover {
    color: #5148da;
    transform: translateY(-1px);
}

.learning-category-tabs button.is-active {
    background: #2c3451;
    color: #fff;
    box-shadow: 0 8px 18px rgba(44, 52, 81, .16);
}

.learning-category-tabs .learning-history-tab {
    display: grid;
    width: 38px;
    height: 37px;
    margin-left: 2px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(83, 96, 130, .15);
}

.learning-category-tabs .learning-history-tab[aria-pressed="true"] {
    border-color: rgba(99, 91, 255, .28);
    background: #ecebff;
    color: #5b52df;
}

.learning-history-tab svg {
    width: 17px;
    height: 17px;
}

.learning-review-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 22px;
    padding: 15px 18px;
    border: 1px solid rgba(99, 91, 255, .13);
    border-radius: 18px;
    background: linear-gradient(90deg, rgba(237, 237, 255, .98), rgba(250, 248, 255, .88));
}

.learning-review-spark {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 13px;
    background: #fff;
    color: #6d61f0;
    font-size: 20px;
    box-shadow: 0 7px 16px rgba(99, 91, 255, .12);
}

.learning-review-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.learning-review-copy strong {
    color: #3a4064;
    font-size: 14px;
}

.learning-review-copy span {
    overflow: hidden;
    color: #838aa1;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.learning-review-banner button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 8px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #5e55e1;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.learning-review-banner button:hover {
    background: rgba(255,255,255,.7);
}

.learning-library-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 4px 2px 12px;
}

.learning-library-heading > div {
    display: grid;
    gap: 3px;
}

.learning-library-heading span {
    color: #7669e8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.learning-library-heading strong {
    color: #303852;
    font-size: 18px;
    letter-spacing: -.02em;
}

.learning-library-heading small {
    color: #929caf;
    font-size: 12px;
    white-space: nowrap;
}

.learning-template-section {
    margin: 0 0 24px;
    padding: 18px 18px 16px;
    border: 1px solid rgba(99, 91, 255, .12);
    border-radius: 22px;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 10px 28px rgba(64, 78, 120, .06);
}

.learning-template-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 14px;
}

.learning-template-heading > div {
    display: grid;
    gap: 4px;
}

.learning-template-eyebrow {
    color: #7669e8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.learning-template-heading h2 {
    margin: 0;
    color: #303852;
    font-size: 18px;
    letter-spacing: -.02em;
}

.learning-template-heading > span {
    color: #929caf;
    font-size: 12px;
    white-space: nowrap;
}

.learning-template-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.learning-template-card {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 72px;
    padding: 10px 11px;
    border: 1px solid rgba(82, 94, 135, .1);
    border-radius: 15px;
    background: #fff;
    color: #2f3852;
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.learning-template-card:hover,
.learning-template-card:focus-visible {
    border-color: rgba(99, 91, 255, .32);
    box-shadow: 0 10px 23px rgba(74, 80, 140, .12);
    outline: none;
    transform: translateY(-2px);
}

.learning-template-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: #6860dc;
    font-size: 17px;
    font-weight: 800;
}

.learning-template-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.learning-template-copy strong {
    overflow: hidden;
    color: #303952;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.learning-template-copy small {
    overflow: hidden;
    color: #8a94a8;
    font-size: 11px;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.learning-template-arrow {
    color: #9aa3b5;
    font-size: 17px;
}

.learning-template-card.tone-coral .learning-template-icon {
    background: linear-gradient(145deg, #ee8a84, #d96778);
}

.learning-template-card.tone-violet .learning-template-icon {
    background: linear-gradient(145deg, #8274ed, #6056d2);
}

.learning-template-card.tone-mint .learning-template-icon {
    background: linear-gradient(145deg, #55bca5, #3a9c94);
}

.learning-template-card.tone-sunrise .learning-template-icon {
    background: linear-gradient(145deg, #f2ae60, #e78563);
}

.learning-template-card.tone-sky .learning-template-icon {
    background: linear-gradient(145deg, #65a8eb, #5571d0);
}

.learning-template-card.tone-lavender .learning-template-icon {
    background: linear-gradient(145deg, #b37de6, #7968c8);
}

.learning-feed {
    column-count: 3;
    column-gap: 16px;
}

.knowledge-card {
    position: relative;
    display: inline-flex;
    width: 100%;
    min-height: 186px;
    flex-direction: column;
    margin: 0 0 16px;
    overflow: hidden;
    border: 1px solid rgba(64, 75, 110, .08);
    border-radius: 22px;
    background: var(--learning-surface);
    box-shadow: 0 10px 26px rgba(64, 78, 120, .08);
    cursor: pointer;
    isolation: isolate;
    outline: none;
    break-inside: avoid;
    transition: box-shadow .2s ease, transform .2s ease;
}

.knowledge-card::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(140deg, rgba(255,255,255,.3), transparent 48%);
    content: "";
    pointer-events: none;
}

.knowledge-card:hover,
.knowledge-card:focus-visible {
    box-shadow: 0 18px 38px rgba(53, 66, 108, .16);
    transform: translateY(-3px);
}

.knowledge-card.is-reviewing {
    animation: learning-review-highlight .7s ease both;
}

@keyframes learning-review-highlight {
    0% { box-shadow: 0 0 0 0 rgba(99, 91, 255, 0); }
    45% { box-shadow: 0 0 0 7px rgba(99, 91, 255, .2), 0 20px 40px rgba(99, 91, 255, .18); }
    100% { box-shadow: 0 10px 26px rgba(64, 78, 120, .08); }
}

.knowledge-card.is-hidden {
    display: none;
}

.knowledge-card-image {
    position: relative;
    min-height: 134px;
    overflow: hidden;
    background: #e9eefc;
}

.knowledge-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 134px;
    object-fit: cover;
    transition: transform .35s ease;
}

.knowledge-card:hover .knowledge-card-image img {
    transform: scale(1.045);
}

.knowledge-card-image-glow {
    position: absolute;
    right: -20px;
    bottom: -40px;
    width: 130px;
    height: 88px;
    border-radius: 50%;
    background: rgba(255, 221, 165, .32);
    filter: blur(3px);
}

.knowledge-card-copy {
    display: grid;
    gap: 6px;
    padding: 15px 17px 17px;
}

.knowledge-card-category {
    color: #8c96a9;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
}

.knowledge-card h2 {
    margin: 0;
    color: #2c344a;
    font-size: 18px;
    font-weight: 740;
    letter-spacing: -.025em;
    line-height: 1.3;
}

.knowledge-card p {
    margin: 0;
    color: #7d879c;
    font-size: 13px;
    line-height: 1.55;
}

.knowledge-card-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 2px;
    color: #5b52df;
    font-size: 12px;
    font-weight: 700;
}

.knowledge-card-link b {
    font-size: 15px;
    font-weight: 500;
}

.knowledge-card-quote-mark {
    position: absolute;
    top: -13px;
    right: 15px;
    color: rgba(255,255,255,.38);
    font-family: Georgia, serif;
    font-size: 106px;
    line-height: 1;
    pointer-events: none;
}

.knowledge-card.card-quote .knowledge-card-copy {
    min-height: 214px;
    padding-top: 56px;
}

.knowledge-card.tone-midnight {
    background: linear-gradient(150deg, #3b416f, #24294e);
}

.knowledge-card.tone-midnight h2,
.knowledge-card.tone-midnight .knowledge-card-category,
.knowledge-card.tone-midnight p {
    color: #fff;
}

.knowledge-card.tone-midnight .knowledge-card-category {
    color: rgba(255,255,255,.63);
}

.knowledge-card.tone-apricot {
    background: linear-gradient(145deg, #fff0d5, #ffdbb0);
}

.knowledge-card.tone-apricot .knowledge-card-category {
    color: #a8753a;
}

.knowledge-card.tone-sage {
    background: linear-gradient(145deg, #e6f3e8, #cce6d0);
}

.knowledge-card.tone-sage .knowledge-card-category {
    color: #5c8a69;
}

.knowledge-card.tone-lavender {
    background: linear-gradient(145deg, #eeeaff, #ddd7fa);
}

.knowledge-card.tone-lavender .knowledge-card-category {
    color: #6d60a6;
}

.knowledge-card.tone-sunrise {
    background: linear-gradient(145deg, #fff2d6, #ffe2cc);
}

.knowledge-card.tone-sky {
    background: linear-gradient(145deg, #e8f3ff, #d9eaff);
}

.knowledge-card.tone-cloud {
    background: linear-gradient(145deg, #eaf2f4, #d9e6ed);
}

.knowledge-card.tone-mint {
    background: linear-gradient(145deg, #e7f7ef, #d6eee8);
}

.learning-empty-state {
    display: grid;
    min-height: 260px;
    margin: 0 0 16px;
    padding: 30px;
    place-items: center;
    border: 1px dashed rgba(91, 82, 223, .24);
    border-radius: 22px;
    background: rgba(255,255,255,.58);
    text-align: center;
}

.learning-empty-state[hidden] {
    display: none;
}

.learning-empty-icon {
    display: grid;
    width: 46px;
    height: 46px;
    margin-bottom: 10px;
    place-items: center;
    border-radius: 15px;
    background: #ecebff;
    color: #665de7;
    font-size: 23px;
}

.learning-empty-state strong {
    color: #394057;
}

.learning-empty-state p {
    max-width: 350px;
    margin: 8px 0 0;
    color: #8a93a5;
    font-size: 13px;
    line-height: 1.6;
}

.learning-ai-note {
    margin: 20px 4px 0;
    color: #99a2b2;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.learning-question-dock {
    position: fixed;
    z-index: 20;
    right: 50%;
    bottom: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 58px;
    padding: 7px 9px;
    border: 1px solid rgba(89, 100, 143, .12);
    border-radius: 20px;
    background: rgba(255,255,255,.9);
    box-shadow: 0 18px 40px rgba(53, 65, 107, .16);
    backdrop-filter: blur(18px);
    transform: translateX(50%);
}

.learning-dock-action,
.learning-speak-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: #69758e;
    cursor: pointer;
    font: inherit;
    text-decoration: none;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.learning-dock-action:hover,
.learning-speak-action:hover {
    background: #f0efff;
    color: #5a51de;
    transform: translateY(-1px);
}

.learning-dock-action svg,
.learning-speak-action svg {
    width: 21px;
    height: 21px;
}

.learning-speak-action {
    min-width: 138px;
    gap: 8px;
    padding: 0 15px;
    border: 1px solid rgba(91, 82, 223, .14);
    background: #f7f6ff;
    color: #534bd1;
    font-size: 13px;
    font-weight: 700;
}

.learning-speak-action.is-listening {
    background: #feeef0;
    color: #d15468;
    box-shadow: 0 0 0 5px rgba(238, 112, 132, .11);
}

.learning-speak-action.is-listening .learning-speak-icon {
    animation: learning-pulse 1s ease-in-out infinite;
}

@keyframes learning-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.18); }
}

.learning-question-sheet {
    position: fixed;
    z-index: 19;
    right: 50%;
    bottom: 92px;
    width: min(540px, calc(100% - 32px));
    padding: 16px;
    border: 1px solid rgba(89, 100, 143, .13);
    border-radius: 18px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 16px 40px rgba(53, 65, 107, .16);
    transform: translateX(50%);
}

.learning-question-sheet[hidden] {
    display: none;
}

.learning-question-sheet label {
    display: block;
    margin-bottom: 9px;
    color: #556078;
    font-size: 13px;
    font-weight: 700;
}

.learning-question-input-row {
    display: flex;
    gap: 8px;
}

.learning-question-input-row input {
    min-width: 0;
    flex: 1;
    height: 43px;
    padding: 0 13px;
    border: 1px solid rgba(89, 100, 143, .16);
    border-radius: 12px;
    background: #fbfcff;
    color: #283249;
    font: inherit;
    font-size: 14px;
    outline: none;
}

.learning-question-input-row input:focus {
    border-color: rgba(99, 91, 255, .48);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, .1);
}

.learning-question-input-row button {
    width: 43px;
    border: 0;
    border-radius: 12px;
    background: #6259e6;
    color: #fff;
    cursor: pointer;
    font-size: 20px;
}

.learning-question-sheet p {
    min-height: 16px;
    margin: 7px 2px 0;
    color: #8b95a7;
    font-size: 12px;
}

.learning-detail-view {
    position: fixed;
    z-index: 60;
    inset: 0;
    display: grid;
    place-items: center;
}

.learning-detail-view[hidden] {
    display: none;
}

.learning-detail-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(21, 27, 48, .48);
    backdrop-filter: blur(5px);
}

.learning-detail-panel {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(700px, calc(100% - 36px));
    max-height: min(820px, calc(100% - 38px));
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.6);
    border-radius: 28px;
    background: #fbfcff;
    box-shadow: 0 35px 100px rgba(13, 19, 45, .3);
}

.learning-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    padding: 0 20px;
    border-bottom: 1px solid rgba(55, 70, 104, .09);
}

.learning-detail-close,
.learning-detail-save {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #65718b;
    cursor: pointer;
    font: inherit;
    font-size: 23px;
}

.learning-detail-close:hover,
.learning-detail-save:hover,
.learning-detail-save.is-saved {
    background: #efefff;
    color: #5b52df;
}

.learning-detail-close svg {
    width: 21px;
    height: 21px;
}

.learning-detail-heading {
    display: grid;
    gap: 3px;
    text-align: center;
}

.learning-detail-heading span {
    color: #5149cc;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.learning-detail-heading strong {
    color: #99a2b1;
    font-size: 11px;
    font-weight: 500;
}

.learning-detail-scroll {
    overflow: auto;
    padding: 28px 32px 34px;
}

.learning-detail-meta {
    color: #685de4;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.learning-detail-scroll h2 {
    margin: 9px 0 0;
    color: #20283d;
    font-size: clamp(28px, 5vw, 40px);
    letter-spacing: -.04em;
    line-height: 1.17;
}

.learning-detail-subtitle {
    margin: 10px 0 0;
    color: #808ba0;
    font-size: 15px;
    line-height: 1.6;
}

.learning-detail-hero {
    margin: 22px 0;
    overflow: hidden;
    border-radius: 20px;
    background: #e9eefc;
}

.learning-detail-hero[hidden] {
    display: none;
}

.learning-detail-hero img {
    display: block;
    width: 100%;
    max-height: 240px;
    object-fit: cover;
}

.learning-one-liner {
    display: grid;
    gap: 7px;
    margin: 22px 0;
    padding: 17px 18px;
    border: 1px solid rgba(99, 91, 255, .15);
    border-radius: 16px;
    background: linear-gradient(120deg, #f1f0ff, #f9f8ff);
}

.learning-one-liner span {
    color: #6b62de;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.learning-one-liner strong {
    color: #363b60;
    font-size: 17px;
    line-height: 1.5;
}

.learning-detail-sections {
    display: grid;
    gap: 13px;
}

.learning-detail-section {
    padding: 16px 17px;
    border: 1px solid rgba(55, 70, 104, .1);
    border-radius: 16px;
    background: #fff;
}

.learning-detail-section h3 {
    margin: 0 0 7px;
    color: #313950;
    font-size: 15px;
}

.learning-detail-section p {
    margin: 0;
    color: #737e93;
    font-size: 14px;
    line-height: 1.68;
}

.learning-detail-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.learning-primary-action,
.learning-secondary-action {
    min-height: 42px;
    padding: 0 15px;
    border-radius: 12px;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
}

.learning-primary-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: #635bdf;
    color: #fff;
}

.learning-primary-action:hover {
    background: #534bd0;
}

.learning-secondary-action {
    border: 1px solid rgba(84, 96, 135, .15);
    background: #fff;
    color: #69758b;
}

.learning-secondary-action:hover {
    border-color: rgba(99, 91, 255, .25);
    color: #5a51dd;
}

body[data-ui-theme="dark"] .fuuvo-learning-app {
    --learning-ink: #edf1ff;
    --learning-muted: #a9b2c7;
    --learning-line: rgba(208, 216, 246, .14);
    --learning-surface: #20263a;
    --learning-soft: #1d2233;
    background: #141827;
}

body[data-ui-theme="dark"] .learning-intro {
    border-color: rgba(206, 215, 255, .11);
    background: linear-gradient(105deg, rgba(34, 40, 61, .96), rgba(30, 36, 57, .92));
}

body[data-ui-theme="dark"] .learning-intro h1,
body[data-ui-theme="dark"] .knowledge-card h2,
body[data-ui-theme="dark"] .learning-detail-scroll h2 {
    color: #f0f3ff;
}

body[data-ui-theme="dark"] .learning-category-tabs button {
    color: #aeb8cf;
}

body[data-ui-theme="dark"] .learning-category-tabs button.is-active {
    background: #eef0ff;
    color: #2c3451;
}

body[data-ui-theme="dark"] .learning-review-banner {
    border-color: rgba(158, 151, 255, .24);
    background: linear-gradient(90deg, rgba(65, 60, 117, .6), rgba(53, 54, 88, .55));
}

body[data-ui-theme="dark"] .learning-review-copy strong {
    color: #f0efff;
}

body[data-ui-theme="dark"] .learning-review-copy span,
body[data-ui-theme="dark"] .knowledge-card p {
    color: #b1b9cd;
}

body[data-ui-theme="dark"] .learning-template-section {
    border-color: rgba(158, 151, 255, .2);
    background: rgba(31, 37, 58, .78);
    box-shadow: none;
}

body[data-ui-theme="dark"] .learning-library-heading strong {
    color: #eef1ff;
}

body[data-ui-theme="dark"] .learning-library-heading small {
    color: #aeb8cf;
}

body[data-ui-theme="dark"] .learning-template-heading h2,
body[data-ui-theme="dark"] .learning-template-copy strong {
    color: #eef1ff;
}

body[data-ui-theme="dark"] .learning-template-heading > span,
body[data-ui-theme="dark"] .learning-template-copy small {
    color: #aeb8cf;
}

body[data-ui-theme="dark"] .learning-template-card {
    border-color: rgba(214, 222, 255, .12);
    background: #242b42;
    color: #eef1ff;
}

body[data-ui-theme="dark"] .learning-template-card:hover,
body[data-ui-theme="dark"] .learning-template-card:focus-visible {
    border-color: rgba(158, 151, 255, .45);
    box-shadow: 0 12px 24px rgba(2, 6, 19, .25);
}

body[data-ui-theme="dark"] .learning-template-arrow {
    color: #aeb8cf;
}

body[data-ui-theme="dark"] .knowledge-card {
    border-color: rgba(202, 211, 247, .08);
    box-shadow: 0 14px 30px rgba(2, 6, 19, .23);
}

body[data-ui-theme="dark"] .learning-question-dock,
body[data-ui-theme="dark"] .learning-question-sheet {
    border-color: rgba(214, 222, 255, .12);
    background: rgba(29, 35, 54, .93);
}

body[data-ui-theme="dark"] .learning-question-sheet label,
body[data-ui-theme="dark"] .learning-detail-section h3 {
    color: #e9edff;
}

body[data-ui-theme="dark"] .learning-question-input-row input {
    border-color: rgba(214, 222, 255, .13);
    background: #171d2c;
    color: #f2f4ff;
}

body[data-ui-theme="dark"] .learning-detail-panel {
    border-color: rgba(214, 222, 255, .15);
    background: #1b2133;
}

body[data-ui-theme="dark"] .learning-detail-header {
    border-color: rgba(214, 222, 255, .1);
}

body[data-ui-theme="dark"] .learning-detail-section {
    border-color: rgba(214, 222, 255, .1);
    background: #222a3f;
}

body[data-ui-theme="dark"] .learning-detail-section p,
body[data-ui-theme="dark"] .learning-detail-subtitle {
    color: #aeb8cc;
}

body[data-ui-theme="dark"] .learning-secondary-action {
    border-color: rgba(214, 222, 255, .14);
    background: #222a3f;
    color: #c0c8da;
}

@media (max-width: 1120px) {
    .learning-feed {
        column-count: 2;
    }
}

@media (max-width: 820px) {
    .fuuvo-learning-main {
        padding-bottom: 96px;
    }

    .learning-page {
        width: min(100% - 28px, 680px);
        padding-top: 20px;
    }

    .learning-intro {
        min-height: 146px;
        padding: 23px 22px;
        border-radius: 24px;
    }

    .learning-intro-orbit {
        width: 125px;
        height: 112px;
        margin-right: -10px;
        transform: scale(.84) rotate(-9deg);
    }

    .learning-intro h1 {
        font-size: clamp(25px, 7vw, 35px);
    }

    .learning-intro p {
        max-width: 410px;
        font-size: 13px;
    }

    .learning-category-tabs {
        margin-bottom: 12px;
    }

    .learning-review-banner {
        padding: 13px 14px;
    }

    .learning-review-copy span {
        max-width: 280px;
    }

    .learning-template-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .learning-library-heading {
        margin-top: 2px;
    }
}

@media (max-width: 560px) {
    .learning-page {
        width: calc(100% - 22px);
        padding-top: 10px;
    }

    .learning-intro {
        align-items: flex-start;
        min-height: 160px;
        padding: 21px 18px;
    }

    .learning-intro-orbit {
        position: absolute;
        right: -7px;
        bottom: -6px;
        opacity: .86;
        transform: scale(.72) rotate(-9deg);
        transform-origin: right bottom;
    }

    .learning-intro-copy {
        max-width: calc(100% - 25px);
    }

    .learning-intro p {
        max-width: 290px;
        font-size: 12px;
    }

    .learning-category-tabs {
        gap: 2px;
        margin-right: -11px;
        margin-left: -7px;
        padding: 0 5px;
    }

    .learning-category-tabs button {
        padding: 0 12px;
        font-size: 13px;
    }

    .learning-category-tabs .learning-history-tab {
        width: 35px;
        min-width: 35px;
        margin-left: 1px;
    }

    .learning-review-banner {
        align-items: flex-start;
        gap: 10px;
        padding: 12px;
    }

    .learning-review-spark {
        width: 32px;
        height: 32px;
    }

    .learning-review-copy span {
        max-width: 185px;
        white-space: normal;
    }

    .learning-review-banner button {
        padding: 6px 5px;
        font-size: 12px;
    }

    .learning-template-section {
        margin-bottom: 18px;
        padding: 14px 12px 12px;
        border-radius: 18px;
    }

    .learning-template-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
        margin-bottom: 11px;
    }

    .learning-template-heading > span {
        white-space: normal;
    }

    .learning-library-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
        margin-top: 0;
    }

    .learning-library-heading small {
        white-space: normal;
    }

    .learning-template-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .learning-template-card {
        min-height: 62px;
        padding: 8px 9px;
    }

    .learning-feed {
        column-count: 1;
    }

    .knowledge-card,
    .knowledge-card.card-quote .knowledge-card-copy {
        min-height: 0;
    }

    .knowledge-card h2 {
        font-size: 17px;
    }

    .knowledge-card-copy {
        padding: 14px 15px 16px;
    }

    .learning-question-dock {
        right: 11px;
        bottom: max(12px, env(safe-area-inset-bottom));
        left: 11px;
        justify-content: space-between;
        transform: none;
    }

    .learning-speak-action {
        flex: 1;
        min-width: 0;
        max-width: 210px;
    }

    .learning-question-sheet {
        right: 11px;
        bottom: 85px;
        left: 11px;
        width: auto;
        transform: none;
    }

    .learning-detail-panel {
        width: calc(100% - 18px);
        max-height: calc(100% - 18px);
        border-radius: 23px;
    }

    .learning-detail-header {
        min-height: 62px;
        padding: 0 12px;
    }

    .learning-detail-scroll {
        padding: 22px 18px 28px;
    }

    .learning-detail-scroll h2 {
        font-size: 30px;
    }

    .learning-detail-actions {
        flex-direction: column;
    }

    .learning-primary-action,
    .learning-secondary-action {
        width: 100%;
    }
}

/* Doubao 爱学 reference layout: compact tabs, two-column cards, and a fixed voice dock. */
.fuuvo-learning-app {
    background: #fff;
    color: #171717;
}

.fuuvo-learning-main {
    min-height: 100%;
    overflow-x: hidden;
    padding-bottom: 112px;
    background: #fff;
}

.learning-page {
    width: min(100%, 980px);
    margin: 0 auto;
    padding: 0 18px 36px;
}

.learning-catalog-header {
    position: sticky;
    top: 0;
    z-index: 12;
    display: flex;
    align-items: center;
    min-height: 58px;
    gap: 10px;
    margin: 0 -18px;
    padding: 0 18px;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(16px);
}

.learning-catalog-close {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    color: #121212;
    font-size: 32px;
    font-weight: 300;
    line-height: 1;
    text-decoration: none;
}

.learning-catalog-close:hover {
    background: #f2f2f2;
}

.learning-category-tabs {
    display: flex;
    align-items: stretch;
    flex: 1 1 auto;
    gap: 26px;
    min-width: 0;
    min-height: 58px;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
}

.learning-category-tabs::-webkit-scrollbar {
    display: none;
}

.learning-category-tabs button {
    position: relative;
    flex: 0 0 auto;
    min-height: 58px;
    padding: 0 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #a7a7a7;
    cursor: pointer;
    font: inherit;
    font-size: 16px;
    font-weight: 650;
    transition: color .18s ease;
}

.learning-category-tabs button:hover {
    color: #333;
    transform: none;
}

.learning-category-tabs button.is-active {
    background: transparent;
    color: #151515;
    box-shadow: none;
}

.learning-category-tabs button.is-active::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: #121212;
    content: "";
}

.learning-history-tab {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    margin-left: auto;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #161616;
    cursor: pointer;
}

.learning-history-tab:hover,
.learning-history-tab[aria-pressed="true"] {
    background: #f0f0f0;
}

.learning-history-tab svg {
    width: 23px;
    height: 23px;
    stroke: currentColor;
    stroke-width: 1.8;
}

.learning-review-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0 10px;
    padding: 17px 18px;
    border: 0;
    border-radius: 17px;
    background: linear-gradient(100deg, #f0ecff 0%, #fff0eb 100%);
}

.learning-review-spark {
    width: auto;
    height: auto;
    margin: 0;
    border-radius: 0;
    background: transparent;
    color: #cd91d9;
    font-size: 24px;
    box-shadow: none;
}

.learning-review-copy {
    gap: 3px;
}

.learning-review-copy strong {
    color: #242424;
    font-size: 16px;
    font-weight: 700;
}

.learning-review-copy span {
    color: #777;
    font-size: 13px;
}

.learning-review-banner button {
    min-height: 40px;
    margin-left: auto;
    padding: 0 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .9);
    color: #272727;
    box-shadow: 0 5px 15px rgba(88, 61, 112, .08);
    font-size: 15px;
}

.learning-review-banner button:hover {
    background: #fff;
}

.learning-feed {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    column-count: initial;
}

.knowledge-card {
    position: relative;
    display: block;
    min-height: 0;
    margin: 0;
    overflow: hidden;
    border: 0;
    border-radius: 7px;
    background: #f3f3f3;
    box-shadow: none;
    isolation: isolate;
}

.knowledge-card::before {
    display: none;
}

.knowledge-card:hover,
.knowledge-card:focus-visible {
    box-shadow: 0 8px 24px rgba(18, 18, 18, .13);
    transform: translateY(-1px);
}

.knowledge-card-image {
    position: relative;
    min-height: 0;
    aspect-ratio: 1 / 1.08;
    overflow: hidden;
    background: #e5e5e5;
}

.knowledge-card-image img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    transition: transform .35s ease;
}

.knowledge-card:hover .knowledge-card-image img {
    transform: scale(1.03);
}

.knowledge-card-image-glow {
    right: -30px;
    bottom: -50px;
    width: 150px;
    height: 100px;
    background: rgba(255, 221, 165, .24);
}

.knowledge-card-copy {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    display: block;
    padding: 30px 14px 13px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .72) 100%);
}

.knowledge-card h2 {
    margin: 0;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.32;
}

.knowledge-card p,
.knowledge-card-category {
    display: none;
}

.knowledge-card-quote-mark {
    top: -22px;
    right: 10px;
    color: rgba(255, 255, 255, .46);
    font-size: 112px;
}

.knowledge-card.card-quote {
    min-height: 240px;
}

.knowledge-card.card-quote .knowledge-card-copy {
    position: relative;
    min-height: 240px;
    padding: 50px 16px 18px;
    background: transparent;
}

.knowledge-card.card-quote h2 {
    color: #294f6d;
    font-size: 22px;
}

.knowledge-card.tone-midnight {
    background: linear-gradient(145deg, #141414, #0a0a0a);
}

.knowledge-card.tone-midnight h2 {
    color: #fff;
}

.knowledge-card.tone-apricot {
    background: linear-gradient(145deg, #fff8df, #ffeec2);
}

.knowledge-card.tone-apricot h2 {
    color: #4f351d;
}

.knowledge-card.tone-sage {
    background: linear-gradient(145deg, #ecf5e9, #dcead8);
}

.knowledge-card.tone-sage h2 {
    color: #294b35;
}

.knowledge-card.tone-lavender {
    background: linear-gradient(145deg, #f4edff, #e4dcff);
}

.knowledge-card.tone-lavender h2 {
    color: #2b5471;
}

.knowledge-card.tone-sunrise {
    background: linear-gradient(145deg, #fff5db, #ffe5d5);
}

.knowledge-card.tone-sky {
    background: linear-gradient(145deg, #e8f5ff, #d9ebff);
}

.knowledge-card.tone-sky h2 {
    color: #2b5979;
}

.knowledge-card.tone-cloud {
    background: linear-gradient(145deg, #eff5f4, #dfe9e8);
}

.knowledge-card.tone-mint {
    background: linear-gradient(145deg, #e8f8f1, #d9eee8);
}

.knowledge-card.tone-midnight.card-feature .knowledge-card-image img {
    filter: grayscale(1) brightness(.3);
    opacity: .6;
}

.learning-empty-state {
    grid-column: 1 / -1;
    min-height: 240px;
    margin: 0;
    border-radius: 12px;
    background: #f7f7f7;
}

.learning-ai-note,
.learning-library-heading,
.learning-template-section {
    display: none;
}

.learning-question-dock {
    z-index: 130;
    right: 50%;
    bottom: 20px;
    min-height: 62px;
    width: min(520px, calc(100% - 42px));
    justify-content: space-between;
    padding: 7px 12px;
    border: 1px solid rgba(30, 30, 30, .12);
    border-radius: 19px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 8px 26px rgba(0, 0, 0, .15);
}

.learning-dock-action,
.learning-speak-action {
    min-width: 42px;
    height: 46px;
    border-radius: 13px;
    color: #1d1d1d;
}

.learning-dock-action:hover,
.learning-speak-action:hover {
    background: #f5f5f5;
    color: #111;
    transform: none;
}

.learning-speak-action {
    min-width: 190px;
    border: 0;
    background: transparent;
    color: #181818;
    font-size: 18px;
    font-weight: 750;
}

.learning-speak-action .learning-speak-icon {
    display: none;
}

.learning-speak-action.is-listening {
    background: #fff1f1;
    color: #b43d48;
}

.learning-question-sheet {
    z-index: 131;
    right: 50%;
    bottom: 92px;
    width: min(520px, calc(100% - 42px));
    border-radius: 18px;
}

.learning-detail-view {
    z-index: 110;
    place-items: stretch;
    background: #fff;
}

.learning-detail-backdrop {
    display: none;
}

.learning-detail-panel {
    width: 100%;
    max-height: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.learning-detail-header {
    min-height: 68px;
    padding: 0 20px;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.learning-detail-close,
.learning-detail-tools button {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #151515;
    cursor: pointer;
    font: inherit;
    font-size: 27px;
}

.learning-detail-close:hover,
.learning-detail-tools button:hover {
    background: #f3f3f3;
}

.learning-detail-heading {
    gap: 2px;
}

.learning-detail-heading strong {
    color: #171717;
    font-size: 18px;
    font-weight: 750;
}

.learning-detail-heading span {
    color: #a1a1a1;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.learning-detail-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.learning-detail-tools button {
    font-size: 25px;
    line-height: 1;
}

.learning-detail-scroll {
    position: relative;
    overflow: auto;
    padding: 24px 22px 122px;
}

.learning-detail-hero {
    position: relative;
    min-height: 246px;
    margin: 0 0 22px;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(145deg, #5e4f42, #1f2424);
}

.learning-detail-hero.is-text-only {
    background: linear-gradient(145deg, #d8eef6, #cce4ff);
}

.learning-detail-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
}

.learning-detail-hero-copy {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 246px;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    background: linear-gradient(180deg, transparent 25%, rgba(0, 0, 0, .7) 100%);
}

.learning-detail-hero.is-text-only .learning-detail-hero-copy {
    background: linear-gradient(180deg, transparent 25%, rgba(35, 73, 101, .22) 100%);
}

.learning-detail-meta {
    color: rgba(255, 255, 255, .74);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: none;
}

.learning-detail-hero h2 {
    margin: 8px 0 0;
    color: #fff;
    font-size: clamp(28px, 5vw, 42px);
    letter-spacing: -.04em;
    line-height: 1.15;
}

.learning-detail-hero p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, .88);
    font-size: 15px;
    line-height: 1.55;
}

.learning-one-liner {
    align-items: center;
    gap: 10px;
    margin: 0 0 22px;
    padding: 20px 18px;
    border: 0;
    border-radius: 18px;
    background: #f8f0e8;
    text-align: center;
}

.learning-one-liner span {
    color: #95653f;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.learning-one-liner strong {
    color: #684b31;
    font-size: 18px;
    line-height: 1.5;
}

.learning-detail-sections {
    gap: 16px;
}

.learning-detail-section {
    padding: 17px 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.learning-detail-section + .learning-detail-section {
    border-top: 1px solid rgba(0, 0, 0, .08);
}

.learning-detail-section h3 {
    margin: 0 0 8px;
    color: #171717;
    font-size: 20px;
}

.learning-detail-section p {
    margin: 0;
    color: #6b6b6b;
    font-size: 16px;
    line-height: 1.78;
}

.learning-detail-audio {
    position: absolute;
    right: 26px;
    bottom: 96px;
    z-index: 2;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #222;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .1);
    cursor: pointer;
    font-size: 19px;
}

.learning-insight-consent {
    position: fixed;
    z-index: 150;
    inset: 0;
    display: grid;
    place-items: stretch;
    background: #fff;
}

.learning-insight-consent[hidden] {
    display: none;
}

.learning-insight-panel {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    background: #fff;
}

.learning-insight-header {
    display: flex;
    align-items: center;
    min-height: 68px;
    padding: 0 20px;
}

.learning-insight-header > button {
    display: grid;
    width: 38px;
    height: 38px;
    margin-right: auto;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #161616;
    cursor: pointer;
    font-size: 31px;
    font-weight: 300;
}

.learning-insight-header > button:hover {
    background: #f3f3f3;
}

.learning-insight-header > div {
    position: absolute;
    left: 50%;
    display: grid;
    gap: 3px;
    text-align: center;
    transform: translateX(-50%);
}

.learning-insight-header strong {
    color: #151515;
    font-size: 18px;
}

.learning-insight-header span {
    color: #a0a0a0;
    font-size: 12px;
}

.learning-insight-content {
    width: min(620px, calc(100% - 44px));
    margin: auto;
    padding: 20px 0 46px;
}

.learning-insight-art {
    position: relative;
    width: 220px;
    height: 210px;
    margin: 0 auto 44px;
    border-radius: 30px;
    background: linear-gradient(145deg, #fff, #fbfbff);
    box-shadow: 0 15px 42px rgba(92, 74, 168, .08);
}

.learning-insight-art::before {
    position: absolute;
    top: 22px;
    left: 30px;
    width: 145px;
    height: 120px;
    border: 1px solid rgba(134, 114, 208, .12);
    border-radius: 22px;
    content: "";
}

.learning-insight-art span {
    position: absolute;
    top: 23px;
    left: 20px;
    color: #e3b8ee;
    font-size: 39px;
}

.learning-insight-art b {
    position: absolute;
    top: 35px;
    right: 36px;
    font-size: 41px;
}

.learning-insight-art i {
    position: absolute;
    bottom: 15px;
    left: 4px;
    font-size: 50px;
    font-style: normal;
}

.learning-insight-content h2 {
    max-width: 620px;
    margin: 0 0 18px;
    color: #151515;
    font-size: clamp(30px, 5vw, 44px);
    letter-spacing: -.045em;
    line-height: 1.25;
}

.learning-insight-content p {
    margin: 0;
    color: #777;
    font-size: 16px;
    line-height: 1.8;
}

.learning-insight-accept {
    width: 100%;
    min-height: 58px;
    margin-top: 48px;
    border: 0;
    border-radius: 16px;
    background: #1677ff;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 18px;
    font-weight: 700;
}

.learning-insight-accept:hover {
    background: #0667eb;
}

body[data-ui-theme="dark"] .fuuvo-learning-app,
body[data-ui-theme="dark"] .fuuvo-learning-main,
body[data-ui-theme="dark"] .learning-detail-view {
    background: #151515;
}

body[data-ui-theme="dark"] .learning-catalog-header {
    background: rgba(21, 21, 21, .96);
}

body[data-ui-theme="dark"] .learning-catalog-close,
body[data-ui-theme="dark"] .learning-history-tab,
body[data-ui-theme="dark"] .learning-category-tabs button.is-active,
body[data-ui-theme="dark"] .learning-speak-action,
body[data-ui-theme="dark"] .learning-detail-close,
body[data-ui-theme="dark"] .learning-detail-tools button,
body[data-ui-theme="dark"] .learning-detail-heading strong,
body[data-ui-theme="dark"] .learning-detail-section h3 {
    color: #f4f4f4;
}

body[data-ui-theme="dark"] .learning-category-tabs button.is-active {
    background: transparent;
    box-shadow: none;
}

body[data-ui-theme="dark"] .learning-category-tabs button {
    color: #838383;
}

body[data-ui-theme="dark"] .learning-category-tabs button.is-active::after {
    background: #f4f4f4;
}

body[data-ui-theme="dark"] .learning-review-banner {
    background: linear-gradient(100deg, #29213c 0%, #3a2725 100%);
}

body[data-ui-theme="dark"] .learning-review-copy strong {
    color: #f2f2f2;
}

body[data-ui-theme="dark"] .learning-review-copy span {
    color: #b9b9b9;
}

body[data-ui-theme="dark"] .learning-review-banner button,
body[data-ui-theme="dark"] .learning-question-dock,
body[data-ui-theme="dark"] .learning-question-sheet,
body[data-ui-theme="dark"] .learning-detail-panel,
body[data-ui-theme="dark"] .learning-detail-audio {
    background: #242424;
    color: #f4f4f4;
}

body[data-ui-theme="dark"] .learning-one-liner {
    background: #3b2f27;
}

body[data-ui-theme="dark"] .learning-insight-consent,
body[data-ui-theme="dark"] .learning-insight-panel {
    background: #151515;
}

body[data-ui-theme="dark"] .learning-insight-header > button,
body[data-ui-theme="dark"] .learning-insight-header strong,
body[data-ui-theme="dark"] .learning-insight-content h2 {
    color: #f4f4f4;
}

body[data-ui-theme="dark"] .learning-insight-header span,
body[data-ui-theme="dark"] .learning-insight-content p {
    color: #bcbcbc;
}

body[data-ui-theme="dark"] .learning-one-liner span,
body[data-ui-theme="dark"] .learning-one-liner strong {
    color: #f0c69e;
}

body[data-ui-theme="dark"] .learning-detail-section + .learning-detail-section {
    border-color: rgba(255, 255, 255, .12);
}

body[data-ui-theme="dark"] .learning-detail-section p {
    color: #c3c3c3;
}

@media (max-width: 560px) {
    .learning-page {
        width: 100%;
        padding: 0 12px 30px;
    }

    .learning-catalog-header {
        margin: 0 -12px;
        padding: 0 12px;
    }

    .learning-category-tabs {
        gap: 22px;
    }

    .learning-category-tabs button {
        font-size: 15px;
    }

    .learning-review-banner {
        padding: 15px 14px;
    }

    .learning-review-copy span {
        white-space: normal;
    }

    .learning-review-banner button {
        padding: 0 11px;
        font-size: 13px;
    }

    .knowledge-card.card-quote,
    .knowledge-card.card-quote .knowledge-card-copy {
        min-height: 210px;
    }

    .knowledge-card h2,
    .knowledge-card.card-quote h2 {
        font-size: 17px;
    }

    .learning-question-dock {
        right: 10px;
        bottom: max(10px, env(safe-area-inset-bottom));
        left: 10px;
        width: auto;
        transform: none;
    }

    .learning-speak-action {
        min-width: 0;
        flex: 1;
        font-size: 17px;
    }

    .learning-question-sheet {
        right: 10px;
        bottom: 86px;
        left: 10px;
        width: auto;
        transform: none;
    }

    .learning-detail-scroll {
        padding: 16px 14px 118px;
    }

    .learning-detail-hero,
    .learning-detail-hero-copy {
        min-height: 220px;
    }

    .learning-detail-hero-copy {
        padding: 18px;
    }

    .learning-detail-hero h2 {
        font-size: 31px;
    }

    .learning-detail-section h3 {
        font-size: 18px;
    }

    .learning-detail-section p {
        font-size: 15px;
    }

    .learning-detail-audio {
        right: 20px;
        bottom: 94px;
    }

    .learning-insight-content {
        width: calc(100% - 32px);
        padding-bottom: 28px;
    }

    .learning-insight-content h2 {
        font-size: 30px;
    }
}

/* Desktop catalogue layout: use the available workstation width instead of
   keeping the mobile reference feed locked to a narrow 980px canvas. */
@media (min-width: 821px) {
    /* The shared shell gives every app a conservative 1080px scroll region.
       Learning is a catalogue page, so let it use the workspace beside the
       rail while keeping the catalogue itself centred and readable. */
    body > .creation-app.fuuvo-learning-app
    [data-fuuvo-app-scroll="1"].fuuvo-learning-main {
        width: auto !important;
        max-width: none !important;
        margin-top: 0 !important;
        margin-right: 32px !important;
        margin-bottom: 0 !important;
        margin-left: 48px !important;
        flex: 1 1 auto !important;
    }

    .learning-page {
        width: min(1320px, calc(100% - 48px));
        padding-right: 0;
        padding-left: 0;
    }

    .learning-catalog-header {
        margin-right: 0;
        margin-left: 0;
    }

    .learning-feed {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }

    .knowledge-card {
        min-width: 0;
    }

    .knowledge-card-copy {
        padding: 26px 12px 11px;
    }

    .knowledge-card h2 {
        font-size: 16px;
        line-height: 1.28;
    }

    .knowledge-card.card-quote h2 {
        font-size: 18px;
    }

    .knowledge-card.card-image h2,
    .knowledge-card.card-feature h2 {
        color: #fff;
    }
}

@media (min-width: 1200px) {
    .learning-feed {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Fixed learning surfaces share the workspace's navigation offset. */
@media (min-width: 921px) {
    #fuuvo-learning-app {
        --learning-navigation-width: var(--fuuvo-desktop-navigation-width, var(--fuuvo-workspace-rail-width, 72px));
    }

    #fuuvo-learning-app .learning-detail-view,
    #fuuvo-learning-app .learning-insight-consent {
        left: var(--learning-navigation-width);
        min-width: 0;
    }

    #fuuvo-learning-app .learning-detail-panel {
        min-width: 0;
        min-height: 0;
        padding-bottom: var(--learning-controls-space, 110px);
    }

    #fuuvo-learning-app .learning-detail-header {
        display: grid;
        grid-template-columns: minmax(96px, 1fr) auto minmax(96px, 1fr);
        flex: 0 0 68px;
        gap: 12px;
    }

    #fuuvo-learning-app .learning-detail-close,
    #fuuvo-learning-app .learning-insight-header > button {
        /* Leave room for the shared sidebar toggle when the rail is compact. */
        margin-left: 44px;
        justify-self: start;
    }

    #fuuvo-learning-app .learning-detail-tools {
        justify-self: end;
    }

    #fuuvo-learning-app .learning-detail-scroll {
        flex: 1 1 0;
        min-width: 0;
        min-height: 0;
        padding-bottom: 24px;
        overscroll-behavior: contain;
    }

    #fuuvo-learning-app .learning-detail-hero-copy {
        overflow-wrap: anywhere;
    }

    #fuuvo-learning-app .learning-detail-audio {
        bottom: calc(var(--learning-controls-space, 110px) + 16px);
    }

    #fuuvo-learning-app .learning-question-dock,
    #fuuvo-learning-app .learning-question-sheet {
        left: calc(50% + var(--learning-navigation-width) / 2);
        right: auto;
        width: min(520px, calc(100% - var(--learning-navigation-width) - 44px));
        transform: translateX(-50%);
    }

    #fuuvo-learning-app .learning-question-sheet {
        max-height: calc(100dvh - 180px);
        overflow-y: auto;
    }

    #fuuvo-learning-app .learning-insight-consent {
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    #fuuvo-learning-app .learning-insight-header {
        position: relative;
        flex: 0 0 68px;
    }
}

/* Image-cover titles stay white over the shade at every breakpoint, including
 * cards that previously used the coloured text-only tone styles. */
#fuuvo-learning-app .knowledge-card:is(.card-image, .card-feature):not(.is-image-unavailable) h2 {
    color: #fff;
}

/* Missing or failed covers retain the same card footprint and readable title.
 * The loading image remains visible until it settles so lazy loading can run. */
#fuuvo-learning-app .knowledge-card.is-image-unavailable {
    min-height: 0;
    aspect-ratio: 1 / 1.08;
    background: linear-gradient(145deg, #edf3f8, #dce7f0);
}

#fuuvo-learning-app .knowledge-card.is-image-unavailable .knowledge-card-image,
#fuuvo-learning-app .knowledge-card.is-image-unavailable .knowledge-card-quote-mark {
    display: none;
}

#fuuvo-learning-app .knowledge-card.is-image-unavailable .knowledge-card-copy {
    position: absolute;
    inset: 0;
    display: flex;
    min-height: 0;
    align-items: center;
    padding: 20px;
    background: transparent;
}

#fuuvo-learning-app .knowledge-card.is-image-unavailable h2 {
    color: #293d52;
}

/* Shared creation headings force light text in dark mode. Match the learning
 * surfaces to that text, including text-only cards and failed-image states. */
body[data-ui-theme="dark"] #fuuvo-learning-app .knowledge-card,
body[data-ui-theme="dark"] #fuuvo-learning-app .knowledge-card-image,
body[data-ui-theme="dark"] #fuuvo-learning-app .learning-empty-state {
    background: var(--fuuvo-dark-surface, #242a35);
}

body[data-ui-theme="dark"] #fuuvo-learning-app .knowledge-card h2,
body[data-ui-theme="dark"] #fuuvo-learning-app .learning-empty-state strong {
    color: var(--fuuvo-dark-text, #f2f4f7) !important;
}

body[data-ui-theme="dark"] #fuuvo-learning-app .learning-empty-state p {
    color: var(--fuuvo-dark-muted, #b3becd) !important;
}

body[data-ui-theme="dark"] #fuuvo-learning-app .learning-detail-hero.is-text-only {
    background: var(--fuuvo-dark-surface, #242a35);
}

body[data-ui-theme="dark"] #fuuvo-learning-app .learning-detail-hero.is-text-only .learning-detail-hero-copy {
    background: transparent;
}

body[data-ui-theme="dark"] #fuuvo-learning-app .learning-detail-hero.is-text-only h2 {
    color: var(--fuuvo-dark-text, #f2f4f7) !important;
}

body[data-ui-theme="dark"] #fuuvo-learning-app .learning-detail-hero.is-text-only :is(.learning-detail-meta, .learning-detail-subtitle) {
    color: var(--fuuvo-dark-muted, #b3becd) !important;
}
