/* Evia7 premium pass: one type face (Inter, bundled for offline), one card style, calmer colour.
   Loaded after ui.css; "html body" prefixes beat the styles polish.js adds at runtime.
   The dyslexia font in accessibility.css still overrides the type when it's switched on. */
@font-face{font-family:"Inter";src:url("vendor/fonts/inter-latin-wght-normal.woff2") format("woff2-variations"),url("vendor/fonts/inter-latin-wght-normal.woff2") format("woff2");font-weight:100 900;font-style:normal;font-display:swap}

:root{
  --pm-bg:#faf9f6;
  --pm-card:#ffffff;
  --pm-hair:rgba(16,24,40,.07);
  --pm-shadow:0 1px 2px rgba(16,24,40,.04),0 6px 20px rgba(16,24,40,.05);
  --pm-shadow-lift:0 2px 4px rgba(16,24,40,.05),0 14px 32px rgba(16,24,40,.08);
  --pm-radius:20px;
}

/* ---------- Type ---------- */
html body,html body button,html body input,html body textarea,html body select{font-family:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;font-feature-settings:"cv11","ss01";-webkit-font-smoothing:antialiased}
html body h1,html body h2,html body h3{letter-spacing:-.02em}
html body .ui-page-head h1{font-size:30px;font-weight:800;letter-spacing:-.035em}
html body .ui-page-head span{font-size:13px;font-weight:600;color:var(--ui-muted)}
html body .ui-sub-title{font-size:26px;font-weight:800;letter-spacing:-.03em}
html body .pv-big,html body .pv-deep-hero,html body .ui-hours-sum strong,html body .ui-log-value,html body .ui-hours-n{font-variant-numeric:tabular-nums;letter-spacing:-.03em}
html body .ui-section-label,html body .pv-title,html body .ev-saved h3,html body .ui-hours-h,html body .pv-h,html body .section-title{font-size:11.5px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--ui-muted)}
.ui-section-label{margin:26px 4px 10px}

/* ---------- Surface ---------- */
html body{background:var(--pm-bg)}

/* ---------- One card style ---------- */
html body .ui-card,html body .pv-card,html body .ev-tile,html body .ui-hours-list,html body .nvq-group,html body .card:not(.unit-card){background:var(--pm-card);border:1px solid var(--pm-hair);border-radius:var(--pm-radius);box-shadow:var(--pm-shadow)}
html body .pv-card{padding:18px 20px 20px}

