/* BitToByte homepage v24. Adapted from the approved ZIP; scoped to the home page.
   Existing common CSS and Wagtail structure remain authoritative. */
.page-home { --accent-art: #F97316; --home-purple: #9B5DE5; }
:root[data-theme="dark"] .page-home { --home-purple: #BF91FF; }
/* Only home loads this stylesheet. Always reserve the scrollbar and clip particle overflow. */
html { scrollbar-gutter: stable; overflow-x: clip; overflow-y: scroll; scroll-behavior: auto; }
body.page-home { overflow-x: clip; }
.page-home .hero { background:var(--bg) }
.page-home .paths { background:var(--surface);border-top:1px solid var(--border);border-bottom:1px solid var(--border) }
.page-home .paths__grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;padding-top:48px;padding-bottom:48px }
.page-home .path-card { display:flex;position:relative;align-items:center;min-width:0;min-height:225px;gap:2px;padding:24px 12px 24px 24px;color:var(--text);background:var(--surface2);border:1px solid var(--border);border-top:4px solid var(--accent);border-radius:10px;overflow:hidden;transition:transform .18s,box-shadow .18s }
.page-home .path-card:hover { transform:translateY(-3px);box-shadow:0 12px 24px -18px #0008 }
.page-home .path-card--courses, .page-home .path-card--tests { border-top-color:var(--home-purple) }
.page-home .path-card__copy { flex:1;min-width:0;z-index:1 }
.page-home .path-card__path { font:700 14px "JetBrains Mono",monospace;color:var(--accent);margin:0 0 10px }
.page-home .path-card--courses .path-card__path, .page-home .path-card--tests .path-card__path { color:var(--home-purple) }
.page-home .path-card h2 { font:700 clamp(17px,1.7vw,23px) "JetBrains Mono",monospace;margin:0 0 10px;line-height:1.24 }
.page-home .path-card p:not(.path-card__path) { font-size:14px;color:var(--muted);margin:0 0 12px;line-height:1.45 }
.page-home .path-card__more { font:700 12px "JetBrains Mono",monospace;color:var(--accent) }
.page-home .path-card--courses .path-card__more, .page-home .path-card--tests .path-card__more { color:var(--home-purple) }
.page-home .path-card img { width:38%;max-width:128px;min-width:89px;object-fit:contain;flex-shrink:0 }
.page-home .inside-band { background:var(--surface2);border-bottom:1px solid var(--border) }
.page-home .inside { padding-top:58px;padding-bottom:60px }
.page-home .term { font:700 clamp(21px,2.1vw,27px) "JetBrains Mono",monospace;margin:0 }
.page-home .term__cmd { color:var(--faint) }
.page-home .inside .term { margin-bottom:24px }
.page-home .inside__grid { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px }
.page-home .inside__item { padding:16px 4px 0;border-top:2px solid var(--text) }
.page-home .inside__item h3 { font:700 16px "JetBrains Mono",monospace;margin:0 0 5px }
.page-home .inside__item p { font-size:14px;color:var(--muted);margin:0;line-height:1.4 }
.page-home .section { padding:64px 0 88px }
.page-home .section--alt { background:var(--surface2);border-top:1px solid var(--border) }
.page-home .section__head { display:flex;flex-wrap:wrap;align-items:end;justify-content:space-between;gap:16px;margin-bottom:28px }
.page-home .section__link { font:600 15px "JetBrains Mono",monospace;padding:10px 0;color:var(--accent) }
.page-home .section__lead { margin:-20px 0 28px;color:var(--muted) }
.page-home .cards { display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr));gap:20px }
.page-home .card { position:relative;display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-card);overflow:hidden;color:var(--text);transition:transform .18s,box-shadow .18s;max-width:100% }
.page-home .card:hover { transform:translateY(-3px);box-shadow:0 14px 30px -18px #0007 }
.page-home .card__cover { position:relative;height:150px;background:var(--surface2);border-bottom:1px solid var(--border) }
.page-home .card__cover img { display:block;width:100%;height:100%;object-fit:cover }
.page-home .card__cover--empty { background:repeating-linear-gradient(135deg,var(--surface2) 0 15px,var(--bg) 15px 30px) }
.page-home .card__body { display:flex;flex-direction:column;flex:1;padding:18px 22px 22px }
.page-home .card__meta { display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;margin:0 0 8px }
.page-home .card__topic { font:13px "JetBrains Mono",monospace;color:var(--faint) }
.page-home .card__title { font:600 20px "IBM Plex Sans",sans-serif;margin:0 0 8px }
.page-home .card__desc { font-size:15px;line-height:1.5;color:var(--muted);margin:0 0 18px;flex:1 }
.page-home .card__size { font:13px "JetBrains Mono",monospace;color:var(--muted);margin:0 0 12px }
.page-home .card__foot { display:flex;align-items:center;justify-content:space-between;gap:8px;font:600 13px "JetBrains Mono",monospace }
.page-home .card__more { color:var(--accent) }
.page-home .card__price--free { color:#047857 }
html[data-theme=dark] body.page-home .card__price--free { color:#59E8B6 }
.page-home .card[data-kind=newest] { display:none }
.page-home .sect-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px }
.page-home .sect-card { display:flex;flex-direction:column;gap:10px;padding:24px;color:var(--text);text-decoration:none;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-card);min-height:155px;transition:transform .18s,box-shadow .18s }
.page-home .sect-card:hover { transform:translateY(-3px);box-shadow:0 14px 30px -18px #0007 }
.page-home .sect-card__title { font:800 20px "JetBrains Mono",monospace }
.page-home .sect-card__title span { color:var(--accent) }
.page-home .sect-card__text { flex:1;font-size:15px;line-height:1.45;color:var(--muted) }
@media (max-width:970px) {
.page-home .paths__grid { grid-template-columns:1fr 1fr }
.page-home .inside__grid { grid-template-columns:repeat(2,1fr) }
.page-home .sect-grid { grid-template-columns:repeat(2,1fr) }
}
@media (max-width:700px) {
.page-home .paths__grid { grid-template-columns:1fr }
.page-home .path-card { min-height:170px }
.page-home .inside__grid { grid-template-columns:1fr 1fr }
.page-home .sect-grid { grid-template-columns:1fr }
.page-home .section { padding:45px 0 58px }
}
@media (max-width:520px) {
.page-home .inside__grid { grid-template-columns:1fr }
}
.page-home .hero { position:relative;isolation:isolate;overflow:hidden;background:var(--bg) }
.page-home .hero__glow { position:absolute;inset:0;pointer-events:none;background:radial-gradient(650px 370px at 72% 53%,rgba(249,115,22,.065),transparent 75%) }
.page-home .hero__inner--grid { display:grid;grid-template-columns:minmax(0,42%) minmax(0,32%) minmax(0,26%);min-height:510px;position:relative;align-items:center;gap:0 }
.page-home .hero__text { grid-column:1;z-index:2;padding:42px 0 55px }
.page-home .hero__prompt { font:14px var(--font-mono);color:var(--faint);margin:0 0 20px }
.page-home .hero__prompt span { color:var(--accent) }
.page-home .hero__heading, .page-home .hero__slogan { font-family:var(--font-mono);font-size:clamp(22px,2.4vw,28px);
 line-height:1.3;letter-spacing:-.02em;font-weight:700; }
.page-home .hero__heading { margin:0 0 22px }
.page-home .hero__lead { margin:0 0 28px;max-width:520px;padding-left:24px;font-size:19px;line-height:1.55 }
.page-home .hero__lead p { margin:0 0 .45em }
.page-home .hero__actions { display:flex;gap:14px;flex-wrap:wrap }
.page-home .btn { font-family:var(--font-mono);border-radius:var(--r-btn);border:1px solid var(--accent);background:var(--accent);color:var(--on-accent);padding:14px 21px;display:inline-flex;align-items:center;justify-content:center;font-weight:700;text-align:center }
.page-home .btn-lg { min-height:56px }
.page-home .btn-secondary { background:transparent;color:var(--text);border-color:var(--text) }
.page-home .hero__art { position:absolute;z-index:1;left:24%;right:18%;bottom:-12%;height:119%;display:flex;align-items:flex-end;justify-content:center;pointer-events:none }
.page-home .hero__illustration { display:block;width:100%;height:auto;max-height:100%;object-fit:contain;object-position:center bottom }
.page-home .hero__slogan { grid-column:3;z-index:2;position:relative;margin:0 0 0 auto;display:flex;flex-direction:column;gap:0;align-self:center;border-left:4px solid var(--accent);padding-left:20px;white-space:nowrap;max-width:100%;animation:reveal-label .8s steps(15,end) both }
.page-home .hero__slogan span { display:block }
.page-home .hero__slogan span.dot { display:inline;color:var(--accent-art) }
@keyframes reveal-label {from{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0 0 0)}}
.page-home .hero__slogan.replay { animation:reveal-label .85s steps(15,end) both }
@media (prefers-reduced-motion:reduce) {
.page-home .hero__slogan, .page-home .hero__slogan.replay { animation:none }
}
.page-home .path-card--courses { border-top-color:var(--home-purple) }
.page-home .path-card--courses .path-card__path, .page-home .path-card--courses .path-card__more { color:var(--home-purple) }
.page-home .path-card--tests { border-top-color:var(--home-purple) }
.page-home .path-card--tests .path-card__path, .page-home .path-card--tests .path-card__more { color:var(--home-purple) }
.page-home .card__cover { height:150px }
.page-home .card__body { padding:18px 22px 22px;display:flex;flex-direction:column;flex:1 }
.page-home .card__meta { display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;margin:0 0 8px }
.page-home .card__topic { font:13px var(--font-mono);color:var(--faint) }
.page-home .card__title { font:600 20px/1.3 var(--font-sans);margin:0 0 8px }
.page-home .card__desc { font-size:15px;color:var(--muted);flex:1;margin:0 0 18px }
.page-home .inside-band { background:var(--surface2);border-block:1px solid var(--border) }
@media (max-width:1050px) {
.page-home .hero__inner--grid { grid-template-columns:44% 29% 27% }
.page-home .hero__slogan { padding-left:12px }
.page-home .hero__art { left:27%;right:20%;height:104%;bottom:-8% }
}
@media (max-width:800px) {
.page-home .hero__inner--grid { grid-template-columns:1fr 1fr;min-height:0 }
.page-home .hero__text { grid-column:1/-1;padding:43px 0 14px }
.page-home .hero__art { position:relative;grid-column:1;grid-row:2;left:auto;right:auto;bottom:auto;height:auto;margin:0 -25% -13px 0;align-self:end }
.page-home .hero__illustration { max-height:none }
.page-home .hero__slogan { grid-column:2;grid-row:2;font-size:clamp(22px,3vw,28px) }
}
@media (max-width:560px) {
.page-home .hero__inner--grid { grid-template-columns:1fr 1fr }
.page-home .hero__text { padding:30px 0 0 }
.page-home .hero__heading, .page-home .hero__slogan { font-size:clamp(20px,5vw,25px) }
.page-home .hero__lead { font-size:16px;padding-left:12px }
.page-home .hero__actions .btn { padding:11px 13px;min-height:44px;font-size:13px }
.page-home .hero__art { margin:0 -36% -12px -12% }
.page-home .hero__slogan { padding-left:9px;border-left-width:3px }
}
@media (min-width: 1051px) {
.page-home .hero__inner--grid { grid-template-columns: 44% 31% 25%;
    min-height: 445px;
    align-items: center; }
.page-home .hero__text { grid-column: 1; padding: 38px 0 42px; }
.page-home .hero__prompt { margin-bottom: 21px; }
.page-home .hero__heading, .page-home .hero__slogan { font-size: clamp(30px, 2.85vw, 36px);
    line-height: 1.19;
    letter-spacing: -.035em;
    font-weight: 700; }
.page-home .hero__heading { max-width: 475px; margin-bottom: 24px; }
.page-home .hero__lead { max-width: 450px; padding-left: 22px; font-size: 17px; line-height: 1.43; margin-bottom: 23px; }
.page-home .hero__lead p { margin-bottom: .37em; }
.page-home .hero__actions { gap: 13px; }
.page-home .hero__art { position: absolute; left: 19%; right: 6%; height: auto; bottom: -7px; width: 75%; display: block; }
.page-home .hero__illustration { width: 100%; height: auto; max-height: none; display: block; }
.page-home .hero__slogan { grid-column: 3; justify-self: end; align-self: center; padding-left: 17px; margin: 0; border-left-width: 4px; }
}
@media (min-width: 801px) and (max-width: 1050px) {
.page-home .hero__inner--grid { min-height: 420px; grid-template-columns: 43% 31% 26%; }
.page-home .hero__heading, .page-home .hero__slogan { font-size: clamp(25px,3vw,30px); line-height:1.22; }
.page-home .hero__text { padding:36px 0; }
.page-home .hero__lead { font-size:16px;padding-left:16px }
.page-home .hero__art { left:20%; right:auto; bottom:-6px; width:77%; height:auto; display:block; }
.page-home .hero__illustration { max-height:none;height:auto }
.page-home .hero__slogan { justify-self:end; margin:0; padding-left:12px; }
}
@media (max-width:800px) {
.page-home .hero__heading, .page-home .hero__slogan { font-size:clamp(24px,4vw,30px);line-height:1.22 }
.page-home .hero__art { z-index:1 }
.page-home .hero__slogan { z-index:2 }
}
@media (max-width:560px) {
.page-home .hero__heading, .page-home .hero__slogan { font-size:clamp(20px,5vw,25px) }
}
@media (min-width:1051px) {
.page-home .hero__art { bottom:-29px; }
}
@media (min-width:801px) and (max-width:1050px) {
.page-home .hero__art { bottom:-25px; }
}
@media (max-width:800px) {
.page-home .hero__art { margin-bottom:-28px; }
}
@media (max-width:560px) {
.page-home .hero__art { margin-bottom:-25px; }
}
@media (min-width:701px) and (max-width:970px) {
.page-home .paths__grid--three > .path-card:last-child { grid-column:1/-1; }
.page-home .paths__grid--three > .path-card:last-child img { max-width:170px;width:24%; }
}
.page-home .inside-band--cohesive { background:var(--surface2);border-block:1px solid var(--border) }
.page-home .inside-band--cohesive .inside { padding-top:54px;padding-bottom:64px }
.page-home .inside-band--cohesive .inside__item { border-top:2px solid var(--text);background:transparent }
.page-home #materials-list .sect-grid, .page-home #tests-list .sect-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px }
.page-home #materials-list .sect-card--illustrated, .page-home #tests-list .sect-card--illustrated { display:grid;grid-template-columns:103px minmax(0,1fr);grid-template-rows:auto 1fr auto;
  align-items:center;column-gap:17px;row-gap:8px;
  min-height:212px;padding:22px 19px 21px;
  border:1px solid var(--border);border-left:4px solid var(--accent);
  border-radius:var(--r-card,12px);position:relative;overflow:hidden;
  background:var(--surface);color:var(--text);box-shadow:0 9px 28px -22px rgba(25,30,48,.35);
  text-decoration:none;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease; }
