/* ============================================================
   Sky Header · inner pages for the s3eliteai.org facelift (one of three versions).
   The closest carry of the approved homepage: every page opens on a shorter band of the homepage's own sky with the
   title on its hero plate, then runs the homepage's section rhythm (/0N labels, station panels, mini-screens, the
   leadership plate, the closing plate). The three document pages get a slimmer band and one reading column.
   Loaded after orbit-path/style.css and kit/chrome.css. Tokens only, from orbit-path/style.css; no hex, no new hue.
   ============================================================ */

/* ---------- the sky band ---------- */
.sh-sky-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 2rem; align-items: center; }
.sh-sky-grid > .page-plate { grid-column: 2; }
.sh-sky .lede { margin-bottom: 0; }
.sh-sky .page-plate > :last-child { margin-bottom: 0; }
/* About and Services: the band is a little over half of a 1440 x 900 first screen, tall enough to hold the whole ring */
.page-sky.sh-sky--sun { min-height: clamp(480px, 60vh, 580px); display: flex; align-items: center; }
.sh-sky--sun > .wrap { width: 100%; }

/* The plain star inside one ring, where the homepage keeps its lockup: the live About and Services pages carry this star
   as their decoration (brief, constraint 2), so the band reads as the homepage's hero, shortened. Still, never moves. */
.sh-sun { position: absolute; inset: 0; --sun-x: 24%; --sun-y: calc(50% + var(--nav-h) / 2); --sun-w: min(23vw, 320px); }
.sh-sun-ring {
  position: absolute; left: var(--sun-x); top: var(--sun-y); width: calc(var(--sun-w) * 1.6); height: calc(var(--sun-w) * 1.16);
  transform: translate(-50%, -50%); overflow: visible;
}
/* the homepage's ring (style.css 442): non-scaling, so the stretched viewBox keeps the stroke thin */
.sh-sun-ring ellipse { fill: none; stroke: var(--path); stroke-width: 1.5px; opacity: 0.8; vector-effect: non-scaling-stroke; }
.sh-sun-img {
  position: absolute; left: var(--sun-x); top: var(--sun-y); width: var(--sun-w); height: auto;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 22px var(--glow)) drop-shadow(0 0 70px var(--glow));
}
/* the icy star on the dark sky, the navy star on the light one, as the lockup swaps (main.js 22-29) */
.sh-on-light { display: none; }
html[data-theme="light"] .sh-on-dark { display: none; }
html[data-theme="light"] .sh-on-light { display: block; }
/* light sky: the homepage's lit halo behind its lockup (style.css 202-207), so the navy star sits on clear sky */
html[data-theme="light"] .sh-sun::before {
  content: ""; position: absolute; left: var(--sun-x); top: var(--sun-y);
  width: calc(var(--sun-w) * 1.7); aspect-ratio: 1 / 0.8; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--white) 90%, transparent) 0%, color-mix(in srgb, var(--white) 66%, transparent) 36%, transparent 100%);
}

/* The slim band of the document pages: about a third of the first screen, with the plate overlapping its lower edge so
   the reading starts high. The ground is a fixed-height band, not the full section, so the plate's lower half sits on
   the page ground. */
/* overflow visible so the plate's shadow is not cut off in a hard line where the section ends (seen in light, v1) */
/* critic r1 D1: a 96px offset left a seam of sky, not a band. The plate now starts a fifth of the screen below the nav,
   and the ground ends 48px under the plate's top, so the overlap is the phone hero's and the rest of the plate is on
   the page ground. */
.page-sky.sh-sky--slim { --sh-slim-sky: clamp(150px, 22vh, 210px); padding-top: calc(var(--nav-h) + var(--sh-slim-sky)); padding-bottom: 0; overflow: visible; }
.sh-sky--slim .page-sky-ground { bottom: auto; height: calc(var(--nav-h) + var(--sh-slim-sky) + 48px); }
.sh-doc-plate { max-width: 64rem; margin-inline: auto; }
.sh-doc-plate .page-title { font-size: min(clamp(2.2rem, calc(4vw * var(--ts)), 4.2rem), 13cqw); margin-bottom: 0.3em; }
.sh-doc-plate .lede { max-width: 62ch; }
/* The homepage's narrow-plate rule (style.css 461) sets the lede to a flat 1.05rem once the plate is under 32rem, which
   at 1440 is first true at 115% text, so the lede SHRANK when a reader asked for bigger text (statement check r2). The
   floor keeps the narrow rule's size as a minimum and lets the lede keep growing with --ts. */
