/* ══════════════════════════════════════════════════════
   assignments.css — VFX 350 assignment pages
   Requires nav.css to be loaded first.
   Self-contained design tokens mirror course-template.css
   exactly, supporting both data-theme toggle and
   prefers-color-scheme OS preference.
   ══════════════════════════════════════════════════════ */

/* ── LIGHT TOKENS ── */
:root {
  --bg:            #ffffff;
  --bg-wash:       #f2f0ec;
  --bg-sub:        #eceae5;
  --border:        #d8d5cf;
  --border-mid:    #c4c0b8;
  --text:          #1a1917;
  --text-mid:      #56524d;
  --text-dim:      #96928c;
  --accent:        #1a7a4a;
  --accent-red:    #c03030;
  --accent-yellow: #a08010;
  --accent-blue:   #1a5a8a;
  --yellow-bg:     #fef3c7;
  --yellow-fg:     #92680a;
  --red-bg:        #fde8e8;
  --red-fg:        #991b1b;
  --purple-header: #3d2a52;
  --purple-header-border: rgba(255,255,255,.15);
}

/* ── DARK TOKENS — manual toggle ── */
[data-theme="dark"] {
  --bg:            #111110;
  --bg-wash:       #181714;
  --bg-sub:        #211f1d;
  --border:        #2e2c29;
  --border-mid:    #3d3a36;
  --text:          #edeae4;
  --text-mid:      #9e9a93;
  --text-dim:      #8a8680;
  --accent:        #52b788;
  --accent-red:    #e05252;
  --accent-yellow: #e8c547;
  --accent-blue:   #6ab0e8;
  --yellow-bg:     #3d2f00;
  --yellow-fg:     #fbbf24;
  --red-bg:        #3f1010;
  --red-fg:        #f87171;
  --purple-header: #5a3d7a;
  --purple-header-border: rgba(255,255,255,.25);
}

/* ── DARK TOKENS — OS preference ── */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg:            #111110;
    --bg-wash:       #181714;
    --bg-sub:        #211f1d;
    --border:        #2e2c29;
    --border-mid:    #3d3a36;
    --text:          #edeae4;
    --text-mid:      #9e9a93;
    --text-dim:      #8a8680;
    --accent:        #52b788;
    --accent-red:    #e05252;
    --accent-yellow: #e8c547;
    --accent-blue:   #6ab0e8;
    --yellow-bg:     #3d2f00;
    --yellow-fg:     #fbbf24;
    --red-bg:        #3f1010;
    --red-fg:        #f87171;
    --purple-header: #5a3d7a;
    --purple-header-border: rgba(255,255,255,.25);
  }
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--sans); background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }


/* ── PAGE LAYOUT — centered, no sidebar ── */
.page-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

/* ══════════════════════════════════════════════════════
   HEADER BANNER
   ══════════════════════════════════════════════════════ */
header {
  background: var(--purple-header);
  color: #eeeeee;
  padding: 30px 40px;
  margin-bottom: 40px;
  border-radius: 4px;
}
header p {
  color: rgba(255,255,255,.55);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
  font-size: 0.95rem;
}
header h1 {
  color: #ffffff;
  margin-top: 10px;
  font-size: 1.5rem;
}

/* ══════════════════════════════════════════════════════
   HEADINGS
   ══════════════════════════════════════════════════════ */
h1 { font-family: var(--serif); font-size: 1.6rem; margin: 6px 0 4px; color: var(--text); }
h2 {
  font-size: 1.15rem;
  margin-top: 36px; margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text);
}

/* ══════════════════════════════════════════════════════
   LISTS
   ══════════════════════════════════════════════════════ */
.page-wrap ul { margin: 8px 0 16px 0; padding-left: 24px; }
.page-wrap ul li { margin-bottom: 5px; }
.page-wrap ol { padding-left: 24px; }
.page-wrap ol li { margin-bottom: 5px; }

/* ══════════════════════════════════════════════════════
   CHECKLIST
   ══════════════════════════════════════════════════════ */
.checklist {
  background: var(--bg-sub);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 20px;
  display: inline-block;
  margin-bottom: 8px;
}
.checklist li {
  font-family: var(--mono);
  font-size: 0.95rem;
}

