/* ======================================================================= */
/* Site theme: dark "night gallery" palette and type                       */
/* Loaded after the grid-side theme and Materialize, so it overrides them. */
/* Fonts are self-hosted, see css/fonts.css.                               */
/* ======================================================================= */

:root {
  color-scheme: dark;

  --bg: #0f1012;          /* page */
  --surface: #17181b;     /* articles, cards */
  --surface-2: #1f2024;   /* raised: hover, menus, placeholders */
  --sidebar: #0a0a0b;
  --line: #2a2b2f;
  --line-strong: #3d3e43;

  --heading: #f4f1ec;
  --text: #dcd8d1;
  --muted: #9a958d;       /* 6.6:1 on --surface */

  --accent: #ff7a3d;      /* ember */
  --link: #ff9a5c;        /* 8:1 on --surface */
  --overlay: rgba(10, 10, 11, 0.62);

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
}

html,
body,
.page-colors {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--heading);
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

a {
  color: var(--link);
}

a:hover {
  color: var(--accent);
}

.flow-text {
  font-weight: 400;
}

p,
.flow-text li {
  line-height: 1.7;
}

strong,
b {
  font-weight: 600;
  color: var(--heading);
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
}

blockquote {
  border-left: 3px solid var(--accent);
  color: var(--heading);
}

code,
kbd,
pre,
samp {
  background-color: var(--surface-2);
  border-radius: 4px;
}

code {
  padding: 0.1em 0.35em;
}

pre {
  padding: 1em;
  overflow-x: auto;
  /* Code and machine paths in prose must not widen the page: a pre sizes to its
     content, so without this a long line pushes <article> past the viewport
     (hit on a phone with the story Keeper and Refusenik, 2026-11-06). */
  max-width: 100%;
  box-sizing: border-box;
}

/* Prose containers wrap long unbroken tokens (paths like
   refusenik@lappy:~/.hermes/memories/MEMORY.md) instead of scrolling the page. */
.flow-text {
  overflow-wrap: anywhere;
}

/* The theme's mobile rule shrinks a title to one line and ellipsizes the rest
   (main.css, max-width 600px: clamp(1.5rem, 8vw, 3rem) + nowrap + ellipsis).
   A title that does not fit at the floor size loses words: "Keeper and
   Refusenik" rendered as "Keeper and Refus…" on a 390px screen. Wrap instead;
   this only changes titles that were being truncated. */
@media only screen and (max-width: 600px) {
  .article-title {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  /* Prose that carries preformatted artifacts (a checklist, a memory file) is
     read on a phone, not compiled: wrap the lines there instead of making the
     reader swipe a 519px line inside a 291px box. Desktop keeps pre. */
  .flow-text pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
}

pre code {
  padding: 0;
}

table.striped > tbody > tr:nth-child(odd) {
  background-color: var(--surface-2);
}

td,
th,
tr {
  border-color: var(--line);
}

/* Where the fiction starts. A writing page that carries an author's note needs
   a visible seam between the note and the story: the page title is above the
   note, so the story gets its own title, a rule and real air around it. */
.story-start {
  margin: 3.5rem 0 2.5rem;
}

.story-start .story-start-title {
  font-family: var(--font-head);
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--heading);
  margin: 0 0 1.5rem;
}

.story-start .story-start-byline {
  color: var(--muted);
  font-size: 0.95rem;
  margin: -0.9rem 0 1.4rem;
}

.story-start hr {
  margin: 0;
}

/* Surfaces */
.article-colors,
.project-container-image,
.page-item-container {
  background-color: var(--surface);
  color: var(--text);
}

.page-item-container {
  border: 1px solid var(--line);
}

.article-shadow,
.z-depth-1 {
  box-shadow: none;
}

.project-container {
  border: 1px solid var(--line);
}

/* Transparent images (e.g. the black Covenant logo) need a light backing */
.project-container-image img,
.article-colors > img.fill-container-width,
.page-item-image {
  background-color: #f4f1ec;
}

.project-container-title {
  background-color: var(--surface);
  color: var(--text);
}

.project-container-title .white-text,
.page-item-title {
  color: var(--heading);
}

.page-item-summary,
.page-item-date,
.date-color,
.separator,
ul.categories li,
ul.tags li,
ul.categories li a,
ul.tags li a {
  color: var(--muted);
}

ul.categories li a:hover,
ul.tags li a:hover {
  color: var(--accent);
}

figcaption {
  color: var(--muted);
}

.meta {
  background-color: var(--surface-2);
}

/* Sidebar */
.main-menu > ul.menu {
  padding-top: 12px;
}

@media only screen and (max-width: 600px) {
  .main-menu > ul.menu {
    padding-top: 6px;
  }
}

.menu-colors,
.row-colors {
  background-color: var(--sidebar);
  color: var(--text);
}

.main-menu a {
  color: var(--text);
  transition: color 0.15s;
}

.main-menu a:hover,
.main-menu a:focus-visible {
  color: var(--accent);
}

@media only screen and (min-width: 601px) {
  .main-menu .fa,
  .main-menu .fa-solid,
  .main-menu .fa-brands {
    font-size: 1.5rem;
  }
}

.main-menu ul.menu ul {
  background-color: var(--surface-2);
}

.main-menu ul.menu ul a {
  font-family: var(--font-head);
}

ul.menu li.active {
  background-color: var(--surface-2);
  box-shadow: inset 2px 0 0 var(--accent);
}

ul.menu li.menu-separator {
  border-top-color: var(--line);
}

.main-menu a[data-tooltip]::after {
  background-color: var(--surface-2);
  color: var(--heading);
  border: 1px solid var(--line-strong);
  font-family: var(--font-body);
}

.main-menu a:focus-visible {
  outline-color: var(--accent);
}

/* Homepage: header card, section cells, footer */
.parallax .valign.center {
  background-color: rgba(10, 10, 11, 0.82) !important; /* inline style */
  border-color: rgba(244, 241, 236, 0.85) !important;  /* inline style */
  backdrop-filter: blur(4px);
}

/* Mobile browsers reserve the address bar out of the visible area, but 100vh
   still measures the viewport as if that bar were hidden. The theme sizes the
   parallax boxes in 100vh, so on a phone the hero was taller than the screen:
   the name card centred in the taller box and read as sitting low, and the
   scroll cue, 3rem above the hero's bottom edge, sat below the visible bottom
   altogether. svh is the height with the bar showing, which is what the reader
   can actually see. dvh would also fit but makes the hero resize as the bar
   slides away. Desktop is unaffected: all three units agree there. */
html:has(.parallax),
.parallax,
.parallax__group:not(.parallax__group--auto-height) {
  height: 100svh;
}

/* Scroll cue at the bottom of the hero. The hero photo is a bright, busy wall of
   index cards, so the cue carries its own dark backing (same translucency as the
   name card): plain white type on that photo disappears. */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 3rem;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.5rem 0.75rem;
  border: 1px solid rgba(244, 241, 236, 0.42);
  background-color: rgba(10, 10, 11, 0.82);
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  color: var(--heading);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.scroll-cue__label {
  font-family: var(--font-head);
  font-size: 0.9rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  line-height: 1;
  color: inherit;
}

