@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500;600;700;800&family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600;8..60,700&display=swap");

:root {
  --paper: #ffffff;
  --ink: #1f232b;
  --muted: #464d59;
  --rule: #d8d1c4;
  --rule-strong: #c8bfaf;
  --heading-rule: #d5dae1;
  --heading-rule-strong: #98a1ad;
  --accent: #2d496e;
  --panel: #f6f2e9;
  --panel-soft: #f9f6ef;
  --toc-panel: #f7f9fc;
  --toc-rule: #d9e1ec;
  --button-eggshell: #f2ecde;
  --button-eggshell-hover: #ece4d1;
  --button-eggshell-current: #e5dbc2;
  --button-border: #c8c1b3;
  --button-border-hover: #b8b09f;
  --branch-line: #a89f91;
  --code-panel-bg: #f3f5f7;
  --code-panel-rule: #d1d7de;
  --code-panel-rule-strong: #c1c8d1;
  --code-panel-ink: #233243;
}

body {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.74;
  font-size: 1.08rem;
}

html {
  scroll-behavior: auto;
}

.quarto-title-block .quarto-title-banner {
  background: #ffffff;
  border-bottom: 1px solid var(--rule);
}

#quarto-header {
  border-bottom: 1px solid #e8e3d8;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

#quarto-header .navbar {
  padding: 0.7rem 0;
  background: transparent !important;
}

#quarto-header .navbar-container {
  max-width: 1240px;
  padding-left: clamp(1.2rem, 2.5vw, 2rem);
  padding-right: clamp(1.2rem, 2.5vw, 2rem);
}

.navbar-nav {
  gap: 0.42rem;
}

.navbar-nav .nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 1rem;
  border: 1px solid #d8d1c4;
  border-radius: 8px;
  background: #ffffff;
  color: #2d496e;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(31, 35, 43, 0.04);
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  background: #f9f6ef;
  border-color: #c8bfaf;
  color: #2d496e;
  box-shadow: 0 2px 4px rgba(31, 35, 43, 0.08);
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link[aria-current="page"] {
  background: #f6f2e9;
  border-color: #a89f91;
  color: #1f232b;
  box-shadow: 0 1px 2px rgba(31, 35, 43, 0.04);
}

.navbar-toggler {
  border: 1px solid var(--button-border);
  border-radius: 6px;
  background: var(--button-eggshell);
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.18rem rgba(45, 73, 110, 0.12);
}

#quarto-header .navbar-toggler-icon {
  filter: invert(32%) sepia(17%) saturate(741%) hue-rotate(180deg) brightness(91%) contrast(88%);
}

h1,
h2,
h3 {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  letter-spacing: 0.002em;
}

.essay-toc,
.series-nav,
.part-pager,
.artifact-summary-caption,
figure figcaption,
.quarto-title-block .quarto-title-meta {
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
}

#quarto-content {
  max-width: 1240px;
  margin: 0 auto;
}

#quarto-content main.content {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  min-width: 0;
}

body.essay-page #quarto-content main.content {
  max-width: 780px;
}

body.reading-page #quarto-content main.content {
  max-width: 860px;
}

body.artifact-page #quarto-content main.content {
  max-width: 1120px;
}

body.contact-page #quarto-content main.content {
  max-width: 700px;
}

body.contact-page .contact-lead {
  margin-bottom: 1rem;
}

body.contact-page .contact-animation {
  display: block;
  width: 100%;
  margin: 1rem 0 1.35rem;
}

body.contact-page .contact-animation p {
  margin: 0;
}

body.contact-page .contact-animation img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

p,
li,
td {
  color: var(--muted);
}

main.content p {
  text-align: left;
  text-wrap: pretty;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.26;
}

h1 {
  margin-top: 0.4rem;
  margin-bottom: 0.95rem;
  font-size: 2.1rem;
}

.quarto-title-block .quarto-title .title {
  font-size: 2.75rem;
  line-height: 1.16;
  font-weight: 600;
  margin-bottom: 0.18rem;
}

