/* ---- WORKSHEET PAGE ---- */
.worksheet-page {
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 24px 80px;
}

.worksheet-page-wrap {
  width: 100%;
  max-width: 860px;
}

/* Header */
.ws-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.ws-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--fg);
  margin-top: 4px;
  flex-shrink: 0;
}
.ws-title-group { flex: 1; }
.ws-course {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.7;
  display: block;
  margin-bottom: 6px;
}
.ws-page-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 6px;
}
.ws-page-desc {
  font-size: 0.9rem;
  color: var(--fg-muted);
}
.ws-print-btn { flex-shrink: 0; }

/* Scorecard Grid */
.scorecard-grid {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 32px;
}

.sc-row {
  display: grid;
  grid-template-columns: 2fr 100px 1fr;
  border-bottom: 1px solid var(--border);
}
.sc-row:last-child { border-bottom: none; }
.sc-row--header {
  background: var(--bg-elevated);
  border-bottom: 1px solid rgba(200, 162, 255, 0.12);
}
.sc-row--data { background: var(--bg-card); }
.sc-row--data:hover { background: var(--bg-elevated); }
.sc-row--last { border-bottom: none; }

.sc-col {
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-right: 1px solid var(--border);
}
.sc-col:last-child { border-right: none; }
.sc-col--axis {
  flex-direction: column;
  gap: 4px;
}
.sc-col--score {
  align-items: center;
  justify-content: center;
}
.sc-col--evidence { padding: 12px 16px; }

.sc-axis-num {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  opacity: 0.5;
  width: 22px;
  flex-shrink: 0;
  padding-top: 2px;
}
.sc-axis-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg);
}
.sc-axis-desc {
  font-size: 0.75rem;
  color: var(--fg-dim);
  margin-top: 2px;
}
.sc-row--header .sc-col { padding: 14px 18px; font-family: var(--font-display); font-size: 0.78rem; font-weight: 600; color: var(--fg-muted); letter-spacing: 0.04em; text-transform: uppercase; }
.sc-hint { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--fg-dim); font-size: 0.72rem; }

/* Score + evidence inputs */
.sc-score-field {
  width: 60px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 8px;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  outline: none;
  transition: border-color 0.15s;
}
.sc-score-field:focus { border-color: var(--accent); }
.sc-evidence-field {
  width: 100%;
  background: transparent;
  border: none;
  border-left: 1px solid var(--border);
  padding: 0 0 0 16px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.82rem;
  line-height: 1.6;
  resize: none;
  outline: none;
}
.sc-evidence-field:focus { border-left-color: var(--accent); }

/* Baseline summary */
.baseline-summary {
  background: var(--bg-elevated);
  border: 1px solid rgba(200, 162, 255, 0.12);
  border-radius: 14px;
  padding: 24px 28px;
  margin-bottom: 40px;
}
.bs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(200, 162, 255, 0.06);
}
.bs-row:last-child { border-bottom: none; padding-bottom: 0; }
.bs-label {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--fg-muted);
  flex-shrink: 0;
}
.bs-field-group { display: flex; align-items: center; gap: 6px; }
.bs-total-field {
  width: 72px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  outline: none;
}
.bs-total-field:focus { border-color: var(--accent); }
.bs-slash { color: var(--fg-dim); font-size: 0.9rem; }
.bs-text-field {
  flex: 1;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.88rem;
  outline: none;
}
.bs-text-field:focus { border-color: var(--accent); }

/* Reflection prompts */
.ws-prompts { margin-bottom: 40px; }
.ws-prompts-heading {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.ws-prompts-list { display: flex; flex-direction: column; gap: 20px; }
.ws-prompt { display: flex; gap: 16px; }
.ws-prompt-num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.5;
  padding-top: 2px;
  width: 20px;
  flex-shrink: 0;
  text-align: center;
}
.ws-prompt-body { flex: 1; }
.ws-prompt-body p { font-size: 0.88rem; color: var(--fg-muted); line-height: 1.5; margin-bottom: 10px; }
.ws-prompt-answer {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.6;
  resize: none;
  outline: none;
}
.ws-prompt-answer:focus { border-color: var(--accent); }

/* Footer */
.ws-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--fg-dim);
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ---- PRINT STYLES ---- */
@media print {
  .ws-header { flex-direction: row; align-items: flex-start; }
  .ws-print-btn, button { display: none !important; }

  .worksheet-page { background: white; padding: 0; }
  .worksheet-page-wrap { max-width: 100%; }

  .scorecard-grid {
    border: 2px solid #333;
    border-radius: 0;
  }
  .sc-row { grid-template-columns: 1.8fr 80px 1fr; }
  .sc-row--header { background: #f0f0f0 !important; }
  .sc-row--data { background: white !important; }
  .sc-row--data:hover { background: white !important; }

  .sc-score-field {
    background: white;
    border: 1px solid #999;
    color: #000;
    font-size: 14pt;
    font-weight: 700;
    width: 52px;
  }
  .sc-evidence-field {
    border-left: 1px solid #ccc;
    font-size: 9pt;
    color: #333;
    padding-left: 12px;
  }
  .sc-axis-name { font-size: 10pt; color: #000; }
  .sc-axis-desc { font-size: 8pt; color: #666; }

  .baseline-summary {
    border: 1px solid #ccc;
    background: none;
    padding: 16px 20px;
  }
  .bs-total-field { border: 1px solid #999; color: #000; font-size: 12pt; width: 64px; }
  .bs-text-field { border: 1px solid #ccc; color: #000; max-width: none; font-size: 9pt; }
  .bs-label { font-size: 10pt; color: #333; }

  .ws-prompt-answer {
    border: 1px solid #ccc;
    color: #333;
    background: white;
    font-size: 9pt;
    min-height: 54px;
  }
  .ws-prompt-body p { font-size: 10pt; color: #333; }
  .ws-prompts-heading { font-size: 12pt; }

  .ws-footer { font-size: 8pt; color: #999; }
}

/* Responsive */
@media (max-width: 600px) {
  .ws-header { flex-direction: column; }
  .ws-print-btn { width: 100%; text-align: center; }
  .sc-row { grid-template-columns: 1fr 80px; }
  .sc-col--evidence { display: none; }
  .bs-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .bs-text-field { max-width: 100%; width: 100%; }
}