/* Class Planner UI prototype styles (throwaway).
   Every selector is scoped under #proto-root so production is untouched. */

#proto-root { padding: 4px 0 90px; }

#proto-root .p-title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 22px; letter-spacing: -0.01em; margin: 4px 0 4px;
}
#proto-root .p-sub { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
#proto-root .p-h3 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 15px; margin: 22px 0 10px;
}
#proto-root .p-empty {
  border: 1px dashed var(--hairline); border-radius: var(--radius);
  padding: 22px; text-align: center; color: var(--muted); margin: 10px 0;
}
#proto-root .p-readonly {
  display: inline-block; font-size: 12px; color: var(--muted);
  border: 1px dashed var(--hairline); border-radius: 999px; padding: 4px 12px;
  margin: 0 0 16px;
}
#proto-root .pchip {
  display: inline-flex; align-items: center;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 12px; font-weight: 600; border-radius: 999px;
  padding: 3px 10px; color: #fff; white-space: nowrap;
}
#proto-root .pkind {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--hairline);
  border-radius: 6px; padding: 2px 7px; white-space: nowrap;
}
#proto-root .pby { font-size: 12px; color: var(--faint); }
#proto-root .pcount {
  font-size: 12px; font-weight: 700; color: var(--muted);
  background: #f1efe9; border-radius: 999px; padding: 2px 9px; white-space: nowrap;
}
#proto-root .pfree { color: var(--faint); }
#proto-root .pext { color: var(--accent-deep); font-weight: 600; font-size: 13px; }
#proto-root .psnip { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
#proto-root .pswatch {
  flex: 0 0 14px; width: 14px; height: 14px; border-radius: 4px; display: inline-block;
}

/* days-left badges */
#proto-root .pdays {
  flex: 0 0 auto; text-align: center; border-radius: 8px; padding: 5px 8px;
  font-family: "Space Grotesk", system-ui, sans-serif;
  background: #f1efe9; color: var(--muted);
  display: inline-flex; flex-direction: column; line-height: 1.2;
}
#proto-root .pdays b { font-size: 18px; font-weight: 700; }
#proto-root .pdays i { font-style: normal; font-size: 10px; font-weight: 600; }
#proto-root .pdays.overdue { background: var(--danger-wash); color: var(--danger); }
#proto-root .pdays.today { background: var(--warn-wash); color: var(--warn); }
#proto-root .pdays.tomorrow { background: var(--amber-wash); color: var(--amber); }

/* shared task rows */
#proto-root .ptask {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 10px 12px; margin-bottom: 8px;
}
#proto-root .ptask-main { flex: 1; min-width: 0; }
#proto-root .ptask-title { font-weight: 600; font-size: 15px; margin: 0 0 2px; }
#proto-root .ptask-detail { color: var(--muted); font-size: 13px; margin: 3px 0 0; }
#proto-root .ptask-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
#proto-root .pcompact { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--hairline); }
#proto-root .pcompact:last-child { border-bottom: none; }

/* week v1 grid */
#proto-root .pwk-grid {
  display: grid; grid-template-columns: 44px repeat(7, 1fr);
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: var(--radius); overflow: hidden;
}
#proto-root .pwk-corner { background: #f4f2ed; border-bottom: 1px solid var(--hairline); }
#proto-root .pwk-dayhead {
  background: #f4f2ed; border-bottom: 1px solid var(--hairline);
  border-left: 1px solid var(--hairline); padding: 8px 4px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
