/*
  The "Syllabus" theme: simple and clean.

  "Checking your syllabus looks a little different this semester." A syllabus
  is a plain document that is easy to find things in: a name at the top, a few
  facts, then a dated schedule. This theme sets her work out the same way.

    white page, one typeface, thin lines
    each section is named in a narrow left column, with its content beside it
    the articles are a dated list with no photos, so her words come first
    the only colour is a highlighter mark on whatever you point at
*/

[data-theme='syllabus'] {
  --white: #ffffff;
  --wash: #f5f5f2;
  --line: #e3e3df;
  --ink: #131416;
  --ink-soft: #3b3c41;
  --muted: #63646a;
  --marker: #ffe566;
  --stop: #a8231c;

  --sans: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 4rem);
  --max: 68rem;
  --rail: 13rem;
  --paint: 2px;
  --header: 3.5rem;

  /* What the shared rules in site.css and manage.css read. */
  --theme-color: #ffffff;
  --body-bg: var(--white);
  --page: var(--white);
  --panel: var(--white);
  --accent: var(--ink);
  --font-ui: var(--sans);
  --font-display: var(--sans);
  --font-read: var(--sans);
  --display-stretch: 100%;
  --display-weight: 600;
  --display-tracking: -0.02em;
  --btn-bg: var(--wash);
  --btn-ink: var(--ink);
  --btn-hover-bg: var(--marker);
  --btn-hover-ink: var(--ink);
  --btn-solid-bg: var(--ink);
  --btn-solid-ink: var(--white);
  --btn-radius: 4px;
  --field-radius: 4px;
  --box-radius: 6px;
  --notice-bg: var(--wash);
  --select-bg: var(--marker);
  --select-ink: var(--ink);
  --skip-bg: var(--ink);
  --skip-ink: var(--white);
}

[data-theme='syllabus'] .band {
  padding-inline: var(--gutter);
}

[data-theme='syllabus'] .wrap {
  max-width: var(--max);
  margin-inline: auto;
}

/* Small grey text used for labels and for the date line of a story or document. */
[data-theme='syllabus'] .label,
[data-theme='syllabus'] .meta {
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--muted);
}

