/* dan-gittik.com v3 — spacious, editorial; butter-yellow accents, dark pill buttons, circular icons. */
:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --ink: #161616;
  --ink-soft: #55534e;
  --ink-mute: #8a877f;
  --rule: #e6e3dc;
  --butter: #fdf1cc;
  --butter-soft: #fef8e4;
  --butter-deep: #f9e3a3;
  --dot: #f2b705;
  --dark: #1c1c1c;
  --footer: #202020;
  --code-bg: #f4f2ec;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wrap: 1080px;
  --gutter: 40px;
  --section: 108px;
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.65;
       -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.025em; line-height: 1.12; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
svg { width: 1em; height: 1em; flex: none; }

.wrap { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding-top: var(--section); }
.section::before { content: ""; display: block; border-top: 1px solid var(--rule); margin-bottom: var(--section); }
.hero + .section, .hero + div > .section:first-child { padding-top: 0; }
.wrap:has(> .logos) + .section::before { display: none; }

/* ---------- header ---------- */
.site-header { display: flex; align-items: center; gap: 32px; height: 92px; position: relative; }
.site-header::after { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0; border-bottom: 1px solid var(--rule); }
.brand { font-weight: 700; font-size: 1.45rem; letter-spacing: -0.035em; text-decoration: none; white-space: nowrap; }
.site-nav { display: flex; gap: 38px; margin: 0 auto; }
.site-nav a { position: relative; text-decoration: none; color: var(--ink-soft); font-size: 0.94rem; font-weight: 500; padding: 6px 0; }
.site-nav a:hover { color: var(--ink); }
.site-nav a.active { color: var(--ink); font-weight: 600; }
.site-nav a.active::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--dot); }
.menu-toggle, .menu-button { display: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 14px; height: 50px; padding: 0 26px; border-radius: 999px; font-weight: 600;
       font-size: 0.93rem; text-decoration: none; white-space: nowrap; border: 1.5px solid transparent; transition: transform .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-arrow { display: inline-flex; font-size: 1.15em; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--surface); }
.btn-butter { background: var(--butter); color: var(--ink); }
.btn-butter:hover { background: var(--butter-deep); }
.talk-btn { height: 46px; padding: 0 24px; }
.btn-todo { opacity: .75; border-style: dashed !important; border-color: var(--ink-mute) !important; cursor: default; }
/* placeholders keep their colours (black / white) so the layout reads right; only the dashed border marks them */
.btn-dark.btn-todo { border-color: rgba(255,255,255,.45) !important; }
.btn-todo:hover { transform: none; }
.todo-link { cursor: default; }
.textlink { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; font-size: 0.98rem; white-space: nowrap; }
.textlink svg { font-size: 1.1em; transition: transform .15s; }
.textlink:hover svg { transform: translateX(3px); }
.textlink.btn-todo { border: 0 !important; }
.actions { display: flex; flex-wrap: wrap; gap: 16px 20px; align-items: center; margin-top: 40px; }

/* ---------- type ---------- */
.eyebrow { display: flex; align-items: center; gap: 14px; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.74rem;
           font-weight: 600; color: var(--ink-soft); margin-bottom: 18px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dot); flex: none; }
.period .eyebrow { text-transform: none; letter-spacing: .04em; font-size: .9rem; }
.display { text-wrap: balance; font-size: clamp(2.5rem, 5vw, 4.3rem); letter-spacing: -0.045em; line-height: 1.04; margin-bottom: 32px; }
h2 { font-size: clamp(1.9rem, 3.3vw, 2.75rem); letter-spacing: -0.04em; }
h3 { font-size: 1.4rem; }
.lede { font-size: 1.05rem; line-height: 1.75; color: var(--ink-soft); max-width: 44em; }
.lede + .lede { margin-top: 1.2em; }
/* inline links, everywhere: yellow underline (todo-link = link whose URL isn't supplied yet, same look) */
main p a, main li a, .todo-link { color: inherit; text-decoration: underline; text-decoration-color: var(--dot); text-decoration-thickness: 2px; text-underline-offset: 3px; }
/* hover: the yellow underline stays, plus a light yellow highlight behind the text */
main p a:hover, main li a:hover, .prose a:hover { text-decoration-color: var(--dot); background: var(--butter); border-radius: 3px; box-shadow: 0 0 0 2px var(--butter); }

.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 48px; margin-bottom: 52px; }
.section-aside { max-width: 22em; color: var(--ink-soft); font-size: .98rem; padding-bottom: 8px; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 72px; align-items: start; padding-top: 104px; padding-bottom: 88px; }
.contact-links { list-style: none; display: flex; flex-wrap: wrap; gap: 16px 40px; margin-top: 44px; }
.contact-links a { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink-soft); font-weight: 500; }
.contact-links a:hover { color: var(--ink); }
.contact-links svg { font-size: 1.35rem; color: var(--ink); }