#proto-root .pwk-dayhead .dow { font-family: "Space Grotesk", system-ui, sans-serif; font-size: 12px; font-weight: 600; color: var(--muted); }
#proto-root .pwk-dayhead .dnum {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 17px; font-weight: 700; width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
}
#proto-root .pwk-dayhead.today .dnum { background: var(--ink); color: #fff; }
#proto-root .pwk-dayhead.we { opacity: .5; }
#proto-root .pwk-plabel {
  font-family: "Space Grotesk", system-ui, sans-serif; font-weight: 700; font-size: 13px; color: var(--muted);
  background: #f4f2ed; border-top: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: center; min-height: 58px;
}
#proto-root .pwk-cell {
  border-top: 1px solid var(--hairline); border-left: 1px solid var(--hairline);
  min-height: 58px; padding: 4px; display: flex; align-items: stretch;
}
#proto-root .pwk-cell.we { color: var(--faint); font-size: 13px; align-items: center; justify-content: center; background: #faf9f6; }
#proto-root .pwk-cell.free { color: var(--faint); font-size: 13px; align-items: center; justify-content: center; }
#proto-root .psubj {
  position: relative; flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; border-radius: 7px; color: #fff;
  font-family: "Space Grotesk", system-ui, sans-serif; font-weight: 600; font-size: 14px;
  padding: 6px 4px; line-height: 1.2; text-align: center;
}
#proto-root .psubj small { font-weight: 500; font-size: 10px; opacity: .85; }
#proto-root .pbadge {
  position: absolute; top: -7px; right: -7px;
  font-style: normal; font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 11px; font-weight: 700; background: var(--ink); color: #fff;
  border-radius: 999px; min-width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
}
#proto-root .p-duestrip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
#proto-root .pdue {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: 999px; padding: 5px 12px 5px 6px; font-size: 13px;
}
#proto-root .pdue b { font-weight: 600; }

/* week v2 rails */
#proto-root .prail { margin-bottom: 16px; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 12px 14px; }
#proto-root .prail.today { border-color: var(--ink); border-width: 2px; }
#proto-root .prail header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
#proto-root .prail .dow { font-family: "Space Grotesk", system-ui, sans-serif; font-weight: 700; font-size: 16px; }
#proto-root .prail .dnum { font-family: "Space Grotesk", system-ui, sans-serif; color: var(--muted); font-size: 14px; }
#proto-root .rail { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
#proto-root .prailtile {
  flex: 0 0 auto; color: #fff; border-radius: 8px; padding: 8px 12px;
  font-family: "Space Grotesk", system-ui, sans-serif; font-size: 13px; font-weight: 600; white-space: nowrap;
}
#proto-root .prailtile.free { background: #f1efe9; color: var(--faint); }
#proto-root .praildue { list-style: none; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px solid var(--hairline); }
#proto-root .praildue li { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; font-size: 14px; }

/* week v3 now line */
#proto-root .pnow { list-style: none; margin: 0; padding: 0 0 0 6px; border-left: 2px solid var(--hairline); }
#proto-root .pnow-day { margin: 16px 0 6px -8px; }
#proto-root .pnow-day span {
  font-family: "Space Grotesk", system-ui, sans-serif; font-size: 13px; font-weight: 700;
  background: var(--ink); color: #fff; border-radius: 999px; padding: 3px 12px;
}
#proto-root .pnow-ev { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 4px -19px; }
#proto-root .pnow-ev::before {
  content: ""; flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--accent); margin: 6px 0 0 1px;
}
#proto-root .pnow-ev.due::before { border-color: var(--warn); }
#proto-root .pnow-ev.past { opacity: .45; }
#proto-root .pnow-t {
  flex: 0 0 92px; font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 12px; font-weight: 600; color: var(--muted); padding-top: 4px;
}
#proto-root .pnow-body {
  flex: 1; background: var(--card); border: 1px solid var(--hairline);
  border-left-width: 4px; border-radius: 8px; padding: 8px 12px; font-size: 14px;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
#proto-root .pnow-body.free { color: var(--faint); border-left-color: var(--hairline); }

