/* ShuDue — the "Ribbons" look, layered last over styles/theme/next/desk.
   Off-white paper, tall Anton headings, bookmark ribbons instead of icon buttons, the next deadline as a block in
   its course colour with a red time-left tag pointing into it, white strips edge to edge with a bookmark to tick.
   No hard offset shadows: soft ones only, where something sits on top. The previous look is tagged design-campus. */

/* Anton, served with ShuDue's own files (the iPhone app has no Google Fonts), so headings never fall back to thin Archivo */
@font-face { font-family: Anton; font-style: normal; font-weight: 400; font-display: block; src: url('/fonts/anton-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Anton; font-style: normal; font-weight: 400; font-display: block; src: url('/fonts/anton-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --paper: #f7f5f0;
  --surface: #fff;
  --surface-solid: #fff;
  --sunk: #efece6;
  --line: #ebe7df;
  --muted: #77736b;
  --rb-red: #ef3a2f;
  --rb-green: #4c7a26;
  --rb-yellow: #ffcf3a;
  --rb-sh: 0 10px 20px -10px rgba(30, 30, 40, .28);
  --rb-sh-s: 0 4px 10px -6px rgba(30, 30, 40, .3);
  --hard: var(--rb-sh);
  --rb-card: #fff;
  --rb-on-ink: #fff;
  --rb-block: #141414;
  --rb-slot: #fbfaf7;
}
body { background: var(--paper); }
#bg, #status-cap .cap-bg { background-color: var(--paper); }
.rb-anton, body.ui-next .hello h1, .nx-listhead h2, .section-title, .cx-h, section.cx-hello h2 { font-family: Anton, "Archivo", sans-serif; font-weight: 400 !important; font-stretch: 100% !important; }

/* soft shadows instead of hard offset ones, everywhere */
body.ui-next :is(.btn, .chip-btn, .icon-btn, .task, .card, .summary, .week, .cf-next, .cf-panel, .cf-tile, .cf-hero, .back-row, .link-row,
  .request, .banner, .nextclass, .planner-status, .nx-tile, .nx-stats, .cx-gpa, .room-study-btn, .room-card, .fx-modes, .cmx-hero-body,
  .cmx-friends-body, .cmx-file, .cmx-pick, .cx-explore, .cx-add, .fab, .seg, input, select, textarea, .nx-cta) { box-shadow: none; }

/* ---------- header: title, a rule, and three bookmark ribbons hanging on the right ---------- */
body.ui-next:not(.desk) .topbar { position: relative; border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 0; align-items: flex-end; }
body.ui-next .hello small { font-size: 12.5px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }
body.ui-next .hello h1 { font-size: 40px; line-height: 1; text-transform: uppercase; letter-spacing: .005em; }
body.ui-next .topbar .icon-btn {
  align-self: flex-start; width: 34px; height: 62px; margin: -4px 0 0 2px; padding: 0 0 18px; border: 0; border-radius: 3px 3px 0 0;
  background: var(--ink); color: var(--rb-on-ink); display: flex; align-items: flex-end; justify-content: center;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%); box-shadow: none;
}
body.ui-next .topbar .icon-btn svg { width: 17px; height: 17px; }
body.ui-next .topbar .icon-btn[data-action="tt-share"] { background: var(--rb-red); height: 56px; }
body.ui-next .topbar .icon-btn:active { transform: translateY(3px); }
body.ui-next .topbar .count-badge { top: 8px; right: 5px; min-width: 9px; width: 9px; height: 9px; padding: 0; font-size: 0; background: var(--rb-yellow); border: 0; }