.scroll-cue__arrow {
  display: flex;
  animation: scroll-cue-bob 1.8s ease-in-out infinite alternate;
}

.scroll-cue:hover,
.scroll-cue:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

/* The email in the hero card. It takes the card's white, not the site's link
   orange: only the hover underline marks it as a link. */
.hero-email {
  color: inherit;
  text-decoration: none;
}

.hero-email:hover,
.hero-email:focus-visible {
  /* Keep the card's white on hover: the site's `a:hover` rule would otherwise
     turn it orange, which is the one thing to avoid here. */
  color: inherit;
  text-decoration: underline;
}

/* Focus ring has to sit outside the chip's own border to stay visible. */
.scroll-cue:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media only screen and (max-width: 700px) {
  /* Closer to the bottom edge on a phone: the hero is shorter, and the browser's
     own toolbar already sits outside the viewport, so 3rem of margin was wasted
     space. The safe-area inset keeps it clear of a gesture bar or notch. */
  .scroll-cue {
    bottom: calc(2rem + env(safe-area-inset-bottom));
    padding: 0.7rem 1.2rem 0.65rem;
  }
}

@keyframes scroll-cue-bob {
  from { transform: translateY(0); }
  to   { transform: translateY(5px); }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue__arrow { animation: none; }
}

/* Keep the cue clear of the home indicator on phones: the mobile rule above adds
   env(safe-area-inset-bottom) to its own 1.4rem. */

/* Homepage section nav, in place of the old "About Me" heading: the homepage has
   no sidebar, so the sections need somewhere obvious to go. Sentence case and
   the same heading font as the sidebar's items; a hairline between items makes
   it read as a bar at desktop widths, and is dropped once the row wraps. */
.home-nav {
  padding: 0.6rem 1rem 0.7rem;
  border-bottom: 1px solid var(--line);
  /* Materialize gives every <nav> a salmon background, a fixed height and a
     box-shadow; this bar is a strip inside the page, not the site header. */
  background-color: transparent;
  box-shadow: none;
  height: auto;
  line-height: normal;
}

.home-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.15rem 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.9rem;
  font-family: var(--font-head);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s;
}

.home-nav__link:hover,
.home-nav__link:focus-visible {
  color: var(--accent);
}

.home-nav__link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.home-nav__link[aria-current="page"] {
  color: var(--accent);
}

@media only screen and (min-width: 701px) {
  .home-nav__item + .home-nav__item {
    border-left: 1px solid var(--line);
  }
}

@media only screen and (max-width: 700px) {
  .home-nav {
    padding: 0.5rem 0.4rem 0.6rem;
  }

  /* Three fixed columns, so six sections land as 3 + 3 instead of wrapping to
     an orphaned last item. */
  .home-nav__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
  }

  .home-nav__item {
    display: flex;
  }

  .home-nav__link {
    flex: 1;
    justify-content: center;
    padding: 0 0.25rem;
    font-size: 0.85rem;
    text-align: center;
  }
}

/* Email list band, between the project cells and the footer. The input carries
   Materialize's browser-default escape class: without it that framework's
   input[type=email] rules outrank anything set on one class. */
.newsletter {
  border-top: 1px solid var(--line);
  background-color: var(--surface);
  padding: 2.75rem 1.5rem;
  text-align: left;
}

.newsletter__inner {
  max-width: 68rem;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.newsletter__copy {
  flex: 1 1 20rem;
  max-width: 34rem;
}

.newsletter__copy h3 {
  margin: 0 0 0.45rem;
  font-size: 1.3rem;
  color: var(--heading);
}

.newsletter__copy p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

.newsletter__form {
  flex: 1 1 22rem;
  max-width: 26rem;
}

.newsletter__label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.newsletter__row {
  display: flex;
  gap: 0.75rem;
}

.newsletter__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 3rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line-strong);
  background-color: var(--bg);
  color: var(--heading);
  font-family: var(--font-body);
  font-size: 0.95rem;
  border-radius: 0;
}

.newsletter__input::placeholder {
  color: #6f6a63;
}

.newsletter__input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.newsletter__button {
  height: 3rem;
  padding: 0 1.4rem;
  border: 1px solid var(--accent);
  background-color: var(--accent);
  color: #17181b;
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  border-radius: 0;
  transition: background-color 0.15s, border-color 0.15s;
}

.newsletter__button:hover,
.newsletter__button:focus-visible {
  background-color: var(--link);
  border-color: var(--link);
}

.newsletter__button:disabled {
  opacity: 0.55;
  cursor: default;
}

.newsletter__note {
  margin: 0.7rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.newsletter__status {
  min-height: 1.35em;
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  color: var(--heading);
}

.newsletter__status.is-error {
  color: #ff8f7e;
}

/* Hidden from people and from tab order; only bots fill it in. */
.newsletter__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media only screen and (max-width: 700px) {
  .newsletter {
    padding: 2rem 1.25rem;
  }

  .newsletter__inner {
    gap: 1.5rem;
  }

  .newsletter__form {
    max-width: none;
  }
}

@media only screen and (max-width: 420px) {
  .newsletter__row {
    flex-wrap: wrap;
  }

  .newsletter__input,
  .newsletter__button {
    flex: 1 1 100%;
  }
}

/* The compact version of the same form, in the page footer of everything that
   is not the homepage. Same atoms as the band above so the two cannot drift:
   only the wrapper and the type sizes are new. */
.site-signup {
  margin: 2.5rem 0 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  text-align: left;
}

.site-signup__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
  flex-wrap: wrap;
}

.site-signup__copy {
  flex: 1 1 18rem;
  max-width: 32rem;
}

.site-signup__title {
  margin: 0 0 0.35rem;
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--heading);
}

.site-signup__blurb {
  margin: 0 0 0.9rem;
  max-width: 34rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
}

.site-signup__form {
  flex: 1 1 20rem;
  max-width: 26rem;
}

.site-signup__label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-signup .newsletter__note {
  margin-top: 0.55rem;
  font-size: 0.8rem;
}

@media only screen and (max-width: 420px) {
  .site-signup {
    margin-top: 2rem;
  }
}

/* The residency pages sit on cream paper with their own ink, not the dark
   theme's tokens: without this the heading came out near-white on #f7f2e8.
   The footer there already draws its own rule, so the signup drops its
   border and top margin and leans on the footer's. */
body.theme-tpl .tpl-paper .site-signup {
  margin: 0 0 1.6rem;
  padding-top: 0;
  border-top: 0;
  color: var(--doc-ink);
}

body.theme-tpl .tpl-paper .site-signup__title {
  margin: 0 0 0.35rem;
  color: var(--doc-ink);
}

body.theme-tpl .tpl-paper .site-signup__blurb {
  margin: 0 0 0.9rem;
  color: var(--doc-muted);
}

body.theme-tpl .tpl-paper .site-signup__label,
body.theme-tpl .tpl-paper .site-signup .newsletter__note {
  color: var(--doc-muted);
}

body.theme-tpl .tpl-paper .site-signup .newsletter__input {
  background-color: var(--doc-bg);
  border-color: var(--doc-line);
  color: var(--doc-ink);
}

