@font-face {
  font-family: Manrope;
  src: url('/manrope-cyrillic.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Manrope;
  src: url('/manrope-latin.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  font-family: Manrope, "Segoe UI", system-ui, sans-serif;
  color: #251d34;
  background: #f6f4f9;
  font-size: 16px;
  line-height: 1.58;
  --plum: #211832;
  --primary: #5c3dbd;
  --primary-dark: #492b9f;
  --muted: #615871;
  --line: #e9e3ef;
  --paper: #fff;
  --shadow: 0 14px 40px #3020510b, 0 2px 6px #30205105;
  --radius: 24px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: .7; }
:focus-visible { outline: 3px solid #8b68dc; outline-offset: 3px; }
.wrap { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.top { border-bottom: 1px solid var(--line); background: var(--paper); }
.top-content { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; gap: .65rem; align-items: center; font-weight: 800; letter-spacing: -.025em; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px 13px 13px 4px;
  color: white; background: var(--primary); font-size: 1.05rem;
  box-shadow: inset 0 1px 0 #ffffff35;
}
main { padding-block: 26px 72px; }
h1, h2, h3, h4 { line-height: 1.22; margin: 0; overflow-wrap: anywhere; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 800; letter-spacing: -.055em; }
h2 { font-size: clamp(1.25rem, 2.6vw, 1.65rem); font-weight: 800; letter-spacing: -.035em; }
h3 { font-size: 1rem; font-weight: 800; letter-spacing: -.015em; }
p { margin: 0; }
#status:empty { display: none; }
#status { margin-bottom: 14px; padding: 10px 16px; color: #684334; background: #fff5e9; border-radius: 12px; }
.surface { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.auth { width: min(100%, 500px); margin: clamp(18px, 9vh, 92px) auto; padding: clamp(24px, 6vw, 40px); }
#status:not(:empty) + .auth { margin-top: 16px; }
.auth h1 { margin-bottom: 25px; }
form { display: grid; gap: 17px; margin-top: 23px; }
label { display: grid; gap: 6px; font-size: .875rem; font-weight: 750; }
input, select {
  width: 100%; min-height: 46px; border: 1px solid #d5cce3; border-radius: 12px;
  padding: 9px 13px; color: #251d34; background: white;
}
input { cursor: text; }
.primary, .quiet, .tabs button {
  min-height: 44px; border: 1px solid transparent; border-radius: 12px;
  padding: 8px 15px; font-weight: 750; font-size: .9rem;
}
.primary { color: white; background: var(--primary); box-shadow: 0 4px 10px #5c3dbd30; }
.primary:not(:disabled):hover { background: var(--primary-dark); }
.quiet { color: var(--primary-dark); background: #f4effb; }
.quiet:not(:disabled):hover { background: #ebe1f9; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 15px; background: #f4f1f8; }
.tabs button { flex: 1 0 auto; background: transparent; color: var(--muted); padding-inline: 9px; font-size: .82rem; }
.tabs button[aria-pressed="true"] { color: var(--primary-dark); background: white; box-shadow: 0 2px 7px #30205115; }
.continue .quiet { margin-inline-start: 7px; }
.report-hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  min-height: 206px; padding: 32px clamp(22px, 4vw, 49px); border-radius: 30px;
  color: #fff; background: var(--plum); box-shadow: 0 18px 40px #30205125;
}
.report-hero::before {
  content: ""; position: absolute; z-index: -1; inset: 0 0 0 33%;
  background: linear-gradient(90deg, var(--plum), #21183252 45%, #21183205 90%),
    url('/profile-cover.webp') center 54% / cover, #403065;
}
.hero-profile { min-width: 0; max-width: 80%; display: flex; align-items: center; gap: 18px; }
.hero-text { min-width: 0; }
.student-avatar {
  flex: 0 0 auto; display: grid; place-items: center; position: relative; overflow: hidden;
  width: 96px; aspect-ratio: 1; border: 2px solid #eee1ff85; border-radius: 28px;
  background: #5d467a; color: #fff; font-weight: 800; font-size: 1.65rem;
}
.student-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-photo-button { margin-top: 12px; }
.photo-dialog {
  width: min(570px, calc(100% - 24px)); max-height: calc(100dvh - 24px);
  padding: clamp(15px, 4vw, 26px); border: 1px solid var(--line); border-radius: 20px;
  color: #251d34; background: var(--paper);
}
.photo-dialog::backdrop { background: #211832aa; }
.photo-dialog header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.photo-close { min-width: 44px; padding: 0; font-size: 1.45rem; }
.photo-status { margin-block: 10px; color: var(--muted); font-size: .9rem; }
.photo-status:empty, .photo-variants:empty { display: none; }
.photo-variants { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.photo-variant {
  display: grid; align-content: start; gap: 5px; padding: 7px; min-width: 0;
  border: 2px solid var(--line); border-radius: 13px; color: inherit; background: #f8f5fc;
  font-size: .86rem; font-weight: 750; text-align: left;
}
.photo-variant[aria-pressed="true"] { border-color: var(--primary); background: #eee5fb; }
.photo-variant img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 7px; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.hero-label { color: #ddd1f7; font-size: .86rem; font-weight: 750; margin-bottom: 8px; }
.report-hero h1 { font-size: clamp(2.1rem, 5.6vw, 3.75rem); text-shadow: 0 2px 16px #211832b0; }
.preview {
  display: inline-flex; align-items: center; gap: 7px; color: #fff; font-size: .76rem; font-weight: 750;
  margin-top: 15px; padding: 4px 10px; border: 1px solid #c0a9ef5e; border-radius: 30px; background: #5d467a88;
}
.preview::before { content: ""; width: 6px; height: 6px; background: #dbc9ff; border-radius: 50%; }
#picker {
  margin-left: auto; min-width: min(194px, 100%); max-width: 100%; color: white;
  padding: 9px 11px 11px; border: 1px solid #eee1ff55; border-radius: 15px; background: #241637b8;
}
#picker select { min-height: 42px; color: #2c2042; }
.report-nav {
  position: sticky; top: 8px; z-index: 1; display: flex; flex-wrap: wrap; gap: 3px;
  max-width: 100%; width: fit-content; margin-block: 16px; padding: 4px; border: 1px solid var(--line);
  border-radius: 16px; background: #fff; box-shadow: 0 4px 16px #3020510c;
}
.report-nav a {
  color: var(--primary-dark); text-decoration: none; font-weight: 750; font-size: .86rem;
  border-radius: 11px; display: grid; place-items: center; min-height: 42px; padding-inline: 14px;
}
.report-nav a:hover { background: #f0e8fc; }
#report :is(section, article)[id] { scroll-margin-top: 76px; }
.overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(265px, .43fr); align-items: start; gap: 18px; }
.flow { display: grid; gap: 18px; margin-top: 18px; }
.flow:empty { display: none; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.caption, time, small { color: var(--muted); font-size: .88rem; }
.lesson-date { color: #513585; background: #f0e8f9; border-radius: 20px; padding: 5px 10px; font-weight: 750; }
.notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 17px; }
.note { padding: 15px; border-radius: 16px; background: #f7f4fb; min-width: 0; --note-accent: #7450c7; }
.note h3 { display: flex; align-items: center; gap: 8px; }
.note h3::before { content: ""; background: var(--note-accent); width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.note-outcome { background: #eef7f4; --note-accent: #278169; }
.note-home { grid-column: 1 / -1; background: #fff5e9; --note-accent: #976119; }
.note:only-child { grid-column: 1 / -1; }
.note ul, .observations { padding-left: 1.3rem; margin: 9px 0 0; }
.note li { font-size: .91rem; }
.note li::marker { color: var(--note-accent); }
li + li { margin-top: .45rem; }
.empty-copy { margin-top: 12px; color: var(--muted); }
.empty-state { margin-top: 16px; }
.attendance-count { margin-top: 13px; line-height: 1.18; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.attendance-count strong { font-size: clamp(2.4rem, 4.1vw, 3.2rem); }
.attendance-count span { color: var(--muted); font-size: 1.25rem; }
.attendance-status { display: flex; align-items: center; gap: 9px; margin-top: 12px; color: var(--primary-dark); font-weight: 750; font-size: .87rem; }
.attendance-status.low { color: #9b3937; }
.attendance-status.mid { color: #774a17; }
.attendance-status.good { color: #236752; }
.traffic-signal { display: flex; gap: 5px; padding: 6px 7px; border-radius: 20px; background: #f0edf5; }
.signal-lamp { display: block; border-radius: 50%; width: 10px; height: 10px; background: #d4cddd; }
.signal-lamp.low { --lamp: #c83b52; --halo: #c83b5255; }
.signal-lamp.mid { --lamp: #d08a20; --halo: #d08a2055; }
.signal-lamp.good { --lamp: #25876a; --halo: #25876a55; }
.signal-lamp.active { background: var(--lamp); box-shadow: 0 0 0 2px var(--halo); }
.week-chart {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); gap: 7px; margin-top: 16px;
  padding: 13px 7px 10px; border-radius: 16px; background: #f8f6fb;
}
.week { display: grid; justify-items: center; gap: 4px; min-width: 0; font-variant-numeric: tabular-nums; }
.week b { font-size: .78rem; font-weight: 800; }
.week small { white-space: nowrap; font-size: .69rem; }
.week-meter { position: relative; width: 22px; height: 70px; }
progress { display: block; width: 100%; height: 8px; border: 0; appearance: none; border-radius: 20px; background: #e9e0f2; accent-color: var(--primary); }
progress::-webkit-progress-bar { border-radius: 20px; background: #e9e0f2; }
progress::-webkit-progress-value { border-radius: 20px; background: var(--primary); }
progress::-moz-progress-bar { border-radius: 20px; background: var(--primary); }
.week-meter progress {
  position: absolute; left: 50%; top: 50%; width: 70px; height: 19px;
  transform: translate(-50%, -50%) rotate(-90deg);
}
.summary-card .caption { margin-top: 7px; }
.comparisons { display: grid; gap: 12px; margin-top: 17px; }
.comparison-card { border: 1px solid #e8e1f2; border-radius: 17px; background: #fff; padding: 14px; }
.comparison-card h3 { margin-bottom: 10px; }
.comparison-states { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.comparison-state { padding: 10px 12px; border-radius: 12px; font-size: .91rem; background: #f5f2f8; }
.comparison-state.after { color: #352454; background: #eee8f9; }
.comparison-state h4 { color: #645473; margin-bottom: 4px; font-size: .76rem; font-weight: 800; }
.comparison-state.after h4 { color: var(--primary-dark); }
.comparison-state p, .note li { overflow-wrap: anywhere; }
.skills { display: grid; gap: 11px; margin-top: 15px; }
.skill { padding: 14px; border-radius: 15px; background: #f7f4fb; }
.skill h3 { margin-bottom: 9px; }
.skill-row { display: grid; grid-template-columns: 3.1rem minmax(26px, 1fr) minmax(6.8rem, auto); gap: 8px; align-items: center; margin-top: 4px; }
.skill-row small { font-size: .76rem; }
.lesson-list { margin-top: 14px; }
.lesson { border: 1px solid var(--line); border-radius: 15px; background: #fdfcff; }
.lesson + .lesson { margin-top: 8px; }
.lesson summary { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 8px 13px; cursor: pointer; list-style: none; border-radius: 15px; }
.lesson summary::-webkit-details-marker { display: none; }
.lesson summary::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #956dde; box-shadow: 0 0 0 5px #efe6fa; margin-inline: 4px; }
.lesson summary::after { content: ""; flex: 0 0 8px; height: 8px; border: solid #6b548d; border-width: 0 2px 2px 0; margin-inline: auto 3px; transform: rotate(45deg) translateY(-2px); }
.lesson[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.lesson summary:hover { background: #f6f0fe; }
.lesson time { color: #362553; font-size: .94rem; font-weight: 800; }
.lesson .notes { margin: 0; padding: 2px 13px 13px; }
@media (min-width: 1020px) {
  .comparisons, .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .wrap { width: calc(100% - 36px); }
  .overview { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .wrap { width: calc(100% - 24px); }
  .top-content { min-height: 62px; }
  main { padding-block: 15px 46px; }
  .report-hero { min-height: 165px; border-radius: 23px; padding: 20px; align-items: start; flex-direction: column; gap: 11px; }
  .report-hero::before {
    inset-inline-start: 20%;
    background-image: linear-gradient(90deg, var(--plum), #21183278), url('/profile-cover.webp');
  }
  .hero-profile { max-width: 100%; gap: 11px; align-items: start; }
  .student-avatar { width: 55px; border-radius: 17px; font-size: 1.05rem; margin-top: 3px; }
  .hero-profile:has(.student-avatar:not([hidden])) h1 { font-size: clamp(1.55rem, 6.5vw, 2.1rem); }
  #picker { margin-inline: 0; }
  .report-nav { margin-block: 12px; top: 5px; }
  .report-nav a { padding-inline: 11px; }
  .surface { padding: 17px; border-radius: 20px; }
  .auth { padding: 23px; }
  .notes, .comparison-states { grid-template-columns: 1fr; }
  .flow, .overview { gap: 12px; }
  .flow { margin-top: 12px; }
  .note { padding: 12px; }
}
@media (max-width: 390px) {
  .tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .tabs [data-mode="activate"] { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .report-hero::before { animation: art-in 850ms cubic-bezier(.22,.8,.35,1) both; }
  .overview > *, .flow > .surface { animation: card-in 430ms cubic-bezier(.2,.75,.35,1) both; }
  .overview > :nth-child(2) { animation-delay: 75ms; }
  .week-meter { animation: fill-up 650ms cubic-bezier(.17,.67,.25,1) both; }
  .week:nth-child(2n) .week-meter { animation-delay: 75ms; }
  .skill-row progress { transform-origin: left; animation: fill-across 510ms cubic-bezier(.17,.67,.25,1) both; }
  .signal-lamp.active { animation: signal-on 900ms ease-out 3; }
  .lesson[open] .notes { animation: card-in 240ms ease-out both; }
  .lesson summary::after { transition: transform 190ms ease; }
  :is(.primary, .quiet, .tabs button, .report-nav a, .lesson summary) { transition: background-color 165ms ease, color 165ms ease; }
  @supports (animation-timeline: view()) {
    .comparison-card { animation: card-in linear both; animation-timeline: view(); animation-range: entry 0% entry 65%; }
  }
}
@keyframes card-in {
  from { opacity: .35; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes art-in {
  from { opacity: .35; transform: scale(1.04) translateX(12px); }
  to { opacity: 1; transform: scale(1) translateX(0); }
}
@keyframes fill-up {
  from { clip-path: inset(100% 0 0); }
  to { clip-path: inset(0); }
}
@keyframes fill-across { from { transform: scaleX(.03); } to { transform: scaleX(1); } }
@keyframes signal-on {
  from { box-shadow: 0 0 0 2px var(--halo); }
  65% { box-shadow: 0 0 0 5px transparent; }
  to { box-shadow: 0 0 0 2px var(--halo); }
}
