/* ============================================================================
 * pages.css — small per-page tweaks, scoped by body class. Most layout lives
 * in sections.css; keep this file lean.
 * ==========================================================================*/

/* Home: give the hero visual a touch of breathing room on large screens */
@media (min-width: 1024px) {
  .p-home .hero-visual { margin-left: 12px; }
}

/* Home: the four-step journey (Bring it in / Lumina drafts / Review / Push back).
   Overrides the default three-column .loop grid. */
@media (min-width: 620px)  { .p-home .loop-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .p-home .loop-4 { grid-template-columns: repeat(4, 1fr); } }
.loop-node.n4 .ln-ic { background: linear-gradient(150deg, #49b2b6, #2f8a8e); }

/* Plays pages: tinted hero background per audience (set via body class) */
.p-play .play-hero { background:
  radial-gradient(1000px 520px at 0% -20%, var(--tint, rgba(24,104,219,.10)), transparent 60%),
  var(--surface); }
.p-play-qa    { --tint: rgba(24,104,219,.12); }
.p-play-teams { --tint: rgba(73,178,182,.12); }
.p-play-jira  { --tint: rgba(246,150,11,.12); }

/* Platform page: module section anchors clear the sticky header */
.p-platform .module-row { scroll-margin-top: calc(var(--header-h) + 24px); }
.module-row { display: grid; grid-template-columns: 1fr; gap: clamp(28px,5vw,56px); align-items: center; }
.module-row + .module-row { margin-top: var(--section-y); }
@media (min-width: 960px) {
  .module-row { grid-template-columns: 1fr 1fr; }
  .module-row.flip .module-copy { order: 2; }
}
.module-copy .module-head { display: flex; align-items: center; gap: 12px; margin-bottom: var(--s4); }
.module-copy h2 { font-size: var(--fs-h2); }

/* Resources: the STS ecosystem mark in the company block. The mark sits in the
   left of its 16/9 source, so the square crop holds to the left edge. */
.p-resources .res-brand { max-width: 460px; margin-inline: auto; }
.p-resources .res-brand img { object-position: 0% 50%; }
/* Resources: the two machine-written pointer blocks, Knowledge Center and
   What's new. Both carry lane-C people art that was composed for a full-width
   16/9 frame, so roughly half of each source is clear field on the left. In a
   half-width split column that dead space pushes the figure small and hard
   against the right edge, so the emitters mount the frame at 4/3 and steer the
   window right with --op. 4/3 keeps 75% of the source width and ALL of its
   height, so no figure is ever cut through.

   The rule is needed because .media-frame img sets object-fit but not
   object-position; .hero-split is the only other place --op is wired up, and
   these are not heroes. */
.p-resources .pointer-media img { object-position: var(--op, 100% 50%); }

.p-resources .res-brand-note {
  margin-top: var(--s4);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--ink-mute);
}

/* Policies page */
.p-policies .policy-layout { display: grid; grid-template-columns: 1fr; gap: var(--s7); }
@media (min-width: 900px) { .p-policies .policy-layout { grid-template-columns: 240px 1fr; align-items: start; } }
.policy-nav { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: 4px; }
.policy-nav button { text-align: left; padding: 12px 14px; border-radius: 10px; font-size: var(--fs-sm); font-weight: 700; color: var(--ink-mute); }
.policy-nav button.on { background: var(--blue-tint); color: var(--blue-deep); }
.policy-doc h2 { font-size: var(--fs-h3); margin: 0 0 6px; }
.policy-doc h3 { font-size: 1.125rem; margin: var(--s6) 0 8px; } /* base.css scroll-padding-top already clears the sticky header */
.policy-doc p { margin-bottom: var(--s4); color: var(--ink-soft); }
.policy-doc .pmeta { font-size: var(--fs-xs); color: var(--ink-mute); font-weight: 600; margin-bottom: var(--s5); }
/* base.css strips list markers site-wide; a policy needs them back, and needs
   block layout (not flex) so the markers actually render. */
.policy-doc ul { list-style: disc; margin: 0 0 var(--s4); padding-left: 1.35em; color: var(--ink-soft); }
.policy-doc li { line-height: var(--lh-body); margin-bottom: 8px; }
.policy-doc li:last-child { margin-bottom: 0; }
.policy-doc code { font-family: var(--font-mono); font-size: 0.9em; background: var(--line-soft); border-radius: 5px; padding: 1px 5px; }
/* Per-policy jump links: plain anchors, no JS. */
.policy-toc { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 var(--s6); padding-bottom: var(--s5); border-bottom: 1px solid var(--line); }
.policy-toc a { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-mute); }
@media (pointer: coarse) {
  /* In-policy jump links: 24px rows in a wrapped list. */
  .policy-toc a { display: inline-flex; align-items: center; min-height: 44px; }
}
.policy-toc a:hover { color: var(--blue-deep); }
.policy-toolbar { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--line); }
.policy-toolnote { font-size: var(--fs-sm); font-weight: 700; color: var(--green-deep); }

