/* Cedar Gradebook. The color tokens are shared by the public and signed-in views. */
:root {
  color-scheme: light;
  --canvas: #f6f7f3;
  --surface: #ffffff;
  --inset: #f2f5f0;
  --tint: #e5efe7;
  --ink: #192b25;
  --muted: #52625a;
  --faint: #64716a;
  --line: #d8dfd8;
  --strong-line: #a6b4aa;
  --brand: #185443;
  --brand-hover: #0b3b2c;
  --on-brand: #ffffff;
  --hero: #113c32;
  --hero-text: #f6f4e9;
  --gold: #d9bc7c;
  --rust: #965335;
  --danger: #993e35;
  --danger-bg: #faf0ec;
  --warning: #79541c;
  --warning-bg: #f9eed7;
  --focus: #166781;
  --shadow: 0 .32rem 1rem rgb(27 54 38 / .04);
  --sans: "Inter", "Segoe UI", Tahoma, Arial, sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}
:root[data-theme="dark"], [data-theme="dark"], .dark {
  color-scheme: dark;
  --canvas: #14201c; --surface: #1b2a24; --inset: #22352c; --tint: #2d483a;
  --ink: #f1f3ec; --muted: #c3cfc5; --faint: #aabbb0;
  --line: #3b4c41; --strong-line: #6d8273;
  --brand: #9dd6b5; --brand-hover: #bbebcd; --on-brand: #10291d;
  --hero: #123e33; --rust: #e5a988; --danger: #f4aaa0;
  --danger-bg: #422923; --warning: #f3d592; --warning-bg: #403522;
  --focus: #9edbe8; --shadow: none;
}
*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--canvas); color: var(--ink); font: 1rem/1.55 var(--sans);
  -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility;
}
[lang="ar"], .rtl { --sans: Tahoma, "Segoe UI", Arial, sans-serif; --serif: "Segoe UI", Tahoma, Arial, sans-serif; }
[lang="ar"] { line-height: 1.75; }
[lang="ar"] :is(.kicker, .eyebrow, th, h1, h2, h3, .brand-title), [dir="rtl"] :is(.kicker, .eyebrow, th) { letter-spacing: normal; }
[hidden] { display: none !important; }
::selection { background: #c9dfc8; color: #133b2b; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
button, select, input, textarea { color: inherit; font: inherit; }
button, input[type="checkbox"], input[type="radio"] { touch-action: manipulation; }
button, select, label[for], summary { cursor: pointer; }
button:disabled, select:disabled, input:disabled, textarea:disabled { opacity: .6; cursor: not-allowed; }
button { line-height: 1.3; }
input, select, textarea {
  max-width: 100%; min-height: 2.8rem; min-width: 0; width: 100%; padding: .62rem .82rem;
  color: var(--ink); background-color: var(--surface); border: 1px solid var(--strong-line);
  border-radius: .42rem; transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
input:where([type="checkbox"], [type="radio"]) { width: 1.12rem; min-height: 0; height: 1.12rem; accent-color: var(--brand); flex: none; vertical-align: middle; }
input[type="file"] { padding: .3rem; }
input::file-selector-button { margin-inline-end: .7rem; border: 0; padding: .48rem .7rem; border-radius: .25rem; background: var(--inset); color: var(--brand); font: inherit; font-weight: 650; cursor: pointer; }
select {
  appearance: none; padding-inline-end: 2.4rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 1.05rem) center, calc(100% - .79rem) center;
  background-size: .29rem .29rem; background-repeat: no-repeat;
}
[dir="rtl"] select { background-position: .79rem center, 1.05rem center; }
textarea { min-height: 6rem; resize: vertical; }
label, legend { font-weight: 640; }
label:has(> :is(input,textarea,select)) { display: grid; gap: .4rem; align-content: start; }
label:has(> input:is([type="checkbox"],[type="radio"])) { display: flex; align-items: center; gap: .6rem; }
fieldset { min-inline-size: 0; margin: 0; padding: 1rem; border: 1px solid var(--line); border-radius: .55rem; }
fieldset legend { padding-inline: .3rem; }
img, svg { max-width: 100%; }
img { height: auto; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: .46rem;
  padding: .63rem 1.02rem; min-height: 2.75rem; border-radius: .44rem;
  border: 1px solid var(--strong-line); background: var(--surface);
  color: var(--ink); text-align: center; text-decoration: none;
  font-size: .94rem; font-weight: 650; line-height: 1.28;
  transition: background-color .15s, color .15s, border-color .15s;
}
button:hover:not(:disabled), .button:hover { background-color: var(--inset); }
.primary, .button.primary, button[type="submit"]:not(.secondary,.danger,.quiet) {
  color: var(--on-brand); background: var(--brand); border-color: var(--brand);
}
.primary:hover:not(:disabled), .button.primary:hover, button[type="submit"]:not(.secondary,.danger,.quiet):hover:not(:disabled) {
  color: var(--on-brand); background: var(--brand-hover); border-color: var(--brand-hover);
}
.secondary { background: var(--surface); color: var(--brand); border-color: var(--strong-line); }
.danger { color: var(--danger); background: var(--surface); border-color: var(--danger); }
.danger:hover:not(:disabled) { background: var(--danger-bg); }
.quiet { color: var(--brand); border-color: transparent; background: transparent; }
.quiet:hover:not(:disabled) { background: var(--inset); }
.icon { width: 1.2em; height: 1.2em; display: inline-block; flex: none; vertical-align: -.15em; }
hr { margin-block: 1.35rem; border: 0; border-block-start: 1px solid var(--line); }
h1,h2,h3,h4,p,ul,ol,dl { margin-block-start: 0; }
h1,h2,h3,h4 { color: var(--ink); line-height: 1.2; overflow-wrap: anywhere; }
h1,h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -.035em; }
h1 { font-size: clamp(2.08rem, 3.6vw, 3.65rem); }
h2 { font-size: clamp(1.55rem, 2.3vw, 2.35rem); }
h3 { font-size: 1.12rem; letter-spacing: -.012em; }
h1,h2,h3,h4 { margin-block-end: .55rem; }
p { margin-block-end: .9rem; }
small, .meta, .subtle { color: var(--muted); font-size: .9rem; }
.lead { color: var(--muted); font-size: 1.04rem; max-width: 60ch; }
.kicker, .eyebrow {
  margin: 0 0 .63rem; color: var(--rust); font-weight: 750;
  font-size: .78rem; line-height: 1.35; text-transform: uppercase; letter-spacing: .115em;
}
.site-head {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  column-gap: 1rem; row-gap: .5rem; min-height: 4.75rem;
  padding: .75rem max(1.05rem, calc((100% - 82rem) / 2)); 
  background: var(--surface); border-block-end: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; min-width: 0; }
