.screener-hero {
  margin: 2rem 0;
  padding: 2rem;
  border-radius: 20px;
  border: 1px solid #e6edf5;
  background: linear-gradient(135deg, #f4f7ff 0%, #fff7ee 100%);
  box-shadow: 0 18px 28px rgba(20, 52, 85, 0.08);
}

.screener-hero p {
  color: #2a4d6b;
  max-width: 640px;
}

.screener-lead {
  color: #2a4d6b;
  max-width: 640px;
  margin-bottom: 1rem;
}

.screener-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1rem;
  font-weight: 600;
  color: #1f3656;
}

.screener-panel {
  margin: 2.5rem 0;
}

.screener-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.screener-card {
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 12px 24px rgba(20, 52, 85, 0.08);
}

.screener-card h3 {
  margin-top: 0;
}

.screener-card label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.screener-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.screener-session-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-radius: 18px;
  border: 1px solid #e6edf5;
  background: #fff;
  box-shadow: 0 14px 26px rgba(20, 52, 85, 0.08);
  margin-bottom: 1.5rem;
}

.screener-session-banner h2 {
  margin: 0 0 0.5rem 0;
}

.screener-session-banner p {
  margin: 0;
  color: #2a4d6b;
  max-width: 520px;
}

.screener-key {
  width: 100%;
  min-height: 3.5rem;
  border-radius: 10px;
  border: 1px solid #dfe7f2;
  background: #f7fbff;
  padding: 0.5rem 0.75rem;
  font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
  font-size: 0.85rem;
  color: #1a2f55;
}

#student-link {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #dfe7f2;
  background: #f7fbff;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  color: #1a2f55;
}

#teacher-key-file {
  display: none;
}

.screener-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.2rem;
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  border: 1px solid #dfe7f2;
  background: #f7fbff;
  color: #1a2f55;
  margin-bottom: 0.75rem;
}

.screener-option {
  margin-bottom: 1rem;
}

.screener-option .screener-inline {
  margin-top: 0.6rem;
}

.screener-qr {
  width: 176px;
  height: 176px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dfe7f2;
  border-radius: 10px;
  background: #fff;
  padding: 0.35rem;
}

.screener-qr img,
.screener-qr canvas {
  max-width: 100%;
  max-height: 100%;
}

.screener-qr-note {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: #4b5f77;
  min-height: 1.2rem;
}

.screener-status {
  min-height: 1.4rem;
  margin-top: 0.5rem;
  color: #1a2f55;
}

.screener-status.error {
  color: #b0302f;
}

.screener-question {
  border: 1px solid #e6edf5;
  border-radius: 18px;
  padding: 1.5rem;
  background: #fff;
  box-shadow: 0 16px 28px rgba(20, 52, 85, 0.08);
}

.question-prompt {
  font-weight: 600;
  color: #1f3656;
  margin-bottom: 0.65rem;
}

.fraction-bar {
  border-collapse: collapse;
  margin: 0.75rem 0 0.25rem 0;
}

.fraction-cell {
  width: 32px;
  height: 32px;
  border: 2px solid #1f3656;
  background: #fff;
}

.fraction-cell--filled {
  background: #75cfe7;
}

.numberline {
  margin: 0.75rem 0 0.25rem 0;
}

.numberline-track {
  position: relative;
  height: 28px;
  border-top: 3px solid #1f3656;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.numberline-tick {
  width: 2px;
  height: 12px;
  background: #1f3656;
  border: none;
  padding: 0;
  border-radius: 0;
  appearance: none;
}

.numberline-tick--clickable {
  cursor: pointer;
}

.numberline-tick--selected {
  height: 20px;
  width: 4px;
  background: #db8971;
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(219, 137, 113, 0.25);
}

.numberline-tick--mark {
  height: 18px;
  background: #db8971;
  width: 4px;
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(219, 137, 113, 0.25);
}

.order-list {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 1.2rem;
  font-weight: 600;
  color: #1f3656;
}

.order-item {
  padding: 0.35rem 0.6rem;
  border-radius: 10px;
  background: #f2f6fb;
  border: 1px solid #dfe7f2;
  cursor: grab;
  font-size: 1.2rem;
  font-weight: 600;
  color: #1f3656;
  box-shadow: 0 6px 12px rgba(31, 54, 86, 0.08);
}

.order-item:active {
  cursor: grabbing;
}

.order-item.is-dragging {
  opacity: 0.6;
  box-shadow: none;
}

.screener-audio-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  background: #eef4fb;
  border: 1px solid #dfe7f2;
  border-radius: 999px;
  line-height: 1;
  align-self: flex-start;
}