body.theme-tpl .tpl-paper .site-signup .newsletter__input::placeholder {
  color: var(--doc-muted);
}

body.theme-tpl .tpl-paper .site-signup .newsletter__input:focus {
  border-color: var(--doc-link);
  outline-color: var(--doc-link);
}

body.theme-tpl .tpl-paper .site-signup .newsletter__status {
  color: var(--doc-ink);
}

body.theme-tpl .tpl-paper .site-signup .newsletter__status.is-error {
  color: #a03522;
}

.highlight-block {
  background-color: var(--overlay);
}

.highlight-block h3 {
  color: var(--heading);
}

ul.main-page-footer li a:hover {
  color: var(--accent);
}

/* List page pagination and infinite-scroll status */
.pagination li a {
  color: var(--text);
}

.pagination li.disabled a {
  color: var(--line-strong);
}

.pagination li.active {
  background-color: var(--accent);
}

.pagination li.active a {
  color: var(--bg);
}

/* Search overlay */
#searchbox input[type=text] {
  color: var(--heading);
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--font-head);
}

#searchbox input[type=text]:focus {
  border-bottom: 1px solid var(--accent);
  box-shadow: 0 1px 0 0 var(--accent);
}

/* Materialize titles are too large on list pages */
.page-item-title {
  font-size: 1.75rem;
}

/* Materialize figure captions are also gigantic by default */
figcaption h4 {
  font-size: 1rem;
  margin-bottom: 3rem;
}

/* Materialize has no bullets for default lists */
.checklist ul {
  padding-left: 1em;
}

.checklist ul > li:before {
    content: "\f14a"; /* square-check */
    font-family: "Font Awesome 7 Free";
    font-weight: 900;
    margin-right: 1em;
    font-size: 75%;
}

.checklist ul ul > li:before {
    content: "\f105"; /* angle-right */
    font-family: "Font Awesome 7 Free";
    font-weight: 900;
    margin-right: 1em;
}

.bullet-list ul li{
  margin-left: 1.5em;
}

.bullet-list ul li{
  list-style-type: disc;
}

.page-item-container {
  max-width: 500px;
}

.page-item-image {
  max-width: 500px;
  max-height:  400px;
  margin: auto;
  display: block;
}

.meta {
  background-color: rgba(80,80,150,0.07);
  padding: 0.25em 1em;
  margin-top: -7px;
}

.meta dt {
  float: left;
  clear: left;
  width: 8em;
  font-weight: bold;
}


.meta dt:after {
  content: ":";
}

.meta dd {
  padding: 0 0 0.5em 0;
}

figure.left, figure.right {
  margin: 0;
  margin-bottom: 2rem;
}

.left img, img.left, .right img, img.right {
  display: block;
  max-width: 33vw;
  max-height: 50vh;
  margin: auto;
  width: auto;
  height: auto;
}

figure.left {
  float: left;
  clear: left;
  margin-right: 2rem;
}

figure.right {
  float: right;
  clear: right;
  margin-left: 2rem;
}

figcaption {
  font-size: 80%;
  text-align: center;
}

figure.right figcaption, figure.left figcaption {
  max-width: min(33vw, 50vh);
}

@media screen and (max-width: 900px) {
  figure.left, figure.right {
    float: none !important;
    margin: 1em 0;
    max-width: 100%;
  }
  
  .left img, img.left, .right img, img.right {
    max-width: 100%;
  }

  figcaption {
    max-width: min(100%, 50vh);
  }
  
}

figcaption p {
  margin-top: 0.33em;
  padding: 0 0.5em;
}

.clear {
  clear: both !important;
}

.clear-left {
  clear: left;
}

.clear-right {
  clear: right;
}

.clearfix:after { 
  content: "."; 
  visibility: hidden; 
  display: block; 
  height: 0; 
  clear: both;
}

hr {
  clear: both;
}

/* Two-column image grid layout */
.image-grid-two-column {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.image-grid-item {
  flex: 0 1 48%;
  max-width: 48%;
}

.image-grid-item figure {
  margin: 0;
  width: 100%;
  float: none !important; /* Override any float styles */
  clear: none !important; /* Override any clear styles */
}

.image-grid-item img {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100% !important; /* Override the 33vw constraint */
  max-height: none !important; /* Remove height constraints */
}

/* Mobile responsiveness - single column on small screens */
@media screen and (max-width: 768px) {
  .image-grid-item {
    flex: 0 1 100%;
    max-width: 100%;
  }
  
  .image-grid-two-column {
    gap: 10px;
  }
}

/* ======================================================================= */
/* About page (layouts/post/about.html)                                    */
/* ======================================================================= */

.about-page {
  overflow: hidden;
}

.main-content article.about-page header.about-hero {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  /* Full-bleed: cancel the theme's 30px article side padding */
  margin: 0 -30px;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.25rem, 5vw, 3.5rem);
  background: radial-gradient(circle at 20% 50%, #24211f 0%, #0c0c0d 70%);
  color: var(--heading);
}

.about-portrait {
  flex: 0 0 auto;
  display: block;
  width: 280px;
  max-width: 60vw;
}

.about-portrait img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08), 0 12px 40px rgba(0, 0, 0, 0.5);
}

.about-name {
  margin: 0;
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--heading);
}

.about-tagline {
  margin: 0.5rem 0 1.5rem;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 1.15rem;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.about-links a:hover,
.about-links a:focus-visible {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.about-bio {
  max-width: 42rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 4vw, 2rem) 1rem;
}

.about-bio p:first-child {
  font-size: 1.2em;
  line-height: 1.5;
  color: var(--heading);
}

.about-bio a {
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.2s;
}

.about-bio a:hover {
  border-bottom-color: currentColor;
}

.about-featured {
  padding: 1rem clamp(1.25rem, 4vw, 3.5rem) 1.5rem;
}

.about-featured h2 {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.about-featured ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(170px, 42%), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-featured a {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface-2);
  color: #fff;
}

.about-featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.about-featured span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem 0.75rem 0.5rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  font-weight: 500;
}

.about-featured a:hover img,
.about-featured a:focus-visible img {
  transform: scale(1.05);
}

.about-page > footer {
  padding: 0 clamp(1.25rem, 4vw, 3.5rem);
}

