/* Jesse site theme, following the Tag1 Consulting brand.
   Loaded through book.toml additional-css, after mdBook's own styles.

   Brand: Poppins type; Merge Request Navy, Node Jade, Fork Orange Red,
   Bus Factor Blue, Copyleft Purple, plus the tag1.com web palette
   (cream, turquoise, green). Square corners, no shadows, thin frames
   with small square corner marks. The purple j> logo is Jesse's own. */

/* ---------- Fonts (Poppins, SIL OFL, latin subset in src/fonts) ---------- */

@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/poppins-400.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/poppins-400i.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/poppins-500.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-600.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/poppins-700.woff") format("woff"); }

/* ---------- Brand tokens ---------- */

:root {
  --t1-navy: #061E32;
  --t1-navy-deep: #03121F;
  --t1-jade: #15787C;
  --t1-orange: #E65C00;
  --t1-blue: #D1EAF1;
  --t1-purple: #4B185E;
  --t1-cream: #EEEFE8;
  --t1-turquoise: #53D4CC;
  --t1-bright-turquoise: #22EDE0;
  --t1-green: #94FB81;
  --t1-grey: #BDC2C2;
  --t1-dark-grey: #707070;
  --t1-lightest-grey: #F5F5F5;

  --sidebar-target-width: 290px;
  --content-max-width: 800px;
  --menu-bar-height: 56px;
  --mono-font: "Source Code Pro", ui-monospace, Menlo, Consolas, monospace;
}

/* Light (also used for mdBook's "rust" theme) */
html.light, html.rust, html:not(.js) {
  --bg: #FFFFFF;
  --fg: var(--t1-navy);
  --heading: var(--t1-navy);
  --heading-2: var(--t1-jade);
  --muted: #3E5466;
  --rule: var(--t1-blue);
  --panel: var(--t1-lightest-grey);

  --sidebar-bg: var(--t1-navy);
  --sidebar-fg: #D7DEE3;
  --sidebar-non-existant: #8197A8;
  --sidebar-active: var(--t1-green);
  --sidebar-spacer: rgba(209, 234, 241, 0.18);
  --sidebar-header-border-color: var(--t1-turquoise);
  --scrollbar: #6F8494;

  --icons: #4B6273;
  --icons-hover: var(--t1-jade);
  --links: var(--t1-jade);
  --inline-code-color: var(--t1-purple);

  --theme-popup-bg: #FFFFFF;
  --theme-popup-border: var(--t1-blue);
  --theme-hover: var(--t1-blue);

  --quote-bg: #F2F8FA;
  --quote-border: var(--t1-jade);
  --warning-border: var(--t1-orange);

  --table-border-color: var(--t1-blue);
  --table-header-bg: var(--t1-blue);
  --table-alternate-bg: #FAFBFB;

  --searchbar-border-color: var(--t1-dark-grey);
  --searchbar-bg: #FFFFFF;
  --searchbar-fg: var(--t1-navy);
  --searchbar-shadow-color: transparent;
  --searchresults-header-fg: #4B6273;
  --searchresults-border-color: var(--t1-blue);
  --searchresults-li-bg: #F2F8FA;
  --search-mark-bg: #FCFC5A;

  --marker: var(--t1-jade);
  --color-scheme: light;
}

/* Dark (navy, coal and ayu all map here) */
html.navy, html.coal, html.ayu {
  --bg: var(--t1-navy);
  --fg: var(--t1-cream);
  --heading: #FFFFFF;
  --heading-2: var(--t1-turquoise);
  --muted: #A9B8C3;
  --rule: rgba(209, 234, 241, 0.22);
  --panel: #0B2A43;

  --sidebar-bg: var(--t1-navy-deep);
  --sidebar-fg: #C9D4DC;
  --sidebar-non-existant: #8197A8;
  --sidebar-active: var(--t1-green);
  --sidebar-spacer: rgba(209, 234, 241, 0.14);
  --sidebar-header-border-color: var(--t1-turquoise);
  --scrollbar: #4B6273;

  --icons: #A9B8C3;
  --icons-hover: var(--t1-turquoise);
  --links: var(--t1-turquoise);
  --inline-code-color: var(--t1-green);

  --theme-popup-bg: var(--t1-navy-deep);
  --theme-popup-border: #24435C;
  --theme-hover: #0B2A43;

  --quote-bg: #0B2A43;
  --quote-border: var(--t1-turquoise);
  --warning-border: var(--t1-orange);

  --table-border-color: #24435C;
  --table-header-bg: #0F3350;
  --table-alternate-bg: #08243B;

  --searchbar-border-color: #6F8494;
  --searchbar-bg: #0B2A43;
  --searchbar-fg: var(--t1-cream);
  --searchbar-shadow-color: transparent;
  --searchresults-header-fg: #A9B8C3;
  --searchresults-border-color: #24435C;
  --searchresults-li-bg: #0B2A43;
  --search-mark-bg: var(--t1-orange);

  --marker: var(--t1-turquoise);
  --color-scheme: dark;
}

