/* BugBot Teach: the teacher's side, in the lessons' colours */
:root {
  --bb-green: #adc276; --bb-green-dark: #8da45a; --bb-green-deep: #6f8544;
  --bb-dark: #111111; --bb-secondary: #5f6b57; --bb-sage: #bbd291; --bb-border: #c9d6aa;
  --bb-light-bg: #e2ecce; --bb-red: #d9534f; --bb-red-bg: #f7dcdb; --bb-amber: #e0a800; --bb-yellow: #fdd14d;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Nunito', system-ui, sans-serif; color: var(--bb-dark); background: #fff; line-height: 1.5; }
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1.5rem; padding: .45rem 1.25rem; background: var(--bb-green); }
.brand { font-family: 'Varela Round', sans-serif; color: var(--bb-dark); text-decoration: none; display: flex; align-items: center; gap: .7rem; }
.brand .logo { height: 38px; width: auto; }
.brand .site { padding: .15rem .65rem; border-radius: 999px; background: #000; color: #fff; font-size: .85rem; font-weight: 700; }
.bar-links { display: flex; gap: 1.1rem; margin-left: auto; }
.bar-links a { color: var(--bb-dark); text-decoration: none; font-weight: 700; font-size: .9rem; }
.who { font-size: .85rem; font-weight: 700; }
.who button { margin-left: .6rem; }
.app { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
h1 { font-family: 'Varela Round', sans-serif; font-weight: 400; font-size: 1.8rem; margin: .5rem 0 .6rem; }
h2 { font-family: 'Varela Round', sans-serif; font-weight: 400; font-size: 1.3rem; margin: 1.6rem 0 .6rem; }
p.lead { color: var(--bb-secondary); max-width: 66ch; }
button, .btn { font: inherit; font-weight: 700; font-size: .9rem; padding: .4rem 1rem; border-radius: 6px; border: 1px solid var(--bb-green-dark); background: #fff; color: var(--bb-dark); cursor: pointer; text-decoration: none; display: inline-block; }
button.primary, .btn.primary { background: var(--bb-green); border-color: var(--bb-green); }
button.dark { background: #000; color: #fff; border-color: #000; }
button:hover, .btn:hover { background: var(--bb-sage); color: var(--bb-dark); }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { font: inherit; padding: .4rem .6rem; border: 1px solid var(--bb-border); border-radius: 6px; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.card { border: 1px solid var(--bb-border); border-radius: 12px; background: #fff; padding: 1rem 1.25rem; box-shadow: 0 .35rem 1rem rgba(0,0,0,.04); margin: .8rem 0; }
.card h3 { margin: 0 0 .4rem; font-family: 'Varela Round', sans-serif; font-weight: 400; }
.note { color: var(--bb-secondary); font-size: .88rem; }
.err { color: var(--bb-red); }
.ok { color: var(--bb-green-deep); }
.signin { max-width: 420px; }
.signin button { width: 100%; margin: .3rem 0; }
.signin input { width: 100%; margin: .25rem 0; }
.classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .9rem; }
.classes .card { cursor: pointer; }
.classes .card:hover { border-color: var(--bb-green-dark); }
.code { font-family: 'Roboto Mono', monospace; font-weight: 700; letter-spacing: .25em; }
.code.big { font-size: 2.4rem; background: #000; color: #fff; padding: .5rem 1.2rem; border-radius: 12px; display: inline-block; }
.code.big + .note { margin-top: .4rem; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: .35rem .5rem; border-top: 1px solid var(--bb-border); vertical-align: top; }
thead th { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--bb-secondary); border-top: 0; }
.table-wrap { overflow-x: auto; }
.pill { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--bb-light-bg); }
.pill.live { background: var(--bb-sage); }
.pill.idle { background: #eee; color: var(--bb-secondary); }
.pill.stuck { background: var(--bb-red-bg); color: #7a1f1b; }
.errline { font-family: 'Roboto Mono', monospace; font-size: .8rem; color: var(--bb-red); white-space: pre-wrap; }
/* the progress board */
.board th.rot { height: 7.5rem; white-space: nowrap; vertical-align: bottom; padding: 0; }
.board th.rot > div { transform: rotate(-60deg); transform-origin: left bottom; width: 1.4rem; margin-left: .6rem; font-size: .7rem; font-weight: 600; color: var(--bb-secondary); text-transform: none; letter-spacing: 0; }
.board td.c { width: 1.4rem; padding: .1rem; text-align: center; }
.board .dot { display: inline-block; width: 1rem; height: 1rem; border-radius: 3px; background: #eee; }
.board .dot.pass { background: var(--bb-green-dark); }
.board .dot.try { background: var(--bb-yellow); }
.board .dot.now { outline: 2px solid #000; }
.board td.name { white-space: nowrap; font-weight: 700; }
.board th.mod { text-align: center; background: var(--bb-light-bg); font-size: .72rem; }
.legend { display: flex; gap: 1rem; font-size: .8rem; color: var(--bb-secondary); margin: .4rem 0; align-items: center; }
.legend .dot { width: .9rem; height: .9rem; }
pre.codeview { background: var(--bb-light-bg); border: 1px solid var(--bb-border); border-radius: 8px; padding: .8rem 1rem; font-family: 'Roboto Mono', monospace; font-size: .8rem; overflow-x: auto; max-height: 24rem; }
.hint-form { display: flex; gap: .5rem; margin-top: .5rem; }
.hint-form input { flex: 1; }
.legend .spacer { flex: 1; }
.asg-lessons { display: flex; flex-direction: column; gap: .5rem; margin-top: .6rem; }
.asg-mod { display: flex; flex-wrap: wrap; gap: .3rem .4rem; align-items: center; }
.asg-mod > .note { width: 100%; }
.assign-now { padding: .2rem 0 .6rem; }
button.danger { background: #fff; border-color: #e0b4b1; color: #7a1f1b; }
button.primary { background: var(--bb-green, #adc276); border-color: var(--bb-green, #adc276); }
.lock { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem; border: 1px solid var(--bb-border); border-radius: 999px; font-size: .85rem; cursor: pointer; background: #fff; }
.lock.on { background: var(--bb-red-bg); border-color: #e0b4b1; }
.lock input { margin: 0; }
details.key { border-top: 1px solid var(--bb-border); padding: .4rem 0; }
details.key summary { cursor: pointer; }
.foot { max-width: 1200px; margin: 2rem auto 1rem; padding: 0 1.2rem; font-size: .82rem; color: var(--bb-secondary); }
.foot a { color: inherit; }
details.start summary { cursor: pointer; }
.steps { padding-left: 1.3rem; margin: .8rem 0 .4rem; }
.steps li { margin: .35rem 0; line-height: 1.5; }
.report { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; z-index: 60; }
.report-box { background: #fff; border-radius: 12px; padding: 1.2rem 1.4rem; width: min(520px, calc(100% - 2rem)); box-shadow: 0 1rem 3rem rgba(0,0,0,.25); }
.report-box textarea { width: 100%; box-sizing: border-box; font: inherit; padding: .5rem .6rem; border: 1px solid var(--bb-border); border-radius: 6px; margin: .5rem 0; }
/* the static pages: privacy, IT, DPIA */
.doc { max-width: 760px; margin: 0 auto; padding: 0 1.2rem 2rem; line-height: 1.6; }
.doc h1 { margin-top: 1.4rem; } .doc h2 { margin-top: 1.8rem; } .doc h3 { margin-top: 1.2rem; }
.doc table { border-collapse: collapse; width: 100%; font-size: .9rem; margin: .6rem 0 1rem; }
.doc th, .doc td { border: 1px solid var(--bb-border); padding: .4rem .6rem; text-align: left; vertical-align: top; }
.doc th { background: var(--bb-light-bg); }
.doc code { font-family: 'Roboto Mono', monospace; font-size: .85em; background: var(--bb-light-bg); padding: .05rem .3rem; border-radius: 4px; }
.doc .updated { color: var(--bb-secondary); font-size: .85rem; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #1a5fb4; outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: .5rem; z-index: 100; padding: .5rem .9rem; background: #111; color: #fff; border-radius: 6px; font-weight: 700; }
.skip:focus { left: .5rem; }
/* the teacher's own tasks */
.ctlist td { padding: .4rem .5rem; border-top: 1px solid var(--bb-border); vertical-align: top; }
.ctlist td.nowrap { white-space: nowrap; text-align: right; }
.ct-form { border-top: 1px solid var(--bb-border); margin-top: .8rem; padding-top: .8rem; }
.ct-form label { display: block; font-size: .82rem; font-weight: 700; color: var(--bb-secondary); margin: .7rem 0 .25rem; }
.ct-form textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: .9rem; padding: .4rem .6rem; border: 1px solid var(--bb-border); border-radius: 6px; }
.ct-form textarea.mono { font-family: 'Roboto Mono', monospace; font-size: .85rem; }
.ct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.goal { display: flex; gap: .4rem; align-items: center; margin: .3rem 0; flex-wrap: wrap; }
.goal .gfields { display: inline-flex; gap: .3rem; flex-wrap: wrap; }
.goal input { width: 9rem; }
.goal .grm { padding: .2rem .5rem; }
iframe.ct-preview { width: 100%; height: 560px; border: 1px solid var(--bb-border); border-radius: 12px; margin-top: .6rem; background: #fff; }
@media (max-width: 900px) { .ct-grid { grid-template-columns: 1fr; } }
b.code, td.mono { font-family: 'Roboto Mono', monospace; letter-spacing: .08em; }
/* teaching materials */
.mats td { padding: .45rem .5rem; border-top: 1px solid var(--bb-border); vertical-align: top; }
.mats td.num { font-weight: 800; white-space: nowrap; width: 3rem; }
.mats td.nowrap { white-space: nowrap; font-size: .9rem; }
.plan section { margin: 1.4rem 0; }
.plan h2 { margin: 0 0 .4rem; font-size: 1.15rem; }
.plan-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-start; }
.plan-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }
.plan table { border-collapse: collapse; }
.plan td { padding: .25rem .6rem .25rem 0; vertical-align: top; }
.plan td.num { text-align: right; white-space: nowrap; }
.plan .spec td { border-top: 1px solid var(--bb-border); padding: .35rem .8rem .35rem 0; font-size: .92rem; }
.plan .spec td.board { font-weight: 700; white-space: nowrap; }
.plan .ws li { margin: .5rem 0; }
.plan .ans { color: #3a5a1a; font-size: .92rem; }
.plan .lead { margin: .2rem 0 .6rem; color: var(--bb-secondary); }
a.btn { display: inline-block; font: inherit; font-weight: 700; padding: .4rem .9rem; border-radius: 6px; border: 1px solid var(--bb-border); background: #fff; color: inherit; text-decoration: none; }
@media print { .bar, .foot, .noprint, .plan-nav { display: none !important; } .app { padding: 0; max-width: none; } .plan-grid { display: block; } }
/* slides */
body.in-slides .bar, body.in-slides .foot { display: none; }
body.in-slides .app { max-width: none; padding: 0; }
.slides { display: flex; flex-direction: column; min-height: 100vh; background: #fff; }
.slide { flex: 1; padding: 3vh 5vw; max-width: 1400px; width: 100%; box-sizing: border-box; margin: 0 auto; }
.slide h1 { font-size: 2.6rem; margin: .4rem 0 1rem; }
.slide-body { font-size: 1.45rem; line-height: 1.55; }
.slide-body p.big { font-size: 1.9rem; }
.slide-body pre { background: var(--bb-light-bg); border: 1px solid var(--bb-border); border-radius: 10px; padding: 1rem 1.2rem; font-family: 'Roboto Mono', monospace; font-size: 1.15rem; line-height: 1.45; overflow-x: auto; }
.slide-body code { font-family: 'Roboto Mono', monospace; background: var(--bb-light-bg); padding: .05rem .3rem; border-radius: 4px; font-size: .95em; }
.slide-body pre code { background: none; padding: 0; }
.slide-body ul, .slide-body ol { padding-left: 1.6rem; }
.slide-body iframe.embed { width: 100%; height: 62vh; border: 1px solid var(--bb-border); border-radius: 12px; background: #fff; }
.slide-bar { display: flex; gap: .8rem; align-items: center; padding: .6rem 5vw; background: var(--bb-light-bg); border-top: 1px solid var(--bb-border); font-size: .9rem; }
.slide-bar .spacer { flex: 1; }
.slide-bar a { color: inherit; }
@media (max-width: 700px) { .bar { flex-wrap: wrap; gap: .5rem 1rem; } .bar-links { margin-left: 0; } }
