/* SpaceTime Education portal · brand colours from Architecture 4.7 */
:root {
  --teal: #192C2F;
  --taupe: #C7C0B9;
  --cream: #FFFCF8;
  --ink: #192C2F;
  --accent: #C2532C;
  --muted: #5b6668;
  --danger: #a3261b;
  --ok: #2f6b3a;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.5;
}

header.site {
  background: var(--teal);
  color: var(--cream);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
header.site a { color: var(--cream); text-decoration: none; }
header.site .brand { font-weight: 600; letter-spacing: 0.02em; }

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

h1 { font-size: 1.6rem; margin: 0 0 8px; }
h2 { font-size: 1.2rem; margin: 28px 0 8px; }
p.lead { color: var(--muted); margin-top: 0; }

.card {
  background: #fff;
  border: 1px solid var(--taupe);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0;
}

label { display: block; font-weight: 600; margin: 14px 0 4px; }
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--taupe);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

button, .button {
  display: inline-block;
  margin-top: 18px;
  padding: 11px 20px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
button.secondary, .button.secondary { background: var(--teal); }
button:disabled { opacity: 0.6; cursor: wait; }

.msg { margin-top: 14px; padding: 10px 12px; border-radius: 8px; display: none; }
.msg.show { display: block; }
.msg.error { background: #fbe9e7; color: var(--danger); }
.msg.ok { background: #e8f3ea; color: var(--ok); }

.muted { color: var(--muted); font-size: 0.92rem; }

/* Step 2 dashboard lists */
main { max-width: 900px; }
.list { display: grid; gap: 12px; }
.item { border: 1px solid var(--taupe); border-radius: 8px; padding: 12px 14px; background: var(--cream); }
.item.handled { opacity: .7; }
.item p { margin: 4px 0; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.row button, .row .button { margin-top: 0; }
.row input[type=date], .row input[type=time] { width: auto; }
button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--taupe); }
label.inline { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; margin: 0; }
label.inline input { width: auto; }
details summary { cursor: pointer; font-weight: 600; margin-top: 6px; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 8px 0 0; font-size: .95rem; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; white-space: pre-wrap; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; max-width: min(560px, calc(100% - 32px)); box-shadow: 0 8px 24px rgb(0 0 0 / .18); font-weight: 600 }

.mt0{margin-top:0}

/* step 3: families */
.badge-n { display: inline-block; background: #E0BEB2; color: #4A2A24; border-radius: 99px; padding: 1px 10px; font-size: 13px; font-weight: 600; margin-left: 6px }
details.fam summary { cursor: pointer; padding: 4px 0 }
details.fam textarea { width: 100%; margin-top: 10px; font: inherit; padding: 10px; border-radius: 8px; border: 1px solid #c7c0b9 }
.thread { display: grid; gap: 8px; max-height: 360px; overflow-y: auto; margin-top: 6px }
.bubble { max-width: 85%; border-radius: 12px; padding: 8px 12px; background: #f3efe9; border: 1px solid #e0d8cf } .bubble p { margin: 4px 0 0; white-space: pre-wrap }
.bubble.me { justify-self: end; background: #e3ebea } .bubble.them { justify-self: start }
dl.facts dd { white-space: pre-line }
[hidden] { display: none !important }
/* Lessons: New offer (28 Oct; full mock-up v49 look comes with the dashboard restyle) */
form.offer { border: 1px solid var(--taupe); border-radius: 10px; padding: 14px 16px; margin-top: 12px; background: var(--cream) }
form.offer .f { display: block; font-weight: 600; margin: 14px 0 4px }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px } @media (max-width: 640px) { .split { grid-template-columns: 1fr } }
.row.tight { margin-top: 4px } .row.tight select { width: auto }
.small { font-size: .85rem; font-weight: 400 }
.ocal { border: 1px solid var(--taupe); border-radius: 10px; padding: 8px; margin-top: 4px; font-weight: 400; max-width: 340px }
.ocal-head { display: flex; justify-content: space-between; align-items: center } .ocal-head button { margin: 0; padding: 4px 10px }
.ocal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; margin-top: 6px }
.ocal-grid span { font-size: 12px; color: var(--muted) }
.ocal-grid button { margin: 0; padding: 6px 0; background: transparent; color: var(--ink); border: 1px solid transparent; border-radius: 8px; position: relative; font-weight: 400 }
.ocal-grid button:disabled { color: #b5aea7; cursor: default; opacity: 1 }
.ocal-grid button.on { background: var(--teal); color: var(--cream) }
.ocal-grid button.busy::after { content: ''; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor }
.otimes { display: grid; gap: 8px; margin-top: 4px; font-weight: 400 }
.otimes .orow { display: flex; gap: 8px; align-items: center } .otimes .orow b { min-width: 92px } .otimes select { width: auto } .otimes button { margin: 0; padding: 4px 10px }
.chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 99px; background: #ece8f4; color: #6b5b95 } .chip.ok { background: #e3efe7; color: #2e6a4f } .chip.alert { background: #f7e3dc; color: #a8432a }
/* 31 Oct: tick boxes must not take the text-box sizing above (Safari squashed them in the Subjects × levels grid) */
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; padding: 0; margin: 0; border: 0; accent-color: var(--petrol, #1F5C63); vertical-align: middle }
