/* PrismJS 1.30.0
https://prismjs.com/download.html?ref=ghost.org#themes=prism-tomorrow&languages=markup+css+clike+javascript+bash+batch+c+csharp+cpp+dart+excel-formula+gml+git+javadoclike+lua+markup-templating+php+phpdoc+python+r+sql&plugins=line-numbers+toolbar+copy-to-clipboard+download-button */

code[class*=language-],pre[class*=language-]{
  color:#ccc;
  background:0 0;
  font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;
  font-size:1em;
  text-align:left;
  white-space:pre;
  word-spacing:normal;
  word-break:normal;
  word-wrap:normal;
  line-height:1.5;
  -moz-tab-size:4;
  -o-tab-size:4;
  tab-size:4;
  hyphens:none
}

pre[class*=language-]{
  padding:1em;
  margin:.5em 0;
  overflow:auto
}

:not(pre)>code[class*=language-],pre[class*=language-]{
  background:#2d2d2d
}

:not(pre)>code[class*=language-]{
  padding:.1em;
  border-radius:.3em;
  white-space:normal
}

.token.block-comment,.token.cdata,.token.comment,.token.doctype,.token.prolog{
  color:#999
}

.token.punctuation{
  color:#ccc
}

.token.attr-name,.token.deleted,.token.namespace,.token.tag{
  color:#e2777a
}

.token.function-name{
  color:#6196cc
}

.token.boolean,.token.function,.token.number{
  color:#f08d49
}

.token.class-name,.token.constant,.token.property,.token.symbol{
  color:#f8c555
}

.token.atrule,.token.builtin,.token.important,.token.keyword,.token.selector{
  color:#cc99cd
}

.token.attr-value,.token.char,.token.regex,.token.string,.token.variable{
  color:#7ec699
}

.token.entity,.token.operator,.token.url{
  color:#67cdcc
}

.token.bold,.token.important{
  font-weight:700
}

.token.italic{
  font-style:italic
}

.token.entity{
  cursor:help
}

.token.inserted{
  color:green
}

pre[class*=language-].line-numbers{
  position:relative;
  padding-left:3.8em;
  counter-reset:linenumber
}

pre[class*=language-].line-numbers>code{
  position:relative;
  white-space:inherit
}

.line-numbers .line-numbers-rows{
  position:absolute;
  pointer-events:none;
  top:0;
  font-size:100%;
  left:-3.8em;
  width:3em;
  letter-spacing:-1px;
  border-right:1px solid #999;
  -webkit-user-select:none;
  -moz-user-select:none;
  user-select:none
}

.line-numbers-rows>span{
  display:block;
  counter-increment:linenumber
}

.line-numbers-rows>span:before{
  content:counter(linenumber);
  color:#999;
  display:block;
  padding-right:.8em;
  text-align:right
}

div.code-toolbar{
  position:relative
}

div.code-toolbar>.toolbar{
  position:absolute;
  z-index:10;
  top:.3em;
  right:.2em;
  transition:opacity .3s ease-in-out;
  opacity:0
}

div.code-toolbar:hover>.toolbar{
  opacity:1
}

div.code-toolbar:focus-within>.toolbar{
  opacity:1
}

div.code-toolbar>.toolbar>.toolbar-item{
  display:inline-block
}

div.code-toolbar>.toolbar>.toolbar-item>a{
  cursor:pointer
}

div.code-toolbar>.toolbar>.toolbar-item>button{
  background:0 0;
  border:0;
  color:inherit;
  font:inherit;
  line-height:normal;
  overflow:visible;
  padding:0;
  -webkit-user-select:none;
  -moz-user-select:none;
  -ms-user-select:none
}

div.code-toolbar>.toolbar>.toolbar-item>a,div.code-toolbar>.toolbar>.toolbar-item>button,div.code-toolbar>.toolbar>.toolbar-item>span{
  color:#bbb;
  font-size:.8em;
  padding:0 .5em;
  background:#f5f2f0;
  background:rgba(224,224,224,.2);
  box-shadow:0 2px 0 0 rgba(0,0,0,.2);
  border-radius:.5em
}

div.code-toolbar>.toolbar>.toolbar-item>a:focus,div.code-toolbar>.toolbar>.toolbar-item>a:hover,div.code-toolbar>.toolbar>.toolbar-item>button:focus,div.code-toolbar>.toolbar>.toolbar-item>button:hover,div.code-toolbar>.toolbar>.toolbar-item>span:focus,div.code-toolbar>.toolbar>.toolbar-item>span:hover{
  color:inherit;
  text-decoration:none
}

/* ── Ghost bookmark cards (kg-bookmark) ───────────────────────────────
   Ghost auto-injects cards.min.css via {{ghost_head}} when
   `card_assets: true`, which sets `.kg-bookmark-card a.kg-bookmark-container
   { background: #fff; color: #222; ... }`. Since that loads AFTER our CSS
   files, we beat it on specificity by always prefixing with `.kg-card`. */

.kg-card.kg-bookmark-card {
  margin: 1.75rem 0;
  border-radius: 8px;
  border: 1px solid var(--line);
  background-color: var(--card);
  overflow: hidden;
  transition: border-color 150ms ease;
}

.kg-card.kg-bookmark-card:hover {
  border-color: var(--accent-line);
}

.kg-card.kg-bookmark-card:focus-within {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

.kg-card.kg-bookmark-card a.kg-bookmark-container,
.kg-card.kg-bookmark-card a.kg-bookmark-container:hover {
  display: flex;
  width: 100%;
  background-color: transparent;
  border: 0;
  border-radius: 0;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-mono);
}

.kg-card.kg-bookmark-card .kg-bookmark-content {
  flex-grow: 1;
  min-width: 0;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background-color: transparent;
}

.kg-card.kg-bookmark-card .kg-bookmark-title {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--accent-text);
  margin: 0;
  line-height: 1.3;
  transition: -webkit-text-decoration 150ms ease;
  transition: text-decoration 150ms ease;
  transition: text-decoration 150ms ease, -webkit-text-decoration 150ms ease;
}