/* The highlighter: the one bit of colour, on whatever is pointed at. */
[data-theme='syllabus'] .sign a:hover,
[data-theme='syllabus'] .back:hover,
[data-theme='syllabus'] .story:hover h3 a,
[data-theme='syllabus'] .story h3 a:focus-visible,
[data-theme='syllabus'] .voice-from a:hover,
[data-theme='syllabus'] .facts a:hover,
[data-theme='syllabus'] .foot a:hover,
[data-theme='syllabus'] .story-text a:hover,
[data-theme='syllabus'] .source-bar:hover .src-go,
[data-theme='syllabus'] .pager a:hover .t {
  background: var(--marker);
  box-shadow: 0 0 0 0.14em var(--marker);
  color: var(--ink);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Header */
[data-theme='syllabus'] .site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding-inline: var(--gutter);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

[data-theme='syllabus'] .site-header-inner {
  max-width: var(--max);
  min-height: var(--header);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

[data-theme='syllabus'] .mark {
  flex: none;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

[data-theme='syllabus'] .nav {
  display: flex;
  align-items: stretch;
  gap: clamp(1rem, 2.4vw, 1.75rem);
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

[data-theme='syllabus'] .nav::-webkit-scrollbar {
  display: none;
}

[data-theme='syllabus'] .nav a {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: var(--header);
  font-size: 0.92rem;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

[data-theme='syllabus'] .nav a:hover,
[data-theme='syllabus'] .nav a[aria-current] {
  color: var(--ink);
}

[data-theme='syllabus'] .nav a[aria-current] {
  box-shadow: inset 0 -2px 0 var(--ink);
}

[data-theme='syllabus'] .nav a:focus-visible {
  outline-offset: -3px;
}

[data-theme='syllabus'] .nav .n {
  font-variant-numeric: tabular-nums;
}

/* Hero: a name, a sentence and where to go. This theme keeps her photo in About. */
[data-theme='syllabus'] .hero-portrait {
  display: none;
}

[data-theme='syllabus'] .hero {
  padding-block: clamp(3rem, 8vw, 5.5rem) clamp(2rem, 4vw, 3rem);
}

[data-theme='syllabus'] .hero h1 {
  margin-top: 0.35rem;
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.035em;
}

[data-theme='syllabus'] .hero-grid {
  margin-top: 1.25rem;
}

[data-theme='syllabus'] .lede {
  max-width: 38rem;
  font-size: clamp(1.15rem, 1.9vw, 1.4rem);
  line-height: 1.45;
  color: var(--ink-soft);
  text-wrap: pretty;
}

[data-theme='syllabus'] .sign {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.75rem;
  margin-top: 1.75rem;
}

[data-theme='syllabus'] .sign a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

/* The facts at the top of the page, like the header block of a syllabus. */
[data-theme='syllabus'] .stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem 2rem;
  margin-block: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--ink);
}

[data-theme='syllabus'] .stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 0.1rem;
}

[data-theme='syllabus'] .stat dd {
  margin: 0;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

/* Sections: a narrow left column names the section and the content sits beside it. */
[data-theme='syllabus'] .section {
  padding-top: clamp(2.75rem, 6vw, 4.5rem);
}

[data-theme='syllabus'] .section > .wrap {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: 1.5rem clamp(1.5rem, 4vw, 3.5rem);
  padding-top: 1.1rem;
  border-top: 1px solid var(--ink);
}

[data-theme='syllabus'] .section-head {
  position: sticky;
  top: calc(var(--header) + 1.25rem);
  align-self: start;
}

[data-theme='syllabus'] .section-head h2 {
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

[data-theme='syllabus'] .section-head .label {
  margin-top: 0.2rem;
}

[data-theme='syllabus'] .section-head-side {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

[data-theme='syllabus'] .filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

[data-theme='syllabus'] .filters button {
  min-height: 2rem;
  padding: 0 0.65rem;
  border: 1px solid #8a8b90;
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
}

[data-theme='syllabus'] .filters button .n {
  margin-left: 0.25rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

[data-theme='syllabus'] .filters button[aria-pressed='true'] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

[data-theme='syllabus'] .filters button[aria-pressed='true'] .n {
  color: var(--line);
}

[data-theme='syllabus'] main[data-portfolio-page='home'] {
  padding-bottom: clamp(3.5rem, 8vw, 6rem);
}

/* The schedule: one line per story, newest first. Phone layout first. */
[data-theme='syllabus'] ol.stories {
  list-style: none;
  margin: 0;
  padding: 0;
}

[data-theme='syllabus'] .story {
  position: relative;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  grid-template-areas:
    'no date sec words'
    'body body body body';
  gap: 0.3rem 0.8rem;
  align-items: baseline;
  padding: 0.95rem 0 1.05rem;
  border-top: 1px solid var(--line);
}

/* The first line that is showing sits right under the section's rule. */
[data-theme='syllabus'] .story:nth-child(1 of .story:not([hidden])) {
  padding-top: 0;
  border-top: 0;
}

[data-theme='syllabus'] .story-no {
  grid-area: no;
  font-size: 0.86rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* No photos in the list. They are on each story's own page. */
[data-theme='syllabus'] .story-media {
  display: none;
}

/* The date line's three parts each take their own place on the row. */
[data-theme='syllabus'] .story > .meta {
  display: contents;
}

[data-theme='syllabus'] .story time {
  grid-area: date;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

[data-theme='syllabus'] .story .sec {
  grid-area: sec;
}

[data-theme='syllabus'] .story .words {
  grid-area: words;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

[data-theme='syllabus'] .story-body {
  grid-area: body;
  min-width: 0;
}

[data-theme='syllabus'] .story h3 {
  font-size: clamp(1.12rem, 1.6vw, 1.3rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

[data-theme='syllabus'] .story h3 a {
  text-decoration: none;
}

/* The whole row is the click target. */
[data-theme='syllabus'] .story h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
}

/* Where the browser can, draw the keyboard focus ring around the whole row. */
@supports selector(:has(a)) {
  [data-theme='syllabus'] .story h3 a:focus-visible {
    outline: none;
  }

  [data-theme='syllabus'] .story:has(h3 a:focus-visible) {
    outline: var(--paint) solid var(--ink);
    outline-offset: 4px;
  }
}

[data-theme='syllabus'] .dek {
  max-width: 42rem;
  margin-top: 0.3rem;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--ink-soft);
  text-wrap: pretty;
}

[data-theme='syllabus'] .with {
  margin-top: 0.3rem;
  font-size: 0.86rem;
  color: var(--muted);
}

[data-theme='syllabus'] .credit {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted);
}

[data-theme='syllabus'] .empty-note {
  color: var(--muted);
}

@media (min-width: 761px) {
  [data-theme='syllabus'] .story {
    grid-template-columns: 2rem 6.9rem minmax(0, 1fr) 5.5rem;
    grid-template-rows: auto 1fr;
    grid-template-areas:
      'no date body words'
      'no sec body .';
    gap: 0 1.25rem;
  }

  [data-theme='syllabus'] .story .sec {
    font-size: 0.8rem;
  }

  [data-theme='syllabus'] .story .words {
    justify-self: end;
  }
}

/* The last word: the closing lines, set plainly. */
[data-theme='syllabus'] .voices {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(1.5rem, 4vw, 3.5rem);
}

[data-theme='syllabus'] .voice {
  padding: 1.1rem 0 1.3rem;
  border-top: 1px solid var(--line);
}

[data-theme='syllabus'] .voice:nth-child(-n + 2) {
  padding-top: 0;
  border-top: 0;
}

[data-theme='syllabus'] .voice blockquote {
  margin: 0;
}

[data-theme='syllabus'] .voice blockquote p {
  font-size: 1.12rem;
  line-height: 1.5;
  text-wrap: pretty;
}

[data-theme='syllabus'] .voice-from {
  margin-top: 0.6rem;
}

[data-theme='syllabus'] .voice-from a {
  text-decoration: none;
}

/* Documents */
[data-theme='syllabus'] .documents-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

[data-theme='syllabus'] .doc-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

[data-theme='syllabus'] .doc-row:first-child {
  padding-top: 0;
  border-top: 0;
}

[data-theme='syllabus'] .doc-info {
  flex: 1 1 18rem;
  min-width: 0;
}

[data-theme='syllabus'] .doc-info .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.9rem;
}

[data-theme='syllabus'] .doc-info h3 {
  margin-top: 0.2rem;
  font-size: 1.15rem;
  line-height: 1.25;
}

[data-theme='syllabus'] .doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* About */
[data-theme='syllabus'] .about {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1.5rem clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}

[data-theme='syllabus'] .portrait {
  margin: 0;
}

[data-theme='syllabus'] .portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 2px;
  object-fit: cover;
  background: var(--wash);
}

[data-theme='syllabus'] .portrait figcaption {
  margin-top: 0.4rem;
}

[data-theme='syllabus'] .bio p {
  max-width: 40rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink-soft);
  text-wrap: pretty;
}

[data-theme='syllabus'] .bio p + p {
  margin-top: 0.9em;
}

[data-theme='syllabus'] .bio p:first-child {
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--ink);
}

[data-theme='syllabus'] .facts {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2rem;
  margin: 0.5rem 0 0;
}

[data-theme='syllabus'] .facts:empty {
  display: none;
}

[data-theme='syllabus'] .facts div {
  padding: 0.7rem 0 0.8rem;
  border-top: 1px solid var(--line);
}

[data-theme='syllabus'] .facts dt {
  font-size: 0.82rem;
  color: var(--muted);
}

[data-theme='syllabus'] .facts dd {
  margin: 0.1rem 0 0;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.4;
}

[data-theme='syllabus'] .facts a,
[data-theme='syllabus'] .foot a,
[data-theme='syllabus'] .story-text a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

/* Footer: one quiet line. The colour key belongs to another theme. */
[data-theme='syllabus'] .foot {
  padding-block: 1.5rem 2.5rem;
  border-top: 1px solid var(--line);
  background: var(--white);
}

[data-theme='syllabus'] .foot .key {
  display: none;
}

[data-theme='syllabus'] .foot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.75rem;
  font-size: 0.86rem;
  color: var(--muted);
}

[data-theme='syllabus'] .foot a {
  color: var(--ink);
}

/* Story reader: one column, like a page of the document. */
[data-theme='syllabus'] main[data-portfolio-page$='story'] .wrap {
  max-width: 44rem;
}

[data-theme='syllabus'] .topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1.25rem;
}

[data-theme='syllabus'] .back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}

[data-theme='syllabus'] .story-head {
  padding-block: clamp(1rem, 3vw, 2.25rem) 1.5rem;
}

[data-theme='syllabus'] .story-head h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

[data-theme='syllabus'] .story-head .dek {
  max-width: none;
  margin-top: 1rem;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  line-height: 1.45;
}

[data-theme='syllabus'] .byline {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--muted);
}

