/* Plan Like ACAR — ACAR brand: Navy #12264B, Red #A31E22, white field,
   borders for structure. Cormorant Garamond display / DM Sans body with the
   brand guide's fallbacks (fonts aren't bundled). */

:root {
  --navy: #12264B;
  --red: #A31E22;
  --ink: #12264B;
  --muted: #5B6779;
  --line: #D9DFE9;
  --line-soft: #E8ECF3;
  --bg: #FFFFFF;
  --bg-soft: #F6F8FB;
  --green: #1F7A3D;
  --amber: #A05E03;
  --serif: 'Cormorant Garamond', Cambria, Georgia, serif;
  --sans: 'DM Sans', Calibri, -apple-system, system-ui, sans-serif;
  --cell-h: 132px;
}
body.compact { --cell-h: 84px; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
}
button { font-family: var(--sans); cursor: pointer; }
.grow { flex: 1; }

/* training banner — highlighter yellow (the schedule's own yellow), loud on
   purpose: nothing under it is real */
#training-banner {
  position: sticky; top: 0; z-index: 50;
  background: #FFFF54; color: var(--navy);
  border-bottom: 2px solid #D9C400;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 14px; font-size: 13px; font-weight: 600;
}
#training-banner button {
  background: var(--navy); color: #FFFF54; border: none; border-radius: 5px;
  font-weight: 700; font-size: 12px; padding: 4px 10px;
}
#training-banner span b { letter-spacing: 1px; }
body.training #topbar { border-bottom-color: #D9C400; }

