/* =========================================================
   AI Literacy Faculty Workbook
   Loads after ../css/styles.css
   ========================================================= */

:root {
  --paper: #fff6d8;   /* pale version of brand gold */
}

/* Page stays light like the playbook; yellow marks where you write */

/* Callout cards: white on yellow */
.wb-card {
  margin: 0 0 24px;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 5px solid var(--octc-blue);
  border-radius: 0 8px 8px 0;
}

.wb-label {
  display: block;
  margin-bottom: 4px;
  color: var(--octc-blue);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wb-card p { margin: 0; line-height: 1.6; }

.wb-prompt pre {
  margin: 10px 0 0;
  padding: 14px 16px;
  background: var(--surface-alt);
  border-radius: 6px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

/* Questions faculty answer */
.wb-question { margin: 0 0 26px; }

.wb-question label {
  display: block;
  margin-bottom: 8px;
  color: var(--octc-blue-dark);
  font-weight: 700;
  line-height: 1.45;
}

.wb-question .wb-hint {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 400;
}

.wb-question textarea,
.wb-question input,
.wb-question select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d9c98f;
  border-left: 4px solid var(--octc-gold);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  line-height: 1.6;
}

.wb-question textarea {
  min-height: 7.5rem;
  resize: vertical;
  overflow: hidden;
}

.wb-question textarea:focus,
.wb-question input:focus,
.wb-question select:focus {
  outline: 3px solid var(--octc-blue);
  outline-offset: 2px;
  border-color: var(--octc-blue);
}

/* Print-only copy of each answer */
.wb-answer-print { display: none; }

/* Course details row */
.wb-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Tools: save / print / clear */
.wb-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 8px 0 30px;
}

.wb-button {
  padding: 11px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--octc-blue);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.wb-button:hover { background: var(--octc-blue-dark); }

.wb-button:focus-visible {
  outline: 3px solid var(--octc-blue-dark);
  outline-offset: 3px;
}

.wb-button.secondary {
  background: #fff;
  color: var(--octc-blue);
  border: 2px solid var(--octc-blue);
}

.wb-status {
  color: var(--muted);
  font-size: 0.88rem;
}

@media (max-width: 560px) {
  .wb-details { grid-template-columns: 1fr; }
}

/* ---------- Print / Save as PDF ---------- */
@media print {
  body.workbook-page { background: #fff; }

  .site-header,
  .site-footer,
  .page-navigation,
  .wb-tools,
  .wb-prompt,
  .wb-screen-only { display: none !important; }

  .playbook-page { margin: 0; max-width: none; padding: 0; }

  .wb-question textarea,
  .wb-question input { display: none; }

  .wb-answer-print {
    display: block;
    min-height: 2.4em;
    padding: 8px 0 10px;
    border-bottom: 1px solid #999;
    white-space: pre-wrap;
    line-height: 1.5;
  }

  .wb-question { break-inside: avoid; }
  .wb-card { border-color: #999; }
}


/* ---------- Exercise layout ---------- */
.wb-lesson h3 {
  margin: 26px 0 6px;
  color: var(--octc-blue-dark);
  font-size: 1.15rem;
}
.wb-lesson p, .wb-lesson li { line-height: 1.7; }
.wb-lesson .wb-example {
  margin: 6px 0 0;
  color: var(--muted);
  font-style: italic;
}

.wb-step {
  margin: 34px 0 10px;
  color: var(--octc-blue-dark);
  font-size: 1.3rem;
}
.wb-step span {
  display: inline-block;
  margin-right: 8px;
  color: var(--octc-blue);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Assignment sorting rows */
.wb-sort-head,
.wb-sort-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.7fr;
  gap: 12px;
}
.wb-sort-head {
  margin-bottom: 6px;
  color: var(--octc-blue-dark);
  font-size: 0.85rem;
  font-weight: 800;
}
.wb-sort-row .wb-question { margin-bottom: 12px; }
.wb-sort-row textarea { min-height: 3.2rem; }

.wb-copy { margin-top: 10px; }

@media (max-width: 700px) {
  .wb-sort-head { display: none; }
  .wb-sort-row {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 12px 0 4px;
    border-top: 1px solid var(--border);
  }
  .wb-sort-row label.visually-hidden {
    position: static !important;
    width: auto !important;
    height: auto !important;
    clip: auto !important;
    margin: 0 0 6px;
  }
}

@media print {
  .wb-lesson, .wb-copy { display: none !important; }
  .wb-sort-row {
    grid-template-columns: 1.3fr 1fr 1.7fr !important;
    gap: 12px !important;
    padding: 0 !important;
    border-top: 0 !important;
    break-inside: avoid;
  }
  .wb-sort-row label.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
  }
  .wb-sort-row.is-empty { display: none !important; }
  .wb-question select { display: none; }
  .wb-sort-head { display: grid; }
  .wb-step { break-after: avoid; }
}

/* Credit / attribution card (prints) */
.wb-credit { border-left-color: var(--muted); }
.wb-credit p + p { margin-top: 10px; }
.wb-credit a { color: var(--octc-blue); }
.wb-cite { color: var(--muted); font-size: 0.86rem; }

/* Checkpoint plan rows (4 columns) and lesson tables */
.wb-sort-head.wb-plan-row,
.wb-sort-row.wb-plan-row { grid-template-columns: 0.8fr 1.3fr 1.1fr 1.8fr; }
.wb-lesson .wb-table { margin: 10px 0 18px; }
.wb-lesson .wb-table tbody th { color: var(--octc-blue-dark); }
@media (max-width: 700px) {
  .wb-sort-row.wb-plan-row { grid-template-columns: 1fr; }
}
@media print {
  .wb-sort-row.wb-plan-row,
  .wb-sort-head.wb-plan-row { grid-template-columns: 0.8fr 1.3fr 1.1fr 1.8fr !important; }
}

/* Checkbox dropdown (choose several) */
.wb-dropdown { position: relative; }
.wb-dropdown summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 3.2rem;
  padding: 10px 12px 10px 14px;
  border: 1px solid #d9c98f;
  border-left: 4px solid var(--octc-gold);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}
