/* ===================================================================
   Toca a Estudar — stylesheet v2
   Layout modeled on the original Tilda site (clean, centered, calm),
   with the Design Brief fonts (Baloo 2 / Nunito / Fraunces) and a
   reduced palette: Coral, Sunshine, Cream, Ink.
=================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Nunito:ital,wght@0,400;0,600;0,700;0,800;1,600&family=Fraunces:ital,opsz@1,9..144&display=swap');

:root{
  /* core palette */
  --coral:#FF6B5C;
  --coral-deep:#E0503F;
  --sun:#FFC24B;
  --sun-deep:#E0A62E;
  --cream:#FFF6EA;
  --cream-2:#FBEADB;
  --ink:#241B2E;
  --ink-deep:#1A1322;

  /* derived neutrals */
  --paper:#FFFCF7;
  --muted:#6E6478;
  --line:#ECE0CF;
  --shadow:0 18px 48px rgba(36,27,46,.12);
  --shadow-sm:0 8px 22px rgba(36,27,46,.08);
  --radius:22px;
  --radius-sm:14px;

  /* legacy aliases (kept so older markup keeps working) */
  --plum:var(--ink);
  --plum-deep:var(--ink-deep);
  --mint:var(--sun);
  --sky:var(--coral);
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  font-family:'Nunito',system-ui,sans-serif;
  color:var(--ink);
  background:#fff;
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
img{max-width:100%;display:block;}
a{color:inherit;text-decoration:none;}
button{font-family:inherit;cursor:pointer;}
h1,h2,h3,h4{font-family:'Baloo 2',cursive;font-weight:700;line-height:1.18;margin:0 0 .5em;color:var(--ink);}
p{margin:0 0 16px;}
.serif{font-family:'Fraunces',serif;font-style:italic;}
.wrap{max-width:1100px;margin:0 auto;padding:0 26px;position:relative;z-index:2;}
.hidden{display:none !important;}
/* .btn (and a few other elements) set their own `display`, which — at
   equal specificity — wins over the browser's built-in [hidden]{display:
   none} rule since author styles beat the UA stylesheet. This keeps the
   native `hidden` attribute/property (element.hidden = true) working on
   any element regardless of what else styles its display. */
