/* Only the dashboard template loads this palette. The rail and header use the shared OET theme. */
.oet-workspace .oet-main {
    --oet-bg: #f3f6f0;
    --oet-paper: #fff;
    --oet-text: #192e27;
    --oet-muted: #53665c;
    --oet-line: #d6e0d7;
    --oet-sage: #28634e;
    --oet-tint: #eef3ed;
    --oet-accent: #cbe5cd;
    --oet-lime: #d5ee9f;
    --oet-amber: #855019;
    --oet-amber-tint: #faebcf;
    --oet-blue: #355b83;
    --oet-blue-tint: #e5eef7;
    --oet-lilac: #634e82;
    --oet-lilac-tint: #eee8f8;
    --oet-shadow: 0 4px 16px rgb(29 57 43 / 5%);
    background: linear-gradient(135deg, var(--oet-tint), transparent 34rem) var(--oet-bg);
    color: var(--oet-text);
}
html[data-oet-theme="dark"] .oet-workspace .oet-main {
    --oet-bg: #14211c;
    --oet-paper: #1d2d25;
    --oet-text: #eef3ea;
    --oet-muted: #b4c7b9;
    --oet-line: #3a4f43;
    --oet-sage: #a7d6ad;
    --oet-tint: #263b30;
    --oet-accent: #3d5747;
    --oet-amber: #f5c685;
    --oet-amber-tint: #453727;
    --oet-blue: #abcfee;
    --oet-blue-tint: #263b4c;
    --oet-lilac: #d2bcec;
    --oet-lilac-tint: #3b3247;
    --oet-shadow: 0 4px 16px rgb(0 0 0 / 10%);
}
.oet-toplinks > a[aria-current="page"] {
    color: var(--oet-sage);
    box-shadow: inset 0 -2px var(--oet-sage);
}
#oet-workspace-view { max-width: 1380px; margin-inline: auto; }
.oet-workspace .oet-heading { margin-bottom: clamp(20px, 2.5vw, 34px); }
.oet-workspace .oet-heading .oet-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--oet-sage);
    font-size: 10px;
    letter-spacing: 1.6px;
    margin: 0 0 8px;
}
.oet-heading .oet-eyebrow span { color: var(--oet-muted); font-weight: 400; }
.oet-workspace .oet-heading h1 { font-size: clamp(34px, 4vw, 60px); line-height: 1.08; letter-spacing: -.045em; }
.oet-heading h1 em { color: var(--oet-sage); font-family: inherit; font-weight: inherit; }
.oet-workspace .oet-heading p:last-child { margin-top: 8px; }
.oet-workspace .oet-section-heading { flex-wrap: wrap; gap: 4px 16px; margin: 30px 0 12px; }
.oet-rewards { border-bottom: 1px solid var(--oet-line); padding-bottom: 26px; }
.oet-reward-hero, .oet-challenges, .oet-badges { display: grid; gap: 16px; }
.oet-reward-hero { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
.oet-rank-card, .oet-streak {
    border-radius: 22px;
    border: 1px solid var(--oet-line);
    box-shadow: var(--oet-shadow);
    min-width: 0;
    padding: clamp(20px, 2.2vw, 32px);
}
.oet-rank-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #f7fcf4;
    border-color: #325a46;
    background: linear-gradient(110deg, #133f34 35%, #305d42);
}
.oet-rank-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(20px, 3vw, 42px);
    flex: 1;
    padding: 2px 0 22px;
}
.oet-xp h2, .oet-streak-heading h2 {
    font: 700 11px/1.4 'Poppins', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0;
}
.oet-xp h2 { color: var(--oet-lime); }
.oet-reward-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 9px; }
.oet-reward-total strong { font: 400 clamp(40px, 4vw, 62px)/1 Georgia, serif; letter-spacing: -.05em; }
.oet-reward-total span { color: var(--oet-muted); font-size: 13px; }
.oet-xp .oet-reward-total { margin: 12px 0 18px; }
.oet-xp .oet-reward-total span, .oet-xp > p { color: #d5e6d8; }
.oet-xp > p { font-size: 12px; margin: 7px 0 0; }
.oet-xp .oet-reward-track { background: #446858; }
.oet-xp .oet-reward-track > span { background: var(--oet-lime); }
.oet-level-medallion {
    position: relative;
    width: clamp(108px, 9vw, 136px);
    aspect-ratio: 1;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #234736;
    background: radial-gradient(circle at 32% 24%, #eff5ce, #cee699 72%, #bdd78c);
    border: 4px double #617e52;
    box-shadow: 0 0 0 4px #224c39, 0 0 0 5px #99b37c, 0 6px 20px #102d244d;
}
.oet-level-medallion::before {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: -1;
    inset: -115%;
    border-radius: 50%;
    background: repeating-radial-gradient(circle, transparent 0 23px, rgb(219 244 171 / 12%) 24px, transparent 25px 34px);
    mask-image: radial-gradient(circle, black 32%, transparent 70%);
}
.oet-level-medallion svg { width: 16px; height: 16px; margin-bottom: 4px; }
.oet-level-medallion > span { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.4px; }
.oet-level-medallion strong { font: 400 clamp(32px, 3vw, 46px)/1 Georgia, serif; }
.oet-level-medallion b { font-size: 11px; line-height: 1.5; }
.oet-xp-guide { border-top: 1px solid #6a8775; font-size: 12px; line-height: 1.65; }
.oet-xp-guide > summary, .oet-more-badges > summary {
    color: var(--oet-sage);
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}
.oet-xp-guide > summary {
    color: #ecf5d6;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding-top: 6px;
}
.oet-workspace .oet-xp-guide > summary:focus-visible { outline-color: var(--oet-lime); }
.oet-xp-guide-body { color: var(--oet-muted); }
.oet-xp-guide>summary::-webkit-details-marker{display:none}
.oet-xp-guide>summary svg{width:12px;height:12px;flex-shrink:0}.oet-xp-guide[open]>summary svg{transform:rotate(90deg)}
.oet-xp-guide-body{display:grid;gap:18px;padding:16px;margin-top:6px;background:var(--oet-bg);border:1px solid var(--oet-line);border-radius:12px}
.oet-xp-guide-body h3{font-size:12px;color:var(--oet-text);margin:0 0 10px;line-height:1.5}
.oet-xp-rates{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(130px,100%),1fr));gap:8px}
.oet-xp-rate{display:flex;flex-direction:column;gap:4px;padding:12px;border:1px solid var(--oet-line);border-radius:8px;background:var(--oet-paper)}
.oet-xp-rate>strong{font:400 24px/1.2 Georgia,serif;color:var(--oet-text)}.oet-xp-rate small{font:600 10px Inter,Arial,sans-serif;color:var(--oet-sage)}.oet-xp-rate>span{font-size:11px;line-height:1.5}
.oet-xp-guide .oet-xp-rules{font-size:11px;line-height:1.7;margin:14px 0}
.oet-xp-breakdown{display:flex;flex-wrap:wrap;gap:8px 20px;padding:10px 0 0;margin:0;border-top:1px solid var(--oet-line);font-size:11px}
.oet-xp-breakdown>div{display:flex;align-items:baseline;gap:8px}.oet-xp-breakdown dt{font-weight:400}.oet-xp-breakdown dd{margin:0;font-weight:650;color:var(--oet-text);font-variant-numeric:tabular-nums}
.oet-tier-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(110px,100%),1fr));gap:6px;list-style:none;padding:0;margin:0}
.oet-tier-grid>li{display:flex;flex-direction:column;gap:2px;padding:8px 10px;background:var(--oet-paper);border:1px solid var(--oet-line);border-radius:8px;min-width:0}
.oet-tier-grid strong{font-size:11px;font-weight:600;color:var(--oet-text)}.oet-tier-grid>li>span{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px 8px;font-size:10px}
.oet-tier-grid>li.is-current{background:var(--oet-tint);border-color:var(--oet-sage)}.oet-tier-grid small{font-size:9px;font-weight:650;color:var(--oet-sage)}
.oet-xp-guide .oet-level-note{font-size:11px;line-height:1.6;margin:12px 0 0}