.kg-card.kg-bookmark-card:hover .kg-bookmark-title {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.kg-card.kg-bookmark-card .kg-bookmark-description {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kg-card.kg-bookmark-card .kg-bookmark-metadata {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.25rem;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-wrap: wrap;
}

.kg-card.kg-bookmark-card .kg-bookmark-icon {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  flex-shrink: 0;
  border: 0;
  margin: 0;
}

.kg-card.kg-bookmark-card .kg-bookmark-author,
.kg-card.kg-bookmark-card .kg-bookmark-publisher {
  white-space: nowrap;
}

/* Hide publisher to avoid common author=publisher duplication */

.kg-card.kg-bookmark-card .kg-bookmark-author + .kg-bookmark-publisher {
  display: none;
}

.kg-card.kg-bookmark-card .kg-bookmark-thumbnail {
  flex-shrink: 0;
  width: 32%;
  max-width: 200px;
  background-color: var(--panel);
  overflow: hidden;
  border: 0;
  border-left: 1px solid var(--line);
}

.kg-card.kg-bookmark-card .kg-bookmark-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  border: 0;
  border-radius: 0;
  margin: 0;
}

@media (max-width: 640px) {
  .kg-card.kg-bookmark-card a.kg-bookmark-container {
    flex-direction: column-reverse;
  }

  .kg-card.kg-bookmark-card .kg-bookmark-thumbnail {
    width: 100%;
    max-width: none;
    aspect-ratio: 16 / 9;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }
}

/* Dark mode styling for Twitter/X embeds and other social media embeds */

/* Twitter/X embed dark mode */

.dark .twitter-tweet,
.dark .twitter-timeline,
.dark iframe[src*="twitter.com"],
.dark iframe[src*="x.com"] {
  background-color: #1a1a1a !important;
  border-radius: 12px !important;
  border: 1px solid #333 !important;
  color: #e6e7ea !important;
}

/* Twitter widget in dark mode */

.dark [data-tweet],
.dark [data-twitter-tweet],
.dark .twitter-tweet {
  background-color: #1a1a1a !important;
  border-color: #333 !important;
  border-radius: 12px !important;
  color: #e6e7ea !important;
  margin: 1.5em auto !important;
  overflow: hidden !important;
}

/* Tweet text */

.dark .twitter-tweet p,
.dark [data-tweet] p,
.dark [data-twitter-tweet] p {
  color: #e6e7ea !important;
}

/* Username, handle, dates */

.dark .twitter-tweet a,
.dark [data-tweet] a,
.dark [data-twitter-tweet] a {
  color: #1d9bf0 !important;
}

/* Twitter widget background card */

.dark .twitter-tweet,
.dark .twitter-tweet-rendered,
.dark .twitter-timeline-rendered {
  background-color: #1a1a1a !important;
}

/* Force image scaling */

.dark .twitter-tweet img,
.dark [data-tweet] img,
.dark [data-twitter-tweet] img {
  max-width: 100% !important;
}

/* Use Shadow DOM technique to penetrate into Twitter iframe */

@supports (selector(:host)) {
  html[class*="dark"] {
    --twitter-bg-color: #1a1a1a;
    --twitter-text-color: #e6e7ea;
    --twitter-link-color: #1d9bf0;
    --twitter-border-color: #333;
  }
}

/* NO FILTER APPROACH - Removed to prevent image inversion */

/* Blockquote format for Twitter embeds in case the embed doesn't load */

.dark blockquote.twitter-tweet {
  background-color: #1a1a1a !important;
  border-color: #333 !important;
  border-radius: 12px;
  color: #e6e7ea !important;
  padding: 1rem !important;
}

/* Direct approach for Tweet iframe body - this is more experimental but can work */

html.dark ~ iframe[src*="twitter"],
html.dark ~ iframe[src*="x.com"] {
  color-scheme: dark !important;
}

/* Apply a special class to Twitter embed cards */

.kg-embed-card {
  position: relative;
  margin: 1.5em 0;
  max-width: 100%;
}

/* For embedded Tweets we inject our own dark mode overlay */

.dark .kg-embed-card[data-card-type="embed"] {
  position: relative;
}

.dark .kg-embed-card[data-card-type="embed"]::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 26, 26, 0.1);
  pointer-events: none;
  z-index: 10;
}

/* Ensure Twitter widget scripts know we're in dark mode */

html.dark body twitter-widget {
  color-scheme: dark !important;
}

/* Force any iframes within the content to respect dark mode */

.dark iframe {
  color-scheme: dark;
}

/* Responsive YouTube embeds */

.kg-embed-card iframe[src*="youtube.com"],
.kg-embed-card iframe[src*="youtu.be"] {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

*, ::before, ::after{
  --tw-border-spacing-x:0;
  --tw-border-spacing-y:0;
  --tw-translate-x:0;
  --tw-translate-y:0;
  --tw-rotate:0;
  --tw-skew-x:0;
  --tw-skew-y:0;
  --tw-scale-x:1;
  --tw-scale-y:1;
  --tw-pan-x: ;
  --tw-pan-y: ;
  --tw-pinch-zoom: ;
  --tw-scroll-snap-strictness:proximity;
  --tw-gradient-from-position: ;
  --tw-gradient-via-position: ;
  --tw-gradient-to-position: ;
  --tw-ordinal: ;
  --tw-slashed-zero: ;
  --tw-numeric-figure: ;
  --tw-numeric-spacing: ;
  --tw-numeric-fraction: ;
  --tw-ring-inset: ;
  --tw-ring-offset-width:0px;
  --tw-ring-offset-color:#fff;
  --tw-ring-color:rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow:0 0 #0000;
  --tw-ring-shadow:0 0 #0000;
  --tw-shadow:0 0 #0000;
  --tw-shadow-colored:0 0 #0000;
  --tw-blur: ;
  --tw-brightness: ;
  --tw-contrast: ;
  --tw-grayscale: ;
  --tw-hue-rotate: ;
  --tw-invert: ;
  --tw-saturate: ;
  --tw-sepia: ;
  --tw-drop-shadow: ;
  --tw-backdrop-blur: ;
  --tw-backdrop-brightness: ;
  --tw-backdrop-contrast: ;
  --tw-backdrop-grayscale: ;
  --tw-backdrop-hue-rotate: ;
  --tw-backdrop-invert: ;
  --tw-backdrop-opacity: ;
  --tw-backdrop-saturate: ;
  --tw-backdrop-sepia: ;
  --tw-contain-size: ;
  --tw-contain-layout: ;
  --tw-contain-paint: ;
  --tw-contain-style: 
}

::backdrop{
  --tw-border-spacing-x:0;
  --tw-border-spacing-y:0;
  --tw-translate-x:0;
  --tw-translate-y:0;
  --tw-rotate:0;
  --tw-skew-x:0;
  --tw-skew-y:0;
  --tw-scale-x:1;
  --tw-scale-y:1;
  --tw-pan-x: ;
  --tw-pan-y: ;
  --tw-pinch-zoom: ;
  --tw-scroll-snap-strictness:proximity;
  --tw-gradient-from-position: ;
  --tw-gradient-via-position: ;
  --tw-gradient-to-position: ;
  --tw-ordinal: ;
  --tw-slashed-zero: ;
  --tw-numeric-figure: ;
  --tw-numeric-spacing: ;
  --tw-numeric-fraction: ;
  --tw-ring-inset: ;
  --tw-ring-offset-width:0px;
  --tw-ring-offset-color:#fff;
  --tw-ring-color:rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow:0 0 #0000;
  --tw-ring-shadow:0 0 #0000;
  --tw-shadow:0 0 #0000;
  --tw-shadow-colored:0 0 #0000;
  --tw-blur: ;
  --tw-brightness: ;
  --tw-contrast: ;
  --tw-grayscale: ;
  --tw-hue-rotate: ;
  --tw-invert: ;
  --tw-saturate: ;
  --tw-sepia: ;
  --tw-drop-shadow: ;
  --tw-backdrop-blur: ;
  --tw-backdrop-brightness: ;
  --tw-backdrop-contrast: ;
  --tw-backdrop-grayscale: ;
  --tw-backdrop-hue-rotate: ;
  --tw-backdrop-invert: ;
  --tw-backdrop-opacity: ;
  --tw-backdrop-saturate: ;
  --tw-backdrop-sepia: ;
  --tw-contain-size: ;
  --tw-contain-layout: ;
  --tw-contain-paint: ;
  --tw-contain-style: 
}

/* ! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com */

/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box;
  /* 1 */
  border-width: 0;
  /* 2 */
  border-style: solid;
  /* 2 */
  border-color: #e5e7eb;
  /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5;
  /* 1 */
  -webkit-text-size-adjust: 100%;
  /* 2 */
  -moz-tab-size: 4;
  /* 3 */
  -o-tab-size: 4;
     tab-size: 4;
  /* 3 */
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  /* 4 */
  font-feature-settings: normal;
  /* 5 */
  font-variation-settings: normal;
  /* 6 */
  -webkit-tap-highlight-color: transparent;
  /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0;
  /* 1 */
  line-height: inherit;
  /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0;
  /* 1 */
  color: inherit;
  /* 2 */
  border-top-width: 1px;
  /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

a {
  color: inherit;
  text-decoration: inherit;
}

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: "Atkinson Hyperlegible Mono", ui-monospace, Menlo, Consolas, monospace;
  /* 1 */
  font-feature-settings: normal;
  /* 2 */
  font-variation-settings: normal;
  /* 3 */
  font-size: 1em;
  /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0;
  /* 1 */
  border-color: inherit;
  /* 2 */
  border-collapse: collapse;
  /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  /* 1 */
  font-feature-settings: inherit;
  /* 1 */
  font-variation-settings: inherit;
  /* 1 */
  font-size: 100%;
  /* 1 */
  font-weight: inherit;
  /* 1 */
  line-height: inherit;
  /* 1 */
  letter-spacing: inherit;
  /* 1 */
  color: inherit;
  /* 1 */
  margin: 0;
  /* 2 */
  padding: 0;
  /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button;
  /* 1 */
  background-color: transparent;
  /* 2 */
  background-image: none;
  /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield;
  /* 1 */
  outline-offset: -2px;
  /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button;
  /* 1 */
  font: inherit;
  /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/

dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1;
  /* 1 */
  color: #9ca3af;
  /* 2 */
}