[hidden]{display:none !important;}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  font-family:'Baloo 2',cursive;font-weight:700;font-size:1rem;
  padding:14px 28px;border-radius:999px;border:2px solid transparent;
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  white-space:nowrap;
}
.btn:hover{transform:translateY(-2px);box-shadow:var(--shadow-sm);}
.btn:active{transform:translateY(0);}
.btn-primary{background:var(--coral);color:#fff;}
.btn-primary:hover{background:var(--coral-deep);}
.btn-outline{background:transparent;color:var(--ink);border-color:var(--ink);}
.btn-outline:hover{background:var(--ink);color:#fff;}
.btn-ghost{background:transparent;color:var(--ink);padding:10px 16px;}
.btn-ghost:hover{background:var(--cream);}
.btn-sun{background:var(--sun);color:var(--ink);}
.btn-sun:hover{background:var(--sun-deep);}
.btn-block{width:100%;}
.btn[disabled]{opacity:.55;cursor:not-allowed;transform:none;}

/* ---------- nav ---------- */
.site-header{
  position:sticky;top:0;z-index:100;
  background:rgba(255,255,255,.94);backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line);
}
.nav{display:flex;align-items:center;justify-content:space-between;padding:12px 26px;gap:16px;}
/* the header nav carries one more item than a typical .wrap section, so it
   gets a bit more breathing room than the 1100px content column to keep
   all nav links on a single line at desktop widths */
.site-header .nav.wrap{max-width:1280px;}
.brand{display:flex;align-items:center;gap:10px;font-family:'Baloo 2';font-weight:800;color:var(--ink);font-size:1.12rem;}
.brand img{width:42px;height:42px;border-radius:50%;}
.nav-links{display:flex;align-items:center;gap:18px;list-style:none;margin:0;padding:0;flex-wrap:nowrap;}  /* nowrap, not wrap: a second row of links is the crowding this replaced —
     below the breakpoint below, the burger takes over instead */
.nav-links a{font-weight:700;font-size:.84rem;color:var(--ink);padding:6px 2px;border-bottom:2px solid transparent;white-space:nowrap;}
.nav-links a:hover{border-color:var(--coral);color:var(--coral);}
/* the parents link sits in the same list but reads as a button, so it has to opt
   out of the underline-on-hover the plain nav links use */
/* the yellow "information" button, shared by the main nav and the members header
   so both areas look like one site. Sun rather than coral: coral is the primary
   CTA colour used by the hero and plan buttons and this shouldn't outrank them.
   line-height:1 and no border keep the box short — neither header has a fixed
   height, so a tall item grows the whole bar. */
.btn-info{
  background:var(--sun);color:var(--ink);
  padding:7px 15px;font-size:.8rem;line-height:1;border-width:0;
}
.btn-info:hover{background:var(--sun-deep);color:var(--ink);}
.nav-cta a.btn{padding:7px 15px;font-size:.8rem;line-height:1;border-width:0;}
.nav-cta{margin-left:4px;}
@media (max-width:1000px){
  /* in the drawer the links stack full width, so let the button match them */
  .nav-cta{margin-left:0;width:100%;}
  .nav-cta a.btn{width:100%;font-size:1rem;padding:12px 20px;}
}
.nav-actions{display:flex;align-items:center;gap:10px;}
/* the language switch: one flag showing what you are reading, then the
   two-letter buttons that change it */
.lang-switch{display:flex;align-items:center;gap:9px;}
.lang-flag{
  font-size:1.6rem;line-height:1;
  /* emoji flags sit high in their box; nudge onto the buttons' centre line */
  position:relative;top:1px;
  filter:drop-shadow(0 1px 1px rgba(36,27,46,.18));
  user-select:none;
}
.lang-toggle{
  display:flex;background:var(--cream);border:1px solid var(--line);border-radius:999px;padding:3px;
}
.lang-toggle button{
  border:none;background:transparent;padding:6px 13px;border-radius:999px;
  font-family:'Baloo 2';font-weight:700;font-size:.82rem;color:var(--muted);
}
.lang-toggle button.active{background:var(--ink);color:#fff;}
@media (max-width:560px){
  .lang-flag{font-size:1.35rem;}
  .lang-switch{gap:7px;}
}
.nav-burger{display:none;background:none;border:none;font-size:1.5rem;color:var(--ink);}

@media (max-width:1000px){
  .nav-links{
    /* explicit top+height rather than inset's top/right/bottom/left: .site-header
       has backdrop-filter, which makes it the containing block for this fixed
       element, so a bottom:0 offset would resolve against the header's own
       (short) box instead of the viewport and collapse this panel's height */
    /* --header-h is measured in main.js; the header has no fixed height, so a
       hardcoded offset here drifts whenever a nav item changes size */
    position:fixed;top:var(--header-h,64px);left:0;right:0;
    height:calc(100vh - var(--header-h,64px));
    background:#fff;flex-direction:column;
    align-items:flex-start;padding:26px;gap:18px;transform:translateX(100%);
    transition:transform .25s ease;overflow-y:auto;
  }
  .nav-links.open{transform:translateX(0);}
  .nav-burger{display:block;}
}

/* ---------- hero (clean & centered, like the original) ----------
   The illustrated instrument banner sits along the bottom edge as a
   decorative strip; a cream-to-transparent fade keeps the headline/
   CTA area (which sits over the top of the image) easy to read. */
header.hero{
  position:relative;text-align:center;padding:80px 26px 260px;overflow:hidden;
  background:
    linear-gradient(180deg, var(--cream) 0%, var(--cream) 38%, rgba(255,246,234,.55) 62%, rgba(255,246,234,0) 100%),
    url('../assets/webpage banner.jpg') center bottom / cover no-repeat,
    linear-gradient(180deg,var(--cream) 0%,#fff 100%);
}
.hero .logo-hero{width:190px;height:190px;border-radius:50%;margin:0 auto 22px;}
.eyebrow{
  display:inline-block;font-family:'Baloo 2';font-weight:800;letter-spacing:.14em;text-transform:uppercase;
  font-size:.7rem;color:var(--coral);background:#FFE7E1;padding:8px 17px;border-radius:999px;
  margin-bottom:18px;
}
.hero h1{font-size:clamp(2.1rem,5.5vw,3.4rem);color:var(--ink);letter-spacing:-.5px;max-width:840px;margin:0 auto .3em;}
.hero h1 em{font-style:normal;color:var(--coral);}
.hero .tagline{font-family:'Fraunces',serif;font-style:italic;font-size:clamp(1.05rem,2.4vw,1.3rem);color:var(--ink);margin-top:6px;opacity:.85;}
.hero p.lede{max-width:640px;margin:20px auto 0;font-size:1.08rem;color:var(--muted);}
.hero-ctas{display:flex;gap:14px;justify-content:center;flex-wrap:wrap;margin-top:30px;}

/* ---------- section chrome (simple centered headings) ---------- */
section{padding:72px 0;position:relative;background:#fff;}
section.alt{background:var(--cream);}
.sec-head{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;margin-bottom:14px;}
.sec-head .num{display:none;}
.sec-head h2{font-size:clamp(1.7rem,3.4vw,2.2rem);margin:0;}
.sec-head h2:after{
  content:"";display:block;width:56px;height:5px;border-radius:99px;
  background:var(--sun);margin:12px auto 0;
}
.sec-sub{color:var(--muted);max-width:680px;margin:6px auto 32px;font-size:1.02rem;text-align:center;}
.center{text-align:center;margin-left:auto;margin-right:auto;}

/* ---------- cards / grids ---------- */
.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:28px 30px;box-shadow:var(--shadow-sm);position:relative;}
section.alt .card{background:#fff;}
.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;}
.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;}
.grid-4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;}
@media(max-width:900px){.grid-3{grid-template-columns:1fr 1fr;} .grid-4{grid-template-columns:1fr 1fr;}}
@media(max-width:640px){.grid-2,.grid-3,.grid-4{grid-template-columns:1fr;}}

.icon-badge{
  width:52px;height:52px;border-radius:16px;display:flex;align-items:center;justify-content:center;
  font-size:1.5rem;margin-bottom:14px;background:var(--cream);
}
.ib-coral{background:#FFE7E1;} .ib-mint{background:#FFF1D6;} .ib-sky{background:#FFE7E1;} .ib-sun{background:#FFF1D6;}

/* ---------- sticker badges (calmer, pill-style) ---------- */
.sticker{
  display:inline-flex;align-items:center;gap:7px;font-family:'Baloo 2';font-weight:700;
  font-size:.84rem;padding:7px 16px;border-radius:999px;border:none;
  background:var(--sun);color:var(--ink);
}
.st-coral{background:var(--coral);color:#fff;}
.st-mint{background:var(--sun);color:var(--ink);}
.st-sky{background:var(--cream-2);color:var(--ink);}

/* ---------- who/why/when strip ---------- */
.strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-top:28px;}
@media(max-width:760px){.strip{grid-template-columns:1fr;}}
.strip .card{text-align:center;padding-top:0;overflow:hidden;}
.strip .card .icon-badge{margin-left:auto;margin-right:auto;}
.strip .card h3{font-size:1.15rem;margin-bottom:8px;}
/* photo header on each card: bleeds to the card's edges, with the emoji
   icon-badge floating half on/half off its bottom edge */
.strip-photo-wrap{position:relative;margin:0 -30px 18px;}
.strip-photo{display:block;width:100%;height:180px;object-fit:cover;}

/* ---------- how it works ---------- */
.steps{display:flex;flex-direction:column;gap:18px;}
.step-card{display:flex;gap:22px;align-items:flex-start;}
.step-card .icon-badge{flex:none;}
.step-card h3{margin-bottom:6px;}
.step-result{
  margin-top:10px;display:inline-block;font-weight:800;color:var(--ink);
  background:var(--cream-2);padding:8px 14px;border-radius:12px;font-size:.9rem;
}
/* photo thumbnail on each "how it works" step, with the emoji icon-badge
   floating over its bottom-right corner (same language as the strip cards) */
.step-photo-wrap{position:relative;flex:none;width:120px;}
@media(max-width:600px){.step-photo-wrap{width:84px;}}
.step-photo{display:block;width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:var(--radius-sm);}
.step-icon{
  position:absolute;right:-14px;bottom:-14px;margin:0;
  border:3px solid #fff;box-shadow:var(--shadow-sm);
}

/* ---------- testimonials ---------- */
.testi-track{overflow:hidden;position:relative;}
.testi-slides{display:flex;transition:transform .4s ease;}
.testi-slide{flex:0 0 100%;padding:6px;}
.testi-card{max-width:660px;margin:0 auto;text-align:center;padding:40px 34px;border:none;background:var(--cream);box-shadow:none;}
.testi-card p{font-family:'Fraunces',serif;font-style:italic;font-size:1.22rem;color:var(--ink);line-height:1.55;}
.testi-card cite{display:block;margin-top:14px;font-style:normal;font-weight:800;color:var(--coral);font-family:'Baloo 2';}
.testi-dots{display:flex;justify-content:center;gap:8px;margin-top:20px;}
.testi-dots button{width:10px;height:10px;border-radius:50%;background:var(--line);border:none;padding:0;}
.testi-dots button.active{background:var(--coral);}

/* ---------- forms ---------- */
.form-card{max-width:560px;margin:0 auto;}
.field{margin-bottom:16px;text-align:left;}
.field label{display:block;font-weight:800;font-size:.86rem;color:var(--ink);margin-bottom:6px;}
.field input,.field textarea,.field select{
  width:100%;padding:13px 16px;border-radius:var(--radius-sm);border:1.5px solid var(--line);
  font-family:'Nunito';font-size:1rem;background:#fff;color:var(--ink);
}
.field input:focus,.field textarea:focus,.field select:focus{outline:none;border-color:var(--coral);}
.field textarea{resize:vertical;min-height:110px;}
.form-note{font-size:.82rem;color:var(--muted);margin-top:10px;}
.form-note a{text-decoration:underline;}
.form-success{
  display:none;background:#FFF1D6;border:1.5px solid var(--sun);color:#7A5A12;
  padding:14px 18px;border-radius:var(--radius-sm);font-weight:700;margin-top:14px;
}
.form-success.show{display:block;}
.form-error{
  display:none;background:#FDE7E4;border:1.5px solid var(--coral-deep,#C6543F);color:#8C3423;
  padding:14px 18px;border-radius:var(--radius-sm);font-weight:700;margin-top:14px;
}
.form-error.show{display:block;}
/* honeypot: hidden from humans, visible to naive bots */
.hp-field{position:absolute!important;left:-9999px!important;opacity:0!important;height:0!important;width:0!important;}

/* ---------- about ---------- */
/* both "Sobre" cards (Mafalda + história do projeto) reuse the strip-photo
   bleed treatment so their images match in size/position: full-width photo
   above the text block, top padding removed, clipped to the card's corners */
.about-photo-card{padding-top:0;overflow:hidden;}
.about-photo-card .strip-photo-wrap{margin:0 -30px 20px;}
.about-photo-card .strip-photo{height:260px;}
@media(max-width:600px){.about-photo-card .strip-photo{height:200px;}}

/* teacher cards: circular headshot centered above the name/bio */
.teacher-card{text-align:center;}
.teacher-avatar{
  display:block;width:120px;height:120px;border-radius:50%;object-fit:cover;
  margin:0 auto 16px;box-shadow:var(--shadow-sm);
}

/* ---------- plans / pricing ---------- */
.plans-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;}
@media(max-width:1000px){.plans-grid{grid-template-columns:1fr 1fr;}}
@media(max-width:600px){.plans-grid{grid-template-columns:1fr;}}
.plan-card{display:flex;flex-direction:column;}
.plan-card.featured{border:2px solid var(--coral);box-shadow:var(--shadow);}
.plan-tag{align-self:flex-start;margin-bottom:12px;}
.plan-title{font-family:'Baloo 2';font-weight:800;color:var(--ink);font-size:1.05rem;margin-bottom:4px;}
.plan-desc{color:var(--muted);font-size:.9rem;margin-bottom:14px;min-height:44px;}
.plan-price{font-family:'Baloo 2';font-weight:800;font-size:1.9rem;color:var(--coral);margin-bottom:16px;}
.plan-price span{font-size:.9rem;color:var(--muted);font-weight:700;}
.plan-feats{list-style:none;margin:0 0 20px;padding:0;flex:1;}
.plan-feats li{display:flex;gap:8px;align-items:flex-start;font-size:.88rem;margin-bottom:10px;color:var(--ink);}
.plan-feats li:before{content:"✓";color:var(--coral);font-weight:800;}

/* ---------- FAQ ---------- */
.faq-item{border-bottom:1px solid var(--line);}
.faq-q{
  width:100%;text-align:left;background:none;border:none;padding:18px 4px;
  display:flex;justify-content:space-between;align-items:center;gap:14px;
  font-family:'Baloo 2';font-weight:700;font-size:1.02rem;color:var(--ink);
}
.faq-q .plus{transition:transform .2s ease;font-size:1.3rem;color:var(--coral);flex:none;}
.faq-item.open .faq-q .plus{transform:rotate(45deg);}
.faq-a{max-height:0;overflow:hidden;transition:max-height .25s ease;font-size:.96rem;color:var(--muted);}
.faq-a p{padding:0 4px 18px;}
.faq-item.open .faq-a{max-height:400px;}

/* ---------- footer ---------- */
footer.site-footer{background:var(--ink);color:#fff;padding:50px 0 26px;}
footer.site-footer h3{color:#fff;}
footer.site-footer a{color:#E9E2F0;}
footer.site-footer a:hover{color:var(--sun);}
.footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:30px;margin-bottom:30px;}
@media(max-width:700px){.footer-grid{grid-template-columns:1fr;}}
.footer-social{display:flex;gap:12px;margin-top:14px;}
.footer-social a{
  width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.12);
  display:flex;align-items:center;justify-content:center;font-size:1.1rem;
}
.footer-social a:hover{background:var(--coral);}
.footer-bottom{border-top:1px solid rgba(255,255,255,.14);padding-top:18px;font-size:.82rem;color:#BBB1C6;display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px;}

/* ---------- login modal ---------- */
.modal-overlay{
  position:fixed;inset:0;background:rgba(36,27,46,.55);display:flex;justify-content:center;
  /* extra top padding (vs. the 20px on the other sides) gives the
     protruding close bubble room to breathe even when a tall modal
     (e.g. a course) pushes all the way to the top of the scroll area */
  padding:30px 20px 20px;z-index:200;opacity:0;pointer-events:none;transition:opacity .2s ease;
  overflow-y:auto;
}
.modal-overlay.open{opacity:1;pointer-events:auto;}
.modal{
  background:#fff;border-radius:var(--radius);padding:34px 30px;max-width:420px;width:100%;
  box-shadow:var(--shadow);position:relative;
  /* auto vertical margins (rather than align-items:center on the parent)
     center short modals but — critically — still let the overlay scroll
     to reach the full top of a modal taller than the viewport, so the
     close bubble is never stuck off-screen above y:0 */
  margin:auto 0;
}
/* close "bubble": a solid circular badge that pokes out past the
   corner of its box (top-right, half on/half off — same floating-badge
   language as .step-icon elsewhere on the site), so it
   reads clearly against busy content behind it (e.g. the journal's
   calendar) instead of a plain muted glyph that can get lost. */
.modal-close, .card-close{
  position:absolute;top:-18px;right:-18px;z-index:5;
  width:44px;height:44px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:var(--ink);color:#fff;border:3px solid #fff;
  font-size:1.3rem;line-height:1;box-shadow:var(--shadow-sm);
  cursor:pointer;transition:transform .15s ease,background .15s ease;
}
.modal-close:hover, .card-close:hover{background:var(--coral-deep);transform:scale(1.08);}
.modal h2{text-align:center;margin-bottom:6px;}
.modal .sec-sub{text-align:center;margin:0 auto 20px;}
.demo-hint{background:var(--cream);border-radius:var(--radius-sm);padding:12px 16px;font-size:.84rem;color:var(--ink);margin-top:14px;}
.demo-hint code{background:#fff;padding:2px 6px;border-radius:6px;}
.login-error{display:none;color:var(--coral-deep);font-weight:700;font-size:.86rem;margin-top:8px;}
.login-error.show{display:block;}

/* ---------- members dashboard ---------- */
.dash-header{
  background:var(--ink);color:#fff;padding:34px 0 60px;
}
.dash-header-top{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:16px;}
.dash-welcome h1{color:#fff;font-size:1.7rem;margin-bottom:4px;}
.dash-welcome p{color:#CBC2D6;margin:0;}
/* the signed-in address, under the greeting — deliberately quiet: useful
   when you need to check which account you are in, invisible otherwise */
.dash-welcome p.dash-account{
  color:#9A8FA8;font-size:.82rem;margin:0 0 6px;letter-spacing:.01em;
  word-break:break-all;
}
.streak-pill{
  display:flex;align-items:center;gap:8px;background:rgba(255,255,255,.14);
  padding:10px 18px;border-radius:999px;font-family:'Baloo 2';font-weight:700;
}
.streak-pill[hidden]{display:none;}

/* ---------- quick-access tools row, promoted into the dashboard banner
   so students can jump straight to a tool without scrolling past
   Cursos/Exercícios first ---------- */
.dash-quick-tools{margin-top:28px;padding-top:22px;border-top:1px solid rgba(255,255,255,.16);}
.dash-quick-tools-label{
  display:block;font-family:'Baloo 2';font-weight:800;font-size:.76rem;letter-spacing:.08em;
  text-transform:uppercase;color:#CBC2D6;margin-bottom:14px;
}
.dash-header .quick-tools{margin-bottom:0;}
.dash-header .quick-tool span{color:#fff;}
.dash-body{margin-top:-42px;padding-bottom:70px;background:transparent;}
.dash-grid{display:grid;grid-template-columns:1.3fr 1fr;gap:22px;margin-bottom:26px;}
@media(max-width:860px){.dash-grid{grid-template-columns:1fr;}}
.progress-bar{background:var(--cream-2);border-radius:999px;height:14px;overflow:hidden;margin:10px 0 6px;}
.progress-bar-fill{background:linear-gradient(90deg,var(--sun),var(--coral));height:100%;border-radius:999px;}
.session-list{list-style:none;margin:14px 0 0;padding:0;}
.session-list li{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px dashed var(--line);font-weight:700;font-size:.94rem;}
.session-list li:last-child{border-bottom:none;}
.session-list .chk{
  width:26px;height:26px;border-radius:50%;background:var(--sun);color:var(--ink);
  display:flex;align-items:center;justify-content:center;font-size:.8rem;flex:none;font-weight:800;
}
.session-list li.pending .chk{background:var(--cream-2);color:var(--muted);}
.resource-card{display:flex;flex-direction:column;gap:10px;}
.resource-card .icon-badge{margin-bottom:0;}
/* course cards with a graphic: photo bleeds to the card's edges, with
   the 🎓 icon-badge floating half on/half off its bottom-left corner
   (same treatment as .strip-photo further up the page; the strip's own
   badges were removed, this pattern lives on here and in .step-icon) */
.course-photo-wrap{position:relative;margin:0 -30px 24px;}
.course-photo{display:block;width:100%;height:130px;object-fit:cover;}
.course-icon{position:absolute;left:22px;bottom:-16px;margin:0;border:3px solid #fff;box-shadow:var(--shadow-sm);}
.resource-card h3{font-size:1.02rem;margin:0;}
.resource-card p{font-size:.86rem;color:var(--muted);margin:0;flex:1;}
.resource-tag{
  align-self:flex-start;font-size:.7rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em;
  padding:4px 10px;border-radius:999px;background:var(--cream-2);color:var(--ink);
}
/* diagnostic panel: expands its card to full row width and shows the panel inline */
.resource-card.is-open{grid-column:1 / -1;}
/* non-premium course cards (manual-toggle entitlement, see js/premium.js):
   same card, just a 🔒 badge instead of 🎓 and a muted note instead of
   the progress bar — clicking opens #premiumModal instead of the course.
   The lock badge pokes out of the card's top-left corner using the same
   protruding-bubble language as .modal-close/.card-close, just bigger
   so it reads as a clear "this one's locked" flag at a glance. */
.resource-card.is-locked .course-photo{filter:grayscale(.25);}
.resource-card .locked-note{font-size:.86rem;color:var(--muted);margin:0 0 10px;}
.course-lock-badge{
  position:absolute;top:-18px;left:-18px;z-index:5;
  width:56px;height:56px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:var(--ink);color:#fff;border:3px solid #fff;
  font-size:1.6rem;line-height:1;box-shadow:var(--shadow-sm);
}
/* metronome/recorder/journal now open in the shared .modal-overlay (see login modal above) */
.metro-modal{max-width:520px;padding:20px;}
.journal-modal{max-width:660px;padding:20px;}
/* wider than the other modals: the course view and the practice journal
   both show a calendar/day list next to its detail side by side, which
   needs more room than a single-column layout */
.course-modal{max-width:940px;}
.journal-modal-wide{max-width:940px;}
.premium-modal{max-width:400px;padding:30px;}
/* A grid rather than a wrapping flex row, so each badge's caption has room
   to wrap onto two lines instead of forcing a ragged reflow. auto-fit rather
   than a fixed 4-across: the exercise prizes took this past four, and a hard
   column count would have squeezed them instead of starting a second row. */
.badge-row{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(74px,1fr));
  gap:8px;margin-top:16px;
}
.earn-badge{
  display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;font-size:.72rem;
  font-weight:800;color:var(--muted);
}
/* Unearned badges are deliberately greyed right out — the emoji itself
   is desaturated and dimmed, not just sat on a paler circle, so an
   earned prize reads as clearly "won" at a glance. The caption below
   stays legible either way: unearned it reads as "here's how to get
   this one", earned it explains why it lit up. */
.earn-badge .emoji{
  width:52px;height:52px;border-radius:50%;background:var(--cream);display:flex;align-items:center;
  justify-content:center;font-size:1.5rem;
  filter:grayscale(1);opacity:.4;transition:filter .25s ease,opacity .25s ease,background .25s ease;
}
.earn-badge .badge-label{opacity:.5;transition:opacity .25s ease;}
.earn-badge .badge-hint{
  display:block;font-size:.58rem;font-weight:700;line-height:1.25;color:var(--muted);
  text-transform:none;letter-spacing:0;
}
.earn-badge.earned .emoji{background:var(--sun);filter:none;opacity:1;}
.earn-badge.earned .badge-label{opacity:1;}
.earn-badge.earned{color:var(--ink);}

/* ---------- richer progress card: today / week / all-time-ish stats ---------- */
.progress-section{margin-top:16px;}
.progress-section:first-of-type{margin-top:0;}
.progress-label-row{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:4px;gap:10px;}
.progress-label{font-family:'Baloo 2';font-weight:800;font-size:.82rem;color:var(--ink);}
.progress-count{font-size:.78rem;font-weight:700;color:var(--muted);flex:none;}
.progress-bar.progress-bar-sm{height:8px;margin:0 0 4px;}
/* auto-fit for the same reason as .badge-row — the exercise points made a
   fourth stat, and this has to survive a fifth without being edited again. */
.overall-stats-row{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(76px,1fr));
  gap:8px;margin-top:18px;
}
/* The points figure doubles as the way into the exercises. */
.overall-stat--link{cursor:pointer;transition:background .18s ease,transform .18s ease;}
.overall-stat--link:hover{background:var(--cream-2);transform:translateY(-1px);}
.overall-stat{background:var(--cream);border-radius:var(--radius-sm);padding:10px 4px;text-align:center;}
.overall-stat-num{display:block;font-family:'Baloo 2';font-weight:800;font-size:1.25rem;color:var(--plum);}
.overall-stat-label{
  display:block;font-size:.62rem;font-weight:700;color:var(--muted);
  text-transform:uppercase;letter-spacing:.03em;margin-top:2px;
}

/* ---------- practice goals / strategies ---------- */
.dash-subhead-row{display:flex;align-items:baseline;justify-content:space-between;gap:10px;}
.dash-subhead{
  font-family:'Baloo 2';font-weight:800;font-size:.88rem;color:var(--muted);
  text-transform:uppercase;letter-spacing:.04em;margin:0;
}
.dash-subhead-count{font-size:.82rem;font-weight:800;color:var(--muted);}
.goal-item{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px dashed var(--line);}
.goal-item:last-child{border-bottom:none;}
.chk-btn{
  width:26px;height:26px;border-radius:50%;background:var(--cream-2);color:transparent;
  border:1.5px solid var(--line);display:flex;align-items:center;justify-content:center;
  font-size:.8rem;flex:none;font-weight:800;cursor:pointer;
  transition:background .15s ease,color .15s ease,border-color .15s ease;
}
.chk-btn:hover{border-color:var(--coral);}
.chk-btn.done{background:var(--sun);color:var(--ink);border-color:var(--sun);}
.goal-text{flex:1;font-weight:700;font-size:.94rem;color:var(--ink);word-break:break-word;}
.goal-text.done{color:var(--muted);text-decoration:line-through;}
.goal-del{background:none;border:none;color:var(--muted);font-size:.85rem;padding:4px;flex:none;cursor:pointer;line-height:1;}
.goal-del:hover{color:var(--coral-deep);}
.goal-form{display:flex;gap:8px;margin-top:14px;}
.goal-form input{
  flex:1;padding:11px 14px;border-radius:var(--radius-sm);border:1.5px solid var(--line);
  font-family:'Nunito';font-size:.92rem;background:#fff;color:var(--ink);
}
.goal-form input:focus{outline:none;border-color:var(--coral);}
.goal-form button{white-space:nowrap;padding:11px 18px;font-size:.86rem;}
.goal-form.maxed{opacity:.5;pointer-events:none;}

/* ---------- practice diagnosis: piece-oriented ---------- */
.diagnostic-panel{margin-top:16px;text-align:left;}

/* pieces list (landing view) */
.pieces-list{list-style:none;margin:14px 0 0;padding:0;}
.piece-row{display:flex;align-items:center;gap:10px;padding:12px 0;border-bottom:1px dashed var(--line);}
.piece-row:last-child{border-bottom:none;}
.piece-open{
  flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:2px;
  background:none;border:none;padding:0;text-align:left;cursor:pointer;min-width:0;
}
.piece-open:hover .piece-title{color:var(--coral);}
.piece-title{font-family:'Baloo 2';font-weight:800;font-size:.94rem;color:var(--ink);}
.piece-meta{font-size:.78rem;color:var(--muted);font-weight:700;}
.piece-del{background:none;border:none;color:var(--muted);font-size:.85rem;padding:4px;flex:none;cursor:pointer;line-height:1;}
.piece-del:hover{color:var(--coral-deep);}
.pieces-empty{font-size:.86rem;color:var(--muted);padding:8px 0;margin:14px 0 0;}

/* piece detail view */
.piece-back{
  background:none;border:none;color:var(--coral-deep);font-family:'Baloo 2';font-weight:800;
  font-size:.84rem;padding:0 0 14px;cursor:pointer;
}
.piece-back:hover{text-decoration:underline;}
.piece-detail-title{font-family:'Baloo 2';font-weight:800;font-size:1.1rem;margin:0 0 14px;color:var(--ink);}
.piece-comments{list-style:none;margin:14px 0 0;padding:0;}
.piece-comment{padding:12px 0;border-bottom:1px dashed var(--line);}
.piece-comment:last-child{border-bottom:none;}
.piece-comment-row{display:flex;align-items:flex-start;gap:8px;}
.piece-comment-text{margin:0;font-size:.88rem;font-weight:700;color:var(--ink);}
.piece-comment-tag{
  display:inline-block;margin-bottom:4px;font-size:.68rem;font-weight:800;text-transform:uppercase;
  letter-spacing:.04em;padding:2px 9px;border-radius:999px;background:var(--cream-2);color:var(--coral-deep);
}
.piece-comment-date{display:block;font-size:.72rem;color:var(--muted);margin-top:4px;}
.piece-comment-del{background:none;border:none;color:var(--muted);font-size:.8rem;padding:4px;flex:none;cursor:pointer;line-height:1;}
.piece-comment-del:hover{color:var(--coral-deep);}

/* ---------- piece catalogue details (composer / genre / period) ----------
   Collapsed to a single summary line by default so the panel stays calm;
   the edit form only appears when the student asks for it. */
.piece-meta-line{display:flex;flex-wrap:wrap;align-items:baseline;gap:10px;margin:0 0 14px;}
.piece-meta-text{font-size:.86rem;font-weight:700;color:var(--muted);}
.piece-details-toggle{
  background:none;border:none;padding:0;cursor:pointer;font-family:'Baloo 2';font-weight:800;
  font-size:.78rem;color:var(--coral-deep);
}
.piece-details-toggle:hover{text-decoration:underline;}
/* three fields side by side where there's room, stacked on narrow
   screens — keeps the form from towering over the panel it sits in */
.piece-details-form{
  background:var(--cream);border-radius:var(--radius-sm);padding:14px 16px;margin:0 0 14px;
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 12px;
}
.piece-details-form .piece-details-actions{grid-column:1 / -1;}
@media(max-width:640px){.piece-details-form{grid-template-columns:1fr;}}
.piece-detail-field{display:flex;flex-direction:column;gap:4px;min-width:0;}
.piece-detail-field span{font-family:'Baloo 2';font-weight:800;font-size:.76rem;color:var(--ink);}
.piece-detail-field input{
  width:100%;padding:9px 12px;border-radius:var(--radius-sm);border:1.5px solid var(--line);
  font-family:'Nunito';font-size:.88rem;background:#fff;
}
.piece-detail-field input:focus{outline:none;border-color:var(--coral);}
.piece-details-actions{display:flex;align-items:center;gap:12px;margin-top:2px;}
.piece-details-actions .btn{padding:9px 20px;font-size:.82rem;}
.piece-details-cancel{
  background:none;border:none;padding:0;cursor:pointer;font-family:'Baloo 2';font-weight:800;
  font-size:.8rem;color:var(--muted);
}
.piece-details-cancel:hover{color:var(--ink);}

/* ---------- piece status: 1-5 star difficulty + "piece mastered" ----------
   Both live on the piece rather than on individual comments, so the
   pieces list can show where everything stands at a glance and the
   rating can be walked back down as the student improves. */
.piece-status{
  background:var(--cream);border-radius:var(--radius-sm);padding:14px 16px;margin:0 0 16px;
  display:flex;flex-direction:column;gap:12px;
}
.piece-status-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px;}
.piece-status-label{font-family:'Baloo 2';font-weight:800;font-size:.82rem;color:var(--ink);flex:none;}
.star-picker{display:flex;gap:2px;}
.star-btn{
  background:none;border:none;padding:2px;cursor:pointer;line-height:1;
  font-size:1.4rem;color:var(--line);transition:color .15s ease,transform .15s ease;
}
.star-btn.filled{color:var(--sun);}
.star-btn:hover{transform:scale(1.15);color:var(--sun);}
.star-word{font-size:.8rem;font-weight:700;color:var(--muted);min-height:1em;}
/* the "mastered" toggle reads as a big friendly checkbox rather than a
   destructive-looking button — it marks an achievement, not a setting */
.mastered-btn{
  display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:999px;
  border:1.5px dashed var(--line);background:#fff;font-family:'Baloo 2';font-weight:800;
  font-size:.88rem;color:var(--muted);cursor:pointer;align-self:flex-start;transition:all .2s ease;
}
.mastered-btn:hover{border-color:var(--coral);color:var(--ink);}
.mastered-chk{
  width:24px;height:24px;border-radius:50%;background:var(--cream-2);color:var(--ink);
  display:flex;align-items:center;justify-content:center;font-size:.78rem;flex:none;
}
.mastered-btn.is-mastered{background:var(--sun);border-style:solid;border-color:var(--sun);color:var(--ink);}
.mastered-btn.is-mastered .mastered-chk{background:#fff;}

/* chips shown on each row of the pieces list */
.piece-chips{display:flex;flex-wrap:wrap;gap:5px;justify-content:flex-end;flex:none;align-items:center;}
.piece-diff-chip{font-size:.82rem;color:var(--sun);letter-spacing:1px;white-space:nowrap;}
.piece-mastered-chip{
  display:inline-block;font-size:.68rem;font-weight:800;padding:3px 9px;border-radius:999px;
  white-space:nowrap;background:var(--sun);color:var(--ink);
}
.piece-row.is-mastered .piece-title{color:var(--coral-deep);}
@media(max-width:520px){
  .piece-chips{justify-content:flex-start;}
  .piece-row{flex-wrap:wrap;}
}

.diag-categories{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 4px;}
.diag-cat-btn{
  padding:8px 14px;border-radius:999px;border:1.5px solid var(--line);background:#fff;
  font-family:'Nunito';font-weight:700;font-size:.84rem;color:var(--ink);cursor:pointer;
}
.diag-cat-btn:hover{border-color:var(--coral);}
.diag-cat-btn.active{background:var(--ink);color:#fff;border-color:var(--ink);}
.diag-activities{list-style:none;margin:14px 0 0;padding:0;}
.diag-activity{display:flex;align-items:center;gap:10px;padding:12px 0;border-bottom:1px dashed var(--line);}
.diag-activity:last-child{border-bottom:none;}
.diag-activity span{flex:1;font-size:.88rem;font-weight:700;color:var(--ink);}
.diag-add-btn{
  flex:none;padding:7px 12px;border-radius:999px;border:1.5px solid var(--coral);background:transparent;
  color:var(--coral);font-weight:800;font-size:.76rem;cursor:pointer;white-space:nowrap;
}
.diag-add-btn:hover{background:var(--coral);color:#fff;}
.diag-note{font-size:.8rem;color:var(--muted);margin-top:10px;min-height:1em;}

/* members page section heads: left aligned like a dashboard */
.dash-body .sec-head{flex-direction:row;align-items:center;text-align:left;gap:10px;margin-bottom:6px;}
.dash-body .sec-head h2:after{display:none;}
.dash-body .sec-sub{text-align:left;margin:0 0 22px;}

/* ---------- section dividers: candy gradient rule with a tilted emoji
   medallion, marking the boundary between Sessão/Cursos/Ferramentas/Apps ---------- */
.section-divider{
  position:relative;height:5px;border-radius:999px;margin:42px 0 38px;
  background:linear-gradient(90deg,var(--coral),var(--sun) 50%,var(--coral));
  box-shadow:0 2px 10px rgba(255,107,92,.35);
}
.section-divider .divider-badge{
  position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) rotate(-6deg);
  width:38px;height:38px;border-radius:12px;
  background:linear-gradient(150deg,var(--sun),var(--coral));
  display:flex;align-items:center;justify-content:center;font-size:1.05rem;
  box-shadow:0 8px 18px rgba(224,80,63,.4);
  border:3px solid #fff;
}

/* members-area section headings: bigger, two-tone gradient fill for a
   little more presence than a flat ink heading */
.dash-body .sec-head h2{
  font-size:1.55rem;
  background:linear-gradient(100deg,var(--ink) 55%,var(--coral-deep));
  -webkit-background-clip:text;background-clip:text;color:transparent;
}

/* ---------- quick tools row (Metrónomo/Afinador/Bordão/Gravações as
   tap-to-open icons, no card/description — reserve the fuller card
   treatment below for bigger features like courses and rhythm training) */
.quick-tools{display:flex;flex-wrap:wrap;gap:24px;margin-bottom:8px;}
.quick-tool{
  display:flex;flex-direction:column;align-items:center;gap:9px;width:98px;
  background:none;border:none;padding:4px;text-align:center;
}
.quick-tool .icon-badge{
  width:66px;height:66px;border-radius:20px;font-size:1.85rem;margin-bottom:0;
  transition:transform .15s ease,box-shadow .15s ease;
}
.quick-tool:hover{transform:translateY(-3px);}
.quick-tool:hover .icon-badge{box-shadow:0 12px 24px rgba(224,80,63,.4);}
.quick-tool span{font-family:'Baloo 2';font-weight:700;font-size:.84rem;color:var(--ink);}

/* ---------- Cursos / Exercícios: each is now its own full-width section
   (stacked, separated by the standard .section-divider) rather than a
   cramped side-by-side row, so both get the full page width to breathe.
   #coursesGrid uses the standard .grid-3 fixed 3-column sizing (no
   auto-fit) so a single course card stays card-sized instead of
   stretching to fill the whole row. ---------- */
.exercise-card{height:100%;}

/* ---------- grouped resource panels (Acompanhamento / Aprendizagem) ----------
   Saturated cream-to-coral/sun washes with a soft colour glow + a filled
   gradient "eyebrow" tag, matching the hero's tag language but punchier. */
/* A tool group is a tinted panel, so it needs air above it as well as
   below or it reads as a continuation of whatever precedes it. This was
   margin-bottom only, which was fine while a group always followed a
   section heading; the Musicianship card now sits directly above one and
   the two were touching at 0px. */
.tool-group{margin:28px 0 30px;border-radius:var(--radius);padding:30px 32px 34px;position:relative;}
.tool-group:last-child{margin-bottom:0;}
.tool-group--track{background:linear-gradient(165deg,#FFE9E1,#FFF4EE);box-shadow:0 18px 40px rgba(255,107,92,.16);}
.tool-group--learn{background:linear-gradient(165deg,#FFEFC9,#FFFAEC);box-shadow:0 18px 40px rgba(255,194,75,.2);}

.group-eyebrow{
  display:inline-flex;align-items:center;gap:6px;font-family:'Baloo 2';font-weight:800;
  letter-spacing:.08em;text-transform:uppercase;font-size:.7rem;
  padding:6px 15px;border-radius:999px;margin-bottom:10px;
}
.tool-group--track .group-eyebrow{background:linear-gradient(120deg,var(--coral),var(--coral-deep));color:#fff;box-shadow:0 6px 14px rgba(224,80,63,.35);}
.tool-group--learn .group-eyebrow{background:linear-gradient(120deg,var(--sun),var(--sun-deep));color:var(--ink);box-shadow:0 6px 14px rgba(224,166,46,.35);}

.tool-group-head{font-family:'Baloo 2';font-weight:800;font-size:1.3rem;color:var(--ink);margin:0 0 4px;}
.tool-group-sub{font-family:'Fraunces',serif;font-style:italic;font-size:.92rem;color:var(--muted);margin:0 0 18px;}

.tool-group .resource-card{transition:transform .15s ease,box-shadow .15s ease;}
.tool-group .resource-card:hover{transform:translateY(-3px);box-shadow:var(--shadow);}
.tool-group .resource-card .resource-tag{transform:rotate(-1.5deg);}
.tool-group .resource-card:nth-child(3n+2) .resource-tag{transform:rotate(1.5deg);}

/* gradient-filled icon badges + CTA buttons in the resources area, for more
   pop than the site's default flat-tint icon badge / outline button */
#coursesGrid .icon-badge,.tool-group .icon-badge,.quick-tool .icon-badge,.exercise-card .icon-badge{
  background:linear-gradient(150deg,#FFDA9E,var(--sun) 55%,var(--coral));
  box-shadow:0 8px 18px rgba(224,80,63,.28);
}
.tool-group .resource-card .btn-outline,#coursesGrid .btn-outline,.exercise-card .btn-outline{
  background:linear-gradient(120deg,var(--sun),var(--coral));
  border-color:transparent;color:#fff;font-weight:800;
  box-shadow:0 8px 18px rgba(224,80,63,.3);
}
.tool-group .resource-card .btn-outline:hover,#coursesGrid .btn-outline:hover,.exercise-card .btn-outline:hover{
  background:linear-gradient(120deg,var(--sun-deep),var(--coral-deep));color:#fff;
}

/* ---------- misc ---------- */
::selection{background:var(--sun);color:var(--ink);}

/* ---------- persistent privacy link ---------- */
/* footer-bottom is a flex row; this pushes the legal link to its own end */
.footer-legal{margin-left:auto;}
.footer-legal a{text-decoration:underline;opacity:.85;}
.footer-legal a:hover{opacity:1;}
@media (max-width:600px){
  .footer-legal{margin-left:0;width:100%;margin-top:6px;}
}
/* tool pages (tuner, recorder, rhythm...) have no site footer of their own */
.tool-footer{
  text-align:center;padding:26px 16px 32px;font-size:.82rem;
}
.tool-footer a{color:var(--muted);text-decoration:underline;opacity:.8;}
.tool-footer a:hover{opacity:1;}

/* ---------- teacher dashboard panel (members.html) ----------
   Deliberately quieter than the student dashboard: this is a work
   surface for adults, not a place to be cheered along. No stickers,
   no lift-on-hover, one accent colour used once. ------------------ */
.tp-card{margin-bottom:20px;padding:26px 30px 28px;}
.tp-card[hidden]{display:none;}

.tp-head{border-bottom:1px solid var(--line);padding-bottom:14px;margin-bottom:20px;}
.tp-eyebrow{
  display:block;font-size:.7rem;font-weight:800;letter-spacing:.09em;
  text-transform:uppercase;color:var(--muted);margin-bottom:5px;
}
.tp-title{
  font-family:'Baloo 2';font-weight:800;font-size:1.22rem;color:var(--ink);
  margin:0;line-height:1.2;
}
.tp-subhead{
  font-family:'Baloo 2';font-weight:800;font-size:.95rem;color:var(--ink);
  margin:26px 0 0;padding-bottom:8px;border-bottom:1px solid var(--line);
}

/* buttons: the site's colours, at a size meant for daily use rather than
   for persuading a visitor — compact, square-ish, and they stay still */
.tp-actions{display:flex;flex-wrap:wrap;gap:8px;}
.tp-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  font-family:'Baloo 2';font-weight:700;font-size:.85rem;line-height:1;
  padding:9px 15px;border-radius:9px;border:1px solid transparent;
  background:var(--cream-2);color:var(--ink);white-space:nowrap;cursor:pointer;
  transition:background .15s ease, color .15s ease, border-color .15s ease;
}
.tp-btn:hover{background:var(--sun);}
.tp-btn-primary{background:var(--coral);color:#fff;}
.tp-btn-primary:hover{background:var(--coral-deep);color:#fff;}
.tp-btn-quiet{background:#fff;border-color:var(--line);color:var(--muted);}
.tp-btn-quiet:hover{background:var(--paper);border-color:var(--ink);color:var(--ink);}
/* white on the coral button, coral elsewhere — legible either way */
.tp-pill{
  display:inline-block;background:rgba(255,255,255,.92);color:var(--coral-deep);
  border-radius:999px;padding:1px 7px;font-size:.72rem;font-weight:800;
}

.tp-note{color:var(--muted);font-size:.83rem;line-height:1.6;margin:16px 0 0;}
.tp-note-top{margin-top:0;}
.tp-empty{color:var(--muted);font-size:.86rem;margin:12px 0 0;}
.tp-empty[hidden]{display:none;}

.tp-students,.tp-assignments{list-style:none;margin:0;padding:0;}
.tp-students li,.tp-assignments li{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:12px 2px;border-bottom:1px solid var(--line);flex-wrap:wrap;
}
.tp-students li:last-child,.tp-assignments li:last-child{border-bottom:none;}
.tp-who{display:flex;flex-direction:column;gap:1px;min-width:0;}
.tp-name{font-weight:700;font-size:.92rem;color:var(--ink);}
.tp-email{font-size:.76rem;color:var(--muted);word-break:break-all;}
.tp-right{display:flex;align-items:center;gap:10px;}
.tp-count{
  font-size:.74rem;font-weight:700;border-radius:6px;padding:3px 9px;
  background:var(--cream-2);color:var(--muted);white-space:nowrap;
}
.tp-count.has{background:var(--coral);color:#fff;}

.tp-assign-row{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;margin-top:18px;}
.tp-field{display:flex;flex-direction:column;gap:5px;flex:1 1 190px;
  font-size:.74rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);}
.tp-field select{
  padding:9px 11px;border-radius:9px;border:1px solid var(--line);
  font-family:'Nunito';font-size:.88rem;font-weight:400;letter-spacing:0;
  text-transform:none;color:var(--ink);background:#fff;
}
.tp-field select:focus{outline:none;border-color:var(--ink);}
.tp-assign-row .tp-btn{flex:0 0 auto;padding:10px 18px;}
.tp-msg{font-size:.8rem;font-weight:700;margin:10px 0 0;min-height:1em;}
.tp-msg.err{color:var(--coral-deep);}
.tp-msg.ok{color:#3F7A4D;}
.tp-unassign{
  background:none;border:none;cursor:pointer;color:var(--muted);
  font-size:.95rem;line-height:1;padding:5px 7px;border-radius:6px;
  transition:color .15s ease, background .15s ease;
}
.tp-unassign:hover{color:var(--coral-deep);background:var(--cream-2);}

@media (max-width:560px){
  .tp-card{padding:22px 20px 24px;}
  .tp-actions .tp-btn{flex:1 1 100%;}
  .tp-assign-row .tp-btn{flex:1 1 100%;}
}

/* ---------- mailing list opt-in ---------- */
.field-check{display:flex;align-items:flex-start;gap:10px;margin:18px 0 24px;text-align:left;}
.field-check input[type=checkbox]{
  width:18px;height:18px;margin-top:2px;flex:0 0 auto;cursor:pointer;
  accent-color:var(--coral-deep,#C6543F);
}
.field-check label{font-size:.88rem;line-height:1.5;cursor:pointer;color:var(--ink,inherit);font-weight:600;}

/* ---------- parents area ---------- */
.page-nav{
  display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;
  margin:20px 0 26px;padding:14px 18px;border-radius:var(--radius-sm);
  background:#FFF1D6;border:1.5px solid var(--sun);font-size:.88rem;
}
.page-nav-label{font-weight:700;color:#7A5A12;}
.page-nav a{color:#7A5A12;text-decoration:underline;font-weight:600;}
.policy + .policy{margin-top:20px;}
.policy h3{font-size:.95rem;margin:22px 0 8px;}
.lang-note{
  font-size:.82rem;color:var(--muted);font-style:italic;
  border-left:3px solid var(--sun);padding-left:12px;margin:14px 0 0;
}
.table-cap{font-size:.86rem;margin-top:20px;}
/* the lesson-count table has to show all six weekdays without sideways scrolling:
   fixed layout so the columns share the width evenly, dates allowed to wrap, and
   the month column kept narrow — it was the widest cell and pushed Saturday out */
.table-scroll{margin-top:10px;}
.table-scroll table{
  border-collapse:collapse;width:100%;table-layout:fixed;font-size:.84rem;
}
.table-scroll th,.table-scroll td{
  border:1px solid rgba(0,0,0,.12);padding:6px 4px;text-align:center;
  word-spacing:2px;line-height:1.45;
}
.table-scroll thead th,.table-scroll tfoot th{background:#FFF1D6;font-weight:700;color:#7A5A12;}
.table-scroll tbody tr:nth-child(even){background:rgba(0,0,0,.02);}
.table-scroll td b{
  font-weight:800;color:#fff;background:var(--coral-deep,#C6543F);
  border-radius:5px;padding:1px 5px;display:inline-block;line-height:1.3;
}
.table-legend{
  font-size:.82rem;color:var(--muted);margin-top:10px;
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
}
.lg-swatch{
  font-weight:800;color:#fff;background:var(--coral-deep,#C6543F);
  border-radius:5px;padding:1px 6px;font-size:.8rem;flex:0 0 auto;
}
/* month column: narrow, left-aligned, never wraps */
.table-scroll th:first-child,.table-scroll td.mth,.table-scroll tfoot th:first-child{
  width:13%;text-align:left;font-weight:700;white-space:nowrap;padding-left:8px;
}

@media (max-width:640px){
  /* seven columns can't stay legible on a phone, so each month becomes its own
     block and every figure carries its weekday label instead of a column header */
  .table-scroll table,.table-scroll tbody,.table-scroll tfoot,
  .table-scroll tr,.table-scroll td,.table-scroll th{display:block;width:auto;}
  .table-scroll thead{display:none;}
  .table-scroll tbody tr,.table-scroll tfoot tr{
    border:1.5px solid var(--sun);border-radius:var(--radius-sm);
    margin-bottom:12px;overflow:hidden;background:#fff;
  }
  .table-scroll tbody tr:nth-child(even){background:#fff;}
  .table-scroll td.mth,.table-scroll tfoot th:first-child{
    width:auto;background:#FFF1D6;color:#7A5A12;padding:8px 12px;border:0;
  }
  .table-scroll tbody td:not(.mth),.table-scroll tfoot th:not(:first-child){
    display:flex;justify-content:space-between;gap:14px;
    border:0;border-top:1px solid rgba(0,0,0,.10);padding:7px 12px;text-align:right;
  }
  .table-scroll tbody td:not(.mth)::before,.table-scroll tfoot th:not(:first-child)::before{
    content:attr(data-d);font-weight:700;color:var(--muted);text-align:left;
  }
}

/* tabela de períodos, dentro do corpo de texto da secção */
.policy table:not(.table-scroll table){
  border-collapse:collapse;width:100%;margin:10px 0 14px;font-size:.88rem;
}
.policy table:not(.table-scroll table) th,
.policy table:not(.table-scroll table) td{
  border:1px solid rgba(0,0,0,.12);padding:7px 10px;text-align:left;
}
.policy table:not(.table-scroll table) thead th{background:#FFF1D6;color:#7A5A12;}

/* ---------- teacher guide ---------- */
/* sections still awaiting Mafalda's review carry a visible tag, so nobody
   mistakes a draft for settled policy */
.draft-tag{
  display:inline-block;font-size:.68rem;font-weight:800;letter-spacing:.06em;
  text-transform:uppercase;color:#7A5A12;background:#FFF1D6;
  border:1px solid var(--sun);border-radius:999px;
  padding:2px 8px;margin-right:8px;vertical-align:2px;
}
.draft-note{
  font-size:.86rem;color:#7A5A12;background:#FFF7E6;
  border:1.5px solid var(--sun);border-radius:var(--radius-sm);
  padding:12px 16px;margin:14px 0 0;line-height:1.55;
}

/* members header: several buttons sit side by side, so they share one size
   instead of each carrying its own inline padding. .btn-info keeps its own
   colour; only the metrics are unified here. */
.members-nav{gap:8px;flex-wrap:wrap;justify-content:flex-end;}
.members-nav .btn{padding:9px 15px;font-size:.84rem;line-height:1;}
@media (max-width:600px){
  .members-nav{gap:6px;}
  .members-nav .btn{padding:8px 12px;font-size:.8rem;}
}