/* ---------------------------------------------------------------- header */
#topbar {
  position: sticky; top: 0; z-index: 40;
  background: #fff;
  border-bottom: 2px solid var(--navy);
}
.brandline {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px 4px;
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.lockup { line-height: 1.05; white-space: nowrap; }
.lockup-top {
  display: block; font-size: 8.5px; letter-spacing: 2.2px; font-weight: 700;
}
.lockup-main {
  display: block; font-family: var(--serif); font-weight: 700;
  font-size: 21px; letter-spacing: .5px;
  border-bottom: 2.5px solid var(--red); padding-bottom: 1px;
}
.app-name {
  font-family: var(--serif); font-size: 17px; font-style: italic;
  color: var(--red); margin-left: 2px; white-space: nowrap;
}
#view-tabs { display: flex; gap: 2px; margin-left: 14px; }
.vtab {
  border: 1px solid transparent; background: none; color: var(--navy);
  padding: 6px 12px; font-size: 13.5px; font-weight: 600; border-radius: 6px 6px 0 0;
}
.vtab:hover { background: var(--bg-soft); }
.vtab.active {
  border-color: var(--navy); border-bottom-color: #fff;
  background: #fff; color: var(--red);
}
.conn { color: var(--green); font-size: 11px; margin-right: 2px; }
body.offline .conn { color: var(--red); }
.ghost {
  background: none; border: 1px solid var(--line); border-radius: 6px;
  color: var(--navy); padding: 5px 10px; font-size: 13px;
}
.ghost:hover { border-color: var(--navy); }

.navline {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px; flex-wrap: wrap;
}
.navline select, .navline input[type=date] {
  font-family: var(--sans); font-size: 13px; padding: 4px 6px;
  border: 1px solid var(--line); border-radius: 6px; color: var(--navy);
  background: #fff;
}
.navline button {
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  padding: 4px 12px; font-size: 14px; color: var(--navy);
}
.navline button:hover { border-color: var(--navy); }
#range-label { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.density { font-size: 12px; color: var(--muted); user-select: none; }
.badge-ro {
  background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
  padding: 5px 12px; border-radius: 20px; letter-spacing: .5px;
  border: none; cursor: pointer;
}
.badge-ro:hover { background: #7E1519; }
#class-toggles { display: flex; gap: 4px; flex-wrap: wrap; }
.ctoggle {
  font-size: 11px; padding: 3px 8px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; color: var(--navy);
  border-left-width: 6px;
}
.ctoggle.off { opacity: .35; }

/* dropdowns */
.menu-wrap { position: relative; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 60;
  background: #fff; border: 1px solid var(--navy); border-radius: 8px;
  min-width: 220px; padding: 6px; box-shadow: 0 8px 24px rgba(18,38,75,.18);
  display: flex; flex-direction: column;
}
.dropdown button, .dropdown a {
  text-align: left; background: none; border: none; padding: 8px 10px;
  font-size: 13.5px; color: var(--navy); border-radius: 5px;
  text-decoration: none; display: block;
}
.dropdown button:hover, .dropdown a:hover { background: var(--bg-soft); }
.dropdown hr { border: none; border-top: 1.5px solid var(--line); margin: 6px 2px; }
.menu-group {
  font-size: 9.5px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--muted); font-weight: 700; padding: 6px 10px 2px;
}
.dropdown .danger { color: var(--red); }

/* ---------------------------------------------------------------- planner */
#main { display: flex; }
#planner { flex: 1; min-width: 0; padding: 10px 14px 60px; }

/* week grid */
.grid { border: 1.5px solid var(--navy); border-radius: 8px; overflow: hidden; }
.grid-table { display: grid; }
.gcell {
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  min-width: 0;
}
.ghead {
  background: var(--navy); color: #fff; font-weight: 700; font-size: 13px;
  padding: 6px 8px; text-align: center;
}
.ghead .dnum { font-weight: 400; opacity: .85; margin-left: 4px; }
.ghead.today { background: var(--red); }
.ghead .rotname { font-size: 10px; opacity: .8; display: block; }
.gclass {
  background: var(--bg-soft); font-size: 12px; font-weight: 700;
  padding: 8px 6px 8px 10px; border-left: 6px solid var(--navy);
  display: flex; flex-direction: column; gap: 2px; justify-content: center;
}
.gclass .subj { color: var(--muted); font-weight: 400; font-size: 10.5px; }
.gclass .times { color: var(--muted); font-weight: 400; font-size: 9.5px; }
.cell {
  position: relative; min-height: var(--cell-h); padding: 4px;
  background: #fff; overflow: hidden;
  display: flex; flex-direction: column;
}
/* off days are blacked out so the shape of the teaching year reads at a
   glance — holidays, breaks, PD days all go dark */
.cell.closed { background: #262C38; }
.cell.closed .nsd-label {
  font-size: 10px; color: #E8ECF3; font-weight: 700; text-align: center;
  margin-top: 34px; letter-spacing: .8px; text-transform: uppercase;
  opacity: .9;
}
.cell.off { background: var(--bg-soft); }
.cell.today-col { box-shadow: inset 0 0 0 2px rgba(163,30,34,.25); }
.cell.droptarget { outline: 2.5px dashed var(--red); outline-offset: -3px; background: #FDF4F4; }

.lesson-card {
  border: 1px solid var(--line); border-left-width: 5px; border-radius: 6px;
  background: #fff; padding: 4px 6px; font-size: 12px;
  flex: 1 1 auto; min-height: 0;
  cursor: pointer; overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .12s;
}
.lesson-card:hover { box-shadow: 0 2px 8px rgba(18,38,75,.18); }
.lesson-card.dragging { opacity: .4; }
.lesson-card .lt {
  font-weight: 700; font-size: 12.5px; margin-bottom: 2px;
  display: flex; gap: 4px; align-items: baseline;
}
.lesson-card .lt .t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lesson-card .preview { color: var(--muted); font-size: 11px; line-height: 1.35;
  overflow: hidden; flex: 1; }
.lesson-card .preview b.sec { color: var(--red); font-size: 9px; letter-spacing: .6px;
  text-transform: uppercase; display: block; margin-top: 2px; }
.lesson-card .stdrow { font-size: 9.5px; color: var(--muted); overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis; }
.lesson-card .badges { display: flex; gap: 3px; }
.badge {
  font-size: 9px; padding: 0 4px; border-radius: 8px; font-weight: 700;
  border: 1px solid currentColor;
}
.badge.lock { color: var(--amber); }
.badge.taught { color: var(--green); }
.badge.skipped { color: var(--muted); }
.badge.cmt { color: var(--navy); }
.unit-band { height: 4px; border-radius: 2px; margin: -4px -6px 3px; }
.cell-add {
  position: absolute; inset: 0; border: none; background: none; color: transparent;
  font-size: 22px; width: 100%;
}
.cell-add:hover { color: var(--line); background: rgba(246,248,251,.6); }

/* day view */
.dayview { display: flex; flex-direction: column; gap: 12px; max-width: 900px; }
.day-lesson {
  border: 1.5px solid var(--line); border-left: 6px solid var(--navy);
  border-radius: 8px; padding: 10px 14px; cursor: pointer; background: #fff;
}
.day-lesson:hover { box-shadow: 0 2px 10px rgba(18,38,75,.15); }
.day-lesson h3 { margin: 0; font-size: 17px; }
.day-lesson .cls { color: var(--red); font-size: 11.5px; font-weight: 700;
  letter-spacing: .5px; }
.day-lesson .secname { color: var(--red); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px; margin: 6px 0 1px; }
.day-lesson .sectext { font-size: 13.5px; line-height: 1.45; }

/* month view */
.month-grid { display: grid; grid-template-columns: repeat(5, 1fr);
  border: 1.5px solid var(--navy); border-radius: 8px; overflow: hidden; }
.mcell { border: 1px solid var(--line-soft); min-height: 96px; padding: 3px 5px;
  font-size: 11px; background: #fff; }
.mcell.closed { background: #262C38; }
.mcell.closed .mdate { color: #E8ECF3; }
.mcell.othermonth { background: var(--bg-soft); }
.mcell .mdate { font-weight: 700; font-size: 11px; }
.mcell.today .mdate { color: var(--red); }
.mcell .mrow { overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  border-left: 3px solid; padding-left: 3px; margin-top: 1px; cursor: pointer; }

/* list view */
.listview { max-width: 900px; }
.listview table { width: 100%; border-collapse: collapse; }
.listview th { text-align: left; font-size: 11px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--navy);
  padding: 6px; }
.listview td { border-bottom: 1px solid var(--line-soft); padding: 7px 6px;
  font-size: 13px; vertical-align: top; }
.listview tr.gap td { color: var(--muted); font-style: italic; background: var(--bg-soft); }
.listview tr:hover td { background: var(--bg-soft); cursor: pointer; }
.seqnum { color: var(--muted); font-size: 11px; }

/* standards view */
.stdview { display: flex; flex-direction: column; gap: 14px; }
.stdview .picker-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stdview select { padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; }
.cov-table { width: 100%; border-collapse: collapse; max-width: 1100px; }
.cov-table th { text-align: left; font-size: 11px; text-transform: uppercase;
  letter-spacing: .8px; color: var(--muted); border-bottom: 2px solid var(--navy);
  padding: 5px; }
.cov-table td { border-bottom: 1px solid var(--line-soft); padding: 5px;
  font-size: 12.5px; vertical-align: top; }
.cov-table .code { font-weight: 700; white-space: nowrap; }
.cov-table tr.untouched td { background: #FBF3F3; }
.cov-table tr.head-row td { background: var(--bg-soft); font-weight: 700;
  font-family: var(--serif); font-size: 15px; }
.risk-pill { background: var(--red); color: #fff; border-radius: 10px;
  font-size: 10px; padding: 1px 8px; font-weight: 700; }
.ok-pill { background: var(--green); color: #fff; border-radius: 10px;
  font-size: 10px; padding: 1px 8px; font-weight: 700; }
.xwalk { display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 1.5px solid var(--navy); border-radius: 8px; overflow: hidden;
  max-width: 1200px; }
.xwalk .col { padding: 10px 14px; }
.xwalk .col + .col { border-left: 1px solid var(--line); }
.xwalk h3 { font-family: var(--serif); margin: 0 0 6px; font-size: 18px;
  border-bottom: 2px solid var(--red); padding-bottom: 3px; }
.xwalk .node { font-size: 12.5px; padding: 3px 4px 3px 8px; border-left: 3px solid var(--line); margin: 2px 0; }
.xwalk .node.strand { font-weight: 700; border-left-color: var(--navy);
  margin-top: 8px; background: var(--bg-soft); }
.xwalk .node.covered { border-left-color: var(--green); }
.xwalk .node .n { color: var(--green); font-weight: 700; font-size: 11px; }
.xwalk .node.uncovered-std { border-left-color: var(--red); }

/* ---------------------------------------------------------------- notes */
#notes-panel { width: 270px; border-left: 1.5px solid var(--navy);
  padding: 10px 12px 40px; background: var(--bg-soft); min-height: 70vh; }
.notes-head { display: flex; justify-content: space-between;
  align-items: center; border-bottom: 2px solid var(--red);
  padding-bottom: 6px; margin-bottom: 4px; }
#notes-close { border: 1.5px solid var(--navy); background: #fff;
  color: var(--navy); border-radius: 6px; font-weight: 700;
  padding: 6px 12px; font-size: 13px; }
#notes-panel h3 { font-family: var(--serif); margin: 8px 0 6px;
  display: flex; justify-content: space-between; align-items: center; }
.note-card { background: #fff; border: 1px solid var(--line);
  border-left: 5px solid var(--red); border-radius: 6px; padding: 6px 8px;
  font-size: 12.5px; margin-bottom: 6px; }
.note-card .nd { font-size: 10.5px; color: var(--muted); }
.note-card .del { float: right; border: none; background: none; color: var(--muted); }
.todo-row { display: flex; gap: 6px; align-items: baseline; font-size: 13px;
  padding: 3px 0; }
.todo-row.done label { text-decoration: line-through; color: var(--muted); }
.todo-row .nd { font-size: 10.5px; color: var(--muted); }
.mini { font-size: 11px; border: 1px solid var(--line); background: #fff;
  border-radius: 5px; padding: 2px 8px; color: var(--navy); }

/* ---------------------------------------------------------------- editor */
.overlay {
  position: fixed; inset: 0; z-index: 80; background: rgba(18,38,75,.45);
  display: flex; justify-content: flex-end;
}
#editor {
  width: min(720px, 96vw); background: #fff; height: 100%;
  overflow-y: auto; padding: 14px 20px 60px;
  box-shadow: -6px 0 30px rgba(0,0,0,.25);
}
.ed-head { display: flex; justify-content: space-between; align-items: center;
  gap: 8px; flex-wrap: wrap; }
.ed-headline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chip { font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 12px;
  color: #fff; background: var(--navy); }
.chip-lock { background: var(--amber); }
#ed-date { font-family: var(--serif); font-size: 16px; font-weight: 600; }
.savestate { font-size: 11px; color: var(--green); }
.savestate.dirty { color: var(--amber); }
.savestate.error { color: var(--red); font-weight: 700; }
.ed-nav { display: flex; gap: 4px; }
#ed-title {
  width: 100%; font-family: var(--serif); font-size: 24px; font-weight: 700;
  border: none; border-bottom: 2.5px solid var(--red); padding: 6px 2px;
  margin: 8px 0; color: var(--navy); outline: none; background: none;
}
.ed-meta { display: flex; gap: 14px; align-items: center; font-size: 12.5px;
  flex-wrap: wrap; }
.ed-meta select { margin-left: 4px; padding: 3px 6px; border: 1px solid var(--line);
  border-radius: 5px; }
.ed-meta button { border: 1px solid var(--line); background: #fff;
  border-radius: 6px; padding: 5px 10px; font-size: 13px; color: var(--navy); }

.ed-section { margin-top: 14px; }
.ed-sec-head { display: flex; align-items: center; gap: 8px; }
.ed-sec-head h4 { margin: 0; font-size: 11px; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--red); }
.ed-sec-head .priv { font-size: 9.5px; color: var(--muted); border: 1px solid var(--line);
  padding: 0 6px; border-radius: 8px; }
.rt-toolbar { display: flex; gap: 2px; margin: 3px 0; opacity: 0; transition: opacity .15s; }
.ed-section:focus-within .rt-toolbar { opacity: 1; }
.rt-toolbar button {
  border: 1px solid var(--line); background: #fff; border-radius: 4px;
  min-width: 26px; height: 24px; font-size: 12px; color: var(--navy);
}
.rt-toolbar button:hover { border-color: var(--navy); }
.rt-editor {
  border: 1px solid var(--line); border-radius: 6px; min-height: 64px;
  padding: 8px 10px; font-size: 14px; line-height: 1.5; outline: none;
  background: #fff;
}
.rt-editor:focus { border-color: var(--navy); box-shadow: 0 0 0 2px rgba(18,38,75,.12); }
.rt-editor:empty::before { content: attr(data-placeholder); color: #9AA5B5; }
.rt-editor ul, .rt-editor ol { margin: 4px 0; padding-left: 22px; }

.ed-block { margin-top: 16px; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 12px; }
.ed-block summary { font-weight: 700; font-size: 13.5px; cursor: pointer;
  color: var(--navy); }
.pill { background: var(--navy); color: #fff; font-size: 10px; padding: 1px 7px;
  border-radius: 10px; margin-left: 4px; }
.std-tabs { display: flex; gap: 4px; margin: 8px 0 4px; }
.std-tabs button { border: 1px solid var(--line); background: #fff;
  padding: 4px 12px; border-radius: 14px; font-size: 12px; color: var(--navy); }
.std-tabs button.active { background: var(--navy); color: #fff; border-color: var(--navy); }
#std-search { width: 100%; padding: 6px 8px; border: 1px solid var(--line);
  border-radius: 6px; margin: 4px 0; font-size: 13px; }
.std-tree { max-height: 300px; overflow-y: auto; font-size: 12.5px; }
.std-node { padding: 2px 4px; border-radius: 4px; display: flex; gap: 6px;
  align-items: baseline; }
.std-node:hover { background: var(--bg-soft); }
.std-node .code { font-weight: 700; white-space: nowrap; }
.std-node.parent { font-weight: 700; color: var(--navy); margin-top: 5px; }
.std-node button { border: 1px solid var(--line); background: #fff;
  border-radius: 4px; font-size: 11px; min-width: 24px; }
.std-node.tagged { background: #EFF6F0; }
.std-node.tagged button { background: var(--green); color: #fff; border-color: var(--green); }
.tagrow { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.tag {
  border: 1px solid var(--navy); color: var(--navy); border-radius: 12px;
  font-size: 11px; padding: 2px 8px; display: inline-flex; gap: 4px;
  align-items: center;
}
.tag.pg { border-color: var(--red); color: var(--red); }
.tag button { border: none; background: none; color: inherit; padding: 0;
  font-size: 12px; }
.attach-row { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap;
  align-items: center; }
.attach-row input[type=text], .attach-row input:not([type]) {
  flex: 1; min-width: 160px; padding: 5px 8px; border: 1px solid var(--line);
  border-radius: 6px; }
.att-item { display: flex; gap: 8px; font-size: 13px; padding: 3px 0;
  align-items: baseline; }
.att-item a { color: var(--navy); }
.comment { border-left: 3px solid var(--line); padding: 4px 8px; margin: 4px 0;
  font-size: 13px; }
.comment .who { font-weight: 700; font-size: 11.5px; }
.comment .when { color: var(--muted); font-size: 10.5px; }
.privacy-note { font-size: 11px; color: var(--muted); margin-top: 18px; }

/* ---------------------------------------------------------------- modals */
.modal-back {
  position: fixed; inset: 0; z-index: 90; background: rgba(18,38,75,.45);
  display: flex; align-items: flex-start; justify-content: center;
  overflow-y: auto; padding: 4vh 12px;
}
.modal {
  background: #fff; border-radius: 10px; border-top: 5px solid var(--red);
  width: min(640px, 96vw); padding: 18px 22px 22px;
  box-shadow: 0 12px 48px rgba(0,0,0,.3); margin-bottom: 8vh;
  position: relative;
}
.modal-x {
  position: absolute; top: 10px; right: 10px; z-index: 5;
  border: 1.5px solid var(--line); background: #fff; color: var(--navy);
  border-radius: 8px; font-weight: 700; font-size: 15px;
  width: 36px; height: 36px; line-height: 1;
}
.modal-x:hover { border-color: var(--red); color: var(--red); }
.modal h2 { padding-right: 40px; }
.modal.wide { width: min(980px, 97vw); }
.modal h2 { font-family: var(--serif); margin: 0 0 4px; font-size: 24px; }
.modal h3 { font-family: var(--serif); font-size: 17px; margin: 14px 0 4px; }
.modal .sub { color: var(--muted); font-size: 12.5px; margin: 0 0 12px; }
.modal label { display: block; font-size: 12.5px; font-weight: 600; margin: 10px 0 3px; }
.modal input[type=text], .modal input[type=date], .modal input[type=password],
.modal input[type=number], .modal select, .modal textarea {
  width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px;
  font-family: var(--sans); font-size: 13.5px; color: var(--ink); background: #fff;
}
.modal textarea { min-height: 70px; resize: vertical; }
.modal .row { display: flex; gap: 10px; }
.modal .row > * { flex: 1; }
.modal .btnrow { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.btn {
  background: var(--navy); color: #fff; border: none; border-radius: 6px;
  padding: 8px 18px; font-size: 14px; font-weight: 600;
}
.btn:hover { background: #1B3564; }
.btn.red { background: var(--red); }
.btn.plain { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.btn:disabled { opacity: .5; cursor: default; }
.checkline { display: flex; gap: 8px; align-items: center; font-size: 13px;
  margin: 4px 0; font-weight: 400; }
.checkline input { width: auto; }
.error-text { color: var(--red); font-size: 13px; font-weight: 600; min-height: 18px; }
.help { font-size: 11.5px; color: var(--muted); }

.subject-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px;
  border: 1px solid rgba(18,38,75,.3); margin-right: 5px; vertical-align: -1px; }
.class-row { display: flex; gap: 8px; align-items: center; padding: 6px 8px;
  border: 1px solid var(--line); border-radius: 6px; margin: 4px 0;
  border-left-width: 6px; }
.class-row .nm { font-weight: 700; flex: 1; }
.class-row .meta { color: var(--muted); font-size: 11.5px; }
.wizard-class { display: flex; align-items: center; gap: 8px; padding: 4px 6px;
  font-size: 13px; }
.wizard-class input[type=text] { flex: 1; }

.share-url { font-family: monospace; font-size: 12px; background: var(--bg-soft);
  padding: 6px 8px; border-radius: 6px; word-break: break-all; user-select: all; }

table.plain-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.plain-table th { text-align: left; border-bottom: 2px solid var(--navy);
  padding: 4px 6px; font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .8px; color: var(--muted); }
table.plain-table td { border-bottom: 1px solid var(--line-soft); padding: 5px 6px; }

/* toasts */
#toast-root { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--navy); color: #fff; border-radius: 8px; padding: 10px 16px;
  font-size: 13.5px; display: flex; gap: 12px; align-items: center;
  box-shadow: 0 6px 24px rgba(0,0,0,.3); max-width: 90vw;
}
.toast.err { background: var(--red); }
.toast button {
  background: #fff; color: var(--navy); border: none; border-radius: 5px;
  font-weight: 700; padding: 4px 12px; font-size: 12.5px;
}

/* drag ghost preview */
.shift-ghost { position: fixed; pointer-events: none; z-index: 200;
  background: #fff; border: 1.5px solid var(--navy); border-radius: 6px;
  padding: 4px 10px; font-size: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }

/* empty state */
.empty-state { max-width: 560px; margin: 8vh auto; text-align: center; }
.empty-state h2 { font-family: var(--serif); font-size: 30px; margin-bottom: 4px; }
.empty-state .steps { text-align: left; margin: 20px auto; display: inline-block; }
.empty-state .steps li { margin: 8px 0; font-size: 15px; }

/* focus visibility (WCAG) */
button:focus-visible, input:focus-visible, select:focus-visible,
[contenteditable]:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2.5px solid var(--red); outline-offset: 1px;
}

/* ---------------------------------------------------------------- print */
@media print {
  #topbar, #notes-panel, .overlay, #toast-root, .modal-back, .cell-add { display: none !important; }
  #planner { padding: 0; }
  body { font-size: 11px; }
  .grid { border-color: #000; }
  .lesson-card { break-inside: avoid; }
}

@media (max-width: 900px) {
  .brandline { gap: 6px; }
  .app-name { display: none; }
  #view-tabs { margin-left: 4px; }
  .vtab { padding: 5px 8px; font-size: 12.5px; }
  #notes-panel { position: fixed; right: 0; top: 90px; bottom: 0; z-index: 50;
    overflow-y: auto; box-shadow: -6px 0 20px rgba(0,0,0,.2); }
}

/* ------------------------------------------------ phones & small tablets
   The header collapses to the lockup + one hamburger that wears the name of
   the current view (a bare ☰ would hide the one thing the tab strip always
   told you: where you are). The panel is absolute, so opening it never
   changes the header's height. */
#btn-mobile { display: none; }
@media (max-width: 700px) {
  #view-tabs, #btn-notes, #btn-print, #btn-share,
  .brandline > .menu-wrap:not(#mobile-wrap) { display: none; }
  #btn-mobile {
    display: block; background: #fff; border: 1.5px solid var(--navy);
    border-radius: 8px; color: var(--navy); font-weight: 700;
    padding: 7px 12px; font-size: 14px;
  }
  body.offline #btn-mobile { border-color: var(--red); color: var(--red); }
  body.offline #btn-mobile::after { content: " ●"; }
  .brandline { flex-wrap: nowrap; padding: 8px 10px 6px; }
  .lockup-main { font-size: 17px; }
  .lockup-top { font-size: 7px; letter-spacing: 1.6px; }
  #mobile-menu { min-width: 240px; max-height: 75vh; overflow-y: auto; }
  #mobile-menu .mm-views { display: flex; gap: 4px; padding: 4px;
    border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
  #mobile-menu .mm-views button { flex: 1; text-align: center;
    border: 1px solid var(--line); border-radius: 6px; padding: 8px 2px;
    font-size: 12px; }
  #mobile-menu .mm-views button.active { background: var(--navy); color: #fff; }

  .navline { padding: 5px 8px; gap: 6px; }
  #range-label { font-size: 15px; width: 100%; order: 10; }
  #class-toggles { display: none; }
  .density { display: none; }

  /* the week grid scrolls sideways rather than crushing five days */
  .grid { overflow-x: auto; }
  .grid-table { min-width: 660px; }
  #planner { padding: 8px 8px 60px; }
  #editor { width: 100vw; padding: 12px 12px 60px; }
  #notes-panel { width: 86vw; top: 0; }
  .modal { padding: 14px 14px 18px; }
  .cell-add { color: var(--line); }   /* touch: no hover to reveal it */

  /* touch targets: fingers, not cursors */
  .dropdown button, .dropdown a { padding: 13px 12px; font-size: 15px; }
  .menu-group { padding-top: 10px; }
  .mini { min-height: 34px; padding: 6px 12px; font-size: 13px; }
  .btn { min-height: 44px; }
  .navline button, .navline select, .navline input[type=date] {
    min-height: 40px; }
  .vtab { padding: 10px 8px; }
  .rt-toolbar { opacity: 1; }          /* no hover on touch — keep it visible */
  .rt-toolbar button { min-width: 34px; height: 34px; font-size: 14px; }
  .ed-meta select, .ed-meta input { min-height: 38px; }
  .std-node button { min-width: 32px; min-height: 30px; }
  .lesson-card { min-height: 64px; }
  .toast { font-size: 15px; padding: 13px 18px; }
  .toast button { padding: 8px 14px; min-height: 36px; }
  input[type=checkbox] { width: 18px; height: 18px; }
}

/* reminders strip */
.reminder-strip {
  border: 1.5px solid var(--line); border-left: 5px solid #A05E03;
  border-radius: 8px; padding: 7px 12px; margin-bottom: 8px; font-size: 12.5px;
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
}
.rem-chip {
  border: 1px solid var(--line); border-left-width: 5px; background: #fff;
  border-radius: 6px; padding: 3px 8px; font-size: 12px; color: var(--navy);
}
.rem-chip span { color: var(--muted); }
.rem-chip:hover { border-color: var(--navy); }

/* dual alignment — the visual cue that a TN standard is being met by
   lessons that also carry Hillsdale alignment */
.dual-mark {
  color: var(--green); font-weight: 700; font-size: 10px;
  border: 1px solid var(--green); border-radius: 8px; padding: 0 5px;
  white-space: nowrap;
}
.tag.dual { border-color: var(--green); color: var(--green); background: #EFF6F0; }
.cov-table tr.dualrow td { background: #F0F7F1; }
.xwalk .node.dual { border-left-color: var(--green); background: #F0F7F1; }

/* share button gets loud when colleagues are waiting on a request */
#btn-share.attn { border-color: var(--red); color: var(--red); font-weight: 700; }

/* support-service chips — the notification that ELL/SPED/Intervention (or
   tutoring) runs during this block */
.sup-row { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px;
  flex: 0 0 auto; }
.sup-chip {
  border: 1px solid var(--line); border-left-width: 5px; background: #fff;
  border-radius: 5px; font-size: 10px; font-weight: 700; color: var(--navy);
  padding: 1px 6px; cursor: pointer; white-space: nowrap;
}
.sup-chip:hover { border-color: var(--navy); }
.ed-support {
  border: 1.5px solid #2E6E8E; border-radius: 8px; background: #EFF5F8;
  padding: 8px 12px; margin-top: 12px; font-size: 12.5px;
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
}
@media (max-width: 700px) {
  .sup-chip { font-size: 11px; padding: 4px 8px; min-height: 26px; }
}

/* quick-insert dropdowns on lesson sections */
.qi-select {
  margin-left: auto; max-width: 300px; font-size: 11.5px; color: var(--navy);
  border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px;
  background: var(--bg-soft); font-family: var(--sans);
}
.qi-select:hover { border-color: var(--navy); }
@media (max-width: 700px) {
  .qi-select { max-width: 100%; width: 100%; margin: 4px 0 0; min-height: 36px;
    font-size: 13px; }
  .ed-sec-head { flex-wrap: wrap; }
}

/* 9-weeks (grading period) view */
.quarter-grid .qcell { min-height: 72px; font-size: 10px; }
.quarter-grid .mdate { font-size: 10px; color: var(--muted); }
.quarter-grid .mrow { font-size: 9.5px; margin-top: 1px; }
.mrow-more { font-size: 9px; color: var(--muted); margin-top: 1px; }
@media (max-width: 700px) {
  .quarter-grid { min-width: 700px; }
  #planner:has(.quarter-grid) { overflow-x: auto; }
}

/* the whose-calendar picker (admins: everyone; teachers: shared with them) */
#teacher-picker { max-width: 240px; font-weight: 600; }
body:has(#readonly-badge:not([hidden])) #teacher-picker {
  border-color: var(--red); color: var(--red);
}

/* quick view switcher beside Today (all screens; the tab strip stays on
   desktop, the hamburger stays on mobile — this is the fastest path) */
#view-quick { font-weight: 600; }
.day-empty { background: var(--bg-soft); border-style: dashed; }
.day-empty h3 { color: var(--muted); font-size: 15px; }


/* crosswalk alignment: soft green on both sides; tap to see partners */
.xwalk .node.aligned { background: #EAF5EC; border-left-color: var(--green); cursor: pointer; }
.xwalk .node.aligned:hover { background: #DDEEE1; }
.xwalk .node.aligned-focus { outline: 2px solid var(--green); background: #D3EAD9; }
.xwalk .node.aligned-hit { background: #C9E7D0; border-left-color: var(--green);
  outline: 1.5px dashed var(--green); }
.aligned-key { background: #EAF5EC; border: 1px solid var(--green);
  border-radius: 4px; padding: 0 5px; color: var(--green); font-weight: 600; }


/* Hillsdale unit context: sequence position, weeks, and topics */
.pg-ctx {
  display: block; font-size: 10.5px; color: var(--muted);
  line-height: 1.35; margin-top: 1px; font-weight: 400;
}