input::placeholder,
textarea::placeholder {
  opacity: 1;
  /* 1 */
  color: #9ca3af;
  /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/

:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  /* 1 */
  vertical-align: middle;
  /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/* Make elements with the HTML hidden attribute stay hidden by default */

[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}

.container{
  width:100%
}

@media (min-width: 640px){
  .container{
    max-width:640px
  }
}

@media (min-width: 768px){
  .container{
    max-width:768px
  }
}

@media (min-width: 900px){
  .container{
    max-width:900px
  }
}

@media (min-width: 1024px){
  .container{
    max-width:1024px
  }
}

@media (min-width: 1280px){
  .container{
    max-width:1280px
  }
}

@media (min-width: 1536px){
  .container{
    max-width:1536px
  }
}

.visible{
  visibility:visible
}

.static{
  position:static
}

.fixed{
  position:fixed
}

.absolute{
  position:absolute
}

.sticky{
  position:sticky
}

.inset-0{
  inset:0px
}

.z-30{
  z-index:30
}

.block{
  display:block
}

.inline{
  display:inline
}

.flex{
  display:flex
}

.grid{
  display:grid
}

.hidden{
  display:none
}

.min-h-screen{
  min-height:100vh
}

.-translate-x-full{
  --tw-translate-x:-100%;
  transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))
}

.resize{
  resize:both
}

.flex-col{
  flex-direction:column
}

.overflow-hidden{
  overflow:hidden
}

.bg-black{
  --tw-bg-opacity:1;
  background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))
}

.bg-opacity-50{
  --tw-bg-opacity:0.5
}

.blur{
  --tw-blur:blur(8px);
  filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)
}

.filter{
  filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)
}

.transition-transform{
  transition-property:transform;
  transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration:150ms
}

.duration-300{
  transition-duration:300ms
}

/* ── Design tokens (redesign brief) ──
   Light = default :root, dark = .dark on <html>. CSS custom properties so
   templates can use them in inline gradients/overlays without a build step. */

:root {
  --font-mono: "Atkinson Hyperlegible Mono", ui-monospace, Menlo, Consolas, monospace;
  --gh-font-heading: var(--font-mono);
  --gh-font-body: var(--font-mono);
  /* Surfaces (light mode — kept as a sensible inverse of the dark spec) */
  --bg: #ffffff;
  --panel: #f5f6f8;
  --card: #ffffff;
  --terminal: #0f1218;
  --line: #e5e7eb;
  --divider: #e5e7eb;
  /* Text */
  --text: #1d232f;
  --text-dim: #4b5563;
  --text-mute: #6e7480;
  /* Accent + status (same in both modes) */
  --accent: #e9805d;
  --accent-soft: rgba(233, 128, 93, 0.12);
  --accent-line: rgba(233, 128, 93, 0.3);
  /* Coral for text — darkened in light mode to reach WCAG AA (4.5:1) on white */
  --accent-text: #c4532f;
  --prompt: #6dd09a;
  --traffic-red: #ff5f56;
  --traffic-yellow: #ffbd2e;
  --traffic-green: #27c93f;
}

.dark {
  --bg: #1d232f;
  --panel: #181d28;
  --card: #232936;
  --line: #2d3340;
  --divider: #232936;
  --text: #e6e7ea;
  --text-dim: #b0b6c1;
  --text-mute: #8a909c;
  --accent-text: #e9805d;
}

/* Custom Styles */

a:focus{
  outline:2px solid transparent;
  outline-offset:2px
}

/* Plain a:hover (0,1,1) so .bml-*:hover rules (0,2,0) can override it. */

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

/* Bookmark card styles moved to assets/css/bookmarks.css (Stage 5b) */

/* Header */

header{
  text-align:center
}

header h1{
  font-family:"Atkinson Hyperlegible Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size:2.25rem;
  line-height:2.5rem;
  --tw-text-opacity:1;
  color:rgb(233 128 93 / var(--tw-text-opacity, 1));
  color: #e9805d
}

h1,
h2,
h3,
h4,
h5,
h6 {
  /* Default only — no !important, so .bml-* component colors apply. */
  font-family:"Atkinson Hyperlegible Mono", ui-monospace, Menlo, Consolas, monospace;
  color: var(--accent-text);
}

/* Prevent transitions on page load */

.no-transition-on-load,
.no-transition-on-load *,
.no-transition-on-load *:before,
.no-transition-on-load *:after {
  transition: none !important;
}

/* Body */

body{
  --tw-bg-opacity:1;
  background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));
  font-family:"Atkinson Hyperlegible Mono", ui-monospace, Menlo, Consolas, monospace;
  --tw-text-opacity:1;
  color:rgb(41 44 47 / var(--tw-text-opacity, 1));
  transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration:300ms;
  color: #292C2F
}

body:is(.dark *){
  --tw-bg-opacity:1;
  background-color:rgb(29 35 47 / var(--tw-bg-opacity, 1));
  --tw-text-opacity:1;
  color:rgb(230 231 234 / var(--tw-text-opacity, 1))
}

/* Table Styling */

table{
  margin-top:1rem;
  margin-bottom:1rem;
  width:100%;
  border-collapse:collapse
}

thead{
  --tw-bg-opacity:1;
  background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))
}

thead:is(.dark *){
  --tw-bg-opacity:1;
  background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))
}

