/* Styles for the proposed-syllabus page under /teaching/. Loaded after
   ../style.css and reuses its tokens (--bg, --text, --muted, --link, --rule,
   --rule-soft, --placeholder-bg, --placeholder-fg) and its .layout/.sidebar
   frame, so the page shares the homepage's sticky sidebar, fonts, and rules. */

:root {
  --dot: #004682;
  --dot-off: #c9cfd6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --dot: #6aa5d8;
    --dot-off: #3a3d42;
  }
}

/* Page title block: the h1 lines up with the homepage's first h2, which sits
   at main padding (1rem) + h2 margin (1.75rem) below the top of the column. */

main > h1 {
  margin-top: 1.75rem;
}


.subtitle {
  margin: 0.3rem 0 1.1rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

h4 {
  font-size: 0.98rem;
  line-height: 1.3;
  margin: 1.15rem 0 0.3rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  background: var(--placeholder-bg);
  padding: 0.05em 0.3em;
  border-radius: 3px;
}

/* Key–value metadata (syllabus header) */

.meta {
  margin: 0.6rem 0 0;
  font-size: 0.95rem;
}

.meta div {
  display: grid;
  grid-template-columns: 10.5rem minmax(0, 1fr);
  column-gap: 0.75rem;
  margin: 0 0 0.3rem;
}

.meta dt {
  color: var(--muted);
}

.meta dd {
  margin: 0;
}

@media (max-width: 40rem) {
  .meta div {
    display: block;
    margin-bottom: 0.5rem;
  }
}

/* Proposal note and rule boxes */

.note {
  margin: 1.3rem 0 0;
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--link);
  background: var(--placeholder-bg);
  font-size: 0.95rem;
  line-height: 1.55;
  border-radius: 0 6px 6px 0;
}

.note p {
  margin: 0;
}

.rules {
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 0.9rem 1.2rem;
  margin: 1.1rem 0;
}

.rules h4 {
  margin-top: 0;
}

.rules ul {
  margin-bottom: 0;
}

.rules .small {
  margin: 0.8rem 0 0;
}

/* Section index under the syllabus header: inline, middot-separated */

.toc {
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 0.75rem 0 0;
  border-top: 1px solid var(--rule-soft);
  font-size: 0.92rem;
}

.toc li {
  display: inline;
  margin: 0;
  line-height: 1.9;
}

.toc li + li::before {
  content: "\00B7";
  color: var(--muted);
  margin: 0 0.45rem;
}

.toc a {
  white-space: nowrap;
}

/* Tables */

.scroll {
  overflow-x: auto;
  margin: 0.6rem 0 1rem;
  -webkit-overflow-scrolling: touch;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.93rem;
  line-height: 1.5;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--rule-soft);
}

thead th {
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 1px solid var(--rule);
}

tr.modrow td {
  background: var(--placeholder-bg);
  color: var(--placeholder-fg);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.35rem 0.6rem;
}

.wk {
  white-space: nowrap;
  width: 2.4rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.topic {
  font-weight: 600;
  min-width: 13rem;
}

td.due {
  font-size: 0.88rem;
  color: var(--muted);
  min-width: 8.5rem;
}

.map th.cloh {
  text-align: center;
  width: 2.6rem;
}

.map td.wt {
  text-align: right;
  white-space: nowrap;
  width: 3.6rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.map td.hit,
.map td.miss {
  text-align: center;
}

.map td.hit {
  color: var(--dot);
}

.map td.miss {
  color: var(--dot-off);
}

.map tfoot td {
  border-top: 1px solid var(--rule);
  border-bottom: none;
  font-weight: 600;
}

@media (max-width: 42rem) {
  .scroll table {
    min-width: 42rem;
  }

  .scroll table.map {
    min-width: 44rem;
  }
}

/* Readings */

.readings li {
  margin: 0.45rem 0;
}

.readings .src {
  color: var(--muted);
}

.readings .pub-links {
  margin-left: 0.15rem;
}

.small {
  font-size: 0.9rem;
  color: var(--muted);
}

.grade-scale {
  font-variant-numeric: tabular-nums;
}

/* Print */

@page {
  size: letter;
  margin: 0.6in 0.65in;
}

@media print {
  :root {
    --bg: #ffffff;
    --text: #111111;
    --muted: #444444;
    --link: #004682;
    --rule: #999999;
    --rule-soft: #cccccc;
    --placeholder-bg: #f2f4f6;
    --placeholder-fg: #333333;
    --dot: #004682;
    --dot-off: #bbbbbb;
  }

  html {
    scroll-behavior: auto;
  }

  body {
    font-size: 10.5pt;
    line-height: 1.45;
  }

  .layout {
    display: block;
    max-width: none;
    padding: 0;
  }

  .sidebar,
  .toc,
  .skip-link,
  .no-print {
    display: none !important;
  }

  main > h1 {
    margin-top: 0;
    font-size: 19pt;
  }

  h2 {
    font-size: 13pt;
    margin-top: 1.4rem;
  }

  h3 {
    font-size: 11pt;
  }

  a {
    color: var(--text);
    text-decoration: none;
  }

  main p a {
    text-decoration: none;
  }

  .pub-links a {
    color: var(--link);
  }

  .scroll {
    overflow: visible;
  }

  .scroll table {
    min-width: 0;
  }

  table {
    font-size: 9.5pt;
  }

  thead {
    display: table-header-group;
  }

  h2,
  h3,
  h4 {
    break-after: avoid;
    page-break-after: avoid;
  }

  tr.modrow {
    break-after: avoid;
    page-break-after: avoid;
  }

  tr,
  .rules,
  .note,
  footer {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  footer {
    margin-top: 1.6rem;
    padding-bottom: 0;
  }
}
