:root {
  color-scheme: light;
  --ink: #1f2933;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #ffffff;
  --section-soft: #f6fbfb;
  --white: #ffffff;
  --teal: #096b72;
  --teal-dark: #064e54;
  --coral: #d95c45;
  --gold: #d5a23a;
  --green-soft: #e5f4ef;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.1);
  --card-shadow: 0 10px 28px rgba(17, 24, 39, 0.05);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #ffffff;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1100px, calc(100% - 48px));
  min-height: 78px;
  padding: 18px 0;
  color: #ffffff;
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
}

.site-header.app-header {
  position: sticky;
  left: auto;
  transform: none;
  width: 100%;
  padding: 14px max(24px, calc((100vw - 1100px) / 2));
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.site-header.app-header .brand strong {
  color: var(--ink);
}

.site-header.app-header .tutor-login-button {
  color: var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 140px;
}

.brand strong {
  display: block;
  line-height: 1.1;
}

.brand strong {
  font-size: 1.1rem;
  color: #ffffff;
}

.logo-slot {
  display: grid;
  width: 56px;
  height: 44px;
  place-items: center;
  color: var(--white);
  font-weight: 800;
  background: var(--teal);
  border-radius: 8px;
}

.image-logo {
  overflow: visible;
  background: transparent;
  border: 0;
}

.image-logo img {
  width: auto;
  height: 40px;
  max-width: 56px;
  object-fit: contain;
  padding: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 34px);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 650;
}

.nav-links a {
  padding: 10px 0;
}

.nav-links a:hover {
  color: #ffffff;
}

.nav-cta {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 18px !important;
  color: var(--teal-dark) !important;
  background: #ffffff;
  border-radius: 999px;
}

.nav-cta:hover {
  color: var(--teal-dark) !important;
  background: #e5f4ef;
}

.menu-toggle {
  display: inline-flex;
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.tutor-login-button {
  min-height: 42px;
  padding: 10px 0;
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  font-weight: 650;
}

.tutor-login-button:hover {
  color: #ffffff;
  background: transparent;
}

.page-section,
.app-screen {
  padding: 76px 24px;
}

.hero {
  position: relative;
  display: grid;
  min-height: 760px;
  overflow: hidden;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 150px 24px 118px;
  background: #101820;
}

.hero::after {
  position: absolute;
  inset: 0;
  display: block;
  content: "";
  background:
    linear-gradient(90deg, rgba(5, 18, 24, 0.9) 0%, rgba(5, 18, 24, 0.62) 45%, rgba(5, 18, 24, 0.2) 100%),
    linear-gradient(0deg, rgba(5, 18, 24, 0.38), transparent 45%);
}

.hero-media {
  position: absolute;
  inset: 0;
  order: initial;
  min-height: 0;
  overflow: hidden;
  background: #101820;
  border-radius: 0;
  box-shadow: none;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 1;
  order: initial;
  width: min(1100px, 100%);
  margin: 0 auto;
  color: var(--white);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffce7a;
  font-size: 0.95rem;
  text-transform: none;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  max-width: 650px;
  margin-bottom: 22px;
  color: inherit;
  font-size: clamp(3rem, 6vw, 5.3rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  max-width: 770px;
  margin-bottom: 16px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.hero-copy {
  width: min(590px, 100%);
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.6;
  margin-bottom: 28px;
}

.hero-actions,
.contact-form,
.login-form,
.chat-compose {
  display: flex;
  gap: 12px;
}

.primary-action,
.secondary-action,
.icon-send,
.chat-attach-button {
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
}

.primary-action,
.icon-send {
  color: var(--white);
  background: var(--teal);
}

.primary-action:hover,
.icon-send:hover {
  background: var(--teal-dark);
}

.chat-attach-button {
  display: inline-grid;
  width: 52px;
  flex: 0 0 52px;
  place-items: center;
  padding: 0;
  color: var(--teal);
  background: #ffffff;
  border: 1px solid var(--line);
}

.chat-attach-button:hover {
  border-color: rgba(12, 120, 123, 0.36);
  box-shadow: 0 10px 24px rgba(20, 45, 55, 0.08);
}

.chat-attach-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.secondary-action {
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto 18px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transform: none;
}

.trust-strip div {
  display: grid;
  min-height: 108px;
  align-items: center;
  align-content: center;
  justify-content: center;
  gap: 6px;
  padding: 24px;
  background: var(--white);
  text-align: center;
}

.trust-strip strong {
  color: var(--teal);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.1;
}

.trust-strip span {
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 600;
}

.section-heading {
  display: block;
  margin: 0 0 34px;
}

.why-section {
  padding: 72px 24px;
  background: #ffffff;
}

.why-container {
  width: min(1100px, 100%);
  margin: 0 auto;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.why-card {
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.why-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.08);
  transform: translateY(-2px);
}

.why-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin-bottom: 24px;
  color: var(--teal);
  background: var(--green-soft);
  border-radius: 14px;
  font-weight: 900;
}

.why-card h3 {
  margin-bottom: 10px;
}

.why-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.courses-section,
.pricing-container,
.contact-section {
  width: min(1100px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.courses-section {
  background: var(--section-soft);
  border-radius: 28px;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.course-card,
.auth-panel,
.dashboard-shell,
.contact-form,
.ai-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.course-card {
  padding: 28px;
}

.course-card:hover,
.contact-form:hover,
.tutor-card:hover,
.calendar:hover {
  border-color: #cbd5e1;
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.08);
  transform: translateY(-2px);
}

.course-card p,
.auth-panel p,
.contact-section p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.contact-email {
  margin-top: 18px;
  color: var(--ink) !important;
  font-weight: 750;
}

.contact-email a {
  color: var(--teal);
  font-weight: 900;
}

.course-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 22px;
  color: var(--teal);
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  background: var(--green-soft);
  border-radius: 10px;
}

.course-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.course-list span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  color: var(--teal);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
}

.pricing-section {
  padding: 72px 24px;
  background: var(--section-soft);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.pricing-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.pricing-card {
  padding: 28px;
}

.pricing-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.08);
  transform: translateY(-2px);
}

.pricing-card span {
  color: var(--teal);
  font-size: 0.88rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.pricing-card h3 {
  margin: 14px 0 6px;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1;
}

.pricing-card p,
.section-heading p {
  color: var(--muted);
  line-height: 1.65;
}

.pricing-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 18px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--teal);
  border-radius: 999px;
  font-weight: 900;
}

.pricing-card.featured {
  border-color: rgba(9, 107, 114, 0.35);
  box-shadow: 0 18px 42px rgba(9, 107, 114, 0.12);
}

.how-it-works {
  padding: 80px 24px;
  background: #ffffff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.how-it-works-container {
  width: min(1100px, 100%);
  margin: 0 auto;
}

.how-it-works-header {
  margin-bottom: 36px;
  text-align: center;
}

.how-it-works-header h2 {
  max-width: none;
  margin: 0;
  color: #111827;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
}

.how-it-works-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.how-card {
  padding: 26px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.how-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.08);
  transform: translateY(-2px);
}

.step-number {
  display: block;
  margin-bottom: 34px;
  color: #7aaeb2;
  font-size: 0.82rem;
  font-weight: 800;
}

.how-card h3 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 1.18rem;
  font-weight: 750;
  line-height: 1.25;
}

.how-card p {
  margin: 0;
  color: #6b7280;
  font-size: 0.98rem;
  line-height: 1.65;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 0.65fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: start;
  background: var(--section-soft);
  border-radius: 28px;
}