th{
  border-width:1px;
  --tw-border-opacity:1;
  border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));
  padding:0.5rem;
  text-align:left;
  font-weight:700;
  --tw-text-opacity:1;
  color:rgb(41 44 47 / var(--tw-text-opacity, 1));
  color: #292C2F
}

th:is(.dark *){
  --tw-border-opacity:1;
  border-color:rgb(55 65 81 / var(--tw-border-opacity, 1));
  --tw-text-opacity:1;
  color:rgb(255 255 255 / var(--tw-text-opacity, 1))
}

td{
  border-width:1px;
  --tw-border-opacity:1;
  border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));
  padding:0.5rem;
  --tw-text-opacity:1;
  color:rgb(41 44 47 / var(--tw-text-opacity, 1));
  color: #292C2F
}

td:is(.dark *){
  --tw-border-opacity:1;
  border-color:rgb(55 65 81 / var(--tw-border-opacity, 1));
  --tw-text-opacity:1;
  color:rgb(209 213 219 / var(--tw-text-opacity, 1))
}

tr:nth-child(even){
  --tw-bg-opacity:1;
  background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))
}

tr:nth-child(even):is(.dark *){
  --tw-bg-opacity:1;
  background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))
}

tr:hover{
  --tw-bg-opacity:1;
  background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));
  transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration:200ms
}

tr:hover:is(.dark *){
  --tw-bg-opacity:1;
  background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))
}

/* Blockquote/Callout Styling */

blockquote{
  margin-top:1rem;
  margin-bottom:1rem;
  border-left-width:4px;
  --tw-border-opacity:1;
  border-color:rgb(233 128 93 / var(--tw-border-opacity, 1));
  padding-top:0.5rem;
  padding-bottom:0.5rem;
  padding-left:1rem
}

blockquote:is(.dark *){
  --tw-border-opacity:1;
  border-color:rgb(238 150 120 / var(--tw-border-opacity, 1))
}

blockquote p{
  font-weight:400;
  --tw-text-opacity:1;
  color:rgb(107 114 128 / var(--tw-text-opacity, 1))
}

blockquote p:is(.dark *){
  --tw-text-opacity:1;
  color:rgb(156 163 175 / var(--tw-text-opacity, 1))
}

blockquote strong,
blockquote b{
  font-weight:700;
  --tw-text-opacity:1;
  color:rgb(41 44 47 / var(--tw-text-opacity, 1));
  color: #292C2F
}

blockquote strong:is(.dark *),
blockquote b:is(.dark *){
  --tw-text-opacity:1;
  color:rgb(255 255 255 / var(--tw-text-opacity, 1))
}

/* List styling */

ol,
ul{
  margin-bottom:1rem;
  padding-left:1.5rem
}

/* Sidebar list reset */

#sideNav ul,
#sideNav ol{
  margin-bottom:0px;
  list-style-type:none;
  padding-left:0px
}

#sideNav li{
  margin-bottom:0px
}

ol li,
ul li{
  margin-bottom:0.5rem
}

ol li::marker{
  font-weight:700;
  --tw-text-opacity:1;
  color:rgb(233 128 93 / var(--tw-text-opacity, 1));
  color: #e9805d
}

ul li::marker{
  --tw-text-opacity:1;
  color:rgb(233 128 93 / var(--tw-text-opacity, 1));
  color: #e9805d
}

/* List styling for dark mode */

.dark ol,
.dark ul{
  --tw-text-opacity:1;
  color:rgb(230 231 234 / var(--tw-text-opacity, 1))
}

.dark ol li::marker,
.dark ul li::marker{
  --tw-text-opacity:1;
  color:rgb(238 150 120 / var(--tw-text-opacity, 1))
}

/* Post Meta */

header .meta{
  margin-top:1rem;
  margin-bottom:1rem;
  padding-top:0.5rem;
  padding-bottom:0.5rem;
  font-size:0.75rem;
  line-height:1rem;
  --tw-text-opacity:1;
  color:rgb(107 114 128 / var(--tw-text-opacity, 1))
}

/* Subscriber-Only Section */

.gh-post-upgrade-cta{
  border-radius:0.5rem;
  --tw-bg-opacity:1;
  background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));
  padding:1.5rem;
  --tw-text-opacity:1;
  color:rgb(41 44 47 / var(--tw-text-opacity, 1));
  color: #292C2F
}

.gh-post-upgrade-cta-content{
  border-radius:0.5rem !important;
  --tw-bg-opacity:1 !important;
  background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1)) !important;
  padding:2rem !important;
  text-align:center !important;
  --tw-text-opacity:1 !important;
  color:rgb(41 44 47 / var(--tw-text-opacity, 1)) !important;
  color: #292C2F !important
}

.gh-post-upgrade-cta h2{
  margin-bottom:1rem;
  font-family:"Atkinson Hyperlegible Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size:1.5rem;
  line-height:2rem;
  --tw-text-opacity:1;
  color:rgb(233 128 93 / var(--tw-text-opacity, 1));
  color: #e9805d
}

.gh-btn.gh-portal-close{
  border-radius:9999px;
  --tw-bg-opacity:1;
  background-color:rgb(233 128 93 / var(--tw-bg-opacity, 1));
  padding-left:1rem;
  padding-right:1rem;
  padding-top:0.5rem;
  padding-bottom:0.5rem;
  --tw-text-opacity:1;
  color:rgb(255 255 255 / var(--tw-text-opacity, 1));
  transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration:300ms
}

.gh-btn.gh-portal-close:hover{
  --tw-bg-opacity:1;
  background-color:rgb(196 103 67 / var(--tw-bg-opacity, 1))
}

.gh-post-upgrade-cta-content p{
  margin-top:1rem
}

.gh-post-upgrade-cta-content p a{
  --tw-text-opacity:1;
  color:rgb(233 128 93 / var(--tw-text-opacity, 1));
  text-decoration-line:underline;
  transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration:300ms;
  color: #e9805d
}

.gh-post-upgrade-cta-content p a:hover{
  --tw-text-opacity:1;
  color:rgb(196 103 67 / var(--tw-text-opacity, 1))
}

/* Center image captions and adjust spacing */

figure {
  margin: 1.5em auto;
  /* Auto left/right margins for horizontal centering */
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.kg-card-hascaption figcaption {
  text-align: center;
  margin-top: 0.5em;
  font-size: 0.75em;
  color: #666;
}

.dark figcaption {
  color: #a0a0a0;
}

/* ── Bellimal redesign: shell, sidebar, mobile topbar ─────────────────────
   Tokenized via :root custom props (set in Stage 1) so light/dark inherit
   automatically. Tab breakpoint = 900px. Sidebar drawer behaviour relies on
   Tailwind's `-translate-x-full` / `tab:translate-x-0` toggling from JS. */

/* Main content column.
   Mobile: brief calls for 20px side padding (clean reading on 390px). */

.bml-main {
  flex-grow: 1;
  width: 100%;
  padding: 1.25rem 20px 3rem;
  box-sizing: border-box;
}

@media (min-width: 900px) {
  .bml-main {
    margin-left: 260px;
    padding: 2.5rem 2.5rem 4rem;
  }
}

/* Sidebar shell (fixed, becomes a slide-over on mobile) */

.bml-sidebar-shell {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 60;
  width: min(320px, 100%);
  overflow-y: auto;
  background: var(--panel);
  border-right: 1px solid var(--line);
}

@media (min-width: 900px) {
  .bml-sidebar-shell {
    width: 260px;
    height: 100vh;
  }
}

.bml-sidebar-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text-dim);
  cursor: pointer;
  z-index: 1;
}