.page-home #materials-list .sect-card--illustrated:hover, .page-home #tests-list .sect-card--illustrated:hover, .page-home #materials-list .sect-card--illustrated:focus-visible, .page-home #tests-list .sect-card--illustrated:focus-visible { transform:translateY(-3px);box-shadow:0 14px 34px -21px rgba(25,30,48,.55);border-color:var(--accent); }
.page-home .sect-card--illustrated .sect-card__figure { grid-row:1/4;grid-column:1;display:flex;align-items:center;justify-content:center;
 width:102px;height:114px;border-radius:18px;
 background:radial-gradient(ellipse at 50% 85%,rgba(249,115,22,.11),transparent 71%); }
.page-home .sect-card--illustrated .sect-card__figure img { display:block;width:96px;height:102px;object-fit:contain }
.page-home .sect-card--illustrated .sect-card__title { display:block;grid-column:2;grid-row:1;font:700 clamp(15px,1.55vw,20px)/1.33 var(--font-mono,monospace);
 overflow-wrap:anywhere;letter-spacing:-.025em; }
.page-home .sect-card--illustrated .sect-card__title span { color:var(--accent) }
.page-home .sect-card--illustrated .sect-card__text { display:block;grid-column:2;grid-row:2;color:var(--muted);font:400 14px/1.5 var(--font-sans,sans-serif) }
.page-home .sect-card--illustrated .badges { grid-column:2;grid-row:3;display:flex;flex-wrap:wrap;gap:6px;align-self:end }
.page-home .sect-card--illustrated .badge { display:inline-flex;align-items:center;border:1px solid var(--border);border-radius:5px;
 padding:4px 8px;background:var(--surface2);color:var(--text);
 font:500 11px/1.1 var(--font-mono,monospace) }