/* ---------------------------------------------------------------------------
 * Pricing page — three plan cards, the shared capability list, and the
 * resource-pack tables. Figures come from the TechnoCenter Pricing Guide 2026;
 * the page reproduces that model and adds nothing to it.
 * ------------------------------------------------------------------------- */
.p-pricing .play-hero h1 { max-width: 16ch; margin-inline: auto; }
/* The plan cards ARE the hero content here, so close the usual gap. */
.p-pricing .play-hero { padding-bottom: var(--s6); }
.p-pricing #plans { padding-top: var(--s8); }

.plan-grid { display: grid; grid-template-columns: 1fr; gap: var(--s5); align-items: stretch; }
@media (min-width: 900px) { .plan-grid { grid-template-columns: repeat(3, 1fr); gap: var(--s4); } }

.plan {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px 24px; box-shadow: var(--shadow-sm);
}
/* The recommended tier earns weight, not a different shape — the three cards
   stay aligned so the figures remain directly comparable. */
.plan--featured { border: 2px solid var(--blue); box-shadow: var(--shadow-bento); padding-top: 27px; }
.plan__flag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--blue); color: #fff; white-space: nowrap;
  font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.02em;
  padding: 5px 14px; border-radius: var(--r-pill);
}
.plan__name { font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-mute); }
.plan__price {
  font-family: var(--font-display); font-size: clamp(2.6rem, 1.9rem + 2.4vw, 3.4rem);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; color: var(--ink); margin: 10px 0 6px;
}
.plan__price--word { font-size: clamp(2rem, 1.5rem + 1.6vw, 2.6rem); }
@media (min-width: 900px) {
  /* Fixed box + bottom alignment so a word price and a numeral price share
     one baseline, keeping meta, description and CTA aligned across cards. */
  .plan__price { min-height: 3.6rem; display: flex; align-items: flex-end; margin-bottom: 8px; }
  .plan__meta { min-height: 2.6em; }
}
.plan__cur { font-size: 0.5em; font-weight: 600; vertical-align: 0.55em; margin-right: 2px; color: var(--ink-mute); }
.plan__meta { font-size: var(--fs-sm); font-weight: 700; color: var(--ink-soft); margin-bottom: var(--s4); }
.plan__who { font-size: var(--fs-sm); line-height: 1.5; color: var(--ink-mute); margin-bottom: var(--s5); }
@media (min-width: 900px) { .plan__who { min-height: 4.5em; } }
.plan .btn-block { margin-bottom: var(--s6); }

.plan__packname {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-soft); padding-top: var(--s5); border-top: 1px solid var(--line); margin-bottom: var(--s4);
}
/* Lumina keeps the brand purple it carries everywhere else on the site. */
.plan__lumina {
  background: var(--purple-tint); color: var(--purple-deep);
  border-radius: var(--r-pill); padding: 3px 10px; letter-spacing: 0.08em;
}
.plan__list { display: flex; flex-direction: column; gap: 9px; }
.plan__list li {
  position: relative; padding-left: 26px;
  font-size: var(--fs-sm); line-height: 1.45; color: var(--ink-soft);
}
.plan__list li::before {
  content: ''; position: absolute; left: 0; top: 3px; width: 16px; height: 16px;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f8d1d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>") center / contain no-repeat;
}
.plan__ref { color: var(--blue-deep); font-weight: 800; }
.plan__foot { margin-top: var(--s5); max-width: none; text-align: center; font-size: var(--fs-xs); color: var(--ink-mute); }
.plan__foot a { color: var(--ink-mute); text-decoration: underline; }
.plan__foot a:hover { color: var(--blue-deep); }

/* Shared capability list — every plan gets these, so they read as one set
   rather than three repeated columns. */
