/* =====================================================================
   Sub-site layer — blog / lab / ai / cv / academy
   Loaded AFTER assets/css/theme.css, and never by the hub at /.
   Adds only what theme.css does not already provide; everything here
   is built from the same tokens, so the sub-sites read as one site.
   ===================================================================== */

/* ---- top bar: sub-site links must survive on mobile ----
   The hub hides .navlink under 760px because it has a hero beneath.
   Sub-site nav links are the only navigation there is, so they wrap. */
.topbar nav.subnav { flex-wrap: wrap; row-gap: 6px; }
.topbar nav.subnav a.active { color: var(--ac); }
@media (max-width: 560px) {
  .topbar .wrap { height: auto; padding-top: 10px; padding-bottom: 10px; }
  .topbar nav.subnav { gap: 12px; flex: 1 1 auto; min-width: 0; justify-content: flex-end; }
}

/* ---- page head ---- */
.subhero { padding: 56px 0 8px; }
.subhero h1 {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(1.9rem, 4.4vw, 2.7rem);
  line-height: 1.06; letter-spacing: -.022em;
}
.subhero .lede { margin-top: 14px; font-size: 1.02rem; }
.subhero .badges { margin-top: 18px; }
/* the head already carries its own bottom space */
.subhero + .sec { padding-top: 30px; }

/* ---- card grid ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(288px, 1fr)); gap: 14px; }
.card.item { display: flex; flex-direction: column; gap: 10px; }
.card.item > p { font-size: .95rem; color: color-mix(in srgb, var(--tx) 88%, var(--tx2)); }
.card.item .links { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 14px; }
.card.item .links a {
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ac); text-decoration: none;
}
.card.item .links a:hover { text-decoration: underline; }

/* ---- academy module pages ----
   These already used .container/.card/.grid/.badge/.btn/.actions with their
   own inline stylesheet. Dropping that sheet and defining the few names
   theme.css does not carry lets the existing markup work unchanged. */
.container { max-width: 1020px; margin: 0 auto; padding: 8px 24px 64px; }
.container h1 {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(1.85rem, 4.2vw, 2.6rem);
  line-height: 1.07; letter-spacing: -.022em; margin: 12px 0 14px;
}
.container > p { color: var(--tx2); max-width: 68ch; }
.container section { margin-top: 28px; }
.container h2 { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; margin-bottom: 8px; }
.container h3 { font-family: var(--font-head); font-weight: 700; font-size: 1rem; margin: 16px 0 4px; }
.container ul, .container ol {
  margin: 8px 0 0 20px; display: grid; gap: 6px;
  color: color-mix(in srgb, var(--tx) 88%, var(--tx2));
}
.card h2 { font-family: var(--font-head); font-weight: 700; font-size: 1.02rem; margin-bottom: 4px; }
.btn.secondary { background: var(--bg2); color: var(--tx); border-color: var(--ln); }

table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .95rem; }
th, td {
  border-top: 1px solid var(--ln); padding: 10px 12px; text-align: left;
  vertical-align: top; color: color-mix(in srgb, var(--tx) 88%, var(--tx2));
}
th, td:first-child { font-weight: 600; color: var(--tx); }

/* ---- inline icons on academy pages ----
   These SVGs were sized only by Tailwind's w-N/h-N utilities. Without the CDN
   an SVG carrying no width attribute expands to fill its container, so the few
   size utilities actually used are defined here, with a safe fallback. */
svg:not([width]) { width: 1.25rem; height: 1.25rem; flex: 0 0 auto; }
/* stacked labels relied on Tailwind's .block; without it they ran together */
.block { display: block; }
.inline-block { display: inline-block; }
.w-4 { width: 1rem; }    .h-4 { height: 1rem; }
.w-5 { width: 1.25rem; } .h-5 { height: 1.25rem; }
.w-6 { width: 1.5rem; }  .h-6 { height: 1.5rem; }
.w-8 { width: 2rem; }    .h-8 { height: 2rem; }
.animate-spin { animation: spin 1s linear infinite; }

