/* Portal chooser and full-screen demo mode. */
.rm-portal-chooser {
  min-height: 100vh;
  margin: 0;
  background: #f6f7fa;
  color: #111414;
  font-family: "Geist", "Segoe UI", Arial, sans-serif;
}

.chooser-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 0 clamp(22px, 6vw, 88px);
  border-bottom: 1px solid #e4e6ec;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
}

.chooser-brand { display: inline-flex; align-items: center; }
.chooser-brand img { display: block; width: 166px; max-height: 42px; object-fit: contain; }

.chooser-main {
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(48px, 8vw, 104px) 0 96px;
}

.chooser-intro { max-width: 680px; margin-bottom: 42px; }
.chooser-kicker { margin: 0 0 14px; color: #6042df; font-size: 13px; font-weight: 800; letter-spacing: .08em; }
.chooser-intro h1 { max-width: 650px; margin: 0; font-size: clamp(36px, 5vw, 64px); font-weight: 800; letter-spacing: -.055em; line-height: .98; }
.chooser-intro > p:last-child { margin: 18px 0 0; color: #606779; font-size: 17px; line-height: 1.5; }
.chooser-note { margin: -22px 0 26px; color: #7a5b16; font-size: 14px; line-height: 1.5; }

.chooser-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: stretch; }
.chooser-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1.5px solid #111414;
  border-radius: 18px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 5px 0 rgba(12, 15, 15, .07);
  transition: transform 220ms ease, box-shadow 220ms ease;
}
.chooser-card:hover { transform: translateY(-5px); box-shadow: 0 10px 0 rgba(12, 15, 15, .08); }
.chooser-card:focus-visible { outline: 3px solid #6042df; outline-offset: 4px; }
.chooser-art { display: grid; place-items: center; height: clamp(185px, 19vw, 260px); padding: 16px; overflow: hidden; }
.chooser-art img { display: block; width: 100%; height: 100%; border-radius: 9px; object-fit: cover; object-position: center top; }
.chooser-teacher .chooser-art { background: #ffcc37; }
.chooser-family .chooser-art { background: #ff5b91; }
.chooser-supervision .chooser-art { background: #91eb4c; }
.chooser-copy { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 25px 25px 24px; }
.chooser-number { color: #6a6d78; font-size: 11px; font-weight: 800; letter-spacing: .07em; }
.chooser-copy h2 { margin: 11px 0 9px; font-size: clamp(22px, 2vw, 29px); font-weight: 750; letter-spacing: -.035em; }
.chooser-copy p { margin: 0 0 24px; color: #454b58; font-size: 15px; line-height: 1.5; }
.chooser-action { display: flex; width: 100%; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 17px; border-top: 1px solid #e5e5e8; color: #063639; font-size: 16px; font-weight: 750; }
.chooser-action span { color: #6042df; font-size: 22px; transition: transform 180ms ease; }
.chooser-card:hover .chooser-action span { transform: translateX(4px); }

body.rm-portal-demo-mode {
  min-height: 100vh;
  margin: 0;
  background: #f3f4f8;
  color: #151722;
  font-family: "Geist", "Segoe UI", Arial, sans-serif;
}
body.rm-portal-demo-mode > :not(#rm-portal-demo) { display: none !important; }
#rm-portal-demo { min-height: 100vh; }
.rm-demo-header { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 20px; padding: 0 clamp(18px, 4vw, 56px); border-bottom: 1px solid #e2e5ed; background: #fff; }
.rm-demo-brand { display: inline-flex; align-items: center; gap: 18px; color: #171a24; font-size: 13px; font-weight: 700; text-decoration: none; }
.rm-demo-brand img { width: 155px; max-height: 40px; object-fit: contain; }
.rm-demo-back { color: #4e249e; font-size: 14px; font-weight: 700; text-decoration: none; }
.rm-demo-back:hover { text-decoration: underline; }
.rm-demo-screen { width: min(1540px, calc(100% - 48px)); margin: 24px auto 40px; }
.portal-preview.portal-demo-preview.portal-preview-teacher { grid-template: minmax(0, 1fr) / 220px minmax(0, 1fr); gap: 0; width: 100%; height: min(820px, calc(100vh - 140px)); min-height: 620px; padding: 0; overflow: hidden; border: 1px solid #e0e3ec; border-radius: 16px; background: #f7f5fd; box-shadow: 0 12px 38px rgba(24, 31, 54, .09); }
.portal-demo-preview .teacher-sidebar { padding: 24px 16px; font-size: 13px; }
.portal-demo-preview .teacher-sidebar ul { gap: 8px; margin-top: 24px; font-size: 13px; }
.portal-demo-preview .teacher-sidebar button { padding: 9px 10px; border-radius: 7px; }
.portal-demo-preview .teacher-dashboard { gap: 12px; padding: 24px; overflow: auto; }
.portal-demo-preview .teacher-dashboard h2 { font-size: 21px; }
.portal-demo-preview .teacher-dashboard h3 { font-size: 15px; }
.portal-demo-preview .teacher-dashboard p { font-size: 13px; }
.portal-demo-preview .teacher-alert,
.portal-demo-preview .teacher-progress,
.portal-demo-preview .teacher-card { padding: 12px; font-size: 13px; }
.portal-demo-preview .teacher-grid { gap: 12px; }
.portal-demo-preview .teacher-subpage { min-height: 0; }

@media (max-width: 900px) {
  .chooser-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chooser-card:last-child { grid-column: 1 / -1; }
  .chooser-card:last-child .chooser-art { height: 230px; }
  .portal-preview.portal-demo-preview.portal-preview-teacher { grid-template: auto minmax(0, 1fr) / minmax(0, 1fr); height: auto; min-height: calc(100vh - 120px); }
  .portal-demo-preview .teacher-sidebar { padding: 14px 16px; }
  .portal-demo-preview .teacher-sidebar ul { display: flex; flex-wrap: nowrap; margin: 12px 0 0; overflow-x: auto; }
  .portal-demo-preview .teacher-sidebar li { flex: 0 0 auto; }
  .portal-demo-preview .teacher-sidebar button { width: auto; white-space: nowrap; }
  .portal-demo-preview .teacher-dashboard { min-height: 540px; overflow: visible; }
}

@media (max-width: 600px) {
  .chooser-header { min-height: 66px; padding: 0 18px; }
  .chooser-brand img { width: 138px; }
  .chooser-header > span { font-size: 12px; }
  .chooser-main { width: calc(100% - 36px); padding: 48px 0 64px; }
  .chooser-intro { margin-bottom: 28px; }
  .chooser-intro > p:last-child { font-size: 15px; }
  .chooser-cards { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .chooser-card:last-child { grid-column: auto; }
  .chooser-art, .chooser-card:last-child .chooser-art { height: 220px; }
  .chooser-copy { padding: 20px; }
  .rm-demo-header { min-height: 64px; padding: 0 14px; }
  .rm-demo-brand { gap: 8px; font-size: 11px; }
  .rm-demo-brand img { width: 120px; }
  .rm-demo-back { max-width: 120px; font-size: 12px; text-align: right; }
  .rm-demo-screen { width: calc(100% - 20px); margin: 10px auto 20px; }
  .portal-preview.portal-demo-preview.portal-preview-teacher { border-radius: 10px; }
  .portal-demo-preview .teacher-dashboard { padding: 14px 10px; }
  .portal-demo-preview .teacher-grid { grid-template-columns: minmax(0, 1fr); }
  .portal-demo-preview .teacher-bottom { grid-template-columns: minmax(0, 1fr); }
  .portal-demo-preview .teacher-scores { gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .chooser-card, .chooser-action span { transition: none; }
}

body.rm-portal-demo-mode #hs-eu-cookie-confirmation,
body.rm-portal-demo-mode #hubspot-messages-iframe-container,
body.rm-portal-demo-mode #rm-floating-chat { display: none !important; }