/* ---------- panels and stats ---------- */
.panel { background: var(--butter); border-radius: var(--radius); padding: 30px 34px; }
.panel-soft { background: var(--butter-soft); }
.panel-sticky { position: sticky; top: 32px; }
.icon-circle { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 50%;
               background: var(--butter-deep); color: var(--ink); font-size: 1.3rem; flex: none; }
.icon-circle svg { stroke-width: 1.75; }
.icon-circle.sm { width: 40px; height: 40px; font-size: 1.05rem; }
.icon-circle.lg { width: 60px; height: 60px; font-size: 1.4rem; }
.panel .icon-circle { background: var(--butter-deep); }

.stats { list-style: none; }
.stats li { display: flex; align-items: center; gap: 20px; }
.stat-text { display: flex; flex-direction: column; gap: 4px; }
.stat-text strong { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; }
.stat-text span { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.45; }
.stats-stack li { padding: 20px 0; }
.stats-stack li + li { border-top: 1px solid rgba(0,0,0,.08); }
.stats-stack li:first-child { padding-top: 4px; }
.stats-stack li:last-child { padding-bottom: 4px; }
.stats-row { display: flex; flex-wrap: wrap; justify-content: space-around; gap: 32px 40px; }
.stats-row li + li { position: relative; }
.panel-row { padding: 26px 40px; margin-top: 60px; }
.stats-row.compact { justify-content: flex-start; gap: 24px 48px; }
.stats-row.compact .icon-circle { width: 52px; height: 52px; font-size: 1.25rem; }
.stats-row.compact .stat-text strong { font-size: 1.15rem; }
.stats-row.compact .stat-text span { font-size: 0.92rem; }

.points { list-style: none; }
.points li { position: relative; padding: 18px 0 18px 28px; line-height: 1.5; color: var(--ink); font-size: 0.98rem; }
.points li + li { border-top: 1px solid rgba(0,0,0,.08); }
.points li:first-child { padding-top: 2px; }
.points li:last-child { padding-bottom: 2px; }
.points li::before { content: ""; position: absolute; left: 2px; top: calc(18px + .55em); width: 8px; height: 8px; border-radius: 50%; background: var(--dot); }
.points li:first-child::before { top: calc(2px + .55em); }