@container (max-width: 32rem) {
  .page-plate .lede { font-size: max(1.05rem, min(1.3rem, calc(1.5vw * var(--ts)))); }
}

/* breadcrumb and date line under the title */
.sh-crumbs ol { list-style: none; margin: 0 0 0.6rem; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.5rem; font-family: var(--font-head); font-size: 0.86rem; letter-spacing: 0.04em; color: var(--text-dim); }
.sh-crumbs li { display: inline-flex; align-items: center; min-height: 24px; }
.sh-crumbs li + li::before { content: "/"; margin-right: 0.5rem; color: var(--text-dim); }
.sh-crumbs a { color: var(--label); display: inline-flex; align-items: center; min-height: 24px; }
.sh-crumbs [aria-current="page"] { color: var(--text); }
.sh-byline { font-family: var(--font-head); font-size: 0.86rem; letter-spacing: 0.04em; color: var(--text-dim); margin: 0 0 1rem; }

/* ---------- abbreviations (requirements gap 16) ---------- */
abbr[title] { text-decoration: underline dotted; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: help; }
:is(h1, h2, h3) abbr[title] { text-decoration: none; }

/* ---------- the homepage's section rhythm ---------- */
.sh-section { padding: clamp(1.5rem, 5vh, 3.2rem) 0; }
.sh-sky + .sh-section { padding-top: clamp(1rem, 3vh, 2rem); }
/* the station panel (style.css 491-496) as a reusable surface */
.sh-panel {
  position: relative; z-index: 2;
  background: var(--panel-solid); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.6rem); box-shadow: 0 24px 60px var(--plate-shadow);
}
.sh-panel h2, .sh-head h2 { font-size: clamp(1.8rem, calc(2.9vw * var(--ts)), 3.3rem); font-weight: 700; margin-bottom: 0.55em; overflow-wrap: break-word; }
.sh-panel .body:last-child, .sh-panel .sh-points:last-child { margin-bottom: 0; }

/* two panels in one row (About /01 and /02) */
.sh-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.25rem, 2.5vw, 2rem); align-items: stretch; }

/* a station: copy panel beside its sample screen, alternating sides down the page as the homepage's do */
.sh-station { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 4.5vw, 4rem); align-items: center; }
.sh-station.sh-flip > .sh-panel { order: 2; }
.sh-screen { margin: 0; position: relative; z-index: 2; min-width: 0; }

/* headline beside its paragraph inside one wide panel (Services /01 and /07) */
.sh-split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(1.25rem, 4vw, 3.5rem); align-items: center; }
.sh-split h2 { margin-bottom: 0; }
.sh-split-body { margin: 0; max-width: 46ch; }

/* the station bullets: each point hangs off a small orbit node (style.css 384), never a generic icon */
.sh-points { list-style: none; margin: 1.3rem 0 0; padding: 0; display: grid; gap: 0.85rem; max-width: 52ch; }
.sh-points li { position: relative; padding-left: 1.65rem; color: var(--text-dim); line-height: 1.55; }
.sh-points li::before {
  content: ""; position: absolute; left: 0; top: 0.42em; width: 0.72rem; height: 0.72rem; border-radius: 50%;
  border: 2px solid var(--path); background: var(--panel-solid); box-sizing: border-box;
}
.sh-points strong { color: var(--text); font-weight: 600; }

/* three cards inside the /01 panel, each with the nav's gradient bar on top (style.css 302-305) */
/* critic r1 D2: the tracks are sized in rem, which grows with --ts, so the row drops to two cards at larger text
   instead of squeezing three to 18 characters a line; three in a row at 100% on a wide screen */
.sh-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1rem; margin-top: clamp(1.5rem, 3vw, 2.4rem); }
.sh-card { position: relative; overflow: hidden; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 1.6rem 1.35rem 1.4rem; }
.sh-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad-cta); }
.sh-card h3 { font-size: clamp(1.25rem, calc(1.55vw * var(--ts)), 1.65rem); font-weight: 700; line-height: 1.12; margin: 0 0 0.65em; overflow-wrap: break-word; }
.sh-card p { margin: 0; color: var(--text-dim); line-height: 1.6; }