.page-home #tests-list .sect-card--illustrated { border-left-color:var(--home-purple,#A78BFA) }
.page-home #tests-list .sect-card--illustrated .sect-card__title span { color:var(--home-purple,#A78BFA) }
.page-home #tests-list .sect-card--illustrated .badge { border-color:var(--border) }
.page-home .section__lead--tests { margin-top:-12px }
@media (max-width:1080px) {
.page-home #materials-list .sect-grid, .page-home #tests-list .sect-grid { grid-template-columns:repeat(2,minmax(0,1fr)) }
.page-home #materials-list .sect-card--illustrated:last-child:nth-child(odd), .page-home #tests-list .sect-card--illustrated:last-child:nth-child(odd) { grid-column:1/-1 }
}
@media (max-width:720px) {
.page-home #materials-list .sect-grid, .page-home #tests-list .sect-grid { grid-template-columns:1fr }
.page-home #materials-list .sect-card--illustrated:last-child:nth-child(odd), .page-home #tests-list .sect-card--illustrated:last-child:nth-child(odd) { grid-column:auto }
}
@media (max-width:440px) {
.page-home #materials-list .sect-card--illustrated, .page-home #tests-list .sect-card--illustrated { grid-template-columns:80px minmax(0,1fr);column-gap:12px;padding:16px 12px;min-height:160px }
.page-home .sect-card--illustrated .sect-card__figure { width:78px;height:92px }
.page-home .sect-card--illustrated .sect-card__figure img { width:78px;height:83px }
.page-home .sect-card--illustrated .sect-card__title { font-size:15px }
.page-home .sect-card--illustrated .sect-card__text { font-size:12px }
}
.page-home .hero__illustration { transform:translateX(-28px); }
@media (min-width:801px) and (max-width:1050px) {
.page-home .hero__illustration { transform:translateX(-18px) }
}
@media (max-width:800px) {
.page-home .hero__illustration { transform:none }
}
.page-home .hero__pixel-guide { contain:layout style; }
.page-home .hero__slogan span[data-hero-v] { display:inline }
.page-home .hero__pixel-guide { position:absolute;z-index:3;pointer-events:none;overflow:visible;width:0;height:0 }
.page-home .hero__pixel-guide:not([data-positioned]) { visibility:hidden }
.page-home .hero__pixel-guide svg { display:block;width:100%;height:auto;overflow:visible }
.page-home .hero__pixel-guide .hero__ghost { fill:var(--mark-off) }
.page-home .hero__ghost-cell { opacity:0 }
.hero-pending .page-home .hero__ghost-cell { opacity:1;animation:btb-out-late .8s ease 6s both }
.hero-pending .page-home .hero.is-go .hero__ghost-cell { animation:btb-out .8s ease 2.9s both }
.page-home .hero__slogan { animation:none }
.hero-pending .page-home .hero__slogan { clip-path:inset(0 100% 0 0);animation:btb-reveal-late 1.1s steps(18,end) 6s both }
.hero-pending .page-home .hero.is-go .hero__slogan { animation:btb-reveal 1.1s steps(18,end) 3.15s both }
.page-home .hero-layer { position:absolute;top:0;bottom:0;left:0;right:0;max-width:var(--container);margin:0 auto;pointer-events:none;z-index:20 }
.page-home .hero-part { position:absolute;border-radius:5px;opacity:0;background:var(--pixel-orange,var(--accent));animation:btb-gather 3.1s cubic-bezier(.55,0,.3,1) both }
.page-home .logo-pop { animation:btb-pop .45s ease-out .2s both }
@keyframes btb-gather {
 0%{opacity:0;transform:translate(var(--sx),var(--sy)) scale(.3)}
 8%{opacity:1}
 40%{opacity:1;transform:translate(0,0) scale(1)}
 72%{opacity:1;transform:translate(0,0) scale(1)}
 100%{opacity:0;transform:translate(var(--ex),var(--ey)) scale(.22)}
}
@keyframes btb-pop {0%{transform:scale(1)}40%{transform:scale(.82)}100%{transform:scale(1)}}
@keyframes btb-reveal {from{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0 0 0)}}
@keyframes btb-reveal-late {from{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0 0 0)}}
@keyframes btb-out {to{opacity:0}}
@keyframes btb-out-late {to{opacity:0}}
@media (prefers-reduced-motion:reduce) {
.page-home .hero__slogan, .hero-pending .page-home .hero__slogan, .hero-pending .page-home .hero.is-go .hero__slogan { animation:none;clip-path:none }
.page-home .hero__ghost-cell, .hero-pending .page-home .hero__ghost-cell { opacity:0;animation:none }
.page-home .hero-part { animation:none;display:none }
.page-home .logo-pop { animation:none }
}
.page-home .hero__slogan { border-left-width:5px }
.page-home .hero__actions .btn--materials { background:var(--surface);
  color:var(--accent);
  border-color:var(--accent);
  box-shadow:inset 0 0 0 1px var(--accent);
  transition:background-color .18s ease,border-color .18s ease,color .18s ease; }