.quarto-title-block .quarto-title {
  text-align: center;
}

.quarto-title-block .quarto-title .subtitle {
  display: block;
  width: fit-content;
  margin: 0.24rem auto 0;
  max-width: min(56ch, 100%);
  text-align: center;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 1.2rem;
  line-height: 1.34;
  font-weight: 600;
  letter-spacing: 0.008em;
  color: #4c566d;
}

.quarto-title-block .quarto-title-meta {
  margin-top: 1rem;
}

.quarto-title-block .quarto-title-meta-heading {
  color: #6d7380;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.76rem;
  font-weight: 700;
}

.quarto-title-block .quarto-title-meta-contents .date {
  margin-top: 0.2rem;
  color: #2d3442;
  font-size: 1.02rem;
  font-weight: 500;
}

h2 {
  margin-top: 2rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--heading-rule-strong);
  font-size: 1.55rem;
}

h3 {
  font-size: 1.25rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.13em;
  text-decoration-color: color-mix(in srgb, var(--accent) 48%, transparent);
}

a:hover {
  text-decoration-thickness: 0.1em;
  text-decoration-color: color-mix(in srgb, var(--accent) 72%, transparent);
}

.hero {
  margin: 1.25rem 0 1.9rem;
  padding: 1.1rem 1.25rem;
  border-left: 4px solid #b8b09f;
  background: var(--panel-soft);
}

.academic-remark {
  margin: 1.15rem 0 1.35rem;
  padding: 0.85rem 1rem 0.9rem;
  border: 1px solid #1f232b;
  background: #ffffff;
}

.academic-remark p {
  margin-bottom: 0;
}

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

.page-columns .column-page-right,
#TOC {
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
}

#TOC {
  border-top: 1px solid var(--rule);
  padding-top: 0.45rem;
}

#TOC #toc-title {
  margin-bottom: 0.32rem;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #303947;
}

#TOC ul {
  margin: 0;
  padding-left: 0;
}

#TOC ul li {
  margin: 0;
}

#TOC .nav-link {
  color: #505b6c;
  font-size: 0.98rem;
  line-height: 1.32;
  padding: 0.22rem 0.18rem 0.22rem 0.56rem;
  margin: 0.02rem 0;
  border-left: 2px solid transparent;
  text-decoration: none;
}

#TOC .nav-link:hover {
  color: #3e4c63;
  text-decoration: none;
}

#TOC .nav-link.active {
  color: #2f3f5a;
  font-weight: 600;
  border-left-color: #8da0bc;
}

#TOC ul ul .nav-link {
  font-size: 0.94rem;
  padding-left: 0.9rem;
}

.site-video {
  margin: 0 0 1.75rem;
}

.site-video-player {
  display: block;
  width: 100%;
  background: #000;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(26, 33, 48, 0.12);
}

.benchmark-link-group {
  margin-top: 1.4rem;
}

.benchmark-link-item {
  margin: 0 0 1rem;
  padding: 0.2rem 0 0.9rem;
  border-bottom: 1px solid var(--rule);
}

.benchmark-link-title,
.benchmark-link-row {
  margin: 0;
}

.benchmark-link-summary,
.benchmark-link-facts {
  margin: 0;
}

.benchmark-link-title {
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 1rem;
}

.benchmark-link-meta {
  color: #596273;
  font-weight: 400;
}

.benchmark-link-row {
  margin-top: 0.22rem;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 0.95rem;
  line-height: 1.55;
}

.benchmark-link-summary {
  margin-top: 0.18rem;
  color: #4a586d;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 0.96rem;
  line-height: 1.5;
}