@media screen and (max-width: 700px) {
  .main-content article.about-page header.about-hero {
    flex-direction: column;
    text-align: center;
  }

  .about-links {
    justify-content: center;
  }

  .about-bio,
  .about-featured {
    padding-left: 0;
    padding-right: 0;
  }

  .about-featured ul {
    gap: 0.6rem;
  }

  .about-featured span {
    font-size: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-featured img,
  .about-links a {
    transition: none;
  }
}

/* ======================================================================= */
/* TPL residency section (content/residency/)                              */
/*                                                                         */
/* The "lecture" look: a dark stage and a paper document, the two rooms     */
/* the L01 deck and its handout already use. Tokens are the canonical ones  */
/* from animatic's themes/theme-lecture.css; the component order comes from */
/* the panel-page style guide (events/_panel-page/STYLE.md in the residency */
/* program repo, which pins the palette, the type stacks and the one accent */
/* family). Everything is scoped to body.theme-tpl, so no other page on the */
/* site is touched.                                                        */
/*                                                                         */
/* One deliberate reading of the guide: it says brass is for "kicker       */
/* labels" and also that brass text must not appear on the stage below     */
/* 22px. The contrast rule wins, so small stage labels use --stage-muted    */
/* and brass carries the rules, the icons and the >=22px lines.            */
/* ======================================================================= */

body.theme-tpl {
  /* stage: the room, and the hero band at the top of each page */
  --stage-bg: #12100c;
  --stage-ink: #f2ecdf;
  --stage-muted: #a79e8e;
  --stage-accent: #d8a95c;
  /* paper: everything people read */
  --doc-bg: #f7f2e8;
  --doc-ink: #26211a;
  --doc-muted: #6b6153;
  --doc-accent: #8a6a2f;
  --doc-line: #ddd3c2;
  --doc-callout-bg: #efe7d6;
  /* Link text on paper. --doc-accent is the canonical brass and stays for
     rules, icons and large labels, but as text at 16-18px it measures 4.50:1
     on --doc-bg: the AA threshold exactly, a knife edge. Links are the thing
     people have to find, so they get a deeper brass at 5.87:1. The style
     guide's rule ("links and labels at 16px or larger") still holds. */
  --doc-link: #75591f;
  /* One size for every small uppercase label. The theme sets the root font to
     15px, not 16px, and drops to 14px on small screens, so rem alone made these
     shrink to 12px on a phone. The clamp puts a floor under it: 13px on a
     phone, about 13.5px on a desktop. */
  --tpl-label: clamp(13px, 0.9rem, 14px);

  --font-display: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --font-prose: Georgia, "Times New Roman", serif;
  --font-label: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* the theme's own two hooks, so headings and body copy pick up the change */
  --font-head: var(--font-display);
  --font-body: var(--font-prose);

  --tpl-measure: 46rem;
  --tpl-pad: clamp(18px, 4vw, 40px);

  background-color: var(--stage-bg);
  font-size: 18px;
  line-height: 1.62;
}

/* The paper sheet, floating on the stage */
body.theme-tpl .center-space {
  padding-top: clamp(14px, 2.5vw, 36px);
  padding-bottom: clamp(14px, 2.5vw, 36px);
}

body.theme-tpl .article-colors {
  max-width: 70rem;
  margin: 0 auto;
  background-color: var(--doc-bg);
  color: var(--doc-ink);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.6);
}

body.theme-tpl .article-colors > article {
  min-height: auto;
  padding-left: var(--tpl-pad);
  padding-right: var(--tpl-pad);
}

/* ---------------------------------------------------------------- stage */

body.theme-tpl .tpl-stage {
  background-color: var(--stage-bg);
  color: var(--stage-ink);
  margin-left: calc(-1 * var(--tpl-pad));
  margin-right: calc(-1 * var(--tpl-pad));
  padding: clamp(26px, 4.5vw, 52px) var(--tpl-pad);
}

body.theme-tpl .tpl-stage-inner,
body.theme-tpl .tpl-measure {
  max-width: var(--tpl-measure);
  margin: 0 auto;
}

body.theme-tpl .tpl-kicker {
  margin: 0 0 0.7rem;
  font-family: var(--font-label);
  font-size: var(--tpl-label);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--stage-muted);
}

body.theme-tpl .tpl-kicker i {
  color: var(--stage-accent);
  margin-right: 0.4em;
}

body.theme-tpl .tpl-stage .tpl-h1 {
  margin: 0 0 0.9rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid color-mix(in srgb, var(--stage-accent) 75%, transparent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.85rem, 4.6vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--stage-ink);
}

body.theme-tpl .tpl-sub {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.02rem, 1.9vw, 1.2rem);
  color: var(--stage-ink);
}

body.theme-tpl .tpl-standfirst {
  margin: 0;
  max-width: 54ch;
  font-size: 1rem;
  color: var(--stage-muted);
}

body.theme-tpl .tpl-runline {
  margin: 0.9rem 0 0.35rem;
  padding: 0;
  list-style: none;
}

body.theme-tpl .tpl-runline li + li {
  margin-top: 0.2rem;
}

body.theme-tpl .tpl-runline-when {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--stage-ink);
}

body.theme-tpl .tpl-runline-time {
  color: var(--stage-muted);
}

body.theme-tpl .tpl-runline-time::before {
  content: " \00b7  ";
  color: var(--stage-muted);
}

/* The time is one unit: without this, "2:00 pm to 4:00 pm" breaks before the
   last "pm" and orphans it on a line of its own at phone width. Times are short
   enough that holding the whole string cannot overflow. */
body.theme-tpl .tpl-runline-time {
  white-space: nowrap;
}

/* Same orphan guard as the metadata lines below it. */
body.theme-tpl .tpl-runline {
  text-wrap: pretty;
}

/* The band's quiet metadata lines: venue, moderator, presenter, line-up.
   `pretty` keeps a wrapped line from ending on one orphaned word, which is how
   the venue address was leaving "M2N 5N9" alone on a line at phone width. */
body.theme-tpl .tpl-stage-meta {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--stage-muted);
  text-wrap: pretty;
}

/* The panel line-up. Louder than the lines above it because these names are
   what the reader came for, and they used to be the one thing on the slide that
   the rest of the band did not say. Must stay after .tpl-stage-meta: same
   specificity, so source order decides. */
body.theme-tpl .tpl-lineup {
  margin-top: 0.9rem;
  /* clamp, not rem: the root drops to 14px on a phone, which would put the
     names below the body copy. */
  font-size: clamp(15px, 1rem, 17px);
  color: var(--stage-ink);
}

/* Hold each name together across a line break. The theme does not hyphenate, so
   this is what stops "Ronit Novak" becoming "Ronit" at the end of one line and
   "Novak" at the start of the next. Breaks still happen between names. */
body.theme-tpl .tpl-lineup span {
  white-space: nowrap;
}

body.theme-tpl .tpl-stage a {
  color: var(--stage-ink);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--stage-accent) 60%, transparent);
}

body.theme-tpl .tpl-stage a:hover {
  border-bottom-color: var(--stage-accent);
}

/* A real photograph only. Never a slide of text: that is what the band above is
   for, and an image of text is inaccessible and unreadable on a phone. */
body.theme-tpl .tpl-slide {
  margin: 1.7rem 0 0;
}

body.theme-tpl .tpl-slide img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid color-mix(in srgb, var(--stage-accent) 30%, transparent);
  border-radius: 6px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.55);
}

/* Shown only at phone width, where the slide is too small to read. This has to
   sit above the small-view media query: a media query adds no specificity, so
   the later rule would otherwise win and hide the hint on phones. */
body.theme-tpl .tpl-slide-hint {
  display: none;
}

/* ---------------------------------------------------------------- paper */

body.theme-tpl .tpl-paper {
  padding-top: clamp(26px, 4vw, 46px);
  padding-bottom: clamp(22px, 3vw, 38px);
  color: var(--doc-ink);
}

/* Bold text takes the paper's ink. The site-wide strong/b rule uses the dark
   theme's light heading colour, which is invisible on the paper. */
