:root {
  --ml-blue: #1c4268;
  --ml-teal: #187c73;
  --ml-orange: #c95d37;
  --ml-ink: #17293c;
  --ml-muted: #607083;
  --ml-paper: #fbfaf6;
}

body, #quarto-content { background: var(--ml-paper); color: var(--ml-ink); font-family: Inter, "Aptos", "Segoe UI", system-ui, sans-serif; }
#quarto-sidebar, .sidebar { background: #f3f7f6; }
.sidebar nav[role="doc-toc"] ul > li > a.active, .sidebar nav[role="doc-toc"] ul > li > a:hover, .sidebar .sidebar-item-container .active { color: var(--ml-teal); font-weight: 700; }
h1, h2, h3, h4, h5, h6 { color: var(--ml-ink); font-family: Georgia, "Times New Roman", serif; font-weight: 700; letter-spacing: -.018em; }
h2 { margin-top: 2.75rem; padding-bottom: .42rem; border-bottom: 1px solid #d9e3e5; }
a { color: #176b78; } a:hover { color: #a84a2c; } p, li { line-height: 1.68; }

.level-label {
  color: var(--ml-blue);
  border-left: 4px solid var(--ml-teal);
  padding-left: 0.8rem;
}

.callout {
  border-radius: 0.65rem;
  border: 1px solid #d4e3e1;
  box-shadow: 0 0.3rem 1.1rem rgba(25, 64, 84, 0.05);
}

figure figcaption {
  color: #5c6670;
  font-size: 0.92rem;
}

.concept-box {
  margin: 1.35rem 0;
  padding: 0.9rem 1rem;
  border: 1px solid #b9d2cf;
  border-left: 0.35rem solid var(--ml-teal);
  border-radius: 0.35rem;
  background: #f4faf9;
}

.concept-box p:last-child {
  margin-bottom: 0;
}

.concept-distinction {
  border-left-color: var(--ml-orange);
  background: #fff8f3;
}

/* Landing page */
.book-hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(280px, .92fr); align-items: center; gap: clamp(2rem, 5vw, 5rem); margin: -1.5rem -1rem 3.5rem; padding: clamp(2.5rem, 6vw, 5.5rem) clamp(1.4rem, 7vw, 6rem); background: radial-gradient(circle at 92% 8%, #d2eee8 0, transparent 27%), linear-gradient(125deg, #eff6f5 0%, #f8f5ed 55%, #eaf1fb 100%); border-bottom: 1px solid #d4e3e1; }
.book-eyebrow, .coverage-index, .level-number { margin: 0 0 .55rem; color: var(--ml-teal); font-size: .75rem; font-weight: 800; letter-spacing: .115em; text-transform: uppercase; }
.book-hero h1 { max-width: 760px; margin: 0; border: 0; font-size: clamp(2.5rem, 5.1vw, 5rem); line-height: 1.04; }
.book-lead { max-width: 680px; margin: 1.45rem 0 0; color: #42576c; font-size: clamp(1.04rem, 1.5vw, 1.22rem); line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero-primary, .hero-secondary { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border-radius: 999px; padding: .75rem 1.12rem; font-weight: 750; line-height: 1.25; text-decoration: none; }
.hero-primary { background: var(--ml-teal); color: #fff; box-shadow: 0 .5rem 1.15rem rgba(24, 124, 115, .24); }.hero-primary:hover { background: #105f59; color: #fff; transform: translateY(-1px); }.hero-secondary { border: 1px solid #b9cfca; color: #1b5958; background: rgba(255,255,255,.55); }.hero-secondary:hover { border-color: var(--ml-orange); color: #943b23; }
.hero-visual { min-width: 0; padding: 2.2rem 1.4rem 1rem; border-radius: 1.65rem; background: linear-gradient(135deg, #d8f3ef, #eff4ff); box-shadow: 0 .8rem 1.3rem rgba(31, 64, 87, .12); }
.neural-visual { display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; min-height: 240px; gap: 1rem; position: relative; }.neural-visual::before { content: ""; position: absolute; inset: 30px 11% 35px; opacity: .6; background: repeating-linear-gradient(25deg, transparent 0 31px, #77aaa8 32px 34px, transparent 35px 64px), repeating-linear-gradient(-24deg, transparent 0 39px, #89a8cc 40px 42px, transparent 43px 76px); }.neural-column { position: relative; z-index: 1; display: flex; min-height: 175px; flex-direction: column; align-items: center; justify-content: space-around; }.neuron { display: block; width: 32px; height: 32px; border: 3px solid #2c7f78; border-radius: 50%; background: #fbfdfd; box-shadow: 0 0 0 7px rgba(255, 255, 255, .24); }.neural-model .neuron, .neural-output .neuron { width: 37px; height: 37px; border-color: #3b65a3; }.neural-output .neuron { width: 47px; height: 47px; background: #f8fbff; }.neural-labels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: .85rem; color: #276c68; font-size: .78rem; font-weight: 750; text-align: center; }.neural-label { display: block; }
.pathway-plot { display: flex; align-items: stretch; gap: .55rem; margin: 1.6rem 0 3.6rem; padding: 1.25rem; overflow-x: auto; border: 1px solid #d6e3e6; border-radius: 1rem; background: #fff; }
.pathway-step { flex: 1 0 138px; min-height: 130px; padding: .85rem; border-radius: .75rem; background: #edf6f4; }.pathway-step span { display: block; margin-bottom: .7rem; color: var(--ml-orange); font-size: .72rem; font-weight: 800; letter-spacing: .08em; }.pathway-step strong { display: block; font-family: Georgia, "Times New Roman", serif; color: var(--ml-ink); font-size: 1.04rem; line-height: 1.13; }.pathway-step small { display: block; margin-top: .6rem; color: var(--ml-muted); font-size: .78rem; line-height: 1.32; }.pathway-networks { background: #e7f2f7; }.pathway-transformers { background: #edf0fb; }.pathway-language { background: #f6f0e8; }.pathway-systems { background: #e9f2eb; }
.pathway-link { flex: 0 0 16px; align-self: center; height: 2px; background: #95b8b5; position: relative; }.pathway-link::after { content: ""; position: absolute; right: -1px; top: -3px; width: 7px; height: 7px; border-top: 2px solid #95b8b5; border-right: 2px solid #95b8b5; transform: rotate(45deg); }
.levels-grid, .coverage-grid { display: grid; gap: 1rem; margin: 1.5rem 0 3.5rem; }.levels-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }.level-card { min-height: 210px; padding: 1.35rem; border-top: 5px solid var(--ml-teal); border-radius: .75rem; background: #fff; box-shadow: 0 .35rem 1.1rem rgba(24, 54, 75, .06); }.level-card h3, .coverage-card h3 { margin: 0 0 .6rem; border: 0; font-size: 1.3rem; }.level-card p:last-child { margin-bottom: 0; color: var(--ml-muted); line-height: 1.5; }.level-two { border-color: #3c89a4; }.level-three { border-color: #5e71ae; }.level-four { border-color: var(--ml-orange); }
.coverage-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }.coverage-card { display: flex; min-height: 205px; flex-direction: column; padding: 1.35rem; border: 1px solid #d7e2e3; border-radius: .75rem; background: #fff; color: inherit; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }.coverage-card:hover { color: inherit; border-color: #82aaa6; box-shadow: 0 .6rem 1.6rem rgba(24, 64, 84, .1); transform: translateY(-3px); }.coverage-card p { margin: 0; color: var(--ml-muted); line-height: 1.5; }.coverage-card > span:last-child { margin-top: auto; padding-top: 1rem; color: var(--ml-teal); font-size: .88rem; font-weight: 750; }
.index-callout { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin: 3.5rem 0; padding: 2rem; border-radius: 1rem; background: var(--ml-ink); color: #f8fbfb; }.index-callout h2 { margin: 0 0 .55rem; padding: 0; border: 0; color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); }.index-callout p:not(.book-eyebrow) { max-width: 680px; margin: 0; color: #d4e5e7; line-height: 1.55; }.index-callout .book-eyebrow { color: #91d7cb; }.index-callout .hero-primary { flex: 0 0 auto; background: #e6b45e; color: #182a3c; box-shadow: none; }.index-callout .hero-primary:hover { background: #f1c671; color: #182a3c; }
@media (max-width: 991px) { .book-hero { grid-template-columns: 1fr; }.hero-visual { max-width: 560px; }.levels-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.coverage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .book-hero { margin-left: -.65rem; margin-right: -.65rem; }.levels-grid, .coverage-grid { grid-template-columns: 1fr; }.index-callout { align-items: flex-start; flex-direction: column; } }
