@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 100% 125%;
  font-display: swap;
  src: url(../fonts/archivo-400-900-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* AfterEffectsClub.com v3: deep indigo ground, extended Archivo display type, glowing light trails. */

:root, .scheme-indigo {
  --bg: #090B38; --bg-2: #11134D; --ink: #FCFDFD; --text: #E3E2F7; --lead: #A8A7E3; --link: #D1D3FF;
  --muted: #AEADDA; --rule: #2A2B5B; --rule-2: #444483; --accent: #B36BFF; --accent-ink: #0B0B3B;
  --scrim: 11, 12, 32; --glow: 45, 36, 170; --lift: 30, 17, 133;
  --tr-core: #ECEAFF; --tr-mid: #9D95FF; --tr-glow: #493DDB; --tr-hot: #B36BFF;
}
.scheme-violet {
  --bg: #22093F; --bg-2: #2E1056; --ink: #FFFFFF; --text: #EEE6FA; --lead: #CDB6F2; --link: #EBDDFF;
  --muted: #C9B8E8; --rule: #43226B; --rule-2: #6A3FA0; --accent: #9999FF; --accent-ink: #120A2E;
  --scrim: 22, 6, 40; --glow: 122, 43, 214; --lift: 74, 21, 144;
  --tr-core: #FBF0FF; --tr-mid: #C88BFF; --tr-glow: #7A2BD6; --tr-hot: #9999FF;
}
.scheme-lavender {
  --bg: #9999FF; --bg-2: #A8A8FF; --ink: #0B0B3B; --text: #0F0F45; --lead: #1F1C6B; --link: #0B0B3B;
  --muted: #1F1C6B; --rule: #7A7AE4; --rule-2: #5A5AC8; --accent: #3A1D8F; --accent-ink: #FFFFFF;
  --scrim: 11, 11, 59; --glow: 255, 255, 255; --lift: 214, 210, 255;
  --tr-core: #FFFFFF; --tr-mid: #F2EEFF; --tr-glow: #5A48E6; --tr-hot: #D6B4FF;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--gh-font-body, 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif); font-size: 18px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--tr-core); outline-offset: 3px; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 16px; background: var(--ink); color: var(--bg); }
.skip:focus { top: 12px; }
.trails { display: block; pointer-events: none; }
h1, h2, h3, h4, .mark { font-family: var(--gh-font-heading, var(--gh-font-body, 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif)); }

/* ---------------------------------------------------------------- header */
.bar { position: absolute; top: 0; left: 0; right: 0; z-index: 20; }
.bar-in { display: flex; align-items: center; gap: 12px; padding: 24px 4vw 0; }
.mark {
  margin-right: auto; color: var(--ink); text-decoration: none; white-space: nowrap;
  font-weight: 800; font-stretch: 125%; letter-spacing: -.02em; font-size: clamp(19px, 2vw, 29px);
}
.bar-nav ul { display: flex; gap: clamp(18px, 2.1vw, 32px); list-style: none; margin: 0; padding: 0; }
.bar-nav a { color: var(--ink); text-decoration: none; font-size: 16.5px; font-weight: 500; white-space: nowrap; }
.bar-nav a:hover { text-decoration: underline; text-underline-offset: 6px; }
.search-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; margin-left: clamp(8px, 3vw, 44px);
  background: none; border: 0; color: var(--ink); cursor: pointer; border-radius: 50%;
}
.search-btn:hover { background: rgba(255, 255, 255, .08); }
.menu-btn {
  display: none; align-items: center; gap: 10px; height: 44px; padding: 0 16px; cursor: pointer;
  background: none; color: var(--ink); border: 1px solid var(--rule-2); border-radius: 999px; font: inherit; font-size: 15px;
}
.menu-ico, .menu-ico::before, .menu-ico::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.menu-ico { position: relative; }
.menu-ico::before, .menu-ico::after { content: ""; position: absolute; left: 0; }
.menu-ico::before { top: -6px; }
.menu-ico::after { top: 6px; }
.menu-panel {
  position: absolute; top: calc(100% + 10px); left: 4vw; right: 4vw; padding: 22px 26px 18px;
  background: var(--bg-2); border: 1px solid var(--rule-2); border-radius: 14px; box-shadow: 0 30px 60px rgba(0, 0, 0, .45);
}
.menu-panel[hidden] { display: none; }
.menu-hubs { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
.menu-hubs a { display: block; padding: 11px 0; border-bottom: 1px solid var(--rule); color: var(--ink); font-weight: 700; font-size: 18px; text-decoration: none; }
.menu-site ul { display: flex; flex-wrap: wrap; gap: 4px 22px; list-style: none; margin: 0; padding: 0; }
.menu-site a { display: inline-block; padding: 8px 0; color: var(--lead); }
.scheme-lavender .bar { position: relative; background: var(--bg); padding-bottom: 18px; }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; overflow: hidden; isolation: isolate; height: clamp(600px, 51.4vw, 800px);
  background: radial-gradient(50% 62% at 8% 100%, rgba(var(--lift), .95), rgba(var(--lift), .4) 45%, transparent 72%),
    radial-gradient(52% 70% at 76% 42%, rgba(var(--glow), .32), transparent 72%), var(--bg);
}
.scheme-lavender .hero { height: clamp(560px, 47vw, 740px); }
.hero-ph {
  position: absolute; top: 0; right: 0; bottom: 0; width: 52%; margin: 0; z-index: 1;
  -webkit-mask-image: radial-gradient(ellipse 72% 80% at 62% 46%, #000 42%, rgba(0, 0, 0, .55) 62%, transparent 82%);
  mask-image: radial-gradient(ellipse 72% 80% at 62% 46%, #000 42%, rgba(0, 0, 0, .55) 62%, transparent 82%);
}
.hero-ph img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
/* Lavender has dark ink: a lavender veil over the left of the photo keeps every pixel behind the headline
   light enough for >= 4.5:1 against #0B0B3B (sampled in qa/contrast-hero.json). */
.scheme-lavender .hero-ph::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--bg) 0%, var(--bg) 24%, rgba(153, 153, 255, .7) 34%, rgba(153, 153, 255, 0) 54%);
}
.trails-hero { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
/* the bar overlays the hero and the article head: fade the strands out under it so the logo and nav keep AA */
.trails-hero { -webkit-mask-image: linear-gradient(to bottom, transparent 0, transparent 66px, #000 156px); mask-image: linear-gradient(to bottom, transparent 0, transparent 66px, #000 156px); }
.scheme-lavender .trails-hero { -webkit-mask-image: none; mask-image: none; }
.hero-in { position: absolute; z-index: 3; left: 4vw; top: 43%; width: min(64vw, 960px); }
.hero h1 { margin: 0; font-weight: 400; }
.h1-display {
  display: block; color: var(--ink); white-space: nowrap;
  font-weight: 900; font-stretch: 112%; letter-spacing: -.03em; line-height: .95; font-size: clamp(46px, 7.8vw, 112px);
}
.h1-lead {
  display: block; max-width: min(640px, 46vw); margin-top: clamp(16px, 2vw, 30px);
  color: var(--lead); font-size: clamp(19px, 2.1vw, 31px); line-height: 1.3; letter-spacing: -.005em;
}
.hero-links { display: flex; flex-wrap: wrap; gap: 10px clamp(26px, 3.9vw, 56px); margin: clamp(20px, 2.5vw, 38px) 0 0; }
.hero-links a {
  color: var(--link); font-size: clamp(18px, 1.75vw, 25px); font-weight: 500;
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 8px;
}
.hero-links a:hover { color: var(--ink); text-decoration-thickness: 2.5px; }

/* ---------------------------------------------------------------- mosaic */
.mosaic {
  display: grid; gap: 4px; background: var(--bg);
  grid-template-columns: 45.7fr 28.2fr 4.3fr 21.8fr; grid-template-rows: 47fr 53fr; height: clamp(560px, 60.8vw, 960px);
}
.tile {
  position: relative; overflow: hidden; isolation: isolate; min-height: 0; margin: 0;
  display: flex; flex-direction: column; justify-content: flex-end; background: var(--bg-2);
}
.tile img, .tile-blank { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.tile-blank { background: radial-gradient(70% 80% at 30% 30%, var(--tr-glow), var(--bg) 75%); }
.tile::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(var(--scrim), .94) 0%, rgba(var(--scrim), .62) 30%, rgba(var(--scrim), 0) 62%);
}
.tile:hover img { transform: scale(1.035); }
.tile-txt { padding: clamp(14px, 1.5vw, 24px) clamp(16px, 1.6vw, 26px); }
.tile-t { margin: 0; color: #fff; font-size: clamp(17px, 1.66vw, 24px); line-height: 1.18; font-weight: 700; letter-spacing: -.01em; max-width: 22em; }
.tile-t a { color: #fff; text-decoration: none; }
.tile-t a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.tile-t a:hover { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.tile-d { margin: .5em 0 0; color: #C8C7E4; font-size: clamp(14px, 1.1vw, 16px); line-height: 1.42; max-width: 34em; }
.tile-m { position: relative; z-index: 2; margin: .6em 0 0; color: #C8C7E4; font-size: 14.5px; line-height: 1.4; }
.tile-m a { color: #E4E3FA; text-decoration: none; }
.tile-m a:hover { text-decoration: underline; text-underline-offset: 4px; }
.tile:nth-child(1) { grid-column: 1; grid-row: 1 / 3; }
.tile:nth-child(1) .tile-t { font-size: clamp(22px, 2.5vw, 36px); font-weight: 800; font-stretch: 112%; letter-spacing: -.02em; max-width: 15em; }
.tile:nth-child(1) .tile-txt { padding: clamp(18px, 2vw, 34px); }
.tile:nth-child(2) { grid-column: 2; grid-row: 1; }
.tile:nth-child(3) { grid-column: 3 / 5; grid-row: 1; }
.tile:nth-child(4) { grid-column: 2 / 4; grid-row: 2; }
.tile:nth-child(5) { grid-column: 4; grid-row: 2; }
.tile:nth-child(n+6) { display: none; }

/* ---------------------------------------------------------------- dates in violet light (every dated list) */
.lit {
  color: var(--tr-mid); font-size: 14px; font-weight: 600; font-stretch: 125%; letter-spacing: .01em; white-space: nowrap;
  text-shadow: 0 0 12px var(--tr-glow);
}
.sl { color: var(--tr-hot); }
.scheme-lavender .lit { color: var(--ink); text-shadow: 0 0 10px rgba(255, 255, 255, .7); }
.scheme-lavender .sl { color: var(--accent); }
.scheme-lavender .tile .lit, .scheme-lavender .rel-i .lit { color: var(--tr-mid); text-shadow: 0 0 12px var(--tr-glow); }
.scheme-lavender .tile .sl { color: var(--tr-hot); }

/* ---------------------------------------------------------------- latest strip: the dates ride above the trail band,
   the headlines hang below it (posts five to eight of the one homepage feed) */
.band { position: relative; height: clamp(64px, 9.4vw, 135px); overflow: hidden; }
.trails-band { position: absolute; inset: 0; width: 100%; height: 100%; }
.latest {
  --lat-top: 56px; --band-h: clamp(64px, 9.4vw, 135px);
  position: relative; display: grid; grid-template-columns: minmax(150px, 17fr) 83fr; padding: 0 4vw clamp(40px, 4.4vw, 64px);
}
.latest > .band { position: absolute; left: 0; right: 0; top: var(--lat-top); height: var(--band-h); }
.lat-head { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.lat-head h2 {
  display: flex; align-items: flex-end; height: var(--lat-top); margin: 0; padding-bottom: 10px;
  color: var(--ink); font-size: clamp(20px, 1.7vw, 25px); font-weight: 800; font-stretch: 125%; letter-spacing: -.02em; line-height: 1.08;
}
.older { margin-top: calc(var(--band-h) + 16px); color: var(--link); font-size: 16px; text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.older:hover { color: var(--ink); }
.lat-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
.lat { display: flex; flex-direction: column; min-width: 0; padding: 0 clamp(14px, 1.6vw, 26px); }
.lat .lit { display: flex; align-items: flex-end; height: var(--lat-top); padding-bottom: 10px; }
.lat h3 { margin: calc(var(--band-h) + 16px) 0 0; font-size: clamp(17px, 1.38vw, 20px); line-height: 1.28; font-weight: 700; }
.lat h3 a { color: var(--ink); text-decoration: none; }
.lat h3 a:hover, .lat-hub a:hover { text-decoration: underline; text-underline-offset: 4px; }
.lat-hub { margin: .5em 0 0; font-size: 15px; line-height: 1.4; }
.lat-hub a { color: var(--muted); text-decoration: none; }

/* ---------------------------------------------------------------- hub index: a section front whose rules drop
   straight down from the mosaic seams; two lead hubs stacked in the wide column, six compact ones on the right */
.hubs { display: grid; grid-template-columns: 45.7fr 54.3fr; padding: clamp(30px, 3.4vw, 52px) 0 clamp(48px, 5.4vw, 84px); }
.hubs-lead { min-width: 0; padding: 0 clamp(24px, 3vw, 48px) 0 4vw; }
.hubs-rest { display: grid; grid-template-columns: 28.2fr 26.1fr; min-width: 0; border-left: 1px solid var(--rule); }
.hub { min-width: 0; }
.hub h2 { margin: 0 0 .35em; font-stretch: 125%; letter-spacing: -.02em; line-height: 1.1; overflow-wrap: break-word; }
.hub h2 a { color: var(--ink); text-decoration: none; }
.hub h2 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.hub-line { margin: 0; color: var(--lead); line-height: 1.45; }
.hub-list, .hub-tasks { list-style: none; margin: .75em 0 0; padding: 0; }
.hub-list li, .hub-tasks li { margin: .5em 0 0; line-height: 1.36; }
.hub-list a { margin-right: .4em; color: var(--ink); text-decoration: none; }
.hub-list a:hover { text-decoration: underline; text-underline-offset: 4px; }
.hub-tasks li { color: var(--muted); }
.hub-lead + .hub-lead { margin-top: clamp(36px, 3.8vw, 58px); }
.hub-lead h2 { font-size: clamp(30px, 3.1vw, 46px); font-weight: 900; }
.hub-lead .hub-line { font-size: clamp(17px, 1.35vw, 20px); }
.hub-lead .hub-list, .hub-lead .hub-tasks { font-size: clamp(18px, 1.42vw, 21px); }
.hubs-rest .hub { padding: 0 clamp(18px, 2.2vw, 34px) clamp(30px, 3.2vw, 48px); }
.hubs-rest .hub:nth-child(2n) { border-left: 1px solid var(--rule); }
.hubs-rest .hub h2 { font-size: clamp(19px, 1.5vw, 23px); font-weight: 800; }
.hubs-rest .hub-line { font-size: 15.5px; }
.hubs-rest .hub-list, .hubs-rest .hub-tasks { font-size: 16.5px; }

/* ---------------------------------------------------------------- footer */
.foot { position: relative; overflow: hidden; padding: clamp(46px, 4.9vw, 70px) 4vw 30px; }
.trails-foot { position: absolute; left: 0; top: 0; width: 100%; height: clamp(46px, 4.9vw, 70px); }
.foot-in { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 32px; padding-top: 22px; border-top: 1px solid var(--rule-2); }
.foot-line { margin: 0; color: var(--muted); font-size: 15px; }
.foot-nav ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.foot-nav a { color: var(--ink); font-size: 15px; text-decoration: none; }
.foot-nav a:hover { text-decoration: underline; }
.foot-tm { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 13.5px; }

/* ---------------------------------------------------------------- article + page */
.grid { max-width: 1240px; margin: 0 auto; }
.art-head, .err {
  position: relative; overflow: hidden; isolation: isolate; padding: clamp(112px, 10vw, 150px) 4vw clamp(36px, 4vw, 60px);
  background: radial-gradient(50% 80% at 80% 40%, rgba(var(--glow), .3), transparent 72%);
}
.scheme-lavender .art-head, .scheme-lavender .err { padding-top: clamp(40px, 4vw, 60px); }
.head-trails { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; opacity: .7; }
.art-g { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.page .art-g { grid-template-columns: 1fr; max-width: 860px; }
.crumbs ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0 0 20px; padding: 0; color: var(--muted); font-size: 15px; }
.crumbs li + li::before { content: "/"; margin: 0 .6em; color: var(--rule-2); }
.art-head .crumbs, .list-head .crumbs { text-shadow: 0 0 3px var(--bg), 0 0 9px var(--bg); } /* hairline trails can cross the small crumb text */
.crumbs a { color: var(--link); }
.art-head h1, .list-head h1, .err h1 {
  margin: 0; color: var(--ink); font-weight: 900; font-stretch: 118%; letter-spacing: -.03em; line-height: 1.03;
  font-size: clamp(34px, 4.4vw, 64px); overflow-wrap: break-word;
}
.dek { margin: .75em 0 0; max-width: 38em; color: var(--lead); font-size: clamp(18px, 1.6vw, 23px); line-height: 1.45; }
.byline { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 22px 0 0; color: var(--muted); font-size: 15px; }
.byline a { color: var(--ink); }
/* Keep article metadata readable where decorative trails cross it. */
.art-head .byline > a, .art-head .byline > span { background-color: var(--bg); box-shadow: 0 0 0 3px var(--bg); }
.art-ph { margin: 0; }
.art-ph img, .err-ph img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 50%, transparent 74%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 50%, transparent 74%);
}
.art-ph figcaption { margin-top: -18px; color: var(--muted); font-size: 14.5px; text-align: center; }
.art-body { padding: clamp(20px, 3vw, 36px) 0 clamp(56px, 6vw, 96px); }
.gh-content {
  display: grid; color: var(--text); font-size: 19px; line-height: 1.72;
  grid-template-columns: [full-start] minmax(4vw, 1fr) [wide-start] minmax(0, 160px) [main-start] min(720px, 92vw) [main-end] minmax(0, 160px) [wide-end] minmax(4vw, 1fr) [full-end];
}
.gh-content > * { grid-column: main-start / main-end; min-width: 0; }
.gh-content > :first-child { margin-top: 0; }
.gh-content h2 { margin: 1.9em 0 .55em; color: var(--ink); font-size: clamp(25px, 2.2vw, 32px); line-height: 1.15; font-weight: 800; font-stretch: 112%; letter-spacing: -.02em; }
.gh-content h3 { margin: 1.6em 0 .4em; color: var(--ink); font-size: 22px; line-height: 1.25; font-weight: 700; }
.gh-content p, .gh-content ul, .gh-content ol { margin: 0 0 1.1em; }
.gh-content ol, .gh-content ul { padding-left: 1.3em; }
.gh-content li { margin: .35em 0; }
.gh-content li::marker { color: var(--tr-mid); font-weight: 700; }
.gh-content a { color: var(--link); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.gh-content strong { color: var(--ink); }
.gh-content code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: .86em; padding: .1em .35em; border-radius: 5px; background: var(--bg-2); color: var(--ink); }
.gh-content pre { overflow-x: auto; padding: 18px 20px; border-radius: 8px; background: var(--bg-2); font-size: 15px; }
.gh-content pre code { padding: 0; background: none; }
kbd {
  display: inline-block; padding: .02em .45em; border: 1px solid var(--rule-2); border-bottom-width: 2px; border-radius: 6px;
  background: var(--bg-2); color: var(--ink); font-family: inherit; font-size: .84em; font-weight: 600; line-height: 1.45;
}
.gh-content blockquote { margin: 1.5em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--tr-mid); color: var(--ink); font-size: 1.12em; }
.gh-content hr { height: 1px; margin: 2.4em 0; border: 0; background: var(--rule-2); }
.gh-content table { width: 100%; margin: 1.6em 0; border-collapse: collapse; font-size: 16.5px; line-height: 1.5; }
.gh-content th { text-align: left; color: var(--ink); font-weight: 700; border-bottom: 1px solid var(--rule-2); padding: 10px 16px 10px 0; vertical-align: bottom; }
.gh-content td { border-bottom: 1px solid var(--rule); padding: 12px 16px 12px 0; vertical-align: top; }
.kg-card { margin: 1.8em 0; }
.kg-width-wide { grid-column: wide-start / wide-end !important; }
.kg-width-full { grid-column: full-start / full-end !important; }
.kg-image-card img { width: 100%; height: auto; border-radius: 4px; }
.kg-width-full img { border-radius: 0; }
.kg-card figcaption, .gh-content figcaption { padding-top: 10px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.kg-width-full figcaption { padding-left: 4vw; padding-right: 4vw; }
.kg-callout-card { display: flex; gap: 16px; padding: 20px 22px; background: var(--bg-2); border-left: 3px solid var(--accent); border-radius: 4px; }
.kg-callout-emoji { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 16px; }
.kg-callout-text { font-size: 17.5px; line-height: 1.55; }
.kg-gallery-container { display: flex; flex-direction: column; gap: 6px; }
.kg-gallery-row { display: flex; gap: 6px; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; }
.kg-bookmark-card a.kg-bookmark-container { display: flex; color: inherit; text-decoration: none; border: 1px solid var(--rule-2); border-radius: 6px; overflow: hidden; }
.kg-bookmark-content { flex: 1; min-width: 0; padding: 18px 20px; }
.kg-bookmark-title { color: var(--ink); font-weight: 700; }
.kg-bookmark-description { max-height: 3em; overflow: hidden; margin-top: 6px; color: var(--muted); font-size: 15px; }
.kg-bookmark-metadata { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; color: var(--muted); font-size: 14px; }
.kg-bookmark-icon { width: 20px; height: 20px; }
.kg-bookmark-thumbnail { position: relative; flex: 0 0 30%; min-height: 120px; }
.kg-bookmark-thumbnail img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kg-toggle-card { padding: 14px 0; border-top: 1px solid var(--rule-2); border-bottom: 1px solid var(--rule); }
.kg-toggle-heading { display: flex; justify-content: space-between; gap: 12px; }
.kg-toggle-card h4 { margin: 0; font-size: 19px; color: var(--ink); }
.kg-toggle-card-icon { width: 28px; height: 28px; background: none; border: 0; color: inherit; cursor: pointer; }
.kg-toggle-card[data-kg-toggle-state="close"] .kg-toggle-content { display: none; }
.kg-button-card { display: flex; }
.kg-button-card.kg-align-center { justify-content: center; }
.kg-btn { display: inline-block; padding: 12px 22px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 700; text-decoration: none; }
.kg-embed-card { display: flex; flex-direction: column; align-items: center; }
.kg-video-card video, .kg-embed-card iframe { max-width: 100%; }
.art-end { max-width: min(720px, 92vw); margin: 44px auto 0; }
.bio { display: flex; gap: 18px; align-items: flex-start; padding-top: 24px; border-top: 1px solid var(--rule-2); }
.bio p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.55; }
.bio .bio-name { margin-bottom: 4px; }
.bio-name a { color: var(--ink); font-weight: 700; font-size: 18px; text-decoration: none; }
.bio-mark, .bio-img { flex: none; width: 60px; height: 60px; border-radius: 50%; object-fit: cover; }
.bio-mark { background: radial-gradient(circle at 36% 34%, var(--tr-core) 0 12%, var(--tr-mid) 30%, var(--tr-glow) 58%, var(--bg-2) 80%); }
.art-tags { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 22px 0 0; font-size: 16px; }
.art-tags a { color: var(--link); }

/* related guides: a small gapless mosaic, same scrim as the homepage tiles */
.rel { padding: 0 0 clamp(40px, 5vw, 72px); }
.rel h2 { margin: 0 4vw 18px; color: var(--ink); font-size: clamp(24px, 2.2vw, 32px); font-weight: 800; font-stretch: 112%; letter-spacing: -.02em; }
.rel-g { max-width: none; }
.rel-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px; height: clamp(300px, 30vw, 440px); list-style: none; margin: 0; padding: 0; }
.rel-list:has(> :nth-child(3)) { grid-template-columns: 1.4fr 1fr 1fr; }
.rel-i { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(16px, 1.6vw, 26px); background: var(--bg-2); }
.rel-ph { position: absolute; inset: 0; z-index: -2; }
.rel-ph img { width: 100%; height: 100%; object-fit: cover; }
.rel-i::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(var(--scrim), .94) 0%, rgba(var(--scrim), .6) 38%, rgba(var(--scrim), .05) 72%); }
.rel-i .lt-tag { position: relative; z-index: 2; margin: 0 0 6px; font-size: 14.5px; }
.rel-i .lt-tag a { color: #D9D8F5; }
.rel-i h3 { margin: 0; font-size: clamp(18px, 1.6vw, 23px); line-height: 1.2; }
.rel-i h3 a { color: #fff; text-decoration: none; }
.rel-i h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.rel-i .rel-ex { margin: 6px 0 0; color: #C8C7E4; font-size: 15px; line-height: 1.45; }
.rel-i .rel-date { margin: 8px 0 0; line-height: 1.3; }

/* ---------------------------------------------------------------- tag / index / author */
.list-head {
  position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: flex-end;
  min-height: clamp(400px, 38vw, 540px); padding: clamp(112px, 9vw, 140px) 4vw clamp(34px, 4vw, 56px);
}
.list-cover { position: absolute; inset: 0; z-index: -3; margin: 0; }
.list-cover img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.list-head::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(to top, rgba(var(--scrim), .92) 0%, rgba(var(--scrim), .55) 48%, rgba(var(--scrim), .35) 100%);
}
.list-head .head-trails { z-index: -1; opacity: .8; }
.list-head .grid { width: 100%; }
.list-head h1 { color: #fff; font-size: clamp(38px, 5.6vw, 84px); }
.list-head .dek { color: #DAD9F5; }
.list-head .crumbs a, .list-head .crumbs ol { color: #E4E3FA; }
.author-img { width: 96px; height: 96px; border-radius: 50%; margin-bottom: 16px; object-fit: cover; }
.author-web a { color: #fff; }
.list { padding: clamp(32px, 4vw, 56px) 4vw clamp(56px, 6vw, 90px); }
.list-body { max-width: 1040px; }
.list h2 { margin: 0 0 8px; color: var(--ink); font-size: clamp(24px, 2.2vw, 30px); font-weight: 800; font-stretch: 112%; letter-spacing: -.02em; }
.rows { list-style: none; margin: 0; padding: 0; }
.lt-row { display: grid; grid-template-columns: minmax(120px, 260px) 1fr; gap: clamp(16px, 2.4vw, 32px); align-items: center; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.lt-th img, .lt-th .lt-blank { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; }
.lt-blank { display: block; background: radial-gradient(70% 80% at 30% 30%, var(--tr-glow), var(--bg-2) 75%); }
.lt-row h3 { margin: 0 0 6px; font-size: clamp(19px, 1.7vw, 24px); line-height: 1.22; font-weight: 700; }
.lt-row h3 a { color: var(--ink); text-decoration: none; }
.lt-row h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.lt-row p { margin: 0; color: var(--text); font-size: 16.5px; line-height: 1.55; }
.lt-row .lt-tag { margin-bottom: 6px; font-size: 14.5px; }
.lt-row .lt-tag a { color: var(--muted); }
.lt-row .lt-meta { margin-top: 8px; color: var(--muted); font-size: 14.5px; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 30px; color: var(--muted); font-size: 16px; }
.pagination a { color: var(--link); }
.other-topics { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--rule); font-size: 16px; line-height: 1.6; }
.ot-h { color: var(--ink); font-weight: 700; font-stretch: 125%; }
.other-topics ul { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.other-topics li + li::before { content: "/"; margin: 0 .55em; color: var(--tr-hot); }
.scheme-lavender .other-topics li + li::before { color: var(--accent); }
.other-topics a { color: var(--link); }

/* ---------------------------------------------------------------- error */
.err-g { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.err-code { margin: 0 0 10px; color: var(--tr-mid); font-weight: 900; font-stretch: 125%; font-size: clamp(22px, 2vw, 28px); }
.err .dek { margin-bottom: 26px; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px; cursor: pointer;
  background: none; color: var(--ink); border: 1.5px solid var(--link); border-radius: 999px; font: inherit; font-size: 16px; font-weight: 600;
}
.pill:hover { background: rgba(255, 255, 255, .08); }
.err-hubs { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; margin: 28px 0 0; padding: 0; font-size: 17px; }
.err-hubs li + li::before { content: "/"; margin: 0 .6em; color: var(--rule-2); }
.err-hubs a { color: var(--muted); }
.err-ph { margin: 0; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1360px) {
  .bar-nav { display: none; }
  .menu-btn { display: inline-flex; }
  .search-btn { margin-left: 0; }
}
@media (max-width: 1000px) {
  .latest { display: block; }
  .latest > .band { position: relative; top: auto; left: auto; right: auto; margin: 0 -4vw 22px; }
  .lat-head { flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px; }
  .lat-head h2 { height: auto; padding: 0; }
  .older { margin-top: 0; }
  .lat-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(20px, 4vw, 44px); }
  .lat { padding: 18px 0 0; }
  .lat .lit { display: block; height: auto; padding: 0; }
  .lat h3 { margin-top: 4px; }
  .hubs { grid-template-columns: minmax(0, 1fr); row-gap: clamp(34px, 5vw, 48px); padding-left: 4vw; padding-right: 4vw; }
  .hubs-lead { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(20px, 4vw, 44px); padding: 0; }
  .hub-lead + .hub-lead { margin-top: 0; }
  .hubs-rest { border-left: 0; }
  .hubs-rest .hub:nth-child(2n+1) { padding-left: 0; }
  .hubs-rest .hub:nth-child(2n) { padding-right: 0; }
}
@media (max-width: 860px) {
  .hero, .scheme-lavender .hero { height: auto; padding-bottom: 44px; }
  .hero-ph {
    position: relative; width: 100%; height: min(104vw, 540px);
    -webkit-mask-image: radial-gradient(ellipse 88% 78% at 58% 42%, #000 48%, transparent 82%);
    mask-image: radial-gradient(ellipse 88% 78% at 58% 42%, #000 48%, transparent 82%);
  }
  .hero-ph img { object-position: 50% 40%; }
  /* the bar overlays the photo here: a short top scrim keeps the search and menu icons above 3:1 */
  .hero-ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(var(--scrim), .72) 0, rgba(var(--scrim), .38) 72px, rgba(var(--scrim), 0) 136px); }
  .hero > .trails-hero { inset: 0 0 auto 0; height: calc(min(104vw, 540px) + 40px); }
  .trails-hero { -webkit-mask-image: linear-gradient(to bottom, transparent 0, transparent 62px, #000 128px); mask-image: linear-gradient(to bottom, transparent 0, transparent 62px, #000 128px); }
  .scheme-lavender .hero-ph::after { background: linear-gradient(to top, var(--bg) 0%, rgba(153, 153, 255, 0) 30%); }
  .scheme-lavender .hero-in { margin-top: 0; }
  .hero-in { position: relative; left: auto; top: auto; width: auto; margin-top: -64px; padding: 0 16px; }
  .h1-display { white-space: normal; font-size: clamp(44px, 12.6vw, 76px); line-height: .98; }
  .h1-lead { max-width: 34em; font-size: clamp(18px, 4.8vw, 22px); }
  .hero-links { gap: 10px 26px; }
  .hero-links a { font-size: 18px; }
  .mosaic { height: auto; grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .tile:nth-child(n) { grid-column: auto; grid-row: auto; aspect-ratio: 3 / 4; }
  .tile:nth-child(1) { grid-column: 1 / 3; aspect-ratio: 4 / 3; }
  .tile:nth-child(n+6) { display: none; }
  .art-g, .err-g { grid-template-columns: 1fr; }
  .art-ph, .err-ph { max-width: 520px; }
  .rel-list, .rel-list:has(> :nth-child(3)) { grid-template-columns: 1fr; height: auto; }
  .rel-i { min-height: 260px; }
  .foot-in { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .bar-in { padding: 14px 16px 0; gap: 4px; }
  .scheme-lavender .bar { padding-bottom: 12px; }
  .mark { font-size: 19px; font-stretch: 110%; }
  .menu-btn { padding: 0 12px; }
  .menu-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .menu-panel { left: 16px; right: 16px; padding: 16px 18px; }
  .menu-hubs { grid-template-columns: 1fr; }
  .tile:nth-child(1) { aspect-ratio: 4 / 5; }
  .tile:nth-child(n+2) .tile-d { display: none; }
  .tile-txt { padding: 12px 14px; }
  .latest { padding: 0 16px 40px; }
  .latest > .band { margin: 0 -16px 16px; }
  .lat-list { grid-template-columns: minmax(0, 1fr); }
  .lat { padding-top: 16px; }
  .hubs { padding: 30px 16px 44px; row-gap: 34px; }
  .hubs-lead, .hubs-rest { grid-template-columns: minmax(0, 1fr); }
  .hub-lead + .hub-lead { margin-top: 32px; }
  .hubs-rest .hub, .hubs-rest .hub:nth-child(n) { padding: 0 0 30px; border-left: 0; }
  .hubs-rest .hub:last-child { padding-bottom: 0; }
  .foot { padding-left: 16px; padding-right: 16px; }
  .foot-nav ul { gap: 20px; }
  .art-head, .err { padding-left: 16px; padding-right: 16px; padding-top: 96px; }
  .list-head { padding-left: 16px; padding-right: 16px; min-height: 380px; }
  .list { padding-left: 16px; padding-right: 16px; }
  .gh-content { font-size: 18px; grid-template-columns: [full-start] 16px [wide-start] 0 [main-start] minmax(0, 1fr) [main-end] 0 [wide-end] 16px [full-end]; }
  .gh-content table { display: block; overflow-x: auto; font-size: 15.5px; }
  .art-end { max-width: none; margin-left: 16px; margin-right: 16px; }
  .rel h2 { margin-left: 16px; margin-right: 16px; }
  .lt-row { grid-template-columns: 110px 1fr; align-items: start; }
  .lt-row p:not(.lt-tag):not(.lt-meta) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tile img { transition: none; }
  .tile:hover img { transform: none; }
}

/* light-trail backgrounds (generated by src/build/ae_trails.py) */
.trails { background-repeat: no-repeat; background-size: cover; background-position: center; }
.trails-hero { background-image: url(../images/trails-hero-indigo.svg); }
.trails-band { background-image: url(../images/trails-band-indigo.svg); }
.trails-foot { background-image: url(../images/trails-foot-indigo.svg); }
.scheme-violet .trails-hero { background-image: url(../images/trails-hero-violet.svg); }
.scheme-violet .trails-band { background-image: url(../images/trails-band-violet.svg); }
.scheme-violet .trails-foot { background-image: url(../images/trails-foot-violet.svg); }
.scheme-lavender .trails-hero { background-image: url(../images/trails-hero-lavender.svg); }
.scheme-lavender .trails-band { background-image: url(../images/trails-band-lavender.svg); }
.scheme-lavender .trails-foot { background-image: url(../images/trails-foot-lavender.svg); }
@media (max-width: 860px) {
  .trails-hero { background-image: url(../images/trails-herom-indigo.svg); }
  .scheme-violet .trails-hero { background-image: url(../images/trails-herom-violet.svg); }
  .scheme-lavender .trails-hero { background-image: url(../images/trails-herom-lavender.svg); }
}

/* Published topic availability: labels stay visible without dead links. */
a[data-empty-topic] { cursor: default; text-decoration: none; }

/* A06: preserve the easing trail in narrow related cards. */
@media (max-width: 640px) {
  .rel-i:has(h3 a[href="/ease-in-after-effects/"]) .rel-ex { display: none; }
}

/* A07: keep the complete prism scene above the card title. */
@media (max-width: 640px) {
  .mosaic > .tile:has(> .tile-txt > h2.tile-t > a[href="/effects-tab-after-effects/"]) {
    aspect-ratio: auto;
  }
  .mosaic > .tile:has(> .tile-txt > h2.tile-t > a[href="/effects-tab-after-effects/"]) > img {
    position: relative;
    inset: auto;
    height: auto;
    flex: 0 0 auto;
    object-fit: contain;
    transform: none;
  }
  .mosaic > .tile:has(> .tile-txt > h2.tile-t > a[href="/effects-tab-after-effects/"]) > .tile-txt {
    margin-top: auto;
  }
}
.rel-list > .rel-i:has(> h3 > a[href="/effects-tab-after-effects/"]) > .rel-ph {
  bottom: 128px;
}
.rel-list > .rel-i:has(> h3 > a[href="/effects-tab-after-effects/"]) > .rel-ph > img {
  object-fit: contain;
}
.rel-list > .rel-i:has(> h3 > a[href="/effects-tab-after-effects/"]) > .rel-ex {
  display: none;
}

/* A05 candidate: keep the wiggle knot above narrow related-card text. */
@media (max-width: 640px) {
  .rel-i:has(h3 a[href="/wiggle-expression-after-effects/"]) .rel-ex { display: none; }
}

/* hide-empty: topics without a published guide are not rendered (06.11.2026).
   Mosaic: with one tile missing the fourth tile closes the second row (desktop) or the last row (2-col phones).
   Hub index: a lone last hub in the 2-col right block, or a single lead hub in the 2-col tablet row, spans the row. */
@media (min-width: 861px) { .mosaic > .tile:nth-child(4):last-child { grid-column: 2 / 5; } }
@media (max-width: 860px) { .mosaic > .tile:nth-child(4):last-child { grid-column: 1 / -1; aspect-ratio: 2 / 1; } }
.hubs-rest > .hub:nth-child(odd):last-child { grid-column: 1 / -1; }
.hubs-lead > .hub:only-child { grid-column: 1 / -1; }
