:root {
  color-scheme: light;
  --ink: #142d28;
  --muted: #50645a;
  --line: #c5d0c3;
  --paper: #fbfcf6;
  --green: #114f42;
  --mint: #c9f692;
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #edeee7;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; min-height: 100svh;
  background:
    radial-gradient(ellipse at 96% 25%, #dbe9d2bb, transparent 50%),
    radial-gradient(#71887635 .75px, transparent .85px) 0 0 / 15px 15px, #f2f2e9;
}
.masthead { background: #f8f9f0f5; border-bottom: 1px solid #c6d0c0; }
.mast-inner, main { width: min(calc(100% - 64px), 1160px); margin: auto; }
.mast-inner { min-height: 75px; display:flex; align-items:center; justify-content:space-between; gap:20px; }
.wordmark { display:flex; align-items:center; gap:11px; font-size:1.35rem; font-weight:760; letter-spacing:-.055em; white-space:nowrap; }
.optical-mark { width:34px; height:32px; display:block; background:repeating-linear-gradient(103deg,#135b49 0 4px,transparent 4px 6px); clip-path:polygon(50% 0,100% 94%,0 94%); }
.account-tools { display:flex; align-items:center; gap:14px; min-width:0; }
#account-label { font-size:.92rem; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); }
main { padding:clamp(22px,4vw,52px) 0 60px; display:grid; grid-template-columns:minmax(0,1.28fr) minmax(330px,.86fr); gap:clamp(18px,3vw,36px); align-items:stretch; }
.cover {
  position:relative; isolation:isolate; overflow:hidden; min-height:510px;
  display:flex; align-items:flex-end; border-radius:24px; color:white;
  background:#102d2b url('/campus/ripples.jpg') 62% center / cover;
  box-shadow:0 14px 40px #203e2520;
}
.cover::before { content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(0deg,#051e1cf2,transparent 74%),linear-gradient(90deg,#092a272e,transparent 70%); }
.cover-type { padding:clamp(24px,4.4vw,60px); }
#cover-title,.cover #heading { margin:0; color:#f8ffe9; font:500 clamp(3.8rem,7.5vw,6.5rem)/1 Georgia,"Times New Roman",serif; letter-spacing:-.055em; }
#cover-subtitle { margin:14px 0 0; font-size:clamp(.98rem,1.6vw,1.15rem); color:#d0edda; }
main > section { min-width:0; background:var(--paper); border:1px solid var(--line); border-radius:24px; padding:clamp(24px,3.6vw,46px); box-shadow:0 12px 34px #233d2810; }
main:not(.workspace) > section { align-self:center; }
h1,h2,h3,p { overflow-wrap:break-word; }
h1,h2,h3 { text-wrap:balance; }
h1 { margin:0 0 24px; font-size:clamp(1.8rem,3vw,2.55rem); line-height:1.08; letter-spacing:-.05em; }
h2 { margin:0 0 20px; font-size:clamp(1.65rem,3vw,2.3rem); letter-spacing:-.048em; line-height:1.12; }
h3 { letter-spacing:-.025em; line-height:1.25; }
form, label { display:grid; }
form { gap:16px; }
label { gap:6px; font-weight:650; }
input, select, button { font:inherit; }
input:not([type=range]), select { width:100%; border-radius:12px; border:1px solid #aebfae; background:#fffef9; min-height:49px; padding:10px 14px; color:var(--ink); }
input::placeholder { color:#687a6e; }
button {
  border:1px solid transparent; border-radius:12px; min-height:46px; padding:10px 18px; font-weight:670;
  background:var(--green); color:#f7ffe9; cursor:pointer; line-height:1.35;
  transition:background .18s,box-shadow .18s,transform .18s;
}
@media(hover:hover) { button:hover { box-shadow:0 4px 12px #0e382328; filter:brightness(1.045); } }
button:active { transform:translateY(1px); }
button:disabled { opacity:.65; cursor:wait; }
:focus-visible { outline:3px solid #b7780c; outline-offset:3px; }
#hint, #application p { color:var(--muted); font-size:.93rem; margin:0; }
#mode { width:100%; margin-top:10px; background:transparent; color:var(--green); border-color:var(--line); }
#logout,.back,#more,#refresh-roster { background:#fbfcf6; color:var(--green); border-color:var(--line); }
#logout { min-height:44px; padding-inline:16px; border-radius:100px; }
#status { margin:0; color:#903c26; }
#status:not(:empty),#application-state:not([hidden]) { border-left:3px solid #d9a052; padding:9px 12px; background:#fcf1dc; margin:16px 0 0; border-radius:0 7px 7px 0; }
main.workspace { display:block; }
.workspace .cover { min-height:clamp(215px,23vw,290px); margin-bottom:24px; align-items:center; background-position:center 52%; }
.workspace .cover::before { background:linear-gradient(90deg,#041e1de0,transparent 86%); }
.workspace .cover #heading { font-size:clamp(2.8rem,5.9vw,5.2rem); }
.workspace > section { padding:clamp(20px,3.5vw,42px); }
#course { min-width:0; }
#views { display:inline-flex; border:1px solid #c7d2c6; border-radius:100px; padding:4px; margin-bottom:24px; background:#e8ede3; gap:3px; }
#views button { border-radius:100px; color:var(--muted); background:transparent; }
#views button[aria-pressed=true] { background:#154b3d; color:white; }
.trail { font-size:.92rem; color:var(--muted); margin:0; }
.back { font-size:.91rem; margin:7px 0 18px; }
.tiles { display:grid; gap:16px; grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr)); }
.tiles button { text-align:left; }
.tiles[data-kind=grade] { grid-template-columns:repeat(3,minmax(0,1fr)); }
.grade-card { padding:0; overflow:hidden; border:1px solid #bbcbba; background:#edf4e8; color:var(--ink); border-radius:16px; }
.grade-card:nth-child(2) { background:#fff1cb; border-color:#d9c99c; }
.grade-card:nth-child(3) { background:#e9edf8; border-color:#c4cada; }
.grade-card img { width:100%; height:auto; aspect-ratio:1.64; object-fit:cover; display:block; }
.grade-caption { display:flex; align-items:baseline; gap:.5em; padding:15px 20px 19px; }
.grade-caption strong { font:500 clamp(2.45rem,4vw,3.6rem)/1 Georgia,serif; letter-spacing:-.06em; }
.grade-caption > span { font-size:1.05rem; font-weight:550; }
.tiles[data-kind=quarter] button,.tiles[data-kind=section] button { display:grid; align-content:end; min-height:108px; background:linear-gradient(135deg,#e1eee2,#f2f7e9); border:1px solid #bbcebd; color:#174636; font-size:1.19rem; }
.tiles button small { font-size:.85rem; font-weight:500; margin-top:6px; color:#466352; }
.tiles[data-kind=section] button small:first-child { margin:0 0 7px; }
.curriculum-goals { border:1px solid var(--line); border-radius:14px; background:#f1f5eb; margin:16px 0 26px; }
.curriculum-goals summary { padding:15px 18px; cursor:pointer; color:var(--green); font-weight:690; }
.curriculum-goals dl { margin:0; display:grid; grid-template-columns:max-content 1fr; gap:0 16px; padding:0 18px 14px; }
.curriculum-goals dt,.curriculum-goals dd { margin:0; padding:8px 0; border-top:1px solid #d5dfcf; }
.curriculum-goals dt { color:var(--green); font-variant-numeric:tabular-nums; font-weight:650; }
.session-plan { list-style:none; margin:0; padding:0; }
.session-plan li { display:grid; grid-template-columns:max-content 1fr; gap:clamp(10px,2vw,22px); padding:18px 0; border-top:1px solid var(--line); }
.session-number { background:#e3eddd; border-radius:8px; align-self:start; padding:4px 9px; color:var(--green); font-size:.88rem; font-weight:680; white-space:nowrap; }
.session-plan h4 { margin:.1rem 0 .3rem; font-size:1.08rem; line-height:1.3; }
.session-plan p { margin:0; max-width:74ch; }
.session-plan small { display:block; margin-top:6px; color:var(--muted); }
.session-plan button { margin-top:12px; }
.magnet-lessons,.review-resources { display:grid; gap:12px; grid-template-columns:repeat(auto-fit,minmax(min(100%,235px),1fr)); }
.magnet-lessons button { display:grid; gap:6px; align-content:start; text-align:left; padding:18px; background:#eaf2e8; color:var(--ink); border-color:var(--line); }
.magnet-lessons button:last-child { background:#164f46; color:#fff; }
.magnet-lessons button span,.review-resources small { font-size:.88rem; font-weight:450; }
.magnet-lessons small { font-variant-numeric:tabular-nums; }
.lesson-hero.magnetic { background:radial-gradient(ellipse at top right,#518a77 0,transparent 60%),#153e40; }
.review-resources a { display:grid; align-content:start; gap:4px; padding:14px; border:1px solid #685e74; border-radius:12px; background:#2a2938; color:#fff4fc; text-underline-offset:3px; }
.magnet-diagram { display:block; width:min(100%,680px); height:auto; margin:14px 0; background:#fff; border-radius:10px; }
.journal-heading label { margin-top:12px; font-size:.88rem; }
.lesson-hero .lesson-goal { max-width:58ch; margin:.8rem 0 0; color:#fff6ff; text-shadow:0 1px 4px #191124; }
@media(max-width:480px) {
  .curriculum-goals dl { display:block; }
  .curriculum-goals dd { border:0; padding:0 0 9px; }
  .curriculum-goals dt { padding-bottom:2px; }
}
.progress { font-weight:600; }
.choices { display:grid; gap:9px; }
.choices button { text-align:left; }
@media(min-width:760px) and (hover:hover) {
  .tiles > button:hover { transform:translateY(-3px); box-shadow:0 7px 16px #1a372422; }
}
@media(max-width:760px) {
  main,.mast-inner { width:min(calc(100% - 28px),620px); }
  main { display:block; padding-top:16px; }
  .mast-inner { min-height:60px; gap:10px; }
  .wordmark { font-size:1.1rem; gap:7px; }
  .optical-mark { width:27px; }
  .cover,.workspace .cover { min-height:185px; margin-bottom:14px; border-radius:18px; }
  #cover-title { font-size:3.6rem; }
  .cover-type { padding:22px; }
  .workspace .cover #heading { font-size:clamp(2.3rem,8vw,3.7rem); }
  main > section,.workspace > section { border-radius:18px; padding:20px; }
  .tiles[data-kind=grade] { grid-template-columns:1fr; gap:12px; }
  .grade-card { display:flex; align-items:center; gap:8px; }
  .grade-card img { width:41%; height:100px; }
  .grade-caption { padding:12px; }
  .tiles[data-kind=quarter] { grid-template-columns:1fr 1fr; gap:9px; }
  .tiles[data-kind=quarter] button { padding:12px; font-size:1.05rem; }
  #account-label { max-width:22vw; }
}
@media(prefers-reduced-motion:reduce){button{transition:none!important}}

.resume-card { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:16px; padding:clamp(18px,3vw,28px); margin-bottom:28px; border-radius:16px; background:#e7f1df; border:1px solid #b4c9b2; }
.resume-card h2 { margin:0; font-size:1.45rem; }
.resume-card p { margin:5px 0 0; color:var(--muted); }

/* Teacher gradebook */
.workspace:has(#teacher:not([hidden])) .cover { min-height:158px; }
.workspace:has(#teacher:not([hidden])) .cover-type { padding-block:24px; }
.workspace:has(#teacher:not([hidden])) .cover #heading { font-size:clamp(2.45rem,5vw,4.15rem); }
.journal-heading { display:flex; justify-content:space-between; gap:14px; align-items:center; flex-wrap:wrap; }
.journal-heading h2 { margin:0; }
.journal-heading p { color:var(--muted); margin:5px 0 0; }
.journal-heading button { font-size:.94rem; }
.journal-counts { margin:23px 0; display:grid; grid-template-columns:repeat(3,1fr); border:1px solid #c5d3c4; border-radius:16px; background:linear-gradient(110deg,#e7f1e1,#f3f5ec 69%,#eef1da); padding:18px 0; }
.journal-counts div { padding:0 clamp(10px,2.2vw,28px); display:flex; flex-direction:column-reverse; justify-content:end; }
.journal-counts div + div { border-left:1px solid #bdcdb9; }
.journal-counts dt { color:#43604e; font-size:.93rem; font-weight:550; }
.journal-counts dd { margin:0 0 3px; color:#184a39; font:500 clamp(2rem,3.6vw,3rem)/1.04 Georgia,serif; font-variant-numeric:tabular-nums; }
.journal-tools { display:grid; grid-template-columns:minmax(180px,1.8fr) minmax(110px,.8fr) minmax(140px,1fr); gap:12px; }
.journal-tools label { font-size:.9rem; color:#425c50; }
.journal-tools input,.journal-tools select { font-size:1rem; min-width:0; min-height:44px; font-weight:450; }
.roster-match { min-height:1.4em; margin:14px 0 9px; color:var(--muted); font-size:.88rem; }
.journal-table { width:100%; border-collapse:collapse; text-align:left; font-variant-numeric:tabular-nums; }
.journal-table thead { background:#edf1e8; }
.journal-table thead th { padding:11px 9px; color:#4b6256; font-weight:600; font-size:.87rem; }
.journal-table thead th:first-child { border-radius:8px 0 0 8px; }
.journal-table thead th:last-child { border-radius:0 8px 8px 0; }
.journal-table tbody th,.journal-table td { border-bottom:1px solid #d8e0d4; padding:15px 9px; }
.journal-table tbody tr:hover { background:#f0f5ec; }
.roster-identity { display:flex; align-items:center; gap:10px; }
.roster-avatar { width:37px; height:37px; flex:none; display:grid; place-items:center; border-radius:12px; background:#e4eddf; color:#345843; font:600 .88rem system-ui; }
tr:nth-child(3n+2) .roster-avatar { background:#e4eaf0; color:#3f5369; }
tr:nth-child(3n+3) .roster-avatar { background:#f5e7cd; color:#68522e; }
.roster-name { min-width:0; max-width:250px; overflow-wrap:anywhere; }
.roster-name strong { display:block; line-height:1.25; font-size:.99rem; }
.roster-name small,.accuracy small { display:block; color:#53685a; font-size:.875rem; font-weight:450; }
.roster-access { width:15%; }
.access-state { display:inline-block; padding:4px 8px; border-radius:20px; color:#4d5853; background:#e8ebe7; font-size:.875rem; }
[data-state=approved] .access-state { color:#1c5946; background:#dcf0de; }
[data-state=pending] .access-state { color:#76501a; background:#fff0cd; }
.roster-access button { display:block; min-height:44px; margin-top:5px; padding:6px 10px; font-size:.875rem; }
.metric { width:12%; }
.metric-number,.accuracy strong { font-size:1.05rem; font-weight:680; }
.metric-number small { color:#5c6f60; font-size:.91rem; font-weight:500; }
.metric progress { display:block; background:#e0e7dd; color:#4d8664; accent-color:#4d8664; appearance:none; width:min(100%,72px); height:5px; border:0; border-radius:20px; overflow:hidden; margin-top:4px; }
.metric progress::-webkit-progress-bar { background:#e0e7dd; border-radius:20px; }
.metric progress::-webkit-progress-value { background:#528767; border-radius:20px; }
.metric progress::-moz-progress-bar { background:#528767; border-radius:20px; }
.exercises progress::-webkit-progress-value { background:#6885a0; }
.exercises progress::-moz-progress-bar { background:#6885a0; }
.score { width:9%; }
.muted-value { color:#738075; }
#more { margin-top:14px; }
@media(max-width:900px) {
  .journal-tools { grid-template-columns:1fr 1fr; }
  .journal-tools label:first-child { grid-column:1/-1; }
  .journal-table,.journal-table tbody { display:block; }
  .journal-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .journal-table tr { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); align-items:start; gap:12px 8px; padding:15px; margin:10px 0; border:1px solid var(--line); background:#fffef9; border-radius:14px; }
  .journal-table tbody th,.journal-table td { padding:0; border:0; width:auto; }
  .journal-table tbody th { grid-column:1/4; }
  .journal-table .roster-access { justify-self:end; text-align:right; }
  .metric::before { content:attr(data-label); display:block; color:var(--muted); font-size:.875rem; margin-bottom:2px; }
  .journal-table tr:not([data-state=approved]) .metric { display:none; }
  .journal-table .roster-access button { margin-left:auto; }
}
@media(max-width:560px) {
  .workspace:has(#teacher:not([hidden])) > section { padding:15px; }
  .journal-counts { margin:16px 0; padding:12px 0; }
  .journal-counts dt { font-size:.875rem; line-height:1.25; }
  .journal-counts div { justify-content:flex-end; }
  .journal-heading button { padding:8px 12px; }
  .journal-table tr { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .journal-table tbody th { grid-column:1/-1; }
  .journal-table .roster-access { grid-column:1/-1; justify-self:start; display:flex; align-items:center; gap:10px; }
  .roster-access button { margin:0; }
  .journal-tools input,.journal-tools select { padding-inline:9px; }
}
