/* Home (Plan 14, the approved "warm" mockup): hero (the headline over the old site's mountains), where to start, the newest cases and
   articles, every course, library + practice, join. The page is a size container so its rules follow its own width. */
.home{container-type:inline-size;container-name:home;display:flex;flex-direction:column;gap:clamp(48px,7cqi,88px)}
.home-kicker{font-size:13.5px;font-weight:600;color:var(--muted)}
.home-more{color:var(--accent-text);font-weight:600;font-size:15px;text-decoration:none;white-space:nowrap;min-height:44px;min-width:44px;display:inline-flex;align-items:center;justify-content:flex-end}
.home-more:hover{text-decoration:underline;text-underline-offset:3px}
.home-section{display:flex;flex-direction:column;gap:clamp(18px,2.6cqi,28px);min-width:0}
.home-section__head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:4px 16px}
.home-section__head>:first-child{min-width:0}  /* a long title pushes the link onto its own line instead of under it */
.home-section__head h2{font-size:clamp(24px,3cqi,32px);font-weight:600;letter-spacing:-.015em;line-height:1.15}
.home-section__head p{color:var(--text-2);margin-top:6px}

/* Hero (owner 2026-10-24): only the headline, on the left in the old site's grey-blue sky; its mountains, redrawn as six
   vector layers in its colours, span the whole window beneath. Everything is sized from the window width, so the left
   hills always start just below the headline and the tall right peak rises beside it; the flat dark base is trimmed. */