/* ---------- Tasks: the course block and the red tag ---------- */
body.ui-next main:has(.nx-cols) { padding-top: 0; }
body.ui-next .rb-hero {
  position: relative; display: block; min-height: 196px; margin: 22px calc(-1 * var(--pad, 16px)) 0; padding: 0; border: 0 !important;
  background: none !important; color: #fff; filter: drop-shadow(0 12px 12px rgba(30, 30, 40, .18)); overflow: visible;
}
body.ui-next .rb-flag {
  position: absolute; inset: 0 26% 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 14px calc(8% + 14px) 62px 14px; border: 0; background: var(--cc, var(--c)); color: var(--on, #fff); text-align: center; cursor: pointer; font: inherit;
}
body.ui-next .rb-code { font-family: Anton, sans-serif; font-size: clamp(32px, 10vw, 44px); line-height: 1; text-transform: uppercase; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.ui-next .rb-what { font-family: Anton, sans-serif; font-size: 21px; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.ui-next .rb-when { margin-top: 5px; padding: 1px 10px 2px; border: 2px solid currentColor; font-family: Anton, sans-serif; font-size: 16px; letter-spacing: .02em; opacity: .95; }
body.ui-next .rb-tagw { position: absolute; top: 0; right: 0; bottom: 0; width: 34%; filter: drop-shadow(-7px 3px 9px rgba(0, 0, 0, .38)); pointer-events: none; }
body.ui-next .rb-tag {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-left: 18px;
  background: var(--rb-red); color: #fff; clip-path: polygon(22% 0, 100% 0, 100% 100%, 22% 100%, 0 50%);
}
body.ui-next .rb-tag b { font-family: Anton, sans-serif; font-weight: 400; font-size: clamp(38px, 13vw, 54px); line-height: 1; text-transform: uppercase; }
body.ui-next .rb-tag small { font-family: Anton, sans-serif; font-size: 18px; text-transform: uppercase; opacity: .9; }
body.ui-next .rb-acts { position: absolute; left: 0; right: 26%; bottom: 14px; display: flex; justify-content: center; gap: 8px; padding-right: 12px; }
body.ui-next .rb-go, body.ui-next .rb-done {
  height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border: 0; border-radius: 18px;
  background: rgba(0, 0, 0, .24); color: #fff; font: 700 13px Archivo, sans-serif; cursor: pointer;
}
body.ui-next .rb-done { width: 36px; padding: 0; justify-content: center; }
body.ui-next .rb-go:active, body.ui-next .rb-done:active { transform: scale(.95); background: rgba(0, 0, 0, .36); }
body.ui-next .nx-hero.is-clear { margin: 22px 0 0; border: 0; background: var(--ink); }

/* the next class: a ribbon band in that course's colour, the course and room on the white middle */
body.ui-next #next-class .nextclass {
  position: relative; isolation: isolate; display: grid; grid-template-columns: 76px minmax(0, 1fr) 86px; grid-template-rows: auto auto;
  align-items: center; min-height: 72px; margin: 22px calc(-1 * var(--pad, 16px)) 0; padding: 0; border: 0; border-radius: 0;
  background: color-mix(in srgb, var(--c, var(--ink)) 82%, #000) !important; color: #fff; box-shadow: var(--rb-sh);
}
body.ui-next #next-class .nextclass::before {
  content: ""; grid-column: 2; grid-row: 1 / 3; align-self: stretch; z-index: -1; background: var(--rb-card);
  clip-path: polygon(0 0, 100% 0, 92% 50%, 100% 100%, 0 100%, 8% 50%);
}
body.ui-next #next-class .nc-text { display: contents; }
body.ui-next #next-class .nc-label { grid-column: 1; grid-row: 1 / 3; padding: 0 8px 0 16px; color: #fff !important; font-size: 12px; font-weight: 700; line-height: 1.15; letter-spacing: 0; text-transform: none; }
body.ui-next #next-class .nc-main { grid-column: 2; grid-row: 1; align-self: end; padding: 0 22px; text-align: center; color: var(--ink) !important; font-size: 13px; line-height: 1.2; }
body.ui-next #next-class .nc-main strong { display: block; font-family: Anton, sans-serif; font-weight: 400; font-size: 21px; line-height: 1.05; }
body.ui-next #next-class .nc-where { grid-column: 2; grid-row: 2; align-self: start; justify-content: center; padding: 1px 22px 0; color: var(--muted) !important; font-size: 11.5px; text-align: center; }
body.ui-next #next-class .nc-after { display: none; }
body.ui-next #next-class .nc-big { grid-column: 3; grid-row: 1 / 3; padding: 0 14px 0 4px; text-align: right; color: #fff !important; font-family: Anton, sans-serif; font-weight: 400; font-size: 20px; line-height: 1.1; }

/* study together / this week: two white cards */
body.ui-next .nx-duo { margin: 16px 0 0; gap: 10px; }
body.ui-next .nx-tile { min-height: 0; padding: 12px 14px; border: 0 !important; border-radius: 16px !important; background: var(--rb-card) !important; color: var(--ink) !important; box-shadow: var(--rb-sh) !important; }
body.ui-next .nx-tile strong { font-family: Anton, sans-serif; font-weight: 400; font-size: 19px; }
body.ui-next .nx-tile small { color: var(--muted) !important; }
body.ui-next .nx-tile svg { color: var(--ink); }
body.ui-next .nx-tile.is-behind { background: var(--rb-card) !important; }
body.ui-next .nx-tile.is-behind small { color: var(--rb-red) !important; }
/* the three numbers repeat the filter chips under them */
body.ui-next .nx-stats { display: none; }

/* ---------- the list: a heading over a rule, white strips edge to edge, a bookmark to tick ---------- */
body.ui-next .nx-listhead { margin: 26px 0 0; padding-bottom: 8px; border-bottom: 2px solid var(--ink); align-items: flex-end; }
body.ui-next .nx-listhead h2 { font-size: 28px; line-height: 1; text-transform: none; letter-spacing: 0; }
body.ui-next .toolbar { margin-top: 12px; }
body.ui-next .section-title { margin: 22px 0 10px; padding: 0; font-size: 21px; letter-spacing: 0; text-transform: none; color: var(--ink); }
body.ui-next .section-title::before { display: none; }
body.ui-next .section-title .count { background: none; color: var(--muted); font: 600 13px Archivo, sans-serif; }
body.ui-next .list { gap: 12px; }
body.ui-next .list .task {
  position: relative; margin: 0 calc(-1 * var(--pad, 16px)); padding: 13px 76px 13px 30px; border: 0 !important; border-radius: 0 !important;
  background: var(--rb-card) !important; box-shadow: var(--rb-sh) !important; grid-template-columns: minmax(0, 1fr) auto;
}
body.ui-next .list .task::before { display: block; left: 0; top: 0; bottom: 0; width: 14px; background: var(--c, var(--ink)); }
body.ui-next .task-top .course { background: none; color: var(--c, var(--ink)); padding: 0; letter-spacing: 0; }
body.ui-next .task-title { font-size: 17px; font-stretch: 85%; font-weight: 800; }
body.ui-next .countdown { font-family: Anton, sans-serif; font-weight: 400; font-stretch: 100%; font-size: 24px; letter-spacing: 0; }
body.ui-next .task.lvl-overdue .countdown { color: var(--rb-red); }
body.ui-next .task .status { display: none; }
body.ui-next .task.lvl-critical .countdown { color: var(--rb-red); }
/* the tick box is a bookmark hanging on the right, tinted with the course colour */
body.ui-next .list .task .check {
  position: absolute; top: -4px; right: 14px; width: 46px; height: 74px; margin: 0; padding: 16px 0 0; border: 0 !important; border-radius: 0;
  display: flex; align-items: flex-start; justify-content: center; color: transparent;
  background: color-mix(in srgb, var(--c, #888) 18%, var(--rb-card)); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 84%, 0 100%);
}
body.ui-next .list .task .check::before {
  content: ""; position: absolute; top: 15px; left: 50%; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%;
  border: 2.5px solid color-mix(in srgb, var(--c, #888) 70%, var(--rb-card)); background: var(--rb-card); box-sizing: border-box;
}
body.ui-next .list .task .check svg { position: relative; z-index: 1; width: 15px; height: 15px; margin-top: 5px; }
body.ui-next .list .task .check:hover, body.ui-next .list .task .check:active { background: var(--rb-green); color: #fff; }
body.ui-next .list .task .check:hover::before, body.ui-next .list .task .check:active::before { border-color: #fff; background: transparent; }
body.ui-next .list .task .task-side { align-self: center; }

/* chips and the sort switch: quiet and round */
body.ui-next .chip-btn { border: 0; border-radius: 99px; background: var(--rb-card); box-shadow: var(--rb-sh-s); font-weight: 700; }
body.ui-next .chip-btn.active { background: var(--ink); color: var(--rb-on-ink); }
body.ui-next .seg { border: 0; border-radius: 10px; background: var(--rb-card); box-shadow: var(--rb-sh-s); overflow: hidden; }
body.ui-next .seg button + button { border-left: 1px solid var(--line); }
body.ui-next .seg button.active { background: var(--ink); color: var(--rb-on-ink); }
body.ui-next :is(input:not([type=checkbox]):not([type=radio]), select, textarea) { border: 1.5px solid var(--line); border-radius: 12px; background-color: var(--rb-card); }
body.ui-next :is(input, select, textarea):focus { border-color: var(--ink); box-shadow: none; }
body.ui-next .btn { border: 2px solid var(--ink); border-radius: 10px; box-shadow: 0 3px 0 var(--ink); }
body.ui-next .btn.primary { background: var(--ink); color: var(--rb-on-ink); }
body.ui-next .btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
body.ui-next .fab { border: 0; border-radius: 99px; background: var(--rb-red); box-shadow: 0 12px 24px -10px rgba(239, 58, 47, .7); }
body.ui-next .banner { border: 0; border-radius: 12px; }

/* ---------- Schedule ---------- */
body.ui-next .sched-head { margin-top: 14px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
body.ui-next .sched-term { height: 48px; font-weight: 800; border: 0; box-shadow: var(--rb-sh); }
body.ui-next .sched-picks { display: flex; gap: 6px; }
body.ui-next .sched-picks .chip-btn { flex: 1; height: 40px; justify-content: center; border-radius: 10px; }
body.ui-next .sched-picks .sched-new { flex: 0 0 44px; }
body.ui-next .sched-tools { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 8px; margin-top: 12px; }
body.ui-next .sched-tools .tool-btn {
  height: 46px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 10px; background: var(--rb-card); color: var(--ink);
  box-shadow: 0 3px 0 var(--ink); font-family: Anton, sans-serif; font-size: 17px; letter-spacing: .02em;
}
body.ui-next .sched-tools .tool-btn:first-child { background: var(--ink); color: var(--rb-on-ink); }
body.ui-next .sched-tools .tool-btn svg { display: none; }
body.ui-next .sched-tools .tool-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
body.ui-next .week { border: 0; background: transparent; box-shadow: none; overflow: visible; }
body.ui-next .week-day { position: relative; isolation: isolate; box-shadow: -2.5px 0 0 -1.5px rgba(20, 20, 30, .08); }
body.ui-next .week-day-name {
  position: relative; margin: 10px 4px 6px; padding: 8px 0 14px; background: var(--ink); color: var(--rb-on-ink);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%); font-family: Anton, sans-serif; font-weight: 400; font-size: 15px; letter-spacing: .03em; text-align: center;
}
body.ui-next .week-day.today .week-day-name { background: var(--rb-red); }
body.ui-next .slot {
  border: 0; border-radius: 0 6px 6px 0; background: var(--rb-card); color: var(--ink); box-shadow: var(--rb-sh-s); padding-left: 8px;
}
body.ui-next .slot::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
body.ui-next .slot small, body.ui-next .slot .slot-time { color: var(--muted); }
body.ui-next .slot.now { background: var(--c); color: #fff; border-radius: 0; clip-path: polygon(0 0, 88% 0, 100% 50%, 88% 100%, 0 100%); }
body.ui-next .slot.now small { color: rgba(255, 255, 255, .85); }
body.ui-next .week-line { border-color: rgba(20, 20, 30, .07); }

/* ---------- Courses: a banner per course, its next deadline in the white tag ---------- */
body.ui-next .course-grid:has(.cf-box) { grid-template-columns: minmax(0, 1fr); gap: 14px; }
body.ui-next .cf-box {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 38%; align-items: center; min-height: 104px;
  margin: 0 calc(-1 * var(--pad, 16px)); padding: 0; filter: drop-shadow(0 10px 10px rgba(30, 30, 40, .16));
}
body.ui-next .cf-tab { display: none; }
body.ui-next .cf-body {
  grid-column: 1 / -1; grid-row: 1; align-self: stretch; display: grid; grid-template-columns: auto 1fr; align-content: center; column-gap: 6px;
  min-height: 104px; margin-right: 30%; padding: 10px 44px 10px 18px; border: 0; border-radius: 0; background: var(--c); color: var(--on, #fff);
  clip-path: polygon(0 0, 88% 0, 100% 50%, 88% 100%, 0 100%);
}
body.ui-next .cf-word, body.ui-next .cf-num { font-family: Anton, sans-serif; font-weight: 400; font-stretch: 100%; font-size: 32px; line-height: 1; }
body.ui-next .cf-facts { grid-column: 1 / -1; margin-top: 6px; padding: 0; color: inherit; opacity: .9; font-size: 12px; }
body.ui-next .cf-facts b { color: inherit; }
body.ui-next .cf-next {
  grid-column: 2; grid-row: 1; align-self: center; display: flex; flex-direction: column; justify-content: center; min-height: 82px;
  padding: 6px 12px 6px 30px; border: 0; background: var(--rb-card); color: var(--ink); white-space: normal; font-size: 13px; font-weight: 800; line-height: 1.2;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 16% 50%);
}
body.ui-next .cf-next::before { content: "Next"; font-size: 11px; font-weight: 600; color: var(--muted); }
body.ui-next .cf-next em { margin: 2px 0 0; color: var(--c); font-family: Anton, sans-serif; font-style: normal; font-weight: 400; font-size: 19px; }
body.ui-next .cf-box:active { transform: scale(.99); }
body.ui-next .cx-add { border: 2px dashed #cfcac0 !important; border-radius: 14px; background: transparent; box-shadow: none; }
body.ui-next section.cx-hello h2, body.ui-next .cx-h { font-size: 26px; text-transform: none; letter-spacing: 0; }
body.ui-next :is(.cx-explore, .cmx-file, .cmx-pick, .cf-panel, .cf-tile, .back-row, .link-row, .request, main .card:not(.task):not(.tile):not(.summary):not(.empty)) {
  border: 0 !important; border-radius: 14px; background: var(--rb-card); box-shadow: var(--rb-sh);
}
body.ui-next .cf-hero { border: 0; box-shadow: var(--rb-sh); }
body.ui-next .cf-hero::before, body.ui-next .cmx-btab, body.ui-next .cmx-ftab, body.ui-next .cmx-hero-tab { border: 0; }
body.ui-next :is(.cmx-bbody, .cmx-fbody, .cmx-hero-body) { border: 0; }
body.ui-next .empty { border: 2px dashed #cfcac0; border-radius: 14px; background: transparent; }

/* ---------- sheets ---------- */
body.ui-next .sheet { border-top: 0; border-radius: 22px 22px 0 0; background: var(--paper); }
body.ui-next .sheet-head h2, body.ui-next .detail-title { font-family: Anton, sans-serif; font-weight: 400; font-stretch: 100%; letter-spacing: 0; }

/* ---------- phone tab bar: a white shelf, the page you're on marked with a yellow bookmark ---------- */
body.ui-next:not(.desk) .tabbar { background: var(--rb-card); border-top: 0; box-shadow: 0 -1px 0 rgba(20, 20, 30, .06), 0 -10px 24px -14px rgba(20, 20, 30, .25); }
body.ui-next:not(.desk) .tabbar::before, body.ui-next:not(.desk) .tabbar::after { display: none; }
body.ui-next:not(.desk) .tab { position: relative; isolation: isolate; color: #8d897f; }
body.ui-next:not(.desk) .tab.active { color: var(--ink); background: none; }
body.ui-next:not(.desk) .tab.active::before {
  content: ""; display: block; position: absolute; top: 0; left: 50%; right: auto; width: 60px; height: 64px; margin-left: -30px; z-index: -1;
  background: var(--rb-yellow); border-radius: 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 86%, 0 100%);
}
body.ui-next:not(.desk) .tab-beta { border: 0; border-radius: 4px; }

/* ---------- fixes after the first look in the app ---------- */
/* the block keeps its course colour even when the task is late (the red tag already says so) */
body.ui-next .rb-hero { --c: var(--cc) !important; box-shadow: none !important; }
body.ui-next .rb-hero::before, body.ui-next .rb-hero::after { display: none !important; }
/* buttons don't stretch on their own: the band and the course banners span the screen edge to edge */
body.ui-next #next-class .nextclass, body.ui-next .cf-box { width: calc(100% + 2 * var(--pad, 16px)); }
body.ui-next #next-class .nc-main { color: var(--muted) !important; font-size: 11.5px; }
body.ui-next #next-class .nc-main strong { color: var(--ink); }
body.ui-next .topbar h1, body.ui-next .hello h1 { word-spacing: normal; }
body.ui-next :is(input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea) { border-width: 1.5px; border-color: var(--line); }
body.ui-next :is(input, select, textarea):focus { border-color: var(--ink); box-shadow: none; }
/* phones and iPads: the tab bar is a white shelf across the bottom, not a floating black dock */
@media (max-width: 1099px) {
  body.ui-next .tabbar { left: 0; right: 0; bottom: 0; padding: 0 0 max(6px, env(safe-area-inset-bottom)); border: 0; border-radius: 0; background: var(--rb-card); }
  body.ui-next .tab { min-height: 58px; color: #8d897f; background: none; }
  body.ui-next .tab.active { background: none; color: var(--ink); }
  body.ui-next .tab.active::before { display: block; }
  body.ui-next .fab { bottom: calc(var(--tabbar-h) + max(6px, env(safe-area-inset-bottom)) + 18px); }
}
/* schedule head: the term picker across, the schedules under it as equal tabs */
body.ui-next .sched-term { width: 100%; }
body.ui-next .sched-picks .sched-new { flex: 0 0 auto; padding: 0 14px; gap: 6px; }
body.ui-next .sched-picks .sched-new::after { content: "New schedule"; font-size: 13px; }
body.ui-next .sched-picks .chip-btn:not(.sched-new) ~ .sched-new::after { content: none; }
body.ui-next .sched-tools .tool-btn { font-size: 18px; letter-spacing: .03em; }
body.ui-next :is(.fx-label, .compare-label, .free-label, .cmp-label) { text-transform: none; letter-spacing: 0; }
/* the day ribbons need more room than the old 26px header row */
body.ui-next .week-day-name { height: 46px; display: block; margin: 0 5px 10px; padding: 8px 0 0; text-transform: none; font-size: 16px; letter-spacing: .02em; }
body.ui-next .week-hours { padding-top: 56px; }
body.ui-next .week-col { background: transparent; }
body.ui-next .week-line:nth-child(odd) { background: transparent; }
body.ui-next .week { padding: 4px 0 10px; gap: 0; }
body.ui-next .slot strong { font-size: 12px; }
body.ui-next .sched-head .sched-term { width: 100% !important; max-width: none !important; flex: 1 1 100%; }

/* ---------- the task sheet: the same banner on top, white panels under it ---------- */
body.ui-next .rb-sheet { min-height: 156px; margin: 6px -16px 0; }
body.ui-next .rb-sheet .rb-flag { padding: 14px calc(8% + 14px) 14px 14px; cursor: default; }
body.ui-next .rb-sheet .rb-what { margin: 0; font-size: 25px; line-height: 1.1; white-space: normal; text-transform: none; color: inherit; }
body.ui-next .rb-sheet .rb-code { font-size: 30px; }
/* your own plan isn't a deadline: a calm ink tag, not the red one; an exam that's over goes grey */
body.ui-next .rb-hero.k-plan .rb-tag { background: var(--rb-block, #141414); }
body.ui-next .rb-hero.is-past .rb-tag { background: #8a877e; }
body.ui-next .rb-sheet.is-done .rb-tag { background: var(--rb-green); }
body.ui-next .rb-sheet.is-done .rb-tag b { font-size: 34px; }
body.ui-next .sheet-head { align-items: center; }
body.ui-next .sheet .badge { border: 0; border-radius: 99px; background: var(--rb-card); box-shadow: var(--rb-sh-s); font-weight: 700; letter-spacing: 0; text-transform: none; }
body.ui-next .sheet-head .icon-btn { width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--rb-card); box-shadow: var(--rb-sh-s); }
body.ui-next .why { border: 0; border-radius: 14px; background: var(--rb-card); box-shadow: var(--rb-sh); }
body.ui-next .why .status { border-radius: 4px; }
body.ui-next .meters { border: 0; border-radius: 14px; background: var(--rb-card); box-shadow: var(--rb-sh); overflow: hidden; }
body.ui-next .meter + .meter { border-left: 1px solid var(--line); }
body.ui-next .meter .lbl { text-transform: none; letter-spacing: 0; font-weight: 600; }
body.ui-next .pips span { border-radius: 2px; }
body.ui-next .detail-section h3 { align-items: baseline; margin-top: 4px; padding-bottom: 6px; border-bottom: 2px solid var(--ink); font-family: Anton, sans-serif; font-weight: 400; font-size: 21px; letter-spacing: 0; text-transform: none; }
body.ui-next .detail-section h3 span { font: 600 13px Archivo, sans-serif; text-transform: none; }
body.ui-next .items { gap: 8px; border-top: 0; }
body.ui-next .item { border: 0; border-radius: 12px; background: var(--rb-card); box-shadow: var(--rb-sh-s); padding: 10px 12px; }
body.ui-next .sheet .seg, body.ui-next .item .seg { box-shadow: none; background: var(--sunk); }
body.ui-next .item .seg button { text-transform: none; letter-spacing: 0; }
body.ui-next .sheet :is(.lbl, .eyebrow, .kicker) { text-transform: none; letter-spacing: 0; }

/* ---------- everywhere else: no hard offset shadows, soft lines instead of black outlines ----------
   (zero-specificity, so every rule above still wins) */
:where(body.ui-next main, body.ui-next .sheet, body.ui-next #room-root) :where([class]) { box-shadow: none; border-color: var(--line); }
:where(body.ui-next) :where(.nb2-continue, .nb2-quick, .nf-tile, .nb-result, .nb2-row, .cx-explore, .cmx-box, .cmx-folder-open, .planner-day, .stat-card, .set-row, .settings-group) {
  border-radius: 14px; background-color: var(--rb-card); box-shadow: var(--rb-sh);
}
:where(body.ui-next) :where(.nb2-quick.primary) { background-color: var(--ink); color: var(--rb-on-ink); }
:where(body.ui-next) :where(.nb2-cover) { box-shadow: var(--rb-sh-s); border: 0; border-radius: 3px 8px 8px 3px; }
:where(body.ui-next) :where(.nb-search, .searchbox) { border-radius: 12px; }
:where(body.ui-next main) :where(h2, h3, .eyebrow, .kicker, small, .lbl, .label) { letter-spacing: 0; }
:where(body.ui-next) :where(.nb2-cont-text small, .nb2-first, .eyebrow, .kicker) { text-transform: none; }
:where(body.ui-next) :where(.nf-tab) { border: 0; border-radius: 6px 6px 0 0; }
:where(body.ui-next) :where(.nf-tile) { border: 0; border-top-left-radius: 0; }

/* every panel that used to have a hard offset shadow and a black outline: a soft shadow and no outline */
body.ui-next :is(.banner, .request, .request.nudge, .request.access, .study-card, .cm-box, .cm-hero, .cmx-friends-body, .cmx-hero-body, .cmx-fbody, .ann-card, .ask, .nextclass.planner-row, .link-row, .back-row, .cf-hero, .cf-tile, .cf-panel, main .card:not(.task):not(.tile):not(.summary):not(.empty), .planner-status, .free-now-line, .nf-tile, .pr-card, .pr-show, .pr-grade, .cx-gpa, .cx-explore, .nb2-continue, .nb2-first, .nb2-quick, .nb2-row, .nb2-classnow, .fl-row, .nx-tile) {
  box-shadow: var(--rb-sh) !important; border-color: transparent !important; border-radius: 14px;
}
body.ui-next :is(.nb2-cover, .nb-cover) { box-shadow: var(--rb-sh-s) !important; border-color: transparent !important; }
body.ui-next .btn.danger { box-shadow: 0 3px 0 var(--critical); }
body.ui-next .fv-btn.primary { box-shadow: none !important; }
body.ui-next .nf-tile, body.ui-next .cf-hero { border-top-left-radius: 0; }
/* sentence case on every page: the letter-spaced capitals were the loudest leftover (codes on banners stay upper case) */
body.ui-next :is(main, .sheet) :not(.rb-code, .rb-tag b, .rb-tag small, .cf-word, .cf-num, .rb-hero .rb-when) { text-transform: none !important; }
body.ui-next :is(main, .sheet) :is(.lbl, .eyebrow, .kicker, .stat-lbl, .nc-label, h3, h4, small) { letter-spacing: 0 !important; }

/* ---------- Profile: your black block with the university in the red tag ---------- */
body.ui-next .rb-me { position: relative; display: block; min-height: 124px; margin: 22px -16px 0; padding: 0; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; filter: drop-shadow(0 12px 12px rgba(30, 30, 40, .18)); }
body.ui-next .rb-me-blk { position: absolute; inset: 0 0 0 0; display: flex; align-items: center; gap: 14px; padding: 0 18px; background: var(--rb-block); color: #fff; }
body.ui-next .rb-me.has-uni .rb-me-blk { right: 24%; padding-right: calc(6% + 14px); }
body.ui-next .rb-me .profile-avatar { width: 60px; height: 60px; flex: none; border: 0; border-radius: 50%; background: var(--rb-yellow); color: var(--ink); font-family: Anton, sans-serif; font-weight: 400; font-size: 28px; }
body.ui-next .rb-me .profile-who { min-width: 0; display: grid; gap: 1px; }
body.ui-next .rb-me .profile-who strong { font-family: Anton, sans-serif; font-weight: 400; font-size: 27px; line-height: 1.05; color: #fff; }
body.ui-next .rb-me .profile-who small, body.ui-next .rb-me .profile-uni { color: rgba(255, 255, 255, .75); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.ui-next .rb-me .profile-uni { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }
body.ui-next .rb-me .rb-tagw { width: 30%; }
body.ui-next .rb-me .rb-tag b { font-size: clamp(28px, 9vw, 38px); }
body.ui-next .profile-seg { margin-top: 18px; }
body.ui-next .stat-grid { border: 0 !important; gap: 10px; background: none; }
body.ui-next .stat-grid .tile { border: 0 !important; border-radius: 14px; background: var(--rb-card); box-shadow: var(--rb-sh) !important; }
body.ui-next .stat-grid .num, body.ui-next .tile .num { font-family: Anton, sans-serif; font-weight: 400; font-stretch: 100%; }
body.ui-next .nb-search, body.ui-next .nb-search input { border-color: var(--line) !important; border-width: 1.5px; }

/* ---------- iPads and laptops: several columns, so nothing bleeds past its column ---------- */
@media (min-width: 700px) {
  body.ui-next .list .task, body.ui-next .rb-hero, body.ui-next #next-class .nextclass, body.ui-next .cf-box, body.ui-next .rb-me { margin-left: 0; margin-right: 0; width: 100%; }
  body.ui-next .list .task { border-radius: 0 12px 12px 0 !important; overflow: hidden; }
  body.ui-next .rb-hero .rb-flag, body.ui-next .rb-me-blk { border-radius: 14px 0 0 14px; }
  body.ui-next .rb-hero, body.ui-next .rb-me { border-radius: 14px; }
  body.ui-next .rb-tag { border-radius: 0 14px 14px 0; }
  body.ui-next .course-grid:has(.cf-box) { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
}
/* laptop: the header ribbons hang from the top of the page, the sidebar's New task loses its hard shadow */
body.ui-next.desk .topbar { position: relative; border-bottom: 2px solid var(--ink); }
body.ui-next.desk .topbar .icon-btn { margin-top: -30px; height: 70px; }
body.ui-next.desk .topbar .icon-btn[data-action="tt-share"] { height: 62px; }
body.ui-next .desk-new { box-shadow: none !important; border: 0 !important; border-radius: 10px; background: var(--rb-red) !important; }

/* the week table sits on its own white sheet; the day ribbons hang from its top edge */
body.ui-next .week { background: var(--rb-card); border-radius: 14px; box-shadow: var(--rb-sh); padding: 0 6px 10px 0; overflow: hidden; }
body.ui-next .week-day-name { margin-top: 0; }
body.ui-next .week-hours { padding-top: 46px; }
body.ui-next .week-line { border-color: rgba(20, 20, 30, .06); }
body.ui-next .slot { box-shadow: 0 2px 8px -3px rgba(30, 30, 40, .28); background: var(--rb-slot); }

/* ---------- Courses: the banner exactly as in the mockup ---------- */
body.ui-next .course-grid:has(.rb-cb) { grid-template-columns: minmax(0, 1fr); gap: 14px; }
body.ui-next .rb-cb {
  position: relative; display: block; width: calc(100% + 2 * var(--pad, 16px)); height: 104px; margin: 0 calc(-1 * var(--pad, 16px));
  padding: 0; border: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer;
  filter: drop-shadow(0 10px 10px rgba(30, 30, 40, .16));
}
body.ui-next .rb-cb-flag {
  position: absolute; left: 0; top: 0; bottom: 0; width: 68%; display: flex; flex-direction: column; justify-content: center; padding: 0 46px 0 22px;
  background: var(--c); color: var(--on, #fff); clip-path: polygon(0 0, 86% 0, 100% 50%, 86% 100%, 0 100%);
}
body.ui-next .rb-cb-code { font-family: Anton, sans-serif; font-size: 32px; line-height: 1; text-transform: uppercase !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.ui-next .rb-cb-sub { margin-top: 4px; font-size: 13.5px; font-weight: 600; opacity: .92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.ui-next .rb-cb-nx {
  position: absolute; right: 0; top: 10px; bottom: 10px; width: 36%; display: flex; flex-direction: column; justify-content: center; padding: 0 14px 0 34px;
  background: var(--rb-card); color: var(--ink); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 16% 50%);
}
body.ui-next .rb-cb-nx small { font-size: 11px; font-weight: 600; color: var(--muted); }
body.ui-next .rb-cb-nx b { font-size: 13.5px; font-weight: 800; font-stretch: 85%; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body.ui-next .rb-cb-nx em { font-family: Anton, sans-serif; font-style: normal; font-size: 20px; line-height: 1.15; color: var(--c); }
body.ui-next .rb-cb-nx em.late { color: var(--rb-red); }
body.ui-next .rb-cb:active { transform: scale(.99); }
@media (min-width: 700px) {
  body.ui-next .course-grid:has(.rb-cb) { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
  body.ui-next .rb-cb { width: 100%; margin: 0; }
}

/* ---------- Profile: the tag wears your university's colour ---------- */
body.ui-next .rb-me .rb-tag { background: var(--uni, var(--rb-red)); }

/* ---------- Schedule: "Free time with" as one white bar, the friends and the compare button inside it ---------- */
body.ui-next .free-line { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 8px 8px 8px 16px; border-radius: 14px; background: var(--rb-card); box-shadow: var(--rb-sh); }
body.ui-next .free-line .free-label { font-family: Anton, sans-serif; font-weight: 400; font-size: 17px; letter-spacing: .01em; color: var(--ink); }
body.ui-next .free-line .chips { flex: 1; justify-content: flex-end; padding: 0; overflow-x: auto; }
body.ui-next .free-line .chip-btn { box-shadow: none; background: var(--sunk); }
body.ui-next .free-line .chip-btn.active { background: var(--ink); color: var(--rb-on-ink); }
body.ui-next .free-line .ghost-chip { border: 0; background: var(--ink); color: var(--rb-on-ink); }
body.ui-next :is(.cx-h, section.cx-hello h2, .nx-listhead h2, .section-title) { word-spacing: normal; }

/* ======================= dark mode: dark paper, dark-grey cards, the ink colours inverted ======================= */
html.theme-dark {
  --paper: #121316; --surface: #1c1e23; --surface-solid: #1c1e23; --sunk: #26292f; --line: #2f333a; --line-strong: #f2f0ea;
  --ink: #f2f0ea; --ink-2: #d4d1c9; --muted: #9a978f;
  --rb-card: #1c1e23; --rb-on-ink: #141414; --rb-block: #25282e; --rb-slot: #23262c; --rb-red: #f04a3f;
  --rb-sh: 0 10px 22px -10px rgba(0, 0, 0, .65); --rb-sh-s: 0 4px 12px -6px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
html.theme-dark body { background: var(--paper); color: var(--ink); }
html.theme-dark #bg, html.theme-dark #status-cap .cap-bg { background-color: var(--paper); }
html.theme-dark body.ui-next .tab { color: #8a877f; }
html.theme-dark body.ui-next .tab.active { color: #141414; }
html.theme-dark body.ui-next .week-line { border-color: rgba(255, 255, 255, .06); }
html.theme-dark body.ui-next .week-day { box-shadow: -2.5px 0 0 -1.5px rgba(255, 255, 255, .07); }
html.theme-dark body.ui-next .rb-hero, html.theme-dark body.ui-next .rb-cb, html.theme-dark body.ui-next .rb-me { filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .5)); }
html.theme-dark body.ui-next .btn:not(.primary) { background: var(--rb-card); color: var(--ink); }
html.theme-dark body.ui-next .empty, html.theme-dark body.ui-next .cx-add { border-color: #3a3e46 !important; }
html.theme-dark body.ui-next :is(input, select, textarea) { background-color: var(--rb-card); color: var(--ink); }
html.theme-dark body.ui-next .sheet { background: var(--paper); }
html.theme-dark body.ui-next .fab { box-shadow: 0 12px 24px -10px rgba(0, 0, 0, .8); }

/* ======================= the rest of the scan ======================= */
/* the last task is never hidden under the + Add button */
body.ui-next #app { padding-bottom: calc(var(--tabbar-h) + max(6px, env(safe-area-inset-bottom)) + 120px); }

/* login and sign-up: a white card, no frame, sentence-case labels */
body.ui-next .auth-card { border: 0; border-radius: 18px; background: var(--rb-card); box-shadow: var(--rb-sh) !important; }
body.ui-next .auth-card :is(label, .field > span, .field-label, small, .auth-divider span) { text-transform: none !important; letter-spacing: 0 !important; }
body.ui-next .auth-card .field > span { font-size: 13px; font-weight: 700; }
body.ui-next .auth-divider span { font-weight: 600; color: var(--muted); }

/* add / edit task: soft chips instead of black grids */
body.ui-next .sheet :is(.field > span, .field-label) { text-transform: none; letter-spacing: 0; font-size: 13.5px; font-weight: 700; }
body.ui-next .type-grid { gap: 6px; border: 0; }
body.ui-next .type-grid .opt span, body.ui-next .scale .opt span {
  border: 0 !important; border-radius: 10px; background: var(--rb-card); color: var(--ink); box-shadow: var(--rb-sh-s); min-height: 42px; font-weight: 700;
}
body.ui-next .scale { gap: 6px; }
body.ui-next .opt input:checked + span { background: var(--ink); color: var(--rb-on-ink); }
body.ui-next [data-action="syllabus-open"] { border-width: 2px; }
body.ui-next .quick-dates button { border: 0; border-radius: 99px; background: var(--rb-card); box-shadow: var(--rb-sh-s); color: var(--ink); font-weight: 700; }

/* This week: the day picker as small cards, the chosen day in ink */
body.ui-next .planner-day { border: 0 !important; border-radius: 12px; background: var(--rb-card); box-shadow: var(--rb-sh-s) !important; }
body.ui-next .planner-day .pd-num { font-family: Anton, sans-serif; font-weight: 400; }
body.ui-next .planner-day.active { background: var(--ink); }
body.ui-next .planner-day.active :is(.pd-name, .pd-num) { color: var(--rb-on-ink); }

/* study together and other lists of choices: white cards */
body.ui-next .leave-opt { border: 0 !important; border-radius: 12px; background: var(--rb-card); box-shadow: var(--rb-sh-s) !important; }
body.ui-next .leave-list { gap: 8px; }

/* friends: one white card per friend, round little buttons */
body.ui-next .fr-row { border: 0 !important; border-radius: 14px; background: var(--rb-card); box-shadow: var(--rb-sh-s); }
body.ui-next .fr-row .avatar { border-radius: 50%; }
body.ui-next .fr-row :is(.icon-btn, .btn.sm:not(.primary)) { border: 0; border-radius: 50%; background: var(--sunk); box-shadow: none; }
body.ui-next .fr-tag { border: 0 !important; border-radius: 99px; background: var(--sunk); color: var(--ink); font-weight: 700; }
body.ui-next .fr-section h3 { text-transform: none; letter-spacing: 0; }

/* notes: the ⋯ button round and quiet, the study-tools switch a plain card */
body.ui-next .nb-more { border: 0 !important; border-radius: 50%; background: var(--sunk); box-shadow: none !important; }
body.ui-next .nb2-switch { border: 0 !important; border-radius: 14px; background: var(--rb-card); box-shadow: var(--rb-sh-s); }

/* pop-up messages: a dark pill with a soft shadow */
body.ui-next #toast { border: 0; border-radius: 14px; background: #141414; color: #fff; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .55); }
html.theme-dark body.ui-next #toast { background: #f2f0ea; color: #141414; }

/* inbox tabs underline in ink, not the old orange */
body.ui-next .inbox-tabs button.on { color: var(--ink); border-bottom-color: var(--ink); box-shadow: inset 0 -3px 0 var(--ink); }

/* settings: buttons never wrap, the appearance picker */
body.ui-next .detail-actions .btn { white-space: nowrap; }
body.ui-next .appear-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
body.ui-next .appear-opt { display: grid; gap: 2px; justify-items: start; padding: 10px; border: 2px solid transparent; border-radius: 14px; background: var(--sunk); color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
body.ui-next .appear-opt.on { border-color: var(--ink); }
body.ui-next .appear-opt strong { font-size: 13.5px; }
body.ui-next .appear-opt small { font-size: 11px; color: var(--muted); }
body.ui-next .appear-prev { display: flex; width: 100%; height: 44px; margin-bottom: 6px; border-radius: 8px; overflow: hidden; background: #f7f5f0; }
body.ui-next .appear-prev i { flex: 1; margin: 8px 4px 8px 8px; border-radius: 4px; background: #fff; box-shadow: 0 2px 6px -2px rgba(0, 0, 0, .2); }
body.ui-next .appear-prev i:first-child { flex: 0 0 30%; background: #ef3a2f; }
body.ui-next .appear-night .appear-prev { background: #121316; }
body.ui-next .appear-night .appear-prev i:last-child { background: #26292f; }
body.ui-next .appear-auto .appear-prev { background: linear-gradient(90deg, #f7f5f0 50%, #121316 50%); }

/* course page: the course block like the banners, headings over a rule, white rows */
body.ui-next .cf-hero { margin: 14px calc(-1 * var(--pad, 16px)) 0; padding: 18px 18px 16px; border-radius: 0 !important; }
body.ui-next .cf-hero::before { display: none; }
body.ui-next .cf-label { display: none; }
body.ui-next .cf-hero-top { position: absolute; top: 14px; right: 14px; }
body.ui-next .cf-rename { border: 0; border-radius: 99px; background: rgba(0, 0, 0, .22); color: inherit; padding: 6px 12px; }
body.ui-next .cf-title { margin: 0 0 14px; font-family: Anton, sans-serif; font-weight: 400; font-stretch: 100%; font-size: 46px; text-transform: uppercase !important; }
body.ui-next .cf-title span { color: inherit; }
body.ui-next .cf-stats { border-top-color: rgba(255, 255, 255, .3); }
body.ui-next .cf-stats strong { font-family: Anton, sans-serif; font-weight: 400; font-stretch: 100%; }
body.ui-next .cf-tile { border: 0 !important; }
body.ui-next .cf-tile-v { font-family: Anton, sans-serif; font-weight: 400; font-stretch: 100%; }
body.ui-next .cf-panel { margin-top: 22px; border: 0 !important; background: transparent !important; box-shadow: none !important; border-radius: 0; }
body.ui-next .cf-panel h3 { margin: 0 0 10px; padding: 0 0 6px; border-bottom: 2px solid var(--ink); background: transparent; color: var(--ink); font-family: Anton, sans-serif; font-weight: 400; font-stretch: 100%; font-size: 22px; text-transform: none; letter-spacing: 0; }
body.ui-next .cf-panel h3 .count { background: none; color: var(--muted); font: 600 13px Archivo, sans-serif; }
body.ui-next .cf-row, body.ui-next .cf-panel .cf-empty { margin-bottom: 8px; border: 0; border-radius: 12px; background: var(--rb-card); box-shadow: var(--rb-sh-s); }
body.ui-next .cf-row .countdown { font-size: 20px; }
@media (min-width: 700px) { body.ui-next .cf-hero { margin-left: 0; margin-right: 0; border-radius: 14px !important; } }

/* schedule: a friend's name and the pin are one pill */
body.ui-next .chip-pair { display: inline-flex; border-radius: 99px; background: var(--sunk); overflow: hidden; }
body.ui-next .chip-pair > .chip-btn { border-radius: 0 !important; background: transparent; box-shadow: none; }
body.ui-next .chip-pair > .chip-btn:first-child { padding-right: 8px; }
body.ui-next .chip-pair > .where-btn { padding: 0 12px 0 8px; border-left: 1px solid var(--line); }
body.ui-next .chip-pair > .chip-btn.active { background: var(--ink); color: var(--rb-on-ink); }
/* friends list: one card, rows split by a hairline, round icon buttons */
body.ui-next .fr-list { border: 0 !important; border-radius: 14px; background: var(--rb-card); box-shadow: var(--rb-sh-s); overflow: hidden; }
body.ui-next .fr-list .fr-row { border-radius: 0; box-shadow: none; background: transparent; }
body.ui-next .fr-icon { width: 36px; height: 36px; border: 0 !important; border-radius: 50%; background: var(--sunk); color: var(--ink); box-shadow: none !important; }
/* with friends in it, the bar wraps: the label on top, the friend pills under it */
body.ui-next .free-line { flex-wrap: wrap; }
body.ui-next .free-line:has(.chip-pair) .chips { flex: 1 1 100%; justify-content: flex-start; flex-wrap: wrap; gap: 6px; overflow: visible; }
body.ui-next .chip-pair { flex: none; }
body.ui-next .chip-pair > .chip-btn { white-space: nowrap; min-height: 36px; }
body.ui-next .chip-pair:has(> .chip-btn.active) { background: var(--ink); }
body.ui-next .chip-pair:has(> .chip-btn.active) > .where-btn { color: var(--rb-on-ink); border-left-color: rgba(255, 255, 255, .2); }
body.ui-next .free-line:has(.chip-pair) .ghost-chip { background: var(--sunk); color: var(--ink); }

/* ======================= the welcome pages ======================= */
body.intro .intro { background: var(--paper); }
.intro-sq { gap: 8px; margin-bottom: 26px; }
.intro-sq i { width: 30px; height: 64px; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%); }
.intro-sq i:nth-child(1) { background: #ff5a1f; }
.intro-sq i:nth-child(2) { background: #ffcf3a; height: 54px; }
.intro-sq i:nth-child(3) { background: #2346d6; }
.intro-slide h1 { font-family: Anton, sans-serif; font-weight: 400; font-stretch: 100%; text-transform: uppercase; letter-spacing: .005em; line-height: .9; }
.intro-line { font-family: Anton, sans-serif; font-weight: 400; font-stretch: 100%; color: var(--rb-red); font-size: 28px; }
.intro-slide h2 { font-family: Anton, sans-serif; font-weight: 400; font-stretch: 100%; text-transform: uppercase; letter-spacing: .005em; line-height: 1; }
.intro-text { color: var(--muted); }
.intro-visual { position: relative; }
/* each picture sits on a banner in its colour, with the red tag on the right edge */
.intro-visual::after { display: none; content: ""; position: absolute; right: 0; top: 22%; width: 22%; height: 30%; background: var(--rb-red); clip-path: polygon(30% 0, 100% 0, 100% 100%, 30% 100%, 0 50%); filter: drop-shadow(-6px 3px 8px rgba(0,0,0,.35)); }
.intro-phone { border-color: #141414; border-radius: 30px 30px 0 0; box-shadow: 0 -10px 30px -12px rgba(0,0,0,.35); position: relative; z-index: 1; }
.intro-dots i { background: var(--ink); }
.intro-dots i.on { background: var(--rb-red); }
.intro-next { border: 0; border-radius: 14px; background: #141414; color: #fff; box-shadow: none; font-family: Anton, sans-serif; font-weight: 400; font-size: 19px; letter-spacing: .03em; }
.intro-have { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.intro-skip { color: var(--muted); }
@media (min-width: 1100px) { .intro-visual::after { top: 30%; width: 14%; } }

/* ======================= settings: buttons stay on screen, text gets room ======================= */
body.ui-next .detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
body.ui-next .detail-actions .btn { white-space: normal; flex: 1 1 auto; max-width: 100%; justify-content: center; text-align: center; }
body.ui-next .settings-card :is(.btn, .detail-actions, form, .row, .link-row, .switch-row) + :is(p, .small, .muted) { margin-top: 12px; }
body.ui-next .settings-card :is(p, .small) + :is(.btn, .detail-actions, form, .row) { margin-top: 12px; }
body.ui-next .settings-card .btn.block + p { margin-top: 12px; }
body.ui-next .settings-card { overflow: hidden; }

/* ======================= the empty "Up next": a dark block with a green tick tag ======================= */
body.ui-next .rb-clear .rb-tag { background: var(--rb-green); }
body.ui-next .rb-clear .rb-tag svg { width: 46px; height: 46px; stroke-width: 3; }
body.ui-next .rb-clear .rb-sub { max-width: 30ch; margin-top: 6px; font-size: 12.5px; line-height: 1.35; opacity: .8; white-space: normal; }
body.ui-next .rb-clear .rb-flag { padding-bottom: 66px; }

/* ======================= Courses tab: shortcuts, and the course dashboard ======================= */
body.ui-next .cx-shortcuts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
body.ui-next .cx-sc { position: relative; display: grid; justify-items: center; gap: 8px; padding: 14px 6px 12px; border: 0; border-radius: 14px; background: var(--rb-card); color: var(--ink); box-shadow: var(--rb-sh); font: inherit; cursor: pointer; }
body.ui-next .cx-sc strong { font-size: 13px; font-weight: 800; }
body.ui-next .cx-sc em { position: absolute; top: 8px; right: 8px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--rb-red); color: #fff; font: 800 11px/20px Archivo, sans-serif; }
body.ui-next .cx-sc .cx-ico, body.ui-next .cd-row .cx-ico { width: 40px; height: 40px; border: 0 !important; border-radius: 12px; background: var(--sunk); color: var(--ink); display: grid; place-items: center; flex: none; }
body.ui-next .cx-add { min-height: 72px; flex-direction: row; gap: 10px; }
body.ui-next .cd-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin: 16px 0 4px; }
body.ui-next .cd-tabs button { min-height: 42px; font-weight: 800; }
body.ui-next .cd-tabs .n { margin-left: 4px; opacity: .6; font-weight: 700; }
body.ui-next .cd-h { display: flex; align-items: baseline; gap: 8px; margin: 22px 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--ink); font-family: Anton, sans-serif; font-weight: 400; font-size: 21px; }
body.ui-next .cd-h .count { font: 600 13px Archivo, sans-serif; color: var(--muted); }
body.ui-next .cd-list { display: grid; gap: 8px; }
body.ui-next .cd-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px 10px 10px; border: 0; border-radius: 12px; background: var(--rb-card); color: var(--ink); box-shadow: var(--rb-sh-s); font: inherit; text-align: left; cursor: pointer; }
body.ui-next .cd-row .nb2-cover { width: 40px; height: 48px; flex: none; }
body.ui-next .cd-row-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
body.ui-next .cd-row-text strong { font-size: 15px; }
body.ui-next .cd-row-text small { font-size: 12px; color: var(--muted); }
body.ui-next .cd-empty { padding: 12px 2px; color: var(--muted); font-size: 13.5px; }
body.ui-next .cd-cm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0 8px; }
body.ui-next .cd-cm-head .back-row { margin: 0; }
body.ui-next .cmx-file { margin-bottom: 10px; }
body.ui-next .cmx-ficon { border: 0 !important; border-radius: 10px; }
body.ui-next .cm-grid { gap: 10px; }
body.ui-next .cmx-bbody { border-radius: 0 12px 12px 12px; }

/* ======================= next-class band: readable sizes, the middle centred ======================= */
body.ui-next #next-class .nextclass { min-height: 84px; grid-template-columns: clamp(70px, 20vw, 84px) minmax(0, 1fr) clamp(70px, 20vw, 84px); grid-template-rows: 1fr 1fr; }
body.ui-next #next-class .nc-label { font-size: 14px; font-weight: 800; line-height: 1.15; padding-left: 16px; }
body.ui-next #next-class .nc-main { min-width: 0; align-self: end; padding: 0 22px 1px; font-family: Anton, sans-serif; font-weight: 400; font-size: clamp(17px, 5.2vw, 21px); line-height: 1.1; color: var(--ink) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.ui-next #next-class .nc-main strong { display: inline; font-size: clamp(19px, 5.6vw, 23px); }
body.ui-next #next-class .nc-where { display: block; min-width: 0; align-self: start; padding: 2px 26px 0; font-size: 13px; font-weight: 600; text-align: center; color: var(--muted) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.ui-next #next-class .nc-where svg { display: inline-block; width: 13px; height: 13px; vertical-align: -2px; margin-right: 3px; }
body.ui-next #next-class .nc-big { font-size: 22px; padding-right: 16px; }

/* ======================= schedule: course boxes stand out from the grid ======================= */
body.ui-next .slot { background: color-mix(in srgb, var(--c) 16%, var(--rb-card)); box-shadow: 0 2px 8px -4px color-mix(in srgb, var(--c) 60%, transparent); }
body.ui-next .slot::before { width: 4px; }
body.ui-next .slot strong { color: color-mix(in srgb, var(--c) 55%, var(--ink)); }
html.theme-dark body.ui-next .slot { background: color-mix(in srgb, var(--c) 28%, var(--rb-card)); }
html.theme-dark body.ui-next .slot strong { color: color-mix(in srgb, var(--c) 35%, #fff); }
body.ui-next .week-col { cursor: pointer; }

/* your own busy blocks: striped and dashed, never mistaken for a course */
body.ui-next .slot.busy-block {
  background: repeating-linear-gradient(135deg, var(--rb-card) 0 6px, var(--sunk) 6px 12px);
  border: 1.5px dashed var(--muted); border-radius: 6px; box-shadow: none; color: var(--ink); padding-left: 6px;
}
body.ui-next .slot.busy-block::before { display: none; }
body.ui-next .slot.busy-block strong { color: var(--ink); }

/* ======================= the friend picker and "who's free" ======================= */
body.ui-next .free-line .chips { display: flex; flex-wrap: wrap; gap: 6px; }
body.ui-next .fp-list { display: grid; gap: 0; margin-top: 8px; border-radius: 14px; background: var(--rb-card); box-shadow: var(--rb-sh-s); overflow: hidden; }
body.ui-next .fp-scroll { max-height: min(52vh, 460px); overflow-y: auto; overscroll-behavior: contain; }
body.ui-next .fp-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 12px; }
body.ui-next .fp-row + .fp-row { border-top: 1px solid var(--line); }
body.ui-next .fp-row .avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; font-size: 15px; }
body.ui-next .fp-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
body.ui-next .fp-tick { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 7px; border: 2px solid var(--line); color: transparent; }
body.ui-next .fp-row.on .fp-tick { background: var(--ink); border-color: var(--ink); color: var(--rb-on-ink); }
body.ui-next .fp-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
body.ui-next .fp-text strong { font-size: 15px; }
body.ui-next .fp-text small { font-size: 12px; color: var(--muted); }
body.ui-next .fp-text em { font-style: normal; font-weight: 800; color: var(--rb-green); }
body.ui-next .fp-foot { display: flex; gap: 8px; margin-top: 14px; }
body.ui-next .fp-foot .btn { flex: 1; }
body.ui-next .sheet .searchbox { margin-top: 10px; }
body.ui-next .wf-me { margin: 4px 0 6px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--rb-green) 14%, var(--rb-card)); font-weight: 700; }
body.ui-next .wf-me.busy { background: var(--sunk); }
body.ui-next .wf-none { margin-top: 12px; }
body.ui-next .wf-add { margin-top: 18px; }
body.ui-next .day-picks { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
body.ui-next .day-picks .opt span { min-height: 40px; font-size: 13px; }
body.ui-next .switch-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--rb-card); box-shadow: var(--rb-sh-s); }
body.ui-next .switch-row span { display: grid; gap: 1px; }
body.ui-next .switch-row small { color: var(--muted); font-size: 12px; }

/* ======================= Tasks on a wide screen: the deadline block gets bigger type, not empty space ======================= */
@media (min-width: 900px) {
  body.ui-next .rb-hero:not(.rb-sheet) { min-height: 230px; }
  body.ui-next .rb-hero:not(.rb-sheet) .rb-code { font-size: 58px; }
  body.ui-next .rb-hero:not(.rb-sheet) .rb-what { font-size: 28px; }
  body.ui-next .rb-hero:not(.rb-sheet) .rb-when { font-size: 19px; }
  body.ui-next .rb-hero:not(.rb-sheet) .rb-tag b { font-size: 76px; }
  body.ui-next .rb-hero:not(.rb-sheet) .rb-tagw { width: 30%; }
  body.ui-next .rb-hero:not(.rb-sheet) .rb-flag { right: 24%; }
  body.ui-next .rb-hero:not(.rb-sheet) .rb-acts { right: 24%; }
}

/* ======================= your colour (Settings → Appearance → Colour) ======================= */
html.has-accent body.ui-next .fab { background: var(--rb-accent); color: var(--rb-on-accent); box-shadow: 0 12px 24px -10px color-mix(in srgb, var(--rb-accent) 70%, transparent); }
html.has-accent body.ui-next #next-class .nextclass { background: color-mix(in srgb, var(--rb-accent) 88%, #000) !important; }
html.has-accent body.ui-next #next-class :is(.nc-label, .nc-big) { color: var(--rb-on-accent) !important; }
html.has-accent body.ui-next .week-day.today .week-day-name { background: var(--rb-accent); color: var(--rb-on-accent); }
html.has-accent body.ui-next .sched-tools .tool-btn:first-child { background: var(--rb-accent); border-color: color-mix(in srgb, var(--rb-accent) 70%, #000); color: var(--rb-on-accent); box-shadow: 0 3px 0 color-mix(in srgb, var(--rb-accent) 70%, #000); }
html.has-accent body.ui-next :is(.chip-pair:has(> .chip-btn.active), .chip-pair > .chip-btn.active) { background: var(--rb-accent); color: var(--rb-on-accent); }
html.has-accent body.ui-next .fp-row.on .fp-tick { background: var(--rb-accent); border-color: var(--rb-accent); color: var(--rb-on-accent); }
html.has-accent body.ui-next:not(.desk) .tab.active::before { background: var(--rb-accent); }
html.has-accent body.ui-next:not(.desk) .tab.active { color: var(--rb-on-accent); }
html.has-accent body.ui-next.desk .tab.active { background: var(--rb-accent); color: var(--rb-on-accent); }
html.has-accent body.ui-next .desk-new { background: var(--rb-accent) !important; color: var(--rb-on-accent); }
html.has-accent body.ui-next .topbar .icon-btn[data-action="tt-share"] { background: var(--rb-accent); color: var(--rb-on-accent); }
html.has-accent body.ui-next .appear-opt.on, html.has-accent body.ui-next .accent-sw.on { border-color: var(--rb-accent); }

body.ui-next .accent-h { margin: 18px 0 2px; font-size: 14px; font-weight: 800; text-transform: none; letter-spacing: 0; }
body.ui-next .accent-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 8px; margin-top: 10px; }
body.ui-next .accent-sw { position: relative; display: grid; justify-items: center; gap: 5px; padding: 8px 4px 6px; border: 2px solid transparent; border-radius: 12px; background: var(--sunk); color: var(--ink); font: 700 11.5px Archivo, sans-serif; cursor: pointer; }
body.ui-next .accent-sw.on { border-color: var(--ink); }
body.ui-next .accent-sw i { width: 30px; height: 30px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
body.ui-next .accent-sw.custom i { background: conic-gradient(#ef3a2f, #ffcf3a, #2f8a4f, #0f97b2, #1f6fd1, #7a3fb0, #ef3a2f); }
body.ui-next .accent-sw.custom.on i { background: var(--sw); }
body.ui-next .accent-sw input[type=color] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

/* ======================= the file viewer (PDFs, pictures): paper page, white bar, round buttons ======================= */
.fv { background: var(--paper); color: var(--ink); }
.fv-bar { background: var(--rb-card); border-bottom: 0; box-shadow: 0 1px 0 var(--line), 0 10px 24px -16px rgba(20, 20, 30, .35); gap: 6px; padding-left: 10px; padding-right: 10px; }
.fv-name strong { font-family: Anton, sans-serif; font-weight: 400; font-size: 19px; letter-spacing: .01em; }
.fv-name small { color: var(--muted); }
.fv-btn { min-width: 40px; height: 40px; border: 0; border-radius: 20px; background: var(--sunk); color: var(--ink); box-shadow: none !important; font-weight: 800; font-size: 14px; }
.fv-btn[data-fv="close"] { width: 40px; padding: 0; font-size: 16px; }
.fv-btn:active { transform: scale(.94); }
.fv-btn.primary { background: var(--ink); border: 0; color: var(--rb-on-ink); padding: 0 16px; }
html.has-accent .fv-btn.primary { background: var(--rb-accent); color: var(--rb-on-accent); }
.fv-page { border-radius: 6px; overflow: hidden; box-shadow: 0 8px 24px -10px rgba(20, 20, 30, .35); }
.fv-none { color: var(--muted); }
.fv-none strong { color: var(--ink); font-family: Anton, sans-serif; font-weight: 400; font-size: 22px; }

/* the schedule picture sheet: the picture on a soft card, colours as a tidy list */
body.ui-next .wall-frame img { border: 0; border-radius: 22px; box-shadow: 0 18px 40px -18px rgba(20, 20, 30, .45); }
body.ui-next .poster-legend { gap: 0; border-radius: 14px; background: var(--rb-card); box-shadow: var(--rb-sh-s); overflow: hidden; }
body.ui-next .legend-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0 !important; border-radius: 0; background: transparent; }
body.ui-next .legend-row + .legend-row { border-top: 1px solid var(--line) !important; }
body.ui-next .legend-row input[type=color] { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; overflow: hidden; background: none; flex: none; }
body.ui-next .legend-row input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
body.ui-next .legend-row input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }

/* ======================= Notes ======================= */
body.ui-next .nr-hero { min-height: 168px; }
body.ui-next .nr-hero .rb-flag { padding: 14px calc(8% + 14px) 14px 18px; align-items: flex-start; text-align: left; }
body.ui-next .nr-hero .rb-what { font-family: Archivo, sans-serif; font-weight: 700; font-size: 13px; opacity: .85; }
body.ui-next .nr-hero .rb-code { font-size: clamp(30px, 9vw, 40px); text-transform: none; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.05; }
body.ui-next .nr-hero .rb-sub { margin-top: 6px; font-size: 12.5px; opacity: .85; }
body.ui-next .nr-hero .nr-go { flex-direction: row; gap: 2px; font-family: Anton, sans-serif; font-size: 24px; text-transform: uppercase; }
body.ui-next .nr-hero:not(.rb-clear) .rb-tag { background: var(--ink); color: var(--rb-on-ink); }
body.ui-next .nr-bar { display: flex; gap: 8px; margin: 18px 0 4px; }
body.ui-next .nr-search { flex: 1; min-width: 0; margin: 0 !important; height: 46px; border: 0 !important; border-radius: 23px; background: var(--rb-card); box-shadow: var(--rb-sh-s); padding: 0 14px; display: flex; align-items: center; gap: 8px; }
body.ui-next .nr-search input { border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0; height: 44px; flex: 1; min-width: 0; }
body.ui-next .nr-newbtn { flex: none; height: 46px; padding: 0 18px; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 23px; background: var(--ink); color: var(--rb-on-ink); font: 800 15px Archivo, sans-serif; cursor: pointer; }
html.has-accent body.ui-next .nr-newbtn { background: var(--rb-accent); color: var(--rb-on-accent); }
body.ui-next .nr-shelf { margin-top: 22px; }
body.ui-next .nr-shelf-head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
body.ui-next .nr-shelf-head h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-family: Anton, sans-serif; font-weight: 400; font-size: 21px; }
body.ui-next .nr-shelf-head h3 i { width: 12px; height: 20px; background: var(--c); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); }
body.ui-next .nr-shelf-head .count { font: 600 13px Archivo, sans-serif; color: var(--muted); }
body.ui-next .nr-shelf-head .link-btn { font-weight: 800; color: var(--ink); text-decoration: none; }
body.ui-next .nr-row { display: flex; gap: 14px; overflow-x: auto; padding: 14px 2px 6px; margin: 0 calc(-1 * var(--pad, 16px)); padding-left: var(--pad, 16px); padding-right: var(--pad, 16px); scroll-snap-type: x proximity; scrollbar-width: none; }
body.ui-next .nr-row::-webkit-scrollbar { display: none; }
body.ui-next .nr-book { position: relative; flex: none; width: 112px; scroll-snap-align: start; }
body.ui-next .nr-cover { position: relative; display: flex; flex-direction: column; justify-content: space-between; width: 112px; height: 146px; padding: 14px 10px 10px 16px; border: 0; border-radius: 4px 12px 12px 4px; background: var(--c); color: #fff; cursor: pointer; text-align: left;
  box-shadow: inset 6px 0 0 rgba(0, 0, 0, .18), 0 10px 18px -10px rgba(20, 20, 30, .45); }
body.ui-next .nr-cover::after { content: ""; position: absolute; right: 14px; bottom: -8px; width: 12px; height: 26px; background: var(--rb-red); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 76%, 0 100%); }
body.ui-next .nr-label { padding: 6px 7px; border-radius: 3px; background: #fff; color: #141414; }
body.ui-next .nr-label b { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-family: Anton, sans-serif; font-weight: 400; font-size: 14px; line-height: 1.12; }
body.ui-next .nr-pages { font-size: 11px; font-weight: 800; opacity: .9; }
body.ui-next .nr-meta { display: grid; margin-top: 10px; padding-right: 22px; }
body.ui-next .nr-meta strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.ui-next .nr-meta small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.ui-next .nr-more { position: absolute; right: -4px; bottom: 2px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
body.ui-next .nr-add { flex: none; width: 112px; height: 146px; display: grid; place-items: center; border: 2px dashed var(--line); border-radius: 12px; background: transparent; color: var(--muted); cursor: pointer; }
body.ui-next .nr-empty { margin-top: 22px; }
body.ui-next .nr-empty h3 { margin: 0 0 10px; font-size: 13px; font-weight: 800; color: var(--muted); }
body.ui-next .nr-chips { display: flex; flex-wrap: wrap; gap: 8px; }
body.ui-next .nr-chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 0; border-radius: 18px; background: var(--rb-card); color: var(--ink); box-shadow: var(--rb-sh-s); font: 700 13px Archivo, sans-serif; cursor: pointer; }
body.ui-next .nr-chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
body.ui-next .nr-options { display: flex; align-items: center; gap: 6px; margin: 28px auto 0; border: 0; background: none; color: var(--muted); font: 700 13px Archivo, sans-serif; cursor: pointer; }
body.ui-next .nr-new { display: grid; gap: 8px; }
@media (min-width: 700px) { body.ui-next .nr-row { margin: 0; padding-left: 2px; padding-right: 2px; flex-wrap: wrap; overflow: visible; } }
body.ui-next .fp-foot .btn { white-space: nowrap; padding: 0 10px; } body.ui-next .fp-foot .btn:first-child { flex: 1.3; }
body.ui-next .day-picks .opt span { border: 0 !important; border-radius: 10px; background: var(--rb-card); box-shadow: var(--rb-sh-s); font-weight: 700; }
body.ui-next .day-picks .opt input:checked + span { background: var(--ink); color: var(--rb-on-ink); }
html.has-accent body.ui-next :is(.day-picks, .type-grid, .scale) .opt input:checked + span { background: var(--rb-accent); color: var(--rb-on-accent); }
body.ui-next .switch-row input[type=checkbox] { width: 22px; height: 22px; flex: none; accent-color: var(--ink); }
html.has-accent body.ui-next .switch-row input[type=checkbox] { accent-color: var(--rb-accent); }

/* ======================= inside a notebook (the web and desktop editor) ======================= */
#notes-root, .nbx { background: var(--paper); color: var(--ink); }
.nbx-bar { background: var(--rb-card); border-bottom: 0; box-shadow: 0 1px 0 var(--line), 0 10px 22px -16px rgba(20, 20, 30, .35); gap: 8px; z-index: 2; }
.nbx-title { font-family: Anton, sans-serif; font-weight: 400; font-stretch: 100%; font-size: 20px; letter-spacing: .01em; }
.nbx-status { color: var(--muted); }
.nbx-ib, .nbx-zoom { border: 0; border-radius: 18px; background: var(--sunk); color: var(--ink); }
.nbx-ib { border-radius: 50%; }
.nbx-ib:active, .nbx-tool:active { transform: scale(.94); }
.nbx-tools { background: var(--rb-card); border-bottom: 0; box-shadow: 0 1px 0 var(--line); gap: 8px; }
.nbx-group + .nbx-group { border-left-color: var(--line); }
.nbx-tool { border: 0; border-radius: 12px; color: var(--ink); }
.nbx-tool.on { background: var(--ink); color: var(--rb-on-ink); box-shadow: none; }
html.has-accent .nbx-tool.on { background: var(--rb-accent); color: var(--rb-on-accent); }
.nbx-size.on { border: 0; border-radius: 50%; background: var(--sunk); }
.nbx-swatch { border: 2px solid rgba(255, 255, 255, .8); box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.nbx-swatch.on { outline: 2.5px solid var(--ink); }
.nbx-chip { border: 0; border-radius: 99px; background: var(--sunk); color: var(--ink); }
.nbx-chip.on { background: var(--ink); color: var(--rb-on-ink); }
.nbx-page { border-radius: 6px; box-shadow: 0 10px 26px -14px rgba(20, 20, 30, .4); }
.nbx-add { border: 2px dashed var(--line); border-radius: 14px; color: var(--muted); }
.nbx-pageno { border-radius: 99px; background: var(--ink); color: var(--rb-on-ink); }
.nbx-pop { border: 0 !important; border-radius: 16px; background: var(--rb-card); color: var(--ink); box-shadow: 0 18px 40px -16px rgba(20, 20, 30, .45) !important; }
.nbx .beta-pill, .nbx-bar .beta-pill { border: 0; border-radius: 4px; }
html.theme-dark .nbx-page { background: #fff; }

/* ======================= the course-site calendar guide ======================= */
.mg-track { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 12px -4px 0; }
.mg-track::-webkit-scrollbar { display: none; }
.mg-step { scroll-snap-align: start; padding: 0 4px; display: grid; justify-items: center; text-align: center; gap: 6px; }
.mg-step h3 { font-family: Anton, sans-serif; font-weight: 400; font-size: 24px; }
.mg-n { font-size: 12px; font-weight: 700; color: var(--muted); }
.mg-text { font-size: 14.5px; line-height: 1.45; max-width: 34ch; }
.mg-step form { width: 100%; text-align: left; }
.mg-phone { position: relative; width: 190px; height: 250px; border-radius: 26px; border: 6px solid #141414; background: #fff; overflow: hidden; padding: 8px; text-align: left; color: #333; font-size: 10px; box-shadow: 0 14px 30px -16px rgba(0,0,0,.5); }
.mg-top { display: flex; justify-content: space-between; align-items: center; height: 26px; margin: -8px -8px 8px; padding: 0 10px; background: #f0f0f0; border-bottom: 1px solid #ddd; font-size: 11px; }
.mg-line { height: 8px; border-radius: 4px; background: #e8e8e8; margin: 6px 0; } .mg-line.w70 { width: 70%; } .mg-line.w50 { width: 50%; }
.mg-card { height: 50px; border-radius: 8px; background: #f3f3f3; margin-top: 8px; }
.mg-menu { display: grid; gap: 4px; } .mg-menu span { padding: 6px 8px; border-radius: 6px; background: #f6f6f6; }
.mg-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-bottom: 10px; } .mg-grid i { height: 18px; background: #f2f2f2; border-radius: 3px; }
.mg-btn { display: block; padding: 7px 8px; border-radius: 6px; background: #f98012; color: #fff; font-weight: 700; text-align: center; margin-top: 8px; }
.mg-label { font-weight: 700; margin: 8px 0 4px; } .mg-radio { display: block; padding: 3px 0 3px 16px; position: relative; }
.mg-radio::before { content: ""; position: absolute; left: 0; top: 5px; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #888; }
.mg-radio.on::before { background: #f98012; border-color: #f98012; }
.mg-url { padding: 6px; border-radius: 6px; background: #f3f3f3; font-family: monospace; font-size: 9px; word-break: break-all; margin-top: 6px; }
.mg-copy { display: inline-block; margin-top: 8px; padding: 4px 10px; border-radius: 6px; background: #333; color: #fff; font-weight: 700; }
.mg-hit { position: relative; z-index: 1; outline: 3px solid #ef3a2f; outline-offset: 2px; border-radius: 6px; animation: mg-pulse 1.4s ease-in-out infinite; }
.mg-gear { font-size: 16px; padding: 0 3px; }
@keyframes mg-pulse { 50% { outline-color: rgba(239, 58, 47, .35); } }
.mg-done { display: grid; place-items: center; background: #f7f5f0; } .mg-done span { width: 80px; height: 80px; border-radius: 50%; background: #4c7a26; color: #fff; display: grid; place-items: center; }
.mg-paste { display: flex; gap: 8px; } .mg-paste input { flex: 1; min-width: 0; } .mg-paste .btn { flex: none; white-space: nowrap; }
.mg-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.mg-dots { display: flex; gap: 6px; } .mg-dots i { width: 7px; height: 7px; border-radius: 4px; background: var(--line); transition: width .2s; } .mg-dots i.on { width: 20px; background: var(--ink); }

/* the welcome page shows the real logo (light letters in dark mode) */
body.intro .intro-slide.welcome .intro-logo { margin: 0 0 22px; line-height: 0; }
body.intro .intro-slide.welcome .intro-logo img { display: block; width: min(320px, 72vw); height: auto; }
html.theme-dark body.intro .intro-slide.welcome .intro-logo img { content: url(/brand/logo-light.svg); }

/* notes in the browser: the "web version" note shown when a notebook opens */
.nw-notice { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 20px; background: rgba(20, 20, 24, .45); }
.nw-card { width: min(420px, 100%); padding: 24px 22px 18px; border-radius: 18px; background: var(--card, #fff); color: var(--ink, #141414); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .45); }
.nw-card h2 { font-family: Anton, sans-serif; font-weight: 400; font-size: 28px; line-height: 1.1; margin: 0 0 10px; }
.nw-card p { font-size: 15px; line-height: 1.5; color: var(--muted, #5d5a53); margin: 0 0 10px; }
.nw-again { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; font-size: 14px; font-weight: 600; }
.nw-again input { width: 18px; height: 18px; accent-color: var(--ink, #141414); }
html.theme-dark .nw-card { background: #1d1d21; color: #f2f1ee; }
html.theme-dark .nw-card p { color: #b9b7b1; }

/* sign-up: the "check your Junk folder" line */
.junk-hint { margin: 2px 0 16px; line-height: 1.45; }

/* ======================= the course page: cards that read as buttons, tabs that read as places ======================= */
body.ui-next .cf-hero-top { display: flex; gap: 8px; }
body.ui-next .cd-tabs2 { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin: 16px 0 4px; border-bottom: 2px solid var(--ink); }
body.ui-next .cd-tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px 10px; border: 0; background: none; color: var(--muted); font: 800 13px Archivo, sans-serif; cursor: pointer; }
body.ui-next .cd-tab svg { opacity: .7; }
body.ui-next .cd-tab.active { color: var(--ink); }
body.ui-next .cd-tab.active svg { opacity: 1; }
body.ui-next .cd-tab.active::after { content: ""; position: absolute; left: 16%; right: 16%; bottom: -2px; height: 5px; border-radius: 4px 4px 0 0; background: var(--k, var(--ink)); }
body.ui-next .cd-tab .n { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 99px; background: var(--ink); color: var(--rb-on-ink); font-size: 11px; line-height: 17px; vertical-align: 1px; }

body.ui-next .cd-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
body.ui-next .cd-act { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 164px; padding: 14px; border: 0; border-radius: 16px; background: var(--rb-card); box-shadow: var(--rb-sh-s); color: var(--ink); text-align: left; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
body.ui-next .cd-act:active { transform: scale(.97); box-shadow: none; }
body.ui-next .cd-act-ic { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 6px; border-radius: 12px; background: var(--k); color: var(--kon); }
body.ui-next .cd-act-t { font: 400 22px/1 Anton, sans-serif; }
body.ui-next .cd-act-s { flex: 1; font: 500 13px/1.35 Archivo, sans-serif; color: var(--muted); }
body.ui-next .cd-act-s b { color: var(--ink); font-weight: 800; }
body.ui-next .cd-act-go { display: inline-flex; align-items: center; gap: 2px; margin-top: 10px; padding: 6px 8px 6px 12px; border-radius: 99px; background: var(--ink); color: var(--rb-on-ink); font: 800 12.5px Archivo, sans-serif; }

body.ui-next .cd-comm { display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 12px; padding: 16px; border: 0; border-radius: 16px; background: var(--rb-block, #141414); color: #fff; text-align: left; cursor: pointer; box-shadow: var(--rb-sh-s); transition: transform .12s ease; }
body.ui-next .cd-comm:active { transform: scale(.98); }
body.ui-next .cd-comm-ic { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--k); color: var(--kon); }
body.ui-next .cd-comm-text { flex: 1; min-width: 0; }
body.ui-next .cd-comm-text strong { display: block; margin: 2px 0; font: 400 21px/1.1 Anton, sans-serif; }
body.ui-next .cd-comm-text small { display: block; font: 600 12.5px/1.35 Archivo, sans-serif; opacity: .72; }
body.ui-next .cd-comm-go { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .14); }

body.ui-next .cf-panel h3 { display: flex; align-items: baseline; gap: 8px; }
body.ui-next .cd-edit { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding: 5px 11px; border: 0; border-radius: 99px; background: var(--ink); color: var(--rb-on-ink); font: 800 12px Archivo, sans-serif; letter-spacing: 0; text-transform: none; cursor: pointer; }

/* the colour picker */
.cc-swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 16px 0; }
.cc-sw { display: grid; place-items: center; aspect-ratio: 1; border: 0; border-radius: 50%; background: var(--c); color: var(--on); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.cc-sw.on { box-shadow: 0 0 0 3px var(--paper, #fff), 0 0 0 5px var(--ink, #141414); }
.cc-custom { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--sunk, rgba(0, 0, 0, .05)); font-weight: 700; }
.cc-custom input { width: 54px; height: 36px; padding: 0; border: 0; background: none; cursor: pointer; }
html.theme-dark body.ui-next .cd-comm { background: #2a2b31; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }

/* desktop: the course page is two columns only for its info panels (Due, Grade breakdown, Classes);
   the tabs, the four cards, Community and the other tabs run the full width */
@media (min-width: 1100px) {
  main:has(> .cf-hero) > :not(.cf-panel) { grid-column: 1 / -1; }
  body.ui-next .cd-acts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* on/off switches (notifications, settings): one clean iPhone-style switch, sized so it never squashes or
   runs into the text next to it */
body.ui-next .switch-row input[type=checkbox] {
  appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 50px; height: 30px; margin: 0;
  border: 0; border-radius: 15px; background: color-mix(in srgb, var(--ink) 18%, transparent); cursor: pointer; transition: background .18s;
}
body.ui-next .switch-row input[type=checkbox]::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .25); transition: transform .18s;
}
body.ui-next .switch-row input[type=checkbox]:checked { background: #34c759; }
body.ui-next .switch-row input[type=checkbox]:checked::after { background: #fff; transform: translateX(20px); }
body.ui-next .switch-row { justify-content: space-between; }
body.ui-next .switch-row > span { flex: 1; min-width: 0; }
body.ui-next .switch-row > input[type=checkbox] { order: 2; }
html.theme-dark body.ui-next .switch-row input[type=checkbox] { background: rgba(255, 255, 255, .2); }
html.theme-dark body.ui-next .switch-row input[type=checkbox]:checked { background: #34c759; }

/* the new-task panel on a computer: the task types wrap onto a second line instead of one long row, which
   pushed the whole form wider than the panel (it looked zoomed in and cut off on the right) */
body.ui-next .sheet .type-grid { display: flex; flex-wrap: wrap; gap: 6px; }
body.ui-next .sheet .type-grid .opt { flex: 0 0 auto; }
body.ui-next .sheet .form-grid { grid-template-columns: minmax(0, 1fr); }
body.ui-next .sheet { overflow-x: hidden; }

/* Tasks: This week as one slim row; the list's search and sort/filter behind two round buttons */
body.ui-next .nx-week { display: flex; align-items: center; gap: 10px; width: 100%; margin: 14px 0 0; padding: 13px 14px; border: 0; border-radius: 14px; background: var(--rb-card); box-shadow: var(--rb-sh-s); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
body.ui-next .nx-week strong { font-weight: 800; font-size: 15px; white-space: nowrap; }
body.ui-next .nx-week small { flex: 1; min-width: 0; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.ui-next .nx-week.is-behind small { color: var(--critical); font-weight: 700; }
body.ui-next .nx-week:active { transform: scale(.98); }
body.ui-next .nx-tools { display: flex; gap: 8px; }
body.ui-next .nx-tool { position: relative; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--rb-card); box-shadow: var(--rb-sh-s); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
body.ui-next .nx-tool.on { background: var(--ink); color: var(--rb-on-ink); }
body.ui-next .nx-tool-n { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--rb-red); color: #fff; font: 800 11px/18px Inter, sans-serif; }
body.ui-next .nx-list > .toolbar { margin-top: 12px; }
body.ui-next .nx-list > .toolbar .searchbox { flex: 1; }
body.ui-next .tf-group { margin: 16px 0 0; }
body.ui-next .tf-label { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
body.ui-next .tf-group .chips { flex-wrap: wrap; overflow: visible; }
body.ui-next .sheet .task-filters ~ .detail-actions { margin-top: 22px; }

/* Schedule search, Both: a short list that scrolls in its own box, right on top of the week */
body.ui-next .search-line { scroll-margin-top: calc(var(--safe-top, 0px) + 8px); }
body.ui-next .search-line .seg button { padding: 10px 8px; }
body.ui-next .both-list { position: relative; gap: 0; max-height: 216px; overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border-radius: 16px; box-shadow: 0 2px 10px rgba(0, 0, 0, .06); }
body.ui-next .both-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
body.ui-next .both-row:last-child { border-bottom: 0; }
body.ui-next .both-row.focus { background: var(--sun, #ffc21a); }
body.ui-next .both-row.focus, body.ui-next .both-row.focus .both-who, body.ui-next .both-row.focus .both-top span { color: #141414; }
body.ui-next .both-main { flex: 1; min-width: 0; }
body.ui-next .both-top { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; font-size: 14px; }
body.ui-next .both-top strong { font-weight: 800; }
body.ui-next .both-top span { font-size: 12.5px; color: var(--ink-2, var(--muted)); }
body.ui-next .both-who { font-size: 13px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.ui-next .both-row .section-add { flex: none; padding: 0; cursor: pointer; }
body.ui-next .both-row.chosen .section-add { background: var(--good); border-color: var(--good); color: #fff; }
body.ui-next .both-row .section-clash { margin-top: 3px; font-size: 12px; }
body.ui-next:not(.desk) .sched-split.both-on #plans-zone, body.ui-next:not(.desk) .sched-split.both-on #compare-zone, body.ui-next:not(.desk) .sched-split.both-on .sched-tools { display: none; }
body.desk.ui-next .both-list { max-height: calc(100vh - 260px); }

/* CRN list: a tool an admin turned on for the account */
.perk-box { padding: 4px 0 6px; }
.perk-box .perk-link { display: inline-flex; align-items: center; gap: 8px; cursor: grab; text-decoration: none; }
.perk-box .perk-link:active { cursor: grabbing; }
.perk-box ol { margin: 12px 0 6px 20px; padding: 0; font-size: 14px; line-height: 1.5; }
.perk-box ol li { margin: 2px 0; }
/* dark mode: search previews on the week are tinted dark paper, not white */
html.theme-dark .ghost { background: color-mix(in srgb, var(--accent) 24%, var(--surface)); color: color-mix(in srgb, var(--accent) 45%, #fff); border-color: color-mix(in srgb, var(--accent) 70%, #fff); }
html.theme-dark .ghost-clash { background: color-mix(in srgb, var(--critical) 24%, var(--surface)); color: color-mix(in srgb, var(--critical) 60%, #fff); border-color: var(--critical); }
html.theme-dark .ghost small { color: rgba(255, 255, 255, .7); }