/* every button inside a module page gets the shared button treatment */
.container button {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: 500 .86rem/1 var(--font-sans);
  border: 1px solid var(--ac); background: var(--ac); color: #fff;
  border-radius: 10px; padding: 11px 16px;
  transition: transform .12s ease, filter .12s ease;
}
html[data-theme="dark"] .container button { color: #06121F; }
.container button:hover { transform: translateY(-1px); filter: brightness(1.06); }
.container button[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* ---- form controls on academy pages ----
   These pages styled their inputs with Tailwind utilities. With the CDN gone
   the controls would fall back to browser defaults, so give them the tokens. */
select, textarea,
input[type="text"], input[type="password"], input[type="search"], input[type="email"] {
  font: 400 .95rem var(--font-sans); color: var(--tx);
  background: var(--bg2); border: 1px solid var(--ln);
  border-radius: 9px; padding: 10px 12px; max-width: 100%;
}
textarea { width: 100%; line-height: 1.6; resize: vertical; }
select:focus, textarea:focus, input:focus { outline: 2px solid var(--ac); outline-offset: 1px; }

/* the three action buttons on the Java modernization guide */
#toggleAnswersBtn, #btn-grade, #btn-summary, #saveKeyBtn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: 500 .86rem/1 var(--font-sans);
  border: 1px solid var(--ac); background: var(--ac); color: #fff;
  border-radius: 10px; padding: 11px 16px;
  transition: transform .12s ease, filter .12s ease;
}
html[data-theme="dark"] #toggleAnswersBtn,
html[data-theme="dark"] #btn-grade,
html[data-theme="dark"] #btn-summary,
html[data-theme="dark"] #saveKeyBtn { color: #06121F; }
#toggleAnswersBtn:hover, #btn-grade:hover, #btn-summary:hover, #saveKeyBtn:hover {
  transform: translateY(-1px); filter: brightness(1.06);
}
#btn-grade { background: var(--bg2); color: var(--tx); border-color: var(--ln); }
html[data-theme="dark"] #btn-grade { color: var(--tx); }
button[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* ---- filter toolbar (academy curriculum) ---- */
.toolbar { display: flex; align-items: flex-end; justify-content: space-between;
           flex-wrap: wrap; gap: 14px; }
.toolbar h2 { margin-bottom: 0; }
input.filter {
  width: 260px; max-width: 100%;
  font: 400 .92rem var(--font-sans); color: var(--tx);
  background: var(--bg2); border: 1px solid var(--ln);
  border-radius: 9px; padding: 9px 12px;
}
input.filter:focus { outline: 2px solid var(--ac); outline-offset: 1px; }
.card.item .tag {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ac);
}
.card.item .daynum {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--tx2);
}
a.card { text-decoration: none; color: inherit; display: block; }
a.card:hover h3 { color: var(--ac); }
.empty { color: var(--tx2); font-size: .95rem; padding: 18px 0; }

/* ---- post list (blog) ---- */
.posts { list-style: none; display: grid; gap: 0; margin-top: 4px;
         border-top: 1px solid var(--ln); }
.posts li { padding: 18px 0; border-bottom: 1px solid var(--ln); }
.posts h3 { font-family: var(--font-head); font-weight: 700; font-size: 1.06rem; margin-bottom: 4px; }
.posts h3 a { color: var(--tx); text-decoration: none; }
.posts h3 a:hover { color: var(--ac); }
.posts .when { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; color: var(--tx2); }
.posts p { color: var(--tx2); font-size: .95rem; margin-top: 6px; max-width: 68ch; }