/* ══════════════════════════════════════════════════════
   CALLOUT BOXES
   ══════════════════════════════════════════════════════ */
.note {
  background: var(--yellow-bg);
  border-left: 4px solid var(--accent-yellow);
  color: var(--text-mid);
  padding: 10px 16px;
  margin: 16px 0;
  font-size: 0.95rem;
}
.important {
  background: var(--red-bg);
  border-left: 4px solid var(--accent-red);
  color: var(--text-mid);
  padding: 10px 16px;
  margin: 16px 0;
  font-size: 0.95rem;
}

/* ══════════════════════════════════════════════════════
   CRITICAL RULE
   ══════════════════════════════════════════════════════ */
.critical-rule {
  background-color: var(--red-bg);
  border: 2px dashed var(--accent-red);
  color: var(--text);
  padding: 15px;
  font-weight: bold;
  text-align: center;
  margin: 20px 0;
}

/* ══════════════════════════════════════════════════════
   REFERENCE CALLOUT
   ══════════════════════════════════════════════════════ */
.reference-callout {
  text-align: center;
  font-size: 1.3rem;
  font-weight: bold;
  letter-spacing: 0.08em;
  margin: 32px 0 8px;
  color: var(--text);
}

/* ══════════════════════════════════════════════════════
   CODE
   ══════════════════════════════════════════════════════ */
code {
  background: var(--bg-sub);
  color: var(--text-mid);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.9em;
  font-family: var(--mono);
}

/* ══════════════════════════════════════════════════════
   META TABLE (dates)
   ══════════════════════════════════════════════════════ */
.meta-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 28px;
  font-size: 0.95rem;
}
.meta-table td {
  padding: 6px 12px 6px 0;
  vertical-align: top;
  color: var(--text);
}
.meta-table td:first-child {
  font-weight: bold;
  white-space: nowrap;
  color: var(--text-mid);
  width: 160px;
}

/* ══════════════════════════════════════════════════════
   SUBMISSION FILENAME
   ══════════════════════════════════════════════════════ */
.submission-name {
  font-family: var(--mono);
  background: var(--bg-sub);
  color: var(--text-mid);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
}

/* ══════════════════════════════════════════════════════
   YELLOW HIGHLIGHT
   ══════════════════════════════════════════════════════ */
.hl {
  background: var(--yellow-bg);
  border-radius: 2px;
  padding: 0 2px;
}

/* ══════════════════════════════════════════════════════
   RUBRIC — TOP BOX
   ══════════════════════════════════════════════════════ */
.top-box {
  background: var(--purple-header);
  padding: 24px 30px;
  border-radius: 4px;
  margin-bottom: 32px;
}
.top-box .course-line {
  font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: rgba(255,255,255,.5);
  margin: 0 0 8px;
}
.top-box .top-box-title {
  color: #ffffff;
  border-bottom: 1px solid var(--purple-header-border);
  text-transform: uppercase; letter-spacing: 0.05em;
  font-size: 1.4rem; font-weight: bold;
  padding-bottom: 14px; margin: 0 0 20px;
}

/* ══════════════════════════════════════════════════════
   RUBRIC — NAME / GRADE BAR
   ══════════════════════════════════════════════════════ */
.name-grade-bar { display: flex; gap: 40px; align-items: flex-end; }
.name-grade-bar .field { flex: 1; }
.name-grade-bar .field label {
  display: block; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: rgba(255,255,255,.5); margin-bottom: 6px; font-weight: bold;
}
.name-grade-bar .field .underline {
  border-bottom: 2px solid rgba(255,255,255,.25);
  min-height: 28px; display: block;
}
.name-grade-bar .grade-box { width: 140px; }

/* ══════════════════════════════════════════════════════
   RUBRIC — CRITERIA SECTIONS
   ══════════════════════════════════════════════════════ */