.bml-sidebar-close:hover {
  border-color: var(--accent-line);
  color: var(--accent-text);
}

.bml-sidebar-close svg {
  width: 14px;
  height: 14px;
}

/* Sidebar contents */

.bml-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem 1rem 1.5rem;
  width: 100%;
  min-height: 100%;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  box-sizing: border-box;
}

.bml-sidebar__identity {
  display: flex;
  gap: 0.625rem;
  align-items: center;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--divider);
}

.bml-sidebar__avatar-link {
  flex-shrink: 0;
  display: inline-flex;
  text-decoration: none;
}

.bml-sidebar__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bml-sidebar__avatar--fallback {
  background: var(--accent-soft);
  color: var(--accent-text);
  border: 1px solid var(--accent-line);
}

.bml-sidebar__avatar--fallback svg {
  width: 16px;
  height: 16px;
}

.bml-sidebar__identity-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.bml-sidebar__name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bml-sidebar__name:hover {
  color: var(--accent-text);
}

.bml-sidebar__status {
  font-size: 11px;
  color: var(--accent-text);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bml-sidebar__status::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--prompt);
  box-shadow: 0 0 6px var(--prompt);
  flex-shrink: 0;
}

/* Sections */

.bml-sidebar__section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bml-sidebar__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

/* Hide SITE section entirely when the nav has no items (modern :has) */

.bml-sidebar__section--site:has(> .bml-sidebar__nav:empty) {
  display: none;
}

/* Nav list */

.bml-sidebar__nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.bml-sidebar__nav-item {
  margin: 0;
  padding: 0;
}

.bml-sidebar__nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.625rem;
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.bml-sidebar__nav-marker {
  display: inline-block;
  width: 0.5rem;
  text-align: center;
  color: var(--text-mute);
  font-weight: 700;
}

.bml-sidebar__nav-marker::before {
  content: "·";
}

.bml-sidebar__nav-link:hover {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.bml-sidebar__nav-item.is-current .bml-sidebar__nav-link {
  background: var(--accent-soft);
  color: var(--accent-text);
  border-color: var(--accent-line);
  font-weight: 700;
}

.bml-sidebar__nav-item.is-current .bml-sidebar__nav-marker {
  color: var(--accent-text);
}

.bml-sidebar__nav-item.is-current .bml-sidebar__nav-marker::before {
  content: "›";
}

/* Topics — collapsible chips */

.bml-sidebar__topics-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--text-mute);
  cursor: pointer;
  font-family: inherit;
}

.bml-sidebar__topics-toggle:hover .bml-sidebar__label {
  color: var(--text);
}

.bml-sidebar__chevron {
  width: 12px;
  height: 12px;
  color: var(--text-mute);
  transition: transform 200ms ease;
}

.bml-sidebar__topics-toggle[aria-expanded="true"] .bml-sidebar__chevron {
  transform: rotate(90deg);
}

.bml-sidebar__topics-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bml-sidebar__topics-body[hidden] {
  display: none;
}

.bml-sidebar__chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.bml-sidebar__chips:not(.is-expanded) > li:nth-child(n + 9) {
  display: none;
}

.bml-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 11px;
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
  white-space: nowrap;
}

.bml-chip:hover {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent-text);
}

.bml-chip__count {
  color: var(--text-mute);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.bml-chip:hover .bml-chip__count {
  color: var(--accent-text);
}

.bml-sidebar__show-more {
  align-self: flex-start;
  background: transparent;
  border: 0;
  padding: 0.25rem 0;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  cursor: pointer;
}

.bml-sidebar__show-more:hover {
  color: var(--accent-text);
}

/* Elsewhere — external link rows */

.bml-sidebar__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.bml-sidebar__ext-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.625rem;
  border-radius: 4px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  transition: background 150ms ease, color 150ms ease;
}

.bml-sidebar__ext-link:hover {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.bml-sidebar__ext-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.bml-sidebar__ext-text {
  flex-grow: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bml-sidebar__ext-arrow {
  color: var(--text-mute);
  font-size: 12px;
  flex-shrink: 0;
}

.bml-sidebar__ext-link:hover .bml-sidebar__ext-arrow {
  color: var(--accent-text);
}

/* Spacer that pushes ELSEWHERE + footer to the bottom of the column */

.bml-sidebar__spacer {
  flex-grow: 1;
  min-height: 0.5rem;
}

/* Footer (search + theme toggle) — pinned by the spacer above */

.bml-sidebar__footer {
  padding-top: 0.875rem;
  border-top: 1px solid var(--divider);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.bml-sidebar__theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.625rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease;
}

.bml-sidebar__theme-toggle:hover {
  border-color: var(--accent-line);
  color: var(--accent-text);
}

.bml-sidebar__privacy-link {
  margin-left: auto;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-mute);
  text-decoration: none;
  transition: color 150ms ease;
}

.bml-sidebar__privacy-link:hover {
  color: var(--accent-text);
}

.bml-sidebar__theme-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* ── Mobile topbar ──────────────────────────────────────────────────────── */

.bml-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
}

.bml-topbar__lights {
  display: inline-flex;
  gap: 0.375rem;
  flex-shrink: 0;
}

.bml-topbar__dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.bml-topbar__dot--red {
  background: var(--traffic-red);
}

.bml-topbar__dot--yellow {
  background: var(--traffic-yellow);
}

.bml-topbar__dot--green {
  background: var(--traffic-green);
}