.page-home .hero__actions .btn--materials:hover { background:var(--accent-soft);
  color:var(--accent);
  border-color:var(--accent); }
.page-home .hero__actions .btn--materials:focus-visible { outline:2px solid var(--accent);outline-offset:3px }
.page-home .hero__actions .btn--icon { display:inline-flex;
  align-items:center;
  gap:9px;
  white-space:nowrap; }
.page-home .hero__actions .btn--icon .btn__icon { width:24px;
  height:24px;
  flex:none;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:1.85;
  stroke-linecap:round;
  stroke-linejoin:round; }
@media (max-width:520px) {
.page-home .hero__slogan { border-left-width:4px }
.page-home .hero__actions .btn--icon { gap:7px }
.page-home .hero__actions .btn--icon .btn__icon { width:19px;height:19px }
}
@media (max-width:560px) {
.page-home .hero__slogan { border-left:0; padding-left:0; }
.page-home .hero__actions { display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
    width:min(100%,312px);
    margin-inline:auto; }
.page-home .hero__actions .btn--icon { width:100%;
    min-width:0;
    justify-content:center; }
body.page-home .hero__desktop-only { display:none; }
}

/* Fewer-than-three cards: do not reserve empty desktop columns. */
.page-home .cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
@media (min-width: 1081px) {
  .page-home #materials-list .sect-grid:has(> :only-child),
  .page-home #tests-list .sect-grid:has(> :only-child) { grid-template-columns: minmax(0, min(100%, 460px)); }
  .page-home #materials-list .sect-grid:has(> :nth-child(2):last-child),
  .page-home #tests-list .sect-grid:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* A real course card always gets its image and URL from the existing Wagtail include. */
.page-home .card__cover { flex: 0 0 150px; }
.page-home .card__cover img { object-fit: cover; }

/* v24 UI follow-up: compact catalogue test cards. Keeps the shared materials layout intact. */
.page-home #tests-list .test-card--v24 {
  display:flex;flex-direction:column;
  gap:0;align-items:stretch;min-width:0;min-height:250px;
  padding:16px 20px 14px;border-left:4px solid var(--home-purple);
}
.page-home #tests-list .test-card__eyebrow {
  display:block;min-width:0;color:var(--home-purple);
  font:600 12px/1.4 var(--font-mono,monospace);
  letter-spacing:.012em;text-transform:uppercase;
  overflow-wrap:anywhere;margin-bottom:9px;
}
.page-home #tests-list .test-card__main {
  display:grid;grid-template-columns:minmax(0,1fr) minmax(72px,94px);
  align-items:center;column-gap:8px;min-width:0;min-height:0;
  margin-bottom:7px;flex-shrink:0;
}
.page-home #tests-list .test-card__title {
  display:-webkit-box;min-width:0;margin:0;overflow:hidden;
  -webkit-box-orient:vertical;-webkit-line-clamp:3;
  font:700 clamp(18px,1.55vw,20px)/1.28 var(--font-sans,sans-serif);
  letter-spacing:-.025em;overflow-wrap:break-word;
}
.page-home #tests-list .test-card__figure {
  display:flex;align-items:center;justify-content:center;
  width:100%;min-width:0;aspect-ratio:343/279;
  background:radial-gradient(ellipse at 50% 83%,rgba(249,115,22,.08),transparent 70%);
  border-radius:14px;
}
.page-home #tests-list .test-card__figure img {
  display:block;width:100%;height:auto;max-height:94px;object-fit:contain;
}
.page-home #tests-list .test-card__description {
  display:-webkit-box;min-width:0;overflow:hidden;flex:0 0 auto;
  -webkit-box-orient:vertical;-webkit-line-clamp:3;
  font:400 14px/1.45 var(--font-sans,sans-serif);color:var(--muted);
  margin-bottom:10px;
}
.page-home #tests-list .test-card__foot {
  display:flex;align-items:center;justify-content:space-between;
  gap:10px;margin-top:auto;padding-top:10px;border-top:1px solid var(--border);
  font:500 13px/1.35 var(--font-sans,sans-serif);
}
.page-home #tests-list .test-card__count {display:inline-flex;align-items:center;gap:7px;min-width:0;color:var(--muted)}
.page-home #tests-list .test-card__count svg {width:19px;height:19px;flex:none;color:var(--home-purple)}
.page-home #tests-list .test-card__cta {
  display:inline-flex;align-items:center;gap:8px;margin-left:auto;
  color:var(--home-purple);font:700 14px/1.3 var(--font-sans,sans-serif);
  white-space:nowrap;
}
.page-home #tests-list .test-card--v24:hover .test-card__cta,
.page-home #tests-list .test-card--v24:focus-visible .test-card__cta {text-decoration:underline;text-underline-offset:3px}
@media (max-width:720px) {
  .page-home #tests-list .test-card__main {grid-template-columns:minmax(0,1fr) 110px}
}
@media (max-width:440px) {
  .page-home #tests-list .test-card--v24 {padding:15px 16px}
  .page-home #tests-list .test-card__main {grid-template-columns:minmax(0,1fr) 82px;column-gap:7px}
  .page-home #tests-list .test-card__title {font-size:18px}
  .page-home #tests-list .test-card__description {font-size:13px}
}

