/* Legacy Atlas post stylesheet orchestrator. */
/* Shared site navigation for standalone blog articles. */
.article-shellbar {
  position: sticky;
  z-index: 1000;
  top: 0;
  min-height: 48px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, .28);
  background: rgba(230, 220, 210, .97);
  color: #111;
  font: 10px/1.4 'JetBrains Mono', 'Courier New', monospace;
  backdrop-filter: blur(8px);
}

.article-shellbar a { color: inherit; text-decoration: none; }
.article-shellbar__id { justify-self: start; white-space: nowrap; }
.article-shellbar__id b { color: #8b0000; }
.article-shellbar__id span { color: rgba(0, 0, 0, .48); }
.article-shellbar nav { display: flex; align-items: center; }
.article-shellbar nav a {
  padding: 4px 8px;
  border-bottom: 1px solid transparent;
  color: rgba(0, 0, 0, .52);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.article-shellbar nav a:hover,
.article-shellbar nav a:focus-visible { border-bottom-color: #111; color: #111; outline: 0; }
.article-shellbar nav a[aria-current="page"] { border-bottom-color: #8b0000; color: #8b0000; }
.article-shellbar__divider { color: rgba(0, 0, 0, .18); }
.article-shellbar a.article-shellbar__status { justify-self: end; color: rgba(0, 0, 0, .48); white-space: nowrap; }
.article-shellbar__status span { margin-right: 7px; color: #0f692f; }

body:not(.migrated-post) > .article-shellbar {
  margin-top: -48px;
  margin-bottom: 48px;
}

@media (max-width: 760px) {
  .article-shellbar {
    min-height: 48px;
    padding: 8px 12px 7px;
    grid-template-columns: 1fr auto;
  }
  .article-shellbar__status { display: none; }
  .article-shellbar nav {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 6px;
    overflow-x: auto;
    border-top: 1px solid rgba(0, 0, 0, .12);
    white-space: nowrap;
    scrollbar-width: thin;
  }
  .article-shellbar nav a { padding: 7px 7px 4px; }
  .article-shellbar nav a:first-child { padding-left: 0; }
  body:not(.migrated-post) > .article-shellbar {
    margin-top: -8px;
    margin-bottom: 8px;
  }
}

/* Standalone shell for Atlas articles that originally lived inside Wix iframes. */

html:has(body:not(.migrated-post)) {
  min-height: 100%;
  background-color: rgb(230, 220, 210);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Ccircle cx='1' cy='1' r='.65' fill='%23000' fill-opacity='.18'/%3E%3C/svg%3E");
  background-size: 8px 8px;
}

body:not(.migrated-post) {
  min-height: 100vh;
  margin: 0;
  padding: 48px 0 84px;
  background: transparent;
}

body:not(.migrated-post) > .atlas-container {
  position: relative;
  width: min(1040px, calc(100% - 96px));
  margin: 0 auto;
  overflow: clip;
  border: 1px solid rgba(0, 0, 0, .4);
  background: rgba(230, 220, 210, .97);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, .12);
}

body:not(.migrated-post) > .atlas-container::before {
  content: "~/blog/technical-notes  [ DOCUMENT VIEW ]";
  display: block;
  height: 26px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(0, 0, 0, .4);
  background: rgba(0, 0, 0, .035);
  color: rgba(0, 0, 0, .58);
  font: 700 9px/26px 'JetBrains Mono', 'Courier New', monospace;
  letter-spacing: .05em;
  text-transform: uppercase;
}

body:not(.migrated-post) > .atlas-container > .content-block {
  padding-inline: 32px;
}

body:not(.migrated-post) > .atlas-container #site-passport .passport-bp {
  border: 0;
}

body:not(.migrated-post) > .atlas-container #site-passport .passport-title-bar {
  border-bottom: 1px solid rgba(0, 0, 0, .28);
}

@media (max-width: 640px) {
  body:not(.migrated-post) {
    padding: 8px 0 40px;
  }

  body:not(.migrated-post) > .atlas-container {
    width: calc(100% - 16px);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, .12);
  }

  body:not(.migrated-post) > .atlas-container > .content-block {
    padding-inline: 18px;
  }
}

/* Shared shell for long-form records: project case studies and Atlas notes.
   Content components stay specialised; the page chrome and reading rhythm do not. */
:root {
  --record-paper: #eee7df;
  --record-border: rgba(10, 10, 10, .28);
  --record-line: rgba(10, 10, 10, .12);
  --record-muted: rgba(10, 10, 10, .55);
  --record-blue: #0000aa;
}

/* Legacy posts use their own header class, but it deliberately mirrors .shellbar. */
.article-shellbar {
  min-height: 40px;
  padding: 0 18px;
  border-bottom-color: var(--record-border);
  background: rgba(230, 220, 210, .97);
  color: #0a0a0a;
  font-size: 10px;
  backdrop-filter: none;
}
.article-shellbar__id b { color: #0a0a0a; }
.article-shellbar__id span,
.article-shellbar a.article-shellbar__status { color: var(--record-muted); }
.article-shellbar nav a {
  padding: 0 10px;
  border: 0;
  color: #1c1c1c;
  font-size: 9px;
  font-weight: 500;
}
.article-shellbar nav a:hover,
.article-shellbar nav a:focus-visible,
.article-shellbar nav a[aria-current="page"] {
  border: 0;
  background: rgba(0, 0, 170, .08);
  color: var(--record-blue);
}
.article-shellbar__divider { color: rgba(10, 10, 10, .20); }

/* The former iframe canvas becomes the same quiet paper document used by records. */
html:has(body.article-record-page:not(.migrated-post)) {
  background-color: #e6dcd2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Ccircle cx='1' cy='1' r='.7' fill='%23000' fill-opacity='.10'/%3E%3C/svg%3E");
  background-size: 14px 14px;
}
body.article-record-page:not(.migrated-post) { padding: 32px 0 64px; }
body.article-record-page:not(.migrated-post) > .atlas-container {
  width: min(920px, calc(100% - 48px));
  border-color: var(--record-border);
  background: var(--record-paper);
  box-shadow: none;
}
body.article-record-page:not(.migrated-post) > .atlas-container::before {
  height: 30px;
  padding: 0 18px;
  border-bottom-color: var(--record-border);
  background: rgba(10, 10, 10, .025);
  color: var(--record-muted);
  font-size: 8px;
  line-height: 30px;
}
body.article-record-page:not(.migrated-post) > .atlas-container > .content-block { padding-inline: var(--notebook-record-inset, 28px); }
body.article-record-page:not(.migrated-post) > .atlas-container #site-passport .passport-title-bar { border-bottom-color: var(--record-border); }

@media (max-width: 760px) {
  .article-shellbar { min-height: 40px; padding: 8px 12px 7px; }
  .article-shellbar nav a { padding: 7px 7px 4px; }
  body.article-record-page:not(.migrated-post) { padding: 10px 0 40px; }
  body.article-record-page:not(.migrated-post) > .atlas-container { width: calc(100% - 16px); }
  body.article-record-page:not(.migrated-post) > .atlas-container > .content-block { padding-inline: 18px; }
}

/* Long-form posts join the project-record layout after article-page.js builds its rails. */
body.article-record-page:not(.migrated-post) { min-height: 100vh; padding: 0 0 42px; }
.article-rail-title,
.article-meta-block > p,
.article-neighbours > p {
  margin: 0 0 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--record-border);
  color: #0a0a0a;
  font-weight: 700;
}
.article-outline li.article-outline--sub a { font-size: 9px; }
.article-outline li.article-outline--sub a b { padding-left: 10px; }
.article-index-link { display: inline-block; margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--record-line); color: var(--record-blue); text-decoration: none; }
.article-main { min-width: 0; border-inline: 1px solid var(--record-line); background: var(--record-paper); }
.article-main > .atlas-container {
  width: 100%;
  margin: 0;
  overflow: clip;
  border: 0;
  background: var(--record-paper);
  box-shadow: none;
}
.article-main > .atlas-container::before {
  content: attr(data-document-path) "  [ DOCUMENT VIEW ]";
  display: block;
  height: 30px;
  padding: 0 18px;
  border-bottom: 1px solid var(--record-border);
  background: rgba(10, 10, 10, .025);
  color: var(--record-muted);
  font: 700 8px/30px 'JetBrains Mono', monospace;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.article-main > .atlas-container #site-passport {
  padding: 18px var(--notebook-record-inset, 28px) 0;
}
.article-main > .atlas-container > .content-block { padding-inline: var(--notebook-record-inset, 28px); }
.article-main > .post-shell { width: auto; margin: 0; }
.article-main .post-header { padding: 26px var(--notebook-record-inset, 28px); background: var(--record-paper); }
.article-main .post-header h1 { font-size: clamp(26px, 3.2vw, 34px); }
.article-main .content-block { background: var(--record-paper); }
.article-meta-block { margin-bottom: 18px; }
.article-meta-block dl { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.article-meta-block dt,
.article-meta-block dd { margin: 0; padding: 4px 0; border-bottom: 1px dotted var(--record-line); }
.article-meta-block dd { color: #0a0a0a; text-align: right; }
.article-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.article-tags span { padding: 2px 4px; border: 1px solid var(--record-line); color: #0a0a0a; }
.article-neighbours { margin-top: 28px; }
.article-neighbours a { display: block; padding: 7px 0; border-bottom: 1px solid var(--record-line); color: #0a0a0a; text-decoration: none; }
.article-neighbours a:hover { color: var(--record-blue); }
.article-record-page .article-main #atlas-footer { width: auto; min-height: 0; margin: 24px 26px 28px; padding: 0; display: block; border: 1px solid var(--record-line); }
.atlas-local-footer { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.atlas-local-footer section { min-width: 0; padding: 11px 13px 12px; border-right: 1px solid var(--record-line); }
.atlas-local-footer section:last-child { border-right: 0; }
.atlas-local-footer p { margin: 0 0 7px; padding-bottom: 5px; border-bottom: 1px solid var(--record-line); color: var(--record-muted); font: 700 8px/1.4 'JetBrains Mono', monospace; letter-spacing: .06em; }
.atlas-local-footer a { display: block; overflow-wrap: anywhere; padding: 3px 0; color: #0a0a0a; font: 9px/1.45 'JetBrains Mono', monospace; text-decoration: none; }
.atlas-local-footer a:hover { color: var(--record-blue); }
.article-site-footer {
  width: min(1360px, calc(100vw - 36px));
  min-height: 55px;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  border: 0;
  border-top: 1px solid var(--record-border);
  background: transparent;
  color: var(--record-muted);
  font: 8px/1.4 'JetBrains Mono', monospace;
}
.article-site-footer a { justify-self: end; color: #0a0a0a; text-decoration: underline; text-underline-offset: 2px; }
.article-site-footer a:hover { color: var(--record-blue); }

/* Shared article afterword: social distribution and automatic discovery. */
.article-afterword {
  margin: 42px 26px 0;
  padding-top: 18px;
  color: #0a0a0a;
  font: 10px/1.5 'JetBrains Mono', monospace;
}
.article-end-marker {
  display: grid;
  grid-template-columns: minmax(24px, 1fr) auto minmax(24px, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  color: var(--record-muted);
}
.article-end-marker span { height: 1px; background: var(--record-border); }
.article-end-marker strong { color: var(--record-blue); font-size: 8px; font-weight: 700; letter-spacing: .08em; }
.article-afterword__header {
  min-height: 30px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--record-line);
}
.article-afterword__header span { color: var(--record-muted); font-size: 8px; letter-spacing: .06em; }
.article-afterword__header strong { font-size: 11px; }
.article-share__links { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0 24px; }
.article-share__links a {
  padding: 5px 9px;
  border: 1px solid var(--record-border);
  background: transparent;
  color: #0a0a0a;
  text-decoration: none;
}
.article-share__links a::before { content: '['; color: var(--record-muted); }
.article-share__links a::after { content: ']'; color: var(--record-muted); }
.article-share__links a:hover,
.article-share__links a:focus-visible {
  border-color: #008181;
  background: #008181;
  color: #fff;
  outline: 0;
}
.article-share__links a:hover::before,
.article-share__links a:hover::after,
.article-share__links a:focus-visible::before,
.article-share__links a:focus-visible::after { color: #fff; }
.article-related { margin-top: 4px; }
.article-related__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--record-line);
  border-left: 1px solid var(--record-line);
}
.article-related-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  grid-template-rows: minmax(104px, auto);
  border-right: 1px solid var(--record-line);
  border-bottom: 1px solid var(--record-line);
  color: #0a0a0a;
  text-decoration: none;
}
.article-related-card__media {
  display: grid;
  place-items: center;
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid var(--record-line);
  background: rgba(10, 10, 10, .035);
  color: var(--record-muted);
  font-size: 8px;
}
.article-related-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.article-related-card__body { display: flex; min-width: 0; flex-direction: column; padding: 9px 10px; }
.article-related-card__body small { color: var(--record-muted); font-size: 8px; text-transform: uppercase; }
.article-related-card__body strong { margin: 4px 0; font-size: 10px; line-height: 1.35; }
.article-related-card__body > span { display: -webkit-box; overflow: hidden; color: var(--record-muted); font-size: 8px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.article-related-card__body i { margin-top: auto; padding-top: 6px; color: var(--record-blue); font-size: 8px; font-style: normal; }
.article-related-card:hover,
.article-related-card:focus-visible { background: rgba(0, 129, 129, .08); outline: 1px solid #008181; outline-offset: -1px; }
.article-function-bar { grid-template-columns: repeat(8, minmax(0, 1fr)); }

@media (max-width: 760px) {
  .article-main { border: 1px solid var(--record-line); }
  .article-main > .atlas-container #site-passport { padding: 14px 18px 0; }
  .article-main > .atlas-container > .content-block,
  .article-main .post-header { padding-inline: 18px; }
  .article-record-page .article-main #atlas-footer { margin-inline: 18px; }
  .article-afterword { margin-inline: 18px; }
  .article-related__grid { grid-template-columns: 1fr; }
  .article-related-card { grid-template-columns: 112px minmax(0, 1fr); grid-template-rows: minmax(118px, auto); }
  .atlas-local-footer { grid-template-columns: 1fr; }
  .atlas-local-footer section { border-right: 0; border-bottom: 1px solid var(--record-line); }
  .atlas-local-footer section:last-child { border-bottom: 0; }
  .article-site-footer { width: calc(100vw - 20px); grid-template-columns: 1fr auto; }
  .article-site-footer span:nth-child(2) { display: none; }
}

/* Canonical Atlas page geometry.
   Indexes, project records, and long-form articles share this one shell. */
:root {
  --notebook-shell-width: 1360px;
  --notebook-page-edge: 36px;
  --notebook-rail-width: 188px;
  --notebook-meta-width: 176px;
  --notebook-column-gap: 28px;
  --notebook-shell-top: 18px;
  --notebook-shell-bottom: 48px;
  --notebook-record-inset: 28px;
}

/* Keep section headings below the sticky navigation on direct fragment visits. */
html { scroll-padding-top: 48px; }
@media(max-width:760px){
  html { scroll-padding-top: 104px; }
}

/* Seven public destinations remain visible instead of overflowing small screens. */
@media(max-width:1000px){
  .shellbar .shell-status,.article-shellbar .article-shellbar__status{display:none}
}
@media(max-width:760px){
  .shellbar,.article-shellbar{
    height:auto;
    grid-template-columns:minmax(0,1fr);
    row-gap:6px;
  }
  .shellbar nav,.article-shellbar nav{
    grid-column:1;
    min-width:0;
    width:100%;
    height:auto;
    flex-wrap:wrap;
    row-gap:4px;
    margin-top:0;
    overflow:visible;
  }
}

.workspace,
.article-workspace {
  width: min(var(--notebook-shell-width), calc(100vw - var(--notebook-page-edge)));
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--notebook-rail-width) minmax(0, 1fr) var(--notebook-meta-width);
  gap: var(--notebook-column-gap);
  align-items: start;
  padding: var(--notebook-shell-top) 0 var(--notebook-shell-bottom);
}

.rail,
.article-rail,
.meta-rail,
.article-meta {
  position: sticky;
  top: 52px;
  max-height: calc(100vh - 72px);
  margin-top: 2px;
  overflow: auto;
  color: var(--atlas-ink-muted);
  font: 10px/1.5 var(--atlas-font-mono);
}

.rail ol,
.article-global-nav,
.article-outline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail li a,
.article-global-nav a,
.article-outline li a {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  padding: 4px 0;
  color: inherit;
  text-decoration: none;
}

.rail li a:hover,
.rail li a:focus-visible,
.rail li a.active,
.article-global-nav a:hover,
.article-global-nav a:focus-visible,
.article-global-nav a.active,
.article-outline li a:hover,
.article-outline li a:focus-visible,
.article-outline li a.active {
  color: var(--atlas-accent);
  background: var(--atlas-accent-soft);
  box-shadow: inset 2px 0 0 var(--atlas-accent);
  outline: 0;
}

.rail li a span,
.article-global-nav a span,
.article-outline li a span {
  color: var(--atlas-accent);
}

.rail li a b,
.article-global-nav a b,
.article-outline li a b {
  min-width: 0;
  font-weight: 400;
}

.rail li a.active span { font-weight: 700; }
.rail-title,
.meta-block > p,
.article-rail-title,
.article-meta-block > p {
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line2, rgba(10, 10, 10, .28));
  font-size: 8px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.article-rail-context-title,
.project-context-title { margin-top: 22px; }

/* One navigation language for home, indexes, projects, and long-form records. */
.rail,
.article-rail { scrollbar-width: thin; }

.rail ol,
.article-global-nav,
.article-outline { margin-bottom: 16px; }

.rail li a,
.article-global-nav a,
.article-outline li a {
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 4px;
  margin-left: -8px;
  padding: 4px 6px;
  border-left: 2px solid transparent;
  background: transparent;
  box-shadow: none;
  color: var(--atlas-ink-muted);
  line-height: 1.35;
}

.rail li a:hover,
.rail li a:focus-visible,
.article-global-nav a:hover,
.article-global-nav a:focus-visible,
.article-outline li a:hover,
.article-outline li a:focus-visible {
  border-left-color: var(--atlas-accent-hi);
  background: rgba(0, 129, 129, .06);
  color: var(--atlas-accent-hi);
  box-shadow: none;
  outline: 0;
}

.rail li a.active,
.article-global-nav a.active,
.article-outline li a.active {
  border-left-color: var(--atlas-accent);
  background: var(--atlas-accent-soft);
  color: var(--atlas-accent);
  box-shadow: none;
}

.rail li a span,
.article-global-nav a span,
.article-outline li a span {
  color: var(--atlas-ink-faint);
  font-variant-numeric: tabular-nums;
}

.rail li a.active span,
.article-global-nav a.active span,
.article-outline li a.active span { color: var(--atlas-accent); }

/* Context changes the commands, never the footer-command visual system. */
body > .function-bar {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  height: 32px;
  padding: 3px 10px;
  display: grid;
  gap: 5px;
  border-top: 0;
  background: #0a0a0a;
  color: #fff;
}

body > .function-bar .vc-button {
  min-width: 0;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  border: 0;
  background: #161616;
  color: #ddd;
  font: 9px/1.4 var(--atlas-font-mono);
  text-decoration: none;
  cursor: pointer;
}

body > .function-bar .vc-button::after { display: none; }
body > .function-bar .vc-button:hover,
body > .function-bar .vc-button:focus-visible {
  border: 0;
  background: var(--atlas-accent);
  color: #fff;
  outline: 0;
}

body > .function-bar kbd {
  min-width: 25px;
  color: #888;
  font: inherit;
  font-weight: 700;
}

body > .function-bar .vc-button:hover kbd,
body > .function-bar .vc-button:focus-visible kbd { color: #ffff55; }

@media (max-width: 1100px) {
  .workspace,
  .article-workspace {
    grid-template-columns: 168px minmax(0, 1fr);
    gap: 18px;
  }

  .meta-rail,
  .article-meta { display: none; }
}

@media (max-width: 760px) {
  .workspace,
  .article-workspace {
    width: calc(100vw - 20px);
    display: block;
    padding-top: 10px;
  }

  .rail,
  .article-rail {
    position: static;
    max-height: none;
    margin: 0 0 12px;
  }

  .rail ol,
  .article-global-nav,
  .article-outline {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
  }

  .rail li a,
  .article-global-nav a,
  .article-outline li a {
    display: block;
    padding-inline: 0;
    box-shadow: none;
  }

  body > .function-bar {
    height: 38px;
    padding: 5px 8px;
    display: flex;
    overflow-x: auto;
  }

  body > .function-bar .vc-button { flex: 0 0 auto; }
  body > .function-bar .vc-button span { display: none; }

  .rail li a span,
  .article-global-nav a span,
  .article-outline li a span {
    display: inline;
    margin-right: 4px;
  }
}

.seo-heading{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
