/* ==========================================================================
   Omniya Concierge — /insights/ only. 11 October 2026.

   Loaded by the two insights templates and by nothing else (base.njk,
   `insightsAssets`). Every selector below is new and scoped to classes that
   appear only on those pages, so no existing page's rendering can change by
   loading it — and no existing page loads it.

   It is a composition on top of main.css, not a second design system: the
   brand tokens (--gold, --ink, --stone, --pearl, --measure), Montserrat at
   400/550, the .label, .h1/.h2/.h3, .lede, .btn, .textlink, .crumbs, .faq and
   .ctaband primitives are all reused from main.css. The only new ideas are
   editorial ones: a reading measure, a hero figure, the topic strip, the card
   grid and the contents rail.

   Reused rather than re-declared: brand tokens, type scale, focus ring, skip
   link, .container, .section/.section--pearl, .label, .lede, .h1/.h2/.h3,
   .btn*, .textlink, .crumbs/.crumbs--light, .faq disclosures, .ctaband.
   ========================================================================== */

:root {
  /* A narrower measure than .prose's 44em: long-form body copy reads better
     at 36em, which at this type size is roughly 70 characters a line. */
  --art-measure: 36em;
}

.visuallyhidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* A <button> that should read as the .textlink it sits beside. */
.textlink--button {
  background: none;
  border: 0;
  border-bottom: 1px solid var(--gold);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 550;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 0 0 0.35rem;
}

/* --------------------------------------------------------------------------
   Preview status. Draft preview only; a production build renders none of this,
   because it contains no unapproved guide. The copy is one short, readable
   line about approval status: no build flags, no template plumbing.
   -------------------------------------------------------------------------- */

.previewnote {
  margin-top: 1.75rem;
  padding: 0.85rem 1.25rem;
  border-left: 2px solid var(--gold-deep);
  background: var(--pearl);
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--muted-light);
  max-width: 44em;
}

.previewchip {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 550;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
  border: 1px solid var(--line-light);
  padding: 0.15rem 0.5rem;
}

/* --------------------------------------------------------------------------
   Illustrative-image caption. The generated hero images are AI-generated
   illustrations, not photographs of a patient, a clinician or a room, so the
   caption saying so sits with the image wherever the image is big enough to
   read it under.
   -------------------------------------------------------------------------- */

.insightfig__caption {
  margin-top: 0.7rem;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--muted-light);
}

/* ==========================================================================
   THE HUB — /insights/
   ========================================================================== */

/* Masthead: restrained, on white, with the gold hairline the hero uses rather
   than the hero's dark field. The section is editorial, not a sales page. */
.insightsmast {
  padding-block: clamp(2.75rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line-light);
}
.insightsmast__title { max-width: 22em; }
.insightsmast__lede { margin-top: 1.5rem; }

/* --- featured guide ------------------------------------------------------ */

.insightlead__section { padding-block: clamp(2.5rem, 5vw, 4rem); }

.insightlead {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  margin-top: 1.5rem;
}
/* 3/2 matches the generated variants (480x320, 960x640, 1536x1024) exactly,
   here and on the side items and the cards, so no image is cropped. */
.insightlead__media { margin: 0; }
.insightlead__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
}
.insightlead__topic { display: block; }
.insightlead__title { margin-top: 0.9rem; max-width: 20em; }
.insightlead__title a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.insightlead__title a:hover { border-bottom-color: var(--gold); }
.insightlead__standfirst { margin-top: 1.1rem; }
.insightlead__meta {
  margin-top: 1.1rem;
  font-size: 0.85rem;
  color: var(--muted-light);
}
.insightlead__go { margin-top: 1.6rem; }

/* Supporting guides beside the lead. Only rendered once the section is big
   enough that promoting two of them still leaves a list below (see
   src/_data/insights.js). */
.insightside {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line-light);
}
.insightside__media { margin: 0 0 1rem; }
.insightside__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
}
.insightside__title {
  font-size: 1.06rem;
  font-weight: 550;
  letter-spacing: 0.02em;
  margin-top: 0.7rem;
}
.insightside__title a { text-decoration-color: var(--gold); text-underline-offset: 0.2em; }