.benchmark-link-facts {
  margin-top: 0.42rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.benchmark-link-chip {
  display: inline-block;
  padding: 0.16rem 0.52rem;
  border: 1px solid #d7cfbf;
  border-radius: 6px;
  background: #f8f4ea;
  color: #47556c;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 0.84rem;
  line-height: 1.35;
}

.benchmark-link-label {
  color: #425064;
  font-weight: 600;
}

.benchmark-link-details {
  margin-top: 0.5rem;
}

.benchmark-link-details summary {
  cursor: pointer;
  color: #344863;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 0.94rem;
  font-weight: 600;
}

.benchmark-link-details summary:hover {
  color: #243853;
}

.benchmark-link-details[open] {
  padding-top: 0.1rem;
}

.knowledge-diff-details {
  margin: 0.6rem 0 1.3rem;
}

.knowledge-diff-details summary {
  cursor: pointer;
  color: #344863;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 0.94rem;
  font-weight: 600;
}

.knowledge-diff-details summary:hover {
  color: #243853;
}

.knowledge-diff {
  margin: 0.75rem 0 0;
  padding: 0.95rem 1.05rem;
  border: 1px solid #3f3f46;
  border-radius: 12px;
  background: #111111;
  overflow-x: auto;
  color: #f0f0f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre;
}

.knowledge-diff code {
  display: block;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

.knowledge-diff-line {
  display: block;
}

.knowledge-diff-line.file {
  color: #9cdcfe;
  font-weight: 600;
}

.knowledge-diff-line.hunk {
  background: #04395e;
  color: #d7ecff;
}

.knowledge-diff-line.add {
  background: #12311c;
  color: #b5cea8;
}

.knowledge-diff-line.del {
  background: #4b1818;
  color: #f48771;
}

.branch-nav-tree {
  margin: 0 0 1.4rem;
}

.essay-toc {
  margin: 1.1rem 0 1.8rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--toc-rule);
  background: var(--toc-panel);
  border-radius: 4px;
}

.essay-toc-header {
  display: grid;
  gap: 0.24rem;
  margin-bottom: 0.8rem;
}

.essay-toc-kicker {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5e6875;
}

.essay-toc-summary {
  margin: 0;
  color: #4f5b6c;
  font-size: 0.97rem;
  line-height: 1.55;
}

.essay-toc-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.32rem;
}

.essay-toc-top-level {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.32rem;
}

.essay-toc-top-level li {
  margin: 0;
  min-width: 0;
  max-width: 100%;
}

.essay-toc-top-level a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.48rem 0.72rem;
  border: 1px solid #d5dde9;
  border-radius: 3px;
  background: #fcfdff;
  color: #294265;
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  white-space: normal;
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.essay-toc-top-level a::before {
  content: attr(data-number);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5em;
  height: 1.5em;
  border-radius: 2px;
  background: #e8eef7;
  color: #3a5171;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1;
}

.essay-toc-top-level a:hover {
  background: #f4f8fc;
  border-color: #c4d2e2;
  color: #1e3a5f;
  box-shadow: 0 1px 3px rgba(41, 66, 101, 0.08);
}

.essay-toc-top-level a:hover::before {
  background: #d9e3f3;
}

.essay-outline-details {
  margin-top: 0.78rem;
  padding-top: 0.72rem;
  border-top: 1px solid var(--toc-rule);
}

.essay-outline-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.91rem;
  font-weight: 600;
}

.essay-outline-details summary:hover {
  color: var(--ink);
}

.essay-outline-list {
  margin: 0.72rem 0 0;
  padding-left: 1.1rem;
}

.essay-outline-list li {
  margin: 0 0 0.3rem;
}

.essay-outline-list a {
  overflow-wrap: anywhere;
}

.toc-jump-widget {
  position: fixed;
  right: clamp(0.8rem, 2vw, 1.6rem);
  bottom: clamp(0.8rem, 2vh, 1.4rem);
  z-index: 1100;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
}

.toc-jump-widget.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toc-jump-toggle {
  border: 1px solid var(--button-border);
  background: var(--button-eggshell);
  color: #22314e;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 6px;
  padding: 0.42rem 0.9rem;
  line-height: 1.2;
  box-shadow: 0 6px 20px rgba(26, 33, 48, 0.12);
}