/* ---------- Base type ---------- */

html { font-family: "Poppins", "Helvetica Neue", Arial, sans-serif; }
body { background: var(--bg); color: var(--fg); font-size: 1.6rem; line-height: 1.75; }

.content main { padding-block-end: 4rem; }
.content p, .content li { font-weight: 400; }
.content strong { font-weight: 600; }

.content h1, .content h2, .content h3, .content h4 {
  font-family: "Poppins", sans-serif;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.content h1 { color: var(--heading); font-size: 3.4rem; font-weight: 600; margin-block: 2.4rem 1.6rem; }
.content h2 { color: var(--heading-2); font-size: 2.4rem; font-weight: 500; margin-block: 4rem 1.2rem; }
.content h3 { color: var(--heading); font-size: 1.9rem; font-weight: 600; margin-block: 2.8rem 0.8rem; }
.content h4 { color: var(--heading); font-size: 1.6rem; font-weight: 600; }
.content h1 a.header, .content h2 a.header, .content h3 a.header, .content h4 a.header { color: inherit; }

.content a:where(:not(.header)), .content a:where(:not(.header)):visited {
  color: var(--links);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
.content a:where(:not(.header)):hover { text-decoration-thickness: 2px; }

.content hr { border: 0; border-top: 1px solid var(--rule); margin: 3.2rem 0; }

.content li::marker { color: var(--marker); }

/* Code */
:not(pre) > .hljs, code:not(.hljs) {
  border-radius: 0;
}
.content :not(pre) > code {
  background: var(--panel);
  padding: 0.05em 0.2em;
  font-size: 0.85em;
}
.content pre { border-radius: 0; }
.content pre > code { border-radius: 0; padding: 1.4rem 1.6rem; }

/* Tables, per the Tag1 document standard: blue header row and borders, no verticals */
.content table { border-collapse: collapse; margin: 2rem 0; }
.content table td, .content table th { border: 0; border-bottom: 1px solid var(--table-border-color); padding: 0.8rem 1.2rem; }
.content table thead th { font-weight: 600; text-align: start; }
.content table thead { background: var(--table-header-bg); }

/* Blockquotes */
.content blockquote { border-inline-start: 3px solid var(--quote-border); border-block: 0; border-inline-end: 0; padding: 0.4rem 1.6rem; }

/* ---------- Chrome: menu bar ---------- */

#mdbook-menu-bar, #mdbook-menu-bar.bordered {
  background: var(--bg);
  border-block-end: 1px solid var(--rule);
}
.menu-title {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 1.8rem;
  color: var(--heading);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
}
.menu-title::before {
  content: "";
  width: 2.6rem;
  height: 2.6rem;
  background: url("../images/jesse-logo.svg") center / contain no-repeat;
  flex: none;
}
.icon-button, .right-buttons a { color: var(--icons); }

/* One light look and one dark look: the six-theme picker has nothing left to choose */
#mdbook-theme-toggle { display: none; }

/* ---------- Chrome: sidebar ---------- */

.sidebar { font-size: 1.45rem; }
.sidebar .sidebar-scrollbox { padding: 1.6rem 1.4rem 2.4rem; }
.chapter li a { color: var(--sidebar-fg); padding: 0.45rem 0; }
.chapter li a:hover { color: #FFFFFF; text-decoration: none; }
.chapter li a.active { color: var(--sidebar-active); font-weight: 500; }
.chapter li.part-title {
  color: var(--t1-turquoise);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin: 2.2rem 0 0.6rem;
}
.chapter li.spacer { background-color: var(--sidebar-spacer); }
.sidebar-resize-handle .sidebar-resize-indicator { display: none; }

/* ---------- Chrome: prev/next ---------- */

.nav-chapters, .mobile-nav-chapters { border-radius: 0; color: var(--icons); }
.nav-chapters:hover { color: var(--t1-jade); background: transparent; }
.mobile-nav-chapters { background: var(--panel); }

/* ---------- Search ---------- */

#mdbook-searchbar { border-radius: 0; font-family: inherit; }
#mdbook-searchresults .breadcrumbs { color: var(--muted); }


/* ===================================================================
   Shared components (usable on any page)
   =================================================================== */

/* Frame: thin outline with square corner marks, as on tag1.com.
   The frame takes currentColor; set `color` on the framed box and
   reset it on the children. */
.t1-frame { position: relative; border: 1px solid currentColor; }
.t1-frame::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background:
    linear-gradient(currentColor, currentColor) top left / 7px 7px no-repeat,
    linear-gradient(currentColor, currentColor) top right / 7px 7px no-repeat,
    linear-gradient(currentColor, currentColor) bottom left / 7px 7px no-repeat,
    linear-gradient(currentColor, currentColor) bottom right / 7px 7px no-repeat;
}

/* Eyebrow: works on p, h2 or h3 (the .content selector beats mdBook's heading rules) */
.t1-eyebrow, .content .t1-eyebrow {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

/* Keyboard focus, everywhere */
.icon-button:focus-visible, .right-buttons a:focus-visible,
.chapter li a:focus-visible, .nav-chapters:focus-visible,
.mobile-nav-chapters:focus-visible, .content main a:focus-visible {
  outline: 2px solid var(--t1-orange);
  outline-offset: -2px;
}

/* ===================================================================
   Landing page (index.md)

   Everything is scoped under .jl. The page-level rules use
   html:has(#git-edit-button):has(main > .jl:first-child): only the real
   landing has both, while print.html (which also contains the landing
   markup) has no edit button and keeps the normal docs layout.
   =================================================================== */

html:has(#git-edit-button):has(main > .jl:first-child) :is(#mdbook-sidebar, #mdbook-sidebar-toggle, .nav-wrapper, .nav-wide-wrapper, #mdbook-sidebar-resize-handle, a[rel="edit"]) {
  display: none !important;
}
html:has(#git-edit-button):has(main > .jl:first-child) #mdbook-sidebar-toggle-anchor ~ .page-wrapper {
  margin-inline-start: 0 !important;
  transform: none !important;
  overflow-x: clip;
}
html:has(#git-edit-button):has(main > .jl:first-child) .page { padding: 0; }
html:has(#git-edit-button):has(main > .jl:first-child) .content { padding: 0; overflow-x: clip; }
html:has(#git-edit-button):has(main > .jl:first-child) .content main { max-width: none; padding: 0; margin: 0; }
html:has(#git-edit-button):has(main > .jl:first-child) #mdbook-menu-bar {
  box-sizing: border-box;
  margin-inline: 0;
  padding-inline: 1.6rem;
  background: var(--jl-white-bg);
}
html:has(#git-edit-button):has(main > .jl:first-child) #mdbook-search-wrapper { padding-inline: 1.6rem; box-sizing: border-box; }

/* print.html: leave the landing (and the page break after it) out of the book */
html:not(:has(#git-edit-button)) main > .jl,
html:not(:has(#git-edit-button)) main > .jl + div[style*="break-before"] { display: none; }

/* ---------- Band tokens ----------
   Each band sets the same small set of variables; components only read them.
   Light theme first, then the dark theme overrides. */

html.light, html.rust, html:not(.js) {
  --jl-white-bg: #FFFFFF;
  --jl-blue-bg: var(--t1-blue);
  --jl-cream-bg: var(--t1-cream);
  --jl-navy-bg: var(--t1-navy);
}
html.navy, html.coal, html.ayu {
  --jl-white-bg: #0A253B;
  --jl-blue-bg: #0F3350;
  --jl-cream-bg: #12304A;
  --jl-navy-bg: var(--t1-navy-deep);
}

.jl-band {
  /* light-band defaults */
  --b-fg: var(--t1-navy);
  --b-muted: #3E5466;
  --b-head: var(--t1-navy);
  --b-eyebrow: var(--t1-navy);
  --b-accent: var(--t1-jade);        /* frames and card titles */
  --b-code-bg: rgba(6, 30, 50, 0.07);
  --b-code-fg: var(--t1-purple);
  --b-card-bg: #FFFFFF;
  width: 100%;
  padding: 8rem 2.4rem;
  box-sizing: border-box;
  background: var(--b-bg);
  color: var(--b-fg);
}
.jl-band-white { --b-bg: var(--jl-white-bg); }
.jl-band-blue { --b-bg: var(--jl-blue-bg); }
.jl-band-cream { --b-bg: var(--jl-cream-bg); }

/* Dark bands: navy and purple always; white, blue and cream in dark mode */
.jl-band-navy, .jl-band-purple,
html:is(.navy, .coal, .ayu) :is(.jl-band-white, .jl-band-blue, .jl-band-cream) {
  --b-fg: #E3EAEE;
  --b-muted: #A9B8C3;
  --b-head: var(--t1-green);
  --b-eyebrow: #FFFFFF;
  --b-accent: var(--t1-turquoise);
  --b-code-bg: rgba(209, 234, 241, 0.12);
  --b-code-fg: #FFFFFF;
  --b-card-bg: #0F3350;
}
html:is(.navy, .coal, .ayu) .jl-band-cream { --b-card-bg: #0A253B; }
.jl-band-navy { --b-bg: var(--jl-navy-bg); }
.jl-band-purple { --b-bg: var(--t1-purple); --b-fg: #FFFFFF; --b-head: #FFFFFF; --b-muted: #E9DDEE; }

.jl-inner { max-width: 1120px; margin: 0 auto; }
.jl p, .jl li { line-height: 1.7; }
.jl h1, .jl h2, .jl h3 { margin: 0; color: inherit; text-wrap: balance; }
.jl a.header { color: inherit; }
.jl .t1-eyebrow { color: var(--b-eyebrow); }
.jl code { background: var(--b-code-bg) !important; color: var(--b-code-fg) !important; }
.content .jl :not(pre) > code { padding: 0.05em 0.15em; }
.content main .jl a:focus-visible { outline: 2px solid var(--t1-orange); outline-offset: 3px; }
.content main .jl-band-purple a:focus-visible { outline-color: var(--t1-turquoise); }

/* ---------- Hero ---------- */
.jl-hero { padding-block: 7.2rem 8rem; }
.jl-hero .jl-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 6.4rem;
  align-items: center;
}
.jl-hero .t1-eyebrow { color: var(--heading); }
.jl-hero h1 {
  color: var(--t1-orange);
  font-size: clamp(3.6rem, 5.2vw, 5.8rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  margin: 0 0 2.4rem;
}
.jl-lede { text-wrap: pretty; font-size: 1.95rem; line-height: 1.6; max-width: 34em; margin: 0 0 3.2rem; }
.jl-note { max-width: 46em; font-size: 1.4rem; color: var(--b-muted); margin: 2rem 0 0; }
.jl-hero-art {
  color: var(--b-accent);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  max-width: 380px;
  width: 100%;
  justify-self: end;
}
.jl-hero-art img { width: 58%; height: auto; display: block; }

/* ---------- Links and buttons ----------
   The button follows the tag1.com link button: a label block plus a separate chevron block. */
.jl-actions { display: flex; flex-wrap: wrap; gap: 1.6rem 2.4rem; align-items: center; }
.jl a.jl-btn:is(:link, :visited) {
  display: inline-flex;
  align-items: stretch;
  gap: 2px;
  text-decoration: none;
  color: var(--t1-navy);
  font-weight: 500;
  font-size: 1.6rem;
}
.jl-btn span { background: var(--t1-turquoise); color: var(--t1-navy); padding: 1.1rem 1.8rem; transition: background-color 0.15s; }
.jl-btn span + span { padding: 0 1.1rem; display: grid; place-items: center; }
.jl-btn span + span::before {
  content: "";
  width: 0.9rem;
  height: 0.9rem;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translateX(-2px) rotate(45deg);
}
.jl-btn:hover span, .jl-btn:focus-visible span { background: var(--t1-bright-turquoise); }

.jl a.jl-link:is(:link, :visited) {
  color: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--t1-orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}
.jl a.jl-link:hover { text-decoration-color: currentColor; }
.jl-band-purple a.jl-link:is(:link, :visited) { color: #FFFFFF; text-decoration-color: var(--t1-turquoise); }

/* ---------- Section heads ---------- */
.jl-head { max-width: 760px; margin: 0 0 4.8rem; }
.jl-head-center { margin-inline: auto; text-align: center; }
.jl-head h2 { color: var(--b-head); font-size: clamp(2.8rem, 3.6vw, 3.8rem); font-weight: 600; line-height: 1.2; margin: 0 0 1.6rem; }
.jl-head p { font-size: 1.75rem; margin: 0; }
.jl-head p + p { margin-top: 1.6rem; }

/* ---------- The parts: framed block with three columns ---------- */
.jl-works { box-sizing: border-box; padding: 6.4rem 5.6rem; color: rgba(209, 234, 241, 0.45); }
.jl-works > * { color: var(--b-fg); }
.jl-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4.8rem; counter-reset: col; }
.jl-col h3 { color: var(--t1-green); font-size: 2rem; font-weight: 500; margin: 0 0 1.2rem; display: flex; align-items: baseline; gap: 1rem; }
.jl-col h3::before { counter-increment: col; content: "0" counter(col); font-size: 1.3rem; font-weight: 600; color: var(--t1-turquoise); letter-spacing: 0.06em; }
.jl-col p { margin: 0; font-size: 1.55rem; }

/* ---------- Start of day: copy beside a briefing window ---------- */
.jl-brief-wrap { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 6.4rem; align-items: start; }
.jl-brief-wrap .jl-head { margin: 0; }
.jl-window {
  /* the window is a "screenshot" and stays light in both themes */
  --b-fg: var(--t1-navy);
  --b-code-bg: rgba(6, 30, 50, 0.07);
  --b-code-fg: var(--t1-purple);
  background: #FFFFFF;
  color: var(--t1-navy);
}
.jl-window-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.6rem;
  background: var(--t1-navy); color: #FFFFFF;
  font-size: 1.25rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}
.jl-window-bar span:last-child { color: var(--t1-turquoise); font-weight: 500; letter-spacing: 0.04em; text-transform: none; }
.jl-brief { padding: 2rem 2.4rem 2.4rem; font-size: 1.45rem; }
.jl-brief .jl-brief-label {
  font-size: 1.2rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--t1-jade); margin: 2rem 0 0.6rem;
}
.jl-brief .jl-brief-label:first-child { margin-top: 0; }
.jl-brief dl { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 0.4rem 1.6rem; margin: 0; }
.jl-brief dt { margin: 0; font-weight: 600; color: var(--t1-navy); font-variant-numeric: tabular-nums; }
.jl-brief dd { margin: 0; }
.jl-flag { display: inline-block; width: 0.8rem; height: 0.8rem; margin-inline-end: 0.6rem; vertical-align: 0.1em; }
.jl-flag-now { background: var(--t1-orange); }
.jl-flag-week { background: var(--t1-jade); }
.jl-flag-fyi { background: var(--t1-grey); }
.jl-judgment { margin-top: 2rem; padding: 1.2rem 1.4rem; background: #F2F8FA; border-inline-start: 3px solid var(--t1-orange); }
.jl-judgment p { margin: 0; }
.jl-caption { text-wrap: pretty; font-size: 1.3rem; color: var(--b-muted); margin: 1.2rem 0 0; }

/* ---------- Ground rules cards ---------- */
.jl-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3.2rem; }
.jl-card { color: var(--b-accent); padding: 3.2rem 2.8rem; display: grid; grid-template-rows: subgrid; grid-row: span 2; row-gap: 1.2rem; }
.jl-card h3 { color: var(--b-head); font-size: 2rem; font-weight: 500; margin: 0; align-self: end; }
html:not(.navy):not(.coal):not(.ayu) .jl-band-white .jl-card h3 { color: var(--t1-jade); }
.jl-card p { color: var(--b-fg); margin: 0; font-size: 1.55rem; }

/* ---------- Why I built it ---------- */
.jl-story { max-width: 760px; }
.jl-story .t1-eyebrow { margin-bottom: 1.6rem; }
.jl-story blockquote { margin: 0; padding: 0; border: 0; background: none; color: var(--b-fg); font-size: 1.85rem; line-height: 1.65; }
.jl-story blockquote p { margin: 0 0 1.6rem; }
.jl .jl-sig { font-size: 1.45rem; font-weight: 600; }
.jl-sig span { display: block; font-weight: 400; color: var(--b-muted); }
.jl-reads-head { margin: 6.4rem 0 2.4rem !important; }
.jl-reads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3.2rem; }
.jl a.jl-read:is(:link, :visited) {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--b-accent);
  background: var(--b-card-bg);
  padding: 0 0 2.4rem;
}
.jl-read img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin: 0 0 2rem; }
.jl-read > :not(img) { margin-inline: 2.4rem; }
.jl .jl-read .jl-read-meta { color: var(--b-muted); font-size: 1.2rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.8rem; }
.jl-read strong { display: block; color: var(--b-head); font-weight: 600; font-size: 1.7rem; margin-bottom: 0.4rem; }
html:not(.navy):not(.coal):not(.ayu) .jl-band-cream .jl-read strong { color: var(--t1-navy); }
.jl-read span { display: block; color: var(--b-muted); font-size: 1.45rem; }
.jl-read:hover strong { text-decoration: underline; text-underline-offset: 0.2em; }

/* ---------- Set up your own (purple) ---------- */
.jl-cta { box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 4.8rem; align-items: center; padding: 5.6rem; color: rgba(255, 255, 255, 0.5); }
.jl-cta > * { color: #FFFFFF; }
.jl-cta h2 { font-size: clamp(2.8rem, 3.4vw, 3.6rem); font-weight: 600; margin: 0 0 1.6rem; }
.jl-cta p { margin: 0; font-size: 1.7rem; }
.jl-cta-side { display: grid; gap: 2rem; justify-items: end; }
.jl-cta .jl-actions { justify-content: flex-end; }
.jl-cta .jl-more { font-size: 1.45rem; color: var(--b-muted); margin: 0; }

/* ---------- Footer line ---------- */
.jl-foot { padding: 3.2rem 2.4rem; border-top: 1px solid var(--rule); background: var(--jl-white-bg); font-size: 1.4rem; color: var(--muted); }
html:is(.navy, .coal, .ayu) .jl-foot { background: var(--t1-navy-deep); }
.jl-foot .jl-inner { display: flex; flex-wrap: wrap; gap: 0.8rem 2.4rem; justify-content: space-between; }
.jl-foot p { margin: 0; }
.jl-foot a:is(:link, :visited) { color: inherit; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .jl-cta { grid-template-columns: minmax(0, 1fr); gap: 3.2rem; }
  .jl-cta-side { justify-items: start; }
  .jl-cta .jl-actions { justify-content: flex-start; }
}
@media (max-width: 960px) {
  .jl-hero-art { display: none; }
  .jl-hero .jl-inner, .jl-brief-wrap { grid-template-columns: minmax(0, 1fr); gap: 4rem; }
  .jl-reads { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; }
  .jl-cols, .jl-cards { grid-template-columns: minmax(0, 1fr); gap: 3.2rem; }
  .jl-card { grid-template-rows: none; grid-row: auto; }
}
@media (max-width: 600px) {
  .jl-band { padding: 5.6rem 1.6rem; }
  .jl-hero { padding-block: 4rem 5.6rem; }
  .jl-foot { padding-inline: 1.6rem; }
  .jl-works, .jl-cta { padding: 4rem 2.4rem; }
  .jl-card { padding: 2.4rem 2rem; }
  .jl-lede { font-size: 1.75rem; }
  .jl-brief { padding: 1.6rem; font-size: 1.4rem; }
  .jl-brief dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .jl-brief dt { margin-top: 0.4rem; }
  .jl-brief dd { margin-bottom: 0.8rem; }
}

/* ---------- Print ---------- */
@media print {
  @page { margin: 16mm; }
  html, body, .page-wrapper, .page, .content { background: #FFFFFF !important; }
  html:is(.navy, .coal, .ayu) {
    --bg: #FFFFFF; --fg: #061E32; --heading: #061E32; --heading-2: #15787C; --muted: #3E5466;
    --rule: #D1EAF1; --panel: #F5F5F5; --links: #15787C; --inline-code-color: #4B185E; --marker: #15787C;
    --table-header-bg: #D1EAF1; --table-alternate-bg: #FAFBFB; --table-border-color: #D1EAF1; --quote-bg: #F2F8FA;
    --color-scheme: light;
    color-scheme: light;
  }
  html:is(.navy, .coal, .ayu) .content pre > code,
  html:is(.navy, .coal, .ayu) .content pre > code * { color: #061E32 !important; background: #F5F5F5 !important; }
  .content pre > code { font-size: 0.78em; }
  .jl-band, .jl-foot { padding: 2rem 0; background: none !important; }
  .jl-band *, .jl-band a:link, .jl-band a:visited, .jl-foot, .jl-foot * { color: #061E32 !important; }
  .jl-band code { background: #F5F5F5 !important; color: #4B185E !important; }
  .jl-hero-art { display: none; }
  .jl-col h3::before { color: #15787C !important; }
  .jl-hero h1 { color: #E65C00 !important; }
  .t1-frame::before { display: none; }
  .t1-frame, .jl-works, .jl-cta { border-color: #BDC2C2 !important; }
  .jl-window-bar { background: none !important; border-bottom: 1px solid #BDC2C2; }
  .jl-btn span { background: none !important; border: 1px solid #061E32; }
  .jl-brief-wrap, .jl-story { display: block; }
  .jl-brief-wrap > * + *, .jl-story > * + * { margin-top: 3.2rem; }
  .jl-brief-wrap > div:last-child { break-inside: avoid; }
  .jl-reads { display: block; }
  .jl-read img { display: none; }
  .jl-read { margin-bottom: 1.6rem; padding-top: 1.6rem !important; }
  .jl-read { background: none !important; }
  .t1-eyebrow, .jl-head h2 { break-after: avoid; }
  .jl-works { border: 0 !important; padding: 0 !important; }
  .content :not(pre) > code { white-space: nowrap; }
  .jl-card, .jl-col, .jl-window, .jl-read, .jl-story blockquote, .jl-cta, .jl-cta-side { break-inside: avoid; }
}

/* ---------- Docs details ---------- */
.content :is(h1, h2, h3, h4) a.header:is(:link, :visited) { color: inherit; text-decoration: none; }
.content :not(pre) > code { hyphens: none; }
html:is(.navy, .coal, .ayu) .content pre > code { background: var(--t1-navy-deep); }
.chapter li.chapter-item > .chapter-link-wrapper > span { color: var(--sidebar-fg); font-weight: 500; }
/* mdBook 0.5 lists the current page's headings under the active chapter; keep only the chapter green */
.chapter li.header-item a.header-in-summary { color: var(--sidebar-fg); font-weight: 400; }
.chapter li.header-item a.current-header { color: var(--t1-turquoise); }
#mdbook-searchbar:focus { outline: 2px solid var(--t1-orange); outline-offset: 0; }
.content table td { vertical-align: top; }
@media (max-width: 600px) {
  .content table td, .content table th { padding: 0.6rem 0.8rem; }
  .content td code { overflow-wrap: anywhere; }
}
/* Visitors with a stored "ayu" choice from the old theme picker keep ayu's syntax colors; lift the ones that fail AA on our dark code background */
html.ayu .content pre :is(.hljs-comment, .hljs-quote, .hljs-emphasis) { color: #8F9DA9; }
html.ayu .content pre .hljs-tag { color: #5CCFE6; }

/* Closing round */
.jl :target::before { content: none; }
.jl [id] { scroll-margin-top: calc(var(--menu-bar-height) + 4rem); }
.content pre > code:focus-visible { outline: 2px solid var(--t1-orange); outline-offset: 2px; }
@media (forced-colors: active) {
  .jl-btn span { border: 1px solid ButtonText; }
  .jl-window { border: 1px solid CanvasText; }
  .jl-flag { forced-color-adjust: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar, .page-wrapper, .nav-chapters, .icon-button, .jl-btn span { transition: none !important; }
}
