/* The report document. Used for the live preview and for printing (A4). */
.sheet {
  --ink: #1e2250; --muted: #6e7399; --line: #e9e6fb;
  width: 210mm; min-height: 297mm; background: #fff; color: var(--ink);
  padding: 11mm 14mm 12mm; font: 500 12.5px/1.5 'Nunito Variable', 'Nunito', system-ui, sans-serif;
  position: relative; text-align: left;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.sheet *, .sheet *::before, .sheet *::after { box-sizing: border-box; }
.sheet h3, .sheet .rp-brand-name, .sheet .rp-title b, .sheet .rp-cell b, .sheet .rp-card-head b { font-family: 'Fredoka Variable', 'Fredoka', 'Nunito Variable', sans-serif; }
.sheet p { margin: 0; }

/* header */
.rp-head {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-radius: 22px; color: #fff;
  background: linear-gradient(120deg, #6c5ce7 0%, #5b7cf0 55%, #3fa9f5 100%);
}
.rp-head::before, .rp-head::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.rp-head::before { width: 190px; height: 190px; right: -50px; top: -90px; background: radial-gradient(circle, rgba(255,255,255,.28), rgba(255,255,255,0) 70%); }
.rp-head::after { width: 130px; height: 130px; left: 36%; bottom: -80px; background: radial-gradient(circle, rgba(255,190,46,.45), rgba(255,190,46,0) 70%); }
.rp-logo { position: relative; z-index: 1; width: 74px; height: 74px; flex: none; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 6px 14px rgba(30,34,80,.25); }
.rp-logo img { width: 58px; height: auto; margin-top: 3px; }
.rp-brand { position: relative; z-index: 1; flex: 1; min-width: 0; }
.rp-brand-name { font-size: 27px; font-weight: 600; line-height: 1.1; letter-spacing: .2px; }
.rp-brand-tag { margin-top: 4px; font-size: 11px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; opacity: .92; }
.rp-title { position: relative; z-index: 1; text-align: right; line-height: 1.05; }
.rp-title span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; opacity: .9; }
.rp-title b { display: block; margin-top: 3px; font-size: 21px; font-weight: 600; background: rgba(255,255,255,.2); padding: 4px 12px; border-radius: 99px; }

/* student info */
.rp-info { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rp-cell { flex: 1 1 28%; min-width: 0; padding: 8px 12px; border-radius: 14px; background: #f6f4ff; border: 1px solid var(--line); }
.rp-cell.student { flex: 2 1 55%; background: linear-gradient(135deg, #f1eeff, #e8f5ff); }
.rp-cell small { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.rp-cell b { display: block; font-size: 14.5px; font-weight: 500; overflow-wrap: anywhere; }
.rp-cell.student b { font-size: 20px; font-weight: 600; color: #4b3fc4; }

/* level ladder */
.rp-level { margin-top: 12px; padding: 10px 14px 8px; border-radius: 18px; border: 1.5px solid var(--line); background: #fff; break-inside: avoid; }
.rp-level-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.rp-level-head h3 { font-size: 14px; font-weight: 600; }
.rp-level-badge { padding: 2px 12px; border-radius: 99px; font-weight: 800; font-size: 11.5px; }
.rp-ladder { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; padding-top: 30px; }
.rp-step { position: relative; display: grid; justify-items: center; text-align: center; gap: 2px; }
.rp-step i { display: block; width: 100%; height: 11px; border-radius: 99px; background: #ece9fb; }
.rp-step.on i { background: var(--lc); }
.rp-step-n { font-family: 'Fredoka Variable', 'Fredoka', sans-serif; font-weight: 600; font-size: 12px; color: #a3a1c6; }
.rp-step.cur .rp-step-n { color: var(--ink); font-size: 14px; }
.rp-step-name { font-size: 8.5px; line-height: 1.15; font-weight: 700; color: #a3a1c6; min-height: 20px; }
.rp-step.cur .rp-step-name { color: var(--ink); font-weight: 900; }
.rp-step.cur i { height: 14px; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--lc); }
.rp-climber { position: absolute; bottom: calc(100% - 20px); left: 50%; width: 28px; height: auto; transform: translateX(-50%); }
.lv1 { --lc: #ff8fa3; } .lv2 { --lc: #ffa94d; } .lv3 { --lc: #ffd43b; } .lv4 { --lc: #94d82d; } .lv5 { --lc: #38d9a9; }
.lv6 { --lc: #3fa9f5; } .lv7 { --lc: #748ffc; } .lv8 { --lc: #9775fa; } .lv9 { --lc: #da77f2; }
.rp-level-badge.lv1 { background: #ffe3e8; color: #c2255c; } .rp-level-badge.lv2 { background: #ffe8cc; color: #c25e00; } .rp-level-badge.lv3 { background: #fff3bf; color: #8a6d00; }
.rp-level-badge.lv4 { background: #e9fac8; color: #4c7a0f; } .rp-level-badge.lv5 { background: #c3fae8; color: #087f5b; } .rp-level-badge.lv6 { background: #d0ebff; color: #1864ab; }
.rp-level-badge.lv7 { background: #dbe4ff; color: #364fc7; } .rp-level-badge.lv8 { background: #e5dbff; color: #5f3dc4; } .rp-level-badge.lv9 { background: #f3d9fa; color: #862e9c; }

/* sections */
.rp-block { margin-top: 14px; }
.rp-h { font-size: 15px; font-weight: 600; margin-bottom: 7px; color: #4b3fc4; display: flex; align-items: center; gap: 4px; }
.rp-h::after { content: ''; flex: 1; height: 0; margin-left: 8px; border-top: 2px dotted #cfc8f7; }
.rp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.rp-card {
  --acc: #6c5ce7; --acc-soft: #efecff;
  break-inside: avoid; padding: 8px 12px 9px; border-radius: 14px; background: #fff; border: 1.5px solid var(--acc-soft); border-top: 4px solid var(--acc);
}
.rp-card-head { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.rp-emoji { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--acc-soft); font-size: 14px; line-height: 1; }
.rp-card-head b { flex: 1; font-size: 13.5px; font-weight: 600; }
.rp-card p { font-size: 11.8px; line-height: 1.5; color: #2c3170; overflow-wrap: anywhere; }
.rp-stars { display: inline-flex; gap: 1px; font-size: 13px; line-height: 1; letter-spacing: 0; }
.rp-stars .on { color: #ffb400; } .rp-stars .off { color: #e3e0f5; }
.rp-legend { margin-top: 8px; font-size: 10px; color: var(--muted); font-weight: 700; }
.rp-note-block { break-inside: avoid; }
.rp-note { display: grid; gap: 10px; padding: 12px 16px; border-radius: 18px; background: linear-gradient(135deg, #fff7e6, #ffeef3); border: 1.5px solid #ffe0b3; }
.rp-note-part b { font-family: 'Fredoka Variable', 'Fredoka', sans-serif; font-weight: 600; font-size: 13.5px; color: #c2255c; }
.rp-note-part p { margin-top: 2px; font-size: 12.3px; color: #3a2c4a; overflow-wrap: anywhere; }
.rp-empty { margin-top: 18px; padding: 26px; text-align: center; border: 2px dashed #d7d2fa; border-radius: 18px; color: var(--muted); font-weight: 700; }

/* accents */
.acc-speaking { --acc: #ff6b81; --acc-soft: #ffe3e8; } .acc-listening { --acc: #3fa9f5; --acc-soft: #d9efff; }
.acc-reading { --acc: #1fc9a0; --acc-soft: #d5f7ee; } .acc-writing { --acc: #ff922b; --acc-soft: #ffe8cf; }
.acc-pronunciation { --acc: #f783ac; --acc-soft: #ffe0ee; } .acc-vocabulary { --acc: #ffbe2e; --acc-soft: #fff1c9; }
.acc-grammar { --acc: #6c5ce7; --acc-soft: #e9e5ff; } .acc-comprehension { --acc: #20c997; --acc-soft: #d3f9ea; }
.acc-behavior { --acc: #845ef7; --acc-soft: #ece5ff; } .acc-attendance { --acc: #339af0; --acc-soft: #d8ecff; }
.acc-computer { --acc: #fd7e14; --acc-soft: #ffe8d1; } .acc-impression, .acc-conclusion { --acc: #f06595; --acc-soft: #ffe0ec; }

/* signature + footer */
.rp-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 26px; padding: 0 10px; break-inside: avoid; }
.rp-line { height: 28px; border-bottom: 1.5px solid #b9b3e6; }
.rp-sign small { display: block; margin-top: 3px; font-size: 9.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.rp-sign b { font-family: 'Fredoka Variable', 'Fredoka', sans-serif; font-weight: 500; font-size: 12.5px; }
.rp-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 8px; border-top: 2px dotted #cfc8f7; font-size: 10px; font-weight: 700; color: var(--muted); break-inside: avoid; }
.rp-foot b { color: #4b3fc4; }

/* preview stage (editor) */
.sheet-stage { --z: 1; zoom: var(--z); width: 210mm; margin: 0 auto; }
.sheet-stage .sheet { box-shadow: 0 18px 50px rgba(76, 61, 180, .18), 0 0 0 1px rgba(233, 230, 251, .9); border-radius: 4px; }

/* printing */
#print-root { display: none; }
@media print {
  @page { size: A4; margin: 9mm 0; }
  html, body { background: #fff !important; min-height: 0; overflow: visible; }
  #app, #toasts, .blobs, .scrim, .backdrop { display: none !important; }
  #print-root { display: block !important; }
  #print-root .sheet { width: 210mm; min-height: 0; padding: 0 14mm; box-shadow: none; }
}