@media (max-width: 55rem) {
  .insightlead { grid-template-columns: minmax(0, 1fr); }
  .insightside { grid-template-columns: minmax(0, 1fr); }
}

/* --- filter and search toolbar -------------------------------------------
   `hidden` in the HTML and unhidden by insights-hub.js: neither control can
   filter a static page without that script. [hidden] needs the explicit
   display:none because the flex rule below would otherwise beat it.
   ------------------------------------------------------------------------- */

.insighttools[hidden] { display: none; }
.insighttools {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--line-light);
}
/* One scrolling strip, not a scrolling page: this element is the scroller and
   .topicnav inside it is width:max-content, so the buttons' intrinsic width
   stays inside the scroller instead of widening the document at 320/375. The
   body's overflow-x is untouched — clipping it would hide the symptom. */
.insighttools__topics {
  min-width: 0;
  flex: 1 1 24rem;
  overflow-x: auto;
  scroll-padding-inline: 0.6rem;
  -webkit-overflow-scrolling: touch;
}
.insighttools__search { flex: 0 1 18rem; min-width: 0; }

.insighttools__search .label { display: block; margin-bottom: 0.6rem; }
.insighttools__input {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line-light);
  padding: 0.7rem 0.9rem;
}
.insighttools__input:focus-visible { border-color: var(--gold-deep); }

.topicnav {
  list-style: none;
  display: flex;
  gap: 0.6rem;
  margin-top: 0.75rem;
  width: max-content;
  min-width: 100%;
}
.topicnav__item { min-width: 0; }
.topicnav__btn {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  white-space: nowrap;
  background: none;
  border: 1px solid var(--line-light);
  cursor: pointer;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 0.6rem 1rem;
  transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}
.topicnav__btn:hover { border-color: var(--gold); color: var(--gold-deep); }
.topicnav__btn[aria-pressed="true"] {
  border-color: var(--gold);
  background: var(--white);
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--gold);
}
.topicnav__count { position: relative; font-size: 0.68rem; color: var(--muted-light); }
.topicnav__btn[aria-pressed="true"] .topicnav__count { color: var(--gold-deep); }

/* --- the list ------------------------------------------------------------ */

.insightlist__head { margin-bottom: clamp(1.75rem, 3vw, 2.5rem); }
.insightlist__count {
  margin-top: 0.9rem;
  font-size: 0.88rem;
  color: var(--muted-light);
}
.insightlist__service { margin-top: 0.6rem; font-size: 0.88rem; }
.insightlist__service a { text-decoration-color: var(--gold); text-underline-offset: 0.2em; }

/* Desktop auto-fit fills short rows; tablet/mobile track counts remain explicit below. */
.insightgrid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.insightgrid[hidden] { display: none; }

.insightcard {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--line-light);
}
.insightcard[hidden] { display: none; }
.insightcard__media { margin: 0; }
.insightcard__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
}
.insightcard__body {
  padding: 1.5rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  flex: 1 1 auto;
}
.insightcard__topic { display: block; }
.insightcard__title {
  font-size: 1.06rem;
  font-weight: 550;
  letter-spacing: 0.02em;
  line-height: 1.35;
}
.insightcard__title a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.insightcard__title a:hover { border-bottom-color: var(--gold); }
.insightcard__excerpt { font-size: 0.95rem; color: var(--muted-light); }
.insightcard__meta {
  margin-top: auto;
  font-size: 0.8rem;
  color: var(--muted-light);
}

.insightgrid--related { background: transparent; }

@media (max-width: 62rem) {
  .insightgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 42rem) {
  .insightgrid { grid-template-columns: minmax(0, 1fr); }
}

.insightempty {
  border: 1px solid var(--line-light);
  background: var(--white);
  padding: clamp(2rem, 4vw, 3rem);
  text-align: center;
}
.insightempty[hidden] { display: none; }
.insightempty__text { font-size: 1.05rem; }
.insightempty p + p { margin-top: 1.5rem; }

/* ==========================================================================
   THE ARTICLE — /insights/<slug>/
   ========================================================================== */