body.theme-tpl .tpl-paper strong,
body.theme-tpl .tpl-paper b {
  color: var(--doc-ink);
}

/* The underline, not the colour alone, carries "this is a link": it survives
   colour-blindness, and brass at body size is not a strong enough signal on
   its own. */
body.theme-tpl .tpl-paper a {
  color: var(--doc-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  text-decoration-color: color-mix(in srgb, var(--doc-link) 45%, transparent);
}

body.theme-tpl .tpl-paper a:hover {
  color: var(--doc-ink);
}

/* In the series list the whole row is the link, so an underline would stripe
   the date and the hook too. */
body.theme-tpl .tpl-paper a.tpl-event-link {
  text-decoration: none;
}

body.theme-tpl .tpl-backlink {
  margin: 0 0 1rem;
  font-family: var(--font-label);
  font-size: 1rem;
  letter-spacing: 0.02em;
}

body.theme-tpl .tpl-backlink a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

body.theme-tpl .tpl-backlink a:hover {
  border-bottom-color: currentColor;
}

/* On an event page the back link sits on the dark stage, above the kicker. */
body.theme-tpl .tpl-stage-backlink {
  margin: 0 0 1.1rem;
  font-size: 0.95rem;
}

body.theme-tpl .tpl-stage-backlink a {
  color: var(--stage-muted);
}

body.theme-tpl .tpl-stage-backlink a:hover {
  color: var(--stage-ink);
}

body.theme-tpl .tpl-page-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.6vw, 2.2rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: var(--doc-ink);
}

body.theme-tpl .tpl-paper h2,
body.theme-tpl .tpl-h2 {
  margin: 2.6rem 0 0.85rem;
  padding-top: 1.1rem;
  border-top: 2px solid var(--doc-line);
  font-family: var(--font-display);
  font-weight: 700;
  /* 1.35rem put this barely above the 17px body copy, so "Panelists" read as a
     caption rather than a heading. 1.5rem clears the body by about 1.25x. */
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--doc-ink);
}

body.theme-tpl .tpl-paper h2:first-child,
body.theme-tpl .tpl-paper h3:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* Event-page sections ("What you can take home", "Session", "Find it at the
   library") each open with their own h2, so the h2:first-child rule above zeroed
   that heading's top margin and the sections ran into each other. Space the
   sections themselves instead, keeping the headings flush to their own list. */
body.theme-tpl .tpl-paper .tpl-reading,
body.theme-tpl .tpl-paper .tpl-materials,
body.theme-tpl .tpl-paper .tpl-runs,
body.theme-tpl .tpl-paper .tpl-links {
  margin-top: 2.6rem;
}

body.theme-tpl .tpl-paper h3 {
  margin: 2rem 0 0.5rem;
  font-family: var(--font-display);
  /* 1.1rem at weight 500 was the same size and weight as the body copy, so a
     subheading read as a plain line. Bigger and bold, with the brass accent
     rule on the left, so every level is visibly a heading. */
  font-weight: 700;
  font-size: 1.28rem;
  line-height: 1.3;
  padding-left: 0.7rem;
  border-left: 3px solid var(--doc-accent, var(--accent));
  color: var(--doc-ink);
}

body.theme-tpl .tpl-paper h4 {
  margin: 1.5rem 0 0.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--doc-ink);
}

body.theme-tpl .tpl-paper p {
  margin: 1em 0;
}

body.theme-tpl .tpl-lede {
  margin: 0 0 1.3rem;
  font-family: var(--font-display);
  font-size: 1.22rem;
  line-height: 1.5;
  color: var(--doc-ink);
}

/* The reading copy, up top (partials/residency/quick-links.html). */
body.theme-tpl .tpl-quick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.75rem;
  margin: 0 0 1.6rem;
  font-family: var(--font-label);
  font-size: 0.95rem;
}

body.theme-tpl .tpl-quick-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.5em 0.95em;
  border: 1px solid var(--doc-line);
  border-radius: 999px;
  background: var(--doc-callout-bg);
  color: var(--doc-ink);
  line-height: 1.2;
  text-decoration: none;
}

body.theme-tpl .tpl-paper .tpl-quick a {
  text-decoration: none;
}

body.theme-tpl .tpl-quick-link i {
  display: inline;
  font-size: 1em;
  line-height: 1;
  color: var(--doc-accent);
}

body.theme-tpl .tpl-quick-link:hover,
body.theme-tpl .tpl-quick-link:focus-visible {
  border-color: var(--doc-accent);
}

body.theme-tpl .tpl-quick-more {
  color: var(--doc-link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

body.theme-tpl .tpl-quick-sep {
  color: var(--doc-muted);
  margin: 0 -0.35rem;
}

body.theme-tpl .tpl-quick-more:hover {
  border-bottom-color: currentColor;
}

body.theme-tpl .tpl-note {
  margin: 0.7em 0;
  font-size: 0.95rem;
  color: var(--doc-muted);
}

body.theme-tpl .tpl-paper ul,
body.theme-tpl .tpl-paper ol {
  margin: 1em 0;
  padding-left: 1.4em;
}

body.theme-tpl .tpl-paper li + li {
  margin-top: 0.3em;
}

body.theme-tpl .tpl-paper blockquote {
  margin: 1.5em 0;
  padding: 0.9em 1.1em;
  border-left: 3px solid var(--doc-accent);
  border-radius: 0 6px 6px 0;
  background-color: var(--doc-callout-bg);
  font-style: italic;
  color: color-mix(in srgb, var(--doc-ink) 82%, var(--doc-muted));
}

body.theme-tpl .tpl-paper blockquote p {
  margin: 0.4em 0;
}

body.theme-tpl .tpl-paper hr {
  margin: 2.4rem 0;
  border: 0;
  border-top: 2px solid var(--doc-line);
}

body.theme-tpl .tpl-paper figure {
  margin: 1.6em 0;
}

body.theme-tpl .tpl-paper figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--doc-muted);
  text-align: left;
}

body.theme-tpl .tpl-paper code,
body.theme-tpl .tpl-paper pre {
  background-color: var(--doc-callout-bg);
  color: var(--doc-ink);
  border-radius: 3px;
}

/* Highlighted blocks (fenced code) carry their own dark background and light
   text inline. The rule above would also paint the inner <code> light with dark
   text, which gave dark-on-dark and, where the two overlapped, patches of light.
   The inner code takes whatever the block says. */
body.theme-tpl .tpl-paper pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
}

body.theme-tpl .tpl-paper pre {
  padding: 0.9em 1.1em;
  font-size: 0.8rem;
  overflow-x: auto;
}

/* Prompts and commands wrap instead of scrolling sideways: on a phone a prompt
   is read before it is pasted. Wrapping is display only, so Copy still copies
   the line as written. A long URL breaks anywhere rather than overflowing. */