.wb-dropdown summary::-webkit-details-marker { display: none; }
.wb-dropdown summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-right: 2px solid var(--octc-blue);
  border-bottom: 2px solid var(--octc-blue);
  transform: rotate(45deg);
}
.wb-dropdown[open] summary::after { margin-top: 4px; transform: rotate(-135deg); }
.wb-dropdown summary:focus-visible {
  outline: 3px solid var(--octc-blue);
  outline-offset: 2px;
}
.wb-dropdown fieldset {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  width: max-content;
  margin: 0;
  padding: 8px 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.wb-question .wb-dropdown label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--ink);
  font-weight: 400;
  cursor: pointer;
}
.wb-question .wb-dropdown label:hover { background: var(--octc-blue-soft); }
.wb-question .wb-dropdown input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  accent-color: var(--octc-blue);
}
.wb-question .wb-dropdown input[type="checkbox"]:focus-visible {
  outline: 3px solid var(--octc-blue);
  outline-offset: 2px;
}
.wb-dropdown-note {
  margin: 4px 10px 2px;
  color: var(--muted);
  font-size: 0.84rem;
}
/* Open as a floating bubble at every screen size, so nothing below moves */
.wb-dropdown fieldset { max-width: calc(100vw - 32px); }
.wb-dropdown-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
@media print {
  .wb-dropdown { display: none !important; }
}

/* Save message: reserve its line on narrow screens so the page doesn't jump when it appears */
@media (max-width: 700px) {
  .wb-status { flex-basis: 100%; min-height: 1.4em; line-height: 1.4; }
}

/* Visible label for the dropdown on narrow screens, matching the other fields */
.wb-multi-label { display: none; }
@media (max-width: 700px) {
  .wb-multi-label { display: block; margin: 0 0 6px; color: var(--octc-blue-dark); font-weight: 700; }
}
@media print { .wb-multi-label { display: none !important; } }

/* ---------- Start Here ---------- */
.wb-intro p, .wb-how li { line-height: 1.7; }
.wb-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 18px 0 6px;
}
.wb-split .wb-card { margin: 0; }
.wb-card a { color: var(--octc-blue); font-weight: 700; }

.wb-path {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  counter-reset: none;
}
.wb-path-step {
  position: relative;
  margin: 0 0 14px;
  padding: 16px 20px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.wb-path-step h2 {
  margin: 2px 0 8px;
  font-size: 1.2rem;
  color: var(--octc-blue-dark);
}
.wb-path-step h2 a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.wb-path-step p { margin: 0 0 6px; line-height: 1.6; }
.wb-path-num {
  color: var(--octc-blue);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.wb-path-step.is-core {
  border: 2px solid var(--octc-gold);
  background: var(--octc-gold-soft);
}
.wb-path-step.is-soon { background: var(--surface-alt); }
.wb-path-step.is-soon h2 { color: var(--muted); }

.wb-how { padding-left: 1.2em; }
.wb-how li { margin-bottom: 8px; }
.wb-how a { color: var(--octc-blue); }

.wb-link-button {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--octc-blue);
  color: #fff !important;
  text-decoration: none;
}

@media (max-width: 700px) {
  .wb-split { grid-template-columns: 1fr; }
}

/* Visible question label for a checkbox dropdown (not a <label>, since it names a group) */
.wb-question-label {
  display: block;
  margin-bottom: 8px;
  color: var(--octc-blue-dark);
  font-weight: 700;
  line-height: 1.45;
}

/* Side-by-side fields: labels line up at the top and boxes line up at the bottom,
   even when one label or hint wraps longer than the other */
.wb-details { align-items: stretch; }
.wb-details .wb-question { display: flex; flex-direction: column; }
.wb-details .wb-question label { flex: 1 0 auto; }

/* ---------- Start Here title page ---------- */
.wb-hero .hero-inner { min-height: 480px; }
.wb-hero .hero-art img { width: clamp(280px, 42vw, 560px); }
.wb-eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--octc-blue);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
#path { scroll-margin-top: 20px; }
@media print { .wb-hero .hero-art, .wb-hero .hero-cta { display: none; } }