/* ---- long-form article body ---- */
.prose { max-width: 72ch; }
.prose h1 {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(1.85rem, 4.2vw, 2.6rem);
  line-height: 1.07; letter-spacing: -.022em; margin-bottom: 6px;
}
.prose > header { margin-bottom: 26px; }
.prose h2 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); margin: 32px 0 10px; }
.prose h4 { font-family: var(--font-head); font-weight: 600; font-size: .98rem; margin: 18px 0 4px; }
.prose h3 { font-family: var(--font-head); font-weight: 700; font-size: 1.04rem; margin: 24px 0 6px; }
.prose p, .prose li { color: color-mix(in srgb, var(--tx) 88%, var(--tx2)); }
.prose p { margin-top: 12px; }
.prose ul, .prose ol { margin: 12px 0 0 20px; display: grid; gap: 6px; }
.prose pre {
  margin-top: 14px; padding: 14px 16px; overflow-x: auto;
  background: var(--chip); border: 1px solid var(--ln); border-radius: var(--r);
}
.prose pre code { background: none; padding: 0; font-size: .86rem; }
.prose code { font-family: var(--font-mono); font-size: .86rem;
              background: var(--chip); border-radius: 5px; padding: 2px 6px; }
.prose blockquote { margin-top: 16px; padding-left: 18px; border-left: 3px solid var(--ac); color: var(--tx2); }

/* ---- long-form article components ----
   The two big articles carried these class names with hard-coded greys and
   blues. Rebuilt on the tokens so they follow the light/dark theme. */
.prose .code-inline, .code-inline {
  font-family: var(--font-mono); font-size: .86em;
  background: var(--chip); color: var(--ac);
  border: 1px solid var(--ln); border-radius: 5px; padding: 1px 6px;
}
.aside-note {
  background: var(--chip); border-left: 3px solid var(--ac);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 14px 16px; margin: 18px 0; color: var(--tx2);
}
.aside-note p { margin-top: 0; }

/* inline "explain this" buttons scattered through the prose */
.ai-btn-inline, .eli5-btn, .code-explain-btn {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ac);
  background: none; border: 1px solid color-mix(in srgb, var(--ac) 35%, var(--ln));
  border-radius: 999px; padding: 2px 9px; margin-left: 6px; vertical-align: middle;
}
.ai-btn-inline:hover, .eli5-btn:hover, .code-explain-btn:hover {
  background: var(--chip); border-color: var(--ac);
}

/* the two block-level buttons (summarise / quiz) */
.ai-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: 500 .86rem/1 var(--font-sans);
  border-radius: 10px; padding: 11px 16px; margin-top: 20px;
  border: 1px solid var(--ac); background: var(--ac); color: #fff;
  transition: transform .12s ease, filter .12s ease;
}
html[data-theme="dark"] .ai-btn { color: #06121F; }
.ai-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.summarize-btn, .quiz-btn { background: var(--ac); border-color: var(--ac); }

/* ---- loading overlay + simple form field (blog AI helpers) ---- */
.spinner {
  position: fixed; inset: 0; z-index: 110; display: flex;
  align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--tx) 45%, transparent);
}
.spinner.hidden { display: none; }
.spinner i {
  display: block; width: 42px; height: 42px; border-radius: 50%;
  border: 3px solid var(--ln); border-top-color: var(--ac);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: block; margin-top: 10px; }
.field span {
  display: block; font-family: var(--font-mono); font-size: .7rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--tx2); margin-bottom: 6px;
}
.field input {
  width: 100%; font: 400 .95rem var(--font-sans); color: var(--tx);
  background: var(--bg); border: 1px solid var(--ln);
  border-radius: 9px; padding: 10px 12px;
}
.field input:focus { outline: 2px solid var(--ac); outline-offset: 1px; }
.modal-body { padding: 18px; overflow-y: auto; white-space: pre-wrap;
              color: color-mix(in srgb, var(--tx) 88%, var(--tx2)); }
.modal-foot { padding: 14px 18px; border-top: 1px solid var(--ln); display: flex; justify-content: flex-end; }

/* ---- footer ---- */
.sitefoot { margin-top: 64px; border-top: 1px solid var(--ln); background: var(--bg2); }
.sitefoot .wrap {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  align-items: center; padding-top: 22px; padding-bottom: 22px;
  font-family: var(--font-mono); font-size: .7rem; color: var(--tx2);
}
.sitefoot a { color: var(--tx2); text-decoration: none; }
.sitefoot a:hover { color: var(--ac); }

