/* Quest Arena — printable worksheet stylesheet.
   On screen: clean, readable, Arena palette.
   On print : single-column, hairline borders, no shadows, A4 friendly. */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: #15172A;
  background: #F5F7FC;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* ============================================================
   WATERMARK — matches the DOCX library style.
   A fixed-positioned, diagonal, faint "EDU ARCHIVES" repeats
   across the page on screen AND on print.
   ============================================================ */
/* Matches the source DOCX watermark exactly:
   single "EDU ARCHIVES" phrase, Arial Black, grey 13%, rotated -45°. */
body::before {
  content: "EDU ARCHIVES";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Arial Black', 'Helvetica Neue', system-ui, sans-serif;
  font-weight: 900;
  font-size: clamp(72px, 14vw, 180px);
  letter-spacing: 0.02em;
  color: rgba(191, 191, 191, 0.30);
  transform: rotate(-45deg);
  white-space: nowrap;
  text-align: center;
  line-height: 1;
  overflow: hidden;
  text-transform: uppercase;
  user-select: none;
  mix-blend-mode: multiply;
}
.ws-toolbar { position: relative; z-index: 101; }   /* keep toolbar buttons clickable above the watermark */

main {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 32px 64px;
}

.ws-header {
  background: #fff;
  border: 1px solid rgba(22,24,38,.09);
  border-radius: 18px;
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(22,24,38,.06);
}
.ws-kicker {
  font-family: 'Chakra Petch', system-ui, sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #0A7C68;
}
.ws-title {
  font-family: 'Chakra Petch', system-ui, sans-serif;
  font-weight: 700;
  font-size: 28px;
  margin: 6px 0 4px;
  color: #15172A;
}
.ws-meta { color: #565C77; font-size: 14px; }
.ws-meta strong { color: #15172A; }

.ws-card {
  background: #fff;
  border: 1px solid rgba(22,24,38,.09);
  border-radius: 18px;
  padding: 28px 32px;
  box-shadow: 0 10px 30px rgba(22,24,38,.06);
  margin-bottom: 20px;
}

.ws-instructions {
  background: #fff;
  border: 1px solid rgba(19,195,164,.35);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 15px;
  color: #2d3748;
}
.ws-instructions strong { color: #0A7C68; }

.ws-section-heading {
  font-family: 'Chakra Petch', system-ui, sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #15172A;
  margin: 0 0 16px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.ws-section-heading::before {
  content: "";
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, #0E9E86, #6E54F0);
  border-radius: 2px;
  display: inline-block;
}

.passage {
  font-size: 15px;
  line-height: 1.75;
  color: #2d3748;
}
.passage p { margin: 0 0 14px; }
.passage h3 {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 16px;
  margin: 0 0 8px;
  color: #15172A;
}

ol.questions {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: q;
}
ol.questions > li {
  counter-increment: q;
  padding: 16px 0 16px 48px;
  position: relative;
  border-bottom: 1px dashed rgba(22,24,38,.08);
  font-size: 15px;
}
ol.questions > li:last-child { border-bottom: none; }
ol.questions > li::before {
  content: counter(q);
  position: absolute;
  left: 0; top: 16px;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #13C3A4, #6E54F0);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 14px;
}
ol.questions > li > p { margin: 0 0 8px; }
ol.questions ol.options {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: opt;
}
ol.questions ol.options > li {
  counter-increment: opt;
  padding: 4px 0 4px 28px;
  position: relative;
  font-size: 14px;
  color: #2d3748;
}
ol.questions ol.options > li::before {
  content: counter(opt, upper-alpha);
  position: absolute;
  left: 0; top: 4px;
  width: 22px;
  height: 22px;
  border: 1.5px solid rgba(22,24,38,.16);
  color: #565C77;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}
.answer-line {
  display: block;
  margin-top: 10px;
  border-bottom: 1.5px solid rgba(22,24,38,.18);
  height: 22px;
}
.answer-box {
  display: inline-block;
  min-width: 80px;
  height: 28px;
  border: 1.5px solid rgba(22,24,38,.18);
  border-radius: 6px;
  margin-left: 8px;
  vertical-align: middle;
}

.ws-answer-key {
  background: #FBFCFF;
  border: 1px solid rgba(19,195,164,.3);
  border-radius: 18px;
  padding: 24px 28px;
  margin-top: 32px;
  page-break-before: always;
}
.ws-answer-key h2 {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 22px;
  margin: 0 0 12px;
  color: #15172A;
}
.ws-answer-key ol {
  margin: 0;
  padding-left: 22px;
  font-size: 14px;
  color: #2d3748;
}
.ws-answer-key ol li { padding: 6px 0; border-bottom: 1px dotted rgba(22,24,38,.08); }
.ws-answer-key ol li:last-child { border: none; }
.ws-answer-key strong { color: #0A7C68; font-family: 'Chakra Petch', sans-serif; }

.nvr-svg { width: 100%; max-width: 360px; height: auto; margin: 8px 0; }
.nvr-svg rect, .nvr-svg circle, .nvr-svg polygon, .nvr-svg path { stroke: #15172A; }

table.planner {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 13px;
}
table.planner th, table.planner td {
  border: 1px solid rgba(22,24,38,.16);
  padding: 8px;
  vertical-align: top;
  text-align: left;
}
table.planner thead {
  background: linear-gradient(135deg, #13C3A4, #6E54F0);
  color: #fff;
}
table.planner thead th { color: #fff; font-family: 'Chakra Petch', sans-serif; font-weight: 700; }
table.planner tbody tr:nth-child(even) { background: #fbfcff; }
table.planner .wk-num { font-family: 'Chakra Petch', sans-serif; font-weight: 700; color: #0A7C68; }
table.planner .wk-focus { font-weight: 700; color: #15172A; }

.ws-footer {
  text-align: center;
  font-size: 12px;
  color: #565C77;
  margin-top: 32px;
}
.ws-footer a { color: #0A7C68; }

.ws-toolbar {
  position: fixed;
  top: 16px; right: 16px;
  display: flex;
  gap: 10px;
  z-index: 50;
}
.ws-toolbar button {
  background: #fff;
  border: 1px solid rgba(22,24,38,.16);
  border-radius: 10px;
  padding: 8px 14px;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: #15172A;
  box-shadow: 0 6px 18px rgba(22,24,38,.08);
  cursor: pointer;
}
.ws-toolbar button:hover { color: #6E54F0; border-color: #6E54F0; }

/* === PRINT === */
@media print {
  body { background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  main { padding: 0; max-width: none; }
  .ws-toolbar { display: none; }
  .ws-header, .ws-card, .ws-instructions, .ws-answer-key {
    box-shadow: none !important;
    border-color: rgba(22,24,38,.2) !important;
    page-break-inside: avoid;
  }
  ol.questions > li { page-break-inside: avoid; }
  .ws-answer-key { page-break-before: always; }
  /* Force the watermark to print — matches the source DOCX style (grey diagonal). */
  body::before {
    color: rgba(191, 191, 191, 0.40) !important;
    position: fixed !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
