:root {
  --font-scale: 1;
  --blue: #0b72d9;
  --blue-soft: #e8f4ff;
  --sky: #35a9f5;
  --orange: #ff8a00;
  --purple: #813cc5;
  --yellow: #ffbc0a;
  --pink: #d85aa5;
  --green: #25a36f;
  --ink: #172646;
  --text: #526581;
  --line: #d8e3f0;
  --bg: #f4f8fc;
  --white: #ffffff;
  --shadow: 0 14px 34px rgba(23, 38, 70, 0.13);
  --radius: 8px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: calc(16px * var(--font-scale)); }

body {
  margin: 0;
  font-family: Arial, "Open Sans", sans-serif;
  color: var(--ink);
  background: #f7fbff;
  line-height: 1.6;
  overflow-x: hidden;
}

body.reduzir-animacoes *, body.reduzir-animacoes { transition: none !important; animation: none !important; scroll-behavior: auto; }
body.alto-contraste { --bg: #ffffff; --text: #111111; --ink: #000000; --line: #000000; background: #ffffff; }
body.modo-noturno { --bg: #101828; --white: #172033; --ink: #f8fbff; --text: #d7e1f0; --line: #334155; background: #101828; }

a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 20;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
}
.skip-link:focus { left: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 98px;
  padding: 18px clamp(24px, 6vw, 110px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 1.28rem;
}
.brand img { width: 62px; height: 62px; object-fit: contain; }
.brand span { color: var(--orange); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
.main-nav a, .inline-form button {
  text-decoration: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}
.main-nav .pill-link, .btn.primary {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 6px 12px rgba(11, 114, 217, 0.22);
}
.admin-area .site-header,
.student-area .site-header {
  min-height: 74px;
  padding: 14px clamp(16px, 3vw, 28px);
  background: linear-gradient(90deg, #2588dc 0%, #ffca26 33%, #f03e3e 63%, #3f963f 100%);
  border-bottom: 0;
  box-shadow: none;
}
.admin-area .brand img,
.student-area .brand img {
  display: none;
}
.admin-area .brand strong,
.student-area .brand strong {
  color: #fff;
  font-size: clamp(1.6rem, 2.2vw, 2.35rem);
  letter-spacing: 0;
  white-space: nowrap;
}
.admin-area .main-nav a,
.admin-area .inline-form button,
.student-area .main-nav a,
.student-area .inline-form button {
  color: #fff;
}
.pill-link {
  padding: 13px 21px;
  border-radius: 18px;
  min-width: 180px;
  text-align: center;
}
.menu-button { display: none; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); padding: 10px 14px; }
.admin-area .menu-button,
.student-area .menu-button {
  border-color: rgba(255,255,255,.72);
  background: rgba(255,255,255,.16);
  color: #fff;
  font-weight: 800;
}
.inline-form { margin: 0; }

.flash {
  margin: 18px auto 0;
  width: min(1120px, calc(100% - 32px));
  padding: 12px 16px;
  border: 1px solid var(--green);
  border-radius: var(--radius);
  background: #edfff7;
  color: #0f5d41;
}
.flash.erro { border-color: #d94b4b; background: #fff0f0; color: #8a2020; }

.section {
  width: calc(100% - 48px);
  margin: 0 auto;
  padding: clamp(70px, 8vw, 112px) 0;
}
.section.soft {
  width: 100%;
  padding-left: clamp(14px, 1.5vw, 26px);
  padding-right: clamp(14px, 1.5vw, 26px);
  background: #eef5fc;
}
.section-head { max-width: 1080px; margin-bottom: 58px; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 16px; letter-spacing: 0; }
h1 { font-size: clamp(2.4rem, 6vw, 4.8rem); }
h2 { font-size: clamp(2rem, 4vw, 3.15rem); }
h3 { font-size: 1.45rem; }
p { color: var(--text); font-size: 1.08rem; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,.86);
  color: var(--ink);
  font-weight: 700;
}

.hero {
  width: 100%;
  margin: 0;
  padding-left: clamp(24px, 5.8vw, 110px);
  padding-right: clamp(24px, 5.8vw, 110px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  align-items: center;
  gap: clamp(42px, 9vw, 150px);
  min-height: 772px;
  padding-top: 142px;
  padding-bottom: 64px;
  background: linear-gradient(120deg, #eaf5ff 0%, #fff7ed 54%, #f5eefc 100%);
}
.hero h1 span {
  display: block;
  background: linear-gradient(90deg, var(--orange), var(--pink), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-copy > p:not(.eyebrow) { max-width: 760px; font-size: 1.45rem; }
.hero-media {
  display: grid;
  place-items: center;
}
.hero-media img {
  width: min(560px, 92vw);
  border-radius: 50%;
  box-shadow: var(--shadow);
}

.actions { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 34px; }
.btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}
.btn.secondary {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(23, 38, 70, 0.08);
}
.hero .btn { min-width: 274px; min-height: 60px; border-radius: 16px; font-size: 1.08rem; }

.agent-grid, .feature-grid, .course-grid, .metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.agent-card, .feature-grid article, .course-card, .admin-panel, .lesson, .metric-grid article {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: 0 8px 18px rgba(23, 38, 70, 0.08);
}
.agent-card { padding: 42px 44px; min-height: 378px; }
.agent-card span {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  color: #fff;
  font-size: 1.9rem;
  font-weight: 900;
  margin-bottom: 24px;
}
.agent-card.inclus span { background: var(--blue); }
.agent-card.eduk span { background: var(--orange); }
.agent-card.autis span { background: var(--purple); }
.agent-card h3 { font-size: 2rem; margin-top: 18px; }
.agent-card p { font-size: 1.28rem; max-width: 470px; }
.agent-card.inclus h3 { color: var(--blue); }
.agent-card.eduk h3 { color: var(--orange); }
.agent-card.autis h3 { color: var(--purple); }

.chat-shell {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 36px;
  box-shadow: var(--shadow);
  width: min(1664px, calc(100% - 48px));
  margin: 0 auto;
}
.chat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.chat-tabs button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  padding: 8px 18px;
  font-weight: 800;
  cursor: pointer;
}
.chat-tabs button.active { color: #fff; background: linear-gradient(120deg, var(--blue), var(--orange), var(--purple)); }
.chat-tabs button[data-agent="inclus"].active { background: var(--blue); }
.chat-tabs button[data-agent="eduk"].active { background: var(--orange); }
.chat-tabs button[data-agent="autis"].active { background: var(--purple); }
.chat-tabs button:not(.active) { color: #061735; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.blue { background: var(--blue); }
.dot.orange { background: var(--orange); }
.dot.purple { background: var(--purple); }
.dot.team { background: linear-gradient(120deg, var(--blue), var(--orange), var(--purple)); }
.chat-messages { min-height: 566px; max-height: 566px; overflow: auto; padding: 42px 36px; }
.bot-message, .user-message { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.user-message { justify-content: flex-end; }
.user-message p, .bot-message p {
  max-width: min(760px, 84%);
  margin: 0;
  padding: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
}
.bot-message p { font-size: 1.2rem; line-height: 1.45; }
.bot-message small { display: block; color: var(--text); margin-top: 2px; font-size: 1.05rem; }
.user-message p { color: #fff; background: var(--blue); padding: 12px 16px; }
.avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(120deg, var(--blue), var(--orange), var(--purple));
}
.bot-message.inclus .avatar { background: var(--blue); }
.bot-message.eduk .avatar { background: var(--orange); }
.bot-message.autis .avatar { background: var(--purple); }
.chat-form {
  display: grid;
  grid-template-columns: 1fr 64px;
  gap: 12px;
  padding: 18px;
  border-top: 1px solid var(--line);
}
.chat-form input, input, textarea, select {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  color: var(--ink);
  padding: 12px 14px;
}
textarea { min-height: 96px; resize: vertical; }
.send-button {
  min-width: 64px;
  min-height: 64px;
  border: 0;
  border-radius: 22px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.send-button { font-size: 0; }
.send-button::before { content: "➤"; font-size: 1.4rem; transform: rotate(-35deg); display: inline-block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.feature-grid article, .course-card { padding: 42px 40px; min-height: 286px; }
.feature-grid h3 { font-size: 1.75rem; margin-top: 24px; }
.feature-grid p { font-size: 1.18rem; }
.line-icon { position: relative; display: inline-block; width: 54px; height: 54px; }
.video-icon::before { content: ""; position: absolute; left: 2px; top: 12px; width: 32px; height: 22px; border: 4px solid var(--blue); border-radius: 7px; }
.video-icon::after { content: ""; position: absolute; left: 35px; top: 17px; border-left: 16px solid var(--blue); border-top: 10px solid transparent; border-bottom: 10px solid transparent; }
.pdf-icon::before { content: ""; position: absolute; left: 10px; top: 5px; width: 30px; height: 40px; border: 4px solid var(--orange); border-radius: 5px; }
.pdf-icon::after { content: ""; position: absolute; left: 20px; top: 18px; width: 18px; height: 16px; border-top: 4px solid var(--orange); border-bottom: 4px solid var(--orange); box-shadow: 0 10px 0 -6px var(--orange); }
.audio-icon::before { content: ""; position: absolute; left: 12px; top: 6px; width: 28px; height: 38px; border: 4px solid var(--purple); border-bottom: 0; border-radius: 18px 18px 0 0; }
.audio-icon::after { content: ""; position: absolute; left: 8px; top: 30px; width: 36px; height: 18px; border-left: 4px solid var(--purple); border-right: 4px solid var(--purple); border-radius: 0 0 12px 12px; }
.tag, .status {
  display: inline-flex;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 800;
  font-size: .9rem;
}
.course-card { display: flex; flex-direction: column; align-items: flex-start; }
.course-card .btn { margin-top: auto; }

.video-section {
  display: block;
  width: min(1388px, calc(100% - 48px));
  padding: 0 0 18px;
}
.video-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: #000;
  box-shadow: var(--shadow);
}
.video-frame iframe, .pdf-reader { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pdf-reader { position: static; min-height: 620px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }

.story {
  width: min(1580px, calc(100% - 168px));
  display: grid;
  grid-template-columns: minmax(340px, 423px) 1fr;
  gap: 54px;
  align-items: center;
  padding-top: 80px;
}
.story figure { margin: 0; text-align: center; }
.story figure img { border-radius: 30px; box-shadow: var(--shadow); aspect-ratio: 0.67; object-fit: cover; }
.story figcaption { margin-top: 12px; color: var(--text); font-weight: 700; }
.story h2 { display: flex; align-items: center; gap: 12px; font-size: clamp(2rem, 3vw, 2.4rem); }
.story p { font-size: 1.17rem; line-height: 1.55; }
.heart-mark {
  position: relative;
  width: 28px;
  height: 28px;
  display: inline-block;
}
.heart-mark::before {
  content: "";
  position: absolute;
  inset: 4px 3px 6px;
  border: 3px solid var(--orange);
  border-top: 0;
  border-left: 0;
  transform: rotate(45deg);
  border-radius: 0 0 8px 0;
}
.heart-mark::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  width: 17px;
  height: 17px;
  border: 3px solid var(--orange);
  border-right: 0;
  border-bottom: 0;
  border-radius: 14px 0 0 0;
}

.auth-bg main {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(120deg, var(--blue), var(--orange), var(--purple));
}
.auth-wrap { width: min(100%, 668px); padding: 30px 16px; }
.auth-card {
  display: grid;
  gap: 18px;
  padding: 40px 36px 36px;
  border-radius: 38px;
  background: var(--white);
  box-shadow: var(--shadow);
}
.auth-card img { width: 112px; margin: 0 auto; }
.auth-card h1, .auth-card p { text-align: center; margin-bottom: 0; }
.auth-card label { display: grid; gap: 8px; font-weight: 800; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: var(--blue-soft);
}
.auth-tabs a {
  min-height: 42px;
  display: grid;
  place-items: center;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 800;
}
.auth-tabs a.active { background: var(--white); box-shadow: 0 4px 10px rgba(23, 38, 70, 0.13); }
.auth-note { font-size: .95rem; }
.google-off {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--ink);
}
.auth-card .btn { min-height: 54px; border-radius: 16px; }
.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  color: var(--text);
}
.auth-divider span {
  display: block;
  height: 1px;
  background: var(--line);
}
.google-button {
  display: grid;
  place-items: center;
  text-decoration: none;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(23, 38, 70, 0.10);
}
.auth-bg .google-button { background: var(--purple); border-color: var(--purple); color: #fff; }

.dashboard {
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 76px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
}
.admin-dashboard {
  width: min(1700px, calc(100% - 32px));
  grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
}
.dash-side {
  align-self: start;
  position: sticky;
  top: 100px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.dash-side img { width: 90px; }
.dash-side h1 {
  overflow-wrap: anywhere;
}
.student-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
}
.dash-main { min-width: 0; }
.metric-grid { margin-bottom: 22px; }
.metric-grid article { padding: 22px; }
.metric-grid strong { display: block; color: var(--blue); font-size: 2rem; }
.admin-panel { padding: 24px; margin-bottom: 22px; border-radius: 16px; }
.admin-panel h2 {
  font-size: clamp(1.75rem, 3.2vw, 3.5rem);
}
.grid-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.grid-form label { display: grid; gap: 8px; font-weight: 800; }
.grid-form label:has(textarea), .grid-form button { grid-column: 1 / -1; }
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
td form { display: flex; flex-wrap: wrap; gap: 8px; }
td button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
}
.content-table {
  margin: 16px 0 24px;
}
.content-table table {
  min-width: 880px;
}
.path-cell {
  max-width: 330px;
  word-break: break-word;
}
.content-table td form {
  margin: 0;
}
.content-table td button,
.table-delete button {
  min-height: 40px;
  border: 1px solid #f0bf70;
  border-radius: var(--radius);
  background: var(--yellow);
  color: #07172f;
  font-weight: 800;
}
.lesson-list { display: grid; gap: 22px; }
.lesson { padding: 24px; }
.lesson audio { width: 100%; }
.media-player {
  width: min(100%, 820px);
  max-height: 520px;
  border-radius: var(--radius);
  background: #000;
}
.download-link { margin-top: 16px; }
.muted { color: var(--text); }
.released-list {
  display: grid;
  gap: 14px;
}
.released-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.released-card h3 { margin: 8px 0 4px; }
.released-card p { margin: 0; }
.release-board {
  display: grid;
  gap: 18px;
}
.release-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.release-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.release-head h3 { margin-bottom: 6px; }
.release-head p { margin: 0; }
.lesson-checklist {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}
.lesson-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.lesson-check input, .download-check input { width: auto; min-height: 0; margin-top: 6px; }
.lesson-check small { display: block; color: var(--text); }
.download-check {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  width: fit-content;
  margin-left: 34px;
  color: var(--text);
  font-weight: 700;
}
.full-label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}
.btn.danger {
  border-color: #f3b7b7;
  color: #8a2020;
  background: #fff0f0;
}
.content-crud {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.crud-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: var(--bg);
}
.crud-card form:first-child {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.crud-card label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}
.crud-card label:has(textarea), .crud-actions {
  grid-column: 1 / -1;
}
.crud-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.delete-form {
  margin-top: 10px;
}
.delete-form button {
  min-height: 40px;
  border: 1px solid #f0bf70;
  border-radius: 10px;
  background: #fff7e8;
  color: #8a5200;
  font-weight: 800;
  cursor: pointer;
}

.join-section {
  display: grid;
  place-items: center;
  min-height: 430px;
  padding: 80px 24px;
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}
.join-section > div {
  max-width: 820px;
}
.join-section h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}
.join-section p {
  font-size: 1.3rem;
}
.join-section .btn {
  margin-top: 24px;
  min-width: 330px;
  min-height: 66px;
  border-radius: 20px;
  font-size: 1.12rem;
}
.mission-strip {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 8px;
  text-align: center;
}
.mission-strip p {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
}

.accessibility-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 12;
  border: 0;
  border-radius: 50%;
  padding: 6px;
  width: 74px;
  height: 74px;
  background: var(--ink);
  box-shadow: var(--shadow);
  cursor: pointer;
}
.accessibility-toggle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}
.accessibility-panel {
  position: fixed;
  right: 18px;
  bottom: 74px;
  z-index: 12;
  display: none;
  width: min(280px, calc(100vw - 36px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}
.accessibility-panel.open { display: grid; gap: 8px; }
.accessibility-panel button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}

.site-footer {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 46px clamp(18px, 6vw, 96px);
  background: #f8fbff;
  color: var(--ink);
  text-align: center;
}
.site-footer img { width: 72px; }
.site-footer p { margin: 0; color: var(--text); }
.site-footer p:nth-of-type(1) { display: none; }

@media (max-width: 980px) {
  .menu-button { display: inline-flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 78px;
    left: 16px;
    right: 16px;
    align-items: stretch;
    flex-direction: column;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
  }
  .admin-area .main-nav,
  .student-area .main-nav {
    background: var(--white);
  }
  .admin-area .main-nav a,
  .admin-area .inline-form button,
  .student-area .main-nav a,
  .student-area .inline-form button {
    color: var(--ink);
    min-height: 42px;
    text-align: left;
  }
  .main-nav.open { display: flex; }
  .hero, .video-section, .story, .dashboard { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 72px; }
  .story { width: min(100% - 32px, 760px); }
  .chat-shell { width: min(100% - 32px, 900px); }
  .agent-grid, .feature-grid, .course-grid, .metric-grid { grid-template-columns: 1fr; }
  .dash-side {
    position: static;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
  }
  .dash-side .btn,
  .dash-side p {
    grid-column: 1 / -1;
  }
  .grid-form { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; }
  .content-crud { grid-template-columns: 1fr; }
  .released-card { grid-template-columns: 1fr; }
  .release-head { display: grid; }
  .pdf-reader { min-height: 520px; }
}

@media (max-width: 560px) {
  .site-header { padding: 10px 14px; min-height: 70px; }
  .admin-area .site-header,
  .student-area .site-header {
    min-height: 64px;
    padding: 10px 12px;
  }
  .brand strong,
  .admin-area .brand strong,
  .student-area .brand strong {
    font-size: 1.15rem;
  }
  .brand img { width: 46px; height: 46px; }
  .section { width: min(100% - 24px, 1200px); padding: 44px 0; }
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
  h3 { font-size: 1.25rem; }
  p { font-size: 1rem; }
  .hero { padding-left: 16px; padding-right: 16px; gap: 28px; }
  .hero h1 { font-size: 2.35rem; }
  .hero-copy > p:not(.eyebrow) { font-size: 1.08rem; }
  .hero .btn { min-width: 0; width: 100%; }
  .actions, .chat-form { grid-template-columns: 1fr; display: grid; }
  .btn, .send-button { width: 100%; }
  .agent-card, .feature-grid article, .course-card {
    min-height: 0;
    padding: 24px 20px;
    border-radius: 16px;
  }
  .chat-shell { width: calc(100% - 24px); border-radius: 18px; }
  .chat-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .chat-tabs button { justify-content: center; padding: 8px 10px; }
  .chat-messages { padding: 18px; min-height: 300px; }
  .user-message p, .bot-message p { max-width: 100%; }
  .bot-message { display: grid; }
  .auth-wrap { padding: 16px; }
  .auth-card { padding: 28px 20px; border-radius: 24px; }
  .auth-card h1 { font-size: 2.15rem; }
  .dashboard {
    width: calc(100% - 20px);
    padding: 20px 0 58px;
    gap: 14px;
  }
  .dash-side {
    padding: 18px;
    grid-template-columns: 58px minmax(0, 1fr);
  }
  .dash-side img { width: 58px; }
  .student-name { white-space: normal; }
  .admin-panel {
    padding: 18px;
    border-radius: 12px;
  }
  .grid-form { gap: 12px; }
  input, textarea, select { min-height: 48px; border-radius: 12px; }
  table { min-width: 640px; }
  th, td { padding: 10px; }
  .content-table table { min-width: 760px; }
  .released-card { gap: 12px; padding: 14px; }
  .released-card .btn { justify-self: stretch; }
  .release-card { padding: 14px; }
  .lesson {
    padding: 18px;
    border-radius: 12px;
  }
  .media-player { width: 100%; max-height: none; }
  .pdf-reader { min-height: 440px; }
  .download-check { margin-left: 0; }
  .story { width: calc(100% - 24px); gap: 24px; }
  .join-section .btn { min-width: 0; width: 100%; }
  .crud-card form:first-child { grid-template-columns: 1fr; }
  .accessibility-toggle {
    width: 58px;
    height: 58px;
    right: 12px;
    bottom: 12px;
  }
  .accessibility-panel {
    right: 12px;
    bottom: 68px;
  }
}

@media (max-width: 380px) {
  .admin-area .brand strong,
  .student-area .brand strong {
    font-size: 1rem;
  }
  .menu-button {
    padding: 8px 10px;
  }
  .chat-tabs { grid-template-columns: 1fr; }
  .auth-tabs { grid-template-columns: 1fr; border-radius: 18px; }
  .auth-tabs a { border-radius: 14px; }
}