/* agenda */
#proto-root .plist { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 6px 14px; }
#proto-root .plist-row { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--hairline); font-size: 14px; }
#proto-root .plist-row:last-child { border-bottom: none; }
#proto-root .ppanes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
#proto-root .ppane { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 14px 16px; }
#proto-root .ppane .p-h3 { margin-top: 0; }
#proto-root .pperiod { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--hairline); font-size: 14px; }
#proto-root .pperiod:last-child { border-bottom: none; }
#proto-root .pbrief { background: var(--card); border: 1px solid var(--hairline); border-radius: 14px; padding: 22px 24px; }
#proto-root .pbrief-kicker { font-family: "Space Grotesk", system-ui, sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-deep); margin: 0 0 4px; }
#proto-root .pbrief-day { font-family: "Space Grotesk", system-ui, sans-serif; font-size: 24px; letter-spacing: -0.01em; margin: 0 0 14px; }
#proto-root .pbrief-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
#proto-root .pbrief-stats > div { background: #f7f5f1; border-radius: 10px; padding: 10px; text-align: center; }
#proto-root .pbrief-stats b { display: block; font-family: "Space Grotesk", system-ui, sans-serif; font-size: 24px; }
#proto-root .pbrief-stats span { font-size: 12px; color: var(--muted); }
#proto-root .pbrief-stats .bad b { color: var(--danger); }
#proto-root .pbrief-h { font-family: "Space Grotesk", system-ui, sans-serif; font-size: 14px; margin: 14px 0 8px; }
#proto-root .pbrief-top { margin: 0; padding: 0; list-style: none; }
#proto-root .pbrief-top li { display: flex; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--hairline); font-size: 14px; }
#proto-root .pbrief-top li:last-child { border-bottom: none; }
#proto-root .pbrief-top .rank {
  font-family: "Space Grotesk", system-ui, sans-serif; font-weight: 700;
  background: var(--ink); color: #fff; border-radius: 50%;
  width: 24px; height: 24px; flex: 0 0 24px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px;
}
#proto-root .pbrief-sched { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }

/* upcoming */
#proto-root .pladder { list-style: none; margin: 0; padding: 0; }
#proto-root .pladder-row {
  display: flex; gap: 12px; align-items: stretch;
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 10px 14px 10px 6px; margin-bottom: 8px;
}
#proto-root .pladder-row .rank {
  flex: 0 0 34px; align-self: center; text-align: center;
  font-family: "Space Grotesk", system-ui, sans-serif; font-weight: 700; font-size: 16px; color: var(--faint);
}
#proto-root .pladder-bar { flex: 0 0 4px; border-radius: 2px; }
#proto-root .plane { margin-bottom: 18px; }
#proto-root .plane header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
#proto-root .lane-cards { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
#proto-root .planecard {
  flex: 0 0 230px; background: var(--card); border: 1px solid var(--hairline);
  border-top: 4px solid var(--muted); border-radius: 10px; padding: 10px 12px;
}
#proto-root .planecard p { margin: 6px 0 2px; font-size: 14px; }

/* calendar */
#proto-root .pcal-month { font-family: "Space Grotesk", system-ui, sans-serif; font-size: 18px; margin: 0 0 10px; }
#proto-root .pcal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
#proto-root .pcal-dow { font-family: "Space Grotesk", system-ui, sans-serif; font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; padding: 4px; }
#proto-root .pcal-day {
  min-height: 74px; background: var(--card); border: 1px solid var(--hairline);
  border-radius: 8px; padding: 6px; font-size: 13px;
}
#proto-root .pcal-day.other { opacity: .35; }
#proto-root .pcal-day .dnum { font-family: "Space Grotesk", system-ui, sans-serif; font-weight: 700; }
#proto-root .pcal-day.today { border-color: var(--ink); border-width: 2px; }
#proto-root .pcal-dots { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 5px; }
#proto-root .pdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
#proto-root .pcal-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-bottom: 18px; }
#proto-root .pcal-tick { height: 26px; border-radius: 5px; background: #f1efe9; }
#proto-root .pcal-tick.busy { background: var(--accent); }
#proto-root .pcal-tick.today { outline: 2px solid var(--ink); outline-offset: 1px; }
#proto-root .pcal-tick.other { opacity: .35; }
#proto-root .pagenda-day { margin-bottom: 14px; }
#proto-root .pagenda-day h4 { font-family: "Space Grotesk", system-ui, sans-serif; font-size: 14px; margin: 0 0 6px; display: flex; gap: 8px; align-items: center; }