/* ---------- the team: the homepage's leadership plate for both people ---------- */
.sh-head { margin-bottom: clamp(1.25rem, 3vw, 2rem); }
.sh-head h2 { margin-bottom: 0; }
.sh-person { position: relative; z-index: 2; }
.sh-person + .sh-person { margin-top: clamp(1.25rem, 3vw, 2rem); }
.sh-person h3 { font-size: clamp(1.8rem, calc(3vw * var(--ts)), 3.4rem); font-weight: 700; margin-bottom: 0.5em; overflow-wrap: break-word; }
.sh-person .body { max-width: 60ch; }
.sh-person .stat { margin-bottom: 0; }
.sh-person.sh-flip { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
/* A shrink-wrapped column gives the lazy photo nothing to be 100% of, so it was 2px until it loaded and then pushed the
   page 306px mid-scroll (a11y officer r1, 2.4.7 at 400% zoom). A real width lets the img's own aspect ratio hold its
   height before the file arrives. */
.sh-person.sh-flip .leader-photo { order: 2; justify-self: end; width: min(100%, 380px); }
.sh-role { font-family: var(--font-head); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--label); margin: -0.2rem 0 1.1rem; }

/* ---------- the document pages: one reading column beside a sticky contents list ---------- */
.sh-doc { position: relative; z-index: 2; padding: clamp(1.5rem, 4vh, 2.5rem) 0 clamp(3rem, 8vh, 5rem); }
.sh-doc-grid { display: grid; grid-template-columns: 14rem minmax(0, 47.5rem); gap: 2.5rem; justify-content: center; align-items: start; }
.sh-toc-wrap { position: sticky; top: calc(var(--nav-h) + 1.25rem); }
.sh-toc {
  background: var(--panel-solid); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 1rem 0.55rem 0.8rem; box-shadow: 0 18px 44px var(--plate-shadow);
  max-height: calc(100vh - var(--nav-h) - 2.5rem); overflow-y: auto; overscroll-behavior: contain;
}
.sh-toc-title { font-family: var(--font-head); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--label); margin: 0 0 0.5rem; padding: 0 0.6rem; }
.sh-toc-toggle { display: none; }
.sh-toc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.1rem; }
.sh-toc-list a {
  display: flex; gap: 0.55rem; align-items: baseline; min-height: 24px; padding: 0.38rem 0.6rem;
  border-radius: var(--radius-sm); color: var(--text-dim); text-decoration: none; font-size: 0.9rem; line-height: 1.35;
  box-shadow: inset 2px 0 0 transparent;
}
.sh-toc-list a:hover { background: var(--chip-bg); color: var(--text); }
/* where the reader is: the label color bar on the left, the way the nav marks the current page with a bar */
.sh-toc-list a[aria-current="location"] { color: var(--text); background: var(--chip-bg); box-shadow: inset 2px 0 0 var(--label); }
.sh-toc-num { font-family: var(--font-head); font-weight: 600; font-size: 0.82rem; letter-spacing: 0.06em; color: var(--label); flex: none; min-width: 2.1em; }
/* No indent for the unnumbered entries: their headings are h2, the same level as the /0N headings, and an indent would
   tell the reader a nesting the page does not have (a11y officer r1, 1.3.1 advisory). */

.sh-doc-panel {
  background: var(--panel-solid); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.5rem, 3.6vw, 3.2rem); box-shadow: 0 24px 60px var(--plate-shadow); min-width: 0;
}
.sh-doc-section + .sh-doc-section { margin-top: 2.6rem; padding-top: 2.4rem; border-top: 1px solid var(--line); }
/* Long reading first: 1.1rem on 1.72 leading, full-strength text, about 70 characters a line */
/* labels, the contact name and the date line keep their own type; only running text takes the reading size */
.sh-doc-panel :is(p:not(.label, .contact-name, .sh-byline), li) { font-size: 1.1rem; line-height: 1.72; color: var(--text); max-width: 58ch; overflow-wrap: break-word; }
.sh-doc-panel p:not(.label) { margin: 0 0 1em; }
.sh-doc-panel h2 { font-size: clamp(1.55rem, calc(2.1vw * var(--ts)), 2.3rem); font-weight: 700; line-height: 1.1; margin: 0 0 0.7em; overflow-wrap: break-word; }
.sh-doc-panel h2 ~ h2 { margin-top: 1.9em; }
.sh-doc-panel h3 { font-size: clamp(1.2rem, calc(1.5vw * var(--ts)), 1.5rem); font-weight: 700; line-height: 1.2; margin: 1.8em 0 0.6em; }
.sh-doc-panel strong { color: var(--text); font-weight: 600; }
.sh-doc-panel .sh-points { max-width: 58ch; margin: 0 0 1.2em; gap: 0.7rem; }
.sh-doc-panel .sh-points li { color: var(--text); line-height: 1.65; }
.sh-doc-panel .sh-points li::before { top: 0.55em; }
.sh-doc-panel p.contact-name { margin: 1.2rem 0 0.7rem; color: var(--text-dim); }
.sh-doc-panel p.sh-chip-row { margin: 0 0 1.4rem; }
.sh-doc-panel .sh-doc-section > :last-child { margin-bottom: 0; }