.toc-jump-toggle:hover {
  background: var(--button-eggshell-hover);
  border-color: var(--button-border-hover);
}

.toc-jump-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.55rem);
  width: min(320px, calc(100vw - 1.4rem));
  max-height: min(68vh, 540px);
  overflow-y: auto;
  border: 1px solid var(--toc-rule);
  border-radius: 4px;
  padding: 0.72rem 0.78rem 0.66rem;
  background: var(--toc-panel);
  box-shadow: 0 14px 30px rgba(31, 35, 43, 0.18);
}

.toc-jump-title {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #5e6875;
  font-weight: 700;
}

#toc-jump-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

#toc-jump-list li {
  margin: 0 0 0.32rem;
}

#toc-jump-list a {
  display: block;
  min-width: 0;
  text-decoration: none;
  color: #294265;
  border-radius: 3px;
  padding: 0.2rem 0.34rem;
  line-height: 1.34;
  font-size: 0.93rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

#toc-jump-list a:hover {
  background: #eaf0f8;
  color: #1e3a5f;
}

.toc-jump-back-link {
  display: inline-block;
  margin-top: 0.56rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--toc-rule);
  font-size: 0.8rem;
  color: #3a4760;
  text-decoration: none;
}

.toc-jump-back-link:hover {
  color: #22314e;
  text-decoration: underline;
}

.series-nav {
  margin: 0.15rem 0 1.4rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  font-size: 0.92rem;
}

.series-nav a {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--button-border);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  color: #22314e;
  background: var(--button-eggshell);
  transition: background-color 140ms ease, border-color 140ms ease;
}

.series-nav a:hover {
  background: var(--button-eggshell-hover);
  border-color: var(--button-border-hover);
  text-decoration: none;
}

.series-nav a.current {
  background: var(--button-eggshell-current);
  border-color: var(--branch-line);
}

.branch-nav-tree .series-nav.branch-child-nav {
  margin: 0;
  padding: 0.78rem 0.92rem;
  border: 1px solid var(--rule);
  background: var(--panel-soft);
  border-radius: 10px;
  display: block;
}

.branch-nav-tree .branch-child-label {
  display: block;
  margin: 0 0 0.4rem;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #687487;
}

.branch-nav-tree .branch-child-links {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.artifact-nav-tree .series-nav.branch-child-nav {
  padding: 0.72rem 0.82rem;
}

.artifact-nav-tree .branch-child-links {
  gap: 0.48rem;
  flex-wrap: nowrap;
}

.artifact-nav-tree .branch-child-links a {
  padding: 0.26rem 0.66rem;
  font-size: 0.88rem;
  white-space: nowrap;
}

body.artifact-page .branch-nav-tree {
  width: fit-content;
  max-width: calc(100vw - 1.6rem);
  margin-left: 50%;
  transform: translateX(-50%);
  box-sizing: border-box;
}

.part-section-map {
  margin: 0.78rem 0 1.02rem;
  padding: 0.66rem 0.78rem;
  border: 1px solid var(--toc-rule);
  background: #f8fafc;
  border-radius: 10px;
}

.part-section-map-label {
  display: block;
  margin: 0 0 0.36rem;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: #66748b;
}

.part-section-map-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.44rem;
}

code:not(.sourceCode) {
  padding: 0.14rem 0.34rem;
  border-radius: 0.32rem;
  background: #f3eee4;
  color: #2c3b4f;
  font-size: 0.94em;
}