body.theme-tpl .tpl-paper pre,
body.theme-tpl .tpl-paper pre code,
body.theme-tpl .tpl-paper pre code span {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* The theme resets list markers; restore them in prose. */
body.theme-tpl .tpl-paper ul:not([class]) {
  list-style: disc;
  padding-left: 1.4em;
}

/* Materialize sets list-style-type: none on the li itself. */
body.theme-tpl .tpl-paper ul:not([class]) > li {
  list-style-type: disc;
}

body.theme-tpl .tpl-paper ol {
  list-style: decimal;
  padding-left: 1.6em;
}

body.theme-tpl .tpl-paper table {
  width: 100%;
  margin: 1.2em 0;
  border-collapse: collapse;
  font-size: 0.98rem;
}

body.theme-tpl .tpl-paper th,
body.theme-tpl .tpl-paper td {
  padding: 0.4em 0.9em;
  text-align: left;
  border-bottom: 1px solid color-mix(in srgb, var(--doc-ink) 18%, transparent);
  color: var(--doc-ink);
}

body.theme-tpl .tpl-paper th {
  font-weight: 700;
}

/* ------------------------------------------------------------- materials */

body.theme-tpl .tpl-paper .tpl-material-list {
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--doc-line);
}

body.theme-tpl .tpl-paper .tpl-material {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--doc-line);
  font-size: 1rem;
}

body.theme-tpl .tpl-paper .tpl-material > i {
  width: 1.15em;
  text-align: center;
  color: var(--doc-accent);
}

body.theme-tpl .tpl-paper .tpl-material.is-pending > i {
  color: var(--doc-muted);
}

body.theme-tpl .tpl-paper .tpl-material-label {
  font-weight: 600;
  color: var(--doc-ink);
  text-decoration: none;
}

/* The underline comes from the paper-link rule; this only sets the colour. */
body.theme-tpl .tpl-paper a.tpl-material-label {
  color: var(--doc-link);
}

body.theme-tpl .tpl-paper .tpl-material.is-pending .tpl-material-label {
  font-weight: 400;
  color: var(--doc-muted);
}

/* "not yet published" is a state, not faint small print. As a bordered pill it
   reads as a deliberate placeholder instead of text someone forgot. Its grey
   is 5.44:1 on paper, which passes AA. */
body.theme-tpl .tpl-paper .tpl-material-note {
  margin-left: auto;
  font-family: var(--font-label);
  font-size: var(--tpl-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--doc-muted);
  white-space: nowrap;
  border: 1px solid var(--doc-line);
  border-radius: 999px;
  padding: 0.2em 0.75em;
  background-color: var(--doc-callout-bg);
}

body.theme-tpl .tpl-paper .tpl-transcript-link {
  margin: 1rem 0 0;
  font-size: 1rem;
}

/* ------------------------------------------------------------------ runs */

body.theme-tpl .tpl-paper .tpl-run-list {
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
}

body.theme-tpl .tpl-paper .tpl-run-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.3rem 1.2rem;
  align-items: baseline;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--doc-line);
}

body.theme-tpl .tpl-paper .tpl-run-item:first-child {
  border-top: 1px solid var(--doc-line);
}

body.theme-tpl .tpl-paper .tpl-run-when {
  grid-column: 1;
  grid-row: 1;
  font-family: var(--font-label);
  font-size: var(--tpl-label);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--doc-muted);
}

body.theme-tpl .tpl-paper .tpl-run-time {
  grid-column: 1;
  grid-row: 2;
  font-size: 1rem;
  color: var(--doc-ink);
}

body.theme-tpl .tpl-paper .tpl-run-go {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

body.theme-tpl .tpl-paper .tpl-run-note {
  grid-column: 1 / -1;
  grid-row: 3;
  font-size: 0.9rem;
  color: var(--doc-muted);
}

/* ----------------------------------------------------------------- links */

body.theme-tpl .tpl-paper .tpl-link-list {
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
}

body.theme-tpl .tpl-paper .tpl-link-list li {
  padding: 0.45rem 0;
  font-size: 1rem;
}

/* ------------------------------------------------------------ panelists */

body.theme-tpl .tpl-paper .tpl-panelists {
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
}

body.theme-tpl .tpl-paper .tpl-panelist {
  padding-bottom: 1.1rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--doc-line);
}

body.theme-tpl .tpl-paper .tpl-panelist:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

body.theme-tpl .tpl-paper .tpl-panelist-name {
  margin: 0 0 0.2rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--doc-ink);
}

body.theme-tpl .tpl-paper .tpl-panelist-role {
  margin: 0;
  font-family: var(--font-label);
  font-size: var(--tpl-label);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--doc-muted);
}

body.theme-tpl .tpl-paper .tpl-panelist-link {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
}

/* No font-size: the bio is prose and takes the body size, so the name above it
   is the only thing that reads as a heading. */
body.theme-tpl .tpl-paper .tpl-panelist-bio {
  margin: 0.55rem 0 0;
}

/* ------------------------------------------- series: the event listings */

body.theme-tpl .tpl-paper .tpl-group {
  margin-top: 3rem;
}

body.theme-tpl .tpl-paper .tpl-group-title {
  margin-top: 0;
}

body.theme-tpl .tpl-paper .tpl-event-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.theme-tpl .tpl-paper .tpl-event-item {
  border-bottom: 1px solid var(--doc-line);
}

body.theme-tpl .tpl-paper .tpl-event-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.18rem 1.2rem;
  align-items: baseline;
  padding: 1rem 0;
  text-decoration: none;
  color: inherit;
}

body.theme-tpl .tpl-paper .tpl-event-name {
  grid-column: 1;
  grid-row: 1;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--doc-ink);
}

body.theme-tpl .tpl-paper .tpl-event-kind {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  font-family: var(--font-label);
  font-size: var(--tpl-label);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--doc-muted);
  white-space: nowrap;
}

body.theme-tpl .tpl-paper .tpl-event-kind i {
  color: var(--doc-accent);
  margin-right: 0.35em;
}

body.theme-tpl .tpl-paper .tpl-event-when {
  grid-column: 1;
  grid-row: 2;
  font-family: var(--font-label);
  font-size: var(--tpl-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--doc-muted);
}

body.theme-tpl .tpl-paper .tpl-event-hook {
  grid-column: 1 / -1;
  grid-row: 3;
  margin-top: 0.25rem;
  color: var(--doc-ink);
}

body.theme-tpl .tpl-paper .tpl-event-link:hover .tpl-event-name,
body.theme-tpl .tpl-paper .tpl-event-link:focus-visible .tpl-event-name {
  color: var(--doc-accent);
}

body.theme-tpl .tpl-paper .tpl-event-link:hover .tpl-event-hook,
body.theme-tpl .tpl-paper .tpl-event-link:focus-visible .tpl-event-hook {
  color: var(--doc-muted);
}

/* ---------------------------------------------------------------- footer */

body.theme-tpl .tpl-paper .tpl-foot {
  margin-top: 3rem;
  padding-top: 1.1rem;
  border-top: 2px solid var(--doc-line);
  font-size: 0.9rem;
  color: var(--doc-muted);
}

body.theme-tpl .tpl-paper .tpl-foot p {
  margin: 0.35em 0;
}

/* ----------------------------------------------------------- small view */