.bml-topbar__title {
  flex-grow: 1;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bml-topbar__title:hover {
  color: var(--accent-text);
}

.bml-topbar__actions {
  display: inline-flex;
  gap: 0.125rem;
  flex-shrink: 0;
}

.bml-topbar__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: var(--text-dim);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.bml-topbar__icon-btn:hover {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.bml-topbar__icon-btn svg {
  width: 18px;
  height: 18px;
}

/* ── Bellimal redesign: home page (Stage 3) ────────────────────────────── */

/* Inner column — keeps content readable inside main */

.bml-home {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  font-family: var(--font-mono);
  color: var(--text);
}

/* Mono uppercase section labels (// featured, // latest posts, etc.) */

.bml-label-mono {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
}

/* ── Terminal hero ─────────────────────────────────────────────────────── */

/* Terminal stays on the dark slate palette in both light & dark page themes
   — re-declares the relevant tokens so descendants inherit dark values. */

.bml-terminal {
  --panel: #181d28;
  --card: #232936;
  --line: #2d3340;
  --divider: #232936;
  --text: #e6e7ea;
  --text-dim: #b0b6c1;
  --text-mute: #8a909c;
  --accent-text: #e9805d;
  background: var(--terminal);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.bml-terminal__chrome {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.875rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.bml-terminal__lights {
  display: inline-flex;
  gap: 0.375rem;
  flex-shrink: 0;
}

.bml-terminal__dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.bml-terminal__dot--red {
  background: var(--traffic-red);
}

.bml-terminal__dot--yellow {
  background: var(--traffic-yellow);
}

.bml-terminal__dot--green {
  background: var(--traffic-green);
}

.bml-terminal__filename {
  flex-grow: 1;
  text-align: center;
  font-size: 12px;
  color: var(--text-mute);
}

/* Help button in the chrome (also acts as the right-side spacer that
   visually balances the traffic-light triple). */

.bml-terminal__hint {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}

.bml-terminal__hint:hover {
  border-color: var(--accent-line);
  color: var(--accent);
}

.bml-terminal__body {
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-dim);
  min-height: 220px;
  max-height: 60vh;
}

/* Scrollable output region — content scrolls inside the terminal, not page */

.bml-terminal__scroll {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.5rem 1.75rem 0.5rem;
}

.bml-terminal__prompt {
  margin: 0 0 0.5rem;
  color: var(--prompt);
  font-size: 13px;
}

.bml-terminal__prompt::before {
  content: "$ ";
  color: var(--prompt);
}

.bml-terminal__output {
  margin: 0 0 1.5rem;
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
}

.bml-terminal__output--title {
  font-size: clamp(20px, 3.4vw, 28px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--accent);
  line-height: 1.3;
}

.bml-terminal__output a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.bml-terminal__output a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

/* Lines printed at runtime by terminal.js */

.bml-terminal__line {
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
  text-decoration: none;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.bml-terminal__line--error {
  color: var(--traffic-red);
}

.bml-terminal__line--link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.bml-terminal__line--link:hover {
  background: var(--accent-soft);
}

/* Input line — pinned at the bottom of the terminal body */

.bml-terminal__input-line {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.75rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--prompt);
  margin: 0;
}

.bml-terminal__prompt-marker {
  color: var(--prompt);
  font-weight: 700;
  flex-shrink: 0;
}

.bml-terminal__cursor-content {
  display: inline-flex;
  align-items: center;
  color: var(--text);
}

.bml-terminal__cursor-text {
  color: var(--text);
}

.bml-terminal__input {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  padding: 0;
  margin: 0;
  caret-color: var(--accent);
}

/* Faux blinking cursor — only used in the no-JS state. JS upgrade removes
   this element entirely; the native browser caret takes over on focus. */

.bml-terminal__cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  background: var(--accent);
  vertical-align: -2px;
  margin-left: 2px;
  animation: bml-blink 1s step-end infinite;
  flex-shrink: 0;
}

@keyframes bml-blink {
  50% {
    background: transparent;
  }
}

/* ── CTA staple ────────────────────────────────────────────────────────── */

.bml-cta-staple {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  align-items: center;
  margin: 0 0 2.25rem;
}

.bml-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.95rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
  white-space: nowrap;
}

.bml-btn--primary {
  background: var(--accent);
  color: #1d232f;
}

.bml-btn--primary:hover {
  background: #c46743;
  color: #1d232f;
}

.bml-btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.bml-btn--ghost:hover {
  border-color: var(--accent-line);
  color: var(--accent-text);
}

@media (max-width: 480px) {
  .bml-cta-staple {
    flex-direction: column;
    align-items: stretch;
  }

  .bml-btn {
    justify-content: center;
  }
}

/* ── Featured page embed ───────────────────────────────────────────────── */

.bml-featured {
  margin: 0 0 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--divider);
}

.bml-featured__head {
  display: flex;
  align-items: baseline;
  gap: 0.875rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

/* Featured-section header label is coral (more prominent than other
   `// section` markers, which stay text-mute by default). */

.bml-featured__head .bml-label-mono {
  color: var(--accent-text);
}

/* ── Shared "surface" shell — bg / border / hover used by every card-like
      element. Keeps all the cards visually coherent and easy to retune in
      one place. Individual card classes only declare their layout. ────── */

.bml-card,
.bml-featured-card,
.bml-continue__card {
  background: var(--card);
  border: 1px solid var(--line);
  transition: border-color 150ms ease;
}

.bml-card:hover,
.bml-featured-card:hover,
.bml-continue__card:hover {
  border-color: var(--accent-line);
}

/* Featured post card (image left, body right) */

.bml-featured-card {
  display: flex;
  gap: 1.25rem;
  padding: 0.875rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
}

.bml-featured-card__media {
  flex-shrink: 0;
  width: 38%;
  max-width: 320px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 4px;
  background: var(--panel);
}

.bml-featured-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.bml-featured-card__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent) 0%, #8e4a30 65%, var(--terminal) 100%);
}

.bml-featured-card__body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}

.bml-featured-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 11px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bml-featured-card__tag {
  color: var(--accent-text);
}

.bml-featured-card__title {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--accent-text);
  margin: 0;
  line-height: 1.3;
}

.bml-featured-card:hover .bml-featured-card__title {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.bml-featured-card__excerpt {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bml-featured-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
}

.bml-chip-tag {
  display: inline-flex;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  font-size: 11px;
  color: var(--accent-text);
  background: transparent;
}

@media (max-width: 640px) {
  .bml-featured-card {
    flex-direction: column;
  }

  .bml-featured-card__media {
    width: 100%;
    max-width: none;
    aspect-ratio: 16 / 9;
  }
}

/* ── Latest posts (editorial list) ─────────────────────────────────────── */

.bml-posts {
  margin: 0 0 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--divider);
}

.bml-posts__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.bml-posts__all {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  white-space: nowrap;
}

.bml-posts__all:hover {
  color: var(--accent-text);
}

.bml-posts__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bml-post-row {
  border-bottom: 1px solid var(--divider);
}

.bml-post-row:last-child {
  border-bottom: 0;
}

.bml-post-row__link {
  display: flex;
  gap: 1.125rem;
  padding: 1rem 0.25rem;
  text-decoration: none;
  color: var(--text);
  border-radius: 4px;
  transition: background 150ms ease;
}

.bml-post-row__link:hover {
  background: rgba(255, 255, 255, 0.02);
}

.bml-post-row__link:hover .bml-post-row__title {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.bml-post-row__thumb {
  flex-shrink: 0;
  width: 120px;
  height: 80px;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.bml-post-row__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.bml-post-row__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent) 0%, #8e4a30 65%, var(--terminal) 100%);
}

.bml-post-row__body {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.bml-post-row__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 11px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bml-post-row__tag {
  color: var(--accent-text);
}

.bml-post-row__slug {
  color: var(--text-mute);
  text-transform: none;
  letter-spacing: 0;
  font-style: italic;
}

.bml-post-row__title {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--accent-text);
  margin: 0;
  line-height: 1.35;
  transition: color 150ms ease;
}

.bml-post-row__fire {
  font-size: 14px;
  margin-right: 0.25rem;
  display: inline-block;
}