.every-list { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 900px; margin-inline: auto; }
.every-list li {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 8px 16px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-soft);
}
.every-note { margin-top: var(--s6); text-align: center; font-size: var(--fs-sm); color: var(--ink-mute); max-width: 62ch; margin-inline: auto; }

/* Tables scroll inside their own box; the page body never scrolls sideways. */
.table-scroll { overflow-x: auto; margin: var(--s5) 0; -webkit-overflow-scrolling: touch; }
.price-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 520px; background: #fff; }
.price-table--wide { min-width: 720px; }
.price-table th, .price-table td { text-align: left; padding: 11px 14px; border: 1px solid var(--line); vertical-align: top; }
.price-table thead th { background: var(--surface-2); font-weight: 800; font-size: var(--fs-xs); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); }
.price-table tbody th { font-weight: 700; color: var(--ink); background: var(--surface); }
.price-table td { color: var(--ink-soft); }
.price-table__sub { display: block; font-size: var(--fs-xs); font-weight: 500; color: var(--ink-mute); margin-top: 2px; }
.price-table__total th, .price-table__total td { background: var(--blue-tint); color: var(--blue-deep); font-weight: 800; }

/* With JS off, policies.js cannot switch panels: the four policies would
   collapse to Privacy and every deep link (policies.html#terms is linked from
   the footer of all 13 pages) would land on the wrong one. Show all four as a
   single document instead — each panel carries an id, so fragment navigation
   then works natively — and drop the tab strip, which does nothing without JS. */
html:not(.js) .policy-doc [data-policy-panel][hidden] { display: block !important; }
html:not(.js) .policy-nav,
html:not(.js) .policy-toolbar { display: none; }

@media print {
  .site-header, .site-footer, .cookie-banner, .floating-contact, .policy-nav, .policy-toolbar, .nav-overlay, .mobile-drawer { display: none !important; }
  body { background: #fff; }
  .policy-doc [data-policy-panel] { display: block !important; page-break-after: always; }
}

/* ---------------------------------------------------------------------------
 * PRODUCT DOCUMENTS (.p-docs)
 *
 * One page, every document, one visible at a time and addressed by #slug. The
 * switcher shape is lifted wholesale from .p-policies above: a sticky rail of
 * plain buttons, `hidden` as the mechanism, aria-current as the state. Keeping
 * them structurally identical is deliberate — one pattern to reason about, and
 * the JS-off and print escapes work the same way in both.
 * ------------------------------------------------------------------------- */
.p-docs .story-head { padding-bottom: var(--s7); }
.p-docs .story-stage { padding-top: 0; }
.crumbs {
  font-size: var(--fs-sm);
  color: var(--ink-mute);
  margin-bottom: var(--s5);
}
.crumbs span[aria-hidden] { margin: 0 6px; color: var(--ink-faint); }
.p-docs .doc-subhead {
  font-size: var(--fs-h3);
  margin: var(--s8) 0 var(--s4);
}

/* The rail. Sticky beside the stage from 1024px, a chooser above it below that.
   1024 and not 900 like .policy-layout, even though the shape is copied from it:
   a policy is reflowable text that reads fine in a 554px column, but the frame
   here has a 600px floor — the story's own nav row needs ~530px for the 13 dots
   on Importing your test cases. At 900px the frame was 554px wide, and going
   from 899 to 900 cost it 42% of its area for one pixel of viewport.
   minmax(0, 1fr), not 1fr: the track must not be widened by its content. Same
   pairing as .widget below. */
.p-docs .doc-layout { display: grid; grid-template-columns: 1fr; gap: var(--s7); }
@media (min-width: 1024px) {
  .p-docs .doc-layout { grid-template-columns: 260px minmax(0, 1fr); align-items: start; }
}
/* Two jobs for one number. It holds the frame clear of 940-1000px, the band
   where the story's own max-width:960px (980px on Plans and pricing) fires and
   the stepper, the lifecycle strand and the cover slide triple in height — so
   the story keeps ONE internal layout at every viewport and never jumps. And it
   holds the prose beside it to a readable measure once the rail is gone. */
.p-docs .doc-stage { max-width: 900px; }
.doc-nav { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: 4px; }
.doc-nav button {
  text-align: left;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink-mute);
  line-height: 1.3;
}
.doc-nav button.on { background: var(--blue-tint); color: var(--blue-deep); }
/* This line carries what the document is for, not a count, so it is a sentence
   fragment and not mono meta — and it has to wrap readably in a 260px rail. */