@media screen and (max-width: 700px) {
  body.theme-tpl {
    font-size: 17px;
  }

  body.theme-tpl .tpl-paper .tpl-run-item {
    grid-template-columns: minmax(0, 1fr);
  }

  body.theme-tpl .tpl-paper .tpl-run-go {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }

  body.theme-tpl .tpl-paper .tpl-event-kind {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
  }

  body.theme-tpl .tpl-paper .tpl-event-hook {
    grid-row: 4;
  }

  body.theme-tpl .tpl-paper .tpl-material {
    flex-wrap: wrap;
  }

  /* Keep the state visible on a phone; just drop it under the label. */
  body.theme-tpl .tpl-paper .tpl-material-note {
    margin-left: calc(1.1em + 0.7rem);
    margin-top: 0.35rem;
  }

  /* Thumb targets. A link inside a sentence is fine at its natural size, but a
     link that stands on its own line should be big enough to hit without
     aiming: 0.8rem of padding either side puts these at about 44px. */
  body.theme-tpl .tpl-paper .tpl-link-list a,
  body.theme-tpl .tpl-paper .tpl-foot a,
  body.theme-tpl .tpl-paper .tpl-panelist-link a,
  body.theme-tpl .tpl-paper a.tpl-material-label {
    display: inline-block;
    padding: 0.8rem 0;
  }

  body.theme-tpl .tpl-paper .tpl-link-list li {
    padding: 0;
  }

  /* The root font drops to 14px here, so these need their own bump to stay
     clearly above the 17px body copy. */
  body.theme-tpl .tpl-paper .tpl-panelist-name {
    font-size: 1.45rem;
  }

  body.theme-tpl .tpl-paper .tpl-event-name {
    font-size: 1.4rem;
  }

  /* The slide is legible on a desktop but not on a phone, so the phone gets a
     hint that it can be opened. The theme centres figcaptions by default, which
     would set this askew from the left-aligned slide above it. */
  body.theme-tpl .tpl-slide-hint {
    display: block;
    margin: 0.5rem 0 0;
    text-align: start;
    font-family: var(--font-label);
    font-size: var(--tpl-label);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--stage-muted);
  }
}

/* The slide link wraps a picture, so it takes no text underline. */
body.theme-tpl .tpl-stage .tpl-slide a {
  display: block;
  border-bottom: 0;
}

/* Long headings were breaking as "The Future of / Thinking". `balance` evens
   the lines, `pretty` stops a paragraph ending on one orphaned word. Browsers
   that do not support either simply ignore them. */
body.theme-tpl .tpl-h1,
body.theme-tpl .tpl-page-title,
body.theme-tpl .tpl-sub,
body.theme-tpl .tpl-paper h2,
body.theme-tpl .tpl-paper h3,
body.theme-tpl .tpl-event-name,
body.theme-tpl .tpl-panelist-name {
  text-wrap: balance;
}

body.theme-tpl .tpl-paper p,
body.theme-tpl .tpl-paper li {
  text-wrap: pretty;
}

/* §4: the second half of a title is italic and brass ("AI & Young People:
   *The Future of Thinking*"). Set `title_accent` to the substring of `title`
   that should be set this way. */
body.theme-tpl .tpl-h1-accent {
  font-style: italic;
  font-weight: 400;
  color: var(--stage-accent);
}

/* §5.1: under the hero comes the date, the venue, then the moderator line. */
body.theme-tpl .tpl-moderator {
  color: var(--stage-muted);
}

/* §5.5: Keep reading. Grouped, and every item says why it is worth the time. */
body.theme-tpl .tpl-paper .tpl-reading-list {
  list-style: none;
  margin: 0.8rem 0 0;
  padding: 0;
  border-top: 1px solid var(--doc-line);
}

body.theme-tpl .tpl-paper .tpl-reading-item {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--doc-line);
}

body.theme-tpl .tpl-paper .tpl-reading-label {
  font-weight: 600;
}

body.theme-tpl .tpl-paper .tpl-reading-source {
  margin-left: 0.6em;
  font-family: var(--font-label);
  font-size: var(--tpl-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--doc-muted);
}

body.theme-tpl .tpl-paper .tpl-reading-why {
  margin: 0.25em 0 0;
  color: var(--doc-ink);
}

/* ----------------------------------------------------------------- print */

@media print {
  body.theme-tpl {
    background: #fff;
    font-size: 12pt;
  }

  body.theme-tpl .main-menu,
  body.theme-tpl .tpl-slide {
    display: none;
  }

  body.theme-tpl .main-content {
    padding-left: 0;
  }

  body.theme-tpl .center-space {
    padding: 0;
  }

  body.theme-tpl .article-colors {
    max-width: none;
    border-radius: 0;
    box-shadow: none;
  }

  body.theme-tpl .tpl-stage {
    background: #fff;
    color: var(--doc-ink);
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
  }

  body.theme-tpl .tpl-stage .tpl-h1,
  body.theme-tpl .tpl-sub,
  body.theme-tpl .tpl-standfirst,
  body.theme-tpl .tpl-runline-when,
  body.theme-tpl .tpl-stage-meta {
    color: var(--doc-ink);
  }

  body.theme-tpl .tpl-paper {
    padding-top: 1rem;
  }

  body.theme-tpl .tpl-paper h2,
  body.theme-tpl .tpl-group,
  body.theme-tpl .tpl-event-item,
  body.theme-tpl .tpl-material,
  body.theme-tpl .tpl-panelist {
    break-inside: avoid;
  }
}


/* S02 hackathon: the day-of block (shortcode s02-key). Only on the page while static/s02/keys.json exists.
   Same two rooms as the rest of the residency: the stage for the moment of action, paper for reading. */