.bml-post-row__excerpt {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 640px) {
  .bml-post-row__thumb {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 480px) {
  .bml-post-row__link {
    flex-direction: column;
    gap: 0.625rem;
  }

  .bml-post-row__thumb {
    width: 100%;
    height: 160px;
  }
}

/* ── Bellimal redesign: post page (Stage 4) ─────────────────────────────
   Hero with feature_image (or coral fallback), title centered + byline.
   Body uses .bml-prose. Footer has share row + Continue Reading card. */

.bml-post {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  font-family: var(--font-mono);
  color: var(--text);
}

/* ── Heroes (post + page) ─────────────────────────────────────────────
   Shared shell: feature_image overlay band with optional gradient fallback.
   Variants:
     .bml-post-hero — used by post.hbs and page.hbs (full-width, byline)
     .bml-page-hero — used by tag/index (capped 920px, subtitle) */

.bml-post-hero,
.bml-page-hero {
  /* Text sits on a darkened image in both modes — keep the bright coral. */
  --accent-text: var(--accent);
  position: relative;
  width: 100%;
  background-color: var(--card);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 2rem;
  display: flex;
  /* lets __inner flex to full height */
}

.bml-post-hero {
  /* min-height lets long titles grow the hero instead of clipping */
  min-height: clamp(220px, 30vh, 320px);
}

.bml-page-hero {
  min-height: clamp(180px, 24vh, 240px);
  max-width: 920px;
  margin: 0 auto 2rem;
}

.bml-post-hero--no-image,
.bml-page-hero--no-image {
  background: linear-gradient(135deg, var(--accent) 0%, #8e4a30 60%, var(--terminal) 100%);
}

/* The responsive-img partial wraps the <img> in a <picture> element. Picture
   defaults to inline display, which can leave a stray inline box that shifts
   the absolutely-positioned <img> inside. `display: contents` lets the img
   behave as a direct child of the hero for layout purposes. */

.bml-post-hero picture,
.bml-page-hero picture {
  display: contents;
}

/* Real <img> behind the content — predictable cover sizing across browsers
   and image aspects. Stays underneath the overlay + content. */

.bml-post-hero__bg,
.bml-page-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: center;
     object-position: center;
  z-index: 0;
  border: 0;
  border-radius: 0;
  margin: 0;
}

.bml-post-hero__overlay,
.bml-page-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(29, 35, 47, 0.15) 0%, rgba(29, 35, 47, 0.45) 65%, var(--bg) 100%);
  z-index: 1;
}

.bml-post-hero__inner,
.bml-page-hero__inner {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  text-align: center;
}

.bml-page-hero__inner {
  gap: 0.5rem;
}

.bml-post-hero__title,
.bml-page-hero__title {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--accent);
  line-height: 1.25;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
}

.bml-post-hero__title {
  font-size: clamp(20px, 2.8vw, 32px);
  margin: 0 0 0.85rem;
  max-width: 800px;
}

.bml-page-hero__title {
  font-size: clamp(22px, 3.4vw, 34px);
  margin: 0;
}

/* Post-hero variant only — byline row + tag + author + avatar */

.bml-post-hero__byline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  font-size: 11px;
  color: #e6e7ea;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.bml-post-hero__tag {
  color: var(--accent);
  text-decoration: none;
}

.bml-post-hero__tag:hover {
  text-decoration: underline;
}

.bml-post-hero__author {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.bml-post-hero__author-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

.bml-post-hero__author-link:hover {
  color: var(--accent);
}

.bml-post-hero__avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
}

/* Feature-image caption (Unsplash credit / photographer attribution).
   Bottom-left corner of the hero, semi-transparent so it stays out of the
   way of the title/byline. Renders only when feature_image_caption is set
   in Ghost editor. Supports HTML (links resolve to coral on hover). */

.bml-post-hero__caption {
  position: absolute;
  left: 1rem;
  bottom: 0.75rem;
  z-index: 3;
  max-width: calc(100% - 2rem);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: rgba(230, 231, 234, 0.75);
  letter-spacing: 0.04em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  margin: 0;
}

.bml-post-hero__caption a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.bml-post-hero__caption a:hover {
  color: var(--accent);
}

@media (max-width: 640px) {
  .bml-post-hero__caption {
    left: 20px;
    bottom: 0.5rem;
    font-size: 10px;
  }
}

/* Page-hero variant only — subtitle */

.bml-page-hero__subtitle {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #e6e7ea;
  margin: 0;
  max-width: 600px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

/* ── Body / prose ───────────────────────────────────────────────────── */

.bml-post-body {
  width: 100%;
  display: flex;
  justify-content: center;
}

.bml-prose {
  width: 100%;
  max-width: 920px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-dim);
}

.bml-prose > *:first-child {
  margin-top: 0;
}

.bml-prose > *:last-child {
  margin-bottom: 0;
}

.bml-prose p {
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-dim);
  margin: 0 0 16px;
}

.bml-prose strong, .bml-prose b {
  color: var(--text);
  font-weight: 700;
}

.bml-prose em, .bml-prose i {
  color: var(--text-dim);
  font-style: italic;
}

.bml-prose a {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: background 150ms ease;
}

.bml-prose a:hover {
  background: var(--accent-soft);
}

.bml-prose h1, .bml-prose h2, .bml-prose h3,
.bml-prose h4, .bml-prose h5, .bml-prose h6 {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 2.2rem 0 0.8rem;
  line-height: 1.3;
}

.bml-prose h1 {
  font-size: 28px;
  color: var(--accent-text);
}

.bml-prose h2 {
  font-size: 22px;
  color: var(--accent-text);
}

.bml-prose h3 {
  font-size: 18px;
  color: var(--accent-text);
}

.bml-prose h4 {
  font-size: 16px;
  color: var(--accent-text);
}

.bml-prose h5, .bml-prose h6 {
  font-size: 14px;
  color: var(--accent-text);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Tailwind's preflight strips list-style; restore it inside prose. */

.bml-prose ul {
  list-style: disc;
  margin: 0 0 16px;
  padding-left: 1.5rem;
  color: var(--text-dim);
}

.bml-prose ol {
  list-style: decimal;
  margin: 0 0 16px;
  padding-left: 1.5rem;
  color: var(--text-dim);
}

.bml-prose ul ul {
  list-style: circle;
}

.bml-prose ul ul ul {
  list-style: square;
}

.bml-prose ul li, .bml-prose ol li {
  margin-bottom: 0.4rem;
  line-height: 1.7;
}

.bml-prose ul li::marker {
  color: var(--accent-text);
}

.bml-prose ol li::marker {
  color: var(--accent-text);
  font-weight: 700;
}

.bml-prose blockquote {
  margin: 1.5rem 0;
  padding: 0.5rem 0 0.5rem 1.25rem;
  border-left: 2px solid var(--accent);
  color: var(--text-dim);
  font-style: italic;
}

.bml-prose blockquote p {
  color: var(--text-dim);
}

.bml-prose blockquote strong {
  color: var(--text);
}

.bml-prose code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--text);
}

.bml-prose pre {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--terminal);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  color: #e6e7ea;
}

.bml-prose pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.bml-prose figure,
.bml-prose .kg-image-card,
.bml-prose .kg-card {
  margin: 1.75rem 0;
  text-align: center;
  /* centers any inline imgs / captions Ghost renders */
}

.bml-prose figure img,
.bml-prose .kg-image,
.bml-prose img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--line);
  margin-left: auto;
  margin-right: auto;
}

/* Picture in prose — pass-through layout (some Ghost cards use <picture>
   for AVIF/WebP and the inline default can off-center the image). */

.bml-prose picture {
  display: block;
  text-align: center;
}

.bml-prose figcaption,
.bml-prose .kg-card-hascaption figcaption {
  font-family: var(--font-mono);
  font-size: 12px;
  font-style: italic;
  color: var(--text-mute);
  text-align: center;
  margin-top: 0.5rem;
}

/* --text-mute, not --divider: an in-article break must read as a break
   (~3:1 on dark slate, ~4.7:1 on white). */

