:root {
  --portal-ink: #20302b;
  --portal-deep: #294b42;
  --portal-jade: #3d705e;
  --portal-paper: #fffef9;
  --portal-mist: #edf3ef;
  --portal-soft: #dfeae3;
  --portal-line: #cbd8d1;
  --portal-muted: #6c7b74;
  --portal-gold: #b99a3d;
  --portal-danger: #98443c;
  --portal-shadow: 0 24px 70px rgba(38, 65, 56, 0.13);
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  color: var(--portal-ink);
  background: var(--portal-mist);
  font-family: "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid rgba(185, 154, 61, 0.48);
  outline-offset: 3px;
}

.login-layout {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
}

.login-story {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(32px, 5vw, 72px);
  overflow: hidden;
  position: relative;
  border-right: 1px solid var(--portal-line);
  background: var(--portal-paper);
}

.login-story::after {
  content: "L";
  position: absolute;
  right: -0.08em;
  bottom: -0.2em;
  z-index: 0;
  color: var(--portal-soft);
  font: 700 min(47vw, 680px)/0.8 Georgia, serif;
  pointer-events: none;
}

.login-story > * { position: relative; z-index: 1; }

.portal-brand {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.portal-brand img { width: 72px; height: 72px; object-fit: contain; }
.portal-brand span { display: grid; gap: 2px; }
.portal-brand strong { font-size: clamp(25px, 2.4vw, 34px); letter-spacing: 0.04em; }
.portal-brand small { color: var(--portal-muted); font: 700 15px/1.2 Arial, sans-serif; letter-spacing: 0.14em; }

.story-copy { width: min(650px, 100%); }
.eyebrow { margin: 0 0 16px; color: var(--portal-jade); font-size: 13px; font-weight: 800; letter-spacing: 0.08em; }
.story-copy h1 { margin: 0; font-size: clamp(46px, 5.4vw, 76px); line-height: 1.18; letter-spacing: -0.04em; }
.story-copy > p:not(.eyebrow) { max-width: 520px; margin: 24px 0 0; color: var(--portal-muted); font-size: 16px; line-height: 1.9; }

.story-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 42px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--portal-line);
  list-style: none;
}

.story-steps li { display: grid; gap: 9px; padding: 0 18px; border-right: 1px solid var(--portal-line); }
.story-steps li:first-child { padding-left: 0; }
.story-steps li:last-child { border-right: 0; }
.story-steps b { color: var(--portal-gold); font: 700 18px/1 Georgia, serif; }
.story-steps span { font-size: 13px; white-space: nowrap; }
.story-note { margin: 0; color: var(--portal-muted); font-size: 12px; }

.login-panel {
  min-height: 100dvh;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: clamp(28px, 5vw, 72px);
  background: var(--portal-soft);
}

.login-card {
  width: 100%;
  max-width: 440px;
  min-width: 0;
  padding: clamp(30px, 4vw, 48px);
  border: 1px solid var(--portal-line);
  border-radius: 14px;
  background: rgba(255, 254, 249, 0.96);
  box-shadow: var(--portal-shadow);
}

.panel-heading { margin-bottom: 30px; }
.panel-heading h2 { margin: 0 0 10px; font-size: 34px; line-height: 1.2; letter-spacing: -0.03em; }
.panel-heading > p:last-child { margin: 0; color: var(--portal-muted); font-size: 13px; line-height: 1.75; }

#loginForm { display: grid; gap: 18px; }
.form-field { display: grid; gap: 8px; }
.form-field > span:first-child { font-size: 13px; font-weight: 800; }
.form-field small { color: var(--portal-muted); font-size: 11px; line-height: 1.5; }

.form-field input {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid var(--portal-line);
  border-radius: 9px;
  background: white;
  color: var(--portal-ink);
}

.form-field input:hover { border-color: var(--portal-jade); }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 68px; }
.password-field button {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 54px;
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  background: var(--portal-mist);
  color: var(--portal-jade);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.primary-action, .secondary-action, .guest-entry {
  min-height: 52px;
  border-radius: 9px;
  font-weight: 800;
}

.primary-action {
  border: 1px solid var(--portal-deep);
  background: var(--portal-deep);
  color: var(--portal-paper);
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease;
}

.primary-action:hover { background: #203e36; }
.primary-action:active, .secondary-action:active, .guest-entry:active { transform: translateY(1px) scale(0.99); }
.primary-action:disabled { cursor: wait; opacity: 0.7; }

.form-message { margin: 0; padding: 12px 14px; border-left: 3px solid var(--portal-danger); background: #f8ecea; color: #77352f; font-size: 13px; line-height: 1.6; }
#summaryMessage[data-kind="success"] { border-left-color: var(--portal-jade); background: #edf6f0; color: var(--portal-deep); }
.guest-entry { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding: 0 16px; border: 1px solid var(--portal-line); color: var(--portal-jade); text-decoration: none; }
.guest-entry:hover { border-color: var(--portal-jade); background: #f5f9f6; }
.login-help { margin: 22px 0 0; color: var(--portal-muted); font-size: 11px; line-height: 1.7; }

/* Logged-in home shells */
.auth-pending .portal-app { visibility: hidden; }
.portal-app { min-height: 100dvh; }
.portal-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px clamp(20px, 5vw, 72px); border-bottom: 1px solid var(--portal-line); background: var(--portal-paper); }
.portal-header .portal-brand img { width: 54px; height: 54px; }
.portal-header .portal-brand strong { font-size: 24px; }
.account-area { position: relative; display: flex; align-items: center; gap: 12px; }

.account-avatar-button {
  position: relative;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 1px solid #39776a;
  border-radius: 50%;
  background: #f7f3e8;
  color: #1f5d72;
  font-weight: 900;
  cursor: pointer;
}

.account-avatar-button img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.account-avatar-button:hover,
.account-avatar-button:focus-visible {
  border-color: #b49345;
  outline: 2px solid rgba(180, 147, 69, 0.25);
  outline-offset: 2px;
}

.avatar-upload-message {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 3;
  min-width: max-content;
  padding: 5px 8px;
  border: 1px solid #9ab7aa;
  border-radius: 4px;
  background: #fffdf7;
  color: #39776a;
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(23, 63, 73, 0.12);
}

.avatar-upload-message[hidden] { display: none; }
.account-copy { display: grid; text-align: right; }
.account-copy small { color: var(--portal-muted); font-size: 11px; }
.account-copy strong { font-size: 14px; }
.account-name { max-width: 160px; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.account-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.account-actions .secondary-action { white-space: nowrap; }
.presentation-round-nav { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); width: min(720px,100%); margin-top: 28px; border: 1px solid var(--portal-line); background: rgba(255,254,249,.48); }
.presentation-round-link { position: relative; display: grid; align-content: center; min-width: 0; min-height: 76px; gap: 5px; padding: 13px 18px 15px; color: var(--portal-deep); text-decoration: none; }
.presentation-round-link + .presentation-round-link { border-left: 1px solid var(--portal-line); }
.presentation-round-link strong { font-size: 15px; }
.presentation-round-link small { overflow: hidden; color: var(--portal-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.presentation-round-link::after { position: absolute; right: 16px; bottom: -1px; left: 16px; height: 3px; background: transparent; content: ""; }
.presentation-round-link:hover { background: rgba(255,254,249,.78); }
.presentation-round-link.is-active { background: var(--portal-paper); color: var(--portal-ink); }
.presentation-round-link.is-active::after { background: var(--portal-jade); }
.presentation-round-link.is-active small { color: var(--portal-deep); }
.stage-round-context { margin-left: auto; padding: 7px 0 5px; border-bottom: 2px solid var(--portal-jade); color: var(--portal-deep); font-size: 13px; font-weight: 800; }
.secondary-action { display: inline-flex; align-items: center; justify-content: center; padding: 0 16px; border: 1px solid var(--portal-line); background: white; color: var(--portal-deep); text-decoration: none; cursor: pointer; }
.secondary-action:hover { border-color: var(--portal-jade); }

.portal-main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: clamp(48px, 7vw, 88px) 0; }
.home-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr); gap: clamp(32px, 6vw, 84px); align-items: end; padding-bottom: 48px; border-bottom: 1px solid var(--portal-line); }
.home-hero h1 { max-width: 780px; margin: 0; font-size: clamp(42px, 6vw, 72px); line-height: 1.12; letter-spacing: -0.05em; }
.home-hero p:not(.eyebrow) { margin: 18px 0 0; color: var(--portal-muted); line-height: 1.8; }
.home-status { padding: 24px; border-left: 4px solid var(--portal-gold); background: var(--portal-paper); }
.home-status small { color: var(--portal-muted); }
.home-status strong { display: block; margin-top: 8px; font-size: 18px; line-height: 1.5; }

.module-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 48px; border-top: 1px solid var(--portal-line); border-left: 1px solid var(--portal-line); }
.module-card { min-height: 220px; display: flex; flex-direction: column; align-items: flex-start; padding: 28px; border-right: 1px solid var(--portal-line); border-bottom: 1px solid var(--portal-line); background: rgba(255, 254, 249, 0.72); }
.module-card img { width: 44px; height: 44px; object-fit: contain; }
.module-card h2 { margin: 24px 0 8px; font-size: 20px; }
.module-card p { margin: 0; color: var(--portal-muted); font-size: 13px; line-height: 1.7; }
.module-card a, .module-card span { margin-top: auto; padding-top: 24px; color: var(--portal-jade); font-size: 13px; font-weight: 800; text-decoration: none; }
.module-card span { color: var(--portal-muted); }

.password-dialog { width: min(440px, calc(100% - 32px)); padding: 0; border: 1px solid var(--portal-line); border-radius: 14px; background: var(--portal-paper); box-shadow: var(--portal-shadow); }
.password-dialog::backdrop { background: rgba(28, 43, 37, 0.58); }
.password-dialog form { display: grid; gap: 18px; padding: 32px; }
.password-dialog h2 { margin: 0; }
.password-dialog p { margin: -8px 0 0; color: var(--portal-muted); font-size: 13px; line-height: 1.7; }

/* Student project read model */
.project-main { padding-top: clamp(40px, 6vw, 72px); }
.project-heading { max-width: 760px; margin-bottom: 40px; }
.project-heading h1 { margin: 0; font-size: clamp(38px, 5vw, 62px); line-height: 1.12; letter-spacing: -0.045em; }
.project-heading > p:last-child { margin: 16px 0 0; color: var(--portal-muted); line-height: 1.8; }
body[data-required-role="admin"] .project-heading,
body[data-required-role="teacher"] .project-heading { max-width: none; }
.workspace-state { padding: 28px; border: 1px solid var(--portal-line); background: var(--portal-paper); }
.workspace-state h2, .workspace-state p { margin: 0; }
.workspace-state h2 + p { margin-top: 10px; color: var(--portal-muted); }
.workspace-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--portal-line); border-left: 1px solid var(--portal-line); }
.workspace-card { min-height: 210px; padding: 28px; border-right: 1px solid var(--portal-line); border-bottom: 1px solid var(--portal-line); background: rgba(255, 254, 249, 0.78); }
.workspace-card small { color: var(--portal-jade); font-weight: 800; letter-spacing: 0.06em; }
.workspace-card h2 { margin: 24px 0 10px; font-size: clamp(22px, 3vw, 32px); line-height: 1.3; }
.workspace-card p, .workspace-card li, .role-list { color: var(--portal-muted); font-size: 13px; line-height: 1.75; }
.workspace-card p { margin: 0; }
.workspace-topic, .workspace-current { grid-column: span 2; }
.workspace-topic h2 { max-width: 780px; font-family: Georgia, "Songti SC", serif; }
.role-list { display: flex; flex-wrap: wrap; gap: 8px; }
.role-list span { padding: 5px 10px; border: 1px solid var(--portal-line); border-radius: 999px; background: var(--portal-mist); color: var(--portal-deep); font-weight: 800; }
.workspace-current ul { margin: 0; padding-left: 20px; }