.observation-inline-code {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

div.sourceCode {
  margin: 1.1rem 0;
  border: 1px solid #d9d1c2;
  border-radius: 12px;
  background: #fbf8f2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

body.essay-page pre.text {
  margin: 1.15rem 0;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--code-panel-rule);
  border-radius: 10px;
  background: var(--code-panel-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

body.essay-page pre.text code {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--code-panel-ink);
  font-size: 0.95rem;
  line-height: 1.58;
}

pre.sourceCode {
  padding: 0.95rem 1.05rem;
  background: transparent;
  color: #233243;
  font-size: 0.96rem;
  line-height: 1.55;
}

pre.sourceCode code.sourceCode,
pre.sourceCode code.sourceCode > span,
code.sourceCode > span,
code span {
  color: #233243;
}

code span.kw,
code span.cf,
code span.ot {
  color: #27496b;
  font-weight: 700;
}

code span.fu,
code span.im {
  color: #3f5f8a;
}

code span.st,
code span.ch,
code span.ss,
code span.vs {
  color: #5e6f2a;
}

code span.fl,
code span.dv,
code span.bn,
code span.pp,
code span.dt,
code span.cn {
  color: #9a4f2c;
}

code span.co,
code span.cv,
code span.do,
code span.an,
code span.in,
code span.wa {
  color: #7a7368;
  font-style: italic;
}

code span.op,
code span.sc {
  color: #586475;
}

code span.at {
  color: #6a5d2f;
}

code span.va,
code span.bu,
code span.ex {
  color: #233243;
}

code span.er,
code span.al {
  color: #a33d34;
  font-weight: 600;
}

.part-section-map-links a {
  display: inline-block;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.22;
  text-decoration: none;
  color: #2f4466;
  background: #fdfefe;
  border: 1px solid #ccd7e6;
  border-radius: 8px;
  padding: 0.22rem 0.58rem;
}

.part-section-map-links a:hover {
  background: #f3f7fc;
  border-color: #b9c8dd;
  text-decoration: none;
}

.af-part-body h2 {
  margin-top: 1.9rem;
  padding-top: 0.44rem;
  border-top: 1px solid var(--heading-rule-strong);
  font-size: 1.68rem;
  line-height: 1.25;
  color: #253247;
}

.af-part-body h3 {
  margin-top: 1.5rem;
  padding-top: 0.24rem;
  border-top: 1px solid var(--heading-rule);
  font-size: 1.34rem;
  line-height: 1.28;
  color: #2c3a51;
}

.af-part-body h4 {
  margin-top: 1.14rem;
  font-size: 1.14rem;
  line-height: 1.32;
  color: #33455f;
  font-weight: 700;
}

.part-grid {
  margin: 1rem 0 1.7rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.8rem;
}

.part-card {
  border: 1px solid var(--rule);
  background: var(--panel-soft);
  padding: 0.8rem 0.88rem;
}

.part-card h3 {
  margin: 0.2rem 0 0.42rem;
  font-size: 1.1rem;
  line-height: 1.24;
}

.part-card p {
  margin: 0;
}

.part-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--rule);
  margin: 0 0 0.55rem;
  display: block;
}

.artifact-list {
  margin: 1rem 0 1.7rem;
  display: grid;
  gap: 0.9rem;
}

.artifact-item {
  border: 1px solid var(--rule);
  background: var(--panel-soft);
  padding: 0.15rem 0.88rem 0.72rem;
}

.artifact-item > p {
  margin: 0;
}

.artifact-card-link {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 0.9rem;
  align-items: start;
  cursor: pointer;
  padding: 0.62rem 0;
  text-decoration: none;
  color: inherit;
}

.artifact-summary-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--rule);
  background: #fff;
  display: block;
}

.artifact-summary-text {
  display: block;
  min-width: 0;
  padding-top: 0.1rem;
}

.artifact-summary-title {
  display: block;
  color: var(--ink);
  font-size: 1.14rem;
  font-weight: 700;
  line-height: 1.3;
}

.artifact-summary-caption {
  display: block;
  color: #596274;
  margin-top: 0.34rem;
  line-height: 1.45;
  font-size: 0.93rem;
}

.artifact-card-link:hover {
  text-decoration: none;
}