.oet-streak { background: var(--oet-paper); }
.oet-streak-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; color: var(--oet-amber); }
.oet-streak-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: var(--oet-amber-tint); }
.oet-streak-icon svg { width: 19px; height: 19px; }
.oet-streak .oet-reward-total strong { font-size: 37px; }
.oet-streak > p { margin: 4px 0 13px; color: var(--oet-muted); font-size: 12px; }
.oet-streak-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.oet-streak-week > span { display: grid; justify-items: center; gap: 5px; color: var(--oet-muted); }
.oet-streak-week small { font-size: 10px; }
.oet-streak-week b {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--oet-tint);
}
.oet-streak-week .is-active b { background: var(--oet-amber-tint); color: var(--oet-amber); }
.oet-streak-week .is-today b { outline: 2px solid var(--oet-amber); outline-offset: 2px; }
.oet-streak-week svg { width: 16px; height: 16px; }
.oet-streak footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-top: 15px;
    border-top: 1px solid var(--oet-line);
    padding-top: 9px;
}
.oet-streak footer small { font-size: 10px; color: var(--oet-muted); }
.oet-streak footer a { display: inline-flex; align-items: center; min-height: 30px; }
.oet-streak footer a:hover, .oet-more-badges > summary:hover { text-decoration: underline; }
.oet-rewards .oet-rewards-scope { margin: 8px 2px 0; font-size: 11px; color: var(--oet-muted); }
.oet-challenges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.oet-challenge, .oet-badge, .oet-workspace .oet-skill-card {
    background: var(--oet-paper);
    border: 1px solid var(--oet-line);
    border-radius: 16px;
    box-shadow: var(--oet-shadow);
}
.oet-challenge {
    --challenge-ink: var(--oet-sage);
    --challenge-tint: var(--oet-accent);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 5px 12px;
    padding: 18px 22px;
}
.oet-challenge[data-challenge="mix_skills"] { --challenge-ink: var(--oet-lilac); --challenge-tint: var(--oet-lilac-tint); }
.oet-challenge-icon { grid-row: span 2; align-self: start; display: grid; place-items: center; border-radius: 12px; width: 39px; height: 39px; color: var(--challenge-ink); background: var(--challenge-tint); }
.oet-challenge-icon svg { width: 21px; height: 21px; }
.oet-challenge h3 { margin: 0; font-size: 15px; line-height: 1.35; }
.oet-challenge-body { grid-column: 2 / -1; }
.oet-challenge-body p, .oet-badge p { margin: 0 0 12px; color: var(--oet-muted); font-size: 12px; }
.oet-challenge-body small, .oet-badge small { display: block; margin-top: 4px; color: var(--oet-muted); font-size: 10px; }
.oet-challenge .oet-reward-track > span { background: var(--challenge-ink); }
.oet-xp-pill { border-radius: 20px; background: var(--challenge-tint); color: var(--challenge-ink); font-size: 10px; font-weight: 700; padding: 4px 9px; text-align: center; }
.oet-next-badge { color: var(--oet-muted); font-size: 12px; margin: 0 0 12px; }
.oet-next-badge strong { color: var(--oet-text); }
.oet-next-badge > span { color: var(--oet-sage); white-space: nowrap; margin-left: 5px; }
.oet-badges { grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; padding: 0; margin: 0; }
.oet-badge { display: flex; align-items: flex-start; gap: 12px; padding: 18px; }
.oet-badge > div { flex: 1; min-width: 0; }
.oet-badge[data-tier="bronze"] { --medal-ink: #875234; --medal-fill: #f3e2d5; }
.oet-badge[data-tier="silver"] { --medal-ink: #4d6475; --medal-fill: #e3eaf0; }
.oet-badge[data-tier="gold"] { --medal-ink: #80590e; --medal-fill: #f8ebbd; }
.oet-badge[data-tier="platinum"] { --medal-ink: #604e7b; --medal-fill: #eae4f4; }
.oet-badge-icon { flex: 0 0 39px; height: 39px; display: grid; place-items: center; border-radius: 50%; background: var(--medal-fill); color: var(--medal-ink); }
.oet-badge-icon svg { width: 19px; height: 19px; }
.oet-badge.is-earned .oet-badge-icon { outline: 1px solid var(--medal-ink); outline-offset: -4px; }
.oet-badge-tier { color: var(--oet-muted); font-size: 9px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.oet-badge h3 { font-size: 14px; line-height: 1.4; margin: 4px 0; }
.oet-more-badges { margin-top: 10px; }
.oet-more-badges > summary { padding: 8px 0; }
.oet-more-badges .oet-badges { margin-top: 8px; }
.oet-rewards-error p { font-size: 13px; color: var(--oet-muted); }
.oet-skill-card[data-skill="reading"] { --skill-ink: var(--oet-blue); --skill-fill: var(--oet-blue-tint); }
.oet-skill-card[data-skill="listening"] { --skill-ink: var(--oet-lilac); --skill-fill: var(--oet-lilac-tint); }
.oet-skill-card[data-skill="writing"] { --skill-ink: var(--oet-amber); --skill-fill: var(--oet-amber-tint); }
.oet-skill-card[data-skill="speaking"] { --skill-ink: var(--oet-sage); --skill-fill: var(--oet-accent); }
.oet-skill-card .oet-skill-icon { background: var(--skill-fill); color: var(--skill-ink); }
.oet-skill-card .oet-text-link { color: var(--skill-ink); }
@media (max-width: 1080px) {
    .oet-reward-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .oet-rank-card, .oet-streak { padding: 20px; }
    .oet-rank-top { gap: 14px; }
    .oet-badges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 940px) {
    .oet-reward-hero { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .oet-badges, .oet-challenges { grid-template-columns: 1fr; }
    .oet-reward-hero, .oet-challenges, .oet-badges { gap: 12px; }
    .oet-workspace .oet-section-heading { margin-top: 25px; }
    .oet-rank-card, .oet-streak { border-radius: 18px; }
    .oet-challenge { gap: 6px 10px; padding: 16px; }
    .oet-level-medallion { width: 98px; }
}