/* inbox */
#proto-root .pinbox-cards { display: grid; gap: 10px; }
#proto-root .pinbox-card { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 12px 14px; }
#proto-root .pinbox-card p { margin: 0 0 8px; font-size: 15px; }
#proto-root .pinbox-dest { margin-top: 10px; display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
#proto-root .pinbox-dest button:disabled { opacity: .5; cursor: not-allowed; }
#proto-root .ptable { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; font-size: 14px; }
#proto-root .ptable th, #proto-root .ptable td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
#proto-root .ptable thead th { background: #f4f2ed; font-family: "Space Grotesk", system-ui, sans-serif; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
#proto-root .ptable tbody tr:last-child td { border-bottom: none; }
#proto-root .pinert { color: var(--faint); font-size: 13px; white-space: nowrap; }

/* library */
#proto-root .pshelf { margin-bottom: 20px; }
#proto-root .pshelf header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  border-bottom: 3px solid var(--muted); padding-bottom: 6px;
}
#proto-root .pshelf-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 2px; border-bottom: 1px solid var(--hairline); font-size: 14px; }
#proto-root .pshelf-row:last-child { border-bottom: none; }
#proto-root .pgallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
#proto-root .pgal-col .p-h3 { margin-top: 0; text-transform: capitalize; }
#proto-root .pgal-tile { background: var(--card); border: 1px solid var(--hairline); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; font-size: 14px; }
#proto-root .pgal-tile-head { margin-bottom: 6px; }

/* marks */
#proto-root .pscore { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
#proto-root .pscore header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
#proto-root .pavg { margin-left: auto; font-family: "Space Grotesk", system-ui, sans-serif; font-weight: 700; font-size: 18px; }
#proto-root .pbar { height: 8px; background: #f1efe9; border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
#proto-root .pbar span { display: block; height: 100%; border-radius: 4px; }
#proto-root .pmark {
  display: inline-flex; flex-direction: column; text-align: center;
  border-radius: 8px; padding: 5px 10px; line-height: 1.2;
  font-family: "Space Grotesk", system-ui, sans-serif;
  background: #f1efe9; color: var(--muted);
}
#proto-root .pmark b { font-size: 16px; }
#proto-root .pmark i { font-style: normal; font-size: 10px; font-weight: 600; }
#proto-root .pmark.hi { background: #e7f4ea; color: var(--ok); }
#proto-root .pmark.mid { background: var(--amber-wash); color: var(--amber); }
#proto-root .pmark.low { background: var(--danger-wash); color: var(--danger); }
#proto-root .ptimeline { list-style: none; margin: 0; padding: 0; }
#proto-root .ptl-row { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; }
#proto-root .ptl-date { flex: 0 0 96px; font-size: 12px; color: var(--muted); padding-top: 8px; }
#proto-root .pdelta { font-size: 12px; font-weight: 700; color: var(--muted); margin-left: 6px; }
#proto-root .pdelta.up { color: var(--ok); }
#proto-root .pdelta.down { color: var(--danger); }