/* Student enrollment */
.enrollment-main { width: min(940px, calc(100% - 40px)); }
.enrollment-status { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; padding: 20px 24px; border-left: 4px solid var(--portal-gold); background: var(--portal-paper); }
.enrollment-status strong { font-size: 18px; }
.enrollment-status span { color: var(--portal-muted); font-size: 13px; }
.enrollment-status[data-open="true"] { border-left-color: var(--portal-jade); }
.enrollment-form { display: grid; gap: 18px; }
.enrollment-form fieldset { display: grid; gap: 12px; margin: 0; padding: 24px; border: 1px solid var(--portal-line); background: rgba(255, 254, 249, 0.78); }
.enrollment-form legend { padding: 0 10px 0 0; font-size: 16px; font-weight: 800; }
.enrollment-form legend span { margin-right: 10px; color: var(--portal-gold); font-family: Georgia, serif; }
.choice-card, .check-choice { display: flex; gap: 14px; padding: 18px; border: 1px solid var(--portal-line); border-radius: 9px; background: white; cursor: pointer; }
.choice-card:has(input:checked), .check-choice:has(input:checked) { border-color: var(--portal-jade); background: #f3f8f4; box-shadow: inset 3px 0 var(--portal-jade); }
.choice-card input, .check-choice input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--portal-jade); flex: 0 0 auto; }
.choice-card span, .check-choice span { display: grid; gap: 5px; }
.choice-card small, .check-choice small { color: var(--portal-muted); line-height: 1.65; }
.direction-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.direction-grid .choice-card { height: 100%; }
.enrollment-form .form-message[data-kind="success"] { border-left-color: var(--portal-jade); background: #edf6f0; color: var(--portal-deep); }
.enrollment-submit { justify-self: end; min-width: 220px; padding: 0 24px; }
.enrollment-form :disabled { cursor: not-allowed; opacity: 0.66; }

/* Student task records */
.task-main { width: min(980px, calc(100% - 40px)); }
.task-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 36px; }
.task-heading > div { max-width: 760px; }
.task-heading h1 { margin: 0; font-size: clamp(38px, 5vw, 62px); line-height: 1.12; letter-spacing: -0.045em; }
.task-heading p:not(.eyebrow) { margin: 16px 0 0; color: var(--portal-muted); line-height: 1.8; }
.task-heading .primary-action { flex: 0 0 auto; padding: 0 22px; }
.task-list { border-top: 1px solid var(--portal-line); }
.task-card { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 20px; align-items: center; padding: 24px 4px; border-bottom: 1px solid var(--portal-line); }
.task-card h2 { margin: 0; font-size: 19px; }
.task-card p { margin: 7px 0 0; color: var(--portal-muted); font-size: 12px; line-height: 1.65; }
.task-card .task-return-note { color: var(--portal-danger); }
.task-badge { padding: 6px 10px; border-radius: 999px; background: var(--portal-soft); color: var(--portal-deep); font-size: 12px; font-weight: 800; white-space: nowrap; }
.task-approved { background: #dceee3; }.task-returned { background: #f6e4df; color: var(--portal-danger); }.task-excluded,.task-withdrawn { background: #e8e9e7; color: var(--portal-muted); }
.task-dialog { width: min(820px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--portal-line); border-radius: 14px; background: var(--portal-paper); box-shadow: var(--portal-shadow); }
.task-dialog::backdrop { background: rgba(28, 43, 37, 0.58); }
.task-dialog form { display: grid; gap: 20px; padding: clamp(22px, 4vw, 38px); }
.task-dialog header,.task-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.task-dialog h2 { margin: 0; font-size: 28px; }
.dialog-close { border: 0; background: transparent; color: var(--portal-muted); font-size: 32px; cursor: pointer; }
.task-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.task-dialog select,.task-dialog textarea { width: 100%; padding: 13px 15px; border: 1px solid var(--portal-line); border-radius: 9px; background: white; color: var(--portal-ink); font: inherit; }
.task-dialog textarea { resize: vertical; }
.member-field { margin: 0; padding: 16px; border: 1px solid var(--portal-line); }
.member-field legend { padding: 0 8px; font-size: 13px; font-weight: 800; }
#memberChoices { display: flex; flex-wrap: wrap; gap: 8px; }
.member-choice { display: flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid var(--portal-line); border-radius: 999px; background: white; font-size: 13px; cursor: pointer; }
.member-choice:has(input:checked) { border-color: var(--portal-jade); background: var(--portal-mist); }
.member-choice input { accent-color: var(--portal-jade); }
.task-review-note { margin: 0; padding: 12px 14px; border-left: 3px solid var(--portal-danger); background: #f8ecea; color: #77352f; font-size: 13px; }
.task-dialog footer span { flex: 1; }
.task-dialog footer button { padding: 0 18px; }
.danger-action { color: var(--portal-danger); }

/* Student voting */
.vote-main { width: min(1040px, calc(100% - 40px)); }
.vote-scope-note { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; margin-bottom: 28px; padding: 18px 22px; border-left: 4px solid var(--portal-gold); background: var(--portal-paper); }
.vote-scope-note span { color: var(--portal-muted); font-size: 13px; line-height: 1.7; }
.vote-rounds { display: grid; gap: 24px; }
.vote-round-card { padding: clamp(24px, 4vw, 38px); border: 1px solid var(--portal-line); background: rgba(255, 254, 249, 0.82); }
.vote-round-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.vote-round-header h2 { margin: 0; font-size: clamp(24px, 3vw, 34px); }
.round-status { padding: 7px 11px; border-radius: 999px; background: var(--portal-soft); color: var(--portal-muted); font-size: 12px; font-weight: 800; white-space: nowrap; }
.round-status.is-open { background: #dceee3; color: var(--portal-deep); }
.vote-existing,.vote-notice,.vote-representation { color: var(--portal-muted); font-size: 13px; line-height: 1.7; }
.vote-existing { margin: 18px 0 0; padding-bottom: 18px; border-bottom: 1px solid var(--portal-line); }
.vote-notice { margin: 20px 0 0; }
.vote-representation { margin: 20px 0 14px; color: var(--portal-jade); font-weight: 800; }
.vote-form { display: grid; gap: 18px; }
.vote-targets { display: grid; grid-template-columns: repeat(var(--target-count, 2), minmax(0, 1fr)); gap: 12px; }
.vote-targets[data-count="2"] { --target-count: 2; max-width: 760px; margin-inline: auto; width: 100%; }
.vote-targets[data-count="3"] { --target-count: 3; }.vote-targets[data-count="4"] { --target-count: 4; }
.vote-target { min-height: 128px; display: flex; gap: 12px; padding: 18px; border: 1px solid var(--portal-line); border-radius: 9px; background: white; cursor: pointer; }
.vote-target:has(input:checked) { border-color: var(--portal-jade); background: #f3f8f4; box-shadow: inset 3px 0 var(--portal-jade); }
.vote-target input { margin-top: 4px; accent-color: var(--portal-jade); }
.vote-target span { display: grid; align-content: start; gap: 8px; }
.vote-target small { color: var(--portal-muted); line-height: 1.55; }
.vote-form textarea { width: 100%; padding: 13px 15px; border: 1px solid var(--portal-line); border-radius: 9px; resize: vertical; font: inherit; }
.vote-actions { display: flex; justify-content: flex-end; gap: 10px; }
.vote-actions button { min-width: 130px; padding: 0 18px; }
.vote-message[data-kind="success"] { border-left-color: var(--portal-jade); background: #edf6f0; color: var(--portal-deep); }

/* Student comments and replies */
.interaction-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 28px; }
.interaction-nav a,.interaction-nav span { padding: 9px 13px; border: 1px solid var(--portal-line); border-radius: 999px; color: var(--portal-muted); font-size: 12px; font-weight: 800; text-decoration: none; }
.interaction-nav a[aria-current="page"] { border-color: var(--portal-jade); background: var(--portal-jade); color: white; }
.interaction-nav span { opacity: 0.72; }
.comment-main { width: min(1120px, calc(100% - 40px)); }
.comment-workspace { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: start; }
.comment-projects { position: sticky; top: 20px; padding: 22px; border: 1px solid var(--portal-line); background: var(--portal-paper); }
#commentGroupList { display: grid; gap: 8px; }
.comment-group-button { display: grid; gap: 7px; width: 100%; padding: 13px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--portal-ink); text-align: left; cursor: pointer; }
.comment-group-button:hover,.comment-group-button[aria-pressed="true"] { border-color: var(--portal-line); background: var(--portal-mist); }
.comment-group-button > span { display: flex; justify-content: space-between; gap: 8px; }
.comment-group-button > small { color: var(--portal-muted); line-height: 1.5; }
.own-badge,.highlight-badge { color: var(--portal-jade); font-size: 10px; font-weight: 800; }
.comment-stream > header { padding-bottom: 22px; border-bottom: 1px solid var(--portal-line); }
.comment-stream > header h2 { margin: 0; font-size: 32px; }
.comment-stream > header p:last-child { margin: 9px 0 0; color: var(--portal-muted); }
.comment-compose { margin: 20px 0; }
.comment-form { display: grid; gap: 12px; padding: 22px; border: 1px solid var(--portal-line); background: rgba(255,254,249,.82); }
.comment-form textarea,.reply-form textarea { width: 100%; padding: 13px 15px; border: 1px solid var(--portal-line); border-radius: 9px; resize: vertical; font: inherit; }
.comment-form button { justify-self: end; min-width: 140px; padding: 0 20px; }
.comment-anonymous-note { color: var(--portal-muted); }
.comment-rule,.comment-empty,.comment-loading { margin: 0; padding: 18px; border-left: 3px solid var(--portal-gold); background: var(--portal-paper); color: var(--portal-muted); font-size: 13px; line-height: 1.7; }
.comment-list { display: grid; gap: 14px; }
.comment-card { padding: 22px; border: 1px solid var(--portal-line); background: rgba(255,254,249,.72); }
.comment-card-header,.comment-reply header { display: flex; justify-content: space-between; gap: 16px; }
.comment-card-header > div,.comment-reply header > span { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.comment-card time,.comment-reply time { color: var(--portal-muted); font-size: 11px; }
.comment-roles { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.comment-roles small { padding: 3px 7px; border-radius: 999px; background: var(--portal-soft); color: var(--portal-deep); font-size: 9px; }
.comment-body { margin: 16px 0 0; line-height: 1.85; white-space: pre-wrap; }
.comment-replies { display: grid; gap: 10px; margin-top: 18px; padding: 14px; background: var(--portal-mist); }
.comment-reply { padding-bottom: 10px; border-bottom: 1px solid var(--portal-line); }
.comment-reply p { margin: 8px 0 0; font-size: 13px; line-height: 1.75; white-space: pre-wrap; }
.reply-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; }
.reply-form .form-message { grid-column: 1 / -1; }
.reply-form button { padding: 0 16px; }

/* Student classroom speeches */
.speech-main { width: min(1040px, calc(100% - 40px)); }
.speech-rule { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; margin-bottom: 28px; padding: 18px 22px; border-left: 4px solid var(--portal-gold); background: var(--portal-paper); }
.speech-rule span { color: var(--portal-muted); font-size: 13px; line-height: 1.7; }
.speech-rounds { display: grid; gap: 24px; }
.speech-round-card { border: 1px solid var(--portal-line); background: rgba(255, 254, 249, 0.82); }
.speech-round-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: clamp(24px, 4vw, 38px); border-bottom: 1px solid var(--portal-line); }
.speech-round-header h2 { margin: 0; font-size: clamp(24px, 3vw, 34px); }
.speech-nomination,.speech-summaries { padding: clamp(22px, 3vw, 32px) clamp(24px, 4vw, 38px); }
.speech-nomination { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 24px; align-items: center; }
.speech-nomination h3,.speech-summaries h3 { margin: 0; font-size: 18px; }
.speech-nomination h3,.speech-nomination .speech-selection,.speech-nomination .speech-notice,.speech-nomination .speech-message { grid-column: 1; }
.speech-nomination button { grid-column: 2; grid-row: 1 / span 3; min-width: 132px; padding: 0 18px; }
.speech-selection,.speech-notice { margin: 0; color: var(--portal-muted); font-size: 13px; line-height: 1.7; }
.speech-summaries { border-top: 1px solid var(--portal-line); background: var(--portal-mist); }
.speech-summaries > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.speech-summary-form { display: grid; grid-template-columns: minmax(210px, .42fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 20px; }
.speech-summary-form select,.speech-summary-form textarea { width: 100%; padding: 13px 15px; border: 1px solid var(--portal-line); border-radius: 9px; background: white; color: var(--portal-ink); font: inherit; }
.speech-summary-form textarea { resize: vertical; }
.speech-summary-form select:focus-visible,.speech-summary-form textarea:focus-visible { outline: 3px solid rgba(185, 154, 61, 0.48); outline-offset: 3px; }
.speech-summary-form .speech-message { grid-column: 1 / -1; }
.speech-summary-form > button { grid-column: 2; justify-self: end; min-width: 170px; padding: 0 20px; }
.speech-message[data-kind="success"] { border-left-color: var(--portal-jade); background: #edf6f0; color: var(--portal-deep); }
.speech-records { display: grid; gap: 10px; margin-top: 22px; }
.speech-record { padding: 18px; border: 1px solid var(--portal-line); background: var(--portal-paper); }
.speech-record header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.speech-record > small { display: block; margin-top: 6px; color: var(--portal-muted); }
.speech-record > p { margin: 14px 0 0; line-height: 1.8; white-space: pre-wrap; }
.speech-review { padding: 5px 9px; border-radius: 999px; background: var(--portal-soft); color: var(--portal-muted); font-size: 11px; font-weight: 800; white-space: nowrap; }
.speech-review.is-approved { background: #dceee3; color: var(--portal-deep); }
.speech-review.is-returned,.speech-review-note { color: var(--portal-danger); }
.speech-review-note { padding: 10px 12px; border-left: 3px solid var(--portal-danger); background: #f8ecea; font-size: 13px; }

/* Teacher class and roster */
.roster-main { width: min(1080px, calc(100% - 40px)); }
.class-create-panel,.current-class-card,.roster-import-card,.roster-preview,.credential-delivery,.current-roster { padding: clamp(24px, 4vw, 38px); border: 1px solid var(--portal-line); background: rgba(255, 254, 249, .82); }
.class-create-panel > header h2,.roster-import-card h2,.roster-preview h2,.credential-delivery h2,.current-roster h2,.current-class-card h2 { margin: 0; font-size: clamp(24px, 3vw, 34px); }
.class-create-panel > header > p:last-child,.template-note,.credential-delivery > p,.current-class-card p { color: var(--portal-muted); font-size: 13px; line-height: 1.75; }
.class-create-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-top: 28px; }
.class-create-form .form-message { grid-column: 1 / -1; }
.class-create-form button { grid-column: 2; justify-self: end; min-width: 180px; padding: 0 22px; }
.roster-workspace { display: grid; gap: 22px; }
.current-class-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-left: 4px solid var(--portal-jade); }
.current-class-card p { margin: 10px 0 0; }
.class-status { padding: 7px 11px; border-radius: 999px; background: var(--portal-mist); color: var(--portal-deep); font-size: 12px; font-weight: 800; white-space: nowrap; }
.class-status.is-frozen { background: var(--portal-soft); color: var(--portal-muted); }
.roster-import-card > header,.roster-preview > header,.credential-delivery > header,.current-roster > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.roster-import-card > header .secondary-action,.credential-delivery > header .secondary-action { flex: 0 0 auto; }
.template-note { margin: 18px 0; padding: 14px 16px; border-left: 3px solid var(--portal-gold); background: var(--portal-paper); }
.roster-upload-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; align-items: end; }
.roster-upload-form input[type="file"] { width: 100%; min-height: 52px; padding: 10px; border: 1px solid var(--portal-line); border-radius: 9px; background: white; }
.roster-upload-form .form-message { grid-column: 1 / -1; }
.roster-upload-form button { min-width: 170px; padding: 0 20px; }
.roster-preview > header > span,.current-roster > header > span { color: var(--portal-muted); font-size: 12px; }
.preview-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 14px; }
.preview-summary span,.roster-labels span { padding: 6px 9px; border-radius: 999px; background: var(--portal-soft); color: var(--portal-muted); font-size: 11px; font-weight: 800; }
.preview-summary .is-add { background: #dceee3; color: var(--portal-deep); }
.preview-summary .is-update { background: #f5ecd1; color: #6c5721; }
.roster-table-wrap { overflow-x: auto; border: 1px solid var(--portal-line); background: white; }
.roster-table-wrap table { width: 100%; border-collapse: collapse; }
.roster-table-wrap th,.roster-table-wrap td { padding: 12px 14px; border-bottom: 1px solid var(--portal-line); text-align: left; font-size: 12px; white-space: nowrap; }
.roster-table-wrap tr:last-child td { border-bottom: 0; }
.roster-table-wrap th { background: var(--portal-mist); color: var(--portal-muted); }
.preview-action.is-add { color: var(--portal-jade); }.preview-action.is-update { color: #765f21; }.preview-action.is-skip { color: var(--portal-muted); }
.roster-preview > .form-message { margin-top: 14px; }
.roster-preview > button { display: flex; min-width: 180px; margin: 18px 0 0 auto; padding: 0 22px; align-items: center; justify-content: center; }
.credential-delivery { border-left: 4px solid var(--portal-gold); }
.credential-value { font-family: Consolas, monospace; font-weight: 800; letter-spacing: .04em; }
.current-roster > header { padding-bottom: 18px; border-bottom: 1px solid var(--portal-line); }
.roster-list { display: grid; }
.roster-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 2px; border-bottom: 1px solid var(--portal-line); }
.roster-row:last-child { border-bottom: 0; }
.roster-row > div:first-child { display: grid; gap: 4px; }
.roster-row small { color: var(--portal-muted); }
.roster-labels { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.roster-empty { margin: 20px 0 0; color: var(--portal-muted); font-size: 13px; }
.speech-round-admin > .roster-empty,
.speech-review-admin > .roster-empty,
.stage-admin-rounds > .roster-empty,
#teacherSuggestionList > .roster-empty { margin: 0; padding: 20px 24px 24px; line-height: 1.7; }
.teacher-roster-page .form-message[data-kind="success"] { border-left-color: var(--portal-jade); background: #edf6f0; color: var(--portal-deep); }

/* Teacher enrollment and original preferences */
.teacher-enrollment-main { width: min(1080px, calc(100% - 40px)); }
.teacher-enrollment-workspace { display: grid; gap: 22px; }
.teacher-course-schedule-main { width: min(1080px, calc(100% - 40px)); }
.teacher-course-schedule-workspace { display: grid; gap: 22px; }
.course-schedule-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-top: 26px; }
.course-schedule-form select { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid var(--portal-line); border-radius: 9px; background: white; color: var(--portal-ink); font: inherit; }
.course-schedule-form .form-message { grid-column: 1 / -1; }
.course-schedule-form button { grid-column: 2; justify-self: end; min-width: 210px; }
.enrollment-overview { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-top: 1px solid var(--portal-line); border-left: 1px solid var(--portal-line); }
.enrollment-overview article { display: grid; gap: 12px; padding: 22px; border-right: 1px solid var(--portal-line); border-bottom: 1px solid var(--portal-line); background: rgba(255,254,249,.82); }
.enrollment-overview small { color: var(--portal-muted); font-weight: 800; }
.enrollment-overview strong { font: 700 32px/1 Georgia,serif; }
.enrollment-control-card,.preference-card { padding: clamp(24px,4vw,38px); border: 1px solid var(--portal-line); background: rgba(255,254,249,.82); }
.enrollment-control-card > header,.preference-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.enrollment-control-card h2,.preference-card h2 { margin: 0; font-size: clamp(24px,3vw,34px); }
.enrollment-control-card header p:last-child { margin: 10px 0 0; color: var(--portal-muted); font-size: 13px; line-height: 1.75; }
.enrollment-control-badge { padding: 7px 11px; border-radius: 999px; background: var(--portal-soft); color: var(--portal-muted); font-size: 12px; font-weight: 800; white-space: nowrap; }
.enrollment-control-badge[data-status="open"] { background: #dceee3; color: var(--portal-deep); }
.enrollment-control-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-top: 26px; }
.enrollment-control-form textarea { width: 100%; min-height: 112px; padding: 13px 15px; border: 1px solid var(--portal-line); border-radius: 9px; resize: vertical; color: var(--portal-ink); font: inherit; }
.enrollment-control-form .form-message { grid-column: 1 / -1; }
.enrollment-control-form .form-message[data-kind="success"] { border-left-color: var(--portal-jade); background: #edf6f0; color: var(--portal-deep); }
.enrollment-control-form button { grid-column: 2; justify-self: end; min-width: 190px; padding: 0 22px; }
.preference-card > header { padding-bottom: 18px; }
.preference-card > header > span { color: var(--portal-muted); font-size: 12px; }
.preference-pending { color: var(--portal-muted); }

/* Teacher first grouping */
.teacher-grouping-page [hidden] { display: none !important; }
.teacher-grouping-main { width: min(1180px, calc(100% - 40px)); }
.teacher-grouping-workspace { display: grid; gap: 22px; }
.grouping-rule { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 20px; padding: 18px 22px; border-left: 4px solid var(--portal-gold); background: var(--portal-paper); }
.grouping-rule span { color: var(--portal-muted); font-size: 13px; line-height: 1.75; }
.grouping-overview { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-top: 1px solid var(--portal-line); border-left: 1px solid var(--portal-line); }
.grouping-overview article { display: grid; gap: 12px; padding: 22px; border-right: 1px solid var(--portal-line); border-bottom: 1px solid var(--portal-line); background: rgba(255,254,249,.82); }
.grouping-overview small { color: var(--portal-muted); font-weight: 800; }
.grouping-overview strong { font: 700 32px/1 Georgia,serif; }
.grouping-editor-card { padding: clamp(24px,4vw,38px); border: 1px solid var(--portal-line); background: rgba(255,254,249,.82); }
.grouping-editor-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 20px; border-bottom: 1px solid var(--portal-line); }
.grouping-editor-card h2 { margin: 0; font-size: clamp(24px,3vw,34px); }
.grouping-editor-card header p:last-child { margin: 10px 0 0; color: var(--portal-muted); font-size: 13px; line-height: 1.75; }
.grouping-status { padding: 7px 11px; border-radius: 999px; background: var(--portal-soft); color: var(--portal-muted); font-size: 12px; font-weight: 800; white-space: nowrap; }
.grouping-rows { display: grid; }
.grouping-row { display: grid; grid-template-columns: minmax(210px,.8fr) minmax(0,2fr); gap: 24px; padding: 22px 2px; border-bottom: 1px solid var(--portal-line); }
.grouping-identity { display: grid; align-content: start; gap: 5px; }
.grouping-identity small,.grouping-identity p { color: var(--portal-muted); font-size: 11px; }
.grouping-identity p { margin: 6px 0 0; line-height: 1.65; }
.grouping-fields { display: grid; grid-template-columns: minmax(150px,.55fr) minmax(0,1.45fr); gap: 12px; }
.cooperative-fields { display: grid; grid-template-columns: minmax(150px,1fr) 100px minmax(230px,1.2fr); gap: 12px; }
.grouping-field { display: grid; gap: 7px; }
.grouping-field > span { color: var(--portal-muted); font-size: 11px; font-weight: 800; }
.grouping-field select,.grouping-field input { width: 100%; min-height: 44px; padding: 0 11px; border: 1px solid var(--portal-line); border-radius: 8px; background: white; color: var(--portal-ink); font: inherit; }
.grouping-role-fields { display: flex; align-items: end; gap: 8px; padding-bottom: 2px; }
.role-choice { min-height: 42px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--portal-line); border-radius: 8px; background: white; font-size: 11px; }
.role-choice input { width: 16px; height: 16px; accent-color: var(--portal-jade); }
.grouping-editor-card > .form-message { margin-top: 18px; }
.grouping-editor-card > .form-message[data-kind="success"] { border-left-color: var(--portal-jade); background: #edf6f0; color: var(--portal-deep); }
.grouping-revision-panel { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 24px; margin-top: 22px; padding: 22px; border-left: 4px solid var(--portal-gold); background: var(--portal-paper); }
.grouping-revision-panel > div { display: grid; align-content: start; gap: 9px; }
.grouping-revision-panel > div small { color: var(--portal-muted); font-weight: 800; }
.grouping-revision-panel > div strong { font: 700 28px/1 Georgia,serif; }
.grouping-revision-panel textarea { width: 100%; min-height: 112px; padding: 13px 15px; border: 1px solid var(--portal-line); border-radius: 9px; resize: vertical; color: var(--portal-ink); font: inherit; }
.grouping-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.grouping-actions button { min-width: 190px; padding: 0 22px; }
.grouping-result { display: grid; justify-items: end; align-content: center; gap: 7px; }
.grouping-result small { color: var(--portal-jade); font-weight: 800; }

/* Teacher first roadshow */
.teacher-roadshow-page [hidden] { display: none !important; }
.teacher-roadshow-main,.teacher-stage-main { width: min(1120px, calc(100% - 40px)); }
.teacher-roadshow-workspace { display: grid; min-width: 0; gap: 22px; }
.teacher-roadshow-workspace > * { min-width: 0; }
.roadshow-overview { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-top: 1px solid var(--portal-line); border-left: 1px solid var(--portal-line); }
.roadshow-overview article { display: grid; gap: 12px; padding: 22px; border-right: 1px solid var(--portal-line); border-bottom: 1px solid var(--portal-line); background: rgba(255,254,249,.82); }
.roadshow-overview small { color: var(--portal-muted); font-weight: 800; }
.roadshow-overview strong { font: 700 32px/1 Georgia,serif; }
.roadshow-window-card,.roadshow-review-card { padding: clamp(24px,4vw,38px); border: 1px solid var(--portal-line); background: rgba(255,254,249,.82); }
.roadshow-window-card > header,.roadshow-review-card > header,.roadshow-group-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.roadshow-window-card h2,.roadshow-review-card h2 { margin: 0; font-size: clamp(24px,3vw,34px); }
.roadshow-window-card header p:last-child { margin: 10px 0 0; color: var(--portal-muted); font-size: 13px; line-height: 1.75; }
.roadshow-window-card > header > span,.roadshow-review-card > header > span { color: var(--portal-muted); font-size: 12px; }
.roadshow-window-form { display: grid; gap: 20px; margin-top: 24px; }
.roadshow-window-form fieldset { margin: 0; padding: 18px; border: 1px solid var(--portal-line); }
.roadshow-window-form legend { padding: 0 8px; color: var(--portal-muted); font-size: 12px; font-weight: 800; }
.roadshow-group-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.roadshow-group-choice { display: flex; align-items: center; gap: 11px; min-height: 58px; padding: 10px 12px; border: 1px solid var(--portal-line); border-radius: 9px; background: white; }
.roadshow-group-choice input { width: 17px; height: 17px; accent-color: var(--portal-jade); }
.roadshow-group-choice span { display: grid; gap: 3px; }
.roadshow-group-choice small { color: var(--portal-muted); }
.roadshow-time-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.roadshow-time-grid select,.roadshow-time-grid textarea { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid var(--portal-line); border-radius: 9px; background: white; color: var(--portal-ink); font: inherit; }
.roadshow-time-grid textarea { min-height: 96px; resize: vertical; }
.roadshow-window-form > button { justify-self: end; min-width: 190px; padding: 0 22px; }
.roadshow-window-form .form-message[data-kind="success"] { border-left-color: var(--portal-jade); background: #edf6f0; color: var(--portal-deep); }
.roadshow-review-card > header { padding-bottom: 20px; border-bottom: 1px solid var(--portal-line); }
.roadshow-review-list { display: grid; min-width: 0; gap: 16px; margin-top: 20px; }
.roadshow-group-card { min-width: 0; max-width: 100%; padding: 22px; border: 1px solid var(--portal-line); background: var(--portal-paper); }
.roadshow-group-card h3,.roadshow-group-card strong,.roadshow-group-card p { overflow-wrap: anywhere; }
.roadshow-group-card h3 { margin: 0; font-size: 22px; }
.roadshow-window-badge,.roadshow-review-status { padding: 6px 9px; border-radius: 999px; background: var(--portal-soft); color: var(--portal-muted); font-size: 11px; font-weight: 800; white-space: nowrap; }
.roadshow-window-time,.roadshow-empty { color: var(--portal-muted); font-size: 12px; }
.roadshow-official-topic { display: grid; gap: 7px; margin-top: 18px; padding: 17px 18px; border-left: 4px solid var(--portal-gold); background: #f7f2df; }
.roadshow-official-topic small,.roadshow-official-topic span { color: var(--portal-muted); font-size: 11px; }
.roadshow-official-topic strong { font-size: 18px; }
.roadshow-submission,.roadshow-topic-change { display: grid; gap: 13px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--portal-line); }
.roadshow-submission-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.roadshow-submission > p,.roadshow-topic-change > p { margin: 0; line-height: 1.8; white-space: pre-wrap; }
.roadshow-review-status.is-approved { background: #dceee3; color: var(--portal-deep); }
.roadshow-review-status.is-returned,.roadshow-note { color: var(--portal-danger); }
.roadshow-note { padding: 10px 12px; border-left: 3px solid var(--portal-danger); background: #f8ecea; font-size: 12px; }
.roadshow-topic-change { padding: 18px; border: 1px solid var(--portal-line); background: var(--portal-mist); }
.roadshow-topic-change > small { color: var(--portal-muted); font-weight: 800; }
.roadshow-review-controls { display: grid; gap: 10px; }
.roadshow-review-controls textarea { width: 100%; padding: 12px 13px; border: 1px solid var(--portal-line); border-radius: 9px; resize: vertical; color: var(--portal-ink); font: inherit; }
.roadshow-review-actions { display: flex; justify-content: flex-end; gap: 10px; }
.roadshow-review-actions button { min-width: 150px; padding: 0 18px; }

/* Teacher task configuration and review */
.teacher-task-review-page [hidden] { display: none !important; }
.teacher-task-review-main { width: min(1120px, calc(100% - 40px)); }
.teacher-task-review-workspace { display: grid; gap: 22px; }
.task-review-overview { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-top: 1px solid var(--portal-line); border-left: 1px solid var(--portal-line); }
.task-review-overview article { display: grid; gap: 12px; padding: 22px; border-right: 1px solid var(--portal-line); border-bottom: 1px solid var(--portal-line); background: rgba(255,254,249,.82); }
.task-review-overview small { color: var(--portal-muted); font-weight: 800; }
.task-review-overview strong { font: 700 32px/1 Georgia,serif; }
.task-type-card,.task-review-card { padding: clamp(24px,4vw,38px); border: 1px solid var(--portal-line); background: rgba(255,254,249,.82); }
.task-type-card > header,.task-review-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 20px; border-bottom: 1px solid var(--portal-line); }
.task-type-card h2,.task-review-card h2 { margin: 0; font-size: clamp(24px,3vw,34px); }
.task-type-card header p:last-child { margin: 10px 0 0; color: var(--portal-muted); font-size: 13px; line-height: 1.75; }
.task-type-card > header > span { color: var(--portal-muted); font-size: 12px; }
.task-type-card form { display: grid; gap: 14px; margin-top: 22px; }
.task-type-card textarea,.task-review-form textarea,.task-review-form select,.task-review-filter select { width: 100%; padding: 12px 13px; border: 1px solid var(--portal-line); border-radius: 9px; background: white; color: var(--portal-ink); font: inherit; }
.task-type-card textarea,.task-review-form textarea { resize: vertical; }
.task-type-card form > button { justify-self: end; min-width: 180px; padding: 0 20px; }
.task-type-card .form-message[data-kind="success"] { border-left-color: var(--portal-jade); background: #edf6f0; color: var(--portal-deep); }
.task-review-filter { display: grid; grid-template-columns: auto 140px; align-items: center; gap: 10px; color: var(--portal-muted); font-size: 12px; font-weight: 800; }
.task-review-list { display: grid; margin-top: 8px; }
.task-review-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 20px; padding: 20px 2px; border-bottom: 1px solid var(--portal-line); }
.task-review-row:last-child { border-bottom: 0; }
.task-review-row-main { display: grid; gap: 6px; min-width: 0; }
.task-review-row-heading { display: flex; align-items: flex-start; gap: 10px; }
.task-review-row-main > p,.task-review-row-main > small { margin: 0; color: var(--portal-muted); font-size: 12px; line-height: 1.65; }
.task-review-row > button { min-width: 120px; padding: 0 16px; }

/* Outcome review */
.teacher-outcome-workspace { display: grid; gap: 22px; }
.outcome-review-overview { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-top: 1px solid var(--portal-line); border-left: 1px solid var(--portal-line); }
.outcome-review-overview article { display: grid; gap: 12px; padding: 22px; border-right: 1px solid var(--portal-line); border-bottom: 1px solid var(--portal-line); background: rgba(255,254,249,.82); }
.outcome-review-overview small { color: var(--portal-muted); font-weight: 800; }
.outcome-review-overview strong { font: 700 32px/1 Georgia,serif; }
.outcome-review-card { padding: clamp(24px,4vw,38px); border: 1px solid var(--portal-line); background: rgba(255,254,249,.82); }
.outcome-review-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 20px; border-bottom: 1px solid var(--portal-line); }
.outcome-review-card > header h2 { margin: 0; font-size: clamp(24px,3vw,34px); }
.outcome-review-card > header p:last-child { max-width: 56ch; margin: 10px 0 0; color: var(--portal-muted); font-size: 13px; line-height: 1.75; }
.outcome-review-card > header > span { color: var(--portal-muted); font-size: 12px; white-space: nowrap; }
.outcome-review-list { display: grid; }
.outcome-review-item { display: grid; gap: 18px; min-width: 0; padding: 26px 2px; border-bottom: 1px solid var(--portal-line); }
.outcome-review-item:last-child { border-bottom: 0; }
.outcome-review-item-heading,.outcome-review-content-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.outcome-review-heading-copy { display: grid; gap: 7px; min-width: 0; }
.outcome-review-item h3,.outcome-review-item h4,.outcome-review-item p { margin: 0; }
.outcome-review-item h3 { font-size: 18px; line-height: 1.45; overflow-wrap: anywhere; }
.outcome-review-meta { color: var(--portal-muted); font-size: 12px; line-height: 1.6; }
.outcome-review-badge { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; background: var(--portal-soft); color: var(--portal-muted); font-size: 10px; font-weight: 800; white-space: nowrap; }
.outcome-review-badge.is-pending { background: #f5ecd1; color: #6c5721; }
.outcome-review-badge.is-approved { background: #dceee3; color: var(--portal-deep); }
.outcome-review-badge.is-returned { background: #f7e9e2; color: var(--portal-danger); }
.outcome-review-content { display: grid; gap: 12px; padding: 20px; background: rgba(237,243,239,.72); }
.outcome-review-content h4 { max-width: 56ch; font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.outcome-review-content .secondary-action { flex: 0 0 auto; min-height: 40px; padding: 0 14px; }
.outcome-review-summary { max-width: 72ch; color: var(--portal-deep); font-size: 13px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.outcome-review-details { display: grid; gap: 8px; color: var(--portal-muted); font-size: 12px; line-height: 1.7; }
.outcome-review-note { padding: 10px 12px; border-left: 3px solid var(--portal-danger); background: #f8ece8; color: var(--portal-deep); }
.outcome-review-form { display: grid; gap: 14px; padding-top: 18px; border-top: 1px solid var(--portal-line); }
.outcome-review-form textarea { width: 100%; padding: 12px 13px; border: 1px solid var(--portal-line); border-radius: 9px; background: white; color: var(--portal-ink); font: inherit; line-height: 1.7; resize: vertical; }
.outcome-review-actions { display: flex; justify-content: flex-end; gap: 10px; }
.outcome-review-actions .primary-action,.outcome-review-actions .secondary-action { min-width: 112px; min-height: 44px; padding: 0 16px; }
.task-review-badge { padding: 5px 8px; border-radius: 999px; background: var(--portal-soft); color: var(--portal-muted); font-size: 10px; font-weight: 800; white-space: nowrap; }
.task-review-badge.is-pending { background: #f5ecd1; color: #6c5721; }
.task-review-badge.is-approved { background: #dceee3; color: var(--portal-deep); }
.task-review-badge.is-returned,.task-review-badge.is-excluded,.task-review-note { color: var(--portal-danger); }
.task-review-note { padding: 8px 10px; border-left: 3px solid var(--portal-danger); background: #f8ecea; }
.task-review-dialog { width: min(860px,calc(100% - 32px)); max-height: calc(100dvh - 40px); padding: 0; border: 1px solid var(--portal-line); background: var(--portal-paper); color: var(--portal-ink); box-shadow: var(--portal-shadow); }
.task-review-dialog::backdrop { background: rgba(26,42,36,.58); }
.task-review-dialog-shell { padding: clamp(22px,4vw,34px); }
.task-review-dialog-shell > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--portal-line); }
.task-review-dialog h2 { margin: 0; font-size: clamp(24px,3vw,32px); }
#taskDialogBody { display: grid; gap: 18px; margin-top: 20px; }
.task-detail-facts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-top: 1px solid var(--portal-line); border-left: 1px solid var(--portal-line); }
.task-detail-facts div { display: grid; gap: 7px; padding: 12px; border-right: 1px solid var(--portal-line); border-bottom: 1px solid var(--portal-line); }
.task-detail-facts small,.task-detail-copy > small,.task-detail-evidence > small { color: var(--portal-muted); font-size: 11px; font-weight: 800; }
.task-detail-facts strong { font-size: 12px; }
.task-detail-copy,.task-detail-evidence { display: grid; gap: 9px; }
.task-detail-copy p { margin: 0; line-height: 1.8; white-space: pre-wrap; }
.task-detail-evidence > div { display: grid; gap: 7px; }
.task-detail-evidence a { color: var(--portal-jade); overflow-wrap: anywhere; }
.task-detail-evidence span,.task-dialog-readonly,.task-dialog-loading { color: var(--portal-muted); font-size: 12px; }
.task-review-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; padding-top: 20px; border-top: 1px solid var(--portal-line); }
.task-review-members { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 15px; border: 1px solid var(--portal-line); }
.task-review-members legend { padding: 0 7px; color: var(--portal-muted); font-size: 11px; font-weight: 800; }
.task-review-members label,.task-review-late { display: flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 10px; border: 1px solid var(--portal-line); border-radius: 8px; background: white; font-size: 12px; }
.task-review-members input,.task-review-late input { width: 16px; height: 16px; accent-color: var(--portal-jade); }
.task-review-late,.task-review-form .form-message { grid-column: 1 / -1; }
.task-review-form > button { grid-column: 2; justify-self: end; min-width: 170px; padding: 0 20px; }

/* Teacher comment moderation */
.teacher-comment-moderation-page [hidden] { display: none !important; }
.teacher-comment-moderation-main { width: min(1120px, calc(100% - 40px)); }
.teacher-comment-workspace { display: grid; gap: 22px; }
.comment-moderation-overview { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-top: 1px solid var(--portal-line); border-left: 1px solid var(--portal-line); }
.comment-moderation-overview article { display: grid; gap: 12px; padding: 22px; border-right: 1px solid var(--portal-line); border-bottom: 1px solid var(--portal-line); background: rgba(255,254,249,.82); }
.comment-moderation-overview small { color: var(--portal-muted); font-weight: 800; }
.comment-moderation-overview strong { font: 700 32px/1 Georgia,serif; }
.comment-settings-card,.comment-admin-card { padding: clamp(24px,4vw,38px); border: 1px solid var(--portal-line); background: rgba(255,254,249,.82); }
.comment-settings-card > header,.comment-admin-card > header,.comment-admin-row > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.comment-settings-card > header,.comment-admin-card > header { padding-bottom: 20px; border-bottom: 1px solid var(--portal-line); }
.comment-settings-card h2,.comment-admin-card h2 { margin: 0; font-size: clamp(24px,3vw,34px); }
.comment-settings-card header p:last-child { margin: 10px 0 0; color: var(--portal-muted); font-size: 13px; line-height: 1.75; }
.comment-settings-card > header > span,.comment-admin-card > header > span { color: var(--portal-muted); font-size: 12px; }
.comment-settings-card form { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 16px; margin-top: 22px; }
.comment-settings-card input,.comment-settings-card textarea,.comment-admin-filter select,.comment-moderation-form select,.comment-moderation-form textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--portal-line); border-radius: 9px; background: white; color: var(--portal-ink); font: inherit; }
.comment-settings-card textarea,.comment-moderation-form textarea { resize: vertical; }
.comment-settings-card .form-message { grid-column: 1 / -1; }
.comment-settings-card .form-message[data-kind="success"] { border-left-color: var(--portal-jade); background: #edf6f0; color: var(--portal-deep); }
.comment-settings-card form > button { grid-column: 2; justify-self: end; min-width: 180px; padding: 0 20px; }
.comment-admin-filter { display: grid; grid-template-columns: auto 140px; align-items: center; gap: 10px; color: var(--portal-muted); font-size: 12px; font-weight: 800; }
.comment-admin-list { display: grid; gap: 16px; margin-top: 20px; }
.comment-admin-row { padding: 20px; border: 1px solid var(--portal-line); background: var(--portal-paper); }
.comment-admin-row > header > small { color: var(--portal-muted); font-size: 11px; }
.comment-admin-identity { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.comment-status { padding: 5px 8px; border-radius: 999px; background: var(--portal-soft); color: var(--portal-muted); font-size: 10px; font-weight: 800; }
.comment-status.is-pending { background: #f5ecd1; color: #6c5721; }
.comment-status.is-published { background: #dceee3; color: var(--portal-deep); }
.comment-status.is-hidden,.comment-status.is-deleted { color: var(--portal-danger); }
.comment-admin-flags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.comment-admin-flags span { padding: 5px 8px; background: var(--portal-mist); color: var(--portal-muted); font-size: 10px; font-weight: 800; }
.comment-admin-flags .is-valid { background: #dceee3; color: var(--portal-deep); }
.comment-admin-flags .is-highlighted { background: #f5ecd1; color: #6c5721; }
.comment-admin-body { margin: 16px 0 0; line-height: 1.8; white-space: pre-wrap; }
.comment-admin-reason { margin: 13px 0 0; padding: 9px 11px; border-left: 3px solid var(--portal-gold); background: #f7f2df; color: var(--portal-muted); font-size: 11px; }
.comment-moderation-form { display: grid; grid-template-columns: minmax(0,1fr) minmax(220px,.7fr) auto; gap: 12px; align-items: start; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--portal-line); }
.comment-moderation-controls { display: grid; grid-template-columns: 130px repeat(2,minmax(0,1fr)); gap: 8px; }
.comment-check { display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 9px; border: 1px solid var(--portal-line); border-radius: 8px; background: white; font-size: 11px; }
.comment-check input { width: 16px; height: 16px; accent-color: var(--portal-jade); }
.comment-moderation-form .form-message { grid-column: 1 / -1; }
.comment-moderation-form > button { min-width: 120px; padding: 0 14px; }

/* Teacher classroom speech management */
.teacher-speech-management-page [hidden] { display: none !important; }
.teacher-speech-management-main { width: min(1160px, calc(100% - 40px)); }
.teacher-speech-workspace { display: grid; gap: 22px; }
.speech-management-overview { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-top: 1px solid var(--portal-line); border-left: 1px solid var(--portal-line); }
.speech-management-overview article { display: grid; gap: 12px; padding: 22px; border-right: 1px solid var(--portal-line); border-bottom: 1px solid var(--portal-line); background: rgba(255,254,249,.82); }
.speech-management-overview small { color: var(--portal-muted); font-weight: 800; }
.speech-management-overview strong { color: var(--portal-deep); font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 30px; }
.speech-round-editor,.speech-round-admin,.speech-review-admin { border: 1px solid var(--portal-line); background: rgba(255,254,249,.88); }
.speech-round-editor > header,.speech-round-admin > header,.speech-review-admin > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 26px; border-bottom: 1px solid var(--portal-line); }
.speech-round-editor h2,.speech-round-admin h2,.speech-review-admin h2 { margin: 3px 0 6px; font-size: 24px; }
.speech-round-editor header p { margin: 0; color: var(--portal-muted); }
#speechRoundForm { display: grid; gap: 20px; padding: 26px; }
.speech-round-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.speech-round-fields input,.speech-round-fields select,.speech-review-admin select,.speech-admin-group-action input,.speech-inline-review select,.speech-inline-review textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--portal-line); border-radius: 9px; background: white; color: var(--portal-ink); font: inherit; }
.speech-round-fields input:focus-visible,.speech-round-fields select:focus-visible,.speech-review-admin select:focus-visible,.speech-admin-group-action input:focus-visible,.speech-inline-review select:focus-visible,.speech-inline-review textarea:focus-visible { outline: 3px solid rgba(185,154,61,.48); outline-offset: 2px; }
.speech-group-picker { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px 16px; margin: 0; padding: 18px; border: 1px solid var(--portal-line); }
.speech-group-picker legend { padding: 0 8px; color: var(--portal-muted); font-size: 13px; font-weight: 800; }
.speech-group-picker label { display: flex; align-items: center; gap: 9px; min-width: 0; }
.speech-round-admin-list,.speech-admin-groups,.speech-review-list { display: grid; }
.speech-admin-round + .speech-admin-round,.speech-admin-group + .speech-admin-group,.speech-review-row + .speech-review-row { border-top: 1px solid var(--portal-line); }
.speech-admin-round > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 26px; background: var(--portal-mist); }
.speech-admin-round h3 { margin: 3px 0 6px; font-size: 21px; }
.speech-admin-round header p { margin: 0; color: var(--portal-muted); font-size: 13px; }
.speech-admin-group { display: grid; grid-template-columns: minmax(150px,.36fr) minmax(0,1fr); gap: 12px 24px; align-items: center; padding: 18px 26px; }
.speech-admin-group > div:first-child { display: grid; gap: 5px; }
.speech-admin-group small { color: var(--portal-muted); }
.speech-admin-group-action { display: grid; grid-template-columns: minmax(150px,1fr) minmax(160px,auto) auto; gap: 10px; align-items: center; }
.speech-pool,.speech-selection-copy { color: var(--portal-muted); font-size: 13px; }
.speech-complete-mark { color: var(--portal-deep); font-size: 13px; }
.speech-admin-group > .form-message { grid-column: 2; margin: 0; }
.speech-review-admin > header label { display: grid; gap: 6px; min-width: 150px; color: var(--portal-muted); font-size: 12px; font-weight: 800; }
.speech-review-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(240px,.42fr); gap: 24px; padding: 22px 26px; }
.speech-review-copy header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.speech-review-copy > p { margin: 12px 0; line-height: 1.75; white-space: pre-wrap; }
.speech-review-copy > small { color: var(--portal-muted); }
.speech-inline-review { display: grid; gap: 10px; }
.speech-inline-review .form-message { margin: 0; }

/* Teacher classroom vote management */
.teacher-vote-management-page [hidden] { display: none !important; }
.teacher-vote-management-main { width: min(1160px, calc(100% - 40px)); }
.teacher-vote-workspace { display: grid; gap: 22px; }
.teacher-vote-overview { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-top: 1px solid var(--portal-line); border-left: 1px solid var(--portal-line); }
.teacher-vote-overview article { display: grid; gap: 12px; padding: 22px; border-right: 1px solid var(--portal-line); border-bottom: 1px solid var(--portal-line); background: rgba(255,254,249,.82); }
.teacher-vote-overview small { color: var(--portal-muted); font-weight: 800; }
.teacher-vote-overview strong { color: var(--portal-deep); font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 30px; }
.vote-round-editor,.teacher-vote-rounds,.teacher-vote-review { border: 1px solid var(--portal-line); background: rgba(255,254,249,.88); }
.vote-round-editor > header,.teacher-vote-rounds > header,.teacher-vote-review > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 26px; border-bottom: 1px solid var(--portal-line); }
.vote-round-editor h2,.teacher-vote-rounds h2,.teacher-vote-review h2 { margin: 3px 0 6px; font-size: 24px; }
.vote-round-editor header p { margin: 0; color: var(--portal-muted); }
#voteRoundForm { display: grid; gap: 20px; padding: 26px; }
.vote-round-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.vote-round-fields input,.vote-round-fields select,.teacher-vote-review > header select,.teacher-vote-review-form textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--portal-line); border-radius: 9px; background: white; color: var(--portal-ink); font: inherit; }
.vote-round-fields input:focus-visible,.vote-round-fields select:focus-visible,.teacher-vote-review > header select:focus-visible,.teacher-vote-review-form textarea:focus-visible { outline: 3px solid rgba(185,154,61,.48); outline-offset: 2px; }
.vote-group-picker { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 16px; margin: 0; padding: 18px; border: 1px solid var(--portal-line); }
.vote-group-picker legend { padding: 0 8px; color: var(--portal-muted); font-size: 13px; font-weight: 800; }
.vote-group-picker label { display: flex; align-items: center; gap: 9px; }
.teacher-vote-round + .teacher-vote-round,.teacher-vote-row + .teacher-vote-row { border-top: 1px solid var(--portal-line); }
.teacher-vote-round { display: grid; gap: 16px; padding: 22px 26px; }
.teacher-vote-round > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.teacher-vote-round h3 { margin: 3px 0 6px; font-size: 21px; }
.teacher-vote-round header p,.teacher-vote-target-copy { margin: 0; color: var(--portal-muted); font-size: 13px; }
.teacher-vote-round-actions { display: flex; gap: 10px; }
.teacher-vote-round-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-left: 1px solid var(--portal-line); border-top: 1px solid var(--portal-line); }
.teacher-vote-round-metrics span { display: grid; gap: 5px; padding: 13px; border-right: 1px solid var(--portal-line); border-bottom: 1px solid var(--portal-line); }
.teacher-vote-round-metrics small { color: var(--portal-muted); }
.teacher-vote-round-metrics strong { font-family: ui-monospace,SFMono-Regular,Consolas,monospace; }
.teacher-vote-public-result { padding: 18px; background: var(--portal-mist); }
.vote-public-totals { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.vote-public-totals article { display: grid; gap: 5px; padding: 12px; border: 1px solid var(--portal-line); background: var(--portal-paper); }
.vote-public-totals span,.vote-public-reasons { color: var(--portal-muted); font-size: 12px; }
.vote-public-reasons p { line-height: 1.7; }
.teacher-vote-review > header label { display: grid; gap: 6px; min-width: 180px; color: var(--portal-muted); font-size: 12px; font-weight: 800; }
.vote-privacy-note { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 20px; padding: 16px 26px; border-bottom: 1px solid var(--portal-line); background: var(--portal-mist); }
.vote-privacy-note span { color: var(--portal-muted); font-size: 13px; }
.teacher-vote-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(250px,.42fr); gap: 24px; padding: 22px 26px; }
.teacher-vote-copy header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.teacher-vote-copy > small { color: var(--portal-muted); }
.teacher-vote-representation { color: var(--portal-muted); font-size: 12px; }
.teacher-vote-choice { line-height: 1.75; white-space: pre-wrap; }
.teacher-vote-review-note { padding: 9px 11px; border-left: 3px solid var(--portal-gold); background: #f7f2df; color: var(--portal-muted); font-size: 12px; }
.vote-validity { padding: 5px 8px; background: var(--portal-soft); color: var(--portal-danger); font-size: 10px; font-weight: 800; }
.vote-validity.is-valid { background: #dceee3; color: var(--portal-deep); }
.teacher-vote-review-form { display: grid; gap: 10px; }
.vote-review-check { display: flex; align-items: center; gap: 8px; min-height: 42px; }
.teacher-vote-review-form .form-message { margin: 0; }

/* Private member ratings */
.member-rating-page [hidden],.teacher-member-rating-page [hidden] { display: none !important; }
.member-rating-main,.teacher-member-rating-main { width: min(1120px, calc(100% - 40px)); }
.member-rating-workspace,.teacher-member-rating-workspace { display: grid; gap: 22px; }
.member-rating-privacy { display: grid; grid-template-columns: minmax(220px,.45fr) minmax(0,1fr); gap: 24px; align-items: center; padding: 22px 26px; border-left: 4px solid var(--portal-jade); background: var(--portal-paper); }
.member-rating-privacy div { display: grid; gap: 7px; }
.member-rating-privacy small,.member-rating-privacy p { color: var(--portal-muted); }
.member-rating-privacy p { margin: 0; line-height: 1.75; }
.member-rating-panel { border: 1px solid var(--portal-line); background: rgba(255,254,249,.88); }
.member-rating-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 26px; border-bottom: 1px solid var(--portal-line); }
.member-rating-panel h2 { margin: 0 0 7px; font-size: 24px; }
.member-rating-panel header p { margin: 0; color: var(--portal-muted); line-height: 1.7; }
.member-rating-panel header > span { color: var(--portal-muted); font-size: 12px; font-weight: 800; white-space: nowrap; }
#leadRatingForm { display: grid; gap: 18px; padding-bottom: 24px; }
.member-rating-row { display: grid; grid-template-columns: minmax(190px,.38fr) minmax(0,1fr); gap: 22px; padding: 20px 26px; }
.member-rating-row + .member-rating-row,.member-rating-record + .member-rating-record { border-top: 1px solid var(--portal-line); }
.member-rating-identity { display: grid; align-content: start; gap: 6px; }
.member-rating-identity small,.member-rating-record small { color: var(--portal-muted); }
.member-rating-fields { display: grid; grid-template-columns: minmax(130px,.28fr) minmax(0,1fr); gap: 14px; }
.member-rating-stars { display: grid; align-content: start; gap: 8px; color: var(--portal-muted); font-size: 12px; font-weight: 800; }
.member-rating-stars select,.member-rating-fields textarea,.teacher-member-rating-form textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--portal-line); border-radius: 9px; background: white; color: var(--portal-ink); font: inherit; }
.member-rating-stars select:focus-visible,.member-rating-fields textarea:focus-visible,.teacher-member-rating-form textarea:focus-visible { outline: 3px solid rgba(185,154,61,.48); outline-offset: 2px; }
#leadRatingReasonField,#leadRatingMessage,#leadRatingForm > button { margin-right: 26px; margin-left: 26px; }
#leadRatingForm > button { justify-self: end; min-width: 190px; padding: 0 20px; }
.member-rating-page .form-message[data-kind="success"],.teacher-member-rating-page .form-message[data-kind="success"] { border-left-color: var(--portal-jade); background: #edf6f0; color: var(--portal-deep); }
.member-rating-overview { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border-top: 1px solid var(--portal-line); border-left: 1px solid var(--portal-line); }
.member-rating-overview article { display: grid; gap: 10px; padding: 20px 22px; border-right: 1px solid var(--portal-line); border-bottom: 1px solid var(--portal-line); background: rgba(255,254,249,.82); }
.member-rating-overview small { color: var(--portal-muted); font-weight: 800; }
.member-rating-overview strong { color: var(--portal-deep); font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 28px; }
.teacher-member-rating-form { display: grid; grid-template-columns: 130px minmax(0,1fr) minmax(0,1fr) auto; gap: 12px; align-items: start; }
.teacher-member-rating-form .form-message { grid-column: 1 / -1; margin: 0; }
.teacher-member-rating-form > button { min-width: 112px; padding: 0 14px; }
.member-rating-record { display: grid; grid-template-columns: minmax(210px,.4fr) minmax(0,1fr); gap: 22px; padding: 18px 26px; }
.member-rating-record > div:first-child,.member-rating-record-detail { display: grid; align-content: start; gap: 6px; }
.member-rating-record-detail { grid-template-columns: auto auto 1fr; align-items: baseline; }
.member-rating-record-detail span,.member-rating-record-detail small { font-size: 12px; }
.member-rating-record-detail p { grid-column: 1 / -1; margin: 6px 0 0; line-height: 1.7; white-space: pre-wrap; }

.teacher-grade-main { max-width: 1500px; }
.teacher-grade-workspace { display: grid; gap: 18px; }
.grade-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--portal-line); background: var(--portal-paper); }
.grade-overview article { padding: 16px 20px; border-right: 1px solid var(--portal-line); }
.grade-overview article:last-child { border-right: 0; }
.grade-overview small { display: block; color: var(--portal-muted); }
.grade-overview strong { display: block; margin-top: 5px; font-family: ui-monospace, Consolas, monospace; font-size: 26px; }
.grade-panel { border: 1px solid var(--portal-line); background: var(--portal-paper); }
.grade-panel > header { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 18px 20px; border-bottom: 1px solid var(--portal-line); }
.grade-panel h2,.grade-panel h3,.grade-panel h4 { margin: 0; }
.grade-panel header p { margin: 5px 0 0; color: var(--portal-muted); font-size: 13px; }
.grade-filter { display: grid; gap: 5px; min-width: 150px; color: var(--portal-muted); font-size: 12px; }
.grade-filter select,.score-row-form input { width: 100%; border: 1px solid var(--portal-line); background: var(--portal-paper); color: var(--portal-ink); }
.grade-filter select { min-height: 38px; padding: 6px 10px; }
.grade-table-wrap { overflow-x: auto; }
.grade-table { width: 100%; min-width: 860px; border-collapse: collapse; }
.grade-table th,.grade-table td { padding: 11px 14px; border-bottom: 1px solid var(--portal-line); text-align: left; vertical-align: top; }
.grade-table th { color: var(--portal-muted); font-size: 12px; font-weight: 600; }
.grade-table td small { display: block; margin-top: 4px; color: var(--portal-muted); font-size: 11px; }
.grade-table tbody tr:last-child td { border-bottom: 0; }
.grade-number { font-family: ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums; }
.grade-status { display: inline-block; padding: 2px 7px; border: 1px solid currentColor; font-size: 11px; }
.grade-status.is-provisional { color: var(--portal-gold); }
.grade-status.is-complete { color: var(--portal-jade); }
.score-entry-columns { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.score-entry-columns > section { min-width: 0; padding: 20px; }
.score-entry-columns > section + section { border-left: 1px solid var(--portal-line); }
.score-entry-columns h3 { margin-bottom: 12px; font-size: 15px; }
.score-entry-group { border-top: 1px solid var(--portal-line); }
.score-entry-group:last-child { border-bottom: 1px solid var(--portal-line); }
.score-entry-group summary { display: flex; justify-content: space-between; gap: 12px; padding: 12px 4px; cursor: pointer; }
.score-entry-group summary small { color: var(--portal-muted); }
.score-entry-row { padding: 12px 4px; border-top: 1px dashed var(--portal-line); }
.score-entry-row h4 { margin-bottom: 8px; font-size: 13px; }
.score-row-form { display: grid; grid-template-columns: 90px minmax(120px, 1fr) minmax(120px, 1fr) auto; gap: 8px; align-items: end; }
.score-row-form label { display: grid; gap: 4px; color: var(--portal-muted); font-size: 11px; }
.score-row-form input { min-height: 36px; padding: 6px 8px; }
.score-row-form .secondary-action { min-height: 36px; }
.score-row-form .form-message { grid-column: 1 / -1; margin: 0; }
.grade-tools-nav { display: flex; justify-content: flex-end; gap: 10px; }

.teacher-grade-finalization-page [hidden] { display: none !important; }
.teacher-grade-finalization-main { width: min(1240px, calc(100% - 40px)); }
.grade-finalization-workspace { display: grid; gap: 18px; }
.finalization-panel { border: 1px solid var(--portal-line); background: var(--portal-paper); }
.finalization-panel > header { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding: 18px 20px; border-bottom: 1px solid var(--portal-line); }
.finalization-panel > header h2,.finalization-panel h3 { margin: 0; }
.finalization-panel > header p { margin: 5px 0 0; color: var(--portal-muted); font-size: 13px; line-height: 1.7; }
.finalization-panel > header > span { color: var(--portal-jade); font-size: 12px; font-weight: 800; white-space: nowrap; }
#gradeRuleForm { padding: 20px; }
#gradeWeightGroups { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border-top: 1px solid var(--portal-line); border-left: 1px solid var(--portal-line); }
.grade-weight-group { padding: 16px; border-right: 1px solid var(--portal-line); border-bottom: 1px solid var(--portal-line); }
.grade-weight-group > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.grade-weight-group h3,.grade-parameter-group h3 { font-size: 14px; }
.grade-weight-group output { font: 700 12px/1 ui-monospace,Consolas,monospace; }
.grade-weight-group output[data-valid="false"] { color: var(--portal-danger); }
.grade-weight-group output[data-valid="true"] { color: var(--portal-jade); }
.rule-field-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.rule-number-field { display: grid; gap: 4px; color: var(--portal-muted); font-size: 11px; }
.rule-number-field input { width: 100%; min-height: 36px; padding: 6px 8px; border: 1px solid var(--portal-line); background: var(--portal-paper); color: var(--portal-ink); font-family: ui-monospace,Consolas,monospace; }
.grade-rule-parameters { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 20px 0; }
.grade-parameter-group { padding: 16px; background: var(--portal-mist); }
.grade-parameter-group h3 { margin-bottom: 12px; }
#gradeRuleForm > .form-field,#gradeFreezeForm .form-field { display: grid; gap: 7px; margin-bottom: 12px; color: var(--portal-muted); font-size: 12px; }
#gradeRuleForm textarea,#gradeFreezeForm textarea,#gradeFreezeForm input[type="text"],#gradeFreezeForm input[type="password"] { width: 100%; padding: 10px 12px; border: 1px solid var(--portal-line); background: var(--portal-paper); color: var(--portal-ink); resize: vertical; }
#gradeRuleForm > .primary-action,#gradeFreezeForm > .primary-action { min-width: 190px; padding: 0 18px; }
.freeze-checks { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-bottom: 1px solid var(--portal-line); }
.freeze-checks article { padding: 16px 20px; border-right: 1px solid var(--portal-line); }
.freeze-checks article:last-child { border-right: 0; }
.freeze-checks small { display: block; color: var(--portal-muted); }
.freeze-checks strong { display: block; margin-top: 5px; font: 700 20px/1.2 ui-monospace,Consolas,monospace; }
.freeze-warning { margin: 0; padding: 12px 20px; border-bottom: 1px solid #e8dcae; background: #faf4df; color: #6c5721; font-size: 13px; }
#gradeFreezeForm { display: grid; grid-template-columns: minmax(0,1fr) minmax(220px,.6fr); gap: 0 16px; padding: 20px; }
#gradeFreezeForm .form-field:first-child { grid-row: span 2; }
.confirmation-check { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 9px; margin: 4px 0 14px; font-size: 13px; line-height: 1.6; }
.confirmation-check input { margin-top: 4px; }
#gradeFreezeForm .form-message { grid-column: 1 / -1; margin-bottom: 12px; }
.danger-action { border-color: #77352f; background: #77352f; }
.danger-action:hover { background: #612a26; }
.frozen-summary,.report-generation-body { padding: 20px; }
.frozen-summary p,.report-generation-body p { margin: 7px 0 0; color: var(--portal-muted); line-height: 1.7; }
.report-generation-body > .primary-action { margin-top: 16px; padding: 0 18px; }
#reportList { margin-top: 18px; }
.report-record-row { display: grid; grid-template-columns: minmax(200px,1fr) minmax(120px,.4fr) minmax(170px,.5fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--portal-line); }
.report-record-row span,.report-record-row small { color: var(--portal-muted); }
.teacher-grade-finalization-page textarea:focus-visible,.teacher-grade-finalization-page select:focus-visible { outline: 3px solid rgba(185,154,61,.48); outline-offset: 3px; }

.teacher-grade-excel-page [hidden] { display: none !important; }
.teacher-grade-excel-main { width: min(1180px,calc(100% - 40px)); }
.grade-excel-workspace { display: grid; gap: 18px; }
.excel-panel { border: 1px solid var(--portal-line); background: var(--portal-paper); }
.excel-panel > header { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding: 18px 20px; border-bottom: 1px solid var(--portal-line); }
.excel-panel > header h2,.excel-panel h3 { margin: 0; }
.excel-panel > header p { margin: 5px 0 0; color: var(--portal-muted); font-size: 13px; line-height: 1.7; }
.excel-panel > header > span { color: var(--portal-jade); font-size: 12px; font-weight: 800; white-space: nowrap; }
.excel-panel > header .secondary-action { flex: 0 0 auto; }
.grade-export-actions { display: grid; grid-template-columns: 1fr 1fr; }
.grade-export-actions article { padding: 20px; }
.grade-export-actions article + article { border-left: 1px solid var(--portal-line); }
.grade-export-actions p { min-height: 48px; margin: 8px 0 14px; color: var(--portal-muted); font-size: 13px; line-height: 1.7; }
.grade-export-actions .primary-action,.grade-export-actions .secondary-action { width: fit-content; padding: 0 18px; text-decoration: none; }
.grade-export-actions .form-field { display: grid; gap: 6px; margin: 8px 0 14px; color: var(--portal-muted); font-size: 12px; }
.grade-export-actions select { min-height: 42px; padding: 7px 10px; border: 1px solid var(--portal-line); background: var(--portal-paper); color: var(--portal-ink); }
#singleStudentExport[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.independent-import-body { padding: 20px; }
.independent-import-body .template-note { margin-top: 0; }
#independentGradeUploadForm { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: end; }
#independentGradeUploadForm .form-field { display: grid; gap: 6px; color: var(--portal-muted); font-size: 12px; }
#independentGradeUploadForm input { min-height: 42px; padding: 7px 10px; border: 1px solid var(--portal-line); background: var(--portal-paper); }
#independentGradeUploadForm .form-message { grid-column: 1 / -1; }
#independentGradeUploadForm .primary-action,#confirmIndependentGrades { padding: 0 18px; }
.independent-grade-preview .preview-summary { margin: 18px 20px 0; }
.excel-preview-table { min-width: 820px; }
.independent-grade-preview .grade-table-wrap { margin-top: 14px; }
.independent-grade-preview > .form-message { margin: 16px 20px 0; }
.independent-grade-preview > .primary-action { margin: 16px 20px 20px; }
.import-result { padding: 20px; border-left: 4px solid var(--portal-jade); }
.import-result p { margin: 8px 0 0; color: var(--portal-muted); }
.teacher-grade-excel-page select:focus-visible { outline: 3px solid rgba(185,154,61,.48); outline-offset: 3px; }

@media (max-width: 820px) {
  .login-layout { display: block; }
  .login-story { min-height: auto; padding: 24px; border-right: 0; border-bottom: 1px solid var(--portal-line); }
  .portal-brand img { width: 52px; height: 52px; }
  .story-copy { margin-top: 48px; }
  .story-copy h1 { font-size: clamp(40px, 11vw, 58px); }
  .story-copy > p:not(.eyebrow) { margin-top: 14px; font-size: 13px; }
  .story-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 0; margin-top: 24px; }
  .story-steps li:nth-child(2) { border-right: 0; }
  .story-steps li:nth-child(3) { padding-left: 0; }
  .story-note { display: none; }
  .login-panel { min-height: auto; padding: 28px 20px 40px; }
  .login-card { padding: 28px 24px; box-shadow: none; }
  .portal-header { align-items: flex-start; padding: 18px 20px; }
  .portal-header .portal-brand small { display: none; }
  .account-area { gap: 8px; }
  .account-copy small { display: none; }
  .account-copy strong { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .home-hero { grid-template-columns: 1fr; }
  .module-list { grid-template-columns: 1fr 1fr; }
  .workspace-grid { grid-template-columns: 1fr; }
  .workspace-topic, .workspace-current { grid-column: auto; }
  .direction-grid { grid-template-columns: 1fr; }
  .task-card { grid-template-columns: minmax(0, 1fr) auto; }
  .task-card button { grid-column: 1 / -1; width: 100%; }
  .vote-targets[data-count="4"] { --target-count: 2; }
  .comment-workspace { grid-template-columns: 230px minmax(0, 1fr); gap: 20px; }
  .speech-summary-form { grid-template-columns: 1fr; }
  .speech-summary-form > button { grid-column: 1; }
  .roster-upload-form { grid-template-columns: 1fr; }
  .roster-upload-form button { justify-self: end; }
  .enrollment-overview { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .grouping-overview { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .roadshow-overview { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .roadshow-group-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .task-review-overview { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .outcome-review-overview { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .task-detail-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .comment-moderation-overview { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .comment-moderation-form { grid-template-columns: 1fr; }
  .comment-moderation-form .form-message { grid-column: 1; }
  .speech-management-overview { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .speech-round-fields,.speech-group-picker { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .speech-admin-group,.speech-review-row { grid-template-columns: 1fr; }
  .speech-admin-group > .form-message { grid-column: 1; }
  .teacher-vote-overview { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .vote-round-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .teacher-vote-row { grid-template-columns: 1fr; }
  .member-rating-row,.member-rating-record { grid-template-columns: 1fr; }
  .teacher-member-rating-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .teacher-member-rating-form .form-message { grid-column: 1 / -1; }
  .grouping-row { grid-template-columns: 1fr; gap: 14px; }
  .grade-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grade-overview article:nth-child(2) { border-right: 0; }
  .grade-overview article:nth-child(-n+2) { border-bottom: 1px solid var(--portal-line); }
  .score-entry-columns { grid-template-columns: 1fr; }
  .score-entry-columns > section + section { border-top: 1px solid var(--portal-line); border-left: 0; }
  .score-row-form { grid-template-columns: 80px 1fr; }
  .score-row-form .score-reason,.score-row-form .secondary-action,.score-row-form .form-message { grid-column: 1 / -1; }
  .teacher-grade-page .portal-header,.teacher-grade-finalization-page .portal-header,.teacher-grade-excel-page .portal-header { flex-wrap: wrap; }
  .teacher-grade-page .account-area,.teacher-grade-finalization-page .account-area,.teacher-grade-excel-page .account-area { width: 100%; justify-content: flex-end; }
  .rule-field-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .grade-rule-parameters { grid-template-columns: 1fr; }
  #gradeFreezeForm { grid-template-columns: 1fr; }
  #gradeFreezeForm .form-field:first-child { grid-row: auto; }
}

@media (max-width: 520px) {
  .login-story { padding: 20px; }
  .login-story .portal-brand img { width: 44px; height: 44px; }
  .login-story .portal-brand strong { font-size: 22px; }
  .story-copy { margin-top: 30px; }
  .story-copy h1 { font-size: 36px; line-height: 1.16; }
  .story-copy > p:not(.eyebrow) { display: none; }
  .story-steps { margin-top: 20px; padding-top: 14px; }
  .story-steps li { gap: 5px; }
  .login-panel { padding: 20px 16px 32px; }
  .login-card { padding: 24px 20px; }
  .panel-heading h2 { font-size: 29px; }
  .portal-header .portal-brand strong { font-size: 18px; }
  .portal-header .portal-brand img { width: 44px; height: 44px; }
  body[data-required-role="admin"]:not(.teacher-home-page) .portal-header { flex-wrap: wrap; }
  body[data-required-role="admin"]:not(.teacher-home-page) .account-area { width: 100%; justify-content: flex-end; }
  .secondary-action { min-height: 44px; padding: 0 12px; }
  .portal-main { width: min(100% - 32px, 1180px); padding-top: 44px; }
  .home-hero h1 { font-size: 40px; }
  .module-list { grid-template-columns: 1fr; }
  .module-card { min-height: 190px; }
  .project-page .portal-header { flex-wrap: wrap; }
  .project-page .account-area { width: 100%; justify-content: flex-end; }
  .enrollment-page .portal-header { flex-wrap: wrap; }
  .enrollment-page .account-area { width: 100%; justify-content: flex-end; }
  .task-page .portal-header { flex-wrap: wrap; }
  .task-page .account-area { width: 100%; justify-content: flex-end; }
  .vote-page .portal-header { flex-wrap: wrap; }
  .vote-page .account-area { width: 100%; justify-content: flex-end; }
  .comment-page .portal-header { flex-wrap: wrap; }
  .comment-page .account-area { width: 100%; justify-content: flex-end; }
  .retired-admin-page .portal-header,.poster-prototype-page .portal-header { flex-wrap: wrap; }
  .retired-admin-page .account-area,.poster-prototype-page .account-area { width: 100%; justify-content: flex-end; }
  .speech-page .portal-header { flex-wrap: wrap; }
  .speech-page .account-area { width: 100%; justify-content: flex-end; }
  .teacher-roster-page .portal-header { flex-wrap: wrap; }
  .teacher-roster-page .account-area { width: 100%; justify-content: flex-end; }
  .teacher-enrollment-page .portal-header { flex-wrap: wrap; }
  .teacher-enrollment-page .account-area { width: 100%; justify-content: flex-end; }
  .teacher-grouping-page .portal-header { flex-wrap: wrap; }
  .teacher-grouping-page .account-area { width: 100%; justify-content: flex-end; }
  .teacher-roadshow-page .portal-header { flex-wrap: wrap; }
  .teacher-roadshow-page .account-area { width: 100%; justify-content: flex-end; }
  .teacher-task-review-page .portal-header { flex-wrap: wrap; }
  .teacher-task-review-page .account-area { width: 100%; justify-content: flex-end; }
  .teacher-comment-moderation-page .portal-header { flex-wrap: wrap; }
  .teacher-comment-moderation-page .account-area { width: 100%; justify-content: flex-end; }
  .teacher-speech-management-page .portal-header { flex-wrap: wrap; }
  .teacher-speech-management-page .account-area { width: 100%; justify-content: flex-end; }
  .teacher-vote-management-page .portal-header { flex-wrap: wrap; }
  .teacher-vote-management-page .account-area { width: 100%; justify-content: flex-end; }
  .member-rating-page .portal-header,.teacher-member-rating-page .portal-header { flex-wrap: wrap; }
  .member-rating-page .account-area,.teacher-member-rating-page .account-area { width: 100%; justify-content: flex-end; }
  .workspace-card { min-height: 180px; padding: 24px; }
  .enrollment-status { align-items: flex-start; flex-direction: column; gap: 6px; }
  .enrollment-form fieldset { padding: 20px 16px; }
  .enrollment-submit { width: 100%; }
  .task-heading { align-items: stretch; flex-direction: column; }
  .task-heading .primary-action { width: 100%; }
  .task-card { grid-template-columns: 1fr; }
  .task-badge { justify-self: start; }
  .task-form-grid { grid-template-columns: 1fr; }
  .task-dialog footer { flex-wrap: wrap; }
  .task-dialog footer span { display: none; }
  .task-dialog footer button { flex: 1 1 120px; }
  .vote-scope-note { grid-template-columns: 1fr; gap: 6px; }
  .vote-round-header { flex-direction: column; }
  .vote-targets[data-count] { --target-count: 1; max-width: none; }
  .vote-target { min-height: 106px; }
  .vote-actions { flex-direction: column-reverse; }
  .vote-actions button { width: 100%; }
  .comment-workspace { grid-template-columns: 1fr; }
  .comment-projects { position: static; }
  #commentGroupList { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .reply-form { grid-template-columns: 1fr; }
  .comment-form button,.reply-form button { width: 100%; }
  .comment-card-header,.comment-reply header { flex-direction: column; gap: 7px; }
  .speech-rule { grid-template-columns: 1fr; gap: 6px; }
  .speech-round-header { flex-direction: column; }
  .speech-nomination { grid-template-columns: 1fr; }
  .speech-nomination h3,.speech-nomination .speech-selection,.speech-nomination .speech-notice,.speech-nomination .speech-message,.speech-nomination button { grid-column: 1; grid-row: auto; }
  .speech-nomination button,.speech-summary-form > button { width: 100%; }
  .speech-summaries > header,.speech-record header { align-items: flex-start; flex-direction: column; }
  .class-create-form { grid-template-columns: 1fr; }
  .class-create-form button { grid-column: 1; width: 100%; }
  .current-class-card,.roster-import-card > header,.roster-preview > header,.credential-delivery > header,.current-roster > header { align-items: flex-start; flex-direction: column; }
  .roster-import-card > header .secondary-action,.credential-delivery > header .secondary-action,.roster-upload-form button,.roster-preview > button { width: 100%; }
  .roster-row { align-items: flex-start; flex-direction: column; }
  .roster-labels { justify-content: flex-start; }
  .enrollment-control-card > header,.preference-card > header { align-items: flex-start; flex-direction: column; }
  .enrollment-control-form { grid-template-columns: 1fr; }
  .enrollment-control-form button { grid-column: 1; width: 100%; }
  .course-schedule-form { grid-template-columns: 1fr; }
  .course-schedule-form button { grid-column: 1; width: 100%; }
  .grouping-rule { grid-template-columns: 1fr; gap: 6px; }
  .grouping-editor-card > header { align-items: flex-start; flex-direction: column; }
  .grouping-fields,.cooperative-fields { grid-template-columns: 1fr; }
  .grouping-role-fields { align-items: stretch; flex-direction: column; }
  .role-choice { min-height: 46px; }
  .grouping-revision-panel { grid-template-columns: 1fr; }
  .grouping-actions { flex-direction: column-reverse; }
  .grouping-actions button { width: 100%; }
  .grouping-result { justify-items: start; }
  .roadshow-window-card > header,.roadshow-review-card > header,.roadshow-group-card > header,.roadshow-submission-heading { align-items: flex-start; flex-direction: column; }
  .teacher-roadshow-workspace { width: 100%; }
  .teacher-roadshow-workspace .current-class-card h2 { overflow-wrap: anywhere; }
  .roadshow-group-list,.roadshow-time-grid { grid-template-columns: 1fr; }
  .roadshow-window-form > button { width: 100%; }
  .roadshow-review-actions { flex-direction: column-reverse; }
  .roadshow-review-actions button { width: 100%; }
  .presentation-round-link { min-height: 70px; padding: 11px 10px 13px; }
  .presentation-round-link small { font-size: 10px; }
  .task-type-card > header,.task-review-card > header,.task-review-dialog-shell > header { align-items: flex-start; flex-direction: column; }
  .outcome-review-card > header,.outcome-review-item-heading,.outcome-review-content-heading { align-items: flex-start; flex-direction: column; }
  .outcome-review-card > header > span { white-space: normal; }
  .outcome-review-content .secondary-action { width: 100%; }
  .outcome-review-actions { flex-direction: column; }
  .outcome-review-actions .primary-action,.outcome-review-actions .secondary-action { width: 100%; }
  .task-type-card form > button { width: 100%; }
  .task-review-filter { width: 100%; grid-template-columns: auto minmax(0,1fr); }
  .task-review-row { grid-template-columns: 1fr; }
  .task-review-row > button { width: 100%; }
  .task-review-form { grid-template-columns: 1fr; }
  .task-review-form > button { grid-column: 1; width: 100%; }
  .comment-settings-card > header,.comment-admin-card > header,.comment-admin-row > header { align-items: flex-start; flex-direction: column; }
  .comment-settings-card form { grid-template-columns: 1fr; }
  .comment-settings-card .form-message,.comment-settings-card form > button { grid-column: 1; }
  .comment-settings-card form > button,.comment-moderation-form > button { width: 100%; }
  .comment-admin-filter { width: 100%; grid-template-columns: auto minmax(0,1fr); }
  .comment-moderation-controls { grid-template-columns: 1fr; }
  .speech-management-overview,.speech-round-fields,.speech-group-picker { grid-template-columns: 1fr; }
  .speech-round-editor > header,.speech-round-admin > header,.speech-review-admin > header,.speech-admin-round > header,.speech-review-copy header { align-items: flex-start; flex-direction: column; }
  .speech-admin-group-action { grid-template-columns: 1fr; }
  .speech-admin-group-action button { width: 100%; }
  .teacher-vote-overview,.vote-round-fields,.vote-group-picker,.teacher-vote-round-metrics,.vote-public-totals { grid-template-columns: 1fr; }
  .vote-round-editor > header,.teacher-vote-rounds > header,.teacher-vote-review > header,.teacher-vote-round > header,.teacher-vote-copy header { align-items: flex-start; flex-direction: column; }
  .teacher-vote-round-actions,.teacher-vote-round-actions button,.teacher-vote-review-form button { width: 100%; }
  .vote-privacy-note { grid-template-columns: 1fr; gap: 6px; }
  .member-rating-privacy,.member-rating-fields,.member-rating-overview,.teacher-member-rating-form { grid-template-columns: 1fr; }
  .member-rating-panel > header { align-items: flex-start; flex-direction: column; }
  .teacher-member-rating-form .form-message { grid-column: 1; }
  .teacher-member-rating-form > button,#leadRatingForm > button { width: 100%; }
  .member-rating-record-detail { grid-template-columns: 1fr; }
  .member-rating-record-detail p { grid-column: 1; }
  .grade-panel > header { align-items: stretch; flex-direction: column; }
  .grade-filter { width: 100%; }
  .score-entry-columns > section { padding: 16px; }
  .score-row-form { grid-template-columns: 1fr; }
  .score-row-form > * { grid-column: 1; }
  .teacher-grade-page .account-area,.teacher-grade-finalization-page .account-area { display: flex; flex-wrap: wrap; }
  #gradeWeightGroups { grid-template-columns: 1fr; }
  .freeze-checks { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .freeze-checks article:nth-child(2) { border-right: 0; }
  .freeze-checks article:nth-child(-n+2) { border-bottom: 1px solid var(--portal-line); }
  .rule-field-grid { grid-template-columns: 1fr; }
  .report-record-row { grid-template-columns: 1fr; gap: 4px; }
  .grade-tools-nav { display: grid; grid-template-columns: 1fr 1fr; }
  .grade-export-actions { grid-template-columns: 1fr; }
  .grade-export-actions article + article { border-top: 1px solid var(--portal-line); border-left: 0; }
  #independentGradeUploadForm { grid-template-columns: 1fr; }
  #independentGradeUploadForm .form-message { grid-column: 1; }
  .excel-panel > header { flex-direction: column; }
  .excel-panel > header .secondary-action { width: 100%; }
  .teacher-grade-excel-page .account-area { display: flex; flex-wrap: wrap; }
  .teacher-grade-page .account-actions,.teacher-grade-finalization-page .account-actions,.teacher-grade-excel-page .account-actions { margin-left: auto; }
}

/* Showcase workflow */
.showcase-portal-main { width: min(1080px,calc(100% - 40px)); }
.showcase-workspace { display: grid; gap: 24px; }
.showcase-panel { border: 1px solid var(--portal-line); background: rgba(255,254,249,.82); }
.showcase-panel > header { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 24px; border-bottom: 1px solid var(--portal-line); }
.showcase-panel > header h2,.showcase-panel h3,.showcase-panel h4 { margin: 0; }
.showcase-panel > header p,.showcase-help { margin: 7px 0 0; color: var(--portal-muted); font-size: 13px; line-height: 1.7; }
#showcaseForm,#correctionForm,.showcase-admin-form { display: grid; gap: 18px; padding: 24px; }
.showcase-panel .form-field input,.showcase-panel .form-field textarea,.showcase-panel .form-field select,.showcase-author-row input,.showcase-author-row select { width: 100%; padding: 11px 12px; border: 1px solid var(--portal-line); border-radius: 8px; background: white; color: var(--portal-ink); font: inherit; }
.showcase-panel textarea { resize: vertical; }
.showcase-author-row { display: grid; grid-template-columns: auto minmax(110px,.7fr) minmax(130px,1fr) minmax(170px,1.3fr) auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--portal-line); }
.showcase-author-editor .showcase-author-row { grid-template-columns: repeat(4,minmax(120px,1fr)) auto; }
.showcase-author-editor { padding: 0 24px 20px; }
.showcase-author-editor > .secondary-action { margin-top: 14px; }
.showcase-order-buttons,.showcase-status-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.showcase-order-buttons .secondary-action { min-height: 38px; padding: 0 10px; }
.showcase-status-actions { padding: 0 24px 24px; }
.showcase-status-actions .primary-action,.showcase-status-actions .secondary-action,.showcase-status-actions .danger-action,.showcase-admin-item > .secondary-action { min-height: 44px; padding: 0 14px; border-radius: 8px; font: inherit; font-weight: 800; cursor: pointer; }
.danger-action { color: white; }
#existingShowcase,#studentRequestList,#teacherRequestList,#teacherShowcaseList { padding: 24px; }
#existingShowcase h3 { font-size: 25px; }
#existingShowcase > p { color: var(--portal-muted); line-height: 1.75; }
#existingShowcase a { color: var(--portal-jade); font-weight: 800; }
.showcase-request-row,.showcase-request-card { display: grid; gap: 8px; padding: 18px 0; border-bottom: 1px solid var(--portal-line); }
.showcase-request-row span,.showcase-request-card p { color: var(--portal-muted); line-height: 1.7; }
.showcase-request-row small,.showcase-request-card small { color: var(--portal-muted); }
.showcase-request-card .form-field { margin-top: 8px; }
.showcase-request-card .showcase-author-editor { padding: 0; }
.showcase-request-card .showcase-status-actions { padding: 8px 0 0; }
.showcase-admin-item { border-bottom: 1px solid var(--portal-line); }
.showcase-admin-item > summary { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0; cursor: pointer; }
.showcase-admin-item > summary span { color: var(--portal-muted); font-size: 13px; }
.showcase-admin-item > h3,.showcase-admin-item > .form-field,.showcase-admin-item > .secondary-action { margin: 0 24px 16px; }
.showcase-filter { min-width: 180px; }

/* Private website suggestions */
.teacher-suggestion-page [hidden] { display: none !important; }
.teacher-suggestion-main { width: min(980px,calc(100% - 40px)); }
.suggestion-admin-panel { border: 1px solid var(--portal-line); background: rgba(255,254,249,.82); }
.suggestion-admin-panel > header { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 24px; border-bottom: 1px solid var(--portal-line); }
.suggestion-admin-panel > header h2 { margin: 0; }
.suggestion-admin-panel > header p { margin: 7px 0 0; color: var(--portal-muted); font-size: 13px; line-height: 1.7; }
.suggestion-admin-filter { display: grid; gap: 7px; min-width: 180px; color: var(--portal-muted); font-size: 12px; font-weight: 800; }
.suggestion-admin-filter select,.suggestion-review-form select,.suggestion-review-form textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--portal-line); border-radius: 8px; background: white; color: var(--portal-ink); font: inherit; }
.suggestion-admin-row { padding: 24px; border-bottom: 1px solid var(--portal-line); }
.suggestion-admin-row > header { display: flex; justify-content: space-between; gap: 18px; }
.suggestion-admin-row > header div { display: grid; gap: 5px; }
.suggestion-admin-row small,.suggestion-handler { color: var(--portal-muted); font-size: 12px; }
.suggestion-admin-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }
.suggestion-status { height: fit-content; padding: 7px 10px; border-radius: 999px; background: var(--portal-mist); color: var(--portal-deep); font-size: 12px; font-weight: 800; white-space: nowrap; }
.suggestion-status.is-resolved { background: #e0eee5; }
.suggestion-status.is-dismissed { color: var(--portal-muted); }
.suggestion-review-form { display: grid; grid-template-columns: 150px minmax(0,1fr) auto; gap: 10px; align-items: start; margin-top: 18px; }
.suggestion-review-form textarea { resize: vertical; }
.suggestion-review-form .secondary-action { min-height: 46px; }
.suggestion-review-form .form-message { grid-column: 1 / -1; }
.suggestion-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 20px 24px; }
.suggestion-pagination span { color: var(--portal-muted); font-size: 13px; }

/* Class lifecycle */
.teacher-lifecycle-page [hidden] { display: none !important; }
.teacher-lifecycle-main { width: min(980px,calc(100% - 40px)); }
.lifecycle-warning { margin-bottom: 24px; padding: 18px 20px; border-left: 4px solid #a24634; background: #f7e9e2; color: var(--portal-deep); }
.lifecycle-warning p { margin: 7px 0 0; color: var(--portal-muted); line-height: 1.7; }
.lifecycle-workspace,#lifecycleClassList { display: grid; gap: 24px; }
.lifecycle-class-card { padding: 24px; border: 1px solid var(--portal-line); background: rgba(255,254,249,.82); }
.lifecycle-class-card > header { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.lifecycle-class-card > header h2 { margin: 4px 0; }
.lifecycle-class-card > header p { margin: 0; color: var(--portal-muted); }
.class-status,.lifecycle-request-status { height: fit-content; padding: 7px 10px; border-radius: 999px; background: var(--portal-mist); color: var(--portal-deep); font-size: 12px; font-weight: 800; white-space: nowrap; }
.class-status.is-archived,.lifecycle-request-status.is-cancelled { color: var(--portal-muted); }
.class-status.is-pending_deletion,.lifecycle-request-status.is-pending { background: #f7e9e2; color: #8b392b; }
.lifecycle-action-form { display: grid; gap: 14px; margin-top: 20px; padding: 20px; border: 1px solid var(--portal-line); background: rgba(246,243,234,.58); }
.lifecycle-action-form h3,.lifecycle-action-form h4 { margin: 0; }
.lifecycle-help,.lifecycle-empty { margin: 0; color: var(--portal-muted); font-size: 13px; line-height: 1.7; }
.lifecycle-action-form .form-field input,.lifecycle-action-form .form-field textarea,.lifecycle-cancel-form .form-field input,.lifecycle-cancel-form .form-field textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--portal-line); border-radius: 8px; background: white; color: var(--portal-ink); font: inherit; }
.lifecycle-action-form textarea,.lifecycle-cancel-form textarea { resize: vertical; }
.lifecycle-check { display: flex; align-items: start; gap: 9px; color: var(--portal-muted); font-size: 13px; line-height: 1.6; }
.lifecycle-check input { margin-top: 4px; }
.lifecycle-action-form .danger-action { width: fit-content; min-height: 44px; padding: 0 16px; border-radius: 8px; font: inherit; font-weight: 800; cursor: pointer; }
.lifecycle-students { margin-top: 20px; border-top: 1px solid var(--portal-line); }
.lifecycle-students > summary,.lifecycle-student-row > summary { padding: 16px 0; cursor: pointer; font-weight: 800; }
.lifecycle-student-row { padding-left: 18px; border-top: 1px solid var(--portal-line); }
.lifecycle-requests { margin-top: 24px; border-top: 1px solid var(--portal-line); }
.lifecycle-requests > h3 { margin: 22px 0 8px; }
.lifecycle-request-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 16px; padding: 16px 0; border-bottom: 1px solid var(--portal-line); }
.lifecycle-request-row p,.lifecycle-request-row small { grid-column: 1 / -1; margin: 0; color: var(--portal-muted); line-height: 1.7; }
.lifecycle-cancel-form { grid-column: 1 / -1; display: grid; gap: 12px; margin-top: 8px; padding: 16px; border: 1px solid var(--portal-line); }
.lifecycle-cancel-form > .secondary-action { width: fit-content; min-height: 42px; }

/* Stage submissions */
.roadshow-one-page [hidden] { display: none !important; }
.independent-status-page [hidden],.teacher-independent-status-page [hidden] { display: none !important; }
.independent-status-main { width: min(960px,calc(100% - 40px)); }
.independent-status-form { display: grid; gap: 16px; padding: clamp(22px,4vw,36px); border: 1px solid var(--portal-line); background: rgba(255,254,249,.82); }
.independent-status-choice { display: flex; align-items: flex-start; gap: 14px; padding: 18px; border: 1px solid var(--portal-line); background: white; cursor: pointer; }
.independent-status-choice input { width: 19px; height: 19px; margin-top: 2px; accent-color: var(--portal-jade); }
.independent-status-choice span { display: grid; gap: 7px; }
.independent-status-choice small,.independent-status-table small { display: block; color: var(--portal-muted); }
.independent-status-form > button { justify-self: end; min-width: 180px; }
.teacher-independent-workspace { display: grid; gap: 20px; }
.independent-class-select { max-width: 420px; }
.independent-status-table-wrap { overflow-x: auto; border: 1px solid var(--portal-line); background: rgba(255,254,249,.82); }
.independent-status-table { width: 100%; border-collapse: collapse; }
.independent-status-table th,.independent-status-table td { padding: 16px 18px; border-bottom: 1px solid var(--portal-line); text-align: left; vertical-align: top; }
.independent-status-table th { color: var(--portal-muted); font-size: 12px; }
.independent-submitted { color: var(--portal-jade); }.independent-missing { color: var(--portal-muted); }
.retired-admin-main,.poster-prototype-main { width: min(980px,calc(100% - 40px)); }
.retired-admin-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.retired-admin-note { color: var(--portal-muted); line-height: 1.8; }
.poster-prototype-page [hidden] { display: none !important; }
.poster-prototype-panel { display: grid; gap: 18px; padding: clamp(22px,4vw,34px); border: 1px solid var(--portal-line); background: rgba(255,254,249,.82); }
.poster-prototype-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.poster-prototype-grid figure { display: grid; gap: 10px; margin: 0; }
.poster-prototype-grid canvas { width: 100%; height: auto; border: 1px solid var(--portal-line); background: var(--portal-mist); }
.poster-prototype-grid figcaption { display: grid; gap: 6px; align-items: start; }
.poster-prototype-grid figcaption span { color: var(--portal-muted); font-size: 12px; }
.poster-prototype-grid button { justify-self: start; }
.stage-page [hidden],.teacher-stage-page [hidden] { display: none !important; }
.stage-main { width: min(1020px,calc(100% - 40px)); }
.stage-rule { display: grid; gap: 6px; margin-bottom: 24px; padding: 18px 20px; border-left: 4px solid var(--portal-jade); background: var(--portal-mist); }
.stage-rule span,.stage-help { color: var(--portal-muted); font-size: 13px; line-height: 1.7; }
.stage-round-list,.stage-admin-workspace,#stageAdminRoundList { display: grid; gap: 24px; }
.stage-round-card,.stage-round-editor,.stage-admin-rounds,.stage-admin-round { border: 1px solid var(--portal-line); background: rgba(255,254,249,.82); }
.stage-round-card,.stage-admin-round { padding: 24px; }
.stage-round-card > header,.stage-round-editor > header,.stage-admin-rounds > header,.stage-admin-round > header,.stage-deliverable > header,.stage-admin-submission > header { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.stage-round-card > header h2,.stage-round-editor h2,.stage-admin-rounds h2,.stage-admin-round h3,.stage-deliverable h3,.stage-admin-submission h4 { margin: 4px 0; }
.stage-round-card > header p,.stage-admin-round > header p { margin: 0; color: var(--portal-muted); }
.stage-deliverable,.stage-admin-submission { display: grid; gap: 10px; margin-top: 18px; padding: 18px; border: 1px solid var(--portal-line); background: rgba(246,243,234,.55); }
.stage-deliverable > p,.stage-admin-submission > p,.stage-admin-submission > small { margin: 0; color: var(--portal-muted); line-height: 1.7; }
.stage-review { height: fit-content; padding: 6px 9px; border-radius: 999px; background: var(--portal-mist); color: var(--portal-deep); font-size: 12px; font-weight: 800; white-space: nowrap; }
.stage-review.is-returned { background: #f7e9e2; color: #8b392b; }
.stage-review.is-approved { background: #e0eee5; }
.stage-review.is-missing { color: var(--portal-muted); }
.stage-review-note { color: #8b392b !important; }
.stage-submission-form,.stage-review-form,#stageRoundForm { display: grid; gap: 14px; }
.stage-submission-form { margin-top: 8px; }
.stage-submission-form input,.stage-submission-form textarea,.stage-review-form select,.stage-review-form textarea,.stage-fields input,.stage-fields select,#stageRoundReason { width: 100%; padding: 11px 12px; border: 1px solid var(--portal-line); border-radius: 8px; background: white; color: var(--portal-ink); font: inherit; }
.stage-submission-form textarea,.stage-review-form textarea,#stageRoundReason { resize: vertical; }
.stage-round-editor > header,.stage-admin-rounds > header { padding: 24px; border-bottom: 1px solid var(--portal-line); }
#stageRoundForm { padding: 24px; }
.stage-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.stage-group-picker { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding: 16px; border: 1px solid var(--portal-line); }
.stage-group-picker legend { padding: 0 6px; font-weight: 800; }
.stage-group-picker label { display: flex; align-items: center; gap: 8px; }
#stageAdminRoundList { padding: 24px; }
#stageAdminRoundList:empty { display: none; }
.stage-admin-round + .stage-admin-round { margin-top: 20px; }
.stage-review-form { grid-template-columns: 150px minmax(0,1fr) auto; align-items: start; }
.stage-review-form .form-message { grid-column: 1 / -1; }

@media (max-width: 760px) {
  .showcase-panel > header,.showcase-admin-item > summary { align-items: stretch; flex-direction: column; }
  .showcase-author-row { grid-template-columns: auto minmax(0,1fr); }
  .showcase-author-row > input,.showcase-author-row > select,.showcase-author-row > .showcase-order-buttons { grid-column: 2; }
  .showcase-filter { min-width: 0; }
  .suggestion-admin-panel > header,.suggestion-admin-row > header { align-items: stretch; flex-direction: column; }
  .suggestion-admin-filter { min-width: 0; }
  .suggestion-review-form { grid-template-columns: 1fr; }
  .suggestion-review-form .form-message { grid-column: 1; }
  .suggestion-review-form .secondary-action { width: 100%; }
  .lifecycle-class-card > header { flex-direction: column; }
  .lifecycle-action-form .danger-action,.lifecycle-cancel-form > .secondary-action { width: 100%; }
  .lifecycle-student-row { padding-left: 10px; }
  .stage-round-card > header,.stage-round-editor > header,.stage-admin-rounds > header,.stage-admin-round > header,.stage-deliverable > header,.stage-admin-submission > header { flex-direction: column; }
  .stage-fields,.stage-group-picker,.stage-review-form { grid-template-columns: 1fr; }
  .stage-review-form .form-message { grid-column: 1; }
  .stage-submission-form .primary-action,.stage-review-form .primary-action,#stageRoundForm > .primary-action { width: 100%; }
}

/* Formal teacher pages share one horizontal content grid. */
body[data-required-role="admin"] .portal-main,
body[data-required-role="student"] .portal-main {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.teacher-enrollment-workspace > *,.teacher-grade-workspace > *,.teacher-course-schedule-workspace > * { min-width: 0; }
.current-class-card h2,.current-class-card p { overflow-wrap: anywhere; }

@media (max-width: 480px) {
  body[data-required-role="admin"] .portal-main,
  body[data-required-role="student"] .portal-main { width: calc(100% - 32px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