/* ---------- Exercise 1: the three levels as cards with a dot gauge ---------- */
.wb-lesson .wb-level {
  margin: 18px 0;
  padding: 16px 20px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 52, 95, 0.06);
}
.wb-lesson .wb-level h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 6px;
}
.wb-lesson .wb-level p:last-child { margin-bottom: 0; }
.wb-dots { display: inline-flex; gap: 4px; flex: none; }
.wb-dots i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--octc-blue);
  border-radius: 50%;
}
.wb-dots i.on { background: var(--octc-gold); border-color: var(--octc-gold); }

/* ---------- Exercise 1: AI label maker for Blackboard ---------- */
.wb-tagmaker { margin: 26px 0 8px; border-left-color: var(--octc-gold); }
.wb-tagmaker > p { margin-bottom: 14px; }
.wb-tag-controls { display: grid; gap: 6px; margin-bottom: 16px; }
.wb-tag-controls label { color: var(--octc-blue-dark); font-weight: 700; margin-top: 6px; }
.wb-tag-controls select,
.wb-tag-controls textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font: inherit;
  line-height: 1.5;
}
.wb-tag-controls textarea { resize: vertical; }
.wb-tag-controls .wb-tag-check { display: flex; align-items: center; gap: 8px; font-weight: 400; color: var(--ink); }
.wb-tag-check input { width: 18px; height: 18px; accent-color: var(--octc-blue); }
.wb-tag-controls select:focus,
.wb-tag-controls textarea:focus { outline: 3px solid var(--octc-blue); outline-offset: 2px; }
.wb-tag-previewlabel {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.wb-tag-preview { padding: 16px; background: var(--surface-alt); border-radius: 8px; }
.wb-tag-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; }
.wb-tag-status { color: var(--muted); font-size: 0.88rem; }
.wb-tag-help { margin-top: 12px !important; color: var(--muted); font-size: 0.88rem; }
@media print { .wb-tagmaker { display: none !important; } }

/* ---------- Buttons at the end of Try It, where people finish ---------- */
.wb-tools-end {
  margin: 34px 0 8px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.wb-tools-note { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 0.88rem; }
.wb-skip { margin: 14px 0 0; font-size: 0.92rem; }
.wb-skip a { color: var(--octc-blue); font-weight: 700; }

/* ---------- Exercise 1: label maker beside the steps on wide screens ---------- */
/* Narrow screens: steps, then the label maker, then the buttons. */
.wb-try-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "main" "side" "tools";
}
.wb-try-main { grid-area: main; min-width: 0; }
.wb-try-grid > .wb-tagmaker { grid-area: side; }
.wb-try-grid > .wb-tools-end { grid-area: tools; }

@media screen and (min-width: 1280px) {
  /* Let Try It use the full page width; the steps keep a reading width */
  .wb-try:has(.wb-try-grid) {
    width: min(1180px, calc(100vw - 64px));
    margin-left: calc(50% - min(590px, 50vw - 32px));
  }
  .wb-try:has(.wb-try-grid) > p { max-width: 800px; }
  .wb-try-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-areas: "main side" "tools side";
    column-gap: 40px;
    align-items: start;
  }
  .wb-try-grid > .wb-tagmaker {
    position: sticky;
    top: 20px;
    margin: 0;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
  }
}
.wb-tag-more { margin-top: 12px; font-size: 0.88rem; }
.wb-tag-more summary { cursor: pointer; color: var(--octc-blue); font-weight: 700; }
.wb-tag-more summary:focus-visible { outline: 3px solid var(--octc-blue); outline-offset: 2px; }