/* ---------- phone and narrow tablet: everything stacks ---------- */
@media (max-width: 959px) {
  /* The homepage's phone hero (style.css 709-710): a band of sky, the plate overlapping its lower edge. The ground is a
     340 px band from the top of the page; the plate starts 48 px above its foot. */
  .page-sky.sh-sky--sun { padding-top: calc(var(--nav-h) + 216px); padding-bottom: 0; min-height: 0; display: block; }
  .sh-sky--sun .page-sky-ground { bottom: auto; height: 340px; }
  .sh-sun { --sun-x: 50%; --sun-y: calc(var(--nav-h) + 108px); --sun-w: min(46vw, 230px); }
  .sh-sky-grid { display: block; }
  .page-sky.sh-sky--slim { --sh-slim-sky: 140px; }

  .sh-pair, .sh-station, .sh-split, .sh-cards { grid-template-columns: minmax(0, 1fr); }
  .sh-station.sh-flip > .sh-panel { order: 0; }
  .sh-split { align-items: start; }
  .sh-panel { padding: 1.3rem 1.1rem; }
  .sh-card { padding: 1.3rem 1rem 1.1rem; }
  .sh-panel h2, .sh-head h2 { font-size: clamp(1.6rem, calc(7vw * var(--ts)), 2.4rem); }
  .sh-person.sh-flip { grid-template-columns: minmax(0, 1fr); }
  .sh-person.sh-flip .leader-photo { order: 0; justify-self: start; width: min(100%, 260px); }
  .sh-person h3 { font-size: clamp(1.6rem, calc(7vw * var(--ts)), 2.4rem); }

  .sh-doc-grid { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .sh-toc-wrap { position: static; }
  .sh-toc { max-height: none; overflow: visible; padding: 0.4rem; box-shadow: none; }
  .sh-toc-title { display: none; }
  /* the contents list folds into one button at the top of the column (the homepage's chip shape) */
  .sh-toc-toggle {
    display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; width: 100%; min-height: 44px;
    padding: 0.55rem 0.8rem; border: 0; border-radius: var(--radius-sm); background: transparent; cursor: pointer;
    font-family: var(--font-head); font-size: 0.86rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label);
  }
  .sh-toc-toggle::after {
    content: ""; width: 0.55rem; height: 0.55rem; flex: none; margin-right: 0.2rem;
    border: solid var(--label); border-width: 0 2px 2px 0; transform: translateY(-25%) rotate(45deg);
  }
  .sh-toc-toggle[aria-expanded="true"]::after { transform: translateY(25%) rotate(-135deg); }
  .sh-toc-toggle:hover { background: var(--chip-bg); }
  .sh-toc[data-js="on"]:not([data-open="true"]) .sh-toc-list { display: none; }
  .sh-toc-list { padding: 0.3rem 0 0.4rem; }
  .sh-doc-panel { padding: 1.4rem 1.1rem; }
  .sh-doc-panel :is(p:not(.label, .contact-name, .sh-byline), li) { font-size: 1.06rem; line-height: 1.68; }
  .sh-doc-plate .page-title { font-size: min(clamp(2rem, calc(8.4vw * var(--ts)), 3rem), 13cqw); }
}

/* A contents link lands its heading with the section's /0N label still in view above it, not under the nav */
.sh-doc-section > .label + h2 { scroll-margin-top: 2.6rem; }
