/* GradeCrew: one visual language, present before JavaScript starts. */
:root {
  --bg: #f6f7f9;
  --text: #202b3c;
  --muted: #5e6b7b;
  --line: #dfe5ec;
  --primary: #285ac9;
  --primary2: #1e48a6;
  --soft: #edf3fd;
  --radius: 16px;
  --shadow: 0 4px 20px rgb(32 43 60 / 4%);
  --crew-ice: #e8f0f7;
  --crew-rust: #a44d2d;
}
body { color: var(--text); -webkit-font-smoothing: antialiased; }
.topbar { min-height: 76px; height: auto; padding: 12px clamp(16px, 3vw, 56px); gap: 12px; flex-wrap: wrap; }
.brand strong { font-size: 21px; font-weight: 800; letter-spacing: -.055em; }
.brand small { font-size: 12px; letter-spacing: .01em; }
.brandMark { width: 38px; height: 38px; border-radius: 12px; }
.brandLetter { font-size: 25px; }
.stagingBanner { padding: 6px 16px; background: #fff4df; border-bottom: 1px solid #e7d7b4; color: #76521f; font-size: 12px; font-weight: 650; letter-spacing: .025em; text-transform: none; }
.shell { max-width: 1180px; padding: 32px 24px 56px; }
.eyebrow { font-size: 12px; letter-spacing: .13em; font-weight: 750; }
.button { font-size: 13px; border-radius: 9px; }
.dashboardPrimaryActions { display: flex; align-items: center; gap: 8px; }
.card { border-radius: 16px; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea { border-radius: 9px; border-color: #c7d0db; }
.authIntro { display: grid; grid-template-columns: 1fr 240px; align-items: center; gap: 48px; max-width: 1000px; margin: 4px auto 30px; }
.authIntro h1 { font-size: clamp(36px, 4.2vw, 54px); font-weight: 760; line-height: 1.08; letter-spacing: -.055em; margin: 13px 0 16px; text-wrap: initial; }
.authIntro h1 span { color: #586a81; }
.authIntro p { font-size: 15px; line-height: 1.6; }
.crewRoles { display: flex; gap: 24px; margin-top: 18px; flex-wrap: wrap; }
.crewRoles > span { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: #4c5e73; }
.crewRoles img { object-fit: contain; }
.authGuide { position: relative; display: grid; place-items: center; padding: 12px 0; isolation: isolate; }
.authGuideOrbit { position: absolute; width: 210px; height: 210px; background: var(--crew-ice); border-radius: 50% 50% 42% 42%; z-index: -1; top: 9px; }
.authGuide > img { width: 200px; height: 200px; object-fit: contain; }
.authGuideCaption { margin-top: 12px; color: #566b82; font-size: 12px; font-weight: 650; letter-spacing: .01em; }
.heroGrid { max-width: 1000px; grid-template-columns: 1fr 1fr; gap: 20px; margin: 0 auto; align-items: stretch; }
.heroGrid > .card { padding: 26px 30px; min-height: 0; border-radius: 18px; }
.heroCard { background: #edf3fa; border: 1px solid #d6e1ed; color: var(--text); box-shadow: none; }
.heroCard h2 { color: var(--text); font-size: 27px; margin: 18px 0 10px; }
.heroCard p { font-size: 14px; color: #53657b; max-width: 35ch; margin-bottom: 24px; }
.heroCard .eyebrow { color: #3e5e85; }
.heroCard .stack label { color: #354d6a; font-size: 12px; }
.heroCard .button.primary { background: var(--primary); color: white; }
.heroCard .button.primary:hover { background: var(--primary2); color: white; }
#joinCode { font-size: 20px; letter-spacing: .08em; min-height: 52px; padding: 11px 14px; }
#joinCode::placeholder { font-size: 14px; letter-spacing: .025em; }
.heroGrid .authForm h2 { font-size: 21px; margin: 0 0 2px; }
.heroGrid .tabs { margin-bottom: 18px; }
.heroGrid .authForm { gap: 11px; }
.heroGrid .authForm label { font-size: 12px; }
.heroGrid .authForm .button.primary { margin-top: 2px; }
.heroGrid .tab { font-size: 12px; padding: 9px 12px; }
.heroGrid .linkButton { font-size: 12px; }
.heroGrid .teacherEyebrow { margin-bottom: 10px; }
/* Working views: compact, stable actions; the content gets the space. */
#dashboardView > .pageHead { background: transparent; color: var(--text); padding: 6px 0 24px; margin: 0; border-radius: 0; box-shadow: none; overflow: visible; }
#dashboardView > .pageHead::after { display: none; }
#dashboardView > .pageHead h1 { font-size: 34px; color: var(--text); margin: 7px 0 4px; }
#dashboardView > .pageHead p { color: var(--muted); font-size: 14px; }
#dashboardView > .pageHead .eyebrow { color: var(--primary); }
#dashboardView .dashboardActions { align-self: center; }
#dashboardView #newQuizBtn { color: white; background: var(--primary); min-height: 44px; font-size: 13px; }
#dashboardView #newQuizBtn:hover { background: var(--primary2); color: white; }
#dashboardView #trashBtn { background: white; border-color: var(--line); color: var(--muted); min-height: 44px; }
.dashboardOverview { margin-top: 21px; gap: 8px; }
.dashboardMetric { min-height: 37px; padding: 7px 12px; color: #344960; background: white; border-color: var(--line); border-radius: 8px; }
.dashboardMetric strong { font-size: 16px; }
.dashboardMetric span { color: #586b80; font-size: 12px; }
.dashboardMetric:hover, .dashboardMetric[aria-pressed="true"] { background: var(--soft); border-color: #9eb6e3; }
.dashboardToolbar { padding: 14px 16px; box-shadow: none; border-radius: 12px; }
.quizGrid { align-items: stretch; }
.quizCard { min-height: 0; display: flex; flex-direction: column; gap: 11px; }
.quizCard h3 { font-size: 18px; line-height: 1.35; }
.quizCard .meta { line-height: 1.6; }
.primaryQuizActions { margin-top: auto; }
.quizCard .quizMore { margin-top: 0; }
.createPageHead p, .pageHead p { font-size: 14px; }
.choiceIcon img { width: 64px; height: 64px; object-fit: contain; }
#createAiBtn .choiceIcon { width: 70px; height: 70px; background: var(--crew-ice); border-radius: 18px; }
#createAiBtn { border-color: #adbfde; background: #f9fbff; }
.choiceText strong { letter-spacing: -.025em; }
.pageCrewArtwork { position: absolute; top: 22px; right: 8px; object-fit: contain; }
#aiView > .pageHead { position: relative; padding-right: 0; }
#aiView .aiPageHeadContent { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
#aiView .aiPageHeadText { min-width: 0; flex: 1 1 auto; }
#aiView .aiPageHeadText h1 { max-width: 28ch; }
#aiView .aiPageHeadText p { max-width: 58ch; }
#aiView .aiPageRemyHero { display: block; flex: 0 0 112px; width: 112px; height: 114px; object-fit: contain; }
.aiDataNote { margin: -6px 0 20px; font-size: 12px; max-width: 92ch; line-height: 1.5; }
.aiGrid > .card { box-shadow: none; }
.aiStatusNotice { border-radius: 9px; font-size: 12px; }
.gradecrewEmptyMascot { width: 84px; height: 84px; background: transparent; margin-inline: auto; }
.gradecrewEmptyMascot img { display: block; width: 84px; height: 84px; }
.gradecrewPreferenceDetails { margin: 14px 0; padding-top: 13px; border-top: 1px solid var(--line); }
.gradecrewPreferenceDetails summary { cursor: pointer; font-size: 13px; font-weight: 650; color: #405571; }
.gradecrewPreferenceDetails summary small { color: var(--muted); font-weight: 450; margin-left: 6px; }
.gradecrewPreferenceBody { display: grid; gap: 10px; padding-top: 14px; }
.gradecrewPreferenceBody textarea { min-height: 76px; }
.gradecrewPreferenceBody .aiPreferencesActions { margin: 0; }
.gradecrewPreferenceBody .aiPreferencesActions .hint { font-size: 12px; }
/* Animals identify one job each; no extra controls or decoration per question. */
.teacherTourIcon.gradecrewTourMascot { width: 96px; height: 96px; padding: 0; background: #edf3f9; border-radius: 28px; font-size: 0; box-shadow: none; }
.gradecrewTourMascot img { display: block; width: 96px; height: 96px; }
.teacherTourDialog { border-radius: 22px; }
.teacherTourDialog h2 { letter-spacing: -.035em; }
.teacherTourBullet { padding-block: 8px; }
.gradecrewGuideHeader { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: #536881; font-size: 12px; font-weight: 600; }
.gradecrewGuideHeader img { object-fit: contain; }
#importReviewBanner .importReviewIcon { width: 40px; height: 40px; flex: 0 0 40px; background: url('assets/gradecrew/owl-grade.svg') center / contain no-repeat; font-size: 0; }
.questionAiPanel { background-image: url('assets/gradecrew/fox-improve.svg'); background-size: 38px 38px; background-position: right 12px top 12px; background-repeat: no-repeat; }
.questionAiPanel > :first-child { padding-right: 42px; }
.variantRequestHead { background: url('assets/gradecrew/fox-improve.svg') right 42px top / 42px 42px no-repeat; }
.aiFeedbackGood.aiFeedbackAccepted:not(.aiFeedbackSelected) { color: #267049; background: linear-gradient(90deg, #d4eedf 50%, #fff 50%); border-color: #80b496; }
.startupNotice { position: fixed; z-index: 1000; bottom: 20px; left: 50%; transform: translateX(-50%); width: min(620px, calc(100vw - 32px)); padding: 16px 20px; display: flex; align-items: center; gap: 16px; background: white; color: var(--text); border: 1px solid #b7c8df; border-radius: 12px; box-shadow: 0 8px 32px rgb(0 0 0 / 12%); font-size: 14px; }
.startupNotice button { flex-shrink: 0; }
@media (max-width: 900px) {
  .authIntro { grid-template-columns: 1fr 170px; gap: 20px; }
  .authGuide > img { width: 150px; height: 150px; }
  .authGuideOrbit { width: 160px; height: 160px; }
  .authGuideCaption { max-width: 135px; text-align: center; }
  .heroGrid > .card { padding: 24px; }
}
@media (max-width: 680px) {
  .topbar { min-height: 66px; padding: 10px 16px; }
  .brand strong { font-size: 19px; }
  .brand small { font-size: 12px; }
  .shell { padding: 22px 16px 40px; }
  .authIntro { grid-template-columns: minmax(0, 1fr) 72px; gap: 12px; margin: 6px 0 24px; align-items: start; }
  .authIntro h1 { font-size: 36px; }
  .authIntro p { font-size: 13px; }
  .authIntro .eyebrow { font-size: 12px; letter-spacing: .09em; }
  .authGuide { margin-top: 24px; padding: 0; }
  .authGuide > img { width: 82px; height: 100px; }
  .authGuideOrbit { width: 86px; height: 92px; }
  .authGuideCaption { display: none; }
  .crewRoles { gap: 8px 12px; flex-wrap: wrap; }
  .crewRoles > span { gap: 3px; font-size: 12px; }
  .crewRoles img { width: 23px; height: 23px; }
  .heroGrid { grid-template-columns: 1fr; gap: 16px; }
  .heroGrid > .card { padding: 23px; }
  .heroCard h2 { margin-top: 12px; }
  #dashboardView > .pageHead h1 { font-size: 30px; }
  .dashboardOverview { gap: 6px; }
  .dashboardMetric { padding: 8px 10px; }
  #aiView > .pageHead { padding-right: 58px; }
  .pageCrewArtwork { width: 54px; height: 54px; top: 38px; right: 0; }
  .startupNotice { flex-direction: column; align-items: stretch; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 400px) {
  .authIntro { grid-template-columns: minmax(0, 1fr) 72px; }
  .authIntro h1 { font-size: 32px; }
  .crewRoles { flex-wrap: wrap; gap: 7px 10px; }
}