/* ---------- Try It as a legal pad (screen only) ----------
   The lesson stays on the clean playbook page. The Try It section is the
   working space: pale yellow paper, faint blue rules, a double pink margin
   line, and a navy binding across the top. Print is unchanged. */
:root {
  --pad-sheet: #fffae3;
  --pad-rule: rgba(0, 70, 127, 0.16);
  --pad-margin: rgba(214, 92, 112, 0.6);
  --pad-rule-gap: 1.75rem;
}

@media screen {
  .wb-try {
    margin: 0 -24px 38px;
    padding: 26px 32px 30px 80px;
    background-color: var(--pad-sheet);
    background-image:
      linear-gradient(90deg, transparent 54px, var(--pad-margin) 54px, var(--pad-margin) 55px, transparent 55px,
                             transparent 58px, var(--pad-margin) 58px, var(--pad-margin) 59px, transparent 59px),
      repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--pad-rule-gap) - 1px),
                                var(--pad-rule) calc(var(--pad-rule-gap) - 1px), var(--pad-rule) var(--pad-rule-gap));
    border-top: 16px solid var(--octc-blue-dark);   /* the pad's binding */
    border-radius: 6px;
    box-shadow: 0 10px 24px rgba(0, 52, 95, 0.12);
  }

  /* Answer boxes: white, with rules that line up with the typed text */
  .wb-try .wb-question textarea,
  .wb-try .wb-question input,
  .wb-try .wb-question select,
  .wb-try .wb-dropdown summary { background-color: #fff; }
  .wb-try .wb-question textarea {
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(1.6em - 1px),
                                                var(--pad-rule) calc(1.6em - 1px), var(--pad-rule) 1.6em);
    background-attachment: local;
    background-position: 0 12px;   /* matches the box's top padding */
  }
  .wb-try .wb-card { background: #fff; }

  /* "Skip to Try It": a small tab of the same pad */
  .wb-skip { margin: 20px 0 34px; font-size: 1rem; }
  .wb-skip a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 18px;
    background-color: var(--pad-sheet);
    border: 1px solid #e3d29a;
    border-top: 5px solid var(--octc-blue-dark);
    border-radius: 6px;
    box-shadow: 0 3px 8px rgba(0, 52, 95, 0.10);
    color: var(--octc-blue-dark);
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }
  .wb-skip a::after { content: "\2193"; font-size: 1.1em; line-height: 1; }
  .wb-skip a:hover {
    color: var(--octc-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 52, 95, 0.16);
  }
  .wb-skip a:focus-visible { outline: 3px solid var(--octc-blue); outline-offset: 3px; }
}

@media screen and (max-width: 600px) {
  .wb-try {
    padding: 22px 18px 24px 40px;
    background-image:
      linear-gradient(90deg, transparent 24px, var(--pad-margin) 24px, var(--pad-margin) 25px, transparent 25px,
                             transparent 28px, var(--pad-margin) 28px, var(--pad-margin) 29px, transparent 29px),
      repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--pad-rule-gap) - 1px),
                                var(--pad-rule) calc(var(--pad-rule-gap) - 1px), var(--pad-rule) var(--pad-rule-gap));
  }
}

@media (prefers-reduced-motion: reduce) {
  .wb-skip a, .wb-skip a:hover { transition: none; transform: none; }
}

/* Example policies (Exercise 1, Step 6): a white card that opens on the pad */
.wb-examples {
  margin: 4px 0 22px;
  border: 1px solid var(--border, #d9e2ea);
  border-left: 4px solid var(--octc-gold);
  border-radius: 6px;
  background: #fff;
}
.wb-examples summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 44px; padding: 10px 14px;
  color: var(--octc-blue-dark); font-weight: 800; cursor: pointer; list-style: none;
}
.wb-examples summary::-webkit-details-marker { display: none; }
.wb-examples summary::after {
  content: ""; flex: none; width: 8px; height: 8px; margin-top: -4px;
  border-right: 2px solid var(--octc-blue); border-bottom: 2px solid var(--octc-blue);
  transform: rotate(45deg);
}
.wb-examples[open] summary::after { margin-top: 4px; transform: rotate(-135deg); }
.wb-examples summary:focus-visible { outline: 3px solid var(--octc-blue); outline-offset: 2px; }
.wb-examples-body { padding: 0 18px 8px; }
.wb-examples-note { color: var(--muted, #52606d); font-size: 0.95rem; }
.wb-example-policy { padding: 14px 0 12px; border-top: 1px solid var(--border, #d9e2ea); }
.wb-example-policy h3 { margin: 0 0 8px; font-size: 1.05rem; color: var(--octc-blue-dark); }
.wb-example-policy p { margin: 0 0 8px; }
@media print { .wb-examples { display: none; } }
