:root {
  --ink:#263653;
  --deep:#304569;
  --muted:#4c5d74;
  --line:#d8e0ed;
  --paper:#fffdfa;
  --cream:#fff6de;
  --yellow:#fae9a8;
  --mint:#e2ecf8;
  --coral:#f5ddcd;
  background:#f2f5fb;
}
body { background:linear-gradient(135deg,#edf2fb,#fffaf1 70%); color:var(--ink) }
header { background:#fffdfa }
.brand { color:var(--deep) }
nav a.active { background:#fae9a8; color:#28354a }
nav a::before { background:#a6b9d6 }
nav a.active::before { background:#94641c }
.studio-grid { align-items:start }
.hero {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  min-height:clamp(280px, 29vw, 390px);
  background:linear-gradient(120deg,#dfeafa,#f1e8f6);
  border-color:#cbd9ed;
  color:var(--ink);
}
/* Keep copy above the image and its contrast overlay. */
.hero::after {
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg,rgba(250,247,242,.94) 0%,rgba(250,247,242,.82) 27%,rgba(250,247,242,.12) 65%,transparent 100%);
  pointer-events:none;
}
.heroCopy { width:min(100%, 32rem);padding:clamp(20px,3vw,34px) }
.heroCopy>span { background:#fae9a8;color:#172b45 }
.hero h1,.hero p,.heroActions small { color:var(--ink) }
.heroActions button { background:var(--yellow);color:var(--ink);border:1px solid #bd9b40 }
.cardiff-skyline { position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;object-position:center }
@media(max-width:620px) {
  .hero { min-height:300px;align-items:start }
  .hero::after { background:linear-gradient(180deg,rgba(250,247,242,.94),rgba(250,247,242,.8) 44%,transparent 88%) }
}
.course-picker { background:var(--paper);box-shadow:inset 0 5px #e8bc9d }
.course-picker small { color:var(--muted) }
.mode[data-mode=cards] { --tile:#d8e8f9 }
.mode[data-mode=space] { --tile:#d9d9f0 }
.mode[data-mode=space] .art { background-image:radial-gradient(#58678b45 1px,transparent 1.5px) }
.mode[data-mode=space] i { color:#394b73 }
.mode[data-mode=spell] { --tile:#f4d9c7 }
.row:nth-child(even) { background:#f2f5fb }
#classroom #courseForm,.dashboard-grid>.pupil,.feedback-panel { background:#eaf1fb }
.dashboard-grid>.pupil { border-top-color:#8ea7ce }
.overview thead th,.overview tr:has([aria-current=true]) { background:#eaf1fb }
#speakingPanel { background:#fff4e4;border-top-color:#e8bc9d }
#classroom button,#speechEditor button,#goalEditor button { background:#e2eaf7;color:#304569;border-color:#a8bad5 }
#classroom button.dark,#classroom button[type=submit],#classroom form button:not([type]),
#classroom [data-speech=set],#speechEditor .dark,#goalEditor .dark { background:#304569;color:white;border-color:#304569 }
#classroom .danger-action,#classroom [data-course=delete],#classroom [data-remove-staff] { background:#ffe2d8;color:#802b20;border-color:#cd8276 }
#classroom #showGoals { color:#304569 }
#topicForm input[type=checkbox],.overview progress,.goal progress { accent-color:#375c91 }
progress::-webkit-progress-value { background:#375c91 }
progress::-moz-progress-bar { background:#375c91 }
.vg-shell { --green:#304569;--ink:#263653;--light:#f2f5fb }
.vg-flip { background:#dce8f7;border-color:#a8bad5 }

.sentence-tiles { display:flex;flex-wrap:wrap;gap:8px;padding:10px;min-height:60px }
.sentence-answer { border:2px dashed #a8bad5;border-radius:12px;background:#edf2fb;align-items:center }
.sentence-answer span { color:var(--muted) }
.sentence-tiles [draggable=true] { cursor:grab }

.mode[data-mode=draig] { --tile:#f6e4a3 }
.draig-stats { display:flex;flex-wrap:wrap;gap:8px 16px;font-weight:650;margin-bottom:10px }
.draig-track { display:block;width:100%;height:auto;border:1px solid #a8bad5;border-radius:14px;background:#dbe9fb url(cardiff-skyline.webp) center bottom / cover;touch-action:manipulation }
.draig-jump { margin-top:12px;min-width:110px }
.draig-jump small { opacity:.84 }
.draig-panel button { margin:4px 8px 4px 0;max-width:100%;overflow-wrap:anywhere }
.draig-prompt { font-size:1.25rem;font-weight:700 }
@media(min-width:1200px) {
  #modes { grid-template-columns:repeat(5,minmax(0,1fr)) }
}

.reading-passage { background:#eaf1fb;border-radius:12px;padding:4px 15px;margin:12px 0;line-height:1.65 }
#classroom .reading-form { display:grid;gap:12px;align-items:start }
.reading-form fieldset { border:1px solid var(--line);border-radius:10px;padding:8px 12px;min-width:0 }
#classroom .reading-choice { display:flex;align-items:center;gap:8px }
#classroom .reading-choice input { width:auto;min-height:0;flex:none }
.reading-form textarea { width:100%;display:block }
.reading-form button { justify-self:start }
.reading-form [role=status]:empty { display:none }
.reading-answer { white-space:pre-wrap;overflow-wrap:anywhere }

#modes { grid-auto-rows:1fr }
#modes .mode { display:grid;grid-template-rows:1fr 1fr;min-width:0;min-height:208px }
#modes .mode .art {
  height:auto;min-height:0;width:100%;
  background-image:radial-gradient(#26365329 1px,transparent 1.5px);
  background-size:11px 11px;
}
#modes .mode .art i {
  border:2px solid var(--ink);
  background:var(--cream);
  color:var(--ink);
  box-shadow:4px 4px 0 var(--ink);
  font-size:2.4rem;
  display:grid;
  place-items:center;
  box-sizing:border-box;
  width:68px;
  height:52px;
  padding:0;
}
.mode-copy { display:block;padding:12px 14px 14px;overflow-wrap:anywhere }
#modes .mode strong { margin:0 0 4px }
#modes .mode small { margin:0 }
@media(max-width:620px) {
  #modes .mode { min-height:190px }
}