/* ---------- logos ---------- */
.logos { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 40px 0; }
.logos-label { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; font-weight: 600; color: var(--ink-mute); margin-bottom: 24px; }
.logos ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px 40px; }
.logos img { height: 32px; width: auto; opacity: .8; filter: grayscale(1); }
.wordmark { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.03em; color: #4a4843; }
.wordmark.muted { font-weight: 400; font-size: 1.15rem; color: var(--ink-mute); letter-spacing: 0; }

/* ---------- workshop ---------- */
.workshop { background: var(--surface); border: 1px solid var(--rule); border-radius: 22px; padding: 28px; }
.workshop-main { display: grid; grid-template-columns: minmax(0, 1fr) 324px; gap: 48px; align-items: start; padding: 12px; }
.workshop-body { padding-top: 8px; }
.workshop-body h3 { font-size: 1.6rem; line-height: 1.22; margin-bottom: 28px; }
.workshop-body p { color: var(--ink-soft); line-height: 1.8; font-size: 1.02rem; }
.workshop-body p + p { margin-top: 1em; }
.workshop-body .actions { margin-top: 44px; }
.media { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; }
.media-todo { display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #262522, #121212);
              color: var(--butter-deep); border-radius: 14px; }
.media-todo span { display: flex; flex-direction: column; align-items: center; gap: 14px; font-size: 0.85rem; letter-spacing: .04em; color: #bdb7a6; }
.media-todo svg { font-size: 2.2rem; color: var(--dot); }
.facts { list-style: none; background: var(--butter); border-radius: var(--radius); padding: 20px 28px; }
.facts li { display: flex; align-items: center; gap: 16px; padding: 13px 0; font-weight: 500; font-size: .95rem; }
.facts li + li { border-top: 1px solid rgba(0,0,0,.08); }
.talk { display: flex; align-items: center; gap: 32px; background: var(--butter); border-radius: 22px; padding: 40px 48px; margin-bottom: 24px; }
.talk-play { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%;
             background: var(--dark); color: var(--butter); font-size: 1.35rem; flex: none; }
.talk-play svg { fill: currentColor; margin-left: 3px; }
.talk-text { flex: 1; min-width: 0; }
.talk-label { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 10px; }
.talk h3 { font-size: 1.35rem; line-height: 1.3; letter-spacing: -0.02em; max-width: 30em; }
.talk-text p:last-child { color: var(--ink-soft); margin-top: 8px; }

/* ---------- split, quotes ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 72px; align-items: start; }
.split h2 { margin-bottom: 36px; }
.quotes { display: grid; gap: 20px; margin-top: 60px; align-items: start; }
.quotes-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; }
.quotes-2 { display: block; columns: 2; column-gap: 24px; margin-top: 0; }
.quotes-2 .quote { break-inside: avoid; margin-bottom: 24px; }
.quote { margin: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 26px 24px 22px;
         display: flex; flex-direction: column; }
.quote-mark { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
              background: var(--butter-deep); font-size: 1rem; margin-bottom: 20px; }
.quote-mark svg { fill: currentColor; stroke-width: 0; }
.quote blockquote { margin: 0; flex: 1; max-height: 17em; overflow-y: auto; padding-right: 8px; font-size: .94rem;
                    scrollbar-width: thin; scrollbar-color: var(--butter-deep) transparent; }
.quote blockquote p { line-height: 1.7; color: #33312d; }
.quote blockquote p + p { margin-top: .8em; }
.quote figcaption { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--rule); color: var(--ink-mute); font-size: 0.92rem; font-weight: 500; }
.quotes-4 + .actions, .quotes + .actions { margin-top: 56px; }

/* ---------- books (home) ---------- */
.book-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.book-card { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 32px; align-items: center; }
.book-card h3 { margin-bottom: 18px; }
.book-card p { color: var(--ink-soft); margin-bottom: 32px; line-height: 1.7; }

.cover { width: 100%; aspect-ratio: 2 / 3; border-radius: 4px 10px 10px 4px; object-fit: cover; box-shadow: 0 30px 60px -28px rgba(0,0,0,.45); }
.cover-drawn { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 14% 12% 11%;
               background: radial-gradient(circle at 70% 62%, rgba(242,183,5,.28), transparent 45%), linear-gradient(170deg, #252421, #0f0f0f);
               color: #fff; overflow: hidden; }
.cover-drawn::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6%; background: linear-gradient(90deg, rgba(255,255,255,.08), rgba(0,0,0,.25)); }
.cover-title { font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; font-size: clamp(1.1rem, 2.4vw, 2.3rem); }
.cover.sm .cover-title { font-size: 1.25rem; }
.cover-title em { display: block; font-style: normal; color: var(--dot); }
.cover-author { font-size: .9rem; font-weight: 500; color: #d8d3c4; }
.cover.sm .cover-author { font-size: .75rem; }

/* ---------- CTA ---------- */
.cta { margin-top: var(--section); background: var(--butter); border-radius: 22px; padding: 60px 56px; display: grid;
       grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: center; margin-bottom: var(--section); }
.cta h2 { font-size: clamp(1.8rem, 2.9vw, 2.5rem); margin-bottom: 20px; }
.cta p { color: var(--ink-soft); font-size: 1rem; max-width: 34em; }
.cta .actions { margin-top: 0; flex-wrap: nowrap; }

/* ---------- about ---------- */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 34px 30px; display: flex; flex-direction: column; }
.card .icon-circle { margin-bottom: 32px; }
.card h3 { font-size: 1.25rem; margin-bottom: 18px; line-height: 1.25; }
.card p { color: var(--ink-soft); line-height: 1.75; }
.card p + p { margin-top: 1em; }
.card-kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem !important; font-weight: 600; color: var(--ink-mute) !important; margin-bottom: 12px; }
.card-foot { margin-top: auto; padding-top: 32px; }
.banner { margin-top: 32px; background: var(--butter); border-radius: var(--radius); padding: 40px 48px; display: flex;
          justify-content: space-between; align-items: center; gap: 32px; }
.banner h3 { font-size: 1.5rem; margin-bottom: 8px; }
.banner p { color: var(--ink-soft); }
.period-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 64px; align-items: start; }
.role { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px; padding: 48px 0; border-top: 1px solid var(--rule); }
.role:first-child { border-top: 0; padding-top: 0; }
.role-id h3 { font-size: 1.2rem; letter-spacing: -0.02em; }
.role-date { color: var(--ink-mute); margin-top: 8px; font-size: .95rem; font-variant-numeric: tabular-nums; }
.role-body h4 { font-size: 1.05rem; letter-spacing: -0.015em; margin-bottom: 18px; }
.role-body p { color: var(--ink-soft); line-height: 1.8; }
.role-body p + p { margin-top: 1.1em; }

/* ---------- teaching courses ---------- */
.courses { display: flex; flex-direction: column; gap: 40px; margin-top: 48px; }
.course { background: var(--surface); border: 1px solid var(--rule); border-radius: 22px; padding: 44px; }
.course-top { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 32px; align-items: start; }
.course-body h3 { font-size: 1.55rem; margin-bottom: 20px; }
.course-body p { color: var(--ink-soft); line-height: 1.8; max-width: 44em; }
.course-body p + p { margin-top: 1.1em; }
.course-quotes { margin-top: 44px; padding-top: 40px; border-top: 1px solid var(--rule); }
.quotes-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-mute); font-weight: 600; margin-bottom: 28px; }
.course .quote { background: var(--bg); }
.course-feature .edx { display: grid; grid-template-columns: 190px minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.edx-tile { aspect-ratio: 4 / 5; border-radius: 14px; background: linear-gradient(165deg, #1f2b3d, #0e141e); color: #fff; display: flex;
            flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 14px; padding: 24px; }
.edx-tile span { font-size: 2.6rem; color: var(--dot); display: flex; }
.edx-tile strong { font-size: 1.3rem; line-height: 1.2; letter-spacing: -0.02em; }
.edx-tile small { color: #aeb6c4; }
.course-feature .panel { padding: 28px 32px; }
.course-feature .actions { margin-top: 36px; }

/* ---------- writing ---------- */
.book .eyebrow { margin-bottom: 18px; }
.book-title { margin-bottom: 52px; }
.book-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 72px; align-items: start; }
.book-cover { position: sticky; top: 40px; }
.book-body > p { color: var(--ink-soft); font-size: 1rem; line-height: 1.85; }
.book-body > p + p { margin-top: 1.2em; }
.book-body .panel-row { margin: 0 0 44px; padding: 26px 32px; }
.inside { font-size: 1.25rem; margin-bottom: 20px; }
.contents { list-style: none; margin-bottom: 48px; }
.contents li { position: relative; padding: 14px 0 14px 30px; line-height: 1.6; border-top: 1px solid var(--rule); }
.contents li:last-child { border-bottom: 1px solid var(--rule); }
.contents li::before { content: ""; position: absolute; left: 2px; top: calc(14px + .6em); width: 8px; height: 8px; border-radius: 50%; background: var(--dot); }
.contents strong { font-weight: 600; }
.contents span { color: var(--ink-soft); }
.contents span::before { content: " — "; color: var(--ink-mute); }

/* ---------- book reader ---------- */
.crumbs { color: var(--ink-mute); font-size: .92rem; margin-bottom: 40px; display: flex; gap: 10px; }
.crumbs a { text-decoration: none; color: var(--ink-soft); }
.crumbs a:hover { color: var(--ink); }
.reader-intro { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 56px; align-items: center; }
.reader-intro h1 { font-size: clamp(2.4rem, 4.6vw, 4rem); letter-spacing: -0.04em; margin-bottom: 16px; }
.reader-intro .actions, .reader-intro .btn { margin-top: 36px; }
.toc-heading { font-size: 1.6rem; margin-bottom: 32px; }
.toc { list-style: none; max-width: 860px; margin-bottom: var(--section); }
.toc li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px; padding: 20px 0; border-top: 1px solid var(--rule); align-items: baseline; }
.toc li:last-child { border-bottom: 1px solid var(--rule); }
.toc .num { color: var(--ink-mute); font-variant-numeric: tabular-nums; font-size: .95rem; }
.toc a { text-decoration: none; font-weight: 500; font-size: 1.1rem; }
.toc a:hover { text-decoration: underline; text-decoration-color: var(--dot); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.toc .pending { color: var(--ink-mute); }
.toc-meta { color: var(--ink-mute); font-size: .9rem; }

.chapter { max-width: 740px; margin: 0 auto; padding: 96px var(--gutter) var(--section); }
.chapter-head h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); letter-spacing: -0.035em; margin-bottom: 48px; }
.chapter-toc { background: var(--butter-soft); border-radius: var(--radius); padding: 28px 36px; margin-bottom: 64px; }
.chapter-toc h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-soft); margin-bottom: 14px; }
.chapter-toc ol { padding-left: 1.3em; }
.chapter-toc li { padding: 3px 0; }
.chapter-toc a { text-decoration: none; }
.chapter-toc a:hover { text-decoration: underline; }
.prose { font-size: 1.04rem; line-height: 1.8; }
.prose > * + * { margin-top: 1.2em; }
.prose p + p { margin-top: 1.2em; }
.prose h2 { font-size: 1.85rem; margin-top: 2.6em; letter-spacing: -0.03em; }
.prose h3 { font-size: 1.35rem; margin-top: 2em; }
.prose h2 + *, .prose h3 + * { margin-top: .9em; }
.prose a { text-decoration-color: var(--dot); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: .4em; }
.prose blockquote { margin-left: 0; padding-left: 1.4rem; border-left: 3px solid var(--dot); color: var(--ink-soft); font-style: italic; }
.prose code { font-family: var(--mono); font-size: .84em; background: var(--code-bg); padding: .1em .35em; border-radius: 4px; }
.prose pre, .prose .highlight pre { font-family: var(--mono); font-size: .86rem; line-height: 1.65; overflow-x: auto; padding: 1.2rem 1.4rem; margin: 0; }
.prose .highlight, .prose > pre { background: var(--code-bg) !important; border-radius: 10px; margin: 1.6em 0; }
.prose .highlight pre { background: transparent !important; }
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose img { margin: 2em auto; border-radius: 8px; }
.prose table { border-collapse: collapse; font-size: .95rem; width: 100%; }
.prose th, .prose td { border-bottom: 1px solid var(--rule); padding: .55rem .8rem; text-align: left; vertical-align: top; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 3em 0; }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; margin-top: 96px; padding-top: 40px; border-top: 1px solid var(--rule); }
.pager a { text-decoration: none; font-weight: 600; line-height: 1.35; }
.pager a span { display: block; text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; color: var(--ink-mute); margin-bottom: 6px; font-weight: 600; }
.pager-next { text-align: right; }
.pager-toc { padding: 10px 22px; border-radius: 999px; background: var(--butter); font-size: .92rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--footer); color: #e9e6df; padding: 88px 0 48px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr .8fr 1.6fr auto; gap: 56px; align-items: start; }
.footer-id { padding-right: 40px; border-right: 1px solid rgba(255,255,255,.12); min-height: 100%; }
.site-footer .brand { font-size: 1.65rem; display: inline-block; margin-bottom: 20px; }
.footer-id p { color: #bdb9b0; margin-top: 10px; }
.footer-id a { text-decoration: none; }
.footer-id a:hover { color: #fff; }
.footer-social { display: flex; gap: 18px; margin-top: 24px !important; }
.footer-social svg { font-size: 1.3rem; }
.site-footer h2 { font-size: 1rem; letter-spacing: 0; font-weight: 600; margin-bottom: 22px; color: #fff; }
.footer-nav { display: flex; flex-direction: column; gap: 12px; }
.footer-nav a { text-decoration: none; color: #d6d2c9; position: relative; width: fit-content; }
.footer-nav a:hover { color: #fff; }
.footer-nav a.active { color: #fff; }
.footer-nav a.active::before { content: ""; position: absolute; left: -18px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--dot); }
.footer-topics ul { list-style: none; columns: 2; column-gap: 40px; }
.footer-topics li { color: #8f8b83; font-size: .92rem; padding: 4px 0; break-inside: avoid; }
.footer-talk { height: 46px; }
.footer-base { margin-top: 72px; padding-top: 28px; background: linear-gradient(rgba(255,255,255,.1), rgba(255,255,255,.1)) no-repeat var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 1px; color: #8f8b83; font-size: .88rem; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  :root { --section: 104px; }
  .hero, .split { grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; }
  .workshop-main { grid-template-columns: minmax(0, 1fr) 300px; }
  .quotes-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .course-feature .edx { grid-template-columns: 200px minmax(0, 1fr); }
  .course-feature .edx .panel { grid-column: 1 / -1; }
  .course-feature .edx .stats-stack { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); column-gap: 32px; }
  .course-feature .edx .stats-stack li { border-top: 0; padding: 12px 0; }
  .book-grid { grid-template-columns: 320px minmax(0, 1fr); gap: 56px; }
  .period-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-id { border-right: 0; padding-right: 0; }
  .footer-talk { justify-self: start; }
  .book-pair { gap: 48px; }
  .book-card { grid-template-columns: 160px minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 900px) {
  :root { --gutter: 24px; --section: 88px; }
  body { font-size: 16px; }
  .site-header { height: 80px; }
  .menu-button { display: flex; flex-direction: column; gap: 6px; margin-left: auto; cursor: pointer; padding: 10px; }
  .menu-button span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }
  .site-nav { display: none; position: absolute; top: 80px; left: 0; right: 0; z-index: 10; flex-direction: column; gap: 0;
              background: var(--bg); padding: 8px var(--gutter) 24px; border-bottom: 1px solid var(--rule); }
  .site-nav a { padding: 14px 0; font-size: 1.1rem; }
  .site-nav a.active::after { left: -14px; top: 50%; bottom: auto; margin: -3px 0 0; }
  .menu-toggle:checked ~ .site-nav { display: flex; }
  .talk-btn { display: none; }
  .hero, .split, .period-grid, .book-grid, .book-pair { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 72px; padding-bottom: 72px; gap: 56px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 20px; margin-bottom: 48px; }
  .workshop { padding: 16px; }
  .workshop-main { grid-template-columns: minmax(0, 1fr); padding: 8px 8px 28px; gap: 32px; }
  .media, .edx-tile { aspect-ratio: 16 / 10; }
  .talk { flex-wrap: wrap; padding: 24px; gap: 18px; }
  .quotes-4 { grid-template-columns: minmax(0, 1fr); }
  .quotes-2 { columns: 1; }
  .course { padding: 32px 24px; }
  .course-top, .course-feature .edx { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .course-top .panel { grid-column: auto; }
  .services { grid-template-columns: minmax(0, 1fr); }
  .banner { flex-direction: column; align-items: flex-start; padding: 32px; }
  .role { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 44px 0; }
  .panel-sticky, .book-cover { position: static; }
  .book-cover { max-width: 320px; }
  .cta { grid-template-columns: minmax(0, 1fr); padding: 48px 28px; }
  .cta .actions { flex-wrap: wrap; }
  .panel { padding: 28px; }
  .panel-row { padding: 28px; }
  .stats-row, .stats-row[class*=" n-"] { grid-template-columns: minmax(0, 1fr); }
  .reader-intro { grid-template-columns: 120px minmax(0, 1fr); gap: 28px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .footer-nav a.active::before { left: -16px; }
  .chapter { padding-top: 64px; }
  .pager { grid-template-columns: 1fr 1fr; }
  .pager-toc { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
  .btn { height: 52px; padding: 0 24px; }
  .book-card { grid-template-columns: 120px minmax(0, 1fr); }
}
main > .section:first-child::before { display: none; }
.reader-head { padding-top: 96px; }
@media (max-width: 900px) {
  .btn { white-space: normal; height: auto; min-height: 52px; padding: 14px 24px; line-height: 1.3; }
}
@media (max-width: 900px) {
  .reader-intro { grid-template-columns: minmax(0, 1fr); }
  .reader-intro .cover { width: 140px; }
  .reader-intro h1 { font-size: 2.1rem; }
  h1, h2, .book-title { overflow-wrap: break-word; }
}
.cover.sm .cover-title { font-size: 1.05rem; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .book-card { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .book-card .cover { width: 150px; }
}

/* highlights straight from the copy */
/* testimonials: always 4 in a row, long ones scroll inside the card */
.quotes-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; }
@media (max-width: 1180px) { .quotes-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .quotes-4 { grid-template-columns: minmax(0, 1fr); } .course-top { grid-template-columns: minmax(0, 1fr); } }
.course-quotes .quotes { margin-top: 0; }
.quote blockquote p { line-height: 1.7; }
.quote blockquote.is-scrollable:not(.at-end) { -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent); mask-image: linear-gradient(to bottom, #000 78%, transparent); }

/* round 2 */

.stats-row { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 28px 40px; }
.stats-row.n-2 { grid-template-columns: repeat(2, auto); }
.stats-row.n-4 { grid-template-columns: repeat(4, auto); }
.stats-row.n-5 { grid-template-columns: repeat(5, auto); }
.stats-row.compact { justify-content: start; gap: 24px 56px; }
@media (max-width: 1180px) { .stats-row.n-4, .stats-row.n-5 { grid-template-columns: repeat(2, auto); justify-content: start; column-gap: 64px; } }
.panel-lead { margin: 0 0 64px; }
.split .lede { font-size: 1.12rem; }
.quotes-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
@media (max-width: 900px) { .quotes-3 { grid-template-columns: minmax(0, 1fr); } }
.footer-tagline span { display: block; }
main > .section:last-child { padding-bottom: var(--section); }
.reader-meta { color: var(--ink-mute); font-weight: 500; }
.reader-summary { margin-top: 18px; max-width: 38em; }
@media (max-width: 900px) { .talk { flex-direction: column; align-items: flex-start; padding: 32px 28px; gap: 20px; } }
.book-body > p + .inside, .book-body > p ~ .inside { margin-top: 52px; }
@media (max-width: 900px) { .stats-row.stats-row { grid-template-columns: minmax(0, 1fr); } }

/* round 3 */
/* Workshops anchor: the target is the section heading itself, with a fixed offset, so it lands in the same place at
   every screen size (the section's own top padding varies with the breakpoint). */
.anchor { scroll-margin-top: 48px; }
/* Home testimonials: a horizontal carousel of fixed-height cards; long quotes scroll inside the card. */
.quotes-carousel { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 20px) / 4); overflow-x: auto;
                   scroll-snap-type: x mandatory; padding-bottom: 14px; align-items: stretch; scrollbar-width: thin; }
.quotes-carousel .quote { height: 260px; scroll-snap-align: start; padding: 20px 22px 18px; }
.quotes-carousel .quote-mark { width: 32px; height: 32px; font-size: .8rem; margin-bottom: 12px; }
.quotes-carousel blockquote { max-height: none; min-height: 0; }
.quotes-carousel figcaption { margin-top: 14px; padding-top: 12px; font-size: .85rem; line-height: 1.35; }
@media (max-width: 1180px) { .quotes-carousel { grid-auto-columns: calc((100% - 20px) / 2); } }
@media (max-width: 900px) { .quotes-carousel { grid-auto-columns: 85%; } }
.quote figcaption { text-align: right; }
/* workshop: image | title, description and button | highlights (top-aligned with the title) */
.workshop-main { grid-template-columns: 200px minmax(0, 1fr) 292px; gap: 40px; }
.workshop-main > .media { aspect-ratio: 4 / 5; }
.workshop-main .workshop-body { padding-top: 0; }
.workshop-body h3 { font-size: 1.75rem; line-height: 1.2; margin-bottom: 24px; }
@media (max-width: 1180px) {
  .workshop-main { grid-template-columns: 180px minmax(0, 1fr); }
  .workshop-main .facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); column-gap: 32px; }
  .workshop-main .facts li + li { border-top: 0; }
}
@media (max-width: 900px) {
  .workshop-main { grid-template-columns: minmax(0, 1fr); }
  .workshop-main > .media { max-width: 220px; }
  .workshop-main .facts { grid-template-columns: minmax(0, 1fr); }
  .workshop-main .facts li + li { border-top: 1px solid rgba(0,0,0,.08); }
}
.workshop-body .actions { gap: 10px; flex-wrap: nowrap; }
.workshop-body .btn { padding: 0 18px; gap: 8px; font-size: .88rem; height: 46px; }
@media (max-width: 900px) { .workshop-body .actions { flex-wrap: wrap; } }
/* featured workshop: soft yellow outline and glow */
.workshop { border: 1px solid var(--butter-deep); box-shadow: 0 0 0 4px rgba(253, 241, 204, .4), 0 14px 48px -14px rgba(242, 183, 5, .16); }
.workshop-body p.eyebrow { margin-bottom: 14px; font-size: 0.74rem; line-height: 1.4; color: var(--ink-soft); }
/* CTA banner: the eyebrow keeps its usual small size (.cta p would otherwise enlarge it) */
.cta p.eyebrow { font-size: 0.74rem; color: var(--ink-soft); max-width: none; }
/* CTA title on one line on wide screens */
@media (min-width: 901px) { .cta h2 { white-space: nowrap; font-size: clamp(1.7rem, 2.4vw, 2.1rem); } }
@media (max-width: 1100px) { .cta { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
.course-feature .stat-text strong { font-size: 1.1rem; }   /* edX highlights: values a touch smaller than the default 1.25rem */
.course-feature .edx { grid-template-columns: 190px minmax(0, 1fr) 344px; }   /* room for "2020 edX Prize finalist" on one line */
@media (max-width: 1180px) { .course-feature .edx { grid-template-columns: 200px minmax(0, 1fr); } }
/* edX highlights: a more compact panel */
.course-feature .edx { grid-template-columns: 190px minmax(0, 1fr) 316px; }
.course-feature .panel { padding: 22px 26px; }
.course-feature .stats-stack li { padding: 15px 0; gap: 16px; }
.course-feature .stats-stack li:first-child { padding-top: 4px; }
.course-feature .stats-stack li:last-child { padding-bottom: 4px; }
.course-feature .icon-circle { width: 44px; height: 44px; font-size: 1.1rem; }
.course-feature .stat-text strong { font-size: 1.02rem; }
.course-feature .stat-text span { font-size: .86rem; }
@media (max-width: 1180px) { .course-feature .edx { grid-template-columns: 200px minmax(0, 1fr); } }
/* university courses: an image beside the course (like edX), text across the full width */
.course-top.has-visual { grid-template-columns: 190px minmax(0, 1fr); gap: 40px; }
.course-top.has-visual .course-body p { max-width: none; }
.course-media, .course-tile { aspect-ratio: 4 / 5; }
.course-tile { background: linear-gradient(165deg, #2b2620, #121110); }
.course-tile strong { font-size: 1.15rem; }
@media (max-width: 900px) { .course-top.has-visual { grid-template-columns: minmax(0, 1fr); gap: 24px; } .course-media, .course-tile { max-width: 220px; aspect-ratio: 4 / 5; } }
@media (max-width: 900px) { .course-feature .edx { grid-template-columns: minmax(0, 1fr); } }
/* corporate InfoSec: all three cards as tall as the short ones; the long quote scrolls inside */
#training-information-security .quote { height: 274px; }
#training-information-security .quote blockquote { max-height: none; min-height: 0; }
@media (max-width: 900px) { #training-information-security .quote { height: auto; } #training-information-security .quote blockquote { max-height: 17em; } }
.reader-intro { align-items: start; }   /* long description: keep the cover at the top */
.stats-row.compact { gap: 20px 32px; justify-content: space-between; }
.stats-row.compact li { gap: 14px; }
.stats-row.compact .stat-text { white-space: nowrap; }
/* supplied cover mockups: the image has its own book shape and shadow, on the page colour (baked in) */
img.cover { box-shadow: none; border-radius: 0; }
/* book page: cover as large as on the Writing page; contents centred */
.reader-intro { grid-template-columns: 340px minmax(0, 1fr); gap: 72px; }
@media (max-width: 1180px) { .reader-intro { grid-template-columns: 280px minmax(0, 1fr); gap: 48px; } }
.toc-section { display: flex; flex-direction: column; align-items: center; }
.toc-section .toc, .toc-heading { width: 100%; max-width: 860px; }
.course-body .actions { margin-top: 32px; }
@media (max-width: 900px) { .reader-intro { grid-template-columns: minmax(0, 1fr); gap: 28px; } .reader-intro .cover { width: 220px; } }
/* book contents: the whole row is the link; on hover it turns bright yellow, no underline */
.toc li { position: relative; padding-left: 14px; padding-right: 14px; transition: background .12s ease; }
.toc li:not(.pending):hover { background: var(--butter-deep); }
.toc li:not(.pending) a::after { content: ""; position: absolute; inset: 0; }
.toc a:hover { text-decoration: none; }
.toc a:hover, .toc li a { background: none !important; box-shadow: none !important; text-decoration: none; }

/* code examples: light yellow, highlighted with the site palette only (pygments classes) */
:root { --code-ink: #8a6400; }   /* dark yellow, readable on the light yellow background */
.prose .highlight, .prose > pre { background: var(--butter-soft) !important; }
.prose code { background: var(--butter-soft); }
.prose .highlight pre, .prose .highlight span { color: var(--ink); font-style: normal; font-weight: 400; }
.prose .highlight :is(.k, .kc, .kd, .kn, .kp, .kr, .kt, .ow, .bp) { color: var(--code-ink); font-weight: 700; }
.prose .highlight :is(.s, .s1, .s2, .sa, .sb, .sc, .sd, .se, .sh, .si, .sx, .sr, .ss, .dl,
                      .m, .mi, .mf, .mh, .mo, .mb, .il, .l, .ld) { color: var(--code-ink); }
/* bold only for what's being defined or imported: function, class and module names */
.prose .highlight :is(.nf, .nc, .nn, .fm) { font-weight: 600; }
.prose .highlight :is(.c, .c1, .cm, .cp, .cs, .ch, .cpf) { color: var(--ink-mute); font-style: italic; font-weight: 400; }
.prose .highlight :is(.gp) { color: var(--ink-mute); font-weight: 400; }
.prose .highlight :is(.go, .gt, .gr, .err) { color: var(--ink-soft); font-weight: 400; }
.course-media { border: 1px solid var(--rule); }
/* the edX image carries its title: keep it uncropped (4:5) on phones too */
@media (max-width: 900px) { .edx-visual .media { aspect-ratio: 4 / 5; max-width: 220px; } }

/* Ribbon label: sits on the top rule, flush left; the rule continues from the text. */
.logos { position: relative; }
.logos-label { position: absolute; left: 0; top: 0; transform: translateY(-50%); margin: 0; padding-right: 16px; background: var(--bg); line-height: 1; }


/* About: a project link under its description (same text link as the service cards). */
.role-foot { margin-top: 24px; }

/* Footer: legal links beside the copyright. */
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.footer-legal { display: flex; gap: 24px; }
.footer-legal a { color: inherit; text-decoration: none; }
.footer-legal a:hover { color: #fff; }