/* Restrained masthead: on white, with the breadcrumb, the topic, the title,
   the standfirst and a one-line byline. No dark hero, no badge, no score. */
.artmast {
  padding-block: clamp(2.75rem, 6vw, 4.5rem) clamp(1.75rem, 3vw, 2.5rem);
}
.artmast__inner { max-width: 48rem; }
.artmast__topic { display: block; margin-bottom: 1rem; }
.artmast__title {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  max-width: 24em;
}
.artmast__standfirst { margin-top: 1.4rem; }
.artmast__byline {
  margin-top: 1.75rem;
  padding-left: 1rem;
  border-left: 2px solid var(--gold);
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--muted-light);
}
.artmast__byline a { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: 0.2em; }
.artmast__byline a:hover { color: var(--gold-dark); }

/* Hero figure. The generated images are 3:2 (480x320, 960x640, 1536x1024), so
   the box is 3/2 and the file is never cropped or stretched. It is held to the
   reading measure rather than the full container, so the article opens as one
   column rather than a banner. */
.arthero { margin: 0 0 clamp(1rem, 2vw, 2rem); }
.arthero__figure {
  margin: 0;
  max-width: 44rem;
}
.arthero__figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
}

.artwrap { padding-block: clamp(2rem, 4vw, 3.5rem) var(--space); }

.artgrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.artbody { min-width: 0; max-width: var(--art-measure); }

/* Body copy. Deliberately not .prose: the measure is narrower and the heading
   rhythm is a long-form one. */
.artbody p,
.artbody ul,
.artbody ol { margin-top: 1.15rem; }
.artbody h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  margin-top: 2.75rem;
  scroll-margin-top: 7rem;
}
.artbody h3 {
  font-size: 1.06rem;
  font-weight: 550;
  letter-spacing: 0.02em;
  margin-top: 1.9rem;
}
.artbody a { color: inherit; text-decoration-color: var(--gold); text-underline-offset: 0.2em; }
.artbody a:hover { color: var(--gold-dark); }
.artlist { padding-left: 1.2rem; }
.artlist li { margin-top: 0.5rem; }
.artlist li::marker { color: var(--gold-dark); }
.artsection:first-child h2 { margin-top: 0; }

/* Numbered citation into the Sources list. */
.cite {
  font-size: 0.72em;
  font-weight: 550;
  vertical-align: 0.4em;
  margin-left: 0.1em;
  text-decoration: none;
  color: var(--gold-deep);
}
.cite:hover { text-decoration: underline; }

/* The opening answer: the question the guide answers, answered first. */
.artkey {
  padding: 1.5rem 1.75rem;
  background: var(--pearl);
  border-left: 2px solid var(--gold);
  margin-bottom: 2.5rem;
}
.artkey .label { display: block; margin-bottom: 0.7rem; }
.artkey__text { font-size: 1.05rem; line-height: 1.8; }
.artkey__text a { text-decoration-color: var(--gold); text-underline-offset: 0.2em; }

.artnote {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line-light);
}
.artnote .label { display: block; margin-bottom: 0.6rem; }

/* Contents, narrow screens: a native disclosure, closed in the markup so a
   reader with no JavaScript gets the same closed state. */
.arttoc--inline {
  border-top: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
  margin-bottom: 2.5rem;
}
.arttoc--inline summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 2rem 1.1rem 0;
  position: relative;
  font-size: 0.72rem;
  font-weight: 550;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.arttoc--inline summary::-webkit-details-marker { display: none; }
.arttoc--inline summary::after {
  content: "";
  position: absolute;
  right: 0.3rem;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 1px solid var(--gold-dark);
  border-bottom: 1px solid var(--gold-dark);
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.25s ease;
}
.arttoc--inline[open] summary::after { transform: translateY(-50%) rotate(-135deg); }
.arttoc--inline ol { padding: 0 0 1.4rem 1.2rem; }
.arttoc--inline li { margin-top: 0.5rem; font-size: 0.95rem; }
.arttoc--inline li::marker { color: var(--gold-dark); }
.arttoc--inline a { text-decoration-color: var(--gold); text-underline-offset: 0.2em; }

