:root {
  color-scheme: light;
  --bg: #fafbf9;
  --paper: #ffffff;
  --ink: #222925;
  --muted: #68716c;
  --line: #dbe0da;
  --line-strong: #bec7c0;
  --soft: #eff2ee;
  --accent: #007d77;
  --accent-hover: #006963;
  --charcoal: #302e2a;
  --charcoal-line: #514d46;
  --shell: 1240px;
  --reading: 690px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171717;
  --paper: #1f1f1f;
  --ink: #eceeec;
  --muted: #afb2af;
  --line: #3b3b3b;
  --line-strong: #555555;
  --soft: #292929;
  --accent: #4ebdb3;
  --accent-hover: #72d0c7;
  --charcoal: #292929;
  --charcoal-line: #505050;
}

@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    color-scheme: dark;
    --bg: #171717;
    --paper: #1f1f1f;
    --ink: #eceeec;
    --muted: #afb2af;
    --line: #3b3b3b;
    --line-strong: #555555;
    --soft: #292929;
    --accent: #4ebdb3;
    --accent-hover: #72d0c7;
    --charcoal: #292929;
    --charcoal-line: #505050;
  }
}

* { box-sizing: border-box; }
html { overflow-anchor: none; scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  text-rendering: optimizeLegibility;
}
body::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: .22em; }
a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }
button, input, select { font: inherit; }
button, summary, select { cursor: pointer; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin-top: 0; }
[hidden] { display: none !important; }
.shell { width: min(var(--shell), calc(100% - 72px)); margin-inline: auto; }
.reading-width { width: min(var(--reading), calc(100% - 40px)); margin-inline: auto; }
.skip-link {
  position: fixed;
  z-index: 100;
  left: 18px;
  top: -80px;
  padding: 9px 13px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
}
.skip-link:focus { top: 18px; }