/* ---------- Units: one grouped list with hairline dividers ---------- */
.ui-unit-list{background:var(--pm-card);border:1px solid var(--pm-hair);border-radius:var(--pm-radius);box-shadow:var(--pm-shadow);overflow:hidden;margin-bottom:12px}
html body .ui-unit-list .unit-card{margin:0;min-height:64px;padding:14px 18px;border:0;border-radius:0;background:transparent;box-shadow:none}
html body .ui-unit-list .unit-card+.unit-card{border-top:1px solid var(--pm-hair)}
html body .ui-unit-list .unit-card::before,html body .ui-unit-list .unit-card::after{display:none!important}
html body .ui-unit-list .unit-card:active{background:#f7f6f2;transform:none}
html body .ui-unit-list .unit-title{font-size:16px;font-weight:650;color:var(--ui-ink)}
/* Supporting evidence: a single row card to match */
html body .supporting-course-card{margin:0;border:1px solid var(--pm-hair);border-radius:var(--pm-radius);background:var(--pm-card);box-shadow:var(--pm-shadow);padding:14px 18px}
html body .supporting-course-card::before{display:none!important}
html body .supporting-course-card .unit-title{font-size:16px;font-weight:650}

/* ---------- Learning logs and progress reviews ---------- */
html body .ui-logs-grid{margin:0 0 8px;gap:12px}
html body .ui-log-tile{position:relative;overflow:hidden;gap:2px;padding:16px 16px 18px;border-radius:var(--pm-radius);background:var(--pm-card);color:var(--ui-ink);border:1px solid var(--pm-hair);box-shadow:var(--pm-shadow)}
html body .ui-log-tile::after{content:"";position:absolute;right:-30px;top:-30px;width:110px;height:110px;border-radius:50%;background:radial-gradient(circle,color-mix(in srgb,var(--yellow) 22%,transparent),transparent 70%);pointer-events:none}
html body .ui-log-tile.reviews::after{background:radial-gradient(circle,rgba(23,32,51,.10),transparent 70%)}
.ui-log-top{display:flex;align-items:center;justify-content:space-between;width:100%;margin-bottom:12px}
html body .ui-log-icon{width:38px;height:38px;border-radius:12px;background:var(--soft,#fff7d6);color:var(--yellow-ink)}
html body .ui-log-tile.reviews .ui-log-icon{background:#eef1f6;color:var(--ui-ink)}
.ui-log-chev{font-size:22px;line-height:1;color:var(--ui-faint)}
.ui-log-value{font-size:24px;font-weight:800;line-height:1.1;color:var(--ui-ink)}
html body .ui-log-tile strong{margin-top:6px;font-size:14px;font-weight:700;color:var(--ui-ink)}
html body .ui-log-tile small{font-size:12.5px;opacity:1;color:var(--ui-muted)}
html body .ui-log-tile.alt{background:var(--pm-card);color:var(--ui-ink)}

/* ---------- Buttons ---------- */
html body button.primary,html body .ui-pill-primary{box-shadow:0 1px 0 rgba(255,255,255,.35) inset,0 6px 16px color-mix(in srgb,var(--yellow) 28%,transparent);font-weight:700}
html body button.secondary{background:#fff;border:1px solid var(--pm-hair);box-shadow:0 1px 2px rgba(16,24,40,.04)}
html body .ui-back{background:#fff;border:1px solid var(--pm-hair);box-shadow:0 1px 2px rgba(16,24,40,.04);border-radius:999px;padding:9px 16px;font-weight:650}

/* ---------- Evidence pack page ---------- */
html body .evidence-photo-button{background:var(--pm-card);border:1px solid var(--pm-hair);box-shadow:var(--pm-shadow)}
html body .evidence-type-tile{background:var(--pm-card);border:1px solid var(--pm-hair);box-shadow:var(--pm-shadow)}
html body #write,html body .wc-field>textarea{border:1px solid var(--pm-hair);box-shadow:inset 0 1px 2px rgba(16,24,40,.04);background:#fff}

/* ---------- Bottom nav: a little more glassy ---------- */
html body .bottom-nav{background:rgba(255,255,255,.88);backdrop-filter:saturate(1.4) blur(16px);-webkit-backdrop-filter:saturate(1.4) blur(16px);border:1px solid var(--pm-hair);box-shadow:0 10px 30px rgba(16,24,40,.10)}

/* ---------- Sheets ---------- */
html body .sheet,html body .profile-sheet{box-shadow:0 -12px 40px rgba(16,24,40,.14)}
html body .pv-stat,html body .pv-empty{background:#f6f5f1}

/* ---------- Chat ---------- */
html body #chat{background:#f8f7f4}
html body #chat .bubble.evia{box-shadow:0 1px 2px rgba(16,24,40,.04)}
html body #chat .bubble.user{background:#fff;border:1px solid var(--pm-hair)}
html body #chat .ui-action{border:1px solid var(--pm-hair);box-shadow:0 1px 2px rgba(16,24,40,.04)}

/* Chart labels: same type as everything else (SVG text doesn't inherit by default) */
html body svg text{font-family:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif}
@media (max-width:380px){html body .dw-field{font-size:13.5px;padding:0 10px}html body .dw-field svg{width:18px;height:18px}.pv-seg-labels{font-size:10px}}

/* Course and Teach me: a summary card at the top (like My progress), numbered units, and the same section labels. */
html body .ui-hero{cursor:default;margin:0 0 4px}html body .ui-hero:active{transform:none}
.ui-hero-bar{margin-top:14px}
html body .ui-unit-list .unit-card{display:flex;align-items:center;gap:12px;justify-content:flex-start}
html body .ui-unit-list .unit-card .unit-title{flex:1;min-width:0}
.ui-unit-no{flex:0 0 auto;width:30px;height:30px;border-radius:10px;display:grid;place-items:center;background:var(--soft);color:var(--yellow-ink);font-size:13px;font-weight:800}
html body .ui-sup-list .supporting-course-card{display:grid!important}
.tt-games-head{margin:26px 4px 10px!important;align-items:center!important}html body .tt-games-head .ui-section-label{margin:0}
.tt-games-head span{font-size:12px!important}
html body .section-title.nvq-section{color:var(--ui-muted)!important;margin:26px 4px 10px}

/* ---------- Teach me: a game hub, in Evia's neutral palette ----------
   White cards with a hairline and soft shadow, ink type, and the learner's Evia colour only as an accent: the XP bar,
   the play button, the progress rings. It should feel like a premium app, not a toy. */
.tg-player{display:flex;gap:16px;align-items:center;padding:18px;border-radius:var(--pm-radius);color:var(--ui-ink);background:var(--pm-card);border:1px solid var(--pm-hair);box-shadow:var(--pm-shadow);position:relative;overflow:hidden}
.tg-player::after{content:"";position:absolute;right:-60px;top:-70px;width:200px;height:200px;border-radius:50%;background:radial-gradient(circle,color-mix(in srgb,var(--yellow) 16%,transparent),transparent 70%);pointer-events:none}
.tg-me{flex:none;display:flex;flex-direction:column;align-items:center;gap:8px}
html body .tg-evia{width:62px;height:62px;border-width:4px;background:#fffdfa}
.tg-lvl{padding:3px 10px;border-radius:999px;background:var(--ui-ink);color:#fff;font-size:11.5px;font-weight:700;letter-spacing:.02em;white-space:nowrap}
.tg-xp{flex:1;min-width:0;position:relative;z-index:1}
.tg-xp-top{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.tg-xp-top strong{font-size:22px;font-weight:800;letter-spacing:-.02em;font-variant-numeric:tabular-nums}.tg-xp-top strong small{font-size:13px;font-weight:600;color:var(--ui-muted)}
.tg-xp-top span{font-size:12px;color:var(--ui-muted);font-weight:600}
.tg-xp-bar{display:block;height:8px;margin:8px 0 12px;border-radius:999px;background:#efede8;overflow:hidden}
.tg-xp-bar>i{display:block;height:100%;min-width:8px;border-radius:999px;background:var(--yellow)}
.tg-pills{display:flex;flex-wrap:wrap;gap:8px}
.tg-pill{display:inline-flex;align-items:center;gap:5px;padding:5px 10px 5px 7px;border-radius:999px;background:#f5f3ee;font-size:12px;font-weight:600;color:var(--ui-muted)}
.tg-pill b{font-size:13px;font-weight:800;color:var(--ui-ink)}
.tg-pill svg{width:17px;height:17px}.tg-pill.fire svg{fill:#b8bfc9;stroke:none}.tg-pill.fire.lit svg{fill:#f08a24}
.tg-next{display:flex;align-items:center;gap:14px;width:100%;margin:12px 0 0;padding:16px 16px 16px 20px;border:1px solid var(--yellow-line);border-radius:var(--pm-radius);text-align:left;cursor:pointer;font:inherit;background:linear-gradient(180deg,#fff,var(--soft));color:var(--ui-ink);box-shadow:var(--pm-shadow);transition:transform .12s ease}
.tg-next:active,.tg-tile:active,.tg-game:active{transform:scale(.985)}
.tg-next-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.tg-next-copy small{font-size:11.5px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--ui-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tg-next-copy strong{font-size:19px;font-weight:800;letter-spacing:-.02em;line-height:1.2}
.tg-next-copy span{font-size:13px;color:var(--ui-muted)}
.tg-play{flex:none;width:52px;height:52px;border-radius:50%;display:grid;place-items:center;background:var(--yellow);color:var(--ui-on-accent);box-shadow:0 6px 16px color-mix(in srgb,var(--yellow) 35%,transparent)}
.tg-play svg{width:24px;height:24px;margin-left:3px;fill:currentColor}
.tg-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
html body .tg-tile{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:14px;border:1px solid var(--pm-hair)!important;border-radius:var(--pm-radius);background:var(--pm-card);box-shadow:var(--pm-shadow);text-align:left;transition:transform .12s ease}
.tg-tile-top{display:flex;align-items:center;justify-content:space-between;width:100%;margin-bottom:12px}
.tg-tile-ic{width:44px;height:44px;border-radius:14px;display:grid;place-items:center;background:var(--soft);color:var(--yellow-ink)}
.tg-tile-ic svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tg-ring{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--yellow) calc(var(--p)*1%),#efede8 0)}
.tg-ring b{width:31px;height:31px;border-radius:50%;display:grid;place-items:center;background:#fff;font-size:10px;font-weight:800;color:var(--ui-ink);font-variant-numeric:tabular-nums}
.tg-tile strong{font-size:15.5px;font-weight:700;color:var(--ui-ink);line-height:1.25;overflow-wrap:anywhere}
.tg-tile small{font-size:12px;color:var(--ui-muted)}
.tg-games{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;margin:0 -4px;padding:2px 4px 14px;scrollbar-width:none}
.tg-games::-webkit-scrollbar{display:none}
.tg-game{flex:0 0 150px;scroll-snap-align:start;display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-height:170px;padding:14px;border:1px solid var(--pm-hair);border-radius:var(--pm-radius);text-align:left;cursor:pointer;font:inherit;color:var(--ui-ink);background:var(--pm-card);box-shadow:var(--pm-shadow);transition:transform .12s ease}
.tg-game-ic{width:44px;height:44px;border-radius:14px;display:grid;place-items:center;background:#f5f3ee;color:var(--ui-ink);margin-bottom:auto}
.tg-game-ic svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tg-game strong{margin-top:12px;font-size:15.5px;font-weight:700}
.tg-game small{font-size:12px;line-height:1.35;color:var(--ui-muted)}
.tg-game-go{margin-top:10px;display:inline-flex;align-items:center;gap:4px;padding:6px 12px 6px 9px;border-radius:999px;background:var(--ui-ink);color:#fff;font-size:12.5px;font-weight:700}
.tg-game-go svg{width:14px;height:14px;fill:currentColor;stroke:none}
.tg-game-go.lock{background:#f5f3ee;color:var(--ui-muted)}.tg-game-go.lock b{color:var(--ui-ink)}.tg-game-go.lock svg{fill:none;stroke:currentColor;stroke-width:2}
.tg-game.locked .tg-game-ic{color:#98a2b3}

/* ---------- Rewards: the loot box in the same premium neutrals ---------- */
html body .rw-box{background:var(--pm-card);color:var(--ui-ink);border:1px solid var(--pm-hair);box-shadow:var(--pm-shadow)}
html body .rw-box-copy small{color:var(--ui-muted)}
html body .rw-box .rw-btn.buy{background:var(--ui-ink);color:#fff}
html body .rw-box .rw-btn.buy:disabled{background:#efede8;color:var(--ui-muted);opacity:1}
html body .g-box{fill:var(--yellow)}html body .g-lid{fill:color-mix(in srgb,var(--yellow) 70%,#fff)}html body .g-rib,html body .g-bow{fill:var(--ui-ink)}
html body .rw-odds span{background:#f5f3ee!important;color:var(--ui-muted)!important;font-weight:700}
html body .tg-evia .evia-face{gap:8px}html body .tg-evia .evia-face i{width:13px!important;height:17px!important;border-width:3px!important}
html body .rw-item{border:1px solid var(--pm-hair);box-shadow:var(--pm-shadow);background:var(--pm-card)}
html body .rw-item.r-rare,html body .rw-item.r-epic{border-color:var(--pm-hair)}
html body .rw-item.r-legendary{border-color:color-mix(in srgb,var(--yellow) 35%,transparent);background:linear-gradient(180deg,color-mix(in srgb,var(--yellow) 6%,#fff),#fff)}
html body .rw-bal{background:linear-gradient(180deg,#fff,var(--soft));border-color:var(--yellow-line);box-shadow:var(--pm-shadow)}
.ui-hours-what{margin:-4px 4px 14px;font-size:13.5px;line-height:1.45;color:var(--ui-muted)}
/* The shape picker clips its avatars to their shape; Evias wearing kit must never be clipped (hats sit above the head). */
html body .rw-evia,html body .evia-shape-avatar:has(.evia-kit),html body .evia-theme-avatar:has(.evia-kit){overflow:visible!important}

/* ---------- New expressions (same pattern as ui.css: the learner's resting look, or data-x on a preview) ---------- */
html[data-evia-expr="tiny"]:not(.evia-happy):not(.evia-sleepy) body .evia-face:not([data-x]) i,html body .evia-face[data-x="tiny"] i{scale:.58 calc(.58 * var(--evia-sy,1))}
html[data-evia-expr="big"]:not(.evia-happy):not(.evia-sleepy) body .evia-face:not([data-x]) i,html body .evia-face[data-x="big"] i{scale:1.32 calc(1.32 * var(--evia-sy,1))}
html[data-evia-expr="dots"]:not(.evia-happy):not(.evia-sleepy) body .evia-face:not([data-x]) i,html body .evia-face[data-x="dots"] i{border-radius:50%!important;aspect-ratio:1;height:auto!important;background:var(--yellow)!important;scale:.62 calc(.62 * var(--evia-sy,1))}
html[data-evia-expr="dots"]:not(.evia-happy):not(.evia-sleepy) body .evia-face:not([data-x]) i:after,html body .evia-face[data-x="dots"] i:after{display:none!important}
html[data-evia-expr="robot"]:not(.evia-happy):not(.evia-sleepy) body .evia-face:not([data-x]) i,html body .evia-face[data-x="robot"] i{border-radius:22%!important;aspect-ratio:1;height:auto!important}
html[data-evia-expr="sideeye"]:not(.evia-happy):not(.evia-sleepy) body .evia-face:not([data-x]) i,html body .evia-face[data-x="sideeye"] i{clip-path:inset(34% -20% -20% -20%);background:radial-gradient(circle at 74% 64%,var(--yellow) 0 30%,transparent 33%)!important}
html[data-evia-expr="sideeye"]:not(.evia-happy):not(.evia-sleepy) body .evia-face:not([data-x]) i:after,html body .evia-face[data-x="sideeye"] i:after{display:none!important}

/* ---------- Sunglasses: the specs frame with dark lenses ---------- */
html body .ek-eyes.sun .ek-lens{background:linear-gradient(165deg,#3a4353 0%,#161b24 60%,#0c1016 100%);border-color:#0f131a;border-radius:28% 28% 42% 42%;box-shadow:inset 2px 2px 0 rgba(255,255,255,.18)}
html body .ek-eyes.sun .ek-bridge,html body .ek-eyes.sun .ek-arm{background:#0f131a}

/* Darker new colours carry white text on accent buttons. */
html[data-evia-theme="forest"],html[data-evia-theme="navy"],html[data-evia-theme="graphite"],html[data-evia-theme="rose"],html[data-evia-theme="midnight"],html[data-evia-theme="teal"]{--ui-on-accent:#fff}
/* Mini games hide their overlays (the Flappy question, the tip) with the hidden attribute: make sure it wins. */
.gm [hidden]{display:none!important}