.brand-mark, .brand > img:first-child { width: 2.72rem; height: 2.72rem; flex: none; object-fit: contain; }
.brand-copy { display: grid; gap: .12rem; line-height: 1.1; }
.brand-title, .brand-copy strong { font: 650 1.4rem/1.05 var(--serif); color: var(--brand); letter-spacing: -.045em; }
.brand-copy :is(small,span:not(.brand-title)):not(:first-child) { font: 570 .78rem/1.3 var(--sans); color: var(--muted); }
.head-actions, .actions, .row { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
.head-actions { justify-content: flex-end; gap: .4rem; }
.head-actions :is(select,button,.button) { width: auto; min-height: 2.5rem; padding-block: .48rem; }
.site-head + main { scroll-margin-block-start: 1rem; }
.auth-shell {
  width: min(calc(100% - 2rem), 73rem); margin: clamp(1.25rem, 5.3vh, 4.2rem) auto;
  display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: 1.2rem;
  overflow: hidden; box-shadow: 0 1.2rem 3.5rem rgb(39 58 43 / .075);
}
.auth-art {
  position: relative; isolation: isolate; overflow: hidden; min-height: 18rem;
  background: var(--hero); color: var(--hero-text);
  padding: clamp(1.5rem, 4vw, 3.7rem); 
}
.auth-art::after {
  content: ""; position: absolute; z-index: -1; inset: 25% 0 0;
  background: url("./campus.webp") bottom center / 100% auto no-repeat; pointer-events: none;
}
.auth-art-inner { position: relative; max-width: 37rem; }
.auth-art .eyebrow, .auth-art .kicker { color: var(--gold); }
.auth-art :is(h1,h2) { color: var(--hero-text); margin-block: .25rem .65rem; font-size: clamp(2.35rem,4.3vw,4.1rem); line-height: 1.03; letter-spacing: -.048em; }
.auth-art :is(.art-caption,.lead,p:not(.eyebrow,.kicker)) { color: #d9e6d7; max-width: 39ch; font-size: .96rem; }
.auth-panel {
  display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: .65rem;
  min-width: 0; padding: clamp(1.45rem, 4.9vw, 4.8rem); background: var(--surface);
}
.auth-panel h1, .auth-panel h2 { font-size: clamp(2.08rem,3.2vw,3.15rem); }
.auth-form { display: grid; gap: 1rem; }
.auth-form > :where(h1,h2,h3,p) { margin: 0; }
.auth-form > .primary, .auth-form > button[type="submit"] { width: 100%; min-height: 2.95rem; }
.field { display: grid; align-content: start; gap: .4rem; min-width: 0; }
.field > label, .field > strong, label.field { font-size: .94rem; font-weight: 640; }
.field > small { font-size: .85rem; font-weight: 450; }
.shell { display: grid; width: min(100%, 86rem); margin-inline: auto; min-height: calc(100vh - 4.75rem); }
.sidebar {
  min-width: 0; display: flex; align-items: flex-start; flex-wrap: nowrap; gap: .15rem;
  padding: .55rem 1rem; background: var(--surface); border-block-end: 1px solid var(--line); overflow-x: auto;
}
.sidebar nav { display: flex; gap: .2rem; }
.sidebar :is(h2,h3,p):empty { display: none; }
.nav-item {
  appearance: none; display: flex; align-items: center; gap: .65rem; min-height: 2.68rem; min-width: 0;
  flex: none; padding: .65rem .85rem; text-align: start; white-space: nowrap;
  background: transparent; color: var(--muted); border: 1px solid transparent;
  border-radius: .42rem; font: 620 .92rem/1.28 var(--sans); text-decoration: none;
}
.nav-item:hover { background: var(--inset); color: var(--brand); }
.nav-item.active, .nav-item[aria-current="page"], .sidebar .active {
  color: var(--brand); background: var(--tint); box-shadow: inset 0 -2px var(--brand);
}
.workspace { min-width: 0; padding: clamp(.95rem,2.8vw,2.8rem); }
.workspace > :last-child { margin-block-end: 0; }
.page-head,.panel-head,.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .85rem; }
.page-head { align-items: flex-end; margin-block-end: 1.4rem; }
.page-head :is(p,h1,h2):last-child,.panel-head :is(p,h2,h3):last-child,.hero p:last-child { margin-block-end: 0; }
.hero {
  padding: clamp(1.3rem,3.1vw,2.55rem); position: relative; overflow: hidden;
  background: var(--hero); color: var(--hero-text); border: 1px solid #264f40; border-radius: .84rem;
  margin-block-end: 1.4rem;
}
.hero :is(h1,h2,h3,strong) { color: var(--hero-text); }
.hero :is(.eyebrow,.kicker) { color: var(--gold); }
.hero :is(.lead,.meta,.subtle,small) { color: #d8e6da; }
.hero a { color: #fbdf9e; }
.hero .button { color: var(--ink); }
.hero .primary { color: var(--on-brand); }
.grid,.two,.tiles,.form-grid,.stats { display: grid; gap: 1rem; min-width: 0; }
.grid > *, .two > *, .tiles > *, .form-grid > *, .stats > * { min-width: 0; }
.two, .tiles { grid-template-columns: repeat(auto-fit,minmax(min(100%,20rem),1fr)); }
.form-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,14rem),1fr)); align-items: end; }
.stack { display: grid; gap: 1rem; align-content: start; min-width: 0; }
.stats { margin-block: 1rem 1.4rem; gap: .8rem; grid-template-columns: repeat(auto-fit,minmax(min(100%,10.3rem),1fr)); }
.stat, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: .72rem; box-shadow: var(--shadow); min-width: 0; }
.stat { position: relative; display: flex; flex-direction: column; justify-content: center; gap: .2rem; padding: 1rem 1.15rem; min-height: 6.6rem; }
.stat > :where(p,small,h2,h3) { margin: 0; }
.stat > :is(small,span:not(.value),p) { color: var(--muted); font-size: .88rem; font-weight: 600; }
.stat .value,.stat > :is(strong,b) { color: var(--brand); font: 600 clamp(1.85rem, 3.1vw, 2.65rem)/1.15 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.panel { padding: clamp(1rem,2.1vw,1.65rem); margin-block-end: 1rem; }
.stack > .panel,.grid > .panel,.two > .panel,.tiles > .panel { margin: 0; }
.panel > :last-child, .notice > :last-child { margin-block-end: 0; }
.panel-head { padding-block-end: .85rem; margin-block-end: .75rem; border-block-end: 1px solid var(--line); }
.panel-head > :where(h2,h3) { margin: 0; }
.panel h2 { font-size: clamp(1.4rem,2.1vw,1.88rem); }
.toolbar { justify-content: flex-start; align-items: end; padding-block: .4rem .9rem; }
.toolbar > :where(input,select,.field,label) { width: auto; min-width: min(100%,9rem); flex: 1 1 9.5rem; }
.toolbar .field :is(input,select), .toolbar label :is(input,select) { width: 100%; }
.table-scroll { overflow-x: auto; max-inline-size: 100%; overscroll-behavior-inline: contain; border-radius: .38rem; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .94rem; }
caption { text-align: start; font-weight: 650; margin-block-end: .5rem; }
th,td { text-align: start; vertical-align: middle; padding: .78rem .7rem; border-block-end: 1px solid var(--line); }
th { background: var(--inset); color: var(--muted); font-weight: 670; font-size: .84rem; }
tbody tr:last-child td { border-block-end: 0; }
tbody tr:hover td { background-color: color-mix(in srgb,var(--tint) 32%,transparent); }
td :is(input,select) { min-width: 4.75rem; }
td .actions { flex-wrap: nowrap; }
td .button, td button { min-height: 2.35rem; padding: .43rem .6rem; }
.badge {
  display: inline-flex; align-items: center; gap: .3em; flex: none; max-width: 100%;
  padding: .23rem .58rem; border-radius: 1rem; line-height: 1.25;
  color: var(--muted); background: var(--inset); font-size: .8rem; font-weight: 720; vertical-align: middle;
}
:is(.badge,.status).new, :is(.badge,.status).published { color: var(--brand); background: var(--tint); }
:is(.badge,.status).draft { color: var(--warning); background: var(--warning-bg); }
.notice,.error,.success {
  border: 1px solid var(--line); border-inline-start: .2rem solid var(--brand); border-radius: .4rem;
  padding: .72rem .92rem; background: var(--inset); color: var(--ink); line-height: 1.5;
}
.notice:empty,.error:empty,.success:empty { display: none; }
.error,.notice.error { border-color: color-mix(in srgb,var(--danger) 36%,var(--line)); border-inline-start-color: var(--danger); color: var(--danger); background: var(--danger-bg); }
.success,.notice.success { color: var(--brand); background: var(--tint); }
.empty { padding: 1.25rem; text-align: center; color: var(--muted); background: var(--inset); border: 1px dashed var(--strong-line); border-radius: .55rem; }
.tabbar { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-block: .3rem 1rem; }
.tabbar :where(button,a) { border-color: transparent; background: transparent; color: var(--muted); }
.tabbar :is(.active,[aria-selected="true"]) { background: var(--tint); border-color: var(--strong-line); color: var(--brand); }
details { border-block-end: 1px solid var(--line); padding-block: .7rem; }
summary { color: var(--brand); font-weight: 650; }
dialog { border: 1px solid var(--line); border-radius: .85rem; padding: clamp(1.2rem,3vw,2rem); color: var(--ink); background: var(--surface); width: min(32rem,calc(100% - 2rem)); max-height: 85dvh; box-shadow: 0 1.3rem 5rem #101b1940; }
dialog::backdrop { background: rgb(11 30 22 / .55); }
[aria-busy="true"] { cursor: progress; }
progress { accent-color: var(--brand); max-width: 100%; }
code,pre { font: .9em/1.45 "Courier New",monospace; }
code { word-break: break-word; }
pre { overflow: auto; padding: .85rem; background: var(--inset); border: 1px solid var(--line); border-radius: .44rem; white-space: pre-wrap; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important; }
.print-only { display: none; }
#feedback:not([hidden]) { position: fixed; inset-inline-end: 1rem; inset-block-end: 1rem; z-index: 10; max-width: min(32rem,calc(100% - 2rem)); box-shadow: 0 .25rem 1.5rem #10291d26; }
@media print { #feedback { display:none !important; } }
footer { color: var(--muted); font-size: .85rem; }
@media (min-width: 51rem) {
  .auth-shell { grid-template-columns: minmax(0,1.06fr) minmax(0,1fr); }
  .auth-art,.auth-panel { min-height: 37.5rem; }
  .auth-art::after { inset-block-start: 25%; background-size: max(100%,32rem) auto; }
  .shell { grid-template-columns: 13.8rem minmax(0,1fr); }
  .sidebar {
    display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: .36rem;
    padding: 1.9rem .9rem; border-block-end: 0; border-inline-end: 1px solid var(--line);
    overflow: visible; background: var(--canvas);
  }
  .sidebar nav { flex-direction: column; align-items: stretch; }
  .sidebar .nav-item.active,.sidebar .nav-item[aria-current="page"] { box-shadow: inset 3px 0 var(--brand); }
  [dir="rtl"] .sidebar .nav-item.active,[dir="rtl"] .sidebar .nav-item[aria-current="page"] { box-shadow: inset -3px 0 var(--brand); }
  .nav-item { width: 100%; justify-content: flex-start; white-space: normal; }
}
@media (max-width:50.99rem) {
  .auth-art { min-height: 14.5rem; }
  .auth-art-inner { max-width: 63%; }
  .auth-art::after { inset-block-start: 0; background-size: auto 100%; background-position: 115% bottom; opacity: .77; mask-image: linear-gradient(to right,transparent 28%,#000 75%); }
  [dir="rtl"] .auth-art::after { transform: scaleX(-1); }
  .auth-shell { margin-block-start: 1.15rem; }
}
@media (max-width:35rem) {
  .site-head { padding: .7rem .85rem; gap: .55rem; }
  .brand-mark,.brand > img:first-child { width: 2.25rem; height: 2.25rem; }
  .brand { gap: .44rem; }
  .brand-title,.brand-copy strong { font-size: 1.14rem; }
  .brand-copy :is(small,span:not(.brand-title)):not(:first-child) { font-size: .72rem; }
  .head-actions { gap: .24rem; }
  .head-actions :is(button,.button) { padding-inline: .47rem; }
  .head-actions select { max-inline-size: 7.25rem; padding-inline-start: .48rem; }
  .auth-shell { width: calc(100% - 1.2rem); border-radius: .76rem; margin-block: .7rem 1rem; }
  .auth-art { min-height: 12.1rem; padding: 1.3rem 1.15rem; }
  .auth-art :is(h1,h2) { font-size: clamp(1.8rem,7.5vw,2.7rem); }
  .auth-art .art-caption { font-size: .88rem; }
  .auth-panel { padding: 1.45rem 1.1rem; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stat { min-height: 5.5rem; padding: .8rem .75rem; }
  .stats,.grid,.two,.tiles,.form-grid { gap: .65rem; }
  th,td { padding: .65rem .48rem; }
  .table-scroll table { min-width: min(100%,20rem); }
  .page-head { margin-block-end: 1rem; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto !important; transition-duration: 0s !important; animation-duration: .01ms !important; } }
@media (forced-colors: active) { .nav-item.active,.tabbar .active { outline: 2px solid currentColor; } select { appearance: auto; } }
@media print {
  :root,body,[data-theme],.dark { color-scheme: light; --canvas: white; --surface: white; --ink: black; --brand: #163c2f; --muted: #333; --line: #aaa; --inset: #f1f1f1; }
  body { background: #fff; color: #000; font-size: 10pt; }
  .site-head,.sidebar,.head-actions,.actions,.toolbar,.tabbar,button,form,dialog,.no-print,footer nav { display: none !important; }
  .print-only { display: block !important; }
  .shell,.workspace,.table-scroll { display: block; width: 100%; min-height: 0; padding: 0; overflow: visible; }
  .panel,.hero,.stat { background: #fff; box-shadow: none; color: #000; border: 1px solid #aaa; }
  .hero :is(h1,h2,h3,p,small,strong,.eyebrow,.lead) { color: #000; }
  .table-scroll table { min-width: 0; } thead { display: table-header-group; } tr,.stat { break-inside: avoid; }
  h1,h2,h3 { break-after: avoid; } a { color: #000; }
  @page { margin: 1.3cm; }
}