.doc-nav button small {
  display: block;
  margin-top: 3px;
  font-size: var(--fs-xs);
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink-mute);
}
.doc-nav button.on small { color: var(--blue-deep); opacity: 0.75; }

@media (max-width: 1023.98px) {
  /* Above the stage, and not sticky: below the rail breakpoint the rail's grid
     area is its own height, so sticky has no travel and does nothing. It was
     four full-width buttons, ~250px, that a reader scrolled past to reach the
     document. Switching one scrolls back to the stage, so a chooser above it is
     still where you left it.
     Two explicit columns rather than auto-fit minmax: there are exactly four
     items, and auto-fit lands on three tracks around 660-780px, leaving a
     ragged 3 + 1. */
  .doc-nav {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-width: 900px;
    padding-bottom: var(--s5);
    border-bottom: 1px solid var(--line);
  }
}
@media (max-width: 559.98px) {
  /* One column, and the purpose lines go: four rows a thumb can hit, rather
     than four three-line cards to scroll past before the document. */
  .doc-nav { grid-template-columns: 1fr; }
  .doc-nav button small { display: none; }
}
@media (pointer: coarse) {
  .doc-nav button { min-height: 44px; }   /* was 40px once small is hidden */
}

/* The panel. h2 carries the document's own title, so it needs the spacing a
   .section-head would otherwise give it. */
.doc-panel > h2 { font-size: var(--fs-h2); margin: 0 0 var(--s3); }
.doc-panel > .lead { margin-bottom: var(--s3); }
.doc-panel + .doc-panel { margin-top: var(--s9); }

/* JS off: no switcher, so show every document rather than one. Same contract as
   .policy-doc — without this the rail would be inert and only one document
   would ever be reachable. */
html:not(.js) .doc-nav { display: none; }
html:not(.js) .doc-stage [data-doc-panel][hidden] { display: block !important; }

/* ---------------------------------------------------------------------------
 * NEWSLETTERS (.p-news)
 *
 * The rail sits ABOVE the stage, not beside it, which is why this is not a copy
 * of .doc-layout: a cover flow's whole affordance is horizontal width, and a
 * 260px sticky rail would take a third of it. minmax(0, 1fr) for the reason
 * recorded on .doc-layout — the track must not be widened by its content.
 * ------------------------------------------------------------------------- */
.p-news .news-stage { padding-bottom: var(--s7); }
.p-news .news-viewer { padding-top: var(--s8); }
.p-news .news-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s5);
  /* The region takes focus when a cover is committed with Enter, so it must
     clear the sticky header when it is scrolled to. */
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.p-news .news-detail:focus { outline: none; }   /* :focus-visible still fires */
.p-news .news-detail__head { max-width: 62ch; }
.p-news .news-detail__head h2 { font-size: var(--fs-h2); margin: 0 0 4px; }

/* JS off: the covers are still links, and they still go somewhere useful —
   each href is that issue's archive entry, which carries the title, date,
   blurb, Open and Download as real HTML. So the rail STAYS, as a plain
   scroll-snap strip, and only the controls that need JS are dropped. Same
   contract as html:not(.js) .doc-nav above, but applied to the rail rather
   than hiding it: there is no second list to fall back to, because the archive
   IS the list. Duplicates the flat-mode geometry from sections.css because a
   media query cannot be combined with an html:not(.js) ancestor condition. */
html:not(.js) .cf { --cf-flat: 1; }
html:not(.js) .cf__arrow { display: none; }
html:not(.js) .cf__viewport {
  height: auto;
  perspective: none;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 50%;
  overscroll-behavior-x: contain;
  padding-block: var(--s3);
}
html:not(.js) .cf__track {
  position: static;
  inset: auto;
  display: flex;
  gap: var(--s5);
  transform: none;
  transform-style: flat;
  padding-inline: 50%;
}
html:not(.js) .cf__cell {
  position: static;
  left: auto; top: auto;
  margin: 0;
  flex: 0 0 var(--cf-w);
  scroll-snap-align: center;
}
html:not(.js) .cf__cap { opacity: 1; }

@media print {
  /* The archive is the printable artefact: every issue, with its date, its
     blurb and a resolvable URL. The coverflow and the frame print as noise. */
  .p-news .cf, .p-news .news-viewer { display: none !important; }
  .p-news .news-card__acts a[href]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}