[data-theme='syllabus'] .byline strong {
  color: var(--ink);
  font-weight: 600;
}

[data-theme='syllabus'] .source-bar {
  display: block;
  text-decoration: none;
}

[data-theme='syllabus'] .source-bar:focus-visible {
  outline-offset: -2px;
}

[data-theme='syllabus'] .source-bar .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-block: 0.8rem;
  border-block: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}

[data-theme='syllabus'] .src-go {
  color: var(--ink);
  font-weight: 600;
}

[data-theme='syllabus'] .story-layout {
  padding-block: 1.25rem clamp(3rem, 6vw, 5rem);
}

[data-theme='syllabus'] .story-rail {
  margin-bottom: 1.75rem;
}

[data-theme='syllabus'] .story-facts {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 0 2.5rem;
  margin: 0;
}

[data-theme='syllabus'] .story-facts dt {
  font-size: 0.8rem;
  color: var(--muted);
}

[data-theme='syllabus'] .story-facts dd {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 500;
}

[data-theme='syllabus'] .photo-figure {
  margin: 0 0 2rem;
}

[data-theme='syllabus'] .photo {
  background: var(--wash);
}

/* Most of the photos are 3:2. Holding that shape until the photo arrives keeps the text below from jumping. */
[data-theme='syllabus'] .photo img {
  width: 100%;
  height: auto;
  aspect-ratio: auto 3 / 2;
  border-radius: 2px;
}