/* ---- products catalogue (/products/) ----
   One .listing per product: content on the left, spec panel on the right. */
.listing { display: grid; grid-template-columns: 1.45fr 1fr; gap: 0; padding: 0; overflow: hidden; }
.listing > .listing-main { padding: 26px 26px 24px; display: flex; flex-direction: column; gap: 14px; }
.listing > .listing-spec {
  padding: 26px 24px; background: var(--chip); border-left: 1px solid var(--ln);
  font-size: .9rem;
}
.listing-spec dl { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 10px; margin: 0; }
.listing-spec dt { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--tx2); padding-top: 3px; }
.listing-spec dd { margin: 0; color: var(--tx); }
.listing-spec .avail { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--ln); }
.listing-main h3 { font-family: var(--font-head); font-size: 1.35rem; letter-spacing: -.01em; }
.listing-main .who { color: var(--tx2); font-size: .92rem; }
.listing-main .who b { color: var(--tx); font-weight: 600; }
.listing + .listing { margin-top: 18px; }
@media (max-width: 760px) {
  .listing { grid-template-columns: 1fr; }
  .listing > .listing-spec { border-left: none; border-top: 1px solid var(--ln); }
}

/* handover package and process */
.package { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 8px; }
.package .card h3 { font-size: 1rem; margin-bottom: 6px; }
.package .card p { color: var(--tx2); font-size: .92rem; }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-top: 8px; }
.step { position: relative; padding: 22px 20px 20px 20px; border: 1px solid var(--ln); border-radius: var(--r); background: var(--bg2); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: block; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; color: var(--ac); margin-bottom: 10px;
}
.step h3 { font-size: 1rem; margin-bottom: 6px; }
.step p { color: var(--tx2); font-size: .92rem; }

/* faq */
.faq details { border-top: 1px solid var(--ln); padding: 14px 0; }
.faq details:last-child { border-bottom: 1px solid var(--ln); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--ac); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; color: var(--tx2); max-width: 70ch; }

/* print (sub-site pages) */
@page { margin: 14mm; }
@media print {
  .topbar, .sitefoot, .actions, .skip { display: none !important; }
  /* <details> is opened by site-nav.js on beforeprint; these keep the answer visible either way */
  .faq details, .faq details > * { display: block; }
  .faq summary::after { content: none; }
  .prose a[href^="http"]:not([href*="janaka.me"])::after {
    content: " (" attr(href) ")"; font-family: var(--font-mono); font-size: .8em; word-break: break-all;
  }
}

