/* ============================================================
   English for Accounting and Financial Management B1 — eafm.css

   This course's own rules, loaded AFTER app.css. app.css stays a
   byte-identical copy of the Cybersecurity B1 engine stylesheet, so that
   tools/check-shared.cjs can prove the engine was copied and not forked;
   anything this course needs that the engine does not have belongs here.

   Two things live here:
     1. the colour tokens, retinted from teal to slate-and-ochre;
     2. the unit hub's section list, which the engine has no markup for.
   ============================================================ */

/* ---- 1. tokens ------------------------------------------------------- */
:root {
  --primary:      #1f4e5f;
  --primary-2:    #17404f;
  --primary-soft: #e8f1f5;
  --accent:       #9a5b13;
  --accent-soft:  #faf5ec;
}
:root[data-theme="dark"],
:root:not([data-theme="light"]) {
  --primary-soft: #16313b;
  --accent-soft:  #2b2318;
}

/* ---- 2. the unit hub's section list ---------------------------------- */
/* The engine has no list-of-links component: the cybersecurity hub writes
   its own markup inline. Without these rules the rows render as inline
   anchors and run into one another, so a section title and the next
   section's title read as one sentence. */
.sec-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  margin-top: 10px;
}
.sec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 13px;
  border-radius: 9px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  transition: background .12s ease, border-color .12s ease;
}
.sec-row + .sec-row { border-top: 1px solid var(--rule, #d7dce2); border-radius: 9px; }
.sec-row:hover,
.sec-row:focus-visible {
  background: var(--primary-soft);
  border-color: var(--primary);
  outline: none;
}
.sec-label {
  font-weight: 600;
  line-height: 1.45;
}
.sec-tag {
  flex: 0 0 auto;
  font: 600 12px/1 system-ui, sans-serif;
  color: var(--text-2, #5b6470);
  background: var(--band, #eef3f5);
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
}

/* a finished section is marked, not just counted */
.sec-row .sec-tag:first-letter { font-size: 13px; }

/* ---- 3. the speaker on a sortable chip -------------------------------
   Added with `sayChips` in components.js, for the two sorts whose columns
   are SOUNDS. Without it a learner is asked to sort by ear with nothing to
   listen to. */
.chip-say {
  border: 0;
  background: transparent;
  color: var(--primary, #1f4e5f);
  cursor: pointer;
  padding: 0 0 0 6px;
  margin-left: 2px;
  line-height: 1;
  vertical-align: -1px;
  opacity: .66;
  transition: opacity .12s ease;
}
.chip-say:hover,
.chip-say:focus-visible { opacity: 1; outline: none; }
.chip-say svg { display: inline-block; }

/* ---- 4. the glossary grid on the hub --------------------------------- */
.card-body .cols > div { margin-bottom: 14px; }
[dir="rtl"] { text-align: right; }

/* Arabic ink runs about 1.2x the type size against English's 0.92, so a
   single shared line-height collides wrapped Arabic. */
[lang="ar"] { line-height: 1.95; }

@media (max-width: 620px) {
  .sec-row { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ---- 5. the writing tutor (assets/js/tutor.js) -----------------------
   Set apart from the card's own feedback on purpose: a box, a rule above
   it and a quieter background, so a learner can see at a glance which
   response came from the book and which came from a machine. The honesty
   line is styled to be read, not to be skipped. */
.tutor {
  margin-top: 18px;
  padding: 14px 16px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}
.tutor-head { font-size: 15px; margin-bottom: 4px; }
.tutor-note { margin: 0 0 10px; }
.tutor-out {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.tutor-out h5.tut-h {
  margin: 12px 0 4px;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent);
}
.tutor-out h5.tut-h:first-child { margin-top: 0; }
.tutor-out p { margin: 0 0 8px; }
.tutor-out ul.tut-l { margin: 4px 0 10px; padding-left: 20px; }
.tutor-out ul.tut-l li { margin-bottom: 5px; }
.tutor-out code {
  font-size: .94em;
  padding: 1px 4px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--line) 40%, transparent);
}
.tutor-meta { margin-top: 10px; font-size: 12px; opacity: .7; }
.tutor-honest {
  margin: 12px 0 0;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
}
