:root {
  --bg: #f4dc72;
  --bg-soft: #f8eeb5;
  --ink: #2c3e50;
  --muted: #34495e;
  --panel: #fffdf5;
  --line: #d8c878;
  --primary: #111111;
  --secondary: #d7d9df;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body, html { min-height: 100%; }
body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, var(--bg-soft), var(--bg));
}
a { color: inherit; text-decoration: none; }
.site-header {
  top: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  width: 100%;
}
.brand { font-size: 1.5rem; font-weight: 700; color: #000; letter-spacing: 1px; }
nav { display: flex; gap: 0.75rem; align-items: center; }
main { width: min(1280px, 95vw); margin: 0 auto; padding: 0; }
.app-container {
  width: 100%;
  max-width: 960px;
  margin: 30px auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.08);
  box-sizing: border-box;
  overflow: visible;
  max-height: none;
}
.landing-main {
  max-width: 1280px;
  background: transparent;
  border: 0;
  box-shadow: none;
  margin: 0 auto;
  padding: 0;
}
.dashboard-main {
  width: min(1280px, 96vw);
  max-width: 1280px;
  margin: 0 auto;
  min-height: calc(100vh - 130px);
  display: flex;
  align-items: center;
  padding: 0;
}
.mode-main {
  width: min(1280px, 96vw);
  margin: 0 auto;
  min-height: calc(100vh - 130px);
  padding: 0;
  display: grid;
  place-items: center;
}
.dashboard-shell {
  width: 100%;
  padding: 24px 28px 32px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.08);
}
.task-main {
  width: min(1380px, 96vw);
  margin: 0 auto;
  padding: 0;
}
button { font: inherit; }
.primary, .secondary, .danger, .google-sheets-button, .google-docs-button { border: 0; border-radius: 0.8rem; padding: 0.75rem 1.3rem; font-weight: 700; cursor: pointer; }
.primary { background: var(--primary); color: #fff; }
.secondary { background: var(--secondary); color: #1a1a1a; }
.danger { background: #b42318; color: #fff; }
.google-sheets-button { background: #188038; color: #fff; }
.google-docs-button { background: #1a73e8; color: #fff; }
.hidden { display: none !important; }

.landing-content {
  display: flex;
  flex-direction: row;
  gap: 72px;
  align-items: center;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  min-height: calc(100vh - 104px);
  padding: 8px 28px 28px;
}

.landing-left, .landing-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.landing-left {
  align-items: center;
  padding-right: 24px;
  text-align: center;
  max-width: 560px;
}
.landing-right {
  align-items: center;
  padding-left: 24px;
  max-width: 650px;
}

h1 { font-size: 2.5rem; margin-bottom: 20px; font-weight: 700; color: #1a1a1a; }
h2.features-header {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: #1a1a1a;
  align-self: center;
  text-align: center;
  padding: 8px 18px;
}
p { font-size: 1rem; line-height: 1.45; margin-bottom: 12px; color: var(--muted); }

.hero-logo { width: min(340px, 78%); border-radius: 8px; box-shadow: 0 10px 28px rgba(0,0,0,0.17); }
.hero-copy {
  max-width: 620px;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.65;
  margin-bottom: 24px;
  padding: 8px 18px;
}

.primary-cta {
  background: #111;
  color: #fff;
  font-size: 1.25rem;
  font-weight: bold;
  padding: 18px 44px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.primary-cta:hover { background: #000; }

.feature-box {
  background: #fff;
  border-radius: 8px;
  padding: 18px 22px;
  margin-bottom: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  width: 100%;
  font-size: 0.95rem;
  line-height: 1.4;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-box strong { display: block; margin-bottom: 4px; font-size: 1rem; font-weight: 600; color: #2c3e50; }
.feature-box span { display: block; font-size: 0.95rem; color: #34495e; line-height: 1.4; }
.feature-box:hover { transform: translateY(-3px); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08); }

.mode-shell { width: min(980px, 100%); margin: 0 auto; padding: 12px 12px; text-align: center; }
.panel {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
  padding: 28px 32px 30px;
}
.badge { display: inline-block; padding: 0.45rem 1rem; background: #dde1ea; border-radius: 999px; font-weight: 700; margin-bottom: 0.8rem; }
.mode-shell h1 { font-size: 2.2rem; margin: 0 0 30px; text-align: center; }
.muted { color: var(--muted); font-size: 1rem; line-height: 1.6; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.2rem; }
.mode-card { text-align: center; background: #e6e7ec; border: 2px solid transparent; border-radius: 1rem; padding: 1.2rem; cursor: pointer; }
.mode-card.selected { border-color: #222; background: #f0f1f5; }
.mode-card h3 { margin: 0 0 0.5rem; font-size: 1.2rem; }
.mode-card p { margin: 0; font-size: 1rem; color: #3e3e3e; line-height: 1.6; }
.step-actions { display: flex; justify-content: center; gap: 0.8rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(0,0,0,0.09); }

.card-form { display: grid; gap: 0.75rem; }
label { display: grid; gap: 0.35rem; width: 100%; font-weight: 700; font-size: 1.1em; text-align: left; color: var(--muted); }
input, textarea, select { width: 100%; border: 1px solid #ccc; border-radius: 6px; padding: 15px; font-size: 1.1em; box-sizing: border-box; background: #ecf0f1; font-family: 'Roboto', sans-serif; }
.check { display: flex; align-items: center; gap: 0.5rem; }
.check input { width: auto; }
.result { font-size: 1rem; color: #23314f; text-align: left; }
.toast { position: fixed; right: 1rem; bottom: 1rem; background: #171717; color: white; padding: 0.75rem 1rem; border-radius: 0.6rem; max-width: 360px; }

.dashboard-step {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0;
}

.dashboard-step .card-form,
#task-form {
  display: block;
  width: 100%;
  max-width: none;
}

.modal-form {
  gap: 0.9rem;
}

.dashboard-step h1 {
  font-size: 1.95rem;
  margin-bottom: 14px;
  text-align: center;
}

.dashboard-step .muted {
  font-size: 0.98rem;
  line-height: 1.5;
  margin-bottom: 12px;
  text-align: center;
}

.dashboard-step label {
  font-size: 0.98rem;
  margin-bottom: 4px;
}

.dashboard-step input,
.dashboard-step textarea,
.dashboard-step select {
  padding: 12px 14px;
  font-size: 1rem;
}

.dashboard-step .check {
  font-size: 0.98rem;
}

.question-prompt-input {
  display: block;
  width: 100%;
  max-width: 760px;
  min-height: 120px;
  margin: 0 auto;
  resize: vertical;
}

.class-name-label {
  width: min(420px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.marks-control-wrap {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
}

.marks-control-label {
  text-align: center;
  margin-bottom: 0;
}

.question-mark-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.question-mark-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 220px;
  padding: 12px 18px;
  border: 2px solid #bdc3c7;
  border-radius: 10px;
  background: #ecf0f1;
  color: #34495e;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.question-mark-button:hover {
  border-color: #111;
  background: #e3e7ea;
}

.question-mark-count {
  font-size: 1.1rem;
  color: #111;
}

.question-mark-reset {
  position: absolute;
  top: -8px;
  right: -10px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 999px;
  background: #e74c3c;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pill-counter {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.pill-button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.pill-button:hover {
  background: #000;
}

.pill-value {
  min-width: 2ch;
  text-align: center;
  font-weight: 700;
  color: #111;
}

.dashboard-block {
  display: block;
  gap: 0.9rem;
  width: 100%;
  max-width: none;
  padding: 1rem;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 1rem;
  justify-self: stretch;
  margin: 0 0 1rem;
}

.dashboard-step > .card-form,
.dashboard-step > .card-form > .dashboard-block {
  width: 100%;
  max-width: none;
}

.dashboard-block > * + * {
  margin-top: 0.9rem;
}

.dashboard-block h2 {
  text-align: center;
}

.session-actions {
  display: flex;
  justify-content: center;
}

.session-list {
  display: grid;
  gap: 0.8rem;
}

.session-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.session-card h3 {
  margin: 0 0 0.35rem;
  color: #1a1a1a;
}

.session-card p {
  margin: 0;
}

.session-link {
  overflow-wrap: anywhere;
  font-size: 0.92rem;
}

.session-card-actions,
.publish-choice-grid {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.publish-choice-grid {
  margin-top: 1rem;
}

#focus-step {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.block-copy {
  margin-bottom: 0;
}

.question-list {
  display: grid;
  gap: 0.9rem;
}

.question-card {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.9rem;
}

.question-card-header,
.question-settings,
.date-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.question-card-header h3 {
  text-align: left;
}

.datetime-group {
  display: grid;
  grid-template-columns: 54px auto 54px auto 78px 54px auto 54px;
  gap: 0.35rem;
  align-items: center;
  margin: 0;
  padding: 0;
  border: 0;
}

.datetime-group legend {
  grid-column: 1 / -1;
  margin-bottom: 0.35rem;
  font-weight: 700;
  color: var(--muted);
}

.datetime-group input {
  padding: 12px 8px;
  text-align: center;
}

.datetime-group span {
  font-weight: 700;
  text-align: center;
}

.confirmation-shell h2 {
  margin-bottom: 0.9rem;
  text-align: center;
}

.confirmation-card {
  display: grid;
  gap: 0.9rem;
  max-width: 640px;
  margin: 1.4rem auto 0;
  padding: 1.25rem;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 1rem;
  text-align: center;
}

.confirmation-line {
  margin: 0;
  color: #000;
}

.confirmation-link-block {
  display: grid;
  gap: 0.45rem;
  text-align: left;
}

.confirmation-link-block label {
  color: #000;
}

.task-shell { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2rem; align-items: stretch; max-width: 1080px; margin: 0 auto; }
.task-shell-hidden { visibility: hidden; }
.task-sidebar, .workspace, .review-card { background: #fffdf8; border: 1px solid var(--line); border-radius: 1rem; padding: 1.2rem; }
.task-sidebar button + button {
  margin-top: 0.75rem;
}
.task-sidebar-top,
.workspace-topbar,
.workspace-actions,
.question-nav,
.attempt-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.task-question-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}
.question-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  background: #fff;
  cursor: pointer;
}
.question-chip.selected {
  background: #111;
  color: #fff;
}
.workspace-kicker {
  margin-bottom: 0.2rem;
  font-weight: 700;
}
#current-question-title {
  max-height: 32vh;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 1.2rem;
  line-height: 1.4;
}
.workspace-marks {
  margin-bottom: 0;
}
.consent-box {
  margin: 1rem 0;
  padding: 1rem;
  background: #fff7d8;
  border: 1px solid #e6bc52;
  border-radius: 0.8rem;
}
.consent-box h2 {
  margin-bottom: 0.65rem;
  font-size: 1.1rem;
}
.consent-box p {
  margin-bottom: 0.75rem;
  line-height: 1.5;
}
.consent-check {
  margin-top: 0.25rem;
}
.primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.google-sheets-button:disabled,
.google-docs-button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.task-shell,
.task-shell p,
.task-shell label,
.task-shell .muted,
.task-shell .instructions,
.task-shell .status-row,
.task-shell .eyebrow,
.task-shell h1,
.task-shell h2 {
  color: #000000;
}
.instructions { white-space: pre-wrap; line-height: 1.5; margin: 1rem 0; }
.warning { background: #fff2cc; border: 1px solid #e6bc52; border-radius: 0.65rem; padding: 0.75rem; margin: 1rem 0; color: #000000; }
.workspace { min-height: 70vh; display: flex; flex-direction: column; gap: 0.7rem; }
#response { flex: 1; min-height: 540px; line-height: 1.5; color: #000000; }
.choice-response {
  display: grid;
  gap: 0.7rem;
  padding: 0.75rem 0;
}
.choice-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #000;
}
.choice-option input {
  width: auto;
  margin-top: 0.2rem;
}
.choice-option span {
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.status-row { display: flex; justify-content: space-between; color: #000000; }

.prestart-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.78);
}

.prestart-modal-card {
  width: min(760px, 100%);
  padding: 32px;
  border-radius: 20px;
  background: #ffffff;
  color: #000000;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  display: grid;
  gap: 0.9rem;
}

.prestart-modal-card h2 {
  text-align: center;
  margin-bottom: 0.25rem;
}

.modal-check {
  justify-content: center;
}

.breach-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(120, 0, 0, 0.9);
}

.breach-modal-card {
  width: min(760px, 100%);
  padding: 36px 32px;
  border: 4px solid #ffffff;
  border-radius: 20px;
  background: linear-gradient(180deg, #8f1111 0%, #5f0909 100%);
  color: #000000;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.breach-kicker {
  margin-bottom: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #000000;
}

.breach-modal-card h2 {
  margin-bottom: 16px;
  font-size: 2.6rem;
  line-height: 1.05;
  color: #000000;
}

.breach-modal-card p {
  margin: 0 auto 22px;
  max-width: 620px;
  font-size: 1.15rem;
  line-height: 1.55;
  color: #000000;
}

.breach-modal-actions {
  display: flex;
  justify-content: center;
}

.breach-modal-actions .primary {
  min-width: 220px;
  background: #ffffff;
  color: #7e0c0c;
}

.submit-confirm-copy {
  text-align: center;
}

.submit-confirm-actions {
  gap: 1rem;
}

.submit-confirm-actions .submit-cancel-button {
  background: #c62828;
  color: #ffffff;
}

.submit-confirm-actions .submit-confirm-button {
  min-width: 220px;
  background: #2e7d32;
  color: #ffffff;
  border: 2px solid #1b5e20;
}

.submitted-modal-card,
.submitted-copy {
  text-align: center;
}

.review-export-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  margin-bottom: 1.75rem;
}
.review-export-actions button {
  min-width: 180px;
  padding: 0.95rem 1.6rem;
}

@media (max-width: 980px) {
  .mode-grid, .task-shell, .question-card-header, .question-settings, .date-grid, .session-card { grid-template-columns: 1fr; }
  .datetime-group { grid-template-columns: 42px auto 42px auto 68px 42px auto 42px; }
  .landing-content { flex-direction: column; align-items: center; min-height: auto; gap: 28px; padding: 16px 20px 24px; }
  .landing-left, .landing-right { padding: 0; max-width: 95%; margin: 0 auto; }
  .landing-right { margin-top: 0; }
  .site-header { padding: 1rem; }
  .app-container { margin: 12px; padding: 20px; max-width: 640px; }
  .brand { font-size: 1.4rem; }
  h2.features-header { font-size: 1.8rem; }
  .feature-box strong { font-size: 1rem; }
  .feature-box span, .muted, .mode-card p, .hero-copy { font-size: 1rem; }
  .mode-shell h1 { font-size: 2.1rem; }
  .workspace-topbar,
  .workspace-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