/* search (button injected by site-nav.js, overlay by assets/js/search.js) */
.topbar nav .searchbtn {
  padding: 0 10px; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; font-weight: 500;
  color: var(--tx2); display: inline-flex; align-items: center; gap: 7px;
}
.topbar nav .searchbtn:hover { color: var(--ac); }
.topbar nav .searchbtn kbd {
  font: inherit; font-size: .66rem; padding: 1px 5px; border: 1px solid var(--ln); border-radius: 5px; background: var(--chip);
}
@media (max-width: 760px) { .topbar nav .searchbtn kbd { display: none; } }
html.search-open { overflow: hidden; }
.search-overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center;
  padding: 10vh 16px 16px; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(6px);
}
.search-panel {
  width: 100%; max-width: 640px; max-height: 80vh; display: flex; flex-direction: column;
  background: var(--bg2); border: 1px solid var(--ln); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden;
}
.search-head { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--ln); }
.search-input {
  flex: 1; min-width: 0; height: 40px; padding: 0 12px; font: inherit; font-size: 1rem; color: var(--tx);
  background: var(--bg); border: 1px solid var(--ln); border-radius: 8px;
}
.search-input:focus { outline: 2px solid var(--ac); outline-offset: 1px; }
.search-close { width: 34px; flex: 0 0 auto; font-size: .9rem; }
.search-hint { padding: 8px 14px 0; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; color: var(--tx2); }
.search-results { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.search-hit {
  display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "sec title meta" "sec desc meta";
  column-gap: 12px; row-gap: 2px; align-items: baseline; padding: 10px 8px; border-radius: 8px; text-decoration: none; color: var(--tx);
}
.search-hit:hover, .search-hit:focus-visible { background: var(--chip); outline: none; }
.search-hit:focus-visible .search-title { color: var(--ac); }
.search-section {
  grid-area: sec; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ac); min-width: 5.5em; padding-top: 3px;
}
.search-title { grid-area: title; font-family: var(--font-head); font-weight: 700; font-size: .98rem; line-height: 1.3; }
.search-desc {
  grid-area: desc; font-size: .84rem; color: var(--tx2); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.search-meta { grid-area: meta; font-family: var(--font-mono); font-size: .7rem; color: var(--tx2); white-space: nowrap; }
@media (max-width: 520px) {
  .search-hit { grid-template-columns: 1fr auto; grid-template-areas: "sec meta" "title title" "desc desc"; }
  .search-section { min-width: 0; }
}

/* related (assets/js/related.js fills <div data-related class="sec">) */
[data-related] { padding-bottom: 0; }
.related-card { display: flex; flex-direction: column; gap: 8px; }
.related-card h3 { margin: 0; }
.related-card h3 a { color: var(--tx); text-decoration: none; }
.related-card h3 a:hover { color: var(--ac); }
.related-card .related-desc {
  font-size: .92rem; color: var(--tx2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.related-card .chips { margin-top: auto; padding-top: 4px; }
.related-grid { margin-bottom: 8px; }
@media print { .search-overlay, .searchbtn, [data-related] { display: none !important; } }

/* product home-screen thumbnail in the spec panel, and the flow lightbox */
.listing-body { display: grid; grid-template-columns: 1fr 124px; gap: 22px; align-items: start; }
.listing-body > div { display: flex; flex-direction: column; gap: 14px; }
.shot { display: block; width: 124px; text-decoration: none; text-align: center; }
.shot picture, .shot img { display: block; width: 100%; height: auto; }
.shot img { border-radius: 22px; border: 1px solid var(--ln); box-shadow: var(--shadow); background: var(--bg2); transition: transform .15s ease; }
.shot:hover img { transform: translateY(-2px); }
.shot-cap { display: block; margin-top: 8px; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ac); }
@media (max-width: 760px) { .listing-body { grid-template-columns: 1fr; } .shot { width: 120px; margin: 0 auto 4px; order: -1; } }
.lightbox { border: none; border-radius: var(--r); padding: 0; background: var(--bg2); color: var(--tx); max-width: min(96vw, 1400px); box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.lightbox::backdrop { background: color-mix(in srgb, var(--tx) 70%, transparent); backdrop-filter: blur(3px); }
.lightbox img { display: block; width: 100%; max-height: 82vh; object-fit: contain; background: #FAF8F5; }
.lightbox-cap { padding: 10px 16px 14px; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--tx2); }
.lightbox-close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--ln); background: var(--bg2); color: var(--tx); cursor: pointer; font-size: .9rem; }

/* ---- lab → ai → products trail (partials/ai-trail.html) ----
   Three linked panels; site-nav.js adds .active to the current section. */
.trail {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 22px;
  border: 1px solid var(--ln); border-radius: var(--r); background: var(--bg2);
  box-shadow: var(--shadow); overflow: hidden;
}
.trail a {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  padding: 22px 22px 20px; text-decoration: none; color: inherit;
  border-left: 1px solid var(--ln); transition: background .15s ease;
}
.trail a:first-child { border-left: none; }
.trail a:hover { background: color-mix(in srgb, var(--ac) 5%, var(--bg2)); }
.trail a.active { background: color-mix(in srgb, var(--ac) 8%, var(--bg2)); }
.trail a.active::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--ac); }
.trail .tstep {
  display: flex; justify-content: space-between; gap: 8px;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ac);
}
.trail .here { display: none; color: var(--tx2); letter-spacing: .1em; }
.trail a.active .here { display: inline; }
.trail h3 { font-family: var(--font-head); font-weight: 700; font-size: 1.08rem; letter-spacing: -.01em; margin: 2px 0 0; }
.trail p { color: var(--tx2); font-size: .92rem; }
.trail .go { margin-top: auto; padding-top: 8px; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ac); }
.trail a.active .go { visibility: hidden; }
@media (max-width: 760px) {
  .trail { grid-template-columns: 1fr; }
  .trail a { border-left: none; border-top: 1px solid var(--ln); }
  .trail a:first-child { border-top: none; }
  .trail a.active::after { width: 3px; height: auto; bottom: 0; right: auto; }
}