body.theme-tpl .s02-preview {
  border: 1px solid var(--doc-accent);
  border-left-width: 4px;
  border-radius: 6px;
  padding: 10px 14px;
  margin: 0 0 1.25rem;
  font: 15px/1.5 var(--font-label);
}
body.theme-tpl .s02-preview p { margin: 0; }
body.theme-tpl .s02-preview code {
  font: 700 16px ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
  background: var(--doc-callout-bg);
  color: var(--doc-ink);
  padding: 1px 6px;
  border-radius: 4px;
}
body.theme-tpl .s02-key {
  background: var(--stage-bg);
  color: var(--stage-ink);
  border-radius: 12px;
  padding: clamp(20px, 4vw, 40px);
  margin: 0 0 1.5rem;
  scroll-margin-top: 16px;
}
body.theme-tpl .s02-kicker {
  font: 600 var(--tpl-label) var(--font-label);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--doc-accent);
  margin: 0 0 6px;
}
body.theme-tpl .s02-key .s02-kicker { color: var(--stage-accent); }
body.theme-tpl .tpl-paper .s02-key h2 {
  color: var(--stage-ink);
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  line-height: 1.15;
  margin: 0 0 10px;
  border: 0;
  padding: 0;
}
body.theme-tpl .s02-lede { font-size: 1.1rem; margin: 0 0 20px; color: var(--stage-ink); }
body.theme-tpl .s02-key label {
  display: block;
  color: var(--stage-muted);
  font: 600 var(--tpl-label) var(--font-label);
  margin-bottom: 6px;
}
body.theme-tpl .s02-row { display: flex; flex-wrap: wrap; gap: 10px; }
body.theme-tpl .s02-key input[type=text] {
  flex: 1 1 14rem;
  width: auto;
  height: 60px;
  margin: 0;
  padding: 0 16px;
  box-sizing: border-box;
  background: var(--doc-bg);
  color: var(--doc-ink);
  border: 2px solid transparent;
  border-radius: 8px;
  font: 700 26px/1 ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: 0.16em;
}
body.theme-tpl .s02-key input[type=text]:focus {
  border: 2px solid var(--stage-accent);
  box-shadow: 0 0 0 3px rgba(216, 169, 92, 0.35);
}
body.theme-tpl .s02-key button[type=submit] {
  flex: 0 1 auto;
  min-height: 60px;
  padding: 0 30px;
  font: 700 18px var(--font-label);
  color: var(--stage-bg);
  background: var(--stage-accent);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
body.theme-tpl .s02-key button[type=submit]:disabled { opacity: 0.6; cursor: wait; }
body.theme-tpl .s02-message { min-height: 1.5em; margin: 10px 0; font: 600 16px/1.5 var(--font-label); color: var(--stage-ink); }
body.theme-tpl .s02-small { font: 15px/1.55 var(--font-label); color: var(--doc-muted); }
body.theme-tpl .s02-key .s02-small { color: var(--stage-muted); margin: 0; }
body.theme-tpl .s02-result:focus { outline: none; }
body.theme-tpl .s02-result { scroll-margin-top: 16px; }
body.theme-tpl .s02-unlocked {
  background: var(--doc-callout-bg);
  border: 1px solid var(--doc-line);
  border-left: 4px solid var(--doc-accent);
  border-radius: 10px;
  padding: clamp(16px, 3vw, 28px);
  margin: 0 0 1.5rem;
}
body.theme-tpl .tpl-paper .s02-unlocked h2 { margin: 0 0 12px; }
body.theme-tpl .s02-unlocked .s02-small { margin: 0; }
body.theme-tpl .s02-block { margin: 10px 0 14px; }
body.theme-tpl .s02-block pre {
  background: var(--stage-bg);
  color: var(--stage-ink);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 0 0 8px;
  overflow-x: auto;
  white-space: pre;
  font: 14px/1.6 ui-monospace, Menlo, Consolas, monospace;
}
body.theme-tpl .s02-result button { cursor: pointer; font-family: var(--font-label); }
body.theme-tpl .s02-copy,
body.theme-tpl .s02-os button {
  min-height: 44px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--doc-link);
}
body.theme-tpl .s02-copy { background: var(--doc-link); color: #fff; }
body.theme-tpl .tpl-paper .s02-tools h3 { margin: 0 0 12px; }
body.theme-tpl .s02-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
body.theme-tpl .s02-picker button {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  min-height: 84px;
  padding: 12px 14px;
  background: var(--doc-bg);
  color: var(--doc-ink);
  border: 1px solid var(--doc-line);
  border-radius: 8px;
}
body.theme-tpl .s02-picker button strong { font-size: 16px; color: inherit; }
body.theme-tpl .s02-picker button span { font-size: 14px; line-height: 1.35; color: var(--doc-muted); }
body.theme-tpl .s02-picker button:hover { border-color: var(--doc-accent); }
body.theme-tpl .s02-picker button[aria-pressed=true] {
  background: var(--stage-bg);
  border-color: var(--stage-bg);
  color: var(--stage-ink);
}
body.theme-tpl .s02-picker button[aria-pressed=true] span { color: var(--stage-muted); }
body.theme-tpl .s02-pane {
  border: 1px solid var(--doc-line);
  border-radius: 10px;
  padding: clamp(16px, 3vw, 24px);
  margin-bottom: 2rem;
}
body.theme-tpl .tpl-paper .s02-pane h4 { margin: 0 0 12px; }
body.theme-tpl .s02-os { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
body.theme-tpl .s02-os button { background: transparent; color: var(--doc-link); }
body.theme-tpl .s02-os button[aria-pressed=true] { background: var(--doc-link); color: #fff; }
body.theme-tpl ol.s02-steps { margin: 0 0 12px; padding-left: 1.5em; }
body.theme-tpl ol.s02-steps > li { list-style: decimal; margin-bottom: 10px; padding-left: 4px; }
body.theme-tpl .s02-steps code,
body.theme-tpl .s02-small code {
  font: 0.9em ui-monospace, Menlo, Consolas, monospace;
  background: var(--doc-callout-bg);
  color: var(--doc-ink);
  padding: 1px 5px;
  border-radius: 4px;
}
body.theme-tpl .s02-facts { margin: 0 0 2rem; }
body.theme-tpl .s02-facts dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 12px;
  margin: 0 0 12px;
}
body.theme-tpl .s02-facts dl > div {
  background: var(--doc-callout-bg);
  border-radius: 8px;
  padding: 14px 16px;
}
body.theme-tpl .s02-facts dt { font: 700 16px/1.3 var(--font-label); margin-bottom: 4px; color: var(--doc-ink); }
body.theme-tpl .s02-facts dd { margin: 0; font: 15px/1.55 var(--font-label); color: var(--doc-ink); }
body.theme-tpl .s02-day { margin: 0 0 2.5rem; padding-bottom: 2rem; border-bottom: 1px solid var(--doc-line); }
body.theme-tpl .s02-day ol { columns: 2 18rem; column-gap: 2rem; padding-left: 1.5em; margin: 0; }
body.theme-tpl .s02-day ol > li { list-style: decimal; break-inside: avoid; margin-bottom: 8px; padding-left: 4px; }
body.theme-tpl .s02-message:empty { min-height: 0; margin: 14px 0 0; }
body.theme-tpl .tpl-paper .s02-unlocked h2 { border: 0; padding-top: 0; font-size: 1.6rem; }
body.theme-tpl .s02-facts dl { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
body.theme-tpl .s02-facts dl > div:last-child { grid-column: 1 / -1; }
body.theme-tpl .s02-day ol { padding-left: 2em; }
body.theme-tpl .s02-download-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
body.theme-tpl .tpl-paper a.s02-download {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 18px;
  font: 600 15px/1.3 var(--font-label);
  color: #fff;
  background: var(--doc-link);
  border-radius: 6px;
  text-decoration: none;
}
body.theme-tpl .s02-downloads .s02-small { margin: 4px 0; }
body.theme-tpl .s02-downloads .s02-small a + a { margin-left: 0.75em; }
body.theme-tpl .s02-install {
  border: 1px solid var(--doc-line);
  border-radius: 12px;
  padding: clamp(20px, 4vw, 32px);
  margin: 0 0 1.5rem;
  scroll-margin-top: 16px;
}
body.theme-tpl .tpl-paper .s02-install h2,
body.theme-tpl .tpl-paper .s02-tools h3 { border: 0; padding-top: 0; margin: 0 0 10px; }
body.theme-tpl .tpl-paper .s02-tools > p { margin: 0 0 10px; }
body.theme-tpl .tpl-paper .s02-tools h3 { padding-left: 0; border-left: 0; font-size: 1.6rem; }
body.theme-tpl .s02-install .s02-small { margin: 4px 0; }