.observation-summary-panel {
  margin: 0.75rem 0 1.45rem;
  display: grid;
  gap: 0.8rem;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.observation-summary-card {
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: #fcfbf8;
  min-width: 0;
}

.observation-summary-card-label,
.observation-summary-metric-label {
  display: block;
  margin: 0;
  color: #667284;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.observation-summary-card-label > span,
.observation-summary-metric-label > span {
  display: inline-block;
}

.observation-summary-card {
  padding: 0.82rem 0.9rem;
}

.observation-summary-card p {
  margin: 0;
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.observation-summary-card p + p {
  margin-top: 0.3rem;
}

.observation-summary-card code {
  display: inline;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-all;
  max-width: 100%;
}

.observation-sequence-card {
  padding: 0.7rem 0.82rem;
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
}

.observation-sequence-value {
  display: block;
  margin-top: 0.22rem;
  color: #243248;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.observation-shared-inputs,
.observation-comparison-row,
.observation-decision-row {
  display: grid;
  gap: 0.7rem;
  min-width: 0;
}

.observation-shared-inputs {
  grid-template-columns: 1fr;
}

.observation-comparison-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.observation-decision-row {
  grid-template-columns: 1fr;
}

.observation-metric-card {
  padding: 0.72rem 0.82rem;
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
}

.observation-summary-metric-value {
  display: block;
  margin-top: 0.22rem;
  color: #243248;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.35;
}

.observation-centered-card {
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
}

.observation-centered-card .observation-summary-card-label,
.observation-centered-card .observation-summary-metric-label,
.observation-centered-card .observation-sequence-value,
.observation-centered-card .observation-summary-metric-value,
.observation-centered-card p {
  text-align: center;
}

.observation-summary-card > .observation-summary-card-label,
.observation-summary-card > .observation-summary-metric-label,
.observation-summary-card.observation-centered-card > p,
.observation-summary-card.observation-sensor-card > p {
  text-align: center;
}

.observation-centered-card p code {
  display: inline-block;
}

.observation-sensor-card p {
  text-align: center;
}

.observation-sensor-card p code {
  display: inline-block;
}

.observation-summary-explainer {
  margin: -0.05rem 0 0;
  padding: 0.02rem 0.12rem;
  color: #536073;
  font-size: 0.92rem;
  line-height: 1.5;
}

.contact-lead {
  margin: 0.35rem 0 1rem;
  max-width: 760px;
}

.contact-card {
  max-width: 760px;
  border: 1px solid var(--rule);
  background: #fcfbf8;
  border-radius: 8px;
  padding: 0.68rem 0.78rem;
  margin-bottom: 1.5rem;
}

.contact-card-overlay {
  background-image: linear-gradient(rgba(252, 251, 248, 0.92), rgba(252, 251, 248, 0.92)),
                    url('video/exposition/misc_images/ArcelorMittal-Dofasco.webp');
  background-size: cover;
  background-position: center;
}

.contact-card-blur {
  position: relative;
  overflow: hidden;
}

.contact-card-blur::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('video/exposition/misc_images/ArcelorMittal-Dofasco.webp');
  background-size: cover;
  background-position: center;
  filter: blur(8px);
  opacity: 0.3;
  z-index: -1;
}

.contact-card-darken {
  background-image: url('video/exposition/misc_images/ArcelorMittal-Dofasco.webp');
  background-size: cover;
  background-position: center;
  background-blend-mode: lighten;
  background-color: rgba(255, 255, 255, 0.85);
}

.contact-card-darken .contact-card-title,
.contact-card-darken .contact-method-label,
.contact-card-darken .contact-method-value {
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9);
}

.contact-card-gradient {
  background-image: linear-gradient(to right,
                                    rgba(252, 251, 248, 0.98) 0%,
                                    rgba(252, 251, 248, 0.98) 60%,
                                    rgba(252, 251, 248, 0.7) 100%),
                    url('video/exposition/misc_images/ArcelorMittal-Dofasco.webp');
  background-size: cover;
  background-position: right center;
}

.contact-card-title {
  margin: 0 0 0.36rem;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #4a5569;
}

.contact-method-list {
  display: grid;
  gap: 0;
}

.contact-method-list > p {
  margin: 0;
  display: grid;
  gap: 0;
}

.contact-method {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.08rem;
  border: 0;
  border-bottom: 1px solid #e3ddd1;
  background: transparent;
  color: #2f3a4d;
  text-decoration: none;
  transition: color 120ms ease, border-color 120ms ease;
}

.contact-method:hover {
  border-color: #d7cfbf;
  color: #253752;
  text-decoration: none;
}

.contact-method-label {
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  color: #6a7282;
}

.contact-method-value {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #2f3f5a;
}

.contact-method-badge {
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: #737d8e;
  background: transparent;
  border: 0;
  padding: 0;
  letter-spacing: 0;
}

.contact-method-badge::before {
  content: "(";
}

.contact-method-badge::after {
  content: ")";
}

.contact-method-list > p .contact-method:last-child {
  border-bottom: 0;
}

.part-header-image {
  width: 100%;
  max-width: 980px;
  border: 1px solid var(--rule);
  margin: 0.2rem 0 0.4rem;
}

.pdf-embed {
  width: 100%;
  max-width: 960px;
  height: 720px;
  border: 1px solid var(--rule);
}

.interactive-embed {
  width: 100%;
  max-width: 1080px;
  height: 1080px;
  border: 1px solid var(--rule);
  background: #fff;
}

figure {
  margin: 0.45rem 0 1.22rem;
}

figure figcaption {
  color: #596274;
  font-size: 0.92rem;
  line-height: 1.45;
}

figure figcaption a {
  color: #556480;
  text-decoration-thickness: 0.06em;
}

figure figcaption a:hover {
  color: #394d6c;
}

.part-pager {
  margin-top: 1.6rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--rule);
  display: flex;
  gap: 0.8rem;
  justify-content: space-between;
  flex-wrap: wrap;
}

.part-pager a {
  display: inline-block;
  padding: 0.24rem 0.72rem;
  border: 1px solid var(--button-border);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  background: var(--button-eggshell);
  color: #22314e;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.part-pager a:hover {
  background: var(--button-eggshell-hover);
  border-color: var(--button-border-hover);
  text-decoration: none;
}

@media (max-width: 1200px) {
  .branch-nav-tree .series-nav.branch-child-nav {
    padding: 0.72rem;
  }

  .artifact-nav-tree .branch-child-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 991px) {
  .navbar-toggler {
    display: none !important;
  }

  #navbarCollapse,
  .navbar-collapse {
    display: flex !important;
    visibility: visible !important;
    height: auto !important;
  }

  .navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    gap: 0.45rem;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }

  .navbar-nav .nav-link {
    width: auto;
    white-space: nowrap;
    font-size: 0.88rem;
    padding: 0.32rem 0.72rem;
  }
}

