:root{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#202a4a;background:#fff;--accent:#0b55d9;--border:#dbe4f2;--muted:#68738d}
*{box-sizing:border-box}body{margin:0;line-height:1.6}a{color:inherit}.wrap{width:min(1240px,calc(100% - 40px));margin:0 auto}
.site-header{background:#fff;border-bottom:1px solid #edf1f6}.site-header .wrap{min-height:78px;display:flex;align-items:center;justify-content:space-between;gap:24px}
.brand{display:inline-flex;align-items:center;font-weight:700;text-decoration:none;font-size:20px}.brand img{display:block;max-width:170px;max-height:52px;width:auto;height:auto}.site-header nav{display:flex;gap:24px;flex-wrap:wrap}.site-header nav a{text-decoration:none}.site-header nav a:hover{color:var(--accent)}
.page{margin:0;padding:0}.page-hero{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(300px,.95fr);gap:clamp(34px,5vw,78px);align-items:center;padding:clamp(34px,5vw,72px) 0 clamp(28px,4vw,56px)}
.page-hero__content{display:grid;align-content:start;gap:clamp(16px,1.6vw,24px)}
.lio-breadcrumbs{margin:0}.lio-breadcrumbs ol{display:flex;flex-wrap:wrap;gap:5px 7px;margin:0;padding:0;list-style:none;color:var(--muted);font-size:13px}.lio-breadcrumbs li:not(:last-child)::after{content:"/";margin-left:7px;color:#a5adbd}.lio-breadcrumbs a{text-decoration:none}.lio-breadcrumbs a:hover{color:var(--accent)}
.page-hero h1{margin:0;max-width:900px;font-size:clamp(36px,4.2vw,64px);line-height:1.06;letter-spacing:-.012em;font-weight:600}.page-hero__summary{max-width:760px;font-size:clamp(17px,1.25vw,20px);line-height:1.5}.page-hero__summary p{margin:0}.page-hero__date{color:var(--muted);font-size:14px}
.page-hero__actions{display:flex;gap:12px;flex-wrap:wrap}.cta{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:10px 22px;border:1px solid var(--accent);border-radius:999px;color:var(--accent);text-decoration:none;font-weight:600;transition:background-color .18s ease,color .18s ease,border-color .18s ease}.cta:hover,.cta:focus-visible{background:var(--accent);border-color:var(--accent);color:#fff;text-decoration:none}.cta--primary{background:var(--accent);color:#fff}.cta--primary:hover{background:#0848b8}
.page-hero__media{min-width:0}.page-hero__media img{display:block;width:100%;height:auto;max-height:460px;object-fit:contain}
.content{width:100%;font-size:18px;padding:clamp(24px,3vw,42px) 0 clamp(54px,6vw,88px);border-top:1px solid #eef2f7}.content img{max-width:100%;height:auto;border-radius:14px}.content>:first-child{margin-top:0}
.site-footer{padding:30px 0 50px;border-top:1px solid #edf1f6;color:var(--muted);font-size:14px}.footer-logo{display:block;max-width:170px;max-height:56px;width:auto;height:auto}
@media(max-width:900px){.page-hero{grid-template-columns:1fr}.page-hero__media{order:-1}.page-hero__media img{max-height:340px;margin:0 auto}.page-hero h1{font-size:clamp(34px,8vw,52px)}}
@media(max-width:720px){.site-header .wrap{align-items:flex-start;flex-direction:column;padding:18px 0}.wrap{width:min(100% - 24px,1240px)}.page-hero{padding:28px 0 24px;gap:24px}.page-hero__content{gap:16px}.page-hero__actions{display:grid}.cta{width:100%}.content{font-size:17px;padding-top:24px}}
.lio-section-page{display:grid;gap:24px}.lio-section-intro{display:none}.lio-section-children{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.lio-section-child{padding:20px;border:1px solid var(--border);border-radius:14px;background:#fff;overflow:hidden}.lio-section-child-image{display:block;margin:-20px -20px 16px;aspect-ratio:16/9;overflow:hidden;background:#f3f6fa}.lio-section-child-image img{display:block;width:100%;height:100%;object-fit:cover}
.lio-section-child h2{margin:0 0 8px;font-size:22px;line-height:1.25}.lio-section-child h2 a{text-decoration:none}.lio-section-child p{margin:0 0 14px;color:var(--muted)}.lio-section-child-link{font-weight:700;text-decoration:none;color:var(--accent)}.lio-section-empty{margin:0;color:var(--muted)}
@media(max-width:720px){.lio-section-children{grid-template-columns:1fr}}
.lio-pagination{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:10px}.lio-pagination a,.lio-pagination span{display:inline-flex;align-items:center;justify-content:center;min-width:42px;height:42px;padding:0 12px;border:1px solid var(--border);border-radius:10px;background:#fff;text-decoration:none;font-weight:700}.lio-pagination a:hover{background:#f2f6fd}.lio-pagination-current{background:var(--accent)!important;color:#fff;border-color:var(--accent)!important}
/* LIO starter component: hero split media */
.lio-component-hero--split-media{display:grid;grid-template-columns:minmax(0,58fr) minmax(320px,42fr);gap:clamp(32px,5vw,72px);align-items:center;padding:clamp(32px,5vw,72px) 0}
.lio-component-hero__content{display:grid;align-content:start;gap:16px;min-width:0}.lio-component-hero__eyebrow{font-size:12px;line-height:1.2;letter-spacing:.1em;text-transform:uppercase;color:var(--accent);font-weight:700}.lio-component-hero__title{margin:0;font-size:clamp(36px,4.2vw,64px);line-height:1.06}.lio-component-hero__lead{margin:0;max-width:760px;font-size:clamp(17px,1.25vw,20px);line-height:1.5;color:var(--muted)}
.lio-component-hero__media{margin:0;min-width:0}.lio-component-hero__media img{display:block;width:100%;height:auto;max-height:460px;object-fit:cover;border-radius:14px}.lio-component-hero__media figcaption{margin-top:8px;font-size:12px;line-height:1.4;color:var(--muted)}
.lio-component-hero__actions{display:flex;gap:12px;flex-wrap:wrap}.lio-component-hero__cta{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:10px 22px;border:1px solid var(--accent);border-radius:999px;text-decoration:none;font-weight:600}.lio-component-hero__cta--primary{background:var(--accent);color:#fff}.lio-component-hero__cta--secondary{color:var(--accent)}
.lio-component-hero__meta{display:flex;align-items:baseline;justify-content:space-between;gap:16px;padding-top:14px;border-top:1px solid var(--border)}.lio-component-hero__meta strong{font-size:18px}.lio-component-hero__meta span{font-size:13px;color:var(--muted)}
.lio-component-hero--media-left .lio-component-hero__media{grid-column:1;grid-row:1}.lio-component-hero--media-left .lio-component-hero__content{grid-column:2;grid-row:1}.lio-component-hero--no-media{grid-template-columns:minmax(0,1fr)}
@media(max-width:900px){.lio-component-hero--split-media{grid-template-columns:1fr;gap:24px}.lio-component-hero--media-left .lio-component-hero__media,.lio-component-hero--media-left .lio-component-hero__content{grid-column:auto;grid-row:auto}.lio-component-hero__media{order:-1}}
@media(max-width:760px){.lio-component-hero--hide-media-mobile .lio-component-hero__media{display:none}.lio-component-hero__actions{display:grid}.lio-component-hero__cta{width:100%}.lio-component-hero__meta{align-items:flex-start;flex-direction:column;gap:4px}}

/* Gallery attached to a published page: responsive, lightweight, no JS dependency. */
.lio-page-gallery{margin:0 0 clamp(36px,5vw,70px)}
.lio-page-gallery__grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:16px;align-items:start}
.lio-page-gallery__item{display:block;max-width:480px;border-radius:14px;overflow:hidden;background:#eef2f7;aspect-ratio:4/3}
.lio-page-gallery__item img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .18s ease}
.lio-page-gallery__item:hover img,.lio-page-gallery__item:focus-visible img{transform:scale(1.025)}
.lio-page-gallery__item:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
@media(max-width:720px){.lio-page-gallery__grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr));gap:10px}}
/* Three rich-text image placements; HTML img width attribute persists through safe sanitation. */
.content .lio-content-image{display:table;max-width:100%;width:fit-content;clear:both;margin:1.25em auto}
.content .lio-content-image img{display:block;max-width:100%;height:auto;border-radius:12px}
.content .lio-content-image figcaption{display:table-caption;caption-side:bottom;padding-top:8px;font-size:13px;line-height:1.45;color:var(--muted);overflow-wrap:anywhere}
.content .lio-content-image--left{float:left;clear:left;margin:.25em 1.35em 1em 0}
.content .lio-content-image--center{float:none;clear:both;margin:1.35em auto}
.content .lio-content-image--right{float:right;clear:right;margin:.25em 0 1em 1.35em}
.content::after{content:"";display:block;clear:both}
@media(max-width:720px){.content .lio-content-image--left,.content .lio-content-image--right{float:none;clear:both;margin:1.2em auto}}

/* Gallery lightbox: native dialog isolates page interaction and keyboard focus. */
.lio-gallery-lightbox{position:fixed;inset:0;box-sizing:border-box;width:100vw;max-width:none;height:100vh;height:100dvh;max-height:none;margin:0;padding:20px;border:0;overflow:hidden;background:rgba(13,19,31,.96);color:#fff}
.lio-gallery-lightbox::backdrop{background:rgba(0,0,0,.78)}
.lio-gallery-lightbox__surface{height:100%;width:min(1400px,100%);margin:auto;display:flex;flex-direction:column;justify-content:center;position:relative}
.lio-gallery-lightbox__figure{min-width:0;margin:0;display:grid;justify-items:center;gap:12px}
.lio-gallery-lightbox__stage{width:100%;min-width:0;display:flex;align-items:center;justify-content:center}
.lio-gallery-lightbox__image-wrap{position:relative;display:inline-flex;max-width:100%;flex:0 1 auto;align-items:center;justify-content:center}
.lio-gallery-lightbox__image-wrap img{display:block;max-width:100%;max-height:calc(100dvh - 155px);width:auto;height:auto;object-fit:contain;box-shadow:0 16px 50px rgba(0,0,0,.22)}
.lio-gallery-lightbox__figure figcaption{text-align:center;font-size:14px;line-height:1.4;color:#e4e8ef;overflow-wrap:anywhere}
.lio-gallery-lightbox__counter{color:#abb7c7;font-size:12px;font-variant-numeric:tabular-nums}
.lio-gallery-lightbox__close,.lio-gallery-lightbox__arrow{appearance:none;display:grid;place-items:center;padding:0;border:1px solid rgba(255,255,255,.25);border-radius:50%;background:rgba(255,255,255,.1);color:#fff;cursor:pointer;font-family:inherit}
.lio-gallery-lightbox__arrow svg{display:block;width:20px;height:20px;margin:0;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.lio-gallery-lightbox__close{position:absolute;right:12px;top:12px;width:44px;height:44px;z-index:2;font-size:28px;padding:0}
.lio-gallery-lightbox__close svg{display:block;width:20px;height:20px;margin:0;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;pointer-events:none}
/* Controls are attached to the displayed picture, not the dialog viewport. */
.lio-gallery-lightbox__arrow{position:absolute;top:50%;transform:translateY(-50%);width:48px;height:48px;font-size:34px;line-height:1;z-index:2}
.lio-gallery-lightbox__arrow[data-gallery-prev]{left:12px}
.lio-gallery-lightbox__arrow[data-gallery-next]{right:12px}
.lio-gallery-lightbox__arrow[hidden]{display:none!important}
.lio-gallery-lightbox__close:hover,.lio-gallery-lightbox__arrow:hover,.lio-gallery-lightbox__close:focus-visible,.lio-gallery-lightbox__arrow:focus-visible{background:rgba(255,255,255,.23);outline:2px solid #fff;outline-offset:3px}
@media(max-width:720px){.lio-gallery-lightbox{padding:12px}.lio-gallery-lightbox__arrow{width:36px;height:36px;font-size:28px}.lio-gallery-lightbox__arrow[data-gallery-prev]{left:8px}.lio-gallery-lightbox__arrow[data-gallery-next]{right:8px}.lio-gallery-lightbox__close{right:8px;top:8px;width:36px;height:36px}.lio-gallery-lightbox__image-wrap img{max-height:calc(100dvh - 135px)}.lio-gallery-lightbox__figure figcaption{font-size:12px}}

/* LIO Core wide layout and scroll-aware header standard. */
:root{--lio-layout-width:1794px;--lio-layout-gutter:clamp(16px,3vw,32px);--lio-adminbar-offset:0px}
html.lio-adminbar-visible{--lio-adminbar-offset:42px}
@media(max-width:720px){html.lio-adminbar-visible{--lio-adminbar-offset:40px}}
.wrap{width:min(var(--lio-layout-width),calc(100% - 2 * var(--lio-layout-gutter)))}
main.wrap>.page,main.wrap>.page>.content{width:100%;min-width:0;max-width:none;margin-inline:0}
.content{overflow-wrap:break-word;word-break:normal}
.content :is(.lio-section-children,.lio-page-gallery__grid){min-width:0;width:100%;max-width:none}
.site-header{position:sticky;top:var(--lio-adminbar-offset);z-index:100;transition:transform .24s ease,background-color .2s ease,box-shadow .2s ease}
.site-header.lio-header-scrolled{background-color:color-mix(in srgb,var(--lio-header-surface,#fff) 94%,transparent);backdrop-filter:blur(10px);box-shadow:0 4px 18px #0000000c}
.site-header.lio-header-hidden:not(:focus-within){transform:translateY(calc(-100% - var(--lio-adminbar-offset)));pointer-events:none}
@media(prefers-reduced-motion:reduce){.site-header{transition:none}}

/* Core primary navigation: parent link and independent native disclosure. */
.lio-nav-tree{overflow:visible!important;flex-wrap:wrap;max-width:100%;min-width:0}
.lio-nav-tree .lio-nav-group{position:relative;display:flex;align-items:center;gap:3px;min-width:0;max-width:100%}
.lio-nav-tree .lio-nav-details{display:inline-block;flex:none}
/* Compact, font-independent chevron; keep the native disclosure hit area. */
.lio-nav-tree .lio-nav-details>summary{display:grid;place-items:center;list-style:none;cursor:pointer;min-width:24px;min-height:36px;padding:0;line-height:1;color:inherit}
.lio-nav-tree .lio-nav-details>summary>span{display:grid;place-items:center;width:12px;height:12px;font-size:0;line-height:0;flex:none}
.lio-nav-tree .lio-nav-details>summary>span::before{content:"";display:block;width:10px;height:6px;background:currentColor;clip-path:polygon(0 18%,12% 0,50% 68%,88% 0,100% 18%,50% 100%)}
.lio-nav-tree .lio-nav-details>summary::-webkit-details-marker{display:none}
.lio-nav-tree .lio-nav-details>summary:focus-visible{outline:2px solid currentColor;outline-offset:2px}
.lio-nav-tree .lio-nav-details[open]>summary>span{transform:rotate(180deg)}
.lio-nav-tree .lio-nav-panel{position:absolute;top:100%;left:0;z-index:110;min-width:min(240px,85vw);max-width:min(360px,85vw);padding:10px;background:#fff;color:#263238;border:1px solid #dce3e7;border-radius:8px;box-shadow:0 8px 24px #0002}
.lio-nav-tree .lio-nav-panel a{display:block;padding:9px 10px;white-space:normal!important;overflow-wrap:break-word;text-transform:none}
.lio-nav-tree .lio-nav-panel a:hover,.lio-nav-tree .lio-nav-panel a:focus-visible{background:#eef2f4}
.lio-nav-tree .lio-nav-panel .lio-nav-group{flex-wrap:wrap;justify-content:space-between}
.lio-nav-tree .lio-nav-panel .lio-nav-group>a{flex:1;min-width:0}
.lio-nav-tree .lio-nav-panel .lio-nav-details[open]{flex:1 1 100%}
.lio-nav-tree .lio-nav-panel .lio-nav-panel{position:static;min-width:0;max-width:100%;box-shadow:none;margin-left:8px;border-left:2px solid #dce3e7}
.lio-theme .studio-nav .lio-nav-panel{position:static;min-width:0;max-width:100%;box-shadow:none}
.lio-theme .studio-nav .lio-nav-group{flex-wrap:wrap}
.lio-theme .studio-nav .lio-nav-group>a{flex:1 1 0;min-width:0;white-space:normal;overflow-wrap:anywhere}
@media(max-width:900px),(hover:none),(pointer:coarse){
 .lio-nav-tree .lio-nav-group{flex-wrap:wrap}
 .lio-nav-tree .lio-nav-details>summary{min-width:44px;min-height:44px}
 .lio-nav-tree .lio-nav-details[open]{flex:1 1 100%}
 .lio-nav-tree .lio-nav-panel{position:static;min-width:0;max-width:100%;box-shadow:none}
}

/* LIO editorial content standard: independent of hero, navigation and cards. */
.content h2:not(.lio-section-child *):not(.lio-component-hero--split-media *){font-size:clamp(1.375rem,1.9vw,1.75rem);font-weight:500;line-height:1.3;letter-spacing:-.012em;margin:1.35em 0 .6em}
.content h3:not(.lio-section-child *):not(.lio-component-hero--split-media *){font-size:clamp(1.1875rem,1.5vw,1.375rem);font-weight:500;line-height:1.35;letter-spacing:0;margin:1.25em 0 .55em}
.content h4:not(.lio-section-child *):not(.lio-component-hero--split-media *){font-size:1.0625rem;font-weight:500;line-height:1.4;letter-spacing:0;margin:1.15em 0 .5em}
.content > :is(h2,h3,h4):first-child{margin-top:0}
.content table{display:table;width:100%;max-width:100%;border-collapse:collapse;table-layout:auto;margin:1.25em 0;font-size:.94em;line-height:1.5;border:1px solid #dce2e5;border-color:color-mix(in srgb,currentColor 17%,transparent)}
.content :is(th,td){padding:.7em .85em;text-align:left;vertical-align:top;border:1px solid #dce2e5;border-color:color-mix(in srgb,currentColor 17%,transparent);overflow-wrap:anywhere;word-break:normal}
.content th{font-weight:600;background:color-mix(in srgb,currentColor 6%,transparent)}
.content tbody tr:nth-child(even){background:color-mix(in srgb,currentColor 2.5%,transparent)}
.content caption{caption-side:top;text-align:left;font-weight:500;padding:0 0 .5em}
@media(max-width:720px){.content table{display:block;overflow-x:auto;overscroll-behavior-inline:contain}.content :is(th,td){min-width:7rem;padding:.6em .7em}}


/* Junior: article reading and code samples, site-local source overrides. */
body.lio-theme.lio-theme--calm .calm-article {
  padding-block: clamp(26px,4vw,48px) 64px;
  --junior-code-bg: #edf2f6;
  --junior-code-head: #e3eaf0;
  --junior-code-text: #263445;
  --junior-code-border: #ced9e3;
  --junior-code-muted: #42586b;
}
body.lio-theme.lio-theme--calm.lio-mode-dark .calm-article {
  --junior-code-bg: #162329;
  --junior-code-head: #203239;
  --junior-code-text: #e0e9ef;
  --junior-code-border: #40545d;
  --junior-code-muted: #c4d2da;
}
body.lio-theme.lio-theme--calm .calm-article > h1 {
  font-size: clamp(1.65rem,2.4vw,2.2rem);
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: -.025em;
  max-width: 100%;
  margin: 0 0 .55em;
  text-wrap: pretty;
}
body.lio-theme.lio-theme--calm .calm-article > .calm-lead {
  max-width: 78ch;
  margin: 0 0 24px;
  font-size: clamp(1rem,1.3vw,1.13rem);
  line-height: 1.6;
}
body.lio-theme.lio-theme--calm .calm-article .calm-body {
  padding-bottom: 36px;
  font-size: 1rem;
  line-height: 1.7;
  min-width: 0;
}
body.lio-theme.lio-theme--calm .calm-article .calm-body > p {
  line-height: 1.75;
}
body.lio-theme.lio-theme--calm .calm-article .calm-body > h2 {
  font-size: clamp(1.28rem,1.65vw,1.55rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.016em;
  margin: 1.55em 0 .65em;
}
body.lio-theme.lio-theme--calm .calm-body pre {
  display:block;
  box-sizing:border-box;
  width:100%;
  max-width:100%;
  min-width:0;
  padding: clamp(13px,1.7vw,21px);
  margin: 1.1em 0 1.3em;
  overflow-x:auto;
  overscroll-behavior-inline:contain;
  white-space:pre;
  word-break:normal;
  overflow-wrap:normal;
  text-align:left;
  tab-size:4;
  font: 400 .9rem/1.65 ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace;
  color:var(--junior-code-text);
  background:var(--junior-code-bg);
  border:1px solid var(--junior-code-border);
  border-radius:10px;
}
body.lio-theme.lio-theme--calm .calm-body pre code {
  display:block;
  width:max-content;
  min-width:100%;
  color:inherit;
  font:inherit;
  white-space:inherit;
  word-break:normal;
  overflow-wrap:normal;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
}
body.lio-theme.lio-theme--calm .calm-body :not(pre)>code {
  font-family:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace;
  font-size:.9em;
  color:var(--junior-code-text);
  background:var(--junior-code-bg);
  padding:.12em .3em;
  border-radius:4px;
  overflow-wrap:anywhere;
}
body.lio-theme.lio-theme--calm .calm-body .junior-code {
  min-width:0;max-width:100%;margin:1.15em 0 1.4em;
  border:1px solid var(--junior-code-border);
  border-radius:10px;overflow:hidden;
  background:var(--junior-code-bg);
  color:var(--junior-code-text);
}
body.lio-theme.lio-theme--calm .junior-code-bar {
  display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:8px;
  padding:8px 14px;
  font-size:.82rem;line-height:1.4;
  background:var(--junior-code-head);
  color:var(--junior-code-muted);
  border-bottom:1px solid var(--junior-code-border);
}
body.lio-theme.lio-theme--calm .junior-code-label {font-weight:600;overflow-wrap:anywhere;min-width:0}
body.lio-theme.lio-theme--calm .junior-code-copy {
  display:inline-flex;align-items:center;gap:6px;min-height:32px;
  padding:4px 10px;
  border:1px solid var(--junior-code-border);
  border-radius:6px;
  background:var(--junior-code-bg);color:var(--junior-code-text);
  font:inherit;cursor:pointer;
}
body.lio-theme.lio-theme--calm .junior-code-copy:hover {text-decoration:underline}
body.lio-theme.lio-theme--calm .calm-body .junior-code > pre {
  border:0;border-radius:0;margin:0;
}
body.lio-theme.lio-theme--calm .junior-code :focus-visible,
body.lio-theme.lio-theme--calm .calm-body pre:focus-visible {
  outline:2px solid #3475b0;outline-offset:-3px;
}
body.lio-theme.lio-theme--calm .junior-code .jc-keyword {color:#6242a6;font-weight:600}
body.lio-theme.lio-theme--calm .junior-code .jc-string {color:#166749}
body.lio-theme.lio-theme--calm .junior-code .jc-number {color:#985117}
body.lio-theme.lio-theme--calm .junior-code .jc-comment {color:#5d6e7c;font-style:italic}
body.lio-theme.lio-theme--calm.lio-mode-dark .junior-code .jc-keyword {color:#c6a9ff}
body.lio-theme.lio-theme--calm.lio-mode-dark .junior-code .jc-string {color:#93d6af}
body.lio-theme.lio-theme--calm.lio-mode-dark .junior-code .jc-number {color:#ffd39a}
body.lio-theme.lio-theme--calm.lio-mode-dark .junior-code .jc-comment {color:#a8bdca}
body.lio-theme.lio-theme--calm .calm-body > p:first-child:has(> strong:first-child) {
  font-size:.9rem;line-height:1.55;
}
body.lio-theme.lio-theme--calm .calm-body .junior-figure {
  margin:1.5rem 0 1.8rem;max-width:100%;min-width:0;
}
body.lio-theme.lio-theme--calm .calm-body .junior-figure img {
  display:block;width:100%;height:auto;
  border:1px solid var(--junior-code-border);border-radius:10px;
}
body.lio-theme.lio-theme--calm .calm-body .junior-figure figcaption {
  font-size:.88rem;line-height:1.5;color:var(--junior-code-muted);margin-top:.65em;
}
@media(max-width:600px) {
  body.lio-theme.lio-theme--calm .calm-article > h1 {max-width:none;letter-spacing:-.02em}
  body.lio-theme.lio-theme--calm .calm-body pre {font-size:.82rem}
  body.lio-theme.lio-theme--calm .junior-code-bar {padding:7px 10px}
}

/* Junior homepage artwork — site-local, not core. */
body.lio-theme.lio-theme--calm main:has(>.calm-hero) {
  --junior-card-bg:#fff;
  --junior-card-border:#e1e8ed;
  --junior-card-accent:#e9f2f6;
}
body.lio-theme.lio-theme--calm.lio-mode-dark main:has(>.calm-hero) {
  --junior-card-bg:#233134;
  --junior-card-border:#405359;
  --junior-card-accent:#2b4047;
}
body.lio-theme.lio-theme--calm .calm-hero:has(>.calm-hero-media) {
  grid-template-columns:minmax(0, .92fr) minmax(0, 1.08fr);
  grid-template-rows:1fr auto auto 1fr;
  column-gap:clamp(22px,3vw,52px);
  padding-block:clamp(18px,2.6vw,42px);
}
body.lio-theme.lio-theme--calm .calm-hero>h1 {
  font-size:clamp(1.9rem,2.75vw,2.6rem);
  font-weight:600;letter-spacing:-.03em;
}
body.lio-theme.lio-theme--calm .calm-hero>.calm-lead {
  font-size:clamp(1rem,1.3vw,1.14rem);
  max-width:42rem;
}
body.lio-theme.lio-theme--calm .calm-hero>.calm-hero-media {
  aspect-ratio:1200/650; border-radius:0; background:transparent;
}
body.lio-theme.lio-theme--calm .calm-hero>.calm-hero-media img {
  display:block;object-fit:contain; border:0;border-radius:0;
}
body.lio-theme.lio-theme--calm main:has(>.calm-hero) > .calm-section {
  padding:12px 0 42px;
}
body.lio-theme.lio-theme--calm main:has(>.calm-hero) > .calm-section .calm-section-title {
  align-items:baseline; margin-bottom:20px;
}
body.lio-theme.lio-theme--calm main:has(>.calm-hero) > .calm-section h2 {
  font-size:clamp(1.65rem,2.2vw,2rem);font-weight:600;letter-spacing:-.025em;
}
body.lio-theme.lio-theme--calm main:has(>.calm-hero) .lio-cards,
body.lio-theme.lio-theme--calm main:has(>.calm-hero) .junior-topics {
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;
}
body.lio-theme.lio-theme--calm main:has(>.calm-hero) :is(.lio-card,.junior-topic) {
  --junior-art:url("/assets/media/junior/home/start.svg");
  position:relative;isolation:isolate;overflow:hidden;
  display:flex;flex-direction:column;justify-content:flex-start;gap:8px;
  min-width:0;min-height:154px;
  padding:22px clamp(90px,9vw,132px) 22px 22px;
  border:1px solid var(--junior-card-border);border-radius:12px;
  background:var(--junior-card-bg);
  color:inherit;text-decoration:none;
}
body.lio-theme.lio-theme--calm main:has(>.calm-hero) :is(.lio-card,.junior-topic)::after {
  content:"";position:absolute;z-index:-1;right:0;bottom:0;
  width:clamp(86px,8.5vw,124px);height:124px;
  background:var(--junior-art) right bottom / contain no-repeat;
  pointer-events:none;opacity:.94;
}
body.lio-theme.lio-theme--calm.lio-mode-dark main:has(>.calm-hero) :is(.lio-card,.junior-topic)::after {opacity:.72}
body.lio-theme.lio-theme--calm main:has(>.calm-hero) :is(.lio-card,.junior-topic):hover {
  border-color:#8bb5c7;
}
body.lio-theme.lio-theme--calm main:has(>.calm-hero) :is(.lio-card strong,.junior-topic h3) {
  display:block;font-size:1.04rem;line-height:1.35;font-weight:600;
  margin:0;overflow-wrap:anywhere;
}
body.lio-theme.lio-theme--calm main:has(>.calm-hero) :is(.lio-card span,.junior-topic p) {
  display:block;font-size:.86rem;line-height:1.55;margin:0;
  overflow-wrap:anywhere;
}
body.lio-theme.lio-theme--calm main:has(>.calm-hero) .junior-topics {margin:20px 0 36px}
body.lio-theme.lio-theme--calm main:has(>.calm-hero) .junior-topic[href^="/start/"] {--junior-art:url("/assets/media/junior/home/start.svg")}
body.lio-theme.lio-theme--calm main:has(>.calm-hero) :is(.lio-card,.junior-topic)[href^="/languages/"] {--junior-art:url("/assets/media/junior/home/language.svg")}
body.lio-theme.lio-theme--calm main:has(>.calm-hero) :is(.lio-card,.junior-topic)[href^="/web/"] {--junior-art:url("/assets/media/junior/home/web.svg")}
body.lio-theme.lio-theme--calm main:has(>.calm-hero) :is(.lio-card,.junior-topic)[href^="/tools/"] {--junior-art:url("/assets/media/junior/home/tools.svg")}
body.lio-theme.lio-theme--calm main:has(>.calm-hero) :is(.lio-card,.junior-topic)[href^="/projects/"] {--junior-art:url("/assets/media/junior/home/projects.svg")}
body.lio-theme.lio-theme--calm main:has(>.calm-hero) :is(.lio-card,.junior-topic)[href^="/ai/"] {--junior-art:url("/assets/media/junior/home/ai.svg")}
body.lio-theme.lio-theme--calm main:has(>.calm-hero) .lio-card[href*="/ai-debugging-prompt/"] {--junior-art:url("/assets/media/junior/home/debug.svg")}
body.lio-theme.lio-theme--calm main:has(>.calm-hero) .lio-card[href*="/ai-explain-code/"] {--junior-art:url("/assets/media/junior/home/explain.svg")}
body.lio-theme.lio-theme--calm main:has(>.calm-hero) .lio-card[href*="/ai-project-secrets/"] {--junior-art:url("/assets/media/junior/home/security.svg")}
body.lio-theme.lio-theme--calm main:has(>.calm-hero) .lio-card[href*="/ai-wrong-answer-review/"] {--junior-art:url("/assets/media/junior/home/review.svg")}
body.lio-theme.lio-theme--calm main:has(>.calm-hero) .lio-card[href*="/verify-generated-code/"] {--junior-art:url("/assets/media/junior/home/tests.svg")}
@media(max-width:1050px) {
  body.lio-theme.lio-theme--calm main:has(>.calm-hero) :is(.lio-cards,.junior-topics) {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px) {
  body.lio-theme.lio-theme--calm .calm-hero:has(>.calm-hero-media) {
    grid-template-columns:minmax(0,1fr);grid-template-rows:auto;
    grid-template-areas:"eyebrow" "heading" "lead" "actions" "media";column-gap:0;
    padding-block:24px;
  }
  body.lio-theme.lio-theme--calm .calm-hero>.calm-hero-media {margin-top:14px;max-width:620px;justify-self:center}
}
@media(max-width:620px) {
  body.lio-theme.lio-theme--calm main:has(>.calm-hero) :is(.lio-cards,.junior-topics) {grid-template-columns:minmax(0,1fr);gap:12px}
  body.lio-theme.lio-theme--calm main:has(>.calm-hero) :is(.lio-card,.junior-topic) {min-height:132px;padding:17px 95px 17px 17px}
  body.lio-theme.lio-theme--calm main:has(>.calm-hero) :is(.lio-card,.junior-topic)::after {width:86px;height:104px}
  body.lio-theme.lio-theme--calm main:has(>.calm-hero) > .calm-section .calm-section-title {gap:12px;flex-wrap:wrap}
}
/* Let long lesson headings use the full card width; keep illustrations beside descriptions. */
body.lio-theme.lio-theme--calm main:has(>.calm-hero) :is(.lio-card,.junior-topic) {
  display:grid;grid-template-columns:minmax(0,1fr) clamp(72px,7vw,104px);
  grid-template-rows:auto 1fr;gap:8px 10px;padding:20px;align-content:start;
}
body.lio-theme.lio-theme--calm main:has(>.calm-hero) :is(.lio-card strong,.junior-topic h3) {grid-column:1/-1}
body.lio-theme.lio-theme--calm main:has(>.calm-hero) :is(.lio-card span,.junior-topic p) {grid-column:1;align-self:start}
body.lio-theme.lio-theme--calm main:has(>.calm-hero) :is(.lio-card,.junior-topic)::after {
  position:relative;grid-column:2;grid-row:2;right:auto;bottom:auto;
  align-self:end;justify-self:end;width:100%;height:auto;aspect-ratio:220/200;
  margin-right:-8px;margin-bottom:-8px;
}
@media(max-width:620px){
  body.lio-theme.lio-theme--calm main:has(>.calm-hero) :is(.lio-card,.junior-topic) {padding:17px;grid-template-columns:minmax(0,1fr) 76px}
}

/* Junior branding — site-local. */
body.lio-theme.lio-theme--calm .calm-header .lio-brand img {
  display:block;width:220px;height:auto;max-height:58px;max-width:100%;
}
body.lio-theme.lio-theme--calm .lio-footer__brand img,
body.lio-theme.lio-theme--calm .lio-footer img[src*="/junior/brand/"] {
  display:block;width:192px;height:auto;max-height:52px;max-width:100%;
}
body.lio-theme.lio-theme--calm.lio-mode-dark img[src="/assets/media/junior/brand/logo.svg"] {
  content:url("/assets/media/junior/brand/logo-dark.svg");
}
@media(max-width:620px){
  body.lio-theme.lio-theme--calm .calm-header .lio-brand img {width:208px;max-height:54px}
}