.contact-form {
  flex-direction: column;
  gap: 18px;
  padding: 28px;
}

label {
  display: grid;
  gap: 9px;
  color: #344054;
  font-weight: 750;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  line-height: 1.35;
}

.checkbox-line input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--teal);
}

.required-field {
  color: #111827;
}

.required-field::after {
  content: "Required";
  width: fit-content;
  margin-top: -4px;
  padding: 2px 8px;
  color: var(--teal);
  background: var(--green-soft);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

input,
textarea,
select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(9, 107, 114, 0.13);
}

input:invalid,
textarea:invalid,
select:invalid {
  border-color: #fecdca;
}

.app-screen {
  min-height: calc(100vh - 76px);
}

#dashboard.app-screen {
  padding: 42px 24px 64px;
  background: #f7fbfa;
}

.auth-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.7fr);
  gap: clamp(28px, 6vw, 76px);
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: clamp(26px, 5vw, 58px);
}

.tutor-register-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(340px, 0.9fr);
  gap: clamp(30px, 5vw, 64px);
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: clamp(26px, 5vw, 58px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.tutor-register-copy {
  display: grid;
  align-content: start;
  gap: 22px;
}

.tutor-register-copy p,
.tutor-register-form p {
  color: var(--muted);
  line-height: 1.65;
}

.tutor-register-copy > p {
  font-size: 1.08rem;
}

.tutor-benefit-grid {
  display: grid;
  gap: 12px;
}

.tutor-benefit-grid article,
.tutor-requirements {
  padding: 18px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.tutor-benefit-grid span {
  display: inline-flex;
  margin-bottom: 14px;
  color: #7aaeb2;
  font-weight: 900;
}

.tutor-benefit-grid h3,
.tutor-requirements h3,
.form-intro h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.tutor-benefit-grid p,
.tutor-requirements li,
.form-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.tutor-requirements ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.tutor-register-form {
  display: grid;
  gap: 20px;
}

.tutor-applications-paused {
  align-self: start;
  padding: 32px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.tutor-applications-paused span {
  display: inline-block;
  margin-bottom: 18px;
  padding: 7px 10px;
  color: var(--teal);
  background: var(--mint);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tutor-applications-paused h3 {
  margin-bottom: 12px;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.tutor-applications-paused p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.form-intro {
  padding: 18px;
  background: var(--green-soft);
  border: 1px solid rgba(9, 107, 114, 0.18);
  border-radius: 12px;
}

.tutor-register-form fieldset {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.tutor-register-form legend {
  padding: 0 8px;
  color: var(--teal);
  font-weight: 900;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.login-form {
  flex-direction: column;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 56px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  display: grid;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
}

.password-toggle:hover,
.password-toggle[aria-pressed="true"] {
  color: var(--teal);
  background: rgba(9, 107, 114, 0.08);
}

.password-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.forgot-password-link {
  align-self: flex-end;
  border: 0;
  background: transparent;
  color: var(--teal);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0;
}

.forgot-password-link:hover {
  color: var(--teal-dark);
}

.role-control {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 6px;
  background: #eef3f4;
  border-radius: 8px;
}

.role-control.tutor-only {
  grid-template-columns: 1fr;
}

.role-option {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.role-option.active {
  color: var(--white);
  background: var(--teal);
}

.auth-switch {
  margin: 2px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
}

.auth-helper {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
  text-align: center;
}

.auth-switch button {
  padding: 0;
  color: var(--teal);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 900;
}

.auth-switch button:hover {
  color: var(--teal-dark);
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  width: min(1360px, 100%);
  margin: 0 auto;
  min-height: 760px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(17, 24, 39, 0.07);
}

.dashboard-shell.setup-mode {
  display: block;
  max-width: 980px;
  min-height: auto;
  padding: 0;
  overflow: visible;
}

.dashboard-shell.setup-mode .dashboard-sidebar,
.dashboard-shell.setup-mode #roleDashboardContent,
.dashboard-shell.setup-mode .panel-heading {
  display: none;
}

.dashboard-shell.setup-mode .dashboard-main {
  padding: 0;
}

.dashboard-shell.setup-mode .dashboard-panel {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.dashboard-shell.setup-mode .parent-setup-card {
  margin: 0;
}

.dashboard-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 18px;
  background: #ffffff;
  border-right: 1px solid var(--line);
}

.dashboard-sidebar-nav {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.dashboard-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin-bottom: 10px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.dashboard-user-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  color: #ffffff;
  background: var(--teal);
  background-position: center;
  background-size: cover;
  border-radius: 999px;
  font-weight: 900;
}

.dashboard-user-avatar.has-photo {
  color: transparent;
}

.dashboard-user-card strong,
.dashboard-user-card small {
  display: block;
}

.dashboard-user-card strong {
  max-width: 130px;
  overflow: hidden;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-user-card small {
  margin-top: 3px;
  max-width: 130px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-tab {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  margin-top: 0;
  padding: 0 12px;
  color: #344054;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
}

.profile-upload {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding: 14px;
  background: #ffffff;
  border: 1px dashed rgba(9, 107, 114, 0.35);
  border-radius: 12px;
  color: var(--teal);
  font-size: 0.86rem;
  font-weight: 850;
}

.profile-upload input {
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.side-tab.active {
  color: var(--teal);
  background: #e8f5f2;
  border-color: transparent;
}

.logout-button {
  width: 100%;
  min-height: 40px;
  margin-top: auto;
  padding: 0 14px;
  color: #b42318;
  text-align: left;
  background: #fff5f5;
  border: 1px solid #fecdca;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
}

.logout-button:hover {
  background: #fee4e2;
}

.dashboard-main {
  display: grid;
  gap: 18px;
  align-content: start;
  padding: 24px;
  background: #fbfcfd;
}

.dashboard-panel {
  min-height: 420px;
  padding: clamp(20px, 3vw, 28px);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.dashboard-utility-content {
  display: grid;
  gap: 18px;
}

.utility-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.utility-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.utility-card h4,
.utility-card p {
  margin: 0;
}

.utility-card h4 {
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.utility-card p {
  color: var(--muted);
  line-height: 1.55;
}

.utility-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--teal);
  background: var(--green-soft);
  border-radius: 8px;
  font-weight: 900;
}

.utility-empty-state {
  grid-column: 1 / -1;
  align-items: center;
}

.utility-empty-state .primary-action {
  width: auto;
  margin-left: auto;
}

.dashboard-settings-form {
  display: grid;
  gap: 18px;
  max-width: 720px;
}

.dashboard-settings-form fieldset {
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.dashboard-settings-form legend {
  padding: 0 6px;
  font-weight: 900;
}

.credits-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
  gap: 18px;
  align-items: start;
}

.credits-admin-card {
  display: grid;
  gap: 16px;
  max-width: 720px;
}

.credits-admin-card label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 850;
}

.credits-admin-card input,
.credits-admin-card select,
.credits-admin-card textarea {
  width: 100%;
  padding: 13px 14px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}

.credits-admin-card textarea {
  min-height: 96px;
  resize: vertical;
}

.credit-adjustment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.5fr);
  gap: 14px;
}

.credit-balance-result {
  display: grid;
  gap: 4px;
  padding: 16px;
  background: var(--green-soft);
  border: 1px solid rgba(9, 107, 114, 0.18);
  border-radius: 10px;
}

.credit-balance-result small,
.credit-balance-result span {
  color: var(--muted);
  font-weight: 800;
}

.credit-balance-result strong {
  color: var(--teal);
  font-size: 1.8rem;
  line-height: 1.05;
}

.parent-search-results {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.parent-search-results p {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.parent-search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 12px;
  color: var(--ink);
  text-align: left;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
}

.parent-search-result:hover {
  border-color: rgba(9, 107, 114, 0.32);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.parent-search-result span {
  display: grid;
  gap: 3px;
}

.parent-search-result span:last-child {
  text-align: right;
}

.parent-search-result strong {
  color: var(--ink);
  font-weight: 900;
}

.parent-search-result small {
  color: var(--muted);
  font-weight: 750;
}

.credits-admin-help {
  display: grid;
}

.settings-account-row {
  align-items: center;
  justify-content: space-between;
}

.settings-profile-grid {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.settings-profile-preview {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  color: #ffffff;
  background: var(--teal);
  background-position: center;
  background-size: cover;
  border-radius: 999px;
  font-weight: 900;
}

.settings-profile-preview.has-photo {
  color: transparent;
}

.settings-profile-grid div {
  display: grid;
  gap: 14px;
}

.settings-profile-grid label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 850;
}

.settings-profile-grid input[type="text"],
.settings-profile-grid input[type="file"] {
  width: 100%;
  padding: 13px 14px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}

.settings-profile-grid small {
  color: var(--muted);
  font-weight: 750;
  line-height: 1.5;
}

.settings-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.settings-toggle:last-child {
  border-bottom: 0;
}

.settings-toggle span,
.settings-toggle strong,
.settings-toggle small {
  display: block;
}

.settings-toggle small {
  margin-top: 4px;
  color: var(--muted);
}

.settings-toggle input {
  width: 20px;
  height: 20px;
  accent-color: var(--teal);
}

.role-dashboard-content {
  display: grid;
  gap: 16px;
}

.reference-dashboard {
  display: grid;
  gap: 16px;
  font-size: 0.9rem;
}

.reference-dashboard-header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
}

.reference-dashboard-header h2 {
  margin: 0 0 6px;
  font-size: clamp(1.55rem, 2.25vw, 2rem);
  line-height: 1.08;
}

.reference-dashboard-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.reference-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.reference-actions button {
  min-height: 38px;
  padding: 0 15px;
  color: #ffffff;
  background: var(--teal);
  border: 1px solid var(--teal);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 900;
}

.reference-actions button + button {
  color: var(--teal);
  background: #ffffff;
  border-color: rgba(9, 107, 114, 0.25);
}

.learner-switcher-actions label {
  display: grid;
  gap: 4px;
  min-width: 210px;
  padding: 8px 12px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid rgba(9, 107, 114, 0.25);
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 850;
}

.learner-switcher-actions select {
  color: var(--ink);
  background: transparent;
  border: 0;
  font-weight: 900;
}

.reference-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tutor-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.reference-stat-card {
  display: flex;
  gap: 14px;
  min-height: 116px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.reference-stat-card > span {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--teal);
  background: #e7f5f1;
  border-radius: 999px;
  font-weight: 900;
}

.reference-stat-card.warm-card > span {
  color: #d97706;
  background: #fff7ed;
}

.reference-stat-card.purple-card > span {
  color: #7c3aed;
  background: #f3e8ff;
}

.reference-stat-card.green-card > span {
  color: #15803d;
  background: #dcfce7;
}

.reference-stat-card small,
.reference-stat-card p {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.reference-stat-card strong {
  display: block;
  margin: 6px 0;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.12;
}

.reference-stat-card button {
  margin-top: 8px;
  padding: 0;
  color: var(--teal);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 900;
}

.reference-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 14px;
  align-items: start;
}

.student-main-grid,
.tutor-main-grid {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.reference-card,
.reference-inner-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.reference-card {
  padding: 16px;
}

.reference-inner-card {
  padding: 16px;
}

.main-span {
  grid-column: 1;
}

.parent-main-grid {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.parent-main-grid .main-span {
  grid-column: 1 / -1;
}

.dashboard-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.34fr);
  gap: 18px;
  align-items: start;
}

.parent-dashboard-grid {
  grid-template-columns: minmax(0, 1fr) 280px;
}

.tutor-dashboard-grid {
  grid-template-columns: minmax(0, 0.75fr) minmax(280px, 0.35fr);
}

.dashboard-card-span {
  grid-column: 1 / 2;
}

.platform-card {
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.platform-card h3,
.platform-card h4 {
  margin: 0;
}

.platform-card h3 {
  font-size: 1.08rem;
}

.platform-card p,
.platform-card small {
  color: var(--muted);
  line-height: 1.45;
}

.section-heading-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-heading-row h3,
.reference-card h3 {
  margin: 0;
  font-size: 1rem;
}

.section-heading-row button,
.small-outline-button,
.text-link-button,
.full-width-outline {
  min-height: 32px;
  padding: 0 11px;
  color: var(--teal);
  background: #ffffff;
  border: 1px solid rgba(9, 107, 114, 0.25);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
}

.inline-card-link {
  color: var(--teal);
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
}

.lesson-details-card {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.lesson-details-card h4,
.lesson-details-card p {
  margin: 0;
}

.lesson-details-card p,
.muted-detail {
  color: var(--muted);
  line-height: 1.45;
}

.lesson-invite-link {
  width: fit-content;
  text-decoration: none;
}

.learner-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.learner-card {
  display: grid;
  gap: 12px;
}

.learner-card-head,
.tutor-mini-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.learner-card-head h4,
.tutor-mini-card h4 {
  margin-bottom: 4px;
  font-size: 0.95rem;
  line-height: 1.2;
}

.learner-card p,
.tutor-mini-card p,
.reference-card small {
  color: var(--muted);
  line-height: 1.35;
}

.mini-badge {
  margin-left: auto;
  padding: 4px 8px;
  color: var(--teal);
  background: var(--green-soft);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 900;
}

.mini-progress {
  display: block;
  height: 8px;
  overflow: hidden;
  background: #e5e7eb;
  border-radius: 999px;
}

.mini-progress span {
  display: block;
  height: 100%;
  background: var(--teal);
  border-radius: inherit;
}

.card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.card-actions button,
.schedule-list button,
.student-row-list button,
.list-stack button {
  min-height: 32px;
  padding: 0 11px;
  color: var(--teal);
  background: #ffffff;
  border: 1px solid rgba(9, 107, 114, 0.25);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
}

.card-actions button:last-child,
.schedule-list button {
  color: #ffffff;
  background: var(--teal);
  border-color: var(--teal);
}

.add-student-card {
  display: grid;
  min-height: 160px;
  place-items: center;
  text-align: center;
  cursor: pointer;
  border-style: dashed;
}

.add-student-card span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--teal);
  background: var(--green-soft);
  border-radius: 999px;
  font-size: 1.8rem;
  font-weight: 900;
}

.right-rail-card,
.dashboard-side-stack {
  display: grid;
  gap: 14px;
}

.parent-dashboard-grid .right-rail-card {
  grid-column: 2;
  grid-row: auto;
}

.parent-dashboard-grid .recent-summary-card {
  grid-column: 1;
}

.right-rail-card .card-actions {
  margin-top: 12px;
}

.photo-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  color: #ffffff;
  background: var(--teal);
  border-radius: 999px;
  font-weight: 900;
}

.list-stack,
.schedule-list,
.student-row-list,
.message-list,
.resource-list {
  display: grid;
  gap: 10px;
}

.list-stack article,
.schedule-list article,
.student-row-list article,
.message-list p {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 11px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.list-stack article {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.list-stack article small {
  grid-column: 1;
}

.compact-list article {
  grid-template-columns: 1fr;
}

.course-progress-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  padding: 14px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.course-progress-card .mini-progress {
  grid-column: 1 / -1;
}

.learning-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.learning-columns p,
.note-check-list p {
  margin: 8px 0 0;
  color: var(--ink);
  font-weight: 750;
}

.note-check-list p::before {
  content: "•";
  margin-right: 8px;
  color: var(--teal);
}

.full-width-outline {
  width: 100%;
  margin-top: 14px;
}

.resource-list button,
.text-link-button {
  width: 100%;
  text-align: left;
}

.available-dot {
  color: var(--teal);
}

.schedule-list article,
.student-row-list article {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.student-row-list article {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-heading h3 {
  margin: 0;
  font-size: 1.65rem;
}

.status-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 11px;
  color: var(--teal);
  background: var(--green-soft);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 850;
}

.chat-window {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 390px;
  margin-bottom: 14px;
  overflow: auto;
  padding: 18px;
  background: #f4f7f8;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.chat-panel-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.34fr);
  gap: 18px;
}

.chat-workspace {
  min-width: 0;
}

.chat-compose-field {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 6px;
}

.chat-compose-field input {
  width: 100%;
}

.chat-compose-field small {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 800;
}

.chat-context-card {
  align-self: start;
  padding: 20px;
  background: #f7fbfa;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.chat-context-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.chat-context-card h4 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.chat-context-card p {
  color: var(--muted);
  line-height: 1.6;
}

.chat-context-card button {
  min-height: 42px;
  margin-top: 14px;
  padding: 0 14px;
  color: #ffffff;
  background: var(--teal);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
}

.chat-room-tabs {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px;
  background: #f4f7f8;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.chat-room-tabs button {
  min-height: 36px;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 850;
}

.chat-room-tabs button.active {
  color: #ffffff;
  background: var(--teal);
}

.chat-bubble {
  width: fit-content;
  max-width: min(76%, 620px);
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  line-height: 1.5;
}

.chat-bubble.tutor {
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
}

.chat-bubble.learner {
  align-self: flex-end;
  color: var(--white);
  background: var(--teal);
}

.chat-bubble small,
.chat-bubble a {
  display: block;
  margin-top: 7px;
  font-size: 0.78rem;
  font-weight: 850;
  opacity: 0.82;
}

.chat-bubble a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.summary-panel label,
#summaryPanel label {
  margin-bottom: 16px;
}

.summary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
  gap: 20px;
  align-items: start;
}

.summary-editor,
.summary-preview {
  padding: 22px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.summary-preview span {
  display: block;
  margin-bottom: 10px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-preview h4 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.summary-preview p,
.summary-preview small {
  color: var(--muted);
  line-height: 1.6;
}

.summary-preview div {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.success-note {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--teal);
  font-weight: 800;
}

.error-note {
  color: #b42318;
}

.warning-note {
  color: #b42318;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.parent-setup-card {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
  gap: 28px;
  align-items: start;
  margin-bottom: 22px;
  padding: 28px;
  background: #f3fbf8;
  border: 1px solid #c7e6df;
  border-radius: 14px;
  box-shadow: var(--card-shadow);
}

.parent-setup-card h4 {
  margin: 14px 0 10px;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.05;
}

.parent-setup-card p {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.parent-setup-form {
  display: grid;
  gap: 16px;
}

.parent-setup-form input[type="text"] {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}

.setup-profile-upload {
  background: #ffffff;
  border-style: solid;
}

.account-path-options {
  display: grid;
  gap: 12px;
}

.account-path-options label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}

.account-path-options input {
  margin-top: 4px;
  accent-color: var(--teal);
}

.account-path-options span {
  display: grid;
  gap: 4px;
}

.account-path-options small {
  color: var(--muted);
  line-height: 1.5;
}

.self-learner-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.self-learner-fields p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ink);
  font-weight: 900;
}

.self-learner-fields input {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}

.self-learner-fields/* Screen visibility must override component layout rules, including FAQs. */
.hidden-section {
  display: none !important;
}

.student-panel-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(320px, 1fr);
  gap: 20px;
}

.student-profile-card,
.student-form,
.student-invite-list,
.learning-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.student-profile-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px;
}

.student-avatar {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  place-items: center;
  color: #ffffff;
  background: var(--teal);
  border-radius: 999px;
  font-weight: 900;
}

.student-profile-card h4 {
  margin-bottom: 6px;
  font-size: 1.2rem;
}

.student-profile-card p {
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 700;
}

.student-profile-card small {
  color: var(--teal);
  font-weight: 850;
}

.student-form {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.student-form.readonly-form {
  background: #fbfcfd;
}

.student-invite-list {
  display: grid;
  gap: 12px;
  padding: 24px;
}

.student-invite-list h4 {
  margin: 0;
  font-size: 1.1rem;
}

#studentInviteItems {
  display: grid;
  gap: 10px;
}

#studentInviteItems p,
#studentInviteItems article {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

#studentInviteItems article {
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
}

#studentInviteItems strong,
#studentInviteItems small {
  display: block;
}

#studentInviteItems strong {
  color: var(--ink);
}

.learning-card {
  grid-column: 1 / -1;
  padding: 24px;
}

.learning-card h4 {
  margin-bottom: 16px;
  font-size: 1.2rem;
}

.learning-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.learning-list div {
  padding: 16px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.learning-list strong,
.learning-list span {
  display: block;
}

.learning-list strong {
  margin-bottom: 6px;
}

.learning-list span {
  color: var(--muted);
  line-height: 1.55;
}

.tutor-student-roster {
  display: grid;
  grid-column: 1 / -1;
  gap: 14px;
}

.roster-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.roster-card.active {
  border-color: rgba(9, 107, 114, 0.35);
}

.roster-card > div:first-child {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.roster-card h4 {
  margin-bottom: 6px;
  font-size: 1.2rem;
}

.roster-card p,
.roster-card small {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.muted-avatar {
  background: #94a3b8;
}

.roster-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.roster-actions button {
  min-height: 40px;
  padding: 0 14px;
  color: var(--teal);
  background: var(--green-soft);
  border: 1px solid rgba(9, 107, 114, 0.18);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 850;
}

.roster-actions button:hover {
  border-color: rgba(9, 107, 114, 0.38);
}

.secondary-dashboard-action {
  display: inline-grid;
  place-items: center;
  min-height: 48px;
  padding: 0 18px;
  color: var(--teal);
  background: var(--green-soft);
  border: 1px solid rgba(9, 107, 114, 0.18);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 850;
}

.calendly-manage-link {
  width: fit-content;
  margin-top: 2px;
}

.secondary-dashboard-action:hover {
  border-color: rgba(9, 107, 114, 0.36);
}

.booking-layout {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: 20px;
}

.tutor-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.tutor-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.tutor-card div {
  padding: 18px;
}

.tutor-card h4 {
  margin-bottom: 6px;
  font-size: 1.2rem;
}

.tutor-card p {
  margin-bottom: 10px;
  color: var(--muted);
}

.tutor-card span {
  color: var(--teal);
  font-weight: 850;
}

.calendar {
  padding: 18px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.calendly-note {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  padding: 14px;
  background: var(--green-soft);
  border: 1px solid rgba(9, 107, 114, 0.2);
  border-radius: 8px;
}

.calendly-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.calendly-note .credit-note {
  color: var(--teal);
  font-weight: 850;
}

.calendly-fallback-note {
  color: #b42318 !important;
  font-weight: 850;
}

.booking-instruction {
  color: #111827 !important;
  font-weight: 850;
}

.lesson-duration-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lesson-duration-options button {
  min-height: 38px;
  padding: 0 14px;
  color: var(--teal);
  background: #ffffff;
  border: 1px solid rgba(9, 107, 114, 0.24);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
}

.lesson-duration-options button.active {
  color: #ffffff;
  background: var(--teal);
  border-color: var(--teal);
}

.lesson-duration-status {
  color: var(--teal) !important;
  font-weight: 850;
}

.calendly-link {
  width: fit-content;
}

.calendly-embed {
  display: grid;
  min-height: 520px;
  max-height: 560px;
  margin-bottom: 16px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

#calendlyWidget,
#calendlyWidget > div,
.calendly-inline-widget,
.calendly-frame {
  width: 100%;
  min-height: 560px;
}

.calendly-frame {
  display: block;
  height: 560px;
  border: 0;
}

.calendly-fallback {
  display: grid;
  min-height: 220px;
  place-items: center;
  margin: 0;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  font-weight: 750;
}

.site-footer {
  padding: 78px 24px 56px;
  background: #ffffff;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(180px, 0.6fr) minmax(180px, 0.6fr);
  gap: clamp(42px, 8vw, 120px);
  width: min(1100px, 100%);
  margin: 0 auto;
}

.footer-brand {
  display: grid;
  gap: 34px;
}

.footer-logo {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 12px;
  color: #2388ef;
  font-size: 2rem;
  font-weight: 900;
}

.footer-logo img {
  width: 54px;
  height: 42px;
  object-fit: contain;
}

.footer-address {
  display: grid;
  gap: 16px;
  max-width: 420px;
}

.footer-address p,
.footer-bottom p {
  margin: 0;
  color: #111827;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.75;
}

.footer-address p:last-child {
  color: #374151;
}

.footer-bottom a {
  color: #374151;
  font-size: 1.02rem;
  font-weight: 800;
}

.footer-links {
  display: grid;
  align-content: start;
  gap: 16px;
}

.footer-links h2,
.footer-subscribe h2 {
  margin: 0 0 18px;
  color: #303941;
  font-size: clamp(1.55rem, 3vw, 2rem);
  line-height: 1.1;
}

.footer-links a {
  color: #111827;
  font-size: 1.08rem;
  font-weight: 850;
}

.footer-links a:hover,
.footer-bottom a:hover {
  color: var(--teal);
}

.footer-subscribe {
  grid-column: 2 / 4;
  display: grid;
  align-content: start;
  gap: 14px;
  margin-top: 36px;
}

.footer-contact-email {
  margin: -12px 0 8px;
}

.footer-contact-email a {
  color: var(--teal);
  font-weight: 850;
}

.footer-form {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 16px;
}

.footer-form input {
  min-height: 62px;
  padding: 0 18px;
  background: #fbfbfb;
  border: 0;
  border-bottom: 1px solid #43a047;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.04);
  font-size: 1.08rem;
}

.footer-form button {
  min-height: 62px;
  padding: 0 28px;
  color: #ffffff;
  background: #43a047;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 12px 22px rgba(67, 160, 71, 0.18);
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 900;
}

.footer-form button:hover {
  background: #388e3c;
}

.footer-bottom {
  display: grid;
  grid-column: 1 / 2;
  gap: 14px;
  margin-top: 76px;
}

.guidelines-page {
  background: #f8fbfb;
}

.guidelines-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
  padding: 22px 0;
}

.guidelines-brand {
  color: var(--ink);
}

.guidelines-main {
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto 72px;
}

.guidelines-hero {
  padding: 72px 0 46px;
}

.guidelines-hero h1 {
  max-width: 920px;
  margin-bottom: 20px;
  color: var(--ink);
  font-size: clamp(3rem, 8vw, 5.8rem);
  line-height: 0.98;
}

.guidelines-hero p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.65;
}

.guidelines-section {
  padding: 48px 0;
  border-top: 1px solid var(--line);
}

.guidelines-section h2 {
  margin-bottom: 24px;
}

.guidelines-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.guideline-card,
.guidelines-list div {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.guideline-card {
  padding: 24px;
}

.guideline-card span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin-bottom: 22px;
  color: var(--teal);
  background: var(--green-soft);
  border-radius: 10px;
  font-weight: 900;
}

.guideline-card h3 {
  margin-bottom: 10px;
}

.guideline-card p,
.guidelines-list p,
.guidelines-contact p {
  color: var(--muted);
  line-height: 1.65;
}

.guidelines-list {
  display: grid;
  gap: 14px;
}

.guidelines-list div {
  padding: 22px 24px;
}

.guidelines-list strong {
  display: block;
  margin-bottom: 6px;
}

.guidelines-contact {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.guidelines-contact p {
  max-width: 760px;
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-socials a {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #2388ef;
  font-size: 1.25rem;
  font-weight: 900;
}

.ai-chat {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  width: min(360px, calc(100vw - 40px));
}

.ai-toggle {
  float: right;
  min-height: 44px;
  margin-bottom: 10px;
  padding: 0 16px;
  color: var(--white);
  background: var(--coral);
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
  cursor: pointer;
  font-weight: 900;
}

.ai-panel {
  clear: both;
  overflow: hidden;
}

.dashboard-active .ai-chat {
  right: 14px;
  bottom: 14px;
  width: auto;
}

.dashboard-active .ai-chat:has(.ai-panel:not([hidden])) {
  width: min(340px, calc(100vw - 28px));
}

.dashboard-active .ai-toggle {
  min-height: 38px;
  margin-bottom: 8px;
  padding: 0 13px;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.14);
  font-size: 0.85rem;
}

.ai-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 220px;
  overflow: auto;
  padding: 14px;
  background: #f8fafb;
}

.ai-panel .chat-compose {
  padding: 12px;
  border-top: 1px solid var(--line);
}

.handoff-form {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #ffffff;
  border-top: 1px solid var(--line);
}

.handoff-form p {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.45;
}

.handoff-form textarea {
  min-height: 76px;
}

.handoff-form .primary-action,
.handoff-form .secondary-dashboard-action {
  width: 100%;
}

.handoff-form small {
  min-height: 18px;
  color: var(--teal);
  font-weight: 800;
  line-height: 1.4;
}

.ai-panel .chat-compose input,
.chat-compose input {
  min-width: 0;
}

/* Screen visibility must override component layout rules, including FAQs. */
.hidden-section {
  display: none !important;
}

@media (max-width: 860px) {
  .site-header {
    width: calc(100% - 36px);
  }

  .site-header.app-header {
    width: 100%;
    padding-right: 18px;
    padding-left: 18px;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 18px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .trust-strip,
  .why-grid,
  .course-grid,
  .pricing-grid,
  .guidelines-grid,
  .reference-stat-grid,
  .tutor-stat-grid,
  .reference-main-grid,
  .student-main-grid,
  .tutor-main-grid,
  .chat-panel-layout,
  .summary-layout,
  .learning-list,
  .how-it-works-grid,
  .contact-section,
  .auth-panel,
  .tutor-register-panel,
  .form-row,
  .dashboard-shell,
  .booking-layout,
  .parent-setup-card,
  .student-panel-grid,
  .dashboard-two-column,
  .credits-admin-grid,
  .credit-adjustment-row,
  .settings-profile-grid,
  .learner-card-grid,
  .learning-columns,
  .footer-grid,
  .footer-form {
    grid-template-columns: 1fr;
  }

  .utility-grid {
    grid-template-columns: 1fr;
  }

  .self-learner-fields {
    grid-template-columns: 1fr;
  }

  .footer-subscribe,
  .footer-bottom {
    grid-column: auto;
    margin-top: 0;
  }

  .site-footer {
    padding-top: 58px;
  }

  .trust-strip div {
    justify-content: flex-start;
  }

  .section-heading {
    display: block;
  }

  .dashboard-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .dashboard-sidebar {
    display: flex;
  }

  .logout-button {
    margin-top: 8px;
  }

  .dashboard-user-card {
    margin-top: 14px;
  }

  .parent-main-grid .main-span,
  .main-span,
  .parent-dashboard-grid .recent-summary-card,
  .parent-dashboard-grid .right-rail-card {
    grid-column: auto;
  }

  .hero {
    min-height: 720px;
    padding-top: 145px;
  }

  h1 {
    font-size: clamp(2.7rem, 12vw, 4.2rem);
  }
}

@media (max-width: 560px) {
  .site-header {
    min-height: 68px;
  }

  .brand {
    min-width: 0;
  }

  .hero {
    padding-right: 18px;
    padding-left: 18px;
  }

  .hero-media {
    min-height: 0;
    border-radius: 0;
  }

  .trust-strip {
    width: calc(100% - 36px);
  }

  .courses-section,
  .contact-section {
    border-radius: 18px;
  }

  .hero-actions,
  .chat-compose {
    flex-direction: column;
  }

  .chat-attach-button {
    width: 100%;
    flex-basis: 52px;
  }

  .primary-action,
  .secondary-action,
  .icon-send {
    width: 100%;
  }

  .chat-bubble {
    max-width: 100%;
  }

  .ai-chat {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }
}

/* Student details occupy a full row; actions stack below without squeezing text. */
.student-row-list article {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
}
.student-row-list article > div { min-width: 0; }
.student-row-list article strong,
.student-row-list article small { display: block; overflow-wrap: anywhere; }
.student-row-list article small { margin-top: 6px; line-height: 1.5; }
.student-row-list article > button { width: 100%; min-height: 44px; padding: 10px 12px; white-space: normal; }

.unread-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: #b42318; color: white; font-size: 13px; font-weight: 700; margin-left: 6px; vertical-align: middle; }

/* Administration: calmer hierarchy, generous forms, compact operational cards. */
.admin-dashboard-active .dashboard-shell { background: #f5f8fa; }
.admin-dashboard-active .dashboard-sidebar { background: #fff; border-right: 1px solid #e4ecee; }
.admin-dashboard-active .dashboard-main { min-width: 0; padding: clamp(22px, 3vw, 48px); }
.admin-dashboard-active #adminNavigation { gap: 6px; }
.admin-dashboard-active #adminNavigation .side-tab { border-radius: 12px; padding: 13px 18px; font-size: 15px; font-weight: 650; transition: background .18s, color .18s; }
.admin-dashboard-active #adminNavigation .side-tab:hover { background: #f0f7f7; }
.admin-dashboard-active #adminNavigation .side-tab.active { background: #e4f3f0; color: #096b70; box-shadow: inset 3px 0 #13878b; }
.admin-dashboard-active .reference-dashboard-header { margin-bottom: 28px; }
.admin-dashboard-active .reference-dashboard-header h2 { font-size: clamp(30px, 3vw, 42px); letter-spacing: -.035em; margin: 7px 0 9px; }
.admin-dashboard-active .reference-dashboard-header p { color: #647783; font-size: 15px; font-weight: 400; margin: 0; }
.admin-eyebrow { font-size: 10px; font-weight: 750; letter-spacing: .16em; color: #498185; }
.admin-dashboard-active #adminBody { display: grid; gap: 24px; }
.admin-dashboard-active .reference-stat-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin: 0; }
.admin-dashboard-active .reference-stat-card { position: relative; min-height: 138px; padding: 25px; border: 1px solid #dfe9eb; border-radius: 18px; box-shadow: 0 5px 18px #18383d05; background: #fff; }
.admin-dashboard-active .reference-stat-card:nth-child(2) { background: #f0f6fc; border-color: #dce7f2; }
.admin-dashboard-active .reference-stat-card:nth-child(3) { background: #fff8ee; border-color: #efe5d7; }
.admin-dashboard-active .reference-stat-card small { font-size: 13px; font-weight: 600; color: #5b6d76; }
.admin-dashboard-active .reference-stat-card strong { font-size: 38px; font-weight: 650; letter-spacing: -.04em; margin-top: 13px; line-height: 1; }
.admin-dashboard-active .reference-card { border: 1px solid #e0e9eb; border-radius: 18px; padding: 26px; box-shadow: 0 5px 20px #153d4504; min-width: 0; }
.admin-dashboard-active .reference-card h3 { font-size: 19px; letter-spacing: -.02em; margin: 0 0 15px; }
.admin-dashboard-active .reference-card p { font-size: 14px; color: #61727e; line-height: 1.65; overflow-wrap: anywhere; }
.admin-welcome-card { display: grid; grid-template-columns: 1.2fr 1fr; gap: 34px; border-radius: 20px; padding: 32px; background: #123f45; color: white; }
.admin-welcome-card .admin-eyebrow { color: #98d7cd; }
.admin-welcome-card h3 { font-size: clamp(24px,2.5vw,32px); font-weight: 600; line-height: 1.25; letter-spacing: -.025em; margin: 13px 0; max-width: 380px; }
.admin-welcome-card p { color: #c1d5d6; font-size: 14px; line-height: 1.7; max-width: 440px; margin: 0; }
.admin-quick-actions { display: grid; gap: 10px; align-content: center; }
.admin-quick-actions button { display: flex; justify-content: space-between; align-items: center; gap: 15px; text-align: left; padding: 14px 18px; border: 1px solid #ffffff28; border-radius: 12px; background: #ffffff0d; color: #fff; font-size: 14px; font-weight: 600; }
.admin-quick-actions button:hover { background: #ffffff20; }
.admin-empty-state { display: flex; gap: 16px; align-items: center; padding: 18px 0 4px; }
.admin-empty-state > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: #168570; background: #e8f5ed; flex-shrink: 0; }
.admin-empty-state h4 { margin: 0; font-size: 15px; }
.admin-empty-state p { margin: 5px 0 0; }
.admin-dashboard-active #adminStudentList { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.admin-dashboard-active input:not([type=checkbox]):not([type=radio]), .admin-dashboard-active select, .admin-dashboard-active textarea { width: 100%; max-width: 100%; min-height: 48px; background: #f9fbfc; border: 1px solid #d8e3e6; border-radius: 11px; padding: 12px 14px; font: inherit; font-size: 15px; color: #233b47; box-sizing: border-box; }
.admin-dashboard-active select { padding-right: 32px; }
.admin-dashboard-active label { display: grid; gap: 9px; font-size: 13px; font-weight: 650; color: #3e5662; }
.admin-dashboard-active input:focus, .admin-dashboard-active select:focus, .admin-dashboard-active textarea:focus { outline: 3px solid #13878b25; border-color: #13878b; }
.admin-dashboard-active button:focus-visible { outline: 3px solid #41aeb6; outline-offset: 3px; }
.admin-dashboard-active button:disabled { opacity: .45; cursor: not-allowed; }
.admin-dashboard-active .summary-editor, .admin-dashboard-active .credits-admin-card { padding: 28px; background: #fff; border: 1px solid #e0e9eb; border-radius: 18px; display: grid; gap: 20px; }
.admin-dashboard-active .primary-action { border-radius: 11px; padding: 13px 22px; font-size: 15px; min-height: 46px; justify-self: start; }
.admin-dashboard-active .reference-actions { gap: 12px; flex-wrap: wrap; }
.admin-dashboard-active .reference-actions button, .admin-dashboard-active [data-approve-account] { border: 1px solid #cbdfe0; background: #eaf5f3; color: #126d70; border-radius: 10px; padding: 11px 17px; font-size: 14px; }
.admin-dashboard-active #blockAccountAction { background: #fff0ee; color: #a2322d; border-color: #f0ceca; }
.admin-dashboard-active #blockAccountUser { margin-bottom: 12px; }
.admin-dashboard-active .credits-admin-grid { gap: 24px; }
@media(max-width:1000px) { .admin-welcome-card { grid-template-columns: 1fr; gap: 24px; } }
@media(max-width:640px) { .admin-dashboard-active .reference-stat-grid, .admin-dashboard-active #adminStudentList { grid-template-columns: 1fr; } .admin-dashboard-active .reference-stat-card { min-height: 100px; } .admin-welcome-card { padding: 24px; } .admin-dashboard-active .reference-card { padding: 20px; } }

/* The same selected-page treatment applies to every account role. */
.dashboard-sidebar .side-tab.active,
.admin-dashboard-active #adminNavigation .side-tab.active {
  background: #e4f3f0;
  color: #096b70;
  border-radius: 12px;
  box-shadow: inset 3px 0 #13878b;
}
#parentLearnerPicker { margin: 0 0 24px; }
#parentLearnerPicker h3 { margin: 0 0 12px; font-size: 18px; }
.parent-learner-picker { display: flex; flex-wrap: wrap; gap: 12px; }
.parent-learner-picker button { min-width: 180px; padding: 15px 20px; border: 1px solid #d9e5e7; border-radius: 12px; background: white; text-align: left; color: #233b47; }
.parent-learner-picker button[aria-pressed="true"] { background: #e4f3f0; border-color: #13878b; }
.parent-learner-picker strong, .parent-learner-picker small { display: block; }
.parent-learner-picker small { margin-top: 5px; color: #61727e; }
#conversationList { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 12px; margin-bottom: 24px; }
.conversation-card { display: grid; gap: 7px; text-align: left; background: #fff; border: 1px solid #d8e5e7; border-radius: 14px; padding: 18px; color: #25434a; min-width: 0; }
.conversation-card[aria-pressed=true] { background: #e4f3f0; border-color: #13878b; }
.conversation-card small { color: #526c75; font-weight: 500; }
.conversation-preview { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; }
/* Inbox: name list on the left, a selected conversation on the right. */
#chatPanel.inbox-mode { padding: 0; overflow: hidden; }
#chatPanel.inbox-mode .chat-panel-layout { display: grid; grid-template-columns: minmax(240px, 32%) minmax(0,1fr); gap: 0; min-height: 620px; }
#chatPanel.inbox-mode .conversation-sidebar { padding: 22px 16px; border-right: 1px solid #dfe8eb; min-width: 0; background: #fbfcfd; }
.conversation-sidebar h3 { font-size: 23px; margin: 0 0 18px; }
.conversation-sidebar input { width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid #d9e3e6; border-radius: 10px; background: white; margin-bottom: 18px; }
#chatPanel.inbox-mode #conversationList { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; max-height: 65vh; overflow-y: auto; margin: 0; }
#chatPanel.inbox-mode .conversation-card { padding: 16px; border-radius: 10px; }
#chatPanel.inbox-mode .chat-context-card { display: none; }
#chatPanel.inbox-mode .chat-workspace { display: flex; flex-direction: column; padding: 22px; min-width: 0; }
#chatPanel.inbox-mode .panel-heading { flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
#chatPanel.inbox-mode .panel-heading h3 { font-size: 23px; }
#chatPanel.inbox-mode #roleChat { flex: 1; min-height: 360px; height: 50vh; overflow-y: auto; }
#chatPanel.inbox-mode:not(.conversation-open) #roleChat { display: grid; place-items: center; color: #607580; background: #fafcfc; }
#chatPanel.inbox-mode .chat-compose { margin-top: 16px; }
#chatPanel.inbox-mode .chat-compose[hidden] { display: none; }
.conversation-back { border: 0; background: transparent; color: #14767b; font-size: 13px; padding: 5px 0; cursor: pointer; }
@media(max-width:760px) {
 #chatPanel.inbox-mode .chat-panel-layout { grid-template-columns: minmax(0,1fr); min-height: 500px; }
 #chatPanel.inbox-mode .conversation-sidebar { border: 0; }
 #chatPanel.inbox-mode:not(.conversation-open) .chat-workspace { display: none; }
 #chatPanel.inbox-mode.conversation-open .conversation-sidebar { display: none; }
 #chatPanel.inbox-mode .chat-workspace { padding: 16px; }
}

/* Cursor feedback for interactive controls across all account roles. */
button:not(:disabled),
a[href],
select:not(:disabled),
input[type="checkbox"]:not(:disabled),
input[type="radio"]:not(:disabled),
input[type="button"]:not(:disabled),
input[type="submit"]:not(:disabled),
input[type="reset"]:not(:disabled),
[role="button"]:not([aria-disabled="true"]),
.chat-attach-button {
  cursor: pointer;
}
input[type="file"]:not(:disabled)::file-selector-button { cursor: pointer; }
button:disabled, select:disabled, input:disabled, [aria-disabled="true"] { cursor: not-allowed; }
.support-intro { display: grid; gap: 8px; margin-bottom: 14px; }
.support-intro small { color: #657983; line-height: 1.5; }
#supportTranscript { max-height: 360px; overflow-y: auto; }
#supportTranscript .chat-bubble strong, #supportTranscript .chat-bubble span, #supportAdminHistory strong, #supportAdminHistory span { display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
#supportTranscript .chat-bubble strong { font-size: 11px; margin-bottom: 5px; }
#supportHandoff { margin: 12px 0; padding: 10px; border-radius: 8px; border: 1px solid #cce1e3; color: #126e73; background: #edf7f6; }
#supportStatus { font-size: 13px; }
.support-inbox { display: grid; grid-template-columns: minmax(220px,30%) minmax(0,1fr); gap: 20px; }
#supportThreadList { display: grid; gap: 10px; align-content: start; }
#supportThreadDetail { min-width: 0; }
#supportAdminHistory { max-height: 440px; overflow-y: auto; padding: 16px; background: #f5f9fa; border-radius: 12px; margin-bottom: 16px; }
#supportAdminHistory strong { font-size: 12px; color: #426d78; margin-bottom: 5px; }
#supportThreadDetail form { display: grid; gap: 12px; }
@media(max-width:760px){.support-inbox { grid-template-columns: minmax(0,1fr); }}

/* Help opens only on request; allow more reading space within the viewport. */
.ai-chat,
.dashboard-active .ai-chat:has(.ai-panel:not([hidden])) {
  width: min(460px, calc(100vw - 40px));
}
.ai-panel {
  max-height: calc(100vh - 100px);
  max-height: calc(100dvh - 100px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.ai-panel .ai-messages {
  height: 320px;
  max-height: 45vh;
  max-height: 45dvh;
}
.ai-panel .support-intro { padding: 18px 18px 0; }
.ai-panel > p,
.ai-panel > small { display: block; margin: 12px 18px; }
.ai-panel .chat-compose { grid-template-columns: minmax(0, 1fr) auto; }
.ai-panel .chat-compose input { min-width: 0; }
@media (max-width: 600px) {
  .ai-chat,
  .dashboard-active .ai-chat,
  .dashboard-active .ai-chat:has(.ai-panel:not([hidden])) {
    right: 12px;
    bottom: 12px;
    width: min(460px, calc(100vw - 24px));
  }
}

/* Public FAQ: native disclosure controls support mouse, touch, and keyboard. */
.faq-section {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  scroll-margin-top: 100px;
}
.faq-intro > p { color: var(--muted); line-height: 1.7; }
.faq-intro h2 { margin: 12px 0 18px; }
.faq-contact { margin-top: 28px; padding: 22px; background: #e7f4f1; border-radius: 18px; color: #24464d; }
.faq-contact p { margin: 8px 0 0; line-height: 1.7; }
.faq-section a { color: #0b6e75; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.faq-list { min-width: 0; border: 1px solid #dbe5e7; border-radius: 20px; overflow: hidden; background: white; }
.faq-list details + details { border-top: 1px solid #dbe5e7; }
.faq-list summary { position: relative; padding: 23px 58px 23px 24px; font-weight: 700; color: #24434b; cursor: pointer; list-style: none; line-height: 1.5; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; position: absolute; right: 24px; top: 23px; color: #0b6e75; font-size: 1.3em; line-height: 1.1; }
.faq-list details[open] summary::after { content: '−'; }
.faq-list details[open] { background: #f5faf9; }
.faq-list summary:hover { background: #edf7f5; }
.faq-list summary:focus-visible { outline: 3px solid #0b6e75; outline-offset: -4px; border-radius: 8px; }
.faq-answer { padding: 0 24px 23px; color: #52626b; line-height: 1.75; }
.faq-answer p { margin: 0; }
@media (max-width: 760px) {
  .faq-section { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .faq-contact { margin-top: 20px; }
  .faq-list summary { padding-left: 18px; }
  .faq-answer { padding-left: 18px; padding-right: 18px; }
}

#summaryFields { display: grid; gap: 18px; }
#summaryFields textarea { min-height: 100px; }
#summaryPreviewText { white-space: pre-wrap; overflow-wrap: anywhere; }
#parentEmail[readonly] { background: #edf3f4; }

/* Preview is on a light dashboard, not the dark homepage hero. */
#previewSummary {
  color: #0b6e75;
  background: #e4f3ef;
  border: 1px solid #acd4d0;
}
#previewSummary:hover { background: #d2ebe6; }
#previewSummary:focus-visible { outline: 3px solid #0b6e75; outline-offset: 3px; }
.summary-instructions { color: #425760; line-height: 1.65; margin: 0; }

#parentSummaryInbox { display: grid; gap: 16px; }
#parentSummaryInbox details { background: white; border: 1px solid #dbe5e7; border-radius: 14px; padding: 20px; }
#parentSummaryInbox summary { cursor: pointer; color: #0b6e75; font-weight: 700; }
.saved-summary-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; margin-top: 20px; }

/* Native modal keeps the preview in view and keyboard focus inside it. */
#summaryPanel .summary-layout { grid-template-columns: minmax(0, 1fr); }
#summaryPreviewDialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 0; border: 1px solid #dbe5e7; border-radius: 20px; background: white; color: #24343c; box-shadow: 0 24px 80px #102b3b40; }
#summaryPreviewDialog[open] { display: flex; flex-direction: column; }
#summaryPreviewDialog::backdrop { background: #102b3ba6; }
.summary-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px; border-bottom: 1px solid #dbe5e7; }
.summary-dialog-header h2 { font-size: 1.4rem; margin: 0; }
#closeSummaryPreview { background: #edf5f4; color: #0b6e75; border: 0; border-radius: 50%; width: 44px; height: 44px; font-size: 26px; flex-shrink: 0; cursor: pointer; }
.summary-dialog-content { padding: 24px 26px; overflow-y: auto; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; min-height: 0; }
.summary-dialog-footer { padding: 16px 26px; border-top: 1px solid #dbe5e7; background: #f6faf9; }
.summary-dialog-footer > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
#summaryDialogStatus { margin: 0 0 12px; line-height: 1.5; }
body:has(#summaryPreviewDialog[open]) { overflow: hidden; }

/* Attach files by dropping them into an open conversation. */
#chatPanel .chat-workspace.is-file-dragging {
  outline: 3px dashed #0b7b80;
  outline-offset: -3px;
  background: #e4f4f1;
  border-radius: 16px;
}
.chat-drop-hint, .chat-drop-status { font-size: .875rem; margin: .5rem 0 0; }
.chat-drop-hint { color: #657480; }
.chat-drop-status { color: #086d73; }
.chat-drop-status:empty { display: none; }
#chatPanel:not(.conversation-open) .chat-drop-hint { display: none; }
#removeChatAttachment { padding: .25rem .5rem; font-size: .8rem; background: transparent; color: #086d73; }
#removeChatAttachment[hidden] { display: none; }

/* Signup policy acknowledgement */
#authAgreement[hidden]{display:none!important}
.policy-agreement{display:flex!important;align-items:flex-start;gap:12px;font-size:14px;line-height:1.6;text-align:left}
.policy-agreement input[type="checkbox"]{width:20px!important;height:20px;flex:0 0 20px;margin:4px 0;padding:0;accent-color:#0c7077;cursor:pointer}
.policy-agreement a{color:#0c7077;text-decoration:underline}
.policy-account-note{font-size:13px;line-height:1.5;color:#52666e;text-align:left}

/* Retired student invitation controls retained only for legacy DOM references. */
#sendInvite,#studentInviteList,.account-path-options label:has(input[value="self"]),label:has(#studentEmail){display:none!important}

#chatRoomTabs{display:none!important}

/* Package selection stays in the dashboard and is usable on small screens. */
.invoice-dialog { width: min(820px, calc(100vw - 32px)); max-height: 90vh; box-sizing: border-box; border: 1px solid #d9e5e7; border-radius: 22px; padding: 28px; color: #20313a; background: #fff; box-shadow: 0 24px 80px #102b3540; }
.invoice-dialog::backdrop { background: #142f3b80; }
.invoice-dialog header { display: flex; gap: 20px; justify-content: space-between; align-items: start; }
.invoice-dialog h2 { margin: 0; }
.invoice-dialog p { line-height: 1.6; }
.invoice-dialog [data-close-invoice] { font-size: 28px; border: 0; background: #edf6f5; border-radius: 50%; width: 42px; height: 42px; flex-shrink: 0; cursor: pointer; }
.invoice-packages { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin: 22px 0; }
.invoice-packages article { border: 1px solid #cfe1e3; border-radius: 16px; padding: 22px 16px; background: #f7fbfb; }
.invoice-packages strong { display: block; font-size: 30px; margin: 16px 0; }
.invoice-packages small { font-size: 14px; }
.invoice-packages button, .pricing-card [data-buy-hours] { background: #0b7178; color: #fff; border: 0; border-radius: 10px; padding: 12px 16px; cursor: pointer; font: inherit; font-weight: 700; }
.invoice-packages button:disabled { opacity: .6; cursor: default; }
.invoice-dialog [data-invoice-status] { color: #0b7178; font-weight: 600; }
@media(max-width: 600px) { .invoice-packages { grid-template-columns: 1fr; } .invoice-dialog { padding: 20px; } }

.invoice-dialog > a[href="refund-policy.html"] {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 8px;
  background: #e5f4f2;
  color: #075e65;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.invoice-dialog > a[href="refund-policy.html"]:hover {
  background: #cfe9e6;
  color: #04464c;
}
.invoice-dialog > a[href="refund-policy.html"]:focus-visible {
  outline: 3px solid #0b7178;
  outline-offset: 3px;
}
