/* Syllabus subpages — loaded after styles.css, which supplies the tokens,
   header, footer, buttons, cards, and background. */

.course-hero {
  padding: 32px 0 56px;
  animation: rise-in 700ms ease both;
}

.breadcrumb {
  margin: 0 0 1.1rem;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 650;
}

.breadcrumb a {
  color: var(--cardinal-deep);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.course-hero h1 {
  max-width: 900px;
  font-size: clamp(2.5rem, 5.4vw, 4.2rem);
  line-height: 1.02;
}

.course-hero .intro {
  max-width: 760px;
}

/* at-a-glance strip */

.glance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  margin-top: 2.5rem;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.glance div {
  padding: 1.15rem 1.3rem;
  background: rgba(255, 255, 255, 0.92);
}

.glance dt {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.glance dd {
  margin: 0.35rem 0 0;
  font-size: 0.98rem;
  font-weight: 750;
  line-height: 1.45;
}

/* section scaffolding */

.syl-section {
  padding: 0 0 68px;
  scroll-margin-top: 24px;
}

.syl-section h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.syl-section > p {
  max-width: 760px;
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.7;
}

.syl-body {
  max-width: 820px;
  margin-top: 1.5rem;
  padding: 1.9rem 2rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.syl-body > *:first-child {
  margin-top: 0;
}

.syl-body > *:last-child {
  margin-bottom: 0;
}

.syl-body h3 {
  margin: 1.9rem 0 0;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.syl-body p,
.syl-body li {
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.7;
}

.syl-body p {
  margin: 0.7rem 0 0;
}

.syl-body ul,
.syl-body ol {
  margin: 0.8rem 0 0;
  padding-left: 1.3rem;
}

.syl-body ol li::marker {
  color: var(--cardinal-deep);
  font-weight: 850;
}

.syl-body li {
  margin-bottom: 0.5rem;
}

.syl-body li::marker {
  color: var(--cardinal);
}

.syl-body strong {
  color: var(--ink);
}

/* essential questions */

.eq-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.eq-list li {
  display: flex;
  gap: 0.85rem;
  padding: 1.25rem 1.4rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-left: 3px solid var(--cardinal);
  border-radius: var(--radius-sm);
  font-size: 0.97rem;
  font-weight: 650;
  line-height: 1.6;
}

.eq-list li::before {
  flex: none;
  content: "?";
  color: var(--cardinal);
  font-size: 1.1rem;
  font-weight: 850;
}

/* unit sequence */

.unit-list {
  counter-reset: unit;
  display: grid;
  gap: 0.9rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.unit {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 1.25rem;
  padding: 1.5rem 1.6rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* Every text child is pinned to column 2 — otherwise a later child (the topics
   list) auto-places into column 1 below the number and blows the column wide. */
.unit > *:not(.unit-num) {
  grid-column: 2;
}

.unit-num {
  grid-column: 1;
  grid-row: 1 / span 4;
  align-self: start;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(145deg, var(--cardinal), var(--cardinal-deep));
  border-radius: 13px;
  font-size: 1.02rem;
  font-weight: 850;
}

.unit h3 {
  margin: 0.35rem 0 0;
  font-size: 1.14rem;
  letter-spacing: -0.025em;
}

.unit-chapters {
  margin: 0.3rem 0 0;
  color: var(--cardinal-deep);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.unit p {
  margin: 0.6rem 0 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
  line-height: 1.65;
}

.unit-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.unit-topics li {
  padding: 0.36rem 0.7rem;
  color: var(--ink-soft);
  background: rgba(34, 37, 42, 0.045);
  border-radius: 999px;
  font-size: 0.79rem;
  font-weight: 700;
}

.unit-optional .unit-num {
  color: var(--ink-soft);
  background: rgba(34, 37, 42, 0.08);
}

/* grading table */

.table-wrap {
  margin-top: 1.6rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.9);
}

th,
td {
  padding: 0.95rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

th {
  color: var(--ink-soft);
  background: rgba(250, 230, 234, 0.5);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td:first-child {
  font-weight: 750;
}

td:last-child {
  color: var(--ink-soft);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* the 12-row grading scale needs to stay compact */
.table-compact table {
  min-width: 340px;
}

.table-compact th,
.table-compact td {
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
}

.table-compact td:first-child {
  font-variant-numeric: tabular-nums;
}

/* the legally load-bearing line in a policy block — must not be skimmed past */
.policy-note {
  margin-top: 1.2rem;
  padding: 1rem 1.25rem;
  background: rgba(250, 230, 234, 0.55);
  border: 1px solid rgba(165, 28, 48, 0.2);
  border-left: 3px solid var(--cardinal);
  border-radius: var(--radius-sm);
}

.syl-body .policy-note p {
  margin: 0;
  color: var(--ink);
  font-weight: 650;
}

td.weight {
  color: var(--cardinal-deep);
  font-size: 1.02rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.row-fail td {
  color: #a3341f;
  background: rgba(215, 90, 60, 0.07);
}

.row-fail td:first-child {
  color: #a3341f;
}

/* editable placeholder — must be obvious on screen AND in print */

.tk {
  padding: 0.1rem 0.45rem;
  color: #8a4b00;
  background: #ffeccc;
  border: 1px dashed #d08a2c;
  border-radius: 5px;
  font-size: 0.9em;
  font-weight: 750;
  /* must wrap — some inline placeholders are a full sentence on a narrow screen */
  overflow-wrap: anywhere;
}

.tk-block {
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  color: #8a4b00;
  background: #fff6e8;
  border: 1px dashed #d08a2c;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.6;
  white-space: normal;
}

/* callout */

.callout {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  max-width: 820px;
  margin-top: 1.5rem;
  padding: 1.4rem 1.6rem;
  background: rgba(223, 245, 232, 0.55);
  border: 1px solid rgba(47, 158, 98, 0.22);
  border-radius: var(--radius-md);
}

.callout p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.65;
}

.callout p + p {
  margin-top: 0.7rem;
}

.callout strong {
  color: var(--ink);
}

.callout-icon {
  flex: none;
  width: 26px;
  height: 26px;
  color: #1d7a4b;
}

.callout-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* jump nav + print button */

.syl-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0 0;
}

.syl-toolbar .button {
  padding: 0.75rem 1.15rem;
  font-size: 0.9rem;
}

.print-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  cursor: pointer;
  font-family: inherit;
}

.print-button:hover {
  background: var(--white);
  transform: translateY(-2px);
}

@media (max-width: 620px) {
  .syl-body {
    padding: 1.4rem 1.3rem;
  }

  .unit {
    padding: 1.3rem;
    gap: 0 1rem;
  }

  .unit-num {
    width: 38px;
    height: 38px;
    font-size: 0.92rem;
  }
}

/* ---------- print: syllabi get handed out on paper ---------- */

@media print {
  @page {
    margin: 1.6cm;
  }

  html,
  body {
    background: #fff !important;
  }

  body {
    color: #000;
    font-size: 11pt;
  }

  .background-grid,
  .glow,
  .site-nav,
  .syl-toolbar,
  .skip-link,
  .breadcrumb {
    display: none !important;
  }

  .page-shell {
    width: 100%;
  }

  .site-header {
    padding: 0 0 12pt;
    border-bottom: 1pt solid #999;
  }

  .course-hero {
    padding: 16pt 0 20pt;
  }

  .course-hero h1 {
    font-size: 24pt;
  }

  .syl-section {
    padding-bottom: 18pt;
  }

  .syl-section h2 {
    font-size: 14pt;
  }

  /* keep a unit or a section heading from splitting across a page break */
  .unit,
  .glance,
  .callout,
  .table-wrap,
  .eq-list li {
    break-inside: avoid;
  }

  .syl-section h2,
  .unit h3 {
    break-after: avoid;
  }

  .card,
  .unit,
  .syl-body,
  .glance div,
  .eq-list li,
  table {
    background: #fff !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  .unit-num,
  .brand-mark {
    color: #fff !important;
    background: #7d1424 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* placeholders must still shout on paper */
  .tk,
  .tk-block {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  a {
    text-decoration: none;
  }
}
