
/* ===== Update109: pastel theme per area =====================================
   Every area owns one soft pastel colour. It decides page background, hero glow, rim lights, chips, inset boxes
   and shadows. White surfaces and a deep black ink carry the rest. Only appearance: no content, no function. */
:root{
  --ink:#15161b;--muted:#5d616b;--paper:#ffffff;--surface:#ffffff;--surface-strong:#ffffff;
  --u108-font:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text","Segoe UI Variable Display","Segoe UI",Inter,"Helvetica Neue",Roboto,Arial,sans-serif;
  --u108-ease:cubic-bezier(.16,1,.3,1);
  --danger:#c0473b;--good:#3f8f62;--info:#5d7fa8;
  --radius:28px;--radius-sm:16px;
  /* default = home: soft blue (Update110: one hue per area) */
  --a-bg:#f2f7ff;--a-soft:#e0ecfd;--a-tint:#cddff9;--a-tint2:#e6f0ff;--a-accent:#5b9cf0;--a-deep:#1b55ae;--a-rgb:91,156,240;
}
html[data-u108-area=grammar]  {--a-bg:#fff6ef;--a-soft:#ffe9d9;--a-tint:#ffd8bc;--a-tint2:#ffefe2;--a-accent:#f29a6b;--a-deep:#b04718;--a-rgb:242,154,107}
html[data-u108-area=vocab]    {--a-bg:#f1faf4;--a-soft:#ddf4e6;--a-tint:#c5ecd6;--a-tint2:#e5f7ec;--a-accent:#5dba8b;--a-deep:#1b7549;--a-rgb:93,186,139}
html[data-u108-area=reading]  {--a-bg:#f6f2ff;--a-soft:#eadffc;--a-tint:#dacbf8;--a-tint2:#eee6ff;--a-accent:#9a7ee8;--a-deep:#5530b0;--a-rgb:154,126,232}
html[data-u108-area=writing]  {--a-bg:#fff3f3;--a-soft:#ffe0e0;--a-tint:#ffc9c9;--a-tint2:#ffe8e8;--a-accent:#ee7373;--a-deep:#b02727;--a-rgb:238,115,115}
html[data-u108-area=practice] {--a-bg:#eefaf9;--a-soft:#d6f3f0;--a-tint:#bce9e4;--a-tint2:#e1f6f4;--a-accent:#46bdb4;--a-deep:#0a6c66;--a-rgb:70,189,180}
html[data-u108-area=materials]{--a-bg:#fffbea;--a-soft:#fff1c2;--a-tint:#ffe796;--a-tint2:#fff5d1;--a-accent:#ebb63c;--a-deep:#7d5500;--a-rgb:235,182,60}
/* the older styles read these names: they now follow the area colour */
html:root:root{
  --bg:var(--a-bg);--paper-2:var(--a-bg);--line:rgba(var(--a-rgb),.30);--surface-border:rgba(var(--a-rgb),.30);
  --terracotta:var(--a-deep);--terracotta-dark:var(--a-deep);--olive:var(--a-accent);--olive-dark:var(--a-deep);
  --sage:var(--a-soft);--sand:var(--a-tint);--gold:var(--a-accent);
  --shadow:0 1px 2px rgba(23,20,28,.05),0 26px 52px -20px rgba(var(--a-rgb),.55);
  --shadow-soft:0 1px 2px rgba(23,20,28,.04),0 14px 30px -14px rgba(var(--a-rgb),.45);
}

/* page: the whole page carries the area colour */
html:root:root:root body{
  font-family:var(--u108-font)!important;color:var(--ink)!important;-webkit-font-smoothing:antialiased;
  background:
    radial-gradient(1100px 560px at 6% -8%,var(--a-tint) 0%,transparent 64%),
    radial-gradient(900px 520px at 104% 2%,var(--a-tint2) 0%,transparent 60%),
    var(--a-bg)!important;
}
html:root:root:root body button,html:root:root:root body input,html:root:root:root body textarea,html:root:root:root body select,
html:root:root:root body *:not(.u95-text-note-content):not(code):not(pre){font-family:var(--u108-font)!important}

/* typography */
html:root:root:root body h1,html:root:root:root body h2,html:root:root:root body h3,html:root:root:root body h4,
html:root:root:root body .site-header .brand>strong,html:root:root:root body .brand strong{font-family:var(--u108-font)!important;letter-spacing:-.03em;color:var(--ink)}
html:root:root:root body h1{font-weight:800!important;letter-spacing:-.045em!important;line-height:1.04!important}
html:root:root:root body h2{font-weight:760!important;letter-spacing:-.035em!important;line-height:1.1!important}
html:root:root:root body h3{font-weight:720!important;letter-spacing:-.025em!important}
html:root:root:root body .page-hero-box h1,html:root:root:root body .rw5-hero h1,html:root:root:root body .rw6-hero h1,html:root:root:root body .ww31-hero h1{font-size:clamp(2.3rem,4.4vw,3.7rem)!important}
html:root:root:root body .section-kicker{letter-spacing:.16em!important;font-weight:800!important;color:var(--a-deep)!important}
html:root:root:root body p,html:root:root:root body li{line-height:1.6}

/* header: milk glass, black active pill */
html:root:root:root body .site-header{
  background:rgba(255,255,255,.66)!important;-webkit-backdrop-filter:saturate(180%) blur(22px);backdrop-filter:saturate(180%) blur(22px);
  border-bottom:1px solid rgba(var(--a-rgb),.28)!important;box-shadow:0 12px 30px -24px rgba(var(--a-rgb),.9)!important;
}
html:root:root:root body .site-header .main-nav .nav-link,html:root:root:root body .site-header .main-nav .nav-dropdown-btn{
  font-size:13.2px!important;font-weight:620!important;letter-spacing:-.012em;padding:8px 7.5px!important;border-radius:999px!important;
  background:transparent!important;border:1px solid transparent!important;color:#23252d!important;box-shadow:none!important;
  transition:background .3s var(--u108-ease),color .3s,box-shadow .3s,transform .3s var(--u108-ease);
}
html:root:root:root body .site-header .main-nav .nav-link:hover,html:root:root:root body .site-header .main-nav .nav-dropdown-btn:hover{background:rgba(var(--a-rgb),.18)!important;transform:translateY(-1px)}
html:root:root:root body .site-header .main-nav .nav-link.active,html:root:root:root body .site-header .main-nav .nav-dropdown-btn.active{
  background:var(--ink)!important;color:#fff!important;border-color:transparent!important;box-shadow:0 12px 24px -12px rgba(23,20,28,.7)!important;transform:none;
}
html:root:root:root body .site-header .main-nav .nav-link.active *,html:root:root:root body .site-header .main-nav .nav-dropdown-btn.active *{color:#fff!important}
html:root:root:root body .world-menu{
  border-radius:24px!important;border:1px solid rgba(var(--a-rgb),.28)!important;background:rgba(255,255,255,.9)!important;
  -webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);box-shadow:0 30px 60px -24px rgba(var(--a-rgb),.8)!important;
}
html:root:root:root body .u92-account-btn.u93-account-btn{
  border-radius:999px!important;background:rgba(255,255,255,.88)!important;border:1px solid rgba(var(--a-rgb),.32)!important;
  box-shadow:var(--shadow-soft)!important;transition:transform .3s var(--u108-ease),box-shadow .3s;
}
html:root:root:root body .u92-account-btn.u93-account-btn:hover{transform:translateY(-1px);box-shadow:var(--shadow)!important}
html:root:root:root body .world-nav-shell,html:root:root:root body .rw5-unit-nav-shell{
  background:rgba(255,255,255,.62)!important;-webkit-backdrop-filter:saturate(170%) blur(16px);backdrop-filter:saturate(170%) blur(16px);
  border-color:rgba(var(--a-rgb),.24)!important;
}

/* home: deep night card with pastel glows */
html:root:root:root body .u42-shell{
  border-radius:46px!important;
  background:
    radial-gradient(900px 520px at 10% -8%,rgba(120,175,255,.42),transparent 62%),
    radial-gradient(800px 520px at 100% 0%,rgba(150,200,255,.30),transparent 58%),
    radial-gradient(700px 460px at 55% 110%,rgba(90,150,240,.28),transparent 60%),
    linear-gradient(165deg,#15233f 0%,#0b1322 100%)!important;
  box-shadow:0 40px 80px -30px rgba(20,50,110,.6)!important;
}
html:root:root:root body .u42-card{
  background:#ffffff!important;border:1px solid rgba(255,255,255,.8)!important;border-radius:34px!important;
  box-shadow:0 30px 60px -28px rgba(0,0,0,.55)!important;
}
html:root:root:root body .u42-intro h1,html:root:root:root body .u42-intro .u42-title{font-size:clamp(2.6rem,4.8vw,4.2rem)!important;letter-spacing:-.05em!important}

/* hero boxes */
html:root:root:root body .page-hero-box,html:root:root:root body .rw5-hero,html:root:root:root body .rw6-hero,html:root:root:root body .ww31-hero,html:root:root:root body .hero-box,html:root:root:root body .hero-card{
  border-radius:38px!important;border:1px solid rgba(255,255,255,.85)!important;
  background:
    radial-gradient(120% 150% at 100% 0%,var(--a-tint) 0%,rgba(255,255,255,0) 62%),
    radial-gradient(90% 120% at 0% 100%,var(--a-tint2) 0%,rgba(255,255,255,0) 58%),
    linear-gradient(135deg,#ffffff 0%,rgba(255,255,255,.92) 100%)!important;
  box-shadow:var(--shadow)!important;
}
html:root:root:root body .page-hero-box img{will-change:translate}
html[data-u108-area=vocab]:root:root:root body .page-hero-box img{-webkit-mask-image:linear-gradient(to bottom,#000 78%,transparent 100%);mask-image:linear-gradient(to bottom,#000 78%,transparent 100%)}

/* cards */
html:root:root:root body .card,html:root:root:root body .task-card,html:root:root:root body .content-section,html:root:root:root body .rw5-task-card,html:root:root:root body .u106-hz-card{
  background:#ffffff!important;border:1px solid rgba(var(--a-rgb),.26)!important;border-radius:28px!important;box-shadow:var(--shadow-soft)!important;
}
html:root:root:root body .content-section{background:rgba(255,255,255,.66)!important;box-shadow:none!important}
html:root:root:root body .task-card,html:root:root:root body .rw5-task-card{border-radius:24px!important}
html:root:root:root body .card-link,html:root:root:root body .material-card,html:root:root:root body .mat24-card{transition:transform .45s var(--u108-ease),box-shadow .45s var(--u108-ease)}
html:root:root:root body .card-link:hover,html:root:root:root body .material-card:hover,html:root:root:root body .mat24-card:hover{transform:translateY(-5px)!important;box-shadow:var(--shadow)!important}
html:root:root:root body .u84-route-quote,html:root:root:root body .flork-boost33{
  border:0!important;background:rgba(255,255,255,.7)!important;box-shadow:none!important;border-radius:999px!important;color:#474a55!important;
}

/* inner boxes, chips, labels that used to be beige */
html:root:root:root body .q-item{background:rgba(var(--a-rgb),.10)!important;border-color:rgba(var(--a-rgb),.28)!important;border-radius:18px!important}
html:root:root:root body .rw5-q,html:root:root:root body .rw5-profile,html:root:root:root body .rw5-genre-top,html:root:root:root body .material-thumb,html:root:root:root body .rw25-tf-item,html:root:root:root body .memo,html:root:root:root body .complete-box{
  background:rgba(var(--a-rgb),.08)!important;border-color:rgba(var(--a-rgb),.24)!important;
}
html:root:root:root body .task-no,html:root:root:root body .gx44-num{background:rgba(var(--a-rgb),.22)!important;color:var(--a-deep)!important;border-color:transparent!important}
html:root:root:root body .ww28-chip,html:root:root:root body .chip,html:root:root:root body .tag,html:root:root:root body .vocab-grade-btn{
  background:#fff!important;border:1px solid rgba(var(--a-rgb),.34)!important;color:var(--ink)!important;border-radius:999px!important;font-weight:640!important;
}
html:root:root:root body .vocab-grade-btn.active,html:root:root:root body button.active:not(.nav-link):not(.nav-dropdown-btn){background:var(--a-deep)!important;color:#fff!important;border-color:transparent!important}
html:root:root:root body label.option,html:root:root:root body .memo-word,html:root:root:root body button.clear-field{border-color:rgba(var(--a-rgb),.4)!important;background:#fff!important}
html:root:root:root body .rw5-unit-link,html:root:root:root body [class*="unit-link"],html:root:root:root body .world-nav-link{
  border-radius:999px!important;font-weight:640!important;letter-spacing:-.005em;background:rgba(255,255,255,.85)!important;border:1px solid rgba(var(--a-rgb),.34)!important;color:var(--ink)!important;
}
html:root:root:root body .rw5-unit-link.home,html:root:root:root body .world-nav-link.world-nav-home{color:var(--a-deep)!important;background:rgba(var(--a-rgb),.16)!important}
html:root:root:root body .rw5-unit-link.active,html:root:root:root body .rw5-unit-link[aria-current],html:root:root:root body .world-nav-link.active,html:root:root:root body .ww28-unit-link.active{background:var(--ink)!important;color:#fff!important;border-color:transparent!important}
html:root:root:root body .rw26-line-no{color:var(--a-deep)!important}

/* buttons: white pills, black primary */
html:root:root:root body .btn{
  border-radius:999px!important;font-weight:650!important;letter-spacing:-.005em;padding:10px 18px!important;
  background:#ffffff!important;color:var(--ink)!important;border:1px solid rgba(var(--a-rgb),.38)!important;box-shadow:0 1px 2px rgba(23,20,28,.06)!important;
  transition:transform .3s var(--u108-ease),box-shadow .3s var(--u108-ease),background .25s;
}
html:root:root:root body .btn.btn-sm{padding:8px 15px!important}
html:root:root:root body .btn:hover{transform:translateY(-2px);box-shadow:0 14px 26px -12px rgba(var(--a-rgb),.9)!important}
html:root:root:root body .btn:active{transform:translateY(0) scale(.97);box-shadow:0 2px 6px rgba(23,20,28,.12)!important}
html:root:root:root body .btn-olive,html:root:root:root body .btn-primary{
  background:var(--ink)!important;color:#fff!important;border-color:transparent!important;box-shadow:0 14px 26px -14px rgba(23,20,28,.8)!important;
}
html:root:root:root body .btn-olive:hover,html:root:root:root body .btn-primary:hover{box-shadow:0 18px 30px -14px rgba(23,20,28,.9)!important}
html:root:root:root body .btn-soft{background:rgba(var(--a-rgb),.14)!important;border-color:rgba(var(--a-rgb),.3)!important}
html:root:root:root body .btn-ghost{background:transparent!important;box-shadow:none!important}
html:root:root:root body .btn-danger{background:linear-gradient(135deg,#d2604f,#b53f33)!important;color:#fff!important;border-color:transparent!important}

/* fields */
html:root:root:root body textarea,html:root:root:root body input[type=text],html:root:root:root body input[type=email],html:root:root:root body input[type=password],html:root:root:root body select,html:root:root:root body input:not([type]){
  border-radius:16px!important;border:1.5px solid rgba(var(--a-rgb),.42)!important;background:#fff!important;transition:border-color .2s,box-shadow .25s var(--u108-ease);
}
html:root:root:root body textarea:focus,html:root:root:root body input:focus,html:root:root:root body select:focus{
  outline:none!important;border-color:var(--a-deep)!important;box-shadow:0 0 0 4px rgba(var(--a-rgb),.28)!important;
}


/* remaining beige parts (found by scanning every page) */
html:root:root:root body .u42-feature{background:rgba(var(--a-rgb),.14)!important;border-color:rgba(var(--a-rgb),.28)!important}
html:root:root:root body .u42-hero-frame{background:linear-gradient(160deg,rgba(var(--a-rgb),.22),rgba(255,255,255,.7))!important;border-color:rgba(var(--a-rgb),.32)!important}
html:root:root:root body .u42-progress .u42-list>div,html:root:root:root body .u50-progress .u42-list>div{background:#fff!important;border-color:rgba(var(--a-rgb),.30)!important}
html:root:root:root body .u42-progress .u42-progress-foot>div,html:root:root:root body .u50-progress .u42-progress-foot>div{background:transparent!important;border:0!important;box-shadow:none!important}
html:root:root:root body .gx44-card{background:#fff!important;border-color:rgba(var(--a-rgb),.28)!important}
html:root:root:root body .gx44-formula,html:root:root:root body .ww28-helpbox,html:root:root:root body .ww28-complete,html:root:root:root body .rw5-ask-answer{background:rgba(var(--a-rgb),.12)!important;border-color:rgba(var(--a-rgb),.28)!important}
html:root:root:root body .rw5-text-switch a,html:root:root:root body .mat24-filter a,html:root:root:root body .ww28-material-pages span{
  background:#fff!important;border:1px solid rgba(var(--a-rgb),.34)!important;color:var(--ink)!important;border-radius:999px!important}
html:root:root:root body .rw5-text-switch a.active,html:root:root:root body .mat24-filter a.active{background:var(--ink)!important;color:#fff!important;border-color:transparent!important}
html:root:root:root body .ww28-unit-nav-shell{background:rgba(255,255,255,.62)!important;-webkit-backdrop-filter:saturate(170%) blur(16px);backdrop-filter:saturate(170%) blur(16px);border-color:rgba(var(--a-rgb),.24)!important}
html:root:root:root body .ww28-step{background:#fff!important;border:1px solid rgba(var(--a-rgb),.32)!important;border-radius:20px!important}
html:root:root:root body .ww28-step.active{border-color:var(--a-deep)!important;box-shadow:0 12px 26px -14px rgba(var(--a-rgb),.9)!important}
html:root:root:root body .ww28-step.locked{background:rgba(255,255,255,.55)!important}
html:root:root:root body .ww28-step span{background:rgba(var(--a-rgb),.24)!important;color:var(--a-deep)!important}
html:root:root:root body .fe-page-quote{border-color:rgba(var(--a-rgb),.3)!important}
html:root:root:root body .exam-grade-scale{background:linear-gradient(180deg,#fff,rgba(var(--a-rgb),.10))!important;border-color:rgba(var(--a-rgb),.28)!important}

/* progress bar + transition (see script) */
#u108-progress{position:fixed;left:0;top:0;height:3px;width:100%;transform:scaleX(0);transform-origin:0 50%;
  background:linear-gradient(90deg,var(--a-accent),var(--a-deep));z-index:100001;pointer-events:none}
#u108-bloom{position:fixed;inset:0;z-index:100000;pointer-events:none;visibility:hidden;overflow:hidden}
#u108-bloom>.u108-wash{position:absolute;inset:0;
  background:radial-gradient(circle at var(--bx,50%) var(--by,45%),#ffffff 0%,var(--b-soft,#ece8fb) 42%,var(--b-tint,#e0d8f8) 100%);
  -webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);clip-path:circle(0px at 50% 50%);opacity:1}
#u108-bloom>.u108-mark{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;opacity:0;padding:0 20px}
#u108-bloom .u108-lock{display:flex;align-items:center;gap:clamp(12px,2.2vw,22px);max-width:100%}
#u108-bloom .u108-mark-ico{flex:0 0 auto;display:block;width:clamp(96px,17vw,168px);aspect-ratio:488/389;
  background:var(--u108-logo,none) center/contain no-repeat}
#u108-bloom .u108-mark-txt{display:flex;flex-direction:column;justify-content:center;line-height:1;color:#15161b;
  font-family:var(--u108-font);white-space:nowrap}
#u108-bloom .u108-mark-txt b{font-weight:850;font-size:clamp(2.1rem,5.2vw,3.5rem);letter-spacing:-.045em}
#u108-bloom .u108-mark-txt i{font-style:normal;font-weight:720;font-size:clamp(1.05rem,2.5vw,1.65rem);letter-spacing:-.025em;margin-top:.28em}
@media (prefers-reduced-motion:reduce){
  #u108-bloom{display:none!important}
  html:root:root:root body .btn,html:root:root:root body .card-link,html:root:root:root body .site-header .nav-link{transition:none!important}
}