/* ---- /ai/ : the five products shipped with AI in the loop ---- */
.ship { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-top: 22px; }
.ship a { display: flex; flex-direction: column; gap: 8px; padding: 14px; text-decoration: none; color: inherit; }
.ship picture, .ship img { display: block; width: 100%; height: auto; }
.ship img { aspect-ratio: 360 / 900; object-fit: cover; object-position: top; border-radius: 18px; border: 1px solid var(--ln); background: var(--bg2); transition: transform .15s ease; }
.ship a:hover img { transform: translateY(-2px); }
.ship h3 { font-family: var(--font-head); font-weight: 700; font-size: 1rem; margin: 4px 0 0; }
.ship .pdom { margin-top: 0; }
.ship p { color: var(--tx2); font-size: .88rem; }
.ship .go { margin-top: auto; padding-top: 6px; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ac); }

/* a badge that is a link (products hero → /ai/) */
a.badge { text-decoration: none; }
a.badge:hover { border-color: var(--ac); color: var(--ac); }

/* ---- academy: release-by-release guides (Java 8→27, Spring + Spring AI) ---- */
.tablewrap { overflow-x: auto; }
.reltable { width: 100%; border-collapse: collapse; font-size: .92rem; }
.reltable th, .reltable td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--ln); vertical-align: top; }
.reltable th { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--tx2); font-weight: 500; }
.reltable tbody tr:last-child td { border-bottom: none; }
.reltable td:first-child { white-space: nowrap; font-weight: 600; }
.reltable td:first-child a { color: var(--ac); text-decoration: none; }
.reltable td:first-child a:hover { text-decoration: underline; }
.reltable td:nth-child(2) { white-space: nowrap; }
.reltable td:nth-child(2), .reltable td:nth-child(3) { color: var(--tx2); }
.reltable td:nth-child(3) { min-width: 9ch; }
.relnav { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.relnav a {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; text-decoration: none;
  color: var(--tx2); border: 1px solid var(--ln); border-radius: 999px; padding: 4px 10px; background: var(--bg2);
}
.relnav a:hover { color: var(--ac); border-color: var(--ac); }
.relnav a.lts { color: var(--ac); border-color: color-mix(in srgb, var(--ac) 40%, var(--ln)); font-weight: 500; }
.rel { padding-top: 56px; }
.rel-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; }
.rel-head h2 { margin-bottom: 0; }
.rel-head .when { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--tx2); }
.rel-head .badge { padding: 3px 9px; font-size: .66rem; }
.rel-head .totop { margin-left: auto; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--tx2); text-decoration: none; }
.rel-head .totop:hover { color: var(--ac); }
.rel-title { margin-top: 8px; font-family: var(--font-head); font-weight: 600; font-size: 1.12rem; letter-spacing: -.01em; color: var(--tx); }
.rel .chips { margin-top: 14px; }
.rel .rel-body { max-width: none; margin-top: 8px; }
.rel .rel-body > p { max-width: 76ch; }
.rel .rel-body pre { max-width: 960px; }
.rel .rel-body .aside-note { max-width: 76ch; }
.runline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.runline > span { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ac); }
.runline code { font-size: .82rem; }
.card .runline { margin-top: 8px; }
