:root {
  color-scheme: light;
  --paper: #f8f7f1;
  --white: #fffefa;
  --ink: #192d27;
  --muted: #52665c;
  --green: #174c3d;
  --deep: #123e33;
  --line: #dfE6dc;
  --gold: #fbd782;
  --lime: #e0f0d9;
  --purple: #ece3f5;
  --radius: 23px;
  font-family: "Nunito", "Avenir Next", system-ui, sans-serif;
  font-size: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.55; }
button,select,input { font: inherit; }
button,select,summary { cursor: pointer; }
a { color: inherit; }
button,select { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #a152b2; outline-offset: 4px; }
.skip { position: fixed; top: 10px; left: 10px; z-index: 5; transform: translateY(-200%); padding: 12px; background: white; }
.skip:focus { transform: none; }
.icon { width: 1.2em; height: 1.2em; flex: none; vertical-align: -.2em; }
.site-header { background: var(--white); border-bottom: 1px solid #e9eae1; }
.header-inner, #contingut, .footer-inner { width: min(1180px, calc(100% - 64px)); margin: auto; }
.header-inner { min-height: 82px; display: flex; gap: 30px; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 900; text-decoration: none; font-size: 1.42rem; letter-spacing: -.055em; }
.brand img { width: 44px; height: 44px; border-radius: 13px; }
.nav { display: flex; align-items: center; gap: 5px; }
.nav a { text-decoration: none; padding: 9px 13px; border-radius: 10px; color: var(--muted); font-weight: 750; white-space: nowrap; font-size: .93rem; }
.nav a:hover, .nav a[aria-current=page] { color: var(--green); background: #eaf3e7; }
.nav .icon { margin-right: 4px; }
.lang { display: flex; gap: 2px; padding: 4px; background: #efefe8; border-radius: 13px; flex: none; }
.lang button { min-width: 42px; padding: 5px 8px; border: 0; color: var(--muted); background: transparent; border-radius: 9px; font-weight: 850; }
.lang button[aria-pressed=true] { color: var(--white); background: var(--green); }
#contingut { min-height: 66vh; padding-block: 32px 46px; outline: 0; }
h1,h2,h3,p { margin: 0; }
h1,h2,h3 { line-height: 1.1; font-weight: 900; letter-spacing: -.04em; }
h1 { font-size: clamp(2.15rem, 4.8vw, 3.9rem); }
h2 { font-size: clamp(1.65rem, 3.1vw, 2.55rem); }
h3 { font-size: 1.22rem; }
.eyebrow { display: flex; gap: 7px; align-items: center; font-weight: 900; font-size: .8rem; letter-spacing: .095em; text-transform: uppercase; }
.hero { display: grid; grid-template-columns: .96fr 1.04fr; border-radius: 30px; overflow: hidden; position: relative; background: var(--deep); color: #fffdf2; box-shadow: 0 16px 42px #1b44311c; }
.hero-copy { padding: clamp(25px,4.2vw,56px); align-self: center; position: relative; z-index: 1; }
.hero .eyebrow { color: #d9edca; margin-bottom: 14px; }
.hero .eyebrow .icon { color: var(--gold); }
.hero h1 { line-height: .99; max-width: 11ch; }
.hero h1 span { color: var(--gold); display: block; }
.hero p { max-width: 39ch; color: #e4eee1; font-size: 1.06rem; margin-top: 19px; }
.hero-art { width: 100%; height: 100%; min-height: 365px; object-fit: cover; object-position: 54% 52%; display: block; }
.hero::after { content: ""; position: absolute; pointer-events: none; inset: 0 0 0 46%; background: linear-gradient(90deg, var(--deep), transparent 19%); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hero .btn-row { margin-top: 24px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 45px; padding: 10px 15px; font-weight: 850; border-radius: 12px; border: 1px solid transparent; text-decoration: none; background: var(--green); color: #fff; line-height: 1.2; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .62; cursor: not-allowed; }
.btn-gold { background: var(--gold); color: #302b18; box-shadow: 0 3px 0 #daa74c; }
.btn-ghost { color: #fffdf2; border-color: #8dab9b; background: #ffffff0b; }
.btn-light { background: #edf3e9; border-color: #dce8d7; color: var(--green); }
.btn-plain { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-danger { background: #a13744; }
.section-head { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin: 33px 0 17px; }
.section-head .eyebrow { color: #3c7359; margin-bottom: 5px; }
.section-head p, .page-head p { margin-top: 7px; color: var(--muted); }
.stat-pill { display: flex; align-items: center; gap: 8px; flex: none; font-weight: 800; background: #fffdf4; color: #66501a; border: 1px solid #ebdfb7; border-radius: 100px; padding: 7px 12px; font-size: .92rem; }
.stat-pill .icon { color: #9c6c15; }
.world-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 17px; }
.world { min-width: 0; display: block; padding: 0; border: 1px solid var(--line); background: var(--white); border-radius: 21px; color: var(--ink); overflow: hidden; text-align: left; box-shadow: 0 6px 17px #2037190a; transition: transform .18s ease, box-shadow .18s ease; }
.world:hover { transform: translateY(-3px); box-shadow: 0 8px 22px #20371918; }
.world[aria-expanded=true] { border-color: #82a58f; box-shadow: 0 0 0 2px #d4e6d5; }
.world-art { height: clamp(100px,13vw,170px); width: 100%; object-fit: cover; display: block; object-position: center 54%; }
.world-info { display: block; padding: 15px 17px 17px; }
.world-tag { display: inline-block; border-radius: 6px; background: #e4f1db; padding: 3px 8px; font-weight: 900; font-size: .8rem; color: #305643; }
.world:nth-child(2) .world-tag { background: #e5eff9; color: #284b72; }
.world:nth-child(3) .world-tag { background: var(--purple); color: #573575; }
.world-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: clamp(1.05rem,2vw,1.3rem); font-weight: 900; line-height: 1.15; margin: 8px 0 4px; letter-spacing: -.02em; }
.world-title .icon { color: #6d877a; }
.world-desc { display: block; color: var(--muted); font-size: .91rem; }
.world-meter, .meter { display: block; height: 7px; overflow: hidden; border-radius: 100px; background: #e7ebe3; }
.world-meter { margin-top: 13px; }
.world-meter span, .meter span { display: block; height: 100%; background: #48835f; border-radius: inherit; }
.world:nth-child(2) .world-meter span { background: #4684ad; }
.world:nth-child(3) .world-meter span { background: #9570b4; }
.mission-panel { margin-top: 20px; padding: clamp(16px,3vw,28px); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-intro { margin: 7px 0 19px; color: var(--muted); }
.mission-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.mission { display: grid; grid-template-columns: auto 1fr auto; text-decoration: none; gap: 9px; align-items: center; min-width: 0; padding: 10px; border-radius: 12px; background: #f5f6f1; color: var(--ink); border: 1px solid #e8ece3; }
.mission:hover { background: #e7f2e5; }
.mission-emoji { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 9px; background: white; }
.mission strong { display: block; font-size: .94rem; line-height: 1.2; overflow-wrap: anywhere; }
.mission small { display: block; color: var(--muted); font-size: .79rem; margin-top: 3px; }
.mission > .icon { color: var(--green); }
.footer-inner { border-top: 1px solid var(--line); padding: 23px 0 27px; display: flex; justify-content: space-between; color: var(--muted); flex-wrap: wrap; gap: 9px 18px; font-size: .89rem; }
.footer-inner a { color: var(--green); font-weight: 800; }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1.1rem; }
.contact-page { max-width: 44rem; margin-inline: auto; }
.contact-page .panel { display: grid; gap: .85rem; }
.contact-page .contact-address { justify-self: start; max-width: 100%; overflow-wrap: anywhere; }
.home-community { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem 1rem; margin-bottom: .8rem; font-size: .9rem; color: var(--muted); }
.home-community a, .community-page li a { color: var(--cyan); font-weight: 750; }
.community-page { max-width: 50rem; margin-inline: auto; display: grid; gap: 1rem; }
.community-page .page-head { margin-bottom: 0; }
.community-page .panel { display: grid; gap: .7rem; }
.community-page ol, .community-page ul { margin: 0; padding-inline-start: 1.3rem; display: grid; gap: .5rem; }
.community-page .btn { justify-self: start; max-width: 100%; }
.community-pending { color: var(--muted); }
.community-closing { padding: .2rem 0; color: var(--cyan); }
.page-head { margin: 6px 0 23px; }
.page-head h1 { font-size: clamp(2rem,5vw,3.15rem); margin-top: 6px; }
.page-head .eyebrow { color: #45775d; }
.guide-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 17px; margin-top: 22px; }
.guide-card,.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(16px,3vw,26px); }
.guide-card p { color: var(--muted); margin-top: 8px; }
.guide-card .btn { margin-top: 13px; }
.guide-icon { display: grid; place-items: center; width: 47px; height: 47px; border-radius: 14px; margin-bottom: 14px; color: var(--green); background: #e4f0e0; font-size: 1.3rem; }
.guide-card:nth-child(2) .guide-icon { background: #e9e1f4; color: #654480; }
.guide-card:nth-child(3) .guide-icon { background: #f8edc9; color: #755628; }
.guide-example { margin-top: 17px; }
.teacher-guide summary { font-weight: 850; }
.teacher-guide video { display: block; width: min(100%, 800px); margin: 14px auto 0; border-radius: 12px; background: var(--deep); }
.guide-example blockquote { margin: 12px 0; border-left: 4px solid #8fbb8c; padding: 6px 14px; font-size: 1.38rem; font-weight: 800; }
.guide-example p { margin: 7px 0 14px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.stats .panel { display: grid; gap: 2px; }
.stats strong { font-size: 2rem; color: var(--green); line-height: 1.2; }
.stats span { color: var(--muted); }
.progress-list { margin-top: 18px; }
.progress-list .mission { margin: 7px 0; }
.progress-list .tag { color: #4e6559; font-size: .875rem; font-weight: 800; padding-right: 5px; }
.lesson { width: min(100%,990px); margin: auto; }
.lesson .page-head { margin-top: 13px; }
.lesson-breadcrumb { text-decoration: none; font-weight: 850; color: var(--green); }
.lesson-breadcrumb .icon { margin-right: 4px; }
.lesson-headline { display: flex; align-items: center; gap: 13px; }
.lesson-emoji { padding: 7px 11px; border-radius: 13px; background: #e5eddf; font-size: 1.6rem; }
.steps { display: flex; gap: 7px; margin-bottom: 17px; }
.steps button { border: 1px solid var(--line); background: var(--white); color: var(--muted); border-radius: 12px; padding: 9px 12px; flex: 1; font-weight: 850; display: flex; justify-content: center; align-items: center; gap: 7px; }
.steps button[aria-current=step] { color: white; background: var(--green); border-color: var(--green); }
.story-card { margin-block: 14px; }
.story { font-family: "Atkinson Hyperlegible Next", "Avenir Next", system-ui, sans-serif; font-size: var(--reading-size,1.55rem); line-height: 1.72; letter-spacing: .002em; font-weight: 550; overflow-wrap: anywhere; }
.story p + p { margin-top: .85em; }
.story mark { background: #fff0aa; border-radius: 4px; color: inherit; }
.story .reading-review-word {
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  background: #ffe47b;
  color: #392c07;
  border: 0;
  border-radius: .25em;
  padding: 0 .12em;
  text-decoration: underline dashed;
  text-underline-offset: .18em;
}
.story .reading-review-word:hover { background: #ffd751; }
.story .reading-review-word:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.story .reading-review-word.is-reviewed { background: #c6efdc; color: #1c5c43; text-decoration-style: solid; }
.reading-practice { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.reading-practice h4 { margin: 0; font-size: 1.1rem; }
.reading-practice .btn-row { margin-top: 10px; }
.reading-practice-prompt strong { display: inline-block; color: #392c07; background: #ffe47b; border-radius: 7px; margin-inline-start: .25em; padding: .12em .4em; font-size: 1.3rem; }
.reading-practice-done { color: var(--green); font-weight: 800; }
.section-controls { display: flex; flex-wrap: wrap; gap: 10px 17px; align-items: end; }
.section-controls label { display: grid; gap: 4px; font-size: .91rem; color: var(--muted); font-weight: 800; }
.section-controls select { min-height: 42px; border: 1px solid #d9e2d7; border-radius: 10px; padding: 7px 32px 7px 10px; background: #fbfcf8; appearance: none; color: var(--ink); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23385246' stroke-width='2'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: 15px; background-position: right 9px center; }
.section-controls select:disabled { opacity: .65; }
.lesson-note { color: var(--muted); margin-top: 8px; font-size: .91rem; max-width: 73ch; }
.lesson-note + .btn-row { margin-top: 13px; }
.lesson-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.read-controls { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
.clock { display: flex; gap: 9px; align-items: center; justify-content: center; min-width: 115px; color: var(--green); background: #edf6e9; border-radius: 13px; padding: 7px 12px; font-weight: 900; font-size: 1.55rem; font-variant-numeric: tabular-nums; }
.clock.is-active { background: #fff0d9; color: #823a28; }
#live-status { min-height: 1.45em; color: var(--green); font-weight: 800; margin-top: 8px; }
.transcript { overflow-wrap: anywhere; }
.transcript summary { font-weight: 850; }
.transcript p { padding-top: 7px; }
.feedback { margin-block: 14px; background: #eaf4e6; border-color: #d6e7d0; }
.feedback h3 { margin-bottom: 8px; }
.feedback p + p { margin-top: 7px; }
.feedback .btn-row { margin-top: 11px; }
.feedback input[type=number] { width: 80px; border: 1px solid #a9c3a5; border-radius: 9px; padding: 6px; }
.revisit { margin-top: 12px; }
details.revisit > summary { color: var(--green); font-weight: 850; }
.quiz { margin: 15px 0; }
.quiz fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.quiz legend { font-size: 1.14rem; font-weight: 900; margin-bottom: 9px; }
.quiz-option { display: flex; align-items: center; gap: 9px; padding: 9px 11px; margin-top: 6px; border: 1px solid #e0e7dd; border-radius: 10px; background: #fafbf7; cursor: pointer; }
.quiz-option:has(:checked) { background: #eee8f6; border-color: #aa92c0; }
.quiz-option input { accent-color: var(--green); margin: 0; width: 1rem; height: 1rem; flex: none; }
.quiz-option.is-right { background: #e5f1dd; border-color: #a8c7a0; }
.quiz-option.is-off { background: #fcebe4; border-color: #dba892; }
.quiz-expl { margin-top: 9px; }
.result-banner { margin: 15px 0; background: #fff2cd; border-color: #efdc9f; }
.result-banner p { margin-top: 7px; }
@media (max-width: 820px) {
  .header-inner, #contingut, .footer-inner { width: calc(100% - 34px); }
  .header-inner { gap: 10px; }
  .nav a { padding: 7px; }
  .hero-copy { padding: 28px 22px; }
  .hero-art { min-height: 330px; }
  .mission-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 620px) {
  .header-inner { min-height: auto; padding: 10px 0 7px; flex-wrap: wrap; }
  .brand { font-size: 1.25rem; }
  .brand img { width: 35px; height: 35px; }
  .nav { order: 3; width: 100%; justify-content: space-between; gap: 2px; }
  .nav a { padding: 7px 8px; font-size: .86rem; }
  .nav .icon { margin-right: 2px; }
  #contingut { padding-top: 19px; }
  .hero { grid-template-columns: 1fr; border-radius: 22px; }
  .hero-copy { padding: 25px 19px 20px; }
  .hero h1 { max-width: none; }
  .hero p { margin-top: 11px; }
  .hero .btn-row { margin-top: 16px; }
  .hero-art { min-height: 0; height: 195px; object-position: 55% 48%; }
  .hero::after { inset: auto 0 174px; height: 23px; background: linear-gradient(180deg,var(--deep),transparent); }
  .section-head { margin-top: 24px; }
  .world-grid, .guide-grid { grid-template-columns: 1fr; gap: 10px; }
  .world { display: grid; grid-template-columns: minmax(88px, 32%) 1fr; }
  .world-art { height: 100%; min-height: 119px; }
  .world-info { padding: 11px 12px; }
  .mission-list { grid-template-columns: 1fr; }
  .stats { gap: 6px; }
  .stats .panel { padding: 11px; }
  .stats strong { font-size: 1.5rem; }
  .stats span { font-size: .85rem; }
  .lesson-headline { gap: 7px; }
  .steps button { font-size: .84rem; padding: 8px 5px; gap: 4px; }
  .section-controls { gap: 8px; }
  .read-controls { grid-template-columns: 1fr; }
  .clock { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; transition: none !important; }
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.point-chip { display: flex; gap: 5px; align-items: center; border-radius: 10px; background: #fff4d2; padding: 6px 9px; color: #634a13; text-decoration: none; font-weight: 900; white-space: nowrap; }
.point-chip .icon { fill: #f7ca60; color: #9c6717; }
.video-grid,.badge-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.video-card { border: 1px solid var(--line); background: var(--white); border-radius: 17px; overflow: hidden; }
.video-card video { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--deep); }
.video-card > div { padding: 13px 15px; }
.video-card p,.badge-card p,.level-panel p { color: var(--muted); margin-top: 5px; }
.level-panel { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; background: #fff4d4; border-color: #f0dfac; margin-bottom: 14px; }
.level-icon { width: 52px; height: 52px; display: grid; place-items: center; background: #f8d980; border-radius: 13px; color: #664a12; font-size: 1.5rem; }
.level-panel .meter { margin-top: 9px; background: #e9dfbe; }
.level-panel .meter span { background: #a87421; }
.level-panel > strong { color: #695016; font-size: 1.15rem; }
.badge-card { display: flex; align-items: center; gap: 12px; }
.badge-card.unlocked { background: #fff4d4; border-color: #f0dfac; }
.badge-emblem { display: grid; place-items: center; flex: none; width: 47px; height: 47px; border: 1px dashed #9baf9e; background: #edf2e8; border-radius: 100%; font-size: 1.35rem; }
.unlocked .badge-emblem { border-style: solid; border-color: #d3ab49; background: #ffdf7b; }
.earned { display: inline-block; margin-left: 3px; padding: 4px 7px; border-radius: 7px; background: #ffe38d; color: #674a0e; font-size: .83rem; letter-spacing: 0; }
.quiz-stars { color: #a2701c; font-size: 1.15rem; letter-spacing: .06em; }
@media (max-width: 700px) {
  .nav .icon { display: none; }
}
@media (max-width: 620px) {
  .nav .icon { display: inline; }
  .header-actions { gap: 5px; }
  .point-chip { padding-inline: 5px; font-size: .84rem; }
  .lang button { min-width: 34px; }
  .video-grid,.badge-grid { grid-template-columns: 1fr; gap: 10px; }
}
@media (min-width: 621px) and (max-width: 850px) {
  .header-inner { gap: 7px; }
  .nav a { padding-inline: 7px; font-size: .87rem; }
  .nav .icon { display: none; }
  .brand { font-size: 1.22rem; }
  .brand img { width: 38px; height: 38px; }
  .header-actions { gap: 5px; }
  .point-chip { padding-inline: 7px; font-size: .86rem; }
  .lang button { min-width: 36px; }
}
@media (min-width: 621px) and (max-width: 700px) {
  .header-inner { flex-wrap: wrap; min-height: auto; padding: 10px 0 7px; }
  .nav { width: 100%; order: 3; }
}
@media (min-width: 701px) {
  .header-inner .nav { min-width: 0; flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 350px) {
  .header-inner, #contingut, .footer-inner { width: calc(100% - 24px); }
  .brand { font-size: 1.14rem; }
  .brand img { width: 29px; height: 29px; }
  .nav a { padding-inline: 6px; }
}