/* End matter panels. */
.artpanel {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: clamp(2rem, 4vw, 2.5rem);
  border-top: 1px solid var(--line-light);
}
.artpanel > .h3 { margin-bottom: 1.25rem; }

.artfaq .faq { max-width: none; }

.artsources ol { padding-left: 1.2rem; }
.artsources li { margin-top: 0.7rem; font-size: 0.92rem; line-height: 1.7; }
.artsources li::marker { color: var(--gold-dark); }
.artsources a { text-decoration-color: var(--gold); text-underline-offset: 0.2em; }
.artsources__accessed { color: var(--muted-light); }

/* The author's real portrait sits beside his own name only. 880x1100 is the
   file's actual size, so the box matches it and the face is not squeezed into
   a square. */
.artauthors__person--withPortrait {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.artauthors__portrait { display: block; }
.artauthors__portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 880 / 1100;
  object-fit: cover;
}
.artauthors__detail { min-width: 0; }
@media (max-width: 36rem) {
  .artauthors__person--withPortrait { grid-template-columns: 4.25rem minmax(0, 1fr); gap: 1rem; }
}

.artauthors__person + .artauthors__person {
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line-light);
}
.artauthors__person .label { display: block; margin-bottom: 0.6rem; }
.artauthors__name { font-size: 1.06rem; font-weight: 550; letter-spacing: 0.02em; }
.artauthors__links { margin-top: 0.7rem; font-size: 0.9rem; line-height: 1.9; }
.artauthors__links a { text-decoration-color: var(--gold); text-underline-offset: 0.2em; }
.artauthors__status { margin-top: 0.7rem; font-size: 0.85rem; color: var(--muted-light); }

/* --- the rail ------------------------------------------------------------
   Sticky on desktop. Below 62rem the grid collapses and the rail moves under
   the body, where the sticky contents card is redundant: the inline
   disclosure above the body is the narrow-screen contents, so the rail's copy
   is hidden there rather than repeated.
   ------------------------------------------------------------------------- */

.artrail {
  position: sticky;
  top: 7rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.artrail__card {
  border: 1px solid var(--line-light);
  padding: 1.4rem 1.5rem;
}
.artrail__card .label { display: block; }
.artrail__toc ol { margin-top: 0.9rem; padding-left: 1.2rem; }
.artrail__toc li { margin-top: 0.5rem; font-size: 0.9rem; line-height: 1.55; }
.artrail__toc li::marker { color: var(--gold-dark); }
.artrail__toc a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.artrail__toc a:hover { border-bottom-color: var(--gold); }
.artrail__toc a.is-active { color: var(--gold-deep); border-bottom-color: var(--gold); }

.artrail__cta { background: var(--pearl); }
.artrail__ctaTitle { margin-top: 0.8rem; font-size: 1.02rem; font-weight: 550; }
.artrail__ctaTitle a { text-decoration-color: var(--gold); text-underline-offset: 0.2em; }
.artrail__ctaNote { margin-top: 0.6rem; font-size: 0.88rem; color: var(--muted-light); }
.artrail__btn { display: block; text-align: center; margin-top: 1.25rem; }

/* Desktop only: the inline disclosure is the narrow-screen contents. */
@media (min-width: 62.0625rem) {
  .arttoc--inline { display: none; }
}
@media (max-width: 62rem) {
  .artgrid { grid-template-columns: minmax(0, 1fr); }
  .artbody { max-width: var(--art-measure); }
  .artrail { position: static; top: auto; }
  /* The rail's contents card duplicates the inline disclosure here. */
  .artrail__toc { display: none; }
}
@media (max-width: 42rem) {
  .artbody { max-width: none; }
  .artmast__byline { overflow-wrap: anywhere; }
}

/* Text enlargement and narrow viewports: keep every word and action, the same
   foundation main.css sets for the rest of the site. */
.insightcard,
.insightlead,
.insightside__item,
.artbody,
.artrail { overflow-wrap: anywhere; }
.artrail .btn { white-space: normal; max-width: 100%; }