[data-theme='syllabus'] .photo.broken {
  display: none;
}

[data-theme='syllabus'] .story-text {
  font-size: clamp(1.06rem, 1.3vw, 1.14rem);
  line-height: 1.7;
}

[data-theme='syllabus'] .story-text p {
  margin-bottom: 1.15em;
  text-wrap: pretty;
}

/* A paragraph that opens on a quote is someone else talking: a thin line in the margin marks it. */
[data-theme='syllabus'] .story-text p.says {
  position: relative;
}

[data-theme='syllabus'] .story-text p.says::before {
  content: '';
  position: absolute;
  top: 0.35em;
  bottom: 0.35em;
  left: -1.1rem;
  width: 2px;
  background: var(--ink);
}

/* The closing quote, set a size up under a rule. */
[data-theme='syllabus'] .story-text p.kicker {
  margin: 2.2em 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--ink);
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.012em;
}

/* The second content line keeps the label out of screen readers where that is supported. */
[data-theme='syllabus'] .story-text p.kicker::before {
  content: 'The last word';
  content: 'The last word' / '';
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.86rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}

[data-theme='syllabus'] .story-attachment {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-top: 2rem;
  padding: 0.9rem 1rem;
  border-radius: 6px;
  background: var(--wash);
}

[data-theme='syllabus'] #story-pager {
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
}

[data-theme='syllabus'] .pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2rem;
  border-top: 1px solid var(--ink);
}

[data-theme='syllabus'] .pager a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding-block: 1.1rem;
  text-decoration: none;
}

[data-theme='syllabus'] .pager .older {
  align-items: flex-end;
  text-align: right;
}

[data-theme='syllabus'] .pager .t {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

/* The article preview on the Manage page shows a story in a box 46rem wide at most. Its sizes stop
   growing where a window that wide would put them, however wide the real window is. */
[data-theme='syllabus'] .m-preview .story-head {
  padding-block: 1.4rem 1.5rem;
}

[data-theme='syllabus'] .m-preview .story-head h1 {
  font-size: clamp(2rem, 5vw, 2.3rem);
}

[data-theme='syllabus'] .m-preview .story-head .dek {
  font-size: 1.1rem;
}

[data-theme='syllabus'] .m-preview .story-layout {
  padding-bottom: 2rem;
}

[data-theme='syllabus'] .m-preview .story-text {
  font-size: 1.06rem;
}

[data-theme='syllabus'] .m-preview .story-text p.kicker {
  font-size: 1.25rem;
}

/* Tablet and down: the section name moves above its content. */
@media (max-width: 860px) {
  [data-theme='syllabus'] .section > .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.1rem;
  }

  [data-theme='syllabus'] .section-head {
    position: static;
  }
}

/* Phone */
@media (max-width: 680px) {
  /* The Manage link is still in the footer, so it leaves the crowded bar. */
  [data-theme='syllabus'] .nav .nav-manage,
  [data-theme='syllabus'] .nav .n {
    display: none;
  }

  [data-theme='syllabus'] .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  [data-theme='syllabus'] .voices {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-theme='syllabus'] .voice:nth-child(2) {
    padding-top: 1.1rem;
    border-top: 1px solid var(--line);
  }

  [data-theme='syllabus'] .about {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-theme='syllabus'] .portrait {
    max-width: 9rem;
  }

  [data-theme='syllabus'] .facts {
    grid-column: 1;
    grid-template-columns: minmax(0, 1fr);
  }

  [data-theme='syllabus'] .story-facts {
    gap: 0 1.5rem;
  }

  [data-theme='syllabus'] .story-text p.says::before {
    left: -0.75rem;
  }

  [data-theme='syllabus'] .pager {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-theme='syllabus'] .pager .older {
    border-top: 1px solid var(--line);
  }
}

@media (forced-colors: active) {
  [data-theme='syllabus'] .filters button {
    border: 1px solid ButtonText;
  }
}