/* Hero: align copy to the upper edge, not to the center of the 420–445px grid.
   Reserve the grid height for the original illustration; no re-scaling/cropping. */
/* 07.11.2026: precise hero offsets approved after local visual check.
   Keep the decorative artwork and its dimensions untouched. */
@media (min-width: 801px) {
  .page-home .hero__inner--grid { align-items: start; padding-top: 30px; }
  .page-home .hero__text { align-self: start; margin-top: 8px; padding: 0 0 20px; }
  .page-home .hero__prompt { margin-bottom: 14px; }
  .page-home .hero__slogan { align-self: center; top: 80px; }
}

/* Mobile-only v24: compact hero and test cards; desktop and content stay unchanged. */
@media (max-width: 560px) {
  body.page-home .hero__inner--grid { padding-top: 8px; padding-bottom: 18px; row-gap: 14px; }
  body.page-home .hero__text { padding: 6px 0 0; }
  body.page-home .hero__prompt { margin-bottom: 10px; }
  body.page-home .hero__heading { margin-bottom: 12px; }
  body.page-home .hero__lead { margin-bottom: 8px; }
  body.page-home .hero__actions { display: none; }

  body.page-home #tests-list .test-card__description { display: none; }
  body.page-home #tests-list .test-card--v24 { min-height: 0; }
  body.page-home #tests-list .test-card__main { margin-bottom: 10px; }
}

/* Tablet hero 561–800px: mobile-equivalent vertical spacing, without hiding navigation actions. */
@media (min-width: 561px) and (max-width: 800px) {
  body.page-home .hero__inner--grid { padding-top: 8px; padding-bottom: 18px; row-gap: 14px; }
  body.page-home .hero__text { padding: 6px 0 0; }
  body.page-home .hero__prompt { margin-bottom: 10px; }
  body.page-home .hero__heading { margin-bottom: 12px; }
  body.page-home .hero__lead { margin-bottom: 8px; }
}