.criteria-section {
  margin-bottom: 28px;
  border: 1px solid var(--border);
  border-radius: 4px; overflow: hidden;
}
.criteria-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 18px; font-weight: bold;
  font-size: 1rem; letter-spacing: 0.03em;
}
.criteria-header .score {
  font-family: var(--mono); font-size: 1rem; font-weight: bold;
  border-bottom: 2px solid rgba(255,255,255,0.4);
  min-width: 60px; text-align: right; padding-bottom: 2px;
}
.technical .criteria-header { background: var(--purple-header); color: #fff; }
.aesthetic .criteria-header { background: #2a4a3e; color: #d4f0e4; }
.proposal  .criteria-header { background: #4a3a1a; color: #f0e4c8; }
.criteria-items { list-style: none; margin: 0; padding: 0; }
.criteria-items li {
  padding: 9px 18px 9px 36px;
  border-bottom: 1px solid var(--border);
  background: var(--bg); color: var(--text);
  position: relative; font-size: 0.95rem; margin: 0;
}
.criteria-items li:last-child { border-bottom: none; }
.criteria-items li::before { content: "–"; position: absolute; left: 18px; color: var(--text-dim); }
.criteria-items li.note {
  background: var(--yellow-bg);
  border-left: 4px solid var(--accent-yellow);
  font-size: 0.88rem; color: var(--text-mid); padding-left: 32px;
}
.criteria-items li.note::before { content: "***"; font-size: 0.7rem; color: var(--accent-yellow); top: 11px; }

/* ══════════════════════════════════════════════════════
   RUBRIC — COMMENTS BOX
   ══════════════════════════════════════════════════════ */
.comments-box {
  border: 1px solid var(--border); border-radius: 4px;
  min-height: 110px; padding: 10px 14px;
  background: var(--bg-sub); font-size: 0.92rem;
  color: var(--text-dim); margin-top: 8px;
}
.comments-disclaimer {
  font-size: 0.82rem; color: var(--text-dim);
  font-style: italic; margin-bottom: 6px;
}

/* ══════════════════════════════════════════════════════
   RUBRIC TABLE
   ══════════════════════════════════════════════════════ */
.rubric-table {
  width: 100%; border-collapse: collapse;
  margin: 20px 0 28px; font-size: 0.95rem;
}
.rubric-table th {
  background: var(--purple-header); color: #fff;
  padding: 10px 14px; text-align: left; font-weight: bold;
  letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.85rem;
}
.rubric-table td {
  padding: 10px 14px; vertical-align: top;
  border-bottom: 1px solid var(--border);
  color: var(--text); background: var(--bg);
}
.rubric-table tr:nth-child(even) td { background: var(--bg-sub); }
.rubric-table tr:last-child td { border-bottom: none; }
.weight-cell { text-align: center; font-weight: bold; width: 80px; }
.grade-cell { width: 80px; border-bottom: 1px solid var(--text-dim) !important; }
.total-row td { background: var(--bg-wash) !important; color: var(--text) !important; font-weight: bold; border-top: 2px solid #3d2a52; }
.beyond-row td { background: var(--yellow-bg) !important; color: var(--text) !important; }

/* ══════════════════════════════════════════════════════
   GRADE SUMMARY BARS
   ══════════════════════════════════════════════════════ */
.midterm-bar,
.final-bar {
  background: var(--bg-wash); border: 1px solid var(--border-mid);
  border-radius: 4px; padding: 14px 18px;
  margin-top: 28px; font-size: 0.92rem; color: var(--text);
}
.midterm-bar strong, .final-bar strong { color: var(--text); }
.midterm-weights { display: flex; gap: 24px; margin-top: 10px; flex-wrap: wrap; }
.midterm-weights .chip {
  background: var(--purple-header); color: #fff;
  border-radius: 20px; padding: 4px 14px;
  font-size: 0.85rem; font-weight: bold;
}
.final-fields { display: flex; gap: 24px; margin-top: 14px; flex-wrap: wrap; align-items: flex-end; }
.final-fields .field { flex: 1; min-width: 140px; }
.final-fields .field label {
  display: block; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-mid); margin-bottom: 5px; font-weight: bold;
}
.final-fields .field .underline {
  border-bottom: 2px solid var(--border-mid);
  min-height: 26px; display: block;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .page-wrap { padding: 24px 16px 40px; }
  header { padding: 20px 24px; }
}