.site-header { position: relative; z-index: 20; border-bottom: 1px solid var(--line); background: var(--paper); }
.header-inner {
  min-height: 102px;
  display: flex;
  align-items: center;
  gap: clamp(25px, 4.6vw, 60px);
}
.identity { margin-right: auto; color: inherit; text-decoration: none; white-space: nowrap; }
.identity:hover { color: inherit; }
.identity strong {
  display: table;
  margin-bottom: 4px;
  padding: 7px 13px 8px;
  background: #007d77;
  color: #fff;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -.5px;
  line-height: 1.15;
}
.identity span { display: block; color: var(--muted); font-size: 12px; line-height: 1.2; }
.site-nav { display: flex; align-items: center; gap: 29px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.site-nav > a, .projects-menu > summary { text-decoration: none; }
.site-nav > a:hover, .projects-menu > summary:hover { color: var(--ink); }
.site-nav .active { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 10px; }
.projects-menu { position: relative; }
.projects-menu summary { display: flex; align-items: center; gap: 6px; list-style: none; }
.projects-menu summary::-webkit-details-marker { display: none; }
.projects-menu[open] summary { color: var(--ink); }
.projects-menu[open] summary span { transform: rotate(180deg); }
.projects-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 18px);
  left: 50%;
  width: 330px;
  padding: 7px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 16px 50px rgb(0 0 0 / .13);
  transform: translateX(-42%);
}
.projects-panel::before {
  position: absolute;
  inset: -19px 0 auto;
  height: 19px;
  content: "";
}
.projects-panel a { display: block; padding: 13px 14px; text-decoration: none; }
.projects-panel a:hover { background: var(--soft); color: var(--ink); }
.projects-panel strong { display: block; margin-bottom: 3px; font-size: 14px; font-weight: 600; }
.projects-panel small { display: block; color: var(--muted); font-size: 12px; line-height: 1.45; white-space: normal; }
.header-search {
  width: 205px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  background: var(--bg);
}
.header-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.search-mark { position: relative; width: 12px; height: 12px; flex: 0 0 auto; border: 1.5px solid var(--muted); border-radius: 50%; }
.search-mark::after { position: absolute; width: 5px; height: 1.5px; right: -4px; bottom: -2px; background: var(--muted); content: ""; transform: rotate(45deg); transform-origin: left center; }
.header-search input { min-width: 0; width: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.header-search input::placeholder { color: var(--muted); opacity: 1; }

.page-intro { display: flex; justify-content: space-between; align-items: center; gap: 35px; padding-block: 31px 25px; border-bottom: 1px solid var(--line); }
.page-intro h1 { margin: 0; font-size: 27px; font-weight: 500; letter-spacing: -.65px; line-height: 1.2; }
.page-intro p { margin: 0; color: var(--muted); font-size: 13px; }
.journal-layout { display: grid; grid-template-columns: minmax(0, 790px) minmax(245px, 1fr); gap: 58px; padding-top: 30px; }
.articles-page { max-width: calc(790px + 72px); padding-block: 30px 54px; }
.article-stream { min-width: 0; }
.disclosure-article { display: flow-root; margin-bottom: 38px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.feature-figure { margin: 0 0 17px; }
.feature-hero {
  position: relative;
  isolation: isolate;
  height: 320px;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #202220;
}
.feature-hero > img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.feature-hero::after { position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, transparent 17%, rgb(6 12 11 / .08) 37%, rgb(6 12 11 / .78) 74%, rgb(6 12 11 / .96)); content: ""; }
.feature-title { width: 100%; padding: 26px 31px; color: #fff; }
.feature-title small, .text-heading small, .note-kind, .section-label {
  color: inherit;
  font: 11px/1.5 Consolas, "SFMono-Regular", ui-monospace, monospace;
  letter-spacing: .09em;
}
.feature-title small { display: flex; align-items: center; gap: 17px; color: #e1e8e5; }
.feature-title small span { padding-left: 17px; border-left: 1px solid rgb(255 255 255 / .38); font-family: "Segoe UI", sans-serif; font-size: 12px; letter-spacing: 0; }
.feature-title h2 { max-width: 610px; margin: 11px 0 0; font-size: clamp(30px, 3.25vw, 38px); font-weight: 500; letter-spacing: -.85px; line-height: 1.14; text-wrap: balance; }
.feature-title h2 a { color: inherit; text-decoration: none; }
.feature-title h2 a:hover { color: #fff; text-decoration: underline; text-decoration-color: rgb(255 255 255 / .55); }
.feature-article[data-treatment^="panel-"] .feature-hero::after { background: linear-gradient(rgb(6 12 11 / .09), rgb(6 12 11 / .2)); }
.feature-article[data-treatment^="panel-"] .feature-title { width: calc(100% - 32px); margin: 16px; padding: 20px 23px; background: rgb(15 19 18 / .94); }
.feature-article[data-treatment="panel-top"] .feature-hero { align-items: start; }
.feature-article[data-treatment="panel-left"] .feature-hero,
.feature-article[data-treatment="panel-right"] .feature-hero { align-items: center; }
.feature-article[data-treatment="panel-left"] .feature-title,
.feature-article[data-treatment="panel-right"] .feature-title { width: 44%; }
.feature-article[data-treatment="panel-right"] .feature-title { justify-self: end; }
.feature-article[data-treatment="panel-left"] .feature-title small,
.feature-article[data-treatment="panel-right"] .feature-title small { display: block; }
.feature-article[data-treatment="panel-left"] .feature-title small span,
.feature-article[data-treatment="panel-right"] .feature-title small span { display: block; padding: 5px 0 0; border: 0; }
.feature-article[data-treatment="panel-left"] .feature-title h2,
.feature-article[data-treatment="panel-right"] .feature-title h2 { font-size: 27px; }
.feature-figure figcaption { padding: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.article-dek p { max-width: 650px; margin-bottom: 11px; font-size: 17px; }
.article-preview, .article-rest { max-width: 650px; font-size: 16px; line-height: 1.8; }
.article-preview p, .article-rest p { margin-bottom: 17px; }
.article-preview p:last-child, .article-rest p:last-child { margin-bottom: 0; }
.article-rest { padding-top: 18px; }
.article-rest h2, .article-rest h3 { margin: 28px 0 10px; font-weight: 600; letter-spacing: -.3px; line-height: 1.25; }
.article-rest h2 { font-size: 23px; }
.article-rest h3 { font-size: 20px; }
.article-rest ul { padding-left: 21px; }
.article-rest li { margin-bottom: 8px; }
.article-rest .callout { margin: 24px 0; padding: 18px 20px; border-left: 2px solid var(--line-strong); background: rgb(255 255 255 / .05); }
.article-rest .source-note { color: inherit; opacity: .8; font-size: 13px; }
.inline-figure { width: 100%; margin: 28px 0; }
.inline-figure img { width: 100%; height: auto; border: 1px solid var(--line); background: var(--soft); }
.inline-figure figcaption { margin-top: 8px; color: var(--muted); font: 12px/1.5 "Segoe UI", Inter, system-ui, sans-serif; }
.inline-figure--compact { width: 72%; }
.inline-figure--left { margin-right: auto; }
.inline-figure--center { margin-inline: auto; }
.inline-figure--right { margin-left: auto; }
.text-article .inline-figure img { border-color: var(--charcoal-line); }
.text-article .inline-figure figcaption { color: #bdb6ac; }
.article-link { font-weight: 600; }
.reading-anchor { height: 0; }
.disclosure-article[data-open="false"] .article-rest { display: none; }
.feature-article[data-open="true"] .feature-hero { height: min(620px, 72vh); }
.disclosure-control { margin-top: 14px; }
.disclosure-control button {
  min-width: 164px;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}
.disclosure-control button:hover { border-color: var(--ink); }
.disclosure-control button span:last-child { font-size: 20px; font-weight: 300; line-height: 1; }
.disclosure-article[data-open="true"] .disclosure-control button { color: var(--muted); }
.repository-article { padding-bottom: 25px; }
.repository-article .feature-hero { height: 430px; }
.repository-control { max-width: 650px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.repository-control > a { display: grid; grid-template-columns: 23px 1fr auto; align-items: center; gap: 13px; padding: 10px 0; text-decoration: none; }
.repository-control svg { width: 23px; height: 23px; fill: currentColor; }
.repository-control strong { display: block; color: var(--ink); font-size: 14px; font-weight: 600; }
.repository-control small { display: block; margin-top: 1px; color: var(--muted); font-size: 12px; }
.repository-control > a > span:last-child { font-size: 17px; }
.repository-control a:hover { color: var(--accent-hover); }
.repository-control a:hover strong { color: inherit; }

.text-article { border-bottom: 0; padding-bottom: 0; }
.text-surface { padding: 32px; border: 1px solid var(--charcoal-line); border-radius: 9px; background: var(--charcoal); color: #f4f0e9; }
.text-heading { display: grid; grid-template-columns: 92px 1fr; gap: 22px; }
.text-heading small { display: block; padding-top: 4px; color: #c9c2b7; letter-spacing: .03em; }
.text-heading small span { display: block; padding-top: 12px; color: #aaa398; font-family: "Segoe UI", sans-serif; font-size: 12px; letter-spacing: 0; }
.text-heading h2 { margin: 0 0 18px; font-size: 29px; font-weight: 500; letter-spacing: -.6px; line-height: 1.25; text-wrap: pretty; }
.text-heading h2 a { color: inherit; text-decoration: none; }
.text-heading h2 a:hover { color: #fff; text-decoration: underline; text-decoration-color: #8f8980; }
.text-copy, .text-article .disclosure-control, .text-article .reading-anchor { margin-left: 114px; }
.text-copy { max-width: 590px; color: #d6cec2; }
.text-copy.article-preview { color: #ece5da; }
.linkedin-copy p { white-space: pre-line; }
.linkedin-copy .article-lead, .article-preview .article-lead { color: #f4f0e9; font-size: 17px; line-height: 1.65; }
.article-source { max-width: 590px; margin: 20px 0 0 114px; font-size: 12px; }
.project-copy .article-source { margin-left: 0; }
.article-source a { color: #bdb6ac; text-decoration-color: #666058; }
.article-source a:hover { color: #fff; }
.text-article .article-rest a { color: #fff; text-decoration-color: #7e786f; }
.text-article .disclosure-control { padding-top: 14px; margin-top: 23px; border-top: 1px solid var(--charcoal-line); }
.text-article .disclosure-control button,
.text-article[data-open="true"] .disclosure-control button { color: #f4f0e9; border-bottom: 0; }

.more-articles { position: sticky; top: 24px; align-self: start; padding-left: 25px; border-left: 1px solid var(--line); }
.more-articles > h2 { margin: 0 0 22px; font-size: 14px; font-weight: 500; }
.more-card { display: flex; flex-direction: column; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); text-decoration: none; }
.more-card img { width: 100%; height: 150px; margin-bottom: 12px; background: var(--soft); object-fit: cover; }
.more-card strong { display: block; margin-bottom: 6px; color: var(--ink); font-size: 16px; font-weight: 500; letter-spacing: -.2px; line-height: 1.35; }
.more-card small { display: block; color: var(--muted); font-size: 13px; line-height: 1.5; }
.more-card:hover strong { color: var(--accent-hover); }
.search-empty { padding: 50px 0 90px; color: var(--muted); }

.about { display: grid; grid-template-columns: minmax(120px, .35fr) minmax(0, 1fr); gap: 45px; padding-block: 70px 82px; border-top: 1px solid var(--line); }
.section-label { margin: 5px 0 0; color: var(--muted); }
.about > div { max-width: 650px; }
.about h2 { margin: 0 0 18px; font-size: clamp(28px, 3.5vw, 42px); font-weight: 500; letter-spacing: -.8px; line-height: 1.2; }
.about p { color: var(--muted); }
.project-list { padding-block: 30px 80px; }
.project-entry { min-height: 260px; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 28px; align-items: start; padding: 34px; margin-bottom: 18px; border: 1px solid var(--line); background: var(--paper); }
.project-entry-featured { background: var(--charcoal); color: #f4f0e9; border-color: var(--charcoal-line); }
.project-number { color: var(--muted); font: 12px/1.4 Consolas, ui-monospace, monospace; }
.project-entry-featured .project-number, .project-entry-featured .section-label, .project-entry-featured .project-copy > p { color: #c2bbb1; }
.project-copy { max-width: 660px; }
.project-copy h2 { margin: 10px 0 12px; font-size: clamp(28px, 4vw, 43px); font-weight: 500; letter-spacing: -.8px; line-height: 1.15; }
.project-copy > p { max-width: 570px; color: var(--muted); }
.project-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 23px; }
.project-tags span { padding: 4px 8px; border: 1px solid var(--line-strong); color: var(--muted); font: 10px/1.4 Consolas, ui-monospace, monospace; letter-spacing: .05em; text-transform: uppercase; }
.project-entry-featured .project-tags span { color: #d6cec2; border-color: #676159; }
.project-action { align-self: end; font-size: 13px; font-weight: 600; white-space: nowrap; }
.about-page { display: grid; grid-template-columns: 150px minmax(0, 1.05fr) minmax(260px, .7fr); gap: clamp(35px, 7vw, 90px); padding-block: 72px 100px; }
.about-page > .section-label { margin-top: 9px; }
.about-lead h2 { max-width: 610px; margin: 0 0 24px; font-size: clamp(38px, 6vw, 70px); font-weight: 500; letter-spacing: -1.8px; line-height: 1.06; }
.about-lead p { max-width: 590px; color: var(--muted); font-size: 18px; }
.about-detail { padding-top: 9px; }
.about-detail p { color: var(--muted); }
.about-links { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 30px; }
.about-links a { font-size: 13px; font-weight: 600; }

.archive-header { padding-block: 58px 35px; border-bottom: 1px solid var(--line); }
.back-link { display: inline-block; margin-bottom: 34px; color: var(--muted); font-size: 13px; text-decoration: none; }
.archive-header h1 { margin: 0 0 12px; font-size: 39px; font-weight: 500; letter-spacing: -1px; }
.archive-header p { max-width: 650px; margin-bottom: 0; color: var(--muted); }
.archive-list { padding-block: 28px 80px; }
.archive-row { display: grid; grid-template-columns: 125px 1fr 36px; gap: 24px; align-items: center; padding: 25px 0; border-bottom: 1px solid var(--line); }
.archive-row time, .note-meta { color: var(--muted); font: 12px/1.5 Consolas, ui-monospace, monospace; }
.archive-row h2 { margin: 5px 0; font-size: 24px; font-weight: 500; letter-spacing: -.5px; }
.archive-row h2 a { text-decoration: none; }
.note-kind { margin-bottom: 0; color: var(--muted); }
.note-excerpt { margin-bottom: 0; color: var(--muted); font-size: 14px; }
.arrow-link { text-decoration: none; }

.note-page { padding-bottom: 80px; }
.note-hero { padding-top: 58px; }
.note-title { max-width: 780px; margin: 12px 0 18px; font-size: clamp(38px, 6vw, 68px); font-weight: 500; letter-spacing: -1.8px; line-height: 1.06; }
.note-dek { max-width: 660px; margin-bottom: 24px; color: var(--muted); font-size: 18px; }
.note-meta { display: flex; gap: 10px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.note-hero-image { padding-top: 30px; }
.note-hero-image img { width: 100%; height: auto; border: 1px solid var(--line); background: var(--soft); }
.note-hero-image figcaption { margin-top: 9px; color: var(--muted); font-size: 12px; }
.note-body { padding-block: 40px 58px; font-size: 18px; line-height: 1.8; }
.note-body h2 { margin: 2em 0 .55em; font-size: 30px; font-weight: 500; letter-spacing: -.5px; line-height: 1.2; }
.note-body h3 { margin: 1.8em 0 .5em; font-size: 23px; }
.note-body p, .note-body ul { margin-bottom: 1.35em; }
.note-body li { margin-bottom: .45em; }
.note-body .callout { margin: 1.8em 0; padding: 20px 22px; border-left: 3px solid var(--accent); background: var(--soft); }
.note-body pre { margin: 0 0 1.35em; padding: 14px 16px; overflow-x: auto; border: 1px solid var(--line); background: var(--soft); font-size: 15px; line-height: 1.6; }
.note-body code { font-size: .88em; overflow-wrap: anywhere; }
.note-body pre code { font-size: inherit; overflow-wrap: normal; }
.source-note { color: var(--muted); font-size: 13px; }
.note-footer { display: flex; justify-content: space-between; gap: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.note-tags, .note-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.tag { padding: 4px 8px; border: 1px solid var(--line); color: var(--muted); font-size: 11px; text-decoration: none; }
.text-link { font-size: 14px; font-weight: 600; }

.site-footer { min-height: 86px; display: flex; justify-content: space-between; align-items: center; gap: 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer > span:first-child { color: var(--ink); }
.site-footer > span:first-child small { margin-left: 13px; color: var(--muted); font-size: inherit; }
.footer-links { display: flex; gap: 7px; }
.footer-links a { text-decoration: none; }
.footer-links a + a::before { margin-right: 7px; color: var(--line-strong); content: "·"; }
.appearance-choice { display: flex; align-items: center; gap: 9px; }
.appearance-choice select { padding: 6px 26px 6px 9px; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); color: var(--ink); font-size: 12px; }

@media (max-width: 980px) {
  .shell { width: min(var(--shell), calc(100% - 44px)); }
  .header-inner { gap: 24px; }
  .site-nav { gap: 18px; }
  .site-nav > a:nth-last-of-type(1) { display: none; }
  .header-search { width: 175px; }
  .journal-layout { grid-template-columns: minmax(0, 1fr) 230px; gap: 30px; }
  .about-page { grid-template-columns: 100px minmax(0, 1fr); }
  .about-detail { grid-column: 2; }
}

@media (max-width: 740px) {
  .shell { width: min(var(--shell), calc(100% - 32px)); }
  .header-inner { min-height: 0; padding-block: 17px; flex-wrap: wrap; }
  .identity { width: calc(100% - 200px); }
  .site-nav { order: 3; width: 100%; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }
  .site-nav > a:nth-last-of-type(1) { display: inline; }
  .header-search { width: 184px; }
  .projects-panel { left: 0; width: min(330px, calc(100vw - 32px)); transform: none; }
  .page-intro { align-items: flex-start; flex-direction: column; gap: 8px; }
  .journal-layout { grid-template-columns: 1fr; }
  .more-articles { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 28px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .more-articles > h2 { grid-column: 1 / -1; margin-bottom: 0; }
  .more-card img { height: 135px; }
  .about { grid-template-columns: 1fr; gap: 20px; }
  .project-entry { grid-template-columns: 35px 1fr; }
  .project-action { grid-column: 2; justify-self: start; margin-top: 10px; }
  .about-page { grid-template-columns: 1fr; gap: 22px; }
  .about-detail { grid-column: auto; }
}

@media (max-width: 520px) {
  .identity { width: 100%; }
  .header-search { width: 100%; order: 2; }
  .site-nav { order: 3; overflow-x: auto; justify-content: flex-start; gap: 23px; padding-bottom: 5px; }
  .feature-hero { height: 285px; }
  .repository-article .feature-hero { height: 350px; }
  .feature-article[data-open="true"] .feature-hero { height: min(500px, 68vh); }
  .feature-title { padding: 22px; }
  .feature-title h2 { font-size: 28px; }
  .feature-article[data-treatment="panel-left"] .feature-title,
  .feature-article[data-treatment="panel-right"] .feature-title { width: calc(100% - 32px); }
  .text-surface { padding: 25px 22px; }
  .text-heading { grid-template-columns: 1fr; gap: 12px; }
  .text-heading small { display: flex; gap: 16px; padding: 0; }
  .text-heading small span { padding: 0; }
  .text-heading h2 { font-size: 26px; }
  .inline-figure--compact { width: 100%; }
  .text-copy, .text-article .disclosure-control, .text-article .reading-anchor, .article-source { margin-left: 0; }
  .more-articles { grid-template-columns: 1fr; }
  .site-footer { align-items: flex-start; flex-direction: column; padding-block: 25px; gap: 17px; }
  .archive-row { grid-template-columns: 1fr 24px; gap: 8px 14px; }
  .archive-row time { grid-column: 1 / -1; }
  .note-footer { flex-direction: column; }
  .project-entry { grid-template-columns: 1fr; padding: 26px 22px; }
  .project-action { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Reading pages: compact B2 cards, with an independent photo column. */
:root {
  --bg: #f6f6f3;
  --ink: #262727;
  --muted: #676b69;
  --line: #dcdedb;
  --post-dark: #292927;
  --title-overlay-bg: rgb(255 255 255 / .94);
  --title-overlay-ink: #222925;
  --title-overlay-muted: #505a54;
  --title-overlay-border: rgb(34 41 37 / .14);
  --title-overlay-fade: rgb(255 255 255 / .96);
}
html[data-theme="dark"] { --bg: #181818; --paper: #202020; --ink: #eee; --muted: #aaa; --line: #363636; --post-dark: #242424; --title-overlay-bg: rgb(24 27 26 / .94); --title-overlay-ink: #f4f3ef; --title-overlay-muted: #e8ece9; --title-overlay-border: rgb(255 255 255 / .2); --title-overlay-fade: rgb(15 17 16 / .92); }
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] { --bg: #181818; --paper: #202020; --ink: #eee; --muted: #aaa; --line: #363636; --post-dark: #242424; --title-overlay-bg: rgb(24 27 26 / .94); --title-overlay-ink: #f4f3ef; --title-overlay-muted: #e8ece9; --title-overlay-border: rgb(255 255 255 / .2); --title-overlay-fade: rgb(15 17 16 / .92); }
}
.header-inner { min-height: 90px; gap: 32px; }
.identity strong { font-size: 22px; padding: 7px 12px; margin-bottom: 5px; }
.identity span { font-size: 11px; letter-spacing: .01em; }
.site-nav { gap: 25px; font-size: 13px; }
.header-search { border-radius: 5px; width: 186px; padding: 10px 12px; }
.page-intro { padding-block: 36px 27px; }
.page-intro h1 { display: flex; align-items: center; gap: 14px; font-size: 29px; letter-spacing: -.8px; }
.page-count { align-self: flex-start; margin-top: 5px; color: var(--muted); font: 11px/1.5 Consolas, monospace; letter-spacing: 0; }
.reading-layout { display: grid; grid-template-columns: minmax(0, 800px) minmax(240px, 300px); justify-content: space-between; gap: clamp(32px, 5vw, 64px); padding-block: 32px 72px; }
.post-card { --post-ink: var(--ink); --post-muted: var(--muted); --post-line: var(--line); scroll-margin-top: 28px; margin: 0 0 26px; overflow: clip; border: 1px solid var(--post-line); border-radius: 8px; color: var(--post-ink); background: var(--paper); }
.post-card-text { --post-ink: #f0efeb; --post-muted: #c0bfba; --post-line: #444440; background: var(--post-dark); box-shadow: 0 3px 12px rgb(0 0 0 / .035); }
.post-surface { padding: 27px 34px 17px; }
.post-meta { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 19px; color: var(--post-muted); font: 10px/1.5 Consolas, ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; }
.post-meta > span:first-child { display: flex; gap: 9px; align-items: center; }
.post-meta > span:first-child::before { width: 14px; height: 2px; background: #57aaa0; content: ''; }
.post-meta > span:last-child:not(:first-child) { opacity: .7; letter-spacing: .02em; }
.post-lead { margin: 0 0 18px; color: var(--post-ink); font-size: clamp(22px, 2.05vw, 28px); font-weight: 500; letter-spacing: -.55px; line-height: 1.32; text-wrap: pretty; }
.post-body { color: var(--post-muted); font-size: 16px; line-height: 1.85; overflow-wrap: anywhere; }
.post-body p { margin: 0 0 1.25em; }
.post-body p:last-child { margin-bottom: 0; }
.post-body a { color: inherit; text-decoration-color: #80817b; }
.post-body a:hover { color: var(--post-ink); }
.post-card[data-open="false"] .post-body { cursor: pointer; }
.post-card[data-open="false"] .post-body > p:not(:first-child) { display: none; }
.post-card[data-open="false"] .post-excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-actions { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 23px; padding-top: 10px; border-top: 1px solid var(--post-line); }
.post-actions button { display: flex; align-items: center; gap: 26px; min-height: 40px; padding: 0; border: 0; background: transparent; color: var(--post-ink); font-size: 12px; font-weight: 500; }
.post-actions button:hover { color: #79c7bd; }
.post-actions [data-disclosure-icon] { font-size: 20px; font-weight: 300; }
.post-source { color: var(--post-muted); font-size: 11px; text-decoration: none; }
.post-source:hover { color: var(--post-ink); }
.post-context-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 18px; }
.post-photo { margin: 0; height: 320px; background: #252525; }
.post-photo img { width: 100%; height: 100%; object-fit: cover; }
.post-visual { position: relative; }
.post-visual-link, .post-title-link { display: block; color: inherit; text-decoration: none; }
.post-title-link:hover .post-lead { color: var(--accent-hover); }
.post-lead-overlay { position: absolute; z-index: 3; margin: 0; padding: 23px 28px; border: 1px solid rgb(255 255 255 / .2); border-radius: 3px; background: rgb(24 27 26 / .94); color: #f4f3ef; box-shadow: 0 12px 30px rgb(0 0 0 / .2); }
.post-title-top .post-lead-overlay { top: 24px; right: 24px; left: 24px; }
.post-title-bottom .post-lead-overlay { right: 24px; bottom: 24px; left: 24px; }
.post-title-left .post-lead-overlay,
.post-title-right .post-lead-overlay { top: 50%; width: min(48%, 390px); transform: translateY(-50%); }
.post-title-left .post-lead-overlay { left: 24px; }
.post-title-right .post-lead-overlay { right: 24px; }
.post-card-photo[data-open="true"] .post-photo { height: clamp(400px, 47vw, 580px); }
.post-card-photo[data-open="true"] .post-surface { position: relative; }
.post-card-photo[data-open="true"] .post-meta { position: absolute; right: 34px; top: -42px; z-index: 2; color: #dededb; }
.post-card-photo[data-open="true"] .post-meta > span:first-child { display: none; }
.post-card-photo[data-open="true"] .post-surface > .post-lead { position: relative; margin-top: 0; padding: 0; border: 0; background: transparent; color: var(--post-ink); }
.repository-card .post-photo { height: 420px; }
.repo-button { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; text-decoration: none; min-height: 44px; }
.repo-button svg { width: 20px; height: 20px; fill: currentColor; }
.reading-sidebar { align-self: start; min-width: 0; padding-top: 3px; }
.sidebar-top { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 23px; }
.sidebar-top h2 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: -.15px; }
.sidebar-top > a { color: var(--muted); font-size: 11px; text-decoration: none; }
.sidebar-project { position: relative; display: block; margin-bottom: 28px; padding-bottom: 25px; border-bottom: 1px solid var(--line); text-decoration: none; }
.sidebar-project img { width: 100%; aspect-ratio: 1.55; object-fit: cover; border-radius: 5px; background: var(--soft); }
.sidebar-project p { margin: 15px 20px 0 0; font-size: 14px; line-height: 1.6; text-wrap: pretty; }
.sidebar-project > span { position: absolute; right: 0; bottom: 28px; color: var(--muted); font-size: 13px; }
.sidebar-repo { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; text-decoration: none; }
.reading-layout .search-empty { padding: 40px 0; }
.post-card[data-open="true"] .post-body { padding-top: 4px; }
@media (max-width: 1050px) {
  .header-inner { flex-wrap: wrap; column-gap: 20px; row-gap: 18px; padding-block: 20px; }
  .site-nav { gap: 18px; }
  .site-nav > a:nth-last-of-type(1) { display: inline; }
  .header-search { width: 155px; }
  .reading-layout { grid-template-columns: minmax(0, 1fr) 240px; gap: 30px; }
  .post-surface { padding: 25px 27px 14px; }
}
@media (max-width: 800px) {
  .reading-layout { grid-template-columns: minmax(0, 1fr); }
  .reading-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; padding-top: 14px; }
  .sidebar-top, .sidebar-repo { grid-column: 1 / -1; }
  .header-search { width: 180px; }
  .site-nav { order: 3; width: 100%; justify-content: flex-start; gap: 28px; padding-top: 14px; border-top: 1px solid var(--line); }
  .identity { width: auto; }
  .post-lead { font-size: 25px; }
}
@media (max-width: 520px) {
  .header-inner { padding-block: 16px 12px; gap: 16px; }
  .identity strong { font-size: 20px; }
  .identity span { max-width: 155px; font-size: 10px; }
  .header-search { width: 125px; order: 0; padding: 9px 10px; }
  .header-search input { font-size: 11px; }
  .site-nav { gap: 24px; font-size: 12px; padding-top: 13px; overflow: visible; }
  .page-intro { padding-block: 25px 22px; gap: 10px; }
  .page-intro h1 { font-size: 27px; }
  .page-intro p { font-size: 12px; }
  .reading-layout { padding-top: 22px; gap: 20px; }
  .post-surface { padding: 23px 23px 12px; }
  .post-lead { font-size: 23px; line-height: 1.36; }
  .post-meta { margin-bottom: 17px; }
  .post-body { font-size: 15px; line-height: 1.8; }
  .post-actions { margin-top: 20px; }
  .post-photo { height: 250px; }
  .post-card-photo[data-open="true"] .post-photo { height: 360px; }
  .post-card-photo[data-open="true"] .post-surface > .post-lead { padding: 20px; margin-inline: -8px; }
  .reading-sidebar { gap: 0 18px; }
  .sidebar-project p { font-size: 13px; }
  .sidebar-project img { aspect-ratio: 1.1; }
}
@media (max-width: 360px) {
  .header-search { width: 110px; }
  .site-nav { gap: 19px; }
  .post-surface { padding-inline: 19px; }
}

/* Source metadata, complete media sets, and global search. */
.post-meta { min-height: 24px; }
.post-meta .post-kind,
.archive-meta .post-kind,
.search-result-meta .post-kind {
  display: inline-block;
  padding: 5px 9px 4px;
  background: #007d77;
  color: #fff;
  font: 10px/1.5 Consolas, ui-monospace, monospace;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.post-meta > span:first-child::before { display: none; }
.post-meta time,
.archive-meta time,
.search-result-meta time {
  color: var(--post-muted, var(--muted));
  font: 10px/1.5 Consolas, ui-monospace, monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.post-gallery { background: #252525; }
.post-photo { display: grid; place-items: center; height: 320px; overflow: hidden; }
.post-photo img { width: 100%; height: 100%; object-fit: cover; }
.post-media-contain .post-photo img { object-fit: contain; }
.post-photo figcaption,
.post-secondary-gallery figcaption {
  padding: 8px 12px;
  color: #d7d7d2;
  background: #252525;
  font-size: 11px;
  line-height: 1.5;
}
.post-photo:has(figcaption) { grid-template-rows: minmax(0, 1fr) auto; }
.post-card-photo[data-open="true"] .post-photo { height: clamp(430px, 53vw, 680px); }
.post-card-photo.post-media-contain[data-open="true"] .post-meta { position: static; color: var(--post-muted); }
.post-card-photo.post-media-contain[data-open="true"] .post-meta > span:first-child { display: inline-block; }
.post-card-photo.post-media-contain[data-open="true"] .post-surface > .post-lead { margin-top: 0; padding: 0; border: 0; background: transparent; color: var(--post-ink); }
.post-secondary-gallery,
.post-attachments { display: none; }
.post-card[data-open="true"] .post-secondary-gallery,
.post-card[data-open="true"] .post-attachments,
.repository-card .post-secondary-gallery,
.repository-card .post-attachments { display: grid; }
.post-secondary-gallery { gap: 16px; margin-top: 28px; }
.post-secondary-gallery figure { margin: 0; border: 1px solid var(--post-line); background: #252525; }
.post-secondary-gallery img { width: 100%; max-height: 680px; object-fit: contain; }
.post-attachments { gap: 10px; margin-top: 25px; }
.post-attachment { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; padding: 12px; border: 1px solid var(--post-line); text-decoration: none; }
.post-attachment > img { width: 76px; height: 54px; object-fit: contain; background: #252525; }
.post-attachment small { display: block; color: var(--post-muted); font: 10px/1.5 Consolas, ui-monospace, monospace; text-transform: uppercase; }
.post-attachment strong { display: block; color: var(--post-ink); font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.sidebar-project-text { min-height: 112px; padding: 18px 20px 25px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); }
.sidebar-project-text p { margin-top: 0; }
.archive-row { grid-template-columns: 125px 1fr 36px; }
.archive-meta { align-self: start; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.archive-row h2 a { color: inherit; text-decoration: none; }
.archive-row h2 a:hover { color: var(--accent-hover); }

.search-intro { padding-block: 60px 30px; border-bottom: 1px solid var(--line); }
.search-intro h1 { margin: 8px 0 13px; font-size: clamp(38px, 6vw, 66px); font-weight: 500; letter-spacing: -1.7px; line-height: 1.05; }
.search-intro > p:last-child { max-width: 680px; margin: 0; color: var(--muted); }
.search-results { max-width: 950px; padding-block: 18px 80px; }
.search-result { border-bottom: 1px solid var(--line); }
.search-result > a { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 25px; padding-block: 25px; color: inherit; text-decoration: none; }
.search-result:not(.search-result-image) > a { grid-template-columns: minmax(0, 1fr); }
.search-result > a > img { width: 180px; height: 128px; border-radius: 4px; background: #252525; object-fit: contain; }
.search-result-meta { display: flex; align-items: center; gap: 13px; margin-bottom: 10px; }
.search-result h2 { margin: 0 0 7px; color: var(--ink); font-size: 22px; font-weight: 500; letter-spacing: -.35px; line-height: 1.3; }
.search-result p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.search-result > a:hover h2 { color: var(--accent-hover); }
.search-result-links { display: flex; flex-wrap: wrap; gap: 18px; margin: -11px 0 22px 205px; }
.search-result-links a { color: var(--muted); font-size: 11px; text-decoration: none; }
.search-result-links a:hover { color: var(--accent-hover); }

@media (max-width: 520px) {
  .post-photo { height: 250px; }
  .post-card-photo[data-open="true"] .post-photo { height: 420px; }
  .post-card-photo[data-open="true"] .post-surface > .post-lead { margin-inline: 0; }
  .post-title-left .post-lead-overlay,
  .post-title-right .post-lead-overlay { width: min(64%, 250px); padding: 16px 18px; }
  .archive-row { grid-template-columns: 1fr 24px; }
  .archive-meta { grid-column: 1 / -1; flex-direction: row; align-items: center; }
  .search-intro { padding-block: 38px 24px; }
  .search-result.search-result-image > a { grid-template-columns: 105px minmax(0, 1fr); gap: 15px; }
  .search-result > a > img { width: 105px; height: 92px; }
  .search-result h2 { font-size: 18px; }
  .search-result p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; }
  .search-result-meta { align-items: flex-start; flex-direction: column; gap: 5px; }
  .search-result-links { margin-left: 120px; }
}

/* Permanent reading pages, sharing, and natural-ratio expanded media. */
.post-primary-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 22px;
}
.post-mode-link,
.post-share {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--post-ink);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}
.post-mode-link:hover,
.post-share:hover { color: #79c7bd; }
.post-actions .post-share { gap: 8px; }
.post-card-photo.post-media-contain[data-open="true"] .post-photo,
.repository-card.post-media-contain .post-photo {
  display: block;
  height: auto;
  min-height: 0;
  background: var(--paper);
}
.post-card-photo.post-media-contain[data-open="true"] .post-photo img,
.repository-card.post-media-contain .post-photo img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: initial;
}
.post-page-header { padding-top: 31px; }
.post-page-header a { color: var(--muted); font-size: 12px; text-decoration: none; }
.post-page-header a:hover { color: var(--ink); }
.post-page-layout { padding-top: 20px; }
.post-card-full { margin-bottom: 0; }
.post-card-full .post-lead { font-size: clamp(27px, 3vw, 38px); }
.about-original {
  max-width: 790px;
  padding-block: clamp(48px, 8vw, 92px);
}
.about-original h2 {
  max-width: 690px;
  margin: 0 0 34px;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 500;
  letter-spacing: -1.5px;
  line-height: 1.06;
}
.about-original p {
  max-width: 720px;
  margin: 0 0 1.45em;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
}
@media (max-width: 640px) {
  .post-actions { align-items: flex-start; flex-direction: column; gap: 8px; }
  .post-context-links { justify-content: flex-start; }
  .post-primary-actions { gap: 3px 18px; }
  .about-original p { font-size: 16px; line-height: 1.8; }
}
.post-card-placeholder .post-surface { min-height: 255px; display: flex; flex-direction: column; }
.post-card-placeholder .post-body { margin-top: auto; color: var(--post-muted); font-size: 18px; }
.post-card-placeholder .post-actions { margin-top: 34px; }
.placeholder-page {
  min-height: min(68vh, 720px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-block: clamp(80px, 15vw, 180px);
}
.placeholder-page .post-kind { margin-bottom: 24px; }
.placeholder-page h1 {
  margin: 0;
  font-size: clamp(66px, 13vw, 150px);
  font-weight: 500;
  letter-spacing: -.06em;
  line-height: .9;
}
.placeholder-page > p:not(.post-kind) { margin: 28px 0 48px; color: var(--muted); font-size: 18px; }
.placeholder-page > a { color: var(--muted); font-size: 13px; text-decoration: none; }
.placeholder-page > a:hover { color: var(--accent-hover); }

/* Per-surface presentation variants: dedicated/shared is resolved by the template;
   desktop/mobile is resolved by the viewport. */
.post-card-photo .post-lead-overlay,
.post-card-photo .post-lead-outside { display: none; }
.post-title-desktop-outside .post-lead-outside { display: block; }
:is(.post-title-desktop-top, .post-title-desktop-bottom, .post-title-desktop-left, .post-title-desktop-right, .post-title-desktop-fade) .post-lead-overlay { display: block; }

.post-card-photo .post-lead-overlay {
  inset: auto;
  width: auto;
  transform: none;
}
.post-title-desktop-top .post-lead-overlay { top: 24px; right: 24px; left: 24px; }
.post-title-desktop-bottom .post-lead-overlay { right: 24px; bottom: 24px; left: 24px; }
.post-title-desktop-left .post-lead-overlay,
.post-title-desktop-right .post-lead-overlay { top: 50%; width: min(48%, 390px); transform: translateY(-50%); }
.post-title-desktop-left .post-lead-overlay { left: 24px; }
.post-title-desktop-right .post-lead-overlay { right: 24px; }
.post-title-desktop-fade .post-lead-overlay {
  right: 0;
  bottom: 0;
  left: 0;
  padding: 110px 34px 28px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(to bottom, transparent, rgb(15 17 16 / .88) 72%);
  box-shadow: none;
}

.post-fit-desktop-cover .post-photo img { object-fit: cover; }
.post-fit-desktop-contain .post-photo img { object-fit: contain; }
.post-crop-desktop-center .post-photo img { object-position: 50% 50%; }
.post-crop-desktop-top .post-photo img { object-position: 50% 0%; }
.post-crop-desktop-bottom .post-photo img { object-position: 50% 100%; }
.post-crop-desktop-left .post-photo img { object-position: 0% 50%; }
.post-crop-desktop-right .post-photo img { object-position: 100% 50%; }
.post-crop-desktop-top-left .post-photo img { object-position: 0% 0%; }
.post-crop-desktop-top-right .post-photo img { object-position: 100% 0%; }
.post-crop-desktop-bottom-left .post-photo img { object-position: 0% 100%; }
.post-crop-desktop-bottom-right .post-photo img { object-position: 100% 100%; }
.post-fit-desktop-contain[data-open="true"] .post-photo { display: block; height: auto; min-height: 0; background: var(--paper); }
.post-fit-desktop-contain[data-open="true"] .post-photo img { width: 100%; height: auto; max-height: none; }
.post-shape-desktop-wide .post-photo { height: auto !important; aspect-ratio: 16 / 9; }
.post-shape-desktop-landscape .post-photo { height: auto !important; aspect-ratio: 4 / 3; }
.post-shape-desktop-square .post-photo { height: auto !important; aspect-ratio: 1; }
.post-shape-desktop-portrait .post-photo { height: auto !important; aspect-ratio: 4 / 5; }
:is(.post-shape-desktop-wide, .post-shape-desktop-landscape, .post-shape-desktop-square, .post-shape-desktop-portrait) .post-photo img { height: 100%; }
.post-shape-desktop-natural .post-photo { display: block; height: auto !important; aspect-ratio: auto; }
.post-shape-desktop-natural .post-photo img { height: auto; }

@media (max-width: 640px) {
  .post-card-photo .post-lead-overlay,
  .post-card-photo .post-lead-outside { display: none; }
  .post-title-mobile-outside .post-lead-outside { display: block; }
  :is(.post-title-mobile-top, .post-title-mobile-bottom, .post-title-mobile-left, .post-title-mobile-right, .post-title-mobile-fade) .post-lead-overlay { display: block; }
  .post-title-mobile-top .post-lead-overlay { top: 16px; right: 16px; bottom: auto; left: 16px; width: auto; transform: none; }
  .post-title-mobile-bottom .post-lead-overlay { top: auto; right: 16px; bottom: 16px; left: 16px; width: auto; transform: none; }
  .post-title-mobile-left .post-lead-overlay,
  .post-title-mobile-right .post-lead-overlay { top: 50%; bottom: auto; width: min(64%, 250px); padding: 16px 18px; transform: translateY(-50%); }
  .post-title-mobile-left .post-lead-overlay { right: auto; left: 16px; }
  .post-title-mobile-right .post-lead-overlay { right: 16px; left: auto; }
  .post-title-mobile-fade .post-lead-overlay { top: auto; right: 0; bottom: 0; left: 0; width: auto; padding: 90px 22px 22px; border: 0; border-radius: 0; background: linear-gradient(to bottom, transparent, rgb(15 17 16 / .9) 70%); box-shadow: none; transform: none; }

  .post-fit-mobile-cover .post-photo { display: grid; min-height: 0; background: #252525; }
  .post-fit-mobile-cover[data-open="false"] .post-photo { height: 250px; }
  .post-fit-mobile-cover[data-open="true"] .post-photo { height: 420px; }
  .post-fit-mobile-cover .post-photo img { width: 100%; height: 100%; max-height: none; object-fit: cover; }
  .post-fit-mobile-contain .post-photo img { object-fit: contain; }
  .post-crop-mobile-center .post-photo img { object-position: 50% 50%; }
  .post-crop-mobile-top .post-photo img { object-position: 50% 0%; }
  .post-crop-mobile-bottom .post-photo img { object-position: 50% 100%; }
  .post-crop-mobile-left .post-photo img { object-position: 0% 50%; }
  .post-crop-mobile-right .post-photo img { object-position: 100% 50%; }
  .post-crop-mobile-top-left .post-photo img { object-position: 0% 0%; }
  .post-crop-mobile-top-right .post-photo img { object-position: 100% 0%; }
  .post-crop-mobile-bottom-left .post-photo img { object-position: 0% 100%; }
  .post-crop-mobile-bottom-right .post-photo img { object-position: 100% 100%; }
  .post-fit-mobile-contain[data-open="true"] .post-photo { display: block; height: auto; min-height: 0; background: var(--paper); }
  .post-fit-mobile-contain[data-open="true"] .post-photo img { width: 100%; height: auto; max-height: none; }
  .post-shape-mobile-standard .post-photo { aspect-ratio: auto; }
  .post-shape-mobile-standard.post-fit-mobile-cover[data-open="false"] .post-photo { height: 250px !important; }
  .post-shape-mobile-standard.post-fit-mobile-cover[data-open="true"] .post-photo { height: 420px !important; }
  .post-shape-mobile-wide .post-photo { height: auto !important; aspect-ratio: 16 / 9; }
  .post-shape-mobile-landscape .post-photo { height: auto !important; aspect-ratio: 4 / 3; }
  .post-shape-mobile-square .post-photo { height: auto !important; aspect-ratio: 1; }
  .post-shape-mobile-portrait .post-photo { height: auto !important; aspect-ratio: 4 / 5; }
  :is(.post-shape-mobile-wide, .post-shape-mobile-landscape, .post-shape-mobile-square, .post-shape-mobile-portrait) .post-photo img { height: 100%; }
  .post-shape-mobile-natural .post-photo { display: block; height: auto !important; aspect-ratio: auto; }
  .post-shape-mobile-natural .post-photo img { height: auto; }
}

/* Unified title metadata and collapsed-card framing. */
.post-title-block { min-width: 0; }
.post-title-block .post-meta { position: static; min-height: 24px; margin: 0 0 12px; color: var(--post-muted); }
.post-title-block .post-meta > span:first-child { display: inline-block; }
.post-title-block .post-lead { margin-bottom: 0; }
.post-card-text .post-title-block-outside { display: block; }
.post-card-photo .post-title-block-overlay,
.post-card-photo .post-title-block-outside { display: none; }
.post-title-desktop-outside .post-title-block-outside { display: block; }
:is(.post-title-desktop-top, .post-title-desktop-bottom, .post-title-desktop-left, .post-title-desktop-right, .post-title-desktop-fade) .post-title-block-overlay { display: block; }

.post-title-block-overlay {
  position: absolute;
  z-index: 3;
  margin: 0;
  padding: 22px 27px;
  border: 1px solid var(--title-overlay-border);
  border-radius: 3px;
  background: var(--title-overlay-bg);
  color: var(--title-overlay-ink);
  box-shadow: 0 12px 30px rgb(0 0 0 / .2);
}
.post-title-block-overlay .post-meta,
.post-title-block-overlay .post-meta time { color: var(--title-overlay-muted); }
.post-title-block-overlay .post-lead { color: var(--title-overlay-ink); }
.post-title-desktop-top .post-title-block-overlay { top: 24px; right: 24px; left: 24px; }
.post-title-desktop-bottom .post-title-block-overlay { right: 24px; bottom: 24px; left: 24px; }
.post-title-desktop-left .post-title-block-overlay,
.post-title-desktop-right .post-title-block-overlay { top: 50%; width: min(48%, 410px); transform: translateY(-50%); }
.post-title-desktop-left .post-title-block-overlay { left: 24px; }
.post-title-desktop-right .post-title-block-overlay { right: 24px; }
.post-title-desktop-fade .post-title-block-overlay {
  right: 0;
  bottom: 0;
  left: 0;
  padding: 115px 34px 28px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(to bottom, transparent, var(--title-overlay-fade) 72%);
  box-shadow: none;
}

.post-card-photo[data-open="true"] .post-gallery .post-photo,
.repository-card .post-gallery .post-photo,
.post-card-full .post-gallery .post-photo {
  display: block;
  height: auto !important;
  min-height: 0;
  aspect-ratio: auto !important;
  background: var(--paper);
}
.post-card-photo[data-open="true"] .post-gallery .post-photo img,
.repository-card .post-gallery .post-photo img,
.post-card-full .post-gallery .post-photo img {
  position: static;
  width: 100%;
  height: auto !important;
  max-height: none;
  object-fit: contain;
  object-position: center;
  transform: none !important;
}
.post-card-photo[data-open="true"] .post-meta { position: static; color: inherit; }
.post-card-photo[data-open="true"] .post-meta > span:first-child { display: inline-block; }

.post-card-photo[data-open="false"] .post-gallery .post-photo {
  position: relative;
  display: block;
  height: auto !important;
  overflow: hidden;
  background: var(--paper);
}
.post-card-photo[data-open="false"].post-crop-aspect-desktop-wide .post-gallery .post-photo { aspect-ratio: 16 / 9; }
.post-card-photo[data-open="false"].post-crop-aspect-desktop-landscape .post-gallery .post-photo { aspect-ratio: 4 / 3; }
.post-card-photo[data-open="false"].post-crop-fill-desktop-match .post-gallery .post-photo { background: var(--crop-desktop-color); }
.post-card-photo[data-open="false"] .post-gallery .post-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100% !important;
  max-height: none;
  object-fit: cover;
  object-position: center;
  transform: translate(var(--crop-desktop-x), var(--crop-desktop-y)) scale(var(--crop-desktop-zoom));
  transform-origin: center;
}

.sidebar-project-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; }
.sidebar-project-meta .post-kind { padding: 4px 7px 3px; background: #007d77; color: white; font: 8px/1.45 Consolas, ui-monospace, monospace; letter-spacing: .07em; text-transform: uppercase; }
.sidebar-project-meta time { color: var(--muted); font: 9px/1.45 Consolas, ui-monospace, monospace; letter-spacing: .02em; text-transform: uppercase; }
.sidebar-project p { margin-top: 9px; }
.sidebar-project > .sidebar-project-arrow { position: absolute; right: 0; bottom: 28px; color: var(--muted); font-size: 13px; }

@media (max-width: 640px) {
  .post-card-photo .post-title-block-overlay,
  .post-card-photo .post-title-block-outside { display: none; }
  .post-title-mobile-outside .post-title-block-outside { display: block; }
  :is(.post-title-mobile-top, .post-title-mobile-bottom, .post-title-mobile-left, .post-title-mobile-right, .post-title-mobile-fade) .post-title-block-overlay { display: block; }
  .post-title-mobile-top .post-title-block-overlay { top: 16px; right: 16px; bottom: auto; left: 16px; width: auto; transform: none; }
  .post-title-mobile-bottom .post-title-block-overlay { top: auto; right: 16px; bottom: 16px; left: 16px; width: auto; transform: none; }
  .post-title-mobile-left .post-title-block-overlay,
  .post-title-mobile-right .post-title-block-overlay { top: 50%; bottom: auto; width: min(72%, 270px); padding: 16px 18px; transform: translateY(-50%); }
  .post-title-mobile-left .post-title-block-overlay { right: auto; left: 16px; }
  .post-title-mobile-right .post-title-block-overlay { right: 16px; left: auto; }
  .post-title-mobile-fade .post-title-block-overlay { top: auto; right: 0; bottom: 0; left: 0; width: auto; padding: 95px 22px 22px; border: 0; border-radius: 0; background: linear-gradient(to bottom, transparent, var(--title-overlay-fade) 70%); box-shadow: none; transform: none; }
  .post-card-photo[data-open="false"].post-crop-aspect-mobile-wide .post-gallery .post-photo { aspect-ratio: 16 / 9; }
  .post-card-photo[data-open="false"].post-crop-aspect-mobile-landscape .post-gallery .post-photo { aspect-ratio: 4 / 3; }
  .post-card-photo[data-open="false"].post-crop-fill-mobile-blank .post-gallery .post-photo { background: var(--paper); }
  .post-card-photo[data-open="false"].post-crop-fill-mobile-match .post-gallery .post-photo { background: var(--crop-mobile-color); }
  .post-card-photo[data-open="false"] .post-gallery .post-photo img { transform: translate(var(--crop-mobile-x), var(--crop-mobile-y)) scale(var(--crop-mobile-zoom)); }
}

/* BCv2 updater */
.bcv2-update .note-body { padding-top: 16px; }
.update-card { margin-bottom: 30px; padding: 24px 26px; border: 1px solid var(--line-strong); background: var(--paper); }
.update-card > :last-child { margin-bottom: 0; }
.note-body .update-card h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0 0 .6em; font-size: 26px; }
.beta { display: inline-block; padding: 1px 9px; border-radius: 999px; background: #f2cf5b; color: #3b2e00; font-size: 12px; font-weight: 700; letter-spacing: .08em; line-height: 1.6; text-transform: uppercase; vertical-align: .15em; }
.note-body .update-steps { margin: 0 0 1.2em; padding-left: 1.3em; }
.update-aside { color: var(--muted); font-size: 16px; }
.update-button { min-height: 50px; padding: 0 30px; border: 0; border-radius: 6px; background: var(--accent); color: var(--paper); font-size: 17px; font-weight: 600; }
.update-button:hover { background: var(--accent-hover); }
.update-button:disabled { opacity: .45; cursor: default; }
.update-progress { margin-top: 18px; }
.update-progress progress { display: block; width: 100%; height: 10px; margin-bottom: 6px; accent-color: var(--accent); }
.update-progress p { margin: 0; color: var(--muted); font-size: 15px; }
.update-result { margin: 18px 0 0; padding: 12px 16px; border-left: 3px solid var(--line-strong); background: var(--soft); font-size: 16px; }
.update-result[data-kind="ok"] { border-color: #2f9e5b; background: rgb(47 158 91 / .12); }
.update-result[data-kind="error"] { border-color: #d24a3f; background: rgb(210 74 63 / .12); }
.update-phone { display: flex; align-items: center; gap: 24px; margin-bottom: 1.2em; }
.update-phone p { margin: 0; }
.update-qr { flex: none; width: 136px; height: 136px; padding: 8px; background: #fff; }
.update-link { padding: 0; border: 0; background: none; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: .22em; }
.update-more { border-top: 1px solid var(--line); }
.update-more:last-child { border-bottom: 1px solid var(--line); }
.update-more summary { padding: 14px 0; font-size: 19px; font-weight: 500; }
.update-more[open] { padding-bottom: 8px; }
.note-body .update-more h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 1em 0 .4em; font-size: 20px; }

@media (max-width: 520px) {
  .update-card { padding: 20px 18px; }
  .note-body .update-card h2 { font-size: 23px; }
  .update-phone { flex-direction: column; align-items: flex-start; }
  .update-button { width: 100%; }
}

/* BCv2 guide */
.bcv2-console-card { display: grid; grid-template-columns: 280px 1fr; gap: 22px; align-items: center; margin-bottom: 8px; padding: 14px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.bcv2-console-card:hover { border-color: var(--accent); color: var(--ink); box-shadow: 0 8px 24px rgb(0 0 0 / .12); transform: translateY(-1px); }
.bcv2-console-shot { display: block; overflow: hidden; border-radius: 6px; background: #0d1114; }
.bcv2-console-shot img { display: block; width: 100%; height: auto; }
.bcv2-console-copy { display: grid; gap: 6px; }
.bcv2-console-kicker { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.bcv2-console-title { font-size: 22px; font-weight: 600; line-height: 1.25; }
.bcv2-console-line { color: var(--muted); font-size: 15px; line-height: 1.55; }
.bcv2-console-go { color: var(--accent); font-size: 15px; font-weight: 600; }
.bcv2-console-card:hover .bcv2-console-go { color: var(--accent-hover); }

.bcv2-guide .note-body { padding-top: 28px; }
.bcv2-section { border-top: 1px solid var(--line-strong); }
.bcv2-section:last-of-type { border-bottom: 1px solid var(--line-strong); }
.bcv2-section > summary { display: grid; grid-template-columns: 1fr auto; column-gap: 16px; align-items: center; padding: 22px 0; list-style: none; }
.bcv2-section > summary::-webkit-details-marker { display: none; }
.bcv2-section > summary::after { content: ""; grid-row: 1 / span 2; grid-column: 2; width: 12px; height: 12px; margin-right: 6px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.bcv2-section[open] > summary::after { transform: rotate(225deg); }
.bcv2-section > summary:hover .bcv2-section-title { color: var(--accent); }
.bcv2-section-title { font-size: 30px; font-weight: 500; letter-spacing: -.5px; line-height: 1.2; }
.bcv2-section-dek { color: var(--muted); font-size: 16px; line-height: 1.5; }
.bcv2-section[open] { padding-bottom: 26px; }
.note-body .bcv2-section h3 { margin: 1.9em 0 .55em; font-size: 26px; font-weight: 500; letter-spacing: -.3px; }
.note-body .bcv2-section h4 { margin: 1.5em 0 .4em; font-size: 20px; }

.bcv2-specs { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 26px; padding: 0; list-style: none; }
.note-body .bcv2-specs li { margin: 0; padding: 3px 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 14px; line-height: 1.6; }
.note-body .bcv2-lead { margin-bottom: .6em; font-size: 24px; font-weight: 600; line-height: 1.35; }

.bcv2-figure { margin: 1.6em 0 2em; }
.bcv2-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); background: var(--soft); }
.bcv2-figure figcaption { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.bcv2-figure-tall { max-width: 420px; margin-inline: auto; }

.bcv2-key, .bcv2-silk { display: inline-block; padding: 0 .45em; font-size: .74em; font-weight: 700; letter-spacing: .04em; line-height: 1.7; white-space: nowrap; vertical-align: .1em; }
.bcv2-key { border: 1.5px solid #c9a24d; border-radius: 6px; background: #181a19; color: #e3be66; }
.bcv2-silk { border-radius: 3px; background: #e2e6e3; color: #111; }

.bcv2-steps { counter-reset: bcv2-step; }
.note-body .bcv2-steps h4 { display: flex; align-items: center; gap: 12px; }
.bcv2-steps h4::before { counter-increment: bcv2-step; content: counter(bcv2-step); display: inline-grid; flex: none; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--paper); font-size: 15px; font-weight: 700; }

.bcv2-panel { margin: 2.2em 0; padding: 4px 24px 8px; border: 1px solid var(--line); background: var(--soft); }
.note-body .bcv2-panel h3 { margin-top: .9em; }
.bcv2-morse { margin: 0 0 1em; padding: 0; list-style: none; }
.note-body .bcv2-morse li { display: grid; grid-template-columns: 28px 64px 1fr; gap: 12px; align-items: baseline; margin: 0 0 .7em; }
.bcv2-morse strong { font-size: 20px; }
.bcv2-morse-code { display: inline-flex; gap: 5px; align-items: center; height: 1em; }
.bcv2-morse-code i, .bcv2-morse-code b { display: block; height: 8px; border-radius: 2px; background: #f2b84b; box-shadow: 0 0 8px rgb(242 184 75 / .7); }
.bcv2-morse-code i { width: 8px; }
.bcv2-morse-code b { width: 24px; }

.bcv2-tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 1.4em; }
.bcv2-tip { padding: 2px 20px 4px; border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--paper); }
.note-body .bcv2-tip h4 { margin-top: .8em; }
.note-body .bcv2-tip p { font-size: 16px; }
.note-body .bcv2-callout { padding: 16px 20px; border-left: 3px solid var(--accent); background: var(--soft); }
.note-body .bcv2-signoff { margin-top: 28px; }

@media (max-width: 600px) {
  .bcv2-console-card { grid-template-columns: 1fr; gap: 14px; }
  .bcv2-section-title { font-size: 25px; }
  .bcv2-panel { padding-inline: 16px; }
  .note-body .bcv2-morse li { grid-template-columns: 22px 56px 1fr; gap: 8px; }
}