.bml-prose hr {
  border: 0;
  border-top: 1px solid var(--text-mute);
  margin: 2rem 0;
}

/* Ghost editor "wide" + "full" image / gallery card widths. gscan requires
   both classes to be styled. The prose column is 920px; wide breaks out to
   ~85vw, full goes edge-to-edge. */

.bml-prose .kg-width-wide {
  position: relative;
  width: 85vw;
  max-width: 1100px;
  min-width: 100%;
  margin-left: 50%;
  transform: translateX(-50%);
}

.bml-prose .kg-width-full {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
}

@media (max-width: 900px) {
  .bml-prose .kg-width-wide,
  .bml-prose .kg-width-full {
    width: 100%;
    margin-left: 0;
    transform: none;
  }
}

.bml-prose table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 13px;
  table-layout: auto;
}

.bml-prose th, .bml-prose td {
  border: 1px solid var(--line);
  padding: 0.5rem 0.75rem;
  text-align: left;
  overflow-wrap: break-word;
}

@media (max-width: 600px) {
  .bml-prose {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.bml-prose th {
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
}

.bml-prose td {
  color: var(--text-dim);
}

/* ── Post footer ────────────────────────────────────────────────────── */

.bml-post-footer {
  width: 100%;
  max-width: 920px;
  margin: 3rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ── Share row ──────────────────────────────────────────────────────── */

.bml-share {
  padding-top: 1.5rem;
  border-top: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.bml-share__list {
  display: flex;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bml-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease;
  position: relative;
}

.bml-share__btn:hover {
  border-color: var(--accent-line);
  color: var(--accent-text);
}

.bml-share__btn.is-copied {
  border-color: var(--accent);
  color: var(--accent-text);
}

.bml-share__icon {
  width: 14px;
  height: 14px;
}

.bml-share__feedback {
  position: absolute;
  top: -1.75rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--accent-text);
  white-space: nowrap;
  pointer-events: none;
}

/* ── Continue reading card ─────────────────────────────────────────── */

.bml-continue {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--divider);
}

/* If both prev_post AND next_post render, only show the first one */

.bml-continue + .bml-continue {
  display: none;
}

/* Shell rules (bg/border/transition/hover) come from the shared .bml-card,
   .bml-featured-card, .bml-continue__card group above. */

.bml-continue__card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
}

.bml-continue__pill {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.bml-continue__title {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--accent-text);
  margin: 0;
  line-height: 1.35;
}

.bml-continue__excerpt {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0;
}

.bml-continue__more {
  font-size: 12px;
  color: var(--accent-text);
  letter-spacing: 0.04em;
  margin-top: 0.25rem;
}

/* ── Mobile tweaks (heroes) ──────────────────────────────────────────── */

@media (max-width: 640px) {
  .bml-post-hero,
  .bml-page-hero {
    min-height: 180px;
    border-radius: 0;
    margin-left: -20px;
    margin-right: -20px;
    /* width: auto lets the negative margins actually extend the element
       full-bleed. With width: 100% (the base rule), negative margins only
       shift position — the right edge falls 40px short of the viewport. */
    width: auto;
  }

  .bml-post-hero__title,
  .bml-page-hero__title {
    font-size: clamp(22px, 6vw, 30px);
  }

  .bml-post-hero__byline {
    font-size: 10px;
    gap: 0.35rem;
  }
}

/* ── Bellimal redesign: listing pages (Stage 5) ─────────────────────────
   Tag, index, author, error templates share a hero + card grid pattern. */

/* Common listing wrapper */

.bml-listing {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bml-listing--related {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--divider);
}

.bml-listing__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.bml-listing__empty {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-mute);
  padding: 2rem 0;
  text-align: center;
}

/* Page-hero mobile (shared post+page rules live near end of post Stage 4) */

@media (max-width: 640px) {
  .bml-page-hero {
    max-width: none;
  }

  .bml-page-hero__subtitle {
    font-size: 12px;
  }
}

/* ── Author hero card ───────────────────────────────────────────────── */

.bml-author-hero {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 100%;
  max-width: 920px;
  margin: 0 auto 2rem;
}

.bml-author-hero__avatar {
  flex-shrink: 0;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
  background: var(--panel);
}

.bml-author-hero__avatar--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-text);
  border: 1px solid var(--accent-line);
}

.bml-author-hero__avatar--fallback svg {
  width: 32px;
  height: 32px;
}

.bml-author-hero__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bml-author-hero__name {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--accent-text);
  margin: 0;
}

.bml-author-hero__bio {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-dim);
  margin: 0;
}

.bml-author-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bml-author-hero__location {
  color: var(--text-mute);
}

.bml-author-hero__link {
  color: var(--text-dim);
  text-decoration: none;
}

.bml-author-hero__link:hover {
  color: var(--accent-text);
}

@media (max-width: 640px) {
  .bml-author-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .bml-author-hero__meta {
    justify-content: center;
  }
}

/* ── Card grid + cards (tag/index/author/related) ───────────────────── */

.bml-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 900px) {
  .bml-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .bml-card-grid {
    grid-template-columns: 1fr;
  }
}

.bml-card {
  /* Critical: clip overflow at the rounded border. Brief flagged this
     as the spec'd bug from the design canvas — preempt it. */
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
  border-radius: 8px;
  display: flex;
  /* Shell (bg/border/hover) comes from the shared .bml-card group above. */
}

.bml-card__link {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  text-decoration: none;
  color: var(--text);
}

.bml-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--panel);
  overflow: hidden;
}

.bml-card__img {
  display: block;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  border: 0;
  border-radius: 0;
  margin: 0;
}

.bml-card__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent) 0%, #8e4a30 65%, var(--terminal) 100%);
}

.bml-card__tag {
  position: absolute;
  top: 0.625rem;
  left: 0.625rem;
  display: inline-flex;
  padding: 0.18rem 0.55rem;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: rgba(29, 35, 47, 0.65);
  backdrop-filter: blur(4px);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-transform: lowercase;
  white-space: nowrap;
}

.bml-card__body {
  padding: 0 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.bml-card__title {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--accent-text);
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bml-card:hover .bml-card__title {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.bml-card__fire {
  font-size: 14px;
  margin-right: 0.25rem;
}

.bml-card__excerpt {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bml-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 11px;
  color: var(--accent-text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: auto;
}

/* ── Pagination ──────────────────────────────────────────────────────── */

.bml-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 1.5rem 0;
  margin-top: 1rem;
}

.bml-pagination__chip {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.875rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: border-color 150ms ease, color 150ms ease;
}

.bml-pagination__chip:hover {
  border-color: var(--accent-line);
  color: var(--accent-text);
}

.bml-pagination__chip--disabled {
  opacity: 0.4;
  pointer-events: none;
}

.bml-pagination__indicator {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-mute);
  text-transform: uppercase;
}

/* ── Error / 404 ────────────────────────────────────────────────────── */

.bml-error {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.bml-error__caption {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
  text-align: center;
  margin: 0;
}

.dark\:block:is(.dark *){
  display:block
}

.dark\:hidden:is(.dark *){
  display:none
}

@media (min-width: 900px){
  .tab\:hidden{
    display:none
  }

  .tab\:translate-x-0{
    --tw-translate-x:0px;
    transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))
  }

  .tab\:flex-row{
    flex-direction:row
  }
}