@media (max-width: 900px) {
  body {
    font-size: 1.06rem;
  }

  body.essay-page {
    overflow-x: hidden;
  }

  body.artifact-page {
    overflow-x: hidden;
  }

  #quarto-header .navbar-container {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }

  .quarto-title-block .quarto-title .title {
    font-size: 2.35rem;
  }

  body.essay-page .quarto-title-block .quarto-title {
    text-align: left;
  }

  body.essay-page #quarto-document-content,
  body.essay-page .quarto-title-block,
  body.essay-page .quarto-title-block .quarto-title,
  body.essay-page .essay-toc,
  body.essay-page .essay-toc-columns,
  body.essay-page .essay-toc-top-level,
  body.essay-page .essay-outline-details {
    width: min(100%, calc(100vw - 1.6rem));
    max-width: 100%;
    box-sizing: border-box;
  }

  body.essay-page #quarto-content,
  body.essay-page #quarto-document-content,
  body.essay-page main.content {
    overflow-x: hidden;
  }

  body.essay-page .quarto-title-block .quarto-title .title {
    font-size: clamp(1.58rem, 7vw, 2rem);
    max-width: 100%;
    overflow-wrap: anywhere;
    text-wrap: balance;
    line-height: 1.14;
  }

  body.essay-page .quarto-title-block .quarto-title .subtitle {
    width: auto;
    margin-left: 0;
    margin-right: 0;
    font-size: 1.02rem;
    text-align: left;
  }

  body.essay-page .quarto-title-block .quarto-title-meta {
    text-align: left;
  }

  body.artifact-page .quarto-title-block .quarto-title {
    text-align: left;
    min-width: 0;
  }

  body.artifact-page #quarto-document-content,
  body.artifact-page .quarto-title-block,
  body.artifact-page .quarto-title-block .quarto-title,
  body.artifact-page .branch-nav-tree,
  body.artifact-page .branch-nav-tree .series-nav.branch-child-nav,
  body.artifact-page .branch-nav-tree .branch-child-links {
    width: min(100%, calc(100vw - 1.6rem));
    max-width: 100%;
    box-sizing: border-box;
  }

  body.artifact-page .quarto-title-block .quarto-title .title {
    font-size: clamp(1.58rem, 7vw, 2rem);
    max-width: 100%;
    overflow-wrap: anywhere;
    text-wrap: balance;
    line-height: 1.14;
  }

  body.artifact-page .branch-nav-tree .branch-child-links {
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 0;
    gap: 0.34rem;
  }

  body.artifact-page .branch-nav-tree .series-nav.branch-child-nav {
    padding: 0.64rem 0.68rem;
  }

  body.artifact-page .branch-nav-tree .branch-child-label {
    margin-bottom: 0.3rem;
    letter-spacing: 0.1em;
  }

  body.artifact-page .branch-nav-tree .branch-child-links a {
    white-space: normal;
    font-size: 0.82rem;
    line-height: 1.24;
    padding: 0.22rem 0.5rem;
  }

  body.artifact-page #quarto-document-content,
  body.artifact-page main.content,
  body.artifact-page main.content ul,
  body.artifact-page main.content li {
    min-width: 0;
  }

  body.artifact-page main.content li,
  body.artifact-page main.content li a {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  #quarto-content {
    max-width: 100%;
  }

  #quarto-content main.content {
    max-width: 100%;
  }

  .essay-toc {
    padding: 0.92rem 0.88rem;
  }

  body.essay-page .math.display {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
  }

  body.essay-page mjx-container[display="true"] {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
  }

  body.essay-page pre.text,
  body.essay-page pre.text code,
  body.essay-page pre code {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    white-space: pre;
  }

  body.essay-page table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }

  .toc-jump-widget {
    right: 0.62rem;
    bottom: 0.68rem;
  }

  .toc-jump-panel {
    width: min(320px, calc(100vw - 1rem));
    max-height: 62vh;
  }

  .part-grid {
    grid-template-columns: 1fr;
  }

  .artifact-card-link {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .observation-shared-inputs,
  .observation-comparison-row,
  .observation-decision-row {
    grid-template-columns: 1fr;
  }

  .part-section-map-links {
    gap: 0.38rem;
  }

  .part-section-map-links a {
    font-size: 0.84rem;
  }

}

@media (max-width: 720px) {
  .essay-toc-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  body.essay-page .quarto-title-block {
    margin-bottom: 0.7rem;
  }

  body.essay-page .quarto-title-block .quarto-title .title {
    font-size: clamp(1.42rem, 8.2vw, 1.72rem);
  }

  body.artifact-page .quarto-title-block {
    margin-bottom: 0.7rem;
  }

  body.artifact-page .quarto-title-block .quarto-title .title {
    font-size: clamp(1.42rem, 8.2vw, 1.72rem);
  }

  body.artifact-page .branch-nav-tree {
    margin-top: 0.48rem;
  }

  body.artifact-page .branch-nav-tree .branch-child-links {
    gap: 0.28rem;
  }

  body.artifact-page .branch-nav-tree .branch-child-links a {
    font-size: 0.78rem;
    padding: 0.2rem 0.42rem;
  }
}
