/* Approved Canvas-inspired production reskin. Existing classes remain API/behavior contracts. */
:root {
  --bg: #f4f5f3;
  --surface: #ffffff;
  --surface-muted: #f8f9f7;
  --ink: #2c3238;
  --muted: #687177;
  --faint: #a8aeaa;
  --line: #dde0dc;
  --accent: #9d2948;
  --accent-dark: #7f1e39;
  --accent-soft: #f7eaee;
  --blue: #647f9f;
  --blue-soft: #edf2f7;
  --green: #52784a;
  --green-soft: #eef4ea;
  --ochre: #9e7b26;
  --teal: #4e7772;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow: 0 12px 30px rgba(42, 48, 50, .075), 0 2px 7px rgba(42, 48, 50, .045);
  --ease: 180ms cubic-bezier(.2, .75, .25, 1);
  font-family: "Avenir Next", Avenir, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; background: var(--bg); color: var(--ink); font-family: inherit; }
button, input, select, textarea { font: inherit; }
[hidden] { display: none !important; }
::selection { background: #ead4da; color: var(--ink); }
* { scrollbar-width: thin; scrollbar-color: #c8cbc7 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 999px; background: #c8cbc7; background-clip: padding-box; }

.portal-skip-link { position: fixed; z-index: 1000; top: 8px; left: 140px; padding: 10px 14px; border-radius: 10px; background: var(--ink); color: #fff; transform: translateY(-150%); transition: transform var(--ease); }
.portal-skip-link:focus { transform: none; }

/* One floating navigation rail is the only served student navigation. */
.site-header {
  position: fixed;
  z-index: 80;
  inset: 18px auto 18px 18px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 98px;
  height: auto;
  min-height: 0;
  padding: 14px 8px;
  border: 1px solid rgba(214, 218, 214, .95);
  border-radius: 23px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
body.portal-drawer-open { overflow: hidden; }
.site-header .brand { display: grid; place-items: center; flex: 0 0 auto; width: 60px; height: 60px; margin: 0 auto 18px; padding: 0; border: 0; color: inherit; text-decoration: none; }
.site-header .brand-mark { display: grid; place-items: center; width: 54px; height: 54px; border: 2px solid #fff; outline: 2px solid var(--accent); border-radius: 17px; background: linear-gradient(145deg, #a63a58, #7d2039); box-shadow: 0 8px 18px rgba(157, 41, 72, .22); color: #fff; font-family: Georgia, serif; font-size: 25px; }
.brand-copy { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.student-menu-toggle { display: none !important; }
.site-header #student-primary-nav { display: flex; flex: 1; flex-direction: column; gap: 5px; min-height: 0; padding: 0; overflow-y: auto; }
.site-header #student-primary-nav a,
.portal-more { position: relative; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 3px; min-height: 67px; padding: 5px 2px; border: 0; border-radius: 15px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 560; line-height: 1.15; text-align: center; text-decoration: none; cursor: pointer; transition: color var(--ease), background var(--ease), transform var(--ease); }
.site-header #student-primary-nav a::before,
.portal-more > span:first-child { display: grid; place-items: center; width: 27px; height: 27px; color: currentColor; font-size: 21px; font-weight: 400; line-height: 1; }
.site-header #student-primary-nav a[href="#home"]::before { content: "⌂"; }
.site-header #student-primary-nav a[href="#projects"]::before { content: "≡"; transform: rotate(90deg); }
.site-header #student-primary-nav a[href="#calendar"]::before { content: "□"; }
.site-header #student-primary-nav a[href="#browse"]::before { content: "⊕"; }
.site-header #student-primary-nav a[href="#people"]::before { content: "♧"; }
.site-header #student-primary-nav a[href="#messages"]::before { content: "▱"; }
.site-header #student-primary-nav a[href="#resources"]::before { content: "▦"; }
.site-header #student-primary-nav a[href="#requests"]::before { content: "▤"; }
.site-header #student-primary-nav a[data-command-center]::before { content: "⚙"; }
.site-header #student-primary-nav a:hover,
.site-header #student-primary-nav a.is-active,
.portal-more:hover,
.portal-more.is-active { background: var(--accent-soft); color: var(--accent); transform: translateY(-1px); }
.site-header #student-primary-nav a.is-active::after,
.portal-more.is-active::after { content: ""; position: absolute; top: 18%; bottom: 18%; left: -8px; width: 3px; border-radius: 4px; background: var(--accent); }
.site-header #student-primary-nav a[href="#messages"],
.site-header #student-primary-nav a[href="#resources"],
.site-header #student-primary-nav a[href="#requests"] { display: none; }
.portal-more { flex: 0 0 auto; width: 100%; margin-top: 4px; }
.portal-more > span:first-child { letter-spacing: 2px; }
.portal-more > span:last-child { font-size: 10px; }

body > .header-actions { position: fixed; z-index: 90; top: 26px; right: 34px; display: flex; align-items: center; gap: 10px; }
.header-actions .main-site { display: inline-flex; align-items: center; min-height: 45px; padding: 0 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .9); box-shadow: 0 5px 16px rgba(43, 50, 54, .045); color: var(--muted); font-size: 13px; text-decoration: none; }
.header-actions .icon-button,
.header-actions .avatar { position: relative; display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: 0 5px 16px rgba(43, 50, 54, .045); color: var(--ink); }
.header-actions .avatar { border: 0; background: var(--accent); color: #fff; font-size: 12px; font-weight: 760; text-decoration: none; }
.header-actions .icon-button svg { width: 20px; height: 20px; }
.header-actions .icon-button i { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; background: var(--accent); }

/* Additional destinations use one shared sheet on desktop and mobile. */
.portal-drawer-backdrop { position: fixed; z-index: 300; inset: 0; display: grid; justify-items: end; background: rgba(31, 41, 53, .3); opacity: 0; transition: opacity var(--ease); }
.portal-drawer-backdrop[hidden] { display: none; }
.portal-drawer-backdrop.is-open { opacity: 1; }
.portal-drawer { width: min(400px, calc(100vw - 20px)); height: 100%; padding: 25px; overflow: auto; border-left: 1px solid var(--line); background: var(--surface); box-shadow: -20px 0 50px rgba(38, 49, 59, .16); transform: translateX(30px); transition: transform var(--ease); }
.portal-drawer-backdrop.is-open .portal-drawer { transform: none; }
.portal-drawer > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.portal-drawer > header span { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.portal-drawer h2 { margin: 3px 0 0; font-size: 29px; letter-spacing: -.04em; }
.portal-drawer-close { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); font-size: 25px; }
.portal-drawer nav { display: grid; }
.portal-drawer nav a { display: grid; grid-template-columns: 1fr 20px; min-height: 78px; padding: 15px 4px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.portal-drawer nav a::after { content: "›"; grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--muted); font-size: 24px; }
.portal-drawer nav b, .portal-drawer nav small { display: block; }
.portal-drawer nav small { margin-top: 4px; color: var(--muted); }

/* Shared live page canvas. */
#student-page-root,
main.page-shell { width: auto; max-width: 1540px; min-height: 100vh; margin: 0 24px 0 132px; padding: 92px 12px 80px; }
.student-page { max-width: none; margin: 0; padding: 0; animation: portal-page-in 280ms var(--ease); }
@keyframes portal-page-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.sp-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; min-height: 74px; margin: 0 0 25px; padding-right: 270px; border: 0; }
.sp-title > div > span,
.sp-title > span:first-child { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.sp-title h1 { margin: 4px 0 0; color: var(--ink); font-size: clamp(28px, 3vw, 39px); line-height: 1.05; letter-spacing: -.045em; }
.sp-title p { max-width: 720px; margin: 7px 0 0; color: var(--muted); line-height: 1.5; }
.sp-live-state { align-self: center; margin-left: 8px; padding: 5px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green) !important; font-size: 9px !important; letter-spacing: .05em !important; }
.sp-live-state.loading { background: var(--blue-soft); color: var(--blue) !important; }
.sp-live-state.error { background: #fff0ef; color: #b04040 !important; }

.sp-surface,
.card,
.browse-card,
.my-project-row,
.request-types article,
.calendar-grid,
.people-table,
.my-project-toolbar,
.my-project-summary,
.month-totals,
.member-messenger .mm-layout,
.rwt-tab-heading,
.rwt-tab-card,
.rwt-doc-table,
.rwt-document-preview { border: 1px solid rgba(218, 221, 217, .95); border-radius: var(--radius-lg); background: rgba(255, 255, 255, .94); box-shadow: var(--shadow); }
.sp-surface { padding: 20px; }
.sp-section-head,
.sp-surface > header,
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.sp-section-head h2,
.sp-surface h2,
.card h2 { color: var(--ink); letter-spacing: -.025em; }
.sp-section-head h2, .sp-surface > h2 { margin: 0; font-size: 21px; }
.sp-section-head a { display: inline-flex; min-height: 40px; align-items: center; }
.sp-section-head a,
.student-page a:not(.sp-project-card > a):not(.browse-card a):not(.my-project-row > a) { color: var(--accent); }
.sp-empty, .v2-empty, .sp-filter-empty { padding: 34px 16px !important; color: var(--muted) !important; text-align: center; }

.sp-button,
.button,
.text-button,
.rwt-tab-button,
.v2-button,
.pe-btn,
.te-button { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-weight: 680; text-decoration: none; cursor: pointer; transition: transform var(--ease), border-color var(--ease), background var(--ease), box-shadow var(--ease); }
.sp-button:hover,
.button:hover,
.rwt-tab-button:hover,
.v2-button:hover,
.pe-btn:hover,
.te-button:hover { border-color: #c9b5bb; background: #fffafa; transform: translateY(-1px); }
.sp-button.submit,
.button-primary,
.rwt-tab-button.primary,
.v2-button.primary,
.pe-btn.primary,
.te-button.primary { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 7px 15px rgba(157, 41, 72, .16); }
.sp-button.submit:hover,
.button-primary:hover,
.rwt-tab-button.primary:hover,
.v2-button.primary:hover,
.pe-btn.primary:hover,
.te-button.primary:hover { border-color: var(--accent-dark); background: var(--accent-dark); }
.text-button, .rwt-inline-link { min-height: 38px; padding: 7px 8px; border: 0; background: transparent; color: var(--accent); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(157, 41, 72, .2); outline-offset: 2px; }

/* Home: project color fields are the signature differentiator. */
.attention { margin: 0 0 24px; padding: 18px 22px; border: 1px solid #ead4da; border-radius: var(--radius-lg); background: linear-gradient(110deg, #fff7f9, #fff); box-shadow: var(--shadow); }
.attention h2 { margin: 0 0 12px; color: var(--accent); font-size: 11px; letter-spacing: .09em; text-transform: uppercase; }
.attention > div { display: flex; flex-wrap: wrap; gap: 9px; }
.attention a { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 12px; border-radius: 12px; background: #fff; color: var(--ink) !important; text-decoration: none; }
.attention .dot { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.attention em { color: var(--muted); font-style: normal; }
.sp-home-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, .42fr); align-items: start; gap: 22px; }
.sp-home-grid > .projects { padding: 0; border: 0; background: transparent; box-shadow: none; }
.sp-home-grid > .projects .sp-section-head { margin: 0 0 14px; }
.sp-project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.sp-project-card { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 7px 13px; min-height: 280px; padding: 112px 18px 18px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); }
.sp-project-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 92px; background: radial-gradient(circle at 15px 14px, transparent 0 15px, rgba(255,255,255,.18) 16px 17px, transparent 18px), linear-gradient(135deg, #84933a, #737f2f); background-size: 62px 62px, auto; }
.sp-project-card::after { content: "ψ"; position: absolute; top: 25px; left: 50%; color: rgba(255,255,255,.92); font-size: 37px; transform: translateX(-50%); }
.sp-project-card:nth-child(4n+2)::before { background-color: #a18128; background-image: radial-gradient(circle at 15px 14px, transparent 0 15px, rgba(255,255,255,.18) 16px 17px, transparent 18px), linear-gradient(135deg, #b39129, #8c6d1f); }
.sp-project-card:nth-child(4n+3)::before { background-color: #4f7772; background-image: radial-gradient(circle at 15px 14px, transparent 0 15px, rgba(255,255,255,.18) 16px 17px, transparent 18px), linear-gradient(135deg, #688d88, #486d68); }
.sp-project-card:nth-child(4n+4)::before { background-color: #607b9b; background-image: radial-gradient(circle at 15px 14px, transparent 0 15px, rgba(255,255,255,.18) 16px 17px, transparent 18px), linear-gradient(135deg, #748eab, #58708d); }
.sp-project-card h3 { grid-column: 1 / -1; margin: 0; color: var(--ink); font-size: 17px; }
.sp-project-card .sp-row { display: contents; }
.sp-project-card .sp-pill { grid-column: 2; grid-row: 2; align-self: center; }
.sp-project-card .sp-field { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.sp-project-card > b, .sp-project-card > strong { font-size: 12px; }
.sp-project-card .sp-progress { grid-column: 1 / -1; height: 1px; margin: 5px 0; background: var(--line); }
.sp-project-card > a { display: inline-flex; grid-column: 1 / -1; align-self: end; min-height: 40px; align-items: center; color: var(--accent); font-size: 12px; font-weight: 750; text-decoration: none; }
.sp-pill, .chip { display: inline-flex; align-items: center; width: max-content; min-height: 25px; padding: 0 9px; border: 0; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 10px; font-weight: 740; }
.sp-pill.green, .chip-active { background: var(--green-soft); color: var(--green); }
.sp-right-stack { display: grid; gap: 18px; }
.work-list { margin: 10px 0 0; padding: 0; list-style: none; }
.work-list li { display: grid; grid-template-columns: 20px minmax(0,1fr) auto; gap: 3px 9px; min-height: 68px; padding: 11px 0; border-top: 1px solid var(--line); }
.work-list li:first-child { border-top: 0; }
.work-list input { grid-row: 1 / span 2; width: 24px; height: 24px; margin: 0; align-self: center; accent-color: var(--accent); }
.work-list b, .work-list > li > span { min-width: 0; }
.work-list b a, .work-list > li > span a { display: block; overflow: hidden; color: inherit; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.work-list > li > span { color: var(--muted); font-size: 11px; }
.work-list time { grid-column: 3; grid-row: 1; color: var(--muted); font-size: 10px; }
.work-list .priority { grid-column: 3; grid-row: 2; justify-self: end; padding: 3px 6px; border: 0; border-radius: 6px; background: var(--surface-muted); font-size: 8px; font-style: normal; text-transform: uppercase; }
.upcoming > div { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; min-height: 66px; border-top: 1px solid var(--line); }
.upcoming > div:first-of-type { margin-top: 9px; }
.upcoming time { display: grid; place-items: center; padding: 4px; border: 1px solid var(--line); border-radius: 9px; font-size: 15px; }
.upcoming time b { color: var(--accent); font-size: 8px; }
.upcoming p { margin: 0; }
.upcoming p strong, .upcoming p span { display: block; }
.upcoming p span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.upcoming em { color: var(--muted); font-size: 9px; font-style: normal; text-transform: uppercase; }

/* Directories, search, cards, and tables. */
.my-project-summary { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 16px; overflow: hidden; }
.my-project-summary > span { display: grid; min-height: 100px; align-content: center; padding: 16px 20px; border-left: 1px solid var(--line); color: var(--muted); }
.my-project-summary > span:first-child { border-left: 0; }
.my-project-summary b { display: block; color: var(--ink); font-size: 29px; line-height: 1; }
.my-project-toolbar,
.browse-filters,
.people-filters,
.resource-filter { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 15px 18px; }
.browse-filters, .people-filters, .resource-filter { border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); }
.my-project-toolbar label:first-child,
.browse-filters > label,
.directory-search,
.resource-filter label { display: flex; align-items: center; flex: 1; min-height: 43px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--muted); }
.my-project-toolbar input,
.browse-filters input,
.directory-search input,
.resource-filter input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); }
.my-project-toolbar label:nth-child(2) { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 700; }
.my-project-toolbar select,
.people-filter-row select { min-height: 43px; padding: 0 34px 0 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }
.my-project-count { margin-left: auto; color: var(--muted); font-size: 12px; }
.my-project-list { display: grid; grid-template-columns: 1fr; gap: 13px; }
.my-project-row { position: relative; display: grid; grid-template-columns: minmax(250px,1.1fr) minmax(390px,1.6fr) auto; gap: 18px; align-items: center; min-height: 112px; padding: 18px 20px 18px 28px; overflow: hidden; }
.my-project-accent { position: absolute; inset: 0 auto 0 0; width: 8px; background: linear-gradient(#84933a, #737f2f); }
.my-project-row:nth-child(4n+2) .my-project-accent { background: linear-gradient(#b39129, #8c6d1f); }
.my-project-row:nth-child(4n+3) .my-project-accent { background: linear-gradient(#688d88, #486d68); }
.my-project-row:nth-child(4n+4) .my-project-accent { background: linear-gradient(#748eab, #58708d); }
.my-project-main > div { display: flex; align-items: center; gap: 8px; }
.my-project-main h2 { margin: 0; font-size: 18px; }
.my-project-main p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.my-project-row dl { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin: 0; }
.my-project-row dt { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.my-project-row dd { margin: 4px 0 0; font-size: 12px; font-weight: 650; }
.my-project-row > a { color: var(--accent); font-weight: 750; text-decoration: none; }

.browse-filters > div, .calendar-controls .switch { display: flex; gap: 0; padding: 3px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-muted); }
.browse-filters > div button, .calendar-controls .switch button { min-height: 36px; padding: 0 13px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); }
.browse-filters > div button.selected, .calendar-controls .switch button.selected { background: var(--accent); color: #fff; box-shadow: 0 4px 10px rgba(157,41,72,.16); }
.your-requests { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; padding: 15px 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; }
.your-requests h2 { margin: 0; font-size: 16px; }
.your-requests a { color: var(--accent); text-decoration: none; }
.browse-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.browse-card { position: relative; min-height: 360px; padding: 92px 18px 18px; overflow: hidden; }
.browse-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 74px; background: radial-gradient(circle at 18px 16px, transparent 0 14px, rgba(255,255,255,.18) 15px 16px, transparent 17px), linear-gradient(135deg, #668c87, #4b716c); background-size: 58px 58px, auto; }
.browse-card:nth-child(3n+2)::before { background-image: radial-gradient(circle at 18px 16px, transparent 0 14px, rgba(255,255,255,.18) 15px 16px, transparent 17px), linear-gradient(135deg, #b39129, #8c6d1f); }
.browse-card:nth-child(3n+3)::before { background-image: radial-gradient(circle at 18px 16px, transparent 0 14px, rgba(255,255,255,.18) 15px 16px, transparent 17px), linear-gradient(135deg, #748eab, #58708d); }
.browse-card .sp-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.browse-card h3 { margin: 0; font-size: 18px; }
.browse-card > p { min-height: 54px; color: var(--muted); line-height: 1.5; }
.browse-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.browse-meta > div, .browse-foot > div { padding-top: 10px; border-top: 1px solid var(--line); }
.browse-meta span, .browse-foot span { display: block; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.browse-meta b, .browse-foot b { display: block; margin-top: 4px; font-size: 11px; }
.browse-foot { display: grid; grid-template-columns: 1.2fr .8fr; gap: 8px; margin-top: 10px; }
.browse-foot p { display: flex; flex-wrap: wrap; gap: 4px; margin: 5px 0 0; }
.browse-foot i { padding: 4px 6px; border-radius: 7px; background: var(--blue-soft); color: var(--blue); font-size: 9px; font-style: normal; }
.browse-actions { display: flex; align-items: center; gap: 8px; margin-top: 15px; }
.browse-actions > a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }

/* Calendar, people, resources, requests, and messages keep all live behavior. */
.calendar-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; padding: 15px 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); }
.calendar-month-label { margin: 0 auto 0 5px; color: var(--ink); font-size: 16px; }
.filter-chip { padding: 6px 8px; border-radius: 8px; background: var(--surface-muted); color: var(--muted); font-size: 10px; font-weight: 700; }
.filter-chip.key { color: var(--accent); }.filter-chip.task { color: var(--blue); }.filter-chip.meeting { color: var(--ochre); }
.calendar-layout { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(280px,.7fr); gap: 18px; }
.calendar-grid { overflow: hidden; padding: 18px; }
.calendar-grid > header, .calendar-days { display: grid; grid-template-columns: repeat(7,1fr); }
.calendar-grid > header { padding: 7px 0; color: var(--muted); font-size: 9px; font-weight: 800; text-align: center; }
.calendar-days { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; }
.cal-day { min-height: 92px; padding: 7px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: #fff; }
.cal-day:nth-child(-n+7) { border-top: 0; }.cal-day:nth-child(7n+1) { border-left: 0; }
.cal-day time { font-size: 11px; }
.cal-day.out { background: var(--surface-muted); }
.cal-event { display: block; margin-top: 4px; padding: 4px; overflow: hidden; border-radius: 5px; background: var(--blue-soft); color: var(--blue) !important; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.calendar-side .sp-surface { padding: 17px; }
.calendar-side ol, .sp-agenda-live ol { margin: 10px 0 0; padding: 0; list-style: none; }
.calendar-side li, .sp-agenda-live li { display: grid; grid-template-columns: 78px 1fr auto; gap: 10px; align-items: center; min-height: 64px; border-top: 1px solid var(--line); }
.calendar-side li a, .sp-agenda-live li a { color: var(--ink) !important; text-decoration: none; }
.calendar-side li strong, .calendar-side li span { display: block; }.calendar-side li span { color: var(--muted); font-size: 10px; }
.calendar-side li em, .sp-agenda-live li em { color: var(--muted); font-size: 9px; font-style: normal; text-transform: uppercase; }
.month-totals { display: grid; grid-template-columns: 1.15fr repeat(3,1fr); margin-top: 16px; overflow: hidden; }
.month-totals button { min-height: 72px; border: 0; border-left: 1px solid var(--line); background: #fff; color: var(--ink); text-align: left; }
.month-totals button:first-child { border-left: 0; }.month-totals button.selected { background: var(--accent-soft); box-shadow: inset 0 -3px var(--accent); color: var(--accent); }

.people-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(250px,.28fr); gap: 18px; }
.people-filters { display: block; }
.people-filter-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) auto; gap: 10px; margin-top: 12px; }
.people-filter-row label { display: grid; gap: 5px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.people-filter-row button { align-self: end; min-height: 43px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--accent); }
.member-count { color: var(--muted); font-size: 12px; }
.people-table { overflow: hidden; }
.people-table > header, .people-table li { display: grid; grid-template-columns: 1.55fr .72fr 1.1fr 1.2fr .65fr; gap: 16px; align-items: center; min-height: 66px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.people-table > header { min-height: 40px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.people-table ul { margin: 0; padding: 0; list-style: none; }
.people-table li:last-child { border-bottom: 0; }
.person-photo { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.profile-card { position: sticky; top: 92px; }
.profile-top { display: flex; align-items: center; gap: 11px; margin: 15px 0; }
.profile-top p, .profile-top b, .profile-top span { display: block; margin: 0; }.profile-top span { margin-top: 3px; color: var(--muted); font-size: 11px; }

.resource-tabs { display: flex; gap: 5px; margin-bottom: 14px; overflow-x: auto; }
.resource-tabs button { min-height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); white-space: nowrap; }
.resource-tabs button.selected { background: var(--accent-soft); color: var(--accent); font-weight: 750; }
.resource-filter { padding: 9px; }
.resource-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; }
.resource-list ul { margin: 8px 0 0; padding: 0; list-style: none; }
.resource-list li { display: grid; grid-template-columns: 70px 1fr auto auto; gap: 12px; align-items: center; min-height: 70px; border-top: 1px solid var(--line); }
.resource-list time { color: var(--accent); font-weight: 700; }.resource-list time b, .resource-list p strong, .resource-list p span { display: block; }.resource-list p span { color: var(--muted); font-size: 11px; }
.common-links { margin-top: 16px; }.common-links > div { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 12px; }.common-links a { padding: 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink) !important; text-decoration: none; }

.request-types { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.request-types article { display: grid; align-content: start; min-height: 240px; padding: 22px; }
.request-types article > b { display: grid; place-items: center; width: 45px; height: 45px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); font-size: 22px; }
.request-types h2 { margin: 18px 0 5px; }.request-types p { color: var(--muted); line-height: 1.5; }.request-types .sp-button { align-self: end; justify-self: start; margin-top: auto; }
.request-table { margin-top: 18px; }.request-table > header, .sp-request-row { border-color: var(--line) !important; }.request-table h2 { padding: 0 4px; }

.member-messenger { max-width: none; }
.member-messenger .mm-layout { overflow: hidden; border-radius: var(--radius-lg); }
.mm-safety { border: 1px solid #eadcae; border-radius: var(--radius-md); background: #fff9e8; }
.mm-thread-link.active { background: var(--accent-soft); box-shadow: inset 4px 0 var(--accent); }.mm-thread-link i { border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.mm-message-list { background: var(--surface-muted); }.mm-message-list li > div { border-radius: 15px 15px 15px 5px; background: #fff; box-shadow: 0 5px 14px rgba(40,48,52,.05); }.mm-message-list li.mine > div { border-radius: 15px 15px 5px 15px; background: var(--accent); }

/* Project workspace and all existing tabs/editors are reskinned, not replaced with fake data. */
.project-heading { position: relative; display: grid; grid-template-columns: 175px minmax(0,1fr) auto; align-items: stretch; min-height: 176px; margin: 0 0 18px; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); }
.project-identity-art { display: grid; place-items: center; background: radial-gradient(circle at 18px 16px, transparent 0 15px, rgba(255,255,255,.17) 16px 17px, transparent 18px), linear-gradient(135deg, #748eab, #58708d); background-size: 64px 64px, auto; }
.project-identity-art span { color: rgba(255,255,255,.94); font-size: 48px; }
.project-heading-copy { align-self: center; padding: 24px; }
.project-heading h1 { margin: 0; color: var(--ink); font-size: clamp(27px,3vw,38px); letter-spacing: -.045em; }
.project-heading p { margin: 8px 0 0; color: var(--muted); }
.project-actions { display: flex; align-content: center; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 22px; }
.project-grid { display: grid; grid-template-columns: minmax(0,1.75fr) minmax(300px,.78fr); gap: 21px; }
.primary-column, .side-rail { display: grid; align-content: start; gap: 17px; min-width: 0; }
.update-composer { padding: 17px 19px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); }
.update-composer label { display: block; margin-bottom: 8px; font-weight: 750; }.composer-row { display: flex; gap: 8px; }.composer-row input { flex: 1; min-height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; }
.expectations { display: flex; align-items: center; gap: 10px; padding: 12px 15px; border: 1px solid #eadcae; border-radius: var(--radius-md); background: #fff9e8; color: #725d22; }.expectations p { margin: 0; }.expectation-icon { display: grid; place-items: center; flex: 0 0 25px; width: 25px; height: 25px; border-radius: 50%; background: #fff; }
.tabs { display: flex; gap: 4px; padding: 5px; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.9); box-shadow: 0 5px 18px rgba(43,50,54,.035); }
.tabs button { min-width: max-content; min-height: 40px; padding: 0 14px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-weight: 650; }.tabs button.active { background: var(--accent-soft); color: var(--accent); }
.card { padding: 20px; }.card-head h2 { margin: 0; font-size: 18px; }.card-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.summary-card #summary-text { color: #4c555c; line-height: 1.65; }
.activity-filters { border-color: var(--line); border-radius: 10px; background: var(--surface-muted); }.activity-filters button { min-height: 34px; border-radius: 8px; color: var(--muted); }.activity-filters button.active { background: #fff; color: var(--accent); }
.updates-list, .phase-list, .team-list, .resources-list { padding: 0; list-style: none; }
.activity-list li, .key-date, .team-list li, .resources-list li { border-color: var(--line); }
.phase-list li.current { border-radius: 11px; background: var(--blue-soft); }
.side-rail .card { box-shadow: 0 9px 24px rgba(42,48,50,.055); }

#candidate-tab-content .rwt-tab { color: var(--ink); }
.rwt-tab-heading { padding: 17px 19px; border-radius: var(--radius-lg); }.rwt-tab-heading h2 { color: var(--ink); font-size: 21px; }.rwt-tab-heading p { color: var(--muted); }
.rwt-segmented { min-height: 40px; padding: 3px; border-color: var(--line); border-radius: 12px; background: var(--surface-muted); }.rwt-segmented button { border: 0; border-radius: 9px; background: transparent; color: var(--muted); }.rwt-segmented button.active { background: var(--accent); color: #fff; }
.rwt-phase-progress { border-color: #d7e1dc; border-radius: var(--radius-md); background: #f7faf7; }.rwt-progress-track i { background: var(--green); }
.rwt-kanban { gap: 12px; }.rwt-kanban-column { border-color: var(--line); border-top-width: 1px; border-radius: var(--radius-md); background: var(--surface-muted); }.rwt-kanban-column.in-progress { border-color: #d9e0e6; background: #f5f8fa; }.rwt-kanban-column.blocked { border-color: #e8dec3; background: #fffaf0; }.rwt-kanban-column.done { border-color: #d8e3d5; background: #f4f8f2; }
.rwt-task-card { padding: 13px; border-color: var(--line); border-radius: 12px; box-shadow: 0 5px 14px rgba(40,48,52,.04); }.rwt-task-title { color: var(--ink); font-size: 13px; }.rwt-kanban-add { min-height: 40px; border-radius: 10px; color: var(--accent); }
.rwt-file-pane, .rwt-calendar-layout { gap: 16px; }.rwt-doc-table, .rwt-document-preview, .rwt-tab-card { border-radius: var(--radius-lg); }.rwt-meeting-overview article, .rwt-meeting-flow { border-color: var(--line); border-radius: var(--radius-md); }.rwt-meeting-flow .step.complete { border-color: var(--green); background: var(--green); }
.rwt-byline-list, .rwt-contribution-table { border-color: var(--line); border-radius: var(--radius-lg); background: #fff; }.rwt-calendar { border-color: var(--line); border-radius: var(--radius-lg); }

/* Every production editor/dialog uses the same sheet language. */
.v2-modal-backdrop,
.sp-dialog-backdrop,
.pe-sheet-backdrop,
.pe-popover-backdrop,
.te-sheet-shade,
.te-picker-shade { background: rgba(31,41,53,.34); backdrop-filter: blur(2px); }
.v2-modal,
.sp-dialog,
.pe-sheet,
.te-modal,
.pe-popover,
.te-picker { border: 1px solid var(--line); border-radius: 18px; background: var(--surface-muted); box-shadow: -18px 20px 52px rgba(38,49,59,.2); color: var(--ink); }
.pe-sheet-head, .te-head, .v2-modal header { border-color: var(--line); background: #fff; }.pe-kicker, .te-kicker, .v2-kicker, .sp-dialog > span { color: var(--accent); }.pe-section, .te-group, .pl-editor, .v2-credit-fieldset, .v2-action-review { border-color: var(--line); border-radius: var(--radius-md); background: #fff; }
.pe-field input, .pe-field textarea, .pe-field select, .te-field input, .te-field textarea, .te-field select, .sp-dialog input, .sp-dialog textarea, .sp-dialog select, .v2-modal input, .v2-modal textarea, .v2-modal select { min-height: 42px; border-color: var(--line); border-radius: 10px; color: var(--ink); }
.pe-sheet-foot, .te-foot, .v2-modal footer { border-color: var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.sp-notifications { top: 82px; right: 32px; overflow: hidden; border-color: var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow); }
.sp-toast, .v2-toast { right: 24px; bottom: 24px; border: 0; border-radius: 13px; background: var(--ink); color: #fff; box-shadow: 0 16px 38px rgba(38,49,59,.22); }

/* Loading, error, and auth remain honest and visually native to the reskin. */
.sp-page-skeleton { --sk-base: #e8ebe7; --sk-light: #f8f9f7; }.sp-skeleton-card, .sp-skeleton-work, .sp-skeleton-calendar > section, .sp-skeleton-calendar > aside, .sp-skeleton-resource-grid > section, .sp-skeleton-links, .sp-skeleton-request-table { border-color: var(--line); border-radius: var(--radius-lg); }
.sp-error-page { min-height: 540px; padding: 70px 25px; border: 1px solid #ead4da; border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); }
.v2-project-load-error { border-color: #ead4da; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.rwt-auth-shell { background: var(--bg); }.rwt-auth-card { border-color: var(--line); border-radius: 22px; box-shadow: var(--shadow); }

@media (max-width: 1180px) {
  .sp-home-grid, .calendar-layout, .people-layout, .project-grid { grid-template-columns: 1fr; }
  .sp-right-stack { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .people-side { display: none; }
  .side-rail { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .browse-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .my-project-row { grid-template-columns: minmax(230px,1fr) 1.3fr auto; }
  .my-project-row dl { grid-template-columns: 1fr 1fr; }.my-project-row dl > div:last-child { display: none; }
}

@media (max-width: 760px) {
  body { padding-bottom: 94px; }
  .portal-skip-link { left: 16px; }
  .site-header { inset: auto 12px 10px; display: grid; grid-template-columns: minmax(0,1fr) 64px; width: auto; height: 74px; min-height: 74px; padding: 7px; border-radius: 22px; }
  .site-header .brand, .student-menu-toggle { display: none !important; }
  .site-header #student-primary-nav { position: static; inset: auto; display: grid; grid-template-columns: repeat(4,1fr); width: auto; padding: 0; overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .site-header #student-primary-nav a { display: none; min-height: 58px; border-radius: 15px; }
  .site-header #student-primary-nav a[href="#home"], .site-header #student-primary-nav a[href="#projects"], .site-header #student-primary-nav a[href="#calendar"], .site-header #student-primary-nav a[href="#messages"] { display: flex; }
  .site-header #student-primary-nav a[href="#messages"] { display: flex; }
  .site-header #student-primary-nav a.is-active::after, .portal-more.is-active::after { inset: auto 24% -7px; width: auto; height: 3px; }
  .portal-more { min-height: 58px; margin: 0; border-radius: 15px; }
  body > .header-actions { top: 16px; right: 16px; }
  .header-actions .main-site { display: none; }
  .header-actions .icon-button { width: 43px; height: 43px; }
  .header-actions .avatar { width: 43px; height: 43px; }
  #student-page-root { margin: 0; padding: 18px 16px 36px; overflow-x: clip; }
  main.page-shell { margin: 0; padding: 76px 16px 36px; overflow-x: clip; }
  .sp-title { min-height: 57px; margin-bottom: 18px; padding: 0 104px 0 0; align-items: flex-start; flex-direction: column; }
  .sp-title > div > span { display: none; }.sp-title h1 { font-size: 25px; }.sp-title p { font-size: 12px; }
  .sp-title-actions { width: 100%; }.sp-title-actions .sp-button { min-height: 38px; }
  .attention { padding: 17px; }.attention > div { display: grid; }.attention a { width: 100%; }
  .sp-project-grid, .browse-grid, .request-types, .resource-grid, .common-links > div { grid-template-columns: 1fr; }
  .sp-right-stack, .side-rail { grid-template-columns: 1fr; }
  .sp-project-card { min-height: 250px; }
  .my-project-summary { grid-template-columns: repeat(2,1fr); }.my-project-summary > span:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }.my-project-summary > span:nth-child(4) { border-top: 1px solid var(--line); }
  .my-project-toolbar, .browse-filters, .people-filters { align-items: stretch; flex-direction: column; }
  .my-project-toolbar label:first-child, .browse-filters > label { width: 100%; }.my-project-count { margin-left: 0; }
  .my-project-row { grid-template-columns: 1fr auto; min-height: 100px; padding: 16px 15px 16px 23px; }.my-project-row dl { display: none; }.my-project-main p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .browse-filters > div { align-self: flex-start; }.browse-card { min-height: 340px; }
  .calendar-controls { align-items: flex-start; }.calendar-month-label { order: -1; width: 100%; margin: 0; }.filter-chip { font-size: 9px; }
  .calendar-grid { padding: 9px; overflow-x: auto; }.calendar-grid > header, .calendar-days { min-width: 620px; }.calendar-side { display: none; }
  .month-totals { grid-template-columns: repeat(3,1fr); }.month-total-label { display: none; }.month-totals button:nth-child(2) { border-left: 0; }
  .people-filter-row { grid-template-columns: 1fr 1fr; }.people-table > header { display: none; }.people-table li { grid-template-columns: 1fr auto; padding: 12px 14px; }.people-table li > *:nth-child(n+2):not(:last-child) { display: none; }
  .resource-list li { grid-template-columns: 60px 1fr auto; }.resource-list li > *:nth-child(3) { display: none; }
  .request-types article { min-height: 210px; }
  .member-messenger .mm-layout { border-radius: var(--radius-lg); }.mm-sidebar ol { max-height: 210px; }.mm-thread { min-height: 430px; }
  .project-heading { grid-template-columns: 1fr; min-height: 0; }.project-identity-art { min-height: 135px; }.project-heading-copy { padding: 21px 20px 5px; }.project-heading h1 { font-size: 28px; }.project-actions { justify-content: flex-start; padding: 17px 20px 21px; }.project-actions .button-secondary { display: none; }
  .composer-row { align-items: stretch; }.composer-row input { min-width: 0; }.expectations { font-size: 11px; }
  .card { padding: 16px; }.card-head { align-items: flex-start; flex-wrap: wrap; }.activity-actions { width: 100%; overflow-x: auto; }.activity-actions > .text-button { display: none; }
  .tabs { max-width: 100%; }.tabs button { flex: 0 0 auto; }
  .rwt-tab-heading { align-items: flex-start; flex-direction: column; }.rwt-tab-actions { justify-content: flex-start; flex-wrap: wrap; }.rwt-kanban { grid-template-columns: repeat(4,250px); }
  .v2-modal-backdrop, .sp-dialog-backdrop, .te-sheet-shade { align-items: end; padding: 0; }.v2-modal, .sp-dialog, .te-modal { width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; }.pe-sheet { width: 100%; }.pe-sheet-head, .pe-form { padding-left: 18px; padding-right: 18px; }
  .sp-notifications { top: 70px; right: 12px; }
  .sp-toast, .v2-toast { right: 16px; bottom: 98px; left: 16px; max-width: none; }
  .portal-drawer { width: 100%; padding-bottom: 105px; }
}

@media (max-width: 430px) {
  .site-header { grid-template-columns: minmax(0,1fr) 56px; }
  .site-header #student-primary-nav a, .portal-more { font-size: 9px; }
  .site-header #student-primary-nav a::before, .portal-more > span:first-child { width: 23px; height: 23px; font-size: 19px; }
  .sp-title { padding-right: 98px; }.sp-title h1 { font-size: 23px; }
  .sp-project-card { padding-right: 15px; padding-left: 15px; }
  .people-filter-row { grid-template-columns: 1fr; }
  .month-totals button { padding: 9px; }
  .project-actions { gap: 6px; }.chip { font-size: 9px; }.button { padding: 0 11px; }
  .update-composer { padding: 14px; }.composer-row { display: grid; grid-template-columns: 1fr auto; }.composer-row .button { padding: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .student-page { animation: none; }
  .portal-drawer-backdrop,
  .portal-drawer,
  .site-header #student-primary-nav a,
  .portal-more,
  .sp-button,
  .button,
  .rwt-tab-button,
  .v2-button,
  .pe-btn,
  .te-button { transition: none; }
}
