:root {
  color-scheme: light;
  --ink: #1a1a3d;
  --muted: #626375;
  --paper: #f7f7f5;
  --surface: #fff;
  --border: #e3e5e4;
  --teal: #00868b;
  --teal-soft: #e8f5f2;
  --blue: #3d64a5;
  --radius: 14px;
  font-family: Inter, Geist, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input, textarea { font: inherit; }
button, .button { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 19px; border-radius: 8px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-size: .9rem; font-weight: 650; line-height: 1.4; text-decoration: none; transition: background .15s, border-color .15s; }
button:hover, .button:hover { background: #303057; }
button:disabled { cursor: default; opacity: .48; }
a { color: var(--blue); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
input, textarea { width: 100%; padding: 11px 13px; border: 1px solid #c4c9cd; border-radius: 8px; background: #fff; color: var(--ink); box-shadow: 0 1px 2px #1a1a3d04 inset; }
input::placeholder, textarea::placeholder { color: #7c7d8a; }
textarea { display: block; resize: vertical; min-height: 220px; line-height: 1.7; }
textarea:disabled { background: #f6f6f4; }
label, .field-label { display: block; font-size: .82rem; font-weight: 650; margin-bottom: 7px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.15rem, 4vw, 3.4rem); line-height: 1.12; font-weight: 650; letter-spacing: -.045em; margin-bottom: 20px; }
h2 { font-size: 1.2rem; line-height: 1.45; letter-spacing: -.02em; margin-bottom: 9px; font-weight: 650; }
h3 { font-size: 1.1rem; line-height: 1.55; font-weight: 600; margin-bottom: 12px; }
p { margin-bottom: 12px; }
[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 100; top: -100px; left: 20px; padding: 10px 16px; color: white; background: var(--ink); }
.skip-link:focus { top: 15px; }
.site-header { max-width: 1320px; margin: 0 auto; padding: 25px 48px; display: flex; justify-content: space-between; gap: 24px; align-items: center; border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 12px; font-size: .8rem; line-height: 1.35; letter-spacing: .01em; color: var(--ink); text-decoration: none; }
.brand strong { font-weight: 700; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 42px; border: 1px solid #00aab052; border-radius: 10px 3px 10px 3px; background: var(--teal-soft); font-size: .8rem; letter-spacing: -.03em; font-weight: 750; color: #006d73; }
.text-link { display: inline-flex; gap: 10px; align-items: center; font-size: .85rem; font-weight: 550; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.student-main { width: min(100% - 48px, 900px); margin: 60px auto 65px; }
.intro { padding-bottom: 32px; }
.eyebrow { color: var(--teal); text-transform: uppercase; font-size: .69rem; font-weight: 750; letter-spacing: .15em; margin-bottom: 12px; }
.intro-copy { font-size: 1rem; color: var(--muted); line-height: 1.7; max-width: 620px; margin-bottom: 20px; }
.meta-row { display: flex; gap: 15px; flex-wrap: wrap; align-items: center; font-size: .8rem; }
.pill { display: inline-flex; align-items: center; width: fit-content; padding: 4px 9px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--muted); font-size: .7rem; font-weight: 650; white-space: nowrap; }
.pill.open { color: #006f62; background: var(--teal-soft); border-color: #c6e9df; }
.pill.closed { color: #755a24; background: #fbf4e6; border-color: #eddfbd; }
.quiet { color: var(--muted); }
.card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: 0 2px 3px #1a1a3d02; }
.join-card { display: grid; grid-template-columns: 1fr 1.25fr; gap: 25px; padding: 25px 30px; margin-bottom: 22px; }
.join-card .eyebrow { margin-bottom: 6px; }
.join-card h2 { font-size: 1.1rem; margin-bottom: 4px; }
.join-card p { font-size: .81rem; margin-bottom: 0; }
.join-form { align-self: center; }
.input-row { display: flex; align-items: stretch; gap: 8px; }
.input-row input { min-width: 0; }
.input-row button { flex-shrink: 0; }
#class-code { letter-spacing: .1em; font-weight: 650; }
.field-help { font-size: .73rem; color: var(--muted); line-height: 1.6; margin: 8px 0 0; }
.response-card { display: grid; grid-template-columns: 40px 1fr; gap: 18px; padding: 35px 36px 32px; }
.section-number { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid #d6e5e3; background: #f4f9f8; color: var(--teal); font-size: .7rem; font-weight: 700; margin-top: 2px; }
.question-body .eyebrow { margin-top: 6px; margin-bottom: 14px; }
.question-body h2 { max-width: 720px; font-size: clamp(1.15rem, 2.7vw, 1.42rem); font-weight: 600; line-height: 1.5; margin-bottom: 13px; }
.question-helper { font-size: .9rem; color: var(--muted); margin-bottom: 27px; }
.response-label { margin-bottom: 10px; }
.draft-line { display: flex; justify-content: space-between; gap: 15px; margin-top: 10px; font-size: .71rem; color: var(--muted); line-height: 1.55; }
.draft-line #character-count { white-space: nowrap; }
.submit-row { display: flex; align-items: center; gap: 18px; margin-top: 23px; }
.submit-row button { min-width: 140px; flex-shrink: 0; }
.submit-row p { margin: 0; max-width: 420px; }
.privacy-note { font-size: .76rem; color: var(--muted); line-height: 1.8; margin: 24px 5px 0; max-width: 820px; }
.privacy-note strong { font-weight: 600; color: #45465b; }
.notice { border: 1px solid #badbd6; border-radius: 8px; padding: 13px 16px; margin: 20px 0; font-size: .84rem; color: #18554f; background: #f0f8f5; line-height: 1.7; overflow-wrap: anywhere; }
.notice.error { background: #fff4f1; border-color: #eacbc2; color: #8c3c2d; }
.context-note { font-size: .75rem; color: #47676a; background: #f2f7f7; padding: 8px 12px; border-radius: 6px; overflow-wrap: anywhere; }
.session-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 13px 3px 21px; font-size: .8rem; }
.session-bar > div:first-child { display: flex; flex-direction: column; gap: 3px; }
.session-label { font-weight: 650; }
.session-actions, .header-actions { display: flex; gap: 14px; align-items: center; }
.text-button { min-height: 34px; padding: 4px 0; color: var(--blue); background: transparent; border: 0; border-radius: 3px; font-size: .79rem; font-weight: 550; }
.text-button:hover { background: transparent; text-decoration: underline; }
.secondary-button { background: #fff; border-color: #cbd0d4; color: var(--ink); }
.secondary-button:hover { background: #f2f4f5; border-color: #aeb7bf; }
.site-footer { border-top: 1px solid var(--border); max-width: 1224px; margin: auto; padding: 22px 0 30px; display: flex; justify-content: space-between; gap: 20px; color: #77798a; font-size: .7rem; }
.dashboard-main { width: min(100% - 64px, 1224px); margin: 49px auto 70px; }
.dashboard-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; margin-bottom: 29px; }
.dashboard-heading h1 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); margin-bottom: 12px; }
.dashboard-heading .intro-copy { font-size: .92rem; margin-bottom: 0; }
#refresh-status { font-size: .72rem; padding-bottom: 3px; white-space: nowrap; }
.login-card { padding: 32px; max-width: 470px; margin: 45px 0 100px; }
.login-card p { font-size: .83rem; }
.login-card form { margin-top: 23px; }
.login-card button { margin-top: 16px; }
.dashboard-grid { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 25px; align-items: start; }
.session-sidebar { padding: 21px 18px; position: sticky; top: 24px; }
.card-heading { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.card-heading h2 { font-size: .95rem; margin-bottom: 0; }
.card-heading .text-button { font-size: .73rem; }
.session-list { margin: 20px -7px 0; display: grid; gap: 7px; max-height: 440px; overflow: auto; padding: 2px 4px; }
.session-item { display: flex; align-items: start; flex-direction: column; gap: 5px; border: 1px solid transparent; background: transparent; color: var(--ink); padding: 12px; text-align: left; width: 100%; min-height: 70px; }
.session-item:hover { background: #f4f5f5; }
.session-item.selected { background: #eef5f5; border-color: #cce2e1; }
.session-item-title { font-size: .8rem; font-weight: 650; overflow-wrap: anywhere; }
.session-item-meta { font-size: .66rem; color: var(--muted); font-weight: 450; line-height: 1.6; }
.create-form { margin-top: 24px; padding-top: 21px; border-top: 1px solid var(--border); }
.create-form label { font-size: .76rem; }
.create-form input { font-size: .76rem; padding: 10px; }
.create-form button { margin-top: 11px; width: 100%; font-size: .76rem; }
.empty-state { min-height: 350px; padding: 45px 40px; }
.empty-state .section-number { margin-bottom: 25px; }
.empty-state h2 { font-size: 1.3rem; }
.empty-state p { color: var(--muted); font-size: .87rem; line-height: 1.8; max-width: 420px; }
.class-card { padding: 26px 28px 23px; }
.class-title-row { display: flex; justify-content: space-between; gap: 15px; align-items: start; }
.class-title-row .eyebrow { margin-bottom: 5px; }
.class-title-row h2 { font-size: 1.3rem; margin-bottom: 3px; overflow-wrap: anywhere; }
.class-title-row .field-help { font-size: .69rem; margin-top: 0; }
.class-title-row .pill { margin-top: 4px; }
.class-share { display: grid; grid-template-columns: 155px 1fr; gap: 25px; align-items: start; padding: 24px 0 22px; margin-top: 18px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.field-label, .share-field label { font-size: .69rem; color: var(--muted); font-weight: 500; margin-bottom: 6px; }
.large-code { display: block; letter-spacing: .13em; font-weight: 650; font-size: 1.6rem; line-height: 1.2; }
.share-field input { font-size: .74rem; color: var(--muted); background: #fcfcfb; }
.share-field button { font-size: .74rem; padding: 8px 12px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 20px; }
.toolbar button, .toolbar .button { font-size: .75rem; min-height: 40px; padding: 9px 14px; }
.toolbar .field-help { margin: 0 0 0 auto; font-size: .66rem; }
.stats-row { display: grid; grid-template-columns: 1fr 1fr 1.25fr; padding: 24px 5px; gap: 20px; }
.stat { display: flex; flex-direction: column; gap: 3px; border-right: 1px solid var(--border); }
.stat strong { font-size: 1.7rem; font-weight: 600; letter-spacing: -.045em; line-height: 1.2; }
.stat span { color: var(--muted); font-size: .72rem; }
.stat-explanation { border: 0; justify-content: center; }
.stat-explanation span { font-size: .68rem; line-height: 1.75; }
.question-summary { padding: 22px 27px; background: #fcfdfc; }
.question-summary .eyebrow { margin-bottom: 9px; font-size: .63rem; }
.question-summary h3 { font-size: .95rem; font-weight: 600; margin-bottom: 8px; }
.question-summary p.quiet { font-size: .77rem; margin-bottom: 0; }
.question-summary .field-help { font-size: .65rem; margin-top: 13px; }
.responses-section { margin-top: 30px; }
.responses-heading { display: flex; gap: 14px; justify-content: space-between; align-items: baseline; margin-bottom: 15px; }
.responses-heading h2 { font-size: 1rem; margin: 0; }
.responses-heading .field-help { font-size: .65rem; margin: 0; }
.responses-list { display: grid; gap: 13px; }
.empty-responses { padding: 32px 26px; color: var(--muted); font-size: .8rem; line-height: 1.8; }
.answer-card { padding: 22px 26px; }
.answer-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 15px; }
.answer-header h3 { font-size: .8rem; margin: 0; font-weight: 650; }
.answer-header .pill { font-size: .62rem; background: #f7f7f5; }
.answer-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .88rem; line-height: 1.85; margin-bottom: 17px; }
.answer-time { font-size: .64rem; border-top: 1px solid #eff0ef; padding-top: 12px; }
@media (min-width: 1400px) { .site-header { padding-left: 0; padding-right: 0; max-width: 1224px; } }
@media (max-width: 900px) {
  .dashboard-heading { display: block; }
  #refresh-status { display: block; margin-top: 15px; }
  .dashboard-grid { grid-template-columns: 220px minmax(0, 1fr); gap: 18px; }
  .class-card { padding: 22px; }
  .class-share { grid-template-columns: 1fr; gap: 19px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border: 0; }
  .stat-explanation { grid-column: 1 / -1; }
  .toolbar .field-help { margin-left: 0; width: 100%; }
  .site-footer { margin-left: 32px; margin-right: 32px; }
}
@media (max-width: 650px) {
  .site-header { padding: 18px 22px; gap: 16px; }
  .brand { font-size: .73rem; gap: 9px; }
  .brand-mark { width: 34px; height: 37px; }
  .text-link { font-size: .73rem; gap: 5px; }
  .student-main { width: calc(100% - 32px); margin: 39px auto 42px; }
  .intro { padding: 0 6px 29px; }
  h1 { font-size: 2.25rem; margin-bottom: 17px; }
  .intro-copy { font-size: .9rem; }
  .meta-row { font-size: .73rem; gap: 10px; }
  .join-card { grid-template-columns: 1fr; gap: 21px; padding: 23px; margin-bottom: 17px; }
  .join-card .input-row { gap: 7px; }
  .join-card button { padding-left: 13px; padding-right: 13px; font-size: .79rem; }
  .response-card { grid-template-columns: 1fr; gap: 13px; padding: 24px 23px; }
  .section-number { width: 28px; height: 28px; font-size: .65rem; }
  .question-body .eyebrow { margin-top: 0; margin-bottom: 12px; }
  .question-body h2 { font-size: 1.16rem; }
  .question-helper { font-size: .83rem; margin-bottom: 23px; }
  textarea { min-height: 250px; font-size: 1rem; }
  .draft-line { display: block; font-size: .67rem; }
  #character-count { display: block; margin-top: 5px; }
  .submit-row { flex-direction: column; align-items: stretch; gap: 12px; margin-top: 19px; }
  .submit-row button { width: 100%; }
  .submit-row .field-help { font-size: .7rem; text-align: center; }
  .session-bar { align-items: start; font-size: .74rem; }
  .session-actions { flex-direction: column; gap: 3px; align-items: flex-end; }
  .session-actions .text-button { min-height: 38px; font-size: .71rem; }
  .privacy-note { margin: 21px 8px 0; font-size: .7rem; }
  .site-footer { margin: 0 23px; font-size: .63rem; padding-top: 18px; }
  .dashboard-main { width: calc(100% - 32px); margin: 34px auto 45px; }
  .dashboard-heading { padding: 0 6px; margin-bottom: 24px; }
  .dashboard-heading h1 { font-size: 2rem; }
  .dashboard-heading .intro-copy { font-size: .85rem; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 20px; }
  .session-sidebar { position: static; padding: 20px; }
  .session-list { max-height: 230px; }
  .create-form { margin-top: 16px; padding-top: 16px; }
  .create-form input { font-size: 1rem; }
  .create-form button { width: auto; }
  .class-card { padding: 21px; }
  .class-title-row { flex-wrap: wrap; gap: 9px; }
  .class-title-row h2 { font-size: 1.15rem; }
  .class-share { margin-top: 16px; padding: 21px 0; }
  .share-field .input-row { flex-direction: column; }
  .share-field input { font-size: .83rem; }
  .share-field button { width: fit-content; min-height: 38px; }
  .stats-row { padding: 23px 5px; gap: 17px; }
  .question-summary { padding: 22px; }
  .question-summary h3 { font-size: .9rem; }
  .responses-heading { flex-wrap: wrap; gap: 6px; padding: 0 4px; }
  .answer-card { padding: 21px; }
  .answer-text { font-size: .85rem; }
  .header-actions { gap: 10px; }
  .header-actions .pill { font-size: .63rem; }
  .header-actions .text-button { font-size: .7rem; }
  .login-card { padding: 25px; margin: 25px 0 70px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.submitted-panel { margin-top: 20px; padding: 18px 24px; }
.submitted-panel summary { cursor: pointer; font-size: .8rem; font-weight: 600; }
.submitted-panel .answer-text { margin-top: 18px; }
.submitted-panel button { font-size: .75rem; }