.home-hero{--m:100vw;--h:min(calc(var(--m) * .46),640px);
  --sky:#B4C1C6;--ridge1:#95ADAF;--ridge2:#7B9C9F;--ridge3:#6A8F95;--ridge4:#61878C;--ridge5:#597E84;--ridge6:#42686D;
  --hero-ink:#42686D;--hero-em:#FFFFFF;  /* owner 2026-10-24: the first words in the mountains' darkest colour, the rest white */
  --drop:calc(var(--h) * .05);  /* owner 2026-11-04: the headline 5% of the hero lower, the hero itself as tall */
  position:relative;isolation:isolate;padding:calc(clamp(16px,4cqi,48px) + var(--drop)) 0 calc(var(--h) - var(--m) * .125 + 24px - var(--drop))}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .home-hero{--sky:#12213D;--hero-ink:#F4F4F5;--hero-em:#6FCCD6}}
:root[data-theme="dark"] .home-hero{--sky:#12213D;--hero-ink:#F4F4F5;--hero-em:#6FCCD6}  /* night: a deep blue sky, the same hills */
.home-hero::before{content:"";position:absolute;z-index:-2;left:50%;top:-200px;bottom:0;width:100vw;transform:translateX(-50%);background:var(--sky)}  /* up behind the header's glass */
.home-hero__ground{position:absolute;z-index:-1;left:50%;bottom:0;width:100vw;height:var(--h);transform:translateX(-50%);overflow:hidden;pointer-events:none}
.home-hero__land{position:absolute;top:0;left:50%;width:var(--m);max-width:none;height:auto;transform:translateX(-50%)}  /* wider than the screen on phones: not capped like other pictures */
.home-hero__ridge1{fill:var(--ridge1)}.home-hero__ridge2{fill:var(--ridge2)}.home-hero__ridge3{fill:var(--ridge3)}.home-hero__ridge4{fill:var(--ridge4)}.home-hero__ridge5{fill:var(--ridge5)}.home-hero__ridge6{fill:var(--ridge6)}
@media (max-width:760px){  /* phones: wider than the screen, the tall peak kept; it sits under the headline's end, so a little more room */
  .home-hero{--m:max(100vw,560px);padding-bottom:calc(var(--h) - var(--m) * .125 + 52px - var(--drop))}
  .home-hero__land{left:calc((100% - var(--m)) * .7);transform:none}}
body{overflow-x:clip}  /* the mountains reach the window's edges; a scroll bar's width must not scroll the page sideways */
.home-hero h1{font-size:clamp(30px,4cqi,46px);font-weight:600;line-height:1.06;letter-spacing:-.025em;max-width:19ch;text-wrap:balance;color:var(--hero-ink)}
.home-hero h1 em{display:block;font-style:normal;color:var(--hero-em)}  /* the second line (owner 2026-10-25) */
/* The headline comes in once per visit (hero-once.js marks later views) */
@keyframes hero-rise{from{transform:translateY(12px)}}
@keyframes hero-fade{from{opacity:0}}
/* Owner 2026-10-25: once per visit the mountains surface far to near, the way the eye settles on a landscape: each
   nearer, darker ridge rises a little further and a little later, out of the sky; the headline comes when the land is
   still, and then nothing moves (about 2.5 s in all). Distances are in the drawing's own units. */
@keyframes ridge-rise{from{opacity:0;transform:translateY(var(--rise))}}
html:not(.seen-hero) .home-hero__land path{animation:ridge-rise 2s var(--ease-out) backwards}
html:not(.seen-hero) .home-hero__ridge1{--rise:10px}
html:not(.seen-hero) .home-hero__ridge2{--rise:18px;animation-delay:.1s}
html:not(.seen-hero) .home-hero__ridge3{--rise:26px;animation-delay:.2s}
html:not(.seen-hero) .home-hero__ridge4{--rise:34px;animation-delay:.3s}
html:not(.seen-hero) .home-hero__ridge5{--rise:44px;animation-delay:.4s}
html:not(.seen-hero) .home-hero__ridge6{--rise:56px;animation-delay:.5s}
html:not(.seen-hero) .home-hero h1{animation:hero-rise .8s var(--ease-out) .15s backwards}
@media (prefers-reduced-motion:reduce){
  html:not(.seen-hero) .home-hero__land path{animation:hero-fade .8s ease backwards;animation-delay:0s}
  html:not(.seen-hero) .home-hero h1{animation:none}
}

/* Where to start: three bordered cards; a swipe row on phones */
.start-cards{display:grid;gap:16px;grid-template-columns:repeat(3,minmax(0,1fr))}
@container (max-width:860px){.start-cards{grid-template-columns:minmax(0,1fr)}}
.start-card{border-radius:var(--radius-lg);padding:clamp(20px,2.4cqi,28px);display:grid;gap:12px;align-content:start;background:#EAF0F1;border:0}  /* a very light mist (owner 2026-11-05: version A on version C's background) */
.start-card h3{font-size:24px;font-weight:600;letter-spacing:-.015em;line-height:1.2;color:var(--mist-ink)}  /* the section-heading style */
.start-card p{color:var(--text-2);font-size:15px}
.start-card ul{list-style:none;margin:4px 0 0;padding:0;display:grid}
.start-card li a{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;border-top:1px solid color-mix(in srgb,var(--mist-ink) 18%,transparent);font-size:16px;font-weight:600;color:var(--mist-ink);text-decoration:none}  /* rows with an arrow, in the mountain ink */
.start-card__arrow{width:18px;height:18px;flex:none;transition:transform .18s var(--ease-out)}
@media (hover:hover) and (pointer:fine){.start-card li a:hover .start-card__arrow{transform:translateX(3px)}}
.start-card li a:hover{text-decoration:underline;text-underline-offset:3px}

/* Newest cases and articles: bordered cards; three thumbnail rows on phones */
.home-cards{display:grid;gap:clamp(16px,2cqi,24px);grid-template-columns:repeat(3,minmax(0,1fr))}
@container (max-width:860px){.home-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
.home-card{display:grid;gap:10px;align-content:start;grid-template-rows:auto auto 1fr;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);overflow:hidden;text-decoration:none;color:var(--text);transition:border-color .2s ease,box-shadow .2s ease}
.home-card:hover{border-color:color-mix(in srgb,var(--accent) 45%,var(--border));box-shadow:0 10px 28px rgba(40,24,30,.08)}
.home-card img,.home-card__ph{width:100%;height:auto;aspect-ratio:16/10;object-fit:cover;border-bottom:1px solid var(--border)}
.home-card__ph{display:block;background:var(--surface-2)}
.home-card>:not(img):not(.home-card__ph){margin-inline:18px}
.home-card h3{font-size:18.5px;font-weight:600;line-height:1.35;margin-top:6px;overflow-wrap:anywhere}
.home-card__meta{font-size:13.5px;color:var(--muted)}
.home-card>.card-foot{align-self:end;margin-bottom:18px}  /* at the card's bottom, whatever the title's length */
.home-card:hover h3{color:var(--accent-text)}
@container (max-width:560px){
  .home-cards{grid-template-columns:minmax(0,1fr);gap:0}
  .home-card{grid-template-columns:84px minmax(0,1fr);grid-template-rows:auto auto;align-content:center;column-gap:14px;row-gap:4px;padding:12px 0;background:none;border:0;border-top:1px solid var(--border);border-radius:0;overflow:visible}
  .home-card:first-child{border-top:0;padding-top:0}
  .home-card:hover{box-shadow:none}
  .home-card img,.home-card__ph{grid-row:1/3;width:84px;height:84px;aspect-ratio:1;border-radius:var(--radius-sm);border:1px solid var(--border)}
  .home-card>:not(img):not(.home-card__ph){margin:0}
  .home-card h3{font-size:15.5px;align-self:end;margin:0}
  .home-card__meta{font-size:13px}
  .home-card>.card-foot{align-self:start;margin:0;gap:6px}
}

/* Courses: how a course works on the left (a three-step path that ends at the certificate), the courses on the right:
   the newest in a large card, the older ones beneath it in small tiles (owner 2026-10-26). */
.home-courses{background:var(--mist);color:var(--text);box-shadow:inset 0 0 0 1px var(--tile-edge);border-radius:var(--radius-lg);padding:clamp(20px,3cqi,36px);display:grid;grid-template-columns:minmax(0,1fr);gap:clamp(20px,3cqi,36px);align-items:start}
@container (min-width:900px){
  .home-courses{grid-template-columns:minmax(0,5fr) minmax(0,7fr)}
}
.home-courses h2{color:var(--mist-ink);font-size:clamp(24px,3cqi,32px);font-weight:600;letter-spacing:-.015em;line-height:1.15;text-wrap:balance}
.home-courses .home-kicker{color:var(--mist-ink)}
.home-courses__intro{display:grid;gap:12px;align-content:start;justify-items:start;min-width:0}
.home-courses .home-more{color:var(--text);text-decoration:underline;text-underline-offset:3px;justify-content:flex-start}  /* small teal text on the mist card would fall under 4.5:1 */
.home-path{list-style:none;margin:12px 0 4px;padding:0;display:grid}
.home-path li{position:relative;display:grid;grid-template-columns:40px minmax(0,1fr);gap:16px;align-items:center;padding-bottom:24px;font-size:16px;font-weight:500}
.home-path li:last-child{padding-bottom:0}
.home-path li:not(:last-child)::after{content:"";position:absolute;left:19px;top:44px;bottom:4px;width:2px;background:color-mix(in srgb,var(--mist-ink) 25%,transparent)}
.home-path b{width:40px;height:40px;border-radius:var(--radius-pill);display:grid;place-items:center;background:var(--step);color:var(--mist-ink);font-weight:700}
.home-path li:last-child b{background:var(--accent);color:var(--on-accent)}  /* the path leads to the certificate */
.course-cards{display:grid;gap:16px;grid-template-columns:minmax(0,1fr);min-width:0}
.course-card{display:grid;grid-template-columns:minmax(0,1fr);border-radius:var(--radius-lg);overflow:hidden;background:var(--surface);border:1px solid var(--border);text-decoration:none;color:var(--text);transition:border-color .2s ease,box-shadow .2s ease}
.course-card:hover{border-color:color-mix(in srgb,var(--accent) 45%,var(--border));box-shadow:0 10px 28px rgba(40,24,30,.08)}
.course-card img,.course-card__ph{display:block;width:100%;height:auto;aspect-ratio:5/2;object-fit:cover}  /* a compact cover (owner 2026-11-05) */
.course-card__ph{display:grid;place-items:center;background:color-mix(in srgb,var(--mist) 70%,var(--surface));color:var(--mist-ink)}.course-card__ph svg{width:44px;height:44px}
.course-card__body{display:grid;gap:8px;align-content:start;padding:clamp(16px,2.4cqi,24px)}
.course-card__chips{display:flex;flex-wrap:wrap;gap:6px}
.course-card__chips span{font-size:12.5px;font-weight:600;padding:4px 10px;border-radius:var(--radius-pill);background:var(--surface-2);color:var(--text-2)}
.course-card__body b{font-size:clamp(19px,2cqi,23px);font-weight:700;line-height:1.3;overflow-wrap:anywhere;text-wrap:balance}
.course-card__lead{color:var(--text-2);font-size:15px;line-height:1.55;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.course-card__foot{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;margin-top:6px}
.course-card--lead .course-card__foot{justify-content:space-between}  /* "Completed" on the left, the button at the right edge (owner 2026-11-04) */
.course-card__done{font-size:13.5px;font-weight:700;color:var(--ok-text);background:var(--ok-soft);padding:5px 12px;border-radius:var(--radius-pill)}
/* the older courses: a thumbnail beside the title, two to a row where there is room */
.course-cards__more{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr))}
.course-card--small{grid-template-columns:120px minmax(0,1fr);border-radius:var(--radius-md)}
.course-card--small img,.course-card--small .course-card__ph{aspect-ratio:auto;height:100%;min-height:88px}
.course-card--small .course-card__ph svg{width:28px;height:28px}
.course-card--small .course-card__body{gap:6px;padding:12px 14px;align-content:center}
.course-card--small .course-card__body b{font-size:16px;line-height:1.35}  /* the whole name: the tile has the row to itself */
.course-card__meta{font-size:13px;color:var(--text-2);display:flex;flex-wrap:wrap;align-items:center;gap:4px}
.course-card--small .course-card__done{font-size:12px;padding:2px 8px}
.course-card__go{color:var(--accent-text);font-weight:600}
@container (max-width:560px){
  .course-card__foot .btn{width:100%}
}

/* Library and Starry sky (owner 2026-11-05, version A): two cards of one height, opening with their names */
.home-split{display:grid;gap:clamp(16px,2cqi,20px);grid-template-columns:minmax(0,1fr);align-items:stretch}
@container (min-width:900px){.home-split{grid-template-columns:minmax(0,7fr) minmax(0,5fr)}}
.home-split>:only-child{grid-column:1 / -1}
.home-split h2{font-size:26px;font-weight:600;letter-spacing:-.015em;line-height:1.2}
/* the library: the light mist of Where to start, the covers on it, the link as a row with an arrow */
.lib-card{border-radius:var(--radius-lg);background:#EAF0F1;padding:clamp(20px,2.4cqi,28px);display:flex;flex-direction:column;gap:12px;min-width:0}
.lib-card h2{color:var(--mist-ink)}
.lib-card p{color:var(--text-2);font-size:15px;line-height:1.55}
.shelf{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;align-items:end;margin-top:6px}
.shelf__book{display:block;min-width:0;text-decoration:none}
.shelf__book img,.shelf__placeholder{width:100%;height:auto;aspect-ratio:2/3;object-fit:cover;border-radius:var(--radius-xs);box-shadow:0 2px 4px rgba(0,0,0,.14),0 10px 20px rgba(0,0,0,.10)}
.shelf__placeholder{display:flex;align-items:center;justify-content:center;background:var(--surface);padding:8px;text-align:center;font-size:12px;line-height:1.25;font-weight:600;color:var(--text-2);overflow:hidden}
@container (max-width:600px){.shelf{grid-template-columns:repeat(3,minmax(0,1fr))}.shelf__book:nth-child(n+4){display:none}}
.lib-card__more{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;margin-top:auto;border-top:1px solid color-mix(in srgb,var(--mist-ink) 18%,transparent);font-size:16px;font-weight:600;color:var(--mist-ink);text-decoration:none}
.lib-card__more .arrow{width:18px;height:18px;flex:none;transition:transform .18s var(--ease-out)}
@media (hover:hover) and (pointer:fine){.lib-card__more:hover .arrow{transform:translateX(3px)}}

/* Join */
.home-join{border-radius:var(--radius-lg);background:var(--accent-soft);padding:clamp(24px,4cqi,48px);display:grid;gap:24px;grid-template-columns:minmax(0,1fr);align-items:center}
@container (min-width:860px){.home-join{grid-template-columns:minmax(0,7fr) minmax(0,5fr)}}
.home-join h2{font-size:clamp(24px,3cqi,32px);font-weight:600;line-height:1.2}
.home-join p{margin-top:12px;color:var(--text-2);max-width:52ch}
.home-join__acts{display:grid;gap:10px;justify-items:start}
@container (min-width:860px){.home-join__acts{justify-items:end}}

/* Phones: the compact home (owner 2026-11-05), about a fifth shorter */
@container (max-width:560px){
  /* spacing */
  .home{gap:32px}
  .home-section{gap:14px}
  .home-section__head h2{font-size:22px}
  .home-section__head p{margin-top:2px;font-size:14px}

  /* Where to start: three compact blocks, all in view, no swiping */
  .start-cards{gap:10px}
  .start-card{padding:14px 16px;gap:4px}
  .start-card h3{font-size:19px}
  .start-card p{display:none}
  .start-card ul{margin:0}
  .start-card li a{min-height:40px;font-size:15px}
  .start-card li:first-child a{border-top:0}

  /* courses: the steps and the long description stay on larger screens */
  .home-courses{padding:16px;gap:14px}
  .home-courses .home-kicker,.home-path{display:none}
  .home-courses__intro{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 12px}
  .home-courses h2{font-size:22px}
  .home-courses .home-more{font-size:14px}
  .course-card img,.course-card__ph{aspect-ratio:3/1}
  .course-card__body{padding:14px 16px;gap:6px}
  .course-card__body b{font-size:18px}
  .course-card__lead{display:none}
  .course-card__foot{margin-top:2px}
  .course-card__foot .btn{min-height:42px}
  .course-cards{gap:10px}
  .course-card--small{grid-template-columns:88px minmax(0,1fr)}
  .course-card--small .course-card__body{padding:10px 12px}
  .course-card--small .course-card__body b{font-size:15px}

  /* new supervision and articles */
  .home-card{grid-template-columns:64px minmax(0,1fr);padding:10px 0;column-gap:12px}
  .home-card img,.home-card__ph{width:64px;height:64px}
  .home-card h3{font-size:15px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .home-card__meta{font-size:12.5px}

  /* library, and the Starry sky as a short band */
  .home-split{gap:12px}
  .lib-card{padding:16px;gap:8px}
  .lib-card p{display:none}
  .home-split h2{font-size:22px}
  .shelf{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:2px}
  .shelf__book:nth-child(4){display:block}
  .lib-card__more{min-height:42px;font-size:15px}
  .night-card{min-height:0}
  .night-card__text{padding:16px;gap:8px;max-width:none;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:12px}
  .night-card__text h2{grid-column:1}
  .night-card__text p{grid-column:1 / -1;grid-row:2;font-size:14px}
  .night-card__play{grid-column:2;grid-row:1;margin:0;min-height:40px;padding:0 14px 0 10px;font-size:14px}
  .night-card__play svg{width:18px;height:18px}
}

/* Tablets: side by side between phone and desktop width (owner 2026-11-05), about 40% shorter at 768 px */
@container (min-width:561px) and (max-width:899px){
  /* spacing */
  .home{gap:40px}
  .home-section{gap:16px}
  .home-section__head h2{font-size:26px}

  /* Where to start: the three categories side by side */
  .start-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
  .start-card{padding:18px;gap:8px}
  .start-card h3{font-size:20px}
  .start-card p{font-size:14px}
  .start-card li a{min-height:42px;font-size:15px}

  /* courses: the steps as one row under the heading, the big card with its cover beside the text */
  .home-courses{padding:24px;gap:18px}
  .home-courses__intro{gap:10px}
  .home-courses h2{font-size:26px}
  .home-path{grid-auto-flow:column;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:4px 0 0}
  .home-path li{padding-bottom:0;grid-template-columns:32px minmax(0,1fr);gap:10px;font-size:14px}
  .home-path li::after{display:none}
  .home-path b{width:32px;height:32px}
  .course-card--lead{grid-template-columns:minmax(0,5fr) minmax(0,6fr)}
  .course-card--lead img,.course-card--lead .course-card__ph{aspect-ratio:auto;height:100%;min-height:220px}
  .course-card__body{padding:18px 20px;gap:8px}
  .course-card__body b{font-size:20px}
  .course-card__lead{-webkit-line-clamp:3}

  /* new supervision and articles: three cards to a row */
  .home-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
  .home-card h3{font-size:16px;margin-top:2px}
  .home-card__meta{font-size:12.5px}
  .home-card>.card-foot{margin-bottom:14px}
  .home-card>:not(img):not(.home-card__ph){margin-inline:14px}

  /* library and Starry sky side by side */
  .home-split{grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:14px}
  .home-split h2{font-size:22px}
  .lib-card{padding:18px;gap:8px}
  .lib-card p{display:none}
  .shelf{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
  .shelf__book:nth-child(5){display:none}
  .night-card{min-height:0}
  .night-card__text{padding:18px;gap:10px}
  .night-card p{font-size:14px}
}