/* timetable editor */
#proto-root .ptt-grid {
  display: grid; grid-template-columns: 44px repeat(5, 1fr);
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: var(--radius); overflow: hidden;
}
#proto-root .ptt-corner { background: #f4f2ed; border-bottom: 1px solid var(--hairline); }
#proto-root .ptt-dayhead {
  background: #f4f2ed; border-bottom: 1px solid var(--hairline);
  border-left: 1px solid var(--hairline); padding: 10px 6px; text-align: center;
  font-family: "Space Grotesk", system-ui, sans-serif; font-size: 14px; font-weight: 600;
}
#proto-root .ptt-dayhead .day-sub { display: block; font-family: system-ui, sans-serif; font-weight: 400; font-size: 11px; color: var(--muted); margin-top: 4px; }
#proto-root .ptt-dayhead .day-sub button, #proto-root .ptt-daybar button { font-size: 11px; padding: 2px 8px; margin: 0 2px; }
#proto-root .ptt-dayhead .day-sub button.on, #proto-root .ptt-daybar button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
#proto-root .ptt-plabel {
  font-family: "Space Grotesk", system-ui, sans-serif; font-weight: 700; font-size: 13px; color: var(--muted);
  background: #f4f2ed; border-top: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: center; min-height: 58px;
}
#proto-root .ptt-cell {
  border-top: 1px solid var(--hairline); border-left: 1px solid var(--hairline);
  min-height: 58px; padding: 4px; display: flex; align-items: stretch;
}
#proto-root .pedit-hint { display: block; font-size: 9px; font-weight: 500; opacity: .8; font-style: normal; }
#proto-root .ptt-daytabs { display: flex; gap: 6px; margin-bottom: 12px; }
#proto-root .ptt-daybar { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 14px; }
#proto-root .ptt-list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius); }
#proto-root .ptt-row { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--hairline); font-size: 14px; }
#proto-root .ptt-row:last-child { border-bottom: none; }
#proto-root .ptt-p { font-family: "Space Grotesk", system-ui, sans-serif; font-weight: 700; color: var(--muted); flex: 0 0 30px; }
#proto-root .ptt-subj { flex: 1; font-weight: 600; }
#proto-root .ptt-move { display: flex; gap: 4px; }
#proto-root .ptt-move button, #proto-root .ptt-daytabs button, #proto-root .ptt-daybar button { cursor: not-allowed; opacity: .55; }
#proto-root button:disabled { cursor: not-allowed; }

/* disabled prototype controls everywhere */
#proto-root .fchip {
  font-family: "Space Grotesk", system-ui, sans-serif; font-size: 13px; font-weight: 500;
  border: 1px solid var(--hairline); background: var(--card); color: var(--muted);
  border-radius: 999px; padding: 5px 12px;
}
#proto-root .fchip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

@media (max-width: 720px) {
  #proto-root .ppanes { grid-template-columns: 1fr; }
  #proto-root .pbrief-stats { grid-template-columns: repeat(2, 1fr); }
  #proto-root .pcal-day { min-height: 54px; }
  #proto-root .pnow-t { flex-basis: 70px; }
}

/* ============ prototype switcher chrome (obviously not the design) ============ */
#proto-switcher {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 9999; display: flex; align-items: center; gap: 6px;
  background: #111; color: #fff; border-radius: 999px;
  padding: 6px 8px; box-shadow: 0 6px 24px rgba(0,0,0,.35);
  font-family: "Space Grotesk", system-ui, sans-serif;
}
#proto-switcher button {
  background: #2a2a2a; color: #fff; border: none; border-radius: 50%;
  width: 32px; height: 32px; font-size: 16px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
#proto-switcher button:hover { background: #0f766e; }
#proto-switcher .proto-tag {
  font-size: 10px; font-weight: 700; letter-spacing: .1em;
  background: #f59e0b; color: #111; border-radius: 4px; padding: 2px 6px;
}
#proto-switcher .proto-example-tag {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  background: #38bdf8; color: #111; border-radius: 4px; padding: 2px 6px;
  white-space: nowrap;
}
#proto-switcher .proto-label { font-size: 13px; font-weight: 600; padding: 0 10px; white-space: nowrap; }
#proto-switcher .proto-err { font-size: 12px; color: #fca5a5; padding: 0 10px; }
