:root {
  color-scheme: light;
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: #1b2c26;
  background: #eff3ee;
  --ink: #1b2c26;
  --muted: #4d635a;
  --green: #174d38;
  --dark: #103527;
  --line: #d9e3da;
  --surface: #fbfdf9;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.55; min-width: 280px; }
a { color: var(--green); text-underline-offset: .22em; font-weight: 650; }
a:hover { color: #277550; }
:focus-visible { outline: 3px solid #628d35; outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1 { font-family: "Instrument Serif", Georgia, serif; font-weight: 500; font-size: clamp(2.25rem, 5vw, 4.1rem); letter-spacing: -.045em; line-height: 1.02; overflow-wrap: anywhere; }
h2 { font-size: 1.11rem; line-height: 1.3; }
p, small { color: var(--muted); }
small { font-size: .85rem; }
.top { color: #fff; background: var(--dark); }
.top-inner { margin: auto; max-width: 1360px; padding: .85rem clamp(.8rem, 4vw, 3rem); min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: .65rem; }
.brand { display: flex; gap: .33rem; align-items: center; white-space: nowrap; font-size: 1.1rem; font-weight: 400; letter-spacing: -.02em; }
.brand-mark { position: relative; width: 2rem; height: 2rem; background: #d1e6a7; border-radius: 8px; margin-right: .38rem; display: flex; align-items: end; justify-content: center; gap: 2px; padding-bottom: 8px; }
.brand-mark i { width: 3px; background: #244c36; height: 8px; border-radius: 1px; }
.brand-mark i:nth-child(2) { height: 13px; }
.brand-mark i:nth-child(3) { height: 10px; }
.top nav { display: flex; align-items: center; gap: clamp(.55rem, 2vw, 1.8rem); flex-wrap: wrap; }
.top a, .top button { color: #ecf6e9; text-decoration: none; }
.top nav a, .top button { font-size: .9rem; }
.top button { padding: .25rem; }
.shell { max-width: 1360px; margin: 0 auto; padding: clamp(1rem, 4vw, 3rem) clamp(.85rem, 4vw, 3rem) 4rem; }
.shell.compact { max-width: 530px; padding-top: clamp(2rem, 9vw, 6rem); }
.hero { min-width: 0; display: flex; align-items: end; justify-content: space-between; gap: .9rem 1.5rem; flex-wrap: wrap; margin: .45rem 0 1.8rem; }
.hero > div { min-width: 0; }
.hero h1 + p { margin-top: .7rem; }
.eyebrow { color: #365d48; font-size: .87rem; font-weight: 750; margin-bottom: .48rem; }
.teacher, .pill, .count { display: inline-block; background: #e4ede5; color: #254d3b; border-radius: 2rem; font-size: .87rem; font-weight: 650; padding: .2rem .65rem; }
.pill.good { background: #dceecb; color: #214219; }
.pill.wait { background: #f5e9c8; color: #644e20; }
.pill.bad { background: #f5e3de; color: #7f2c25; }
.count { padding: .12rem .48rem; }
.crumb { display: inline-block; font-size: .93rem; margin-bottom: .7rem; }
.tabs { display: flex; flex-wrap: wrap; gap: .4rem; border-bottom: 1px solid #cedbcf; margin: 0 0 1.35rem; }
.tabs a { color: #3f584b; padding: .65rem .9rem .62rem; text-decoration: none; border-bottom: 3px solid transparent; }
.tabs a[aria-current] { color: var(--dark); border-color: #256142; background: #e6eee3; border-radius: .5rem .5rem 0 0; }
.layout, .review { display: grid; grid-template-columns: minmax(0, 1.48fr) minmax(250px, .85fr); align-items: start; gap: 1rem; }
.layout.wide-left { grid-template-columns: minmax(0, 2fr) minmax(250px, .9fr); }
.review { grid-template-columns: minmax(220px, .85fr) minmax(0, 1.3fr); }
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: clamp(.95rem, 2.5vw, 1.45rem); overflow-wrap: anywhere; box-shadow: 0 3px 9px #143e2910; }
.panel > h2 + * { margin-top: .9rem; }
.panel > p + *, .panel > form + p { margin-top: .8rem; }
.panel.readable { max-width: 86ch; }
.stack { display: grid; gap: 1rem; min-width: 0; }
.auth h1 { margin-bottom: 1.25rem; }
.auth p + a { display: inline-block; margin-top: 1.25rem; }
.course-card { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; color: var(--ink); text-decoration: none; }
.course-card:hover { border-color: #789a83; }
.card-symbol { display: grid; width: 3rem; height: 3rem; place-items: center; border-radius: .6rem; background: #e0edd6; color: #2a5f43; font-size: 1.6rem; }
.card-data { display: grid; color: var(--muted); font-weight: 400; font-size: .85rem; }
label { display: grid; gap: .32rem; font-size: .93rem; font-weight: 680; }
input, select, textarea { width: 100%; min-width: 0; color: var(--ink); background: white; border: 1px solid #aebfb3; border-radius: 8px; padding: .57rem .65rem; font: inherit; font-size: 1rem; }
input[type=file] { font-size: .9rem; }
textarea { resize: vertical; line-height: 1.45; }
button, .button { width: fit-content; background: var(--green); color: white; border: 1px solid transparent; border-radius: 8px; padding: .57rem .88rem; font: inherit; font-size: .93rem; font-weight: 690; cursor: pointer; text-decoration: none; line-height: 1.4; min-height: 40px; display: inline-flex; align-items: center; text-align: start; }
button:hover, .button:hover { background: #26654b; color: white; }
button:disabled { opacity: .55; cursor: default; }
.secondary { background: #eff5ee; color: #184734; border-color: #c7d9cc; }
.secondary:hover { background: #e1eee3; color: var(--dark); }
.quiet { background: transparent; color: var(--green); }
.quiet:hover { background: #dfebe0; color: var(--dark); }
.danger { color: #842e27; }
.small { padding: .26rem .55rem; min-height: 34px; font-size: .86rem; }
.top button:hover { background: #23553f; color: white; }
.list { list-style: none; margin: .6rem 0 0; padding: 0; }
.list li { border-top: 1px solid var(--line); padding: .75rem 0; display: flex; justify-content: space-between; align-items: center; gap: .85rem; }
.list li:last-child { padding-bottom: 0; }
.list li small, .tag { display: block; }
.tag { color: #426652; font-size: .85rem; }
.inline, .actions, .section-head { display: flex; align-items: center; gap: .55rem .85rem; flex-wrap: wrap; }
.actions { margin-top: .9rem; }
.section-head { justify-content: space-between; margin-bottom: .85rem; }
.filter-label { max-width: 390px; margin: .85rem 0; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; text-align: left; width: 100%; }
th, td { border-bottom: 1px solid var(--line); padding: .55rem .45rem; font-size: .92rem; vertical-align: middle; }
thead th { background: #edf3ea; color: #365446; }
tbody th { font-weight: 650; }
td select { min-width: 8.6rem; }
.hint { font-size: .9rem; }
.notice { padding: .68rem .86rem; background: #e2eee3; border: 1px solid #b9d4bf; border-radius: 9px; margin: .5rem 0 1rem; color: var(--dark); }
.notice.error { background: #fbece7; border-color: #e4bdb0; color: #6f281f; }
.pre-line { white-space: pre-wrap; }
.session-banner { display: grid; grid-template-columns: auto minmax(210px, 1fr) auto auto; gap: .9rem; align-items: center; margin-bottom: 1.1rem; }
.session-code { font-family: ui-monospace, monospace; font-size: clamp(1.2rem, 3.8vw, 1.85rem); font-weight: 700; letter-spacing: .08em; }
.two-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; }
.question { border: 1px solid var(--line); border-radius: 10px; margin: 0; padding: .75rem; min-width: 0; display: grid; gap: .65rem; }
.question legend { font-weight: 720; padding: 0 .25rem; }
.grading-fields { margin: 0; padding: 0; border: 0; }
.score-field { width: min(10rem, 100%); }
.check { display: flex; gap: .55rem; align-items: start; font-weight: 540; }
.check input { width: 1.06rem; height: 1.06rem; flex: 0 0 auto; margin-top: .15rem; }
details summary { cursor: pointer; color: var(--green); font-weight: 650; }
details > :not(summary) { margin-top: .55rem; }
.scan { border: 1px solid var(--line); width: 100%; height: auto; display: block; border-radius: 5px; margin: .35rem 0 .8rem; background: #fff; }
.grade { font-weight: 750; font-size: 1.25rem; color: var(--green); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 800px) {
  .layout, .layout.wide-left, .review { grid-template-columns: 1fr; }
  .session-banner { grid-template-columns: 1fr 1fr; }
  .session-banner > :nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .scan { max-width: 460px; }
}
@media (max-width: 420px) {
  .brand { font-size: .96rem; }
  .brand-mark { width: 1.6rem; margin-right: .18rem; }
  .course-card { grid-template-columns: auto 1fr; }
  .card-data { grid-column: 2; display: flex; gap: .8rem; }
  .two-fields { grid-template-columns: 1fr; }
}
.scan-controls { margin: 0 0 1rem; }
.document-layout article h2 { margin-bottom: .4rem; }

.language-control {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  border: 1px solid #628477;
  border-radius: 999px;
  padding: 2px;
}
.top .language-control button {
  min-width: 32px;
  min-height: 32px;
  padding: 3px 6px;
  border-radius: 999px;
  background: transparent;
  color: #ecf6e9;
  font-size: .75rem;
}
.top .language-control button:hover { background: #23553f; }
.top .language-control button[aria-pressed="true"] {
  background: #d1e6a7;
  color: #14362b;
}
.top .language-control button:focus-visible { outline-color: #fff; }
@media (max-width: 560px) {
  .top-inner { flex-wrap: wrap; }
  .top nav { column-gap: 12px; row-gap: 5px; }
}