.screener-audio-toggle[aria-pressed='false'] {
  background: #f9ece7;
  border-color: #f0c6ba;
}

.screener-audio-icon {
  font-size: 1rem;
}

.screener-session-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #eef4fb;
  color: #1f3656;
  font-weight: 600;
  margin: 0.5rem 0 0.75rem 0;
}

.completion-icon {
  display: inline-flex;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #4fbc86;
  margin-left: 0.5rem;
  box-shadow: 0 0 0 4px rgba(79, 188, 134, 0.18);
}

.screener-note {
  color: #4b5f77;
  font-size: 0.92rem;
  margin-top: 0.4rem;
}

.screener-link-button {
  margin-top: 0.75rem;
  width: fit-content;
  min-width: 240px;
  padding: 0.55rem 0.85rem;
  background: #f7fbff;
  border: 1px solid #d7e3f2;
  border-radius: 10px;
  color: #1f3656;
  list-style: none;
  font-weight: 600;
}

.screener-link-button:hover {
  background: #eef5ff;
  border-color: #c7d9ee;
}

.screener-link-button:focus-visible {
  outline: 2px solid #75cfe7;
  outline-offset: 2px;
}

.screener-link-button::-webkit-details-marker {
  display: none;
}

.screener-flow-details {
  margin-top: 0.75rem;
}

.screener-flow-details summary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
}

.screener-flow-details summary::after {
  content: '+';
  font-weight: 700;
  color: #3e5b83;
}

.screener-flow-details[open] summary::after {
  content: '-';
}

.screener-flow {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: #f5f9ff;
  border: 1px solid #dfe7f2;
  color: #1f3656;
}

.screener-flow ul {
  margin: 0.6rem 0 0 1.2rem;
  padding: 0;
}

.screener-flow li {
  margin-bottom: 0.35rem;
}

.place-value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.2rem;
  color: #1f3656;
}

.fraction-answer {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0.75rem;
  gap: 0.35rem;
}

.fraction-answer-bar {
  width: 90px;
  height: 3px;
  background: #1f3656;
  border-radius: 999px;
}

.fraction-input {
  width: 90px;
  text-align: center;
  font-size: 1.2rem;
  padding: 0.35rem 0.4rem;
  border-radius: 10px;
  border: 1px solid #dfe7f2;
  background: #f2f6fb;
  color: #1f3656;
}

.highlight-digit {
  color: #db8971;
  background: #fff1ea;
  border-radius: 8px;
  padding: 0 0.2rem;
}

.screener-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: #2a4d6b;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.screener-progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e7eef7;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.screener-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #75cfe7, #4fbc86);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.screener-timer {
  font-weight: 600;
  color: #1f3656;
  margin-bottom: 0.75rem;
}

.screener-answer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
}

.screener-audio-btn {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  min-width: auto;
}

.screener-answer input {
  min-width: 160px;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid #dfe7f2;
  font-size: 1rem;
}

.screener-input {
  width: 100%;
  max-width: 360px;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #dfe7f2;
  font-size: 1rem;
  background: #fff;
  margin-bottom: 0.75rem;
}

.screener-hidden {
  display: none;
}

body[data-screener-mode="student"] .screener-hero {
  background: linear-gradient(135deg, #e9f7ee 0%, #f7fbff 100%);
}

body[data-screener-mode="student"] .site-header,
body[data-screener-mode="student"] #footer-placeholder,
body[data-screener-mode="student"] .screener-hero,
body[data-screener-mode="student"] #teacher-setup,
body[data-screener-mode="student"] #download {
  display: none;
}

body[data-screener-mode="student"] main.container {
  max-width: 100%;
  padding: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #f7fbff 0%, #ffffff 100%);
}

body[data-screener-mode="student"] #student-start,
body[data-screener-mode="student"] #test-panel,
body[data-screener-mode="student"] #summary-panel {
  width: min(720px, 92vw);
}

.screener-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.screener-summary-card {
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  box-shadow: 0 10px 20px rgba(20, 52, 85, 0.06);
}

.screener-summary-card p {
  margin: 0.35rem 0 0;
  color: #2a4d6b;
}

.screener-divider {
  margin: 1.5rem 0;
  height: 1px;
  background: #e6edf5;
}

@media (max-width: 600px) {
  .screener-hero {
    padding: 1.5rem;
  }

  .screener-question {
    padding: 1.2rem;
  }
}

.screener-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0 0 0.95rem;
  color: #1f3656;
  font-weight: 600;
}

.screener-checkbox input[type='checkbox'] {
  width: 1rem;
  height: 1rem;
  margin-top: 0.15rem;
}

.screener-audio-icon {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03rem;
}
