/* ==========================================================================
   OSTERLEY ADVISERS
   Osterley_Web_Stylesheet_29Jul26_D1
   --------------------------------------------------------------------------
   Self-host all three faces before launch. No external requests anywhere in
   this build: Google Fonts and most public CDNs are unreliable or blocked in
   mainland China, which is half the audience.

   Inter      display   — open licence, self-host
   Calibri    body      — Microsoft licence. Carlito is metric-compatible and
                          open; serve Carlito and let Calibri win where present
   Cambria    wordmark  — Microsoft licence. Caladea is the metric-compatible
                          open equivalent
   ========================================================================== */

/* All three faces are served from this repository. Nothing loads from Google
   Fonts or any public CDN: those are unreliable or blocked in mainland China,
   which is half the audience. Keep it that way.

   Inter    display   — SIL Open Font Licence
   Carlito  body      — metric-compatible with Calibri, SIL OFL
   Caladea  wordmark  — metric-compatible with Cambria, SIL OFL

   Calibri and Cambria themselves are Microsoft-licensed and may not be served
   as webfonts. They are kept first in each stack so that any reader who has
   them installed sees the exact brand face; everyone else gets an identical
   metric substitute. */

@font-face { font-family:'Inter';   src:url('../fonts/Inter-Regular.woff2')  format('woff2'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'Inter';   src:url('../fonts/Inter-Medium.woff2')   format('woff2'); font-weight:500; font-style:normal; font-display:swap; }
@font-face { font-family:'Carlito'; src:url('../fonts/Carlito-Regular.woff2')format('woff2'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'Carlito'; src:url('../fonts/Carlito-Bold.woff2')   format('woff2'); font-weight:700; font-style:normal; font-display:swap; }
@font-face { font-family:'Caladea'; src:url('../fonts/Caladea-Regular.woff2')format('woff2'); font-weight:400; font-style:normal; font-display:swap; }

:root {
  --ink: #0E0F12;
  --red: #AE3C2A;
  --ground: #FAF8F5;
  --muted: #5A5A5A;
  --rule: #DCD6CE;
  --rule-soft: #EAE5DE;

  --display: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body: 'Calibri', 'Carlito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mark: 'Cambria', 'Caladea', Georgia, 'Times New Roman', serif;

  --measure: 70ch;
  --gutter: clamp(1.5rem, 4vw, 3.5rem);
  --rhythm: clamp(2.75rem, 4.5vw, 4.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1rem, 0.92rem + 0.42vw, 1.1875rem);
  line-height: 1.62;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

/* --- skip link ---------------------------------------------------------- */
/* Clipped rather than parked off-screen: a negative offset works in LTR but
   extends the scrollable area in RTL, which gave the Arabic pages an 11,000px
   horizontal scroll. */

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

.skip:focus {
  position: static;
  display: inline-block;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.75rem 1.25rem;
  overflow: visible;
  clip-path: none;
  background: var(--ink);
  color: var(--ground);
  z-index: 10;
}

/* --- shell -------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* --- masthead ----------------------------------------------------------- */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  padding-block: clamp(1.5rem, 3vw, 2.25rem);
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--mark);
  font-size: 1.1875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.wordmark__emblem {
  display: block;
  width: 1.375rem;
  height: 1.375rem;
  flex: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  font-family: var(--display);
  font-size: 0.78125rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
}
.nav a:hover { border-bottom-color: var(--red); }
.nav a[aria-current='page'] { color: var(--red); border-bottom-color: var(--red); }

/* --- type --------------------------------------------------------------- */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 1.2rem + 3.3vw, 3.5rem);
  line-height: 1.12;
  max-width: 22ch;
}

h2 {
  font-size: clamp(1.375rem, 1.1rem + 1.1vw, 1.875rem);
  line-height: 1.22;
  max-width: 26ch;
}

h3 {
  font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.375rem);
  letter-spacing: 0;
  line-height: 1.35;
}

p { margin: 0 0 1.15em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.lede {
  font-family: var(--display);
  font-size: clamp(1.0625rem, 0.98rem + 0.62vw, 1.5rem);
  line-height: 1.5;
  letter-spacing: -0.005em;
  max-width: 46ch;
}

.eyebrow {
  display: block;
  font-family: var(--display);
  font-size: clamp(0.6875rem, 0.66rem + 0.14vw, 0.8125rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.1rem;
}

.numeral {
  font-family: var(--display);
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  color: var(--red);
}

.note {
  font-size: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
  color: var(--muted);
  max-width: 54ch;
}

/* --- sections ----------------------------------------------------------- */

main { padding-block: calc(var(--rhythm) * 0.8) 0; }

.band { padding-block: 0 calc(var(--rhythm) * 0.55); }

.band + .band { border-top: 1px solid var(--rule-soft); padding-top: calc(var(--rhythm) * 0.55); }
/* a band following a pillar gets the same breathing room — without this its
   content sits hard against its own top rule */
.pillar + .band,
.band + .pillar { padding-top: calc(var(--rhythm) * 0.55); }

.stack > * + * { margin-top: 1.5rem; }

/* --- hero --------------------------------------------------------------- */

.hero { padding-bottom: calc(var(--rhythm) * 0.7); }

.hero h1 { max-width: 18ch; }

.hero__lede { margin-top: 2.25rem; }

/* --- corridor rule: the site's one repeated device ----------------------- */
/* A hairline that leaves the margin, turns, and returns. Same geometry as the
   programme-composition circuit in the How we work diagram.                 */

.corridor {
  display: block;
  width: 100%;
  height: 1.75rem;
  margin: 0 0 2.75rem;
  overflow: visible;
}
.corridor path { fill: none; stroke: var(--red); stroke-width: 1; }
.corridor circle { fill: var(--ground); stroke: var(--red); stroke-width: 1.5; }

/* --- columns ------------------------------------------------------------ */

.cols {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin-top: 2.75rem;
}

.cols p { max-width: none; }

.col__title {
  font-family: var(--display);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  margin: 0.7rem 0 0.85rem;
}

/* --- service pillars ---------------------------------------------------- */

.pillar { padding-block: calc(var(--rhythm) * 0.75) calc(var(--rhythm) * 0.6); }
.pillar:first-of-type { padding-top: 0; }

.pillar__head { border-top: 1px solid var(--rule); padding-top: 1.75rem; }

.pillar__intro { margin-top: 1.25rem; max-width: 52ch; }

.services {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  margin-top: 2.5rem;
}

.service h3 { margin-bottom: 1rem; }

.service ul { margin: 0; padding: 0; list-style: none; }

.service li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.7rem;
  font-size: clamp(0.9375rem, 0.9rem + 0.22vw, 1.0625rem);
  line-height: 1.6;
}
.service li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.7rem;
  height: 1px;
  background: var(--red);
}

.outcome {
  margin-top: 2rem;
  margin-bottom: 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule-soft);
  font-family: var(--display);
  font-size: clamp(0.9375rem, 0.9rem + 0.25vw, 1.125rem);
  color: var(--muted);
  max-width: 48ch;
}

/* --- method ------------------------------------------------------------- */

.stage { max-width: var(--measure); margin-bottom: 2.25rem; }
.stage h3 { margin: 0.5rem 0 0.6rem; }
.stage p { margin: 0; }

.composition {
  max-width: var(--measure);
  margin: 2.75rem 0;
  padding: 1.75rem 0 1.75rem 1.75rem;
  border-left: 1px solid var(--red);
}

.figure { margin: 3rem 0 0; }
.figure img { display: block; width: 100%; height: auto; }
.figure__mobile { display: none; }

@media (max-width: 40rem) {
  .figure__desktop { display: none; }
  .figure__mobile { display: block; }
}

figcaption {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* --- people ------------------------------------------------------------- */

.person {
  padding-top: 2.5rem;
  margin-top: 2.5rem;
  border-top: 1px solid var(--rule);
}

.person__intro {
  display: grid;
  grid-template-columns: minmax(0, 11.5rem) 1fr;
  gap: clamp(1.5rem, 3vw, 2.75rem);
  align-items: start;
}

.person__portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: grayscale(1);
}

@media (max-width: 40rem) {
  .person__intro { grid-template-columns: 1fr; }
  .person__portrait { max-width: 11rem; }
}

.person__name {
  font-family: var(--display);
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  letter-spacing: -0.01em;
  margin: 0 0 0.3rem;
}

.person__role {
  font-family: var(--display);
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.4rem;
}

.person__detail {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  margin-top: 1.75rem;
}

.person__detail h4 {
  font-family: var(--display);
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--muted);
  margin: 0 0 1rem;
}

.person__detail ul { margin: 0; padding: 0; list-style: none; }

.person__detail li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.7rem;
  font-size: clamp(0.9375rem, 0.9rem + 0.22vw, 1.0625rem);
  line-height: 1.6;
}
.person__detail li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.7rem;
  height: 1px;
  background: var(--red);
}

/* --- contact ------------------------------------------------------------ */

.contact__email {
  font-family: var(--display);
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.875rem);
  letter-spacing: -0.01em;
}
.contact__email a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--red);
  padding-bottom: 0.15rem;
}
.contact__email a:hover { color: var(--red); }

.offices {
  font-family: var(--display);
  font-size: 0.8125rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 2.5rem;
}

/* --- colophon ----------------------------------------------------------- */

.colophon {
  border-top: 1px solid var(--rule);
  margin-top: calc(var(--rhythm) * 0.7);
  padding-block: 2.25rem 3rem;
  font-size: clamp(0.875rem, 0.85rem + 0.15vw, 0.9688rem);
  color: var(--muted);
}

.colophon__row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  justify-content: space-between;
  align-items: baseline;
}

.colophon a { color: var(--muted); }
.colophon a:hover { color: var(--red); }

.colophon__offices {
  font-family: var(--display);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
}

.colophon__legal { margin-top: 1.75rem; max-width: 60ch; }

/* --- focus & motion ----------------------------------------------------- */

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* --- RTL: hooks for the Arabic tree ------------------------------------- */

[dir='rtl'] .service li,
[dir='rtl'] .person__detail li { padding-left: 0; padding-right: 1.35rem; }
[dir='rtl'] .service li::before,
[dir='rtl'] .person__detail li::before { left: auto; right: 0; }
[dir='rtl'] .composition {
  border-left: 0;
  border-right: 1px solid var(--red);
  padding-left: 0;
  padding-right: 1.75rem;
}

/* --- inlined diagram ----------------------------------------------------- */
/* Inlined rather than linked: an SVG loaded through <img> cannot use the
   page's webfonts or CSS variables, so it would fall back to Arial.          */

.dgm { display: block; width: 100%; height: auto; }
.dgm .dg { font-family: var(--display); }
.dgm--mobile { display: none; }

@media (max-width: 40rem) {
  .dgm--desktop { display: none; }
  .dgm--mobile  { display: block; max-width: 26rem; }
}

/* --- imagery: ink bands & duotone tiles --------------------------------- */
/* Full-bleed ink bands break the pale ground and give the site the deck's
   dark/light rhythm. The image is already ink-veiled at export, so white text
   sits safely over it; the gradient is a small extra guarantee on the left.  */

.inkband {
  position: relative;
  background: var(--ink);
  margin-block: calc(var(--rhythm) * 0.7) 0;
  overflow: hidden;
}
.inkband picture,
.inkband img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.inkband picture {
  position: absolute;
  inset: 0;
}
.inkband img { filter: grayscale(1); }

.inkband__text {
  position: relative;
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}
.inkband--tall { min-height: clamp(14rem, 26vw, 20rem); }
.inkband--tall picture { position: static; }
.inkband--tall img { height: clamp(14rem, 26vw, 20rem); }

.inkband__text h2 { color: var(--ground); max-width: 24ch; }
.inkband__text p {
  color: #D8D3CC;
  margin-top: 0.9rem;
  max-width: 46ch;
}
.inkband__rule {
  display: block;
  width: 3.25rem;
  height: 2px;
  background: var(--red);
  margin-bottom: 1.3rem;
}

/* left-side scrim so text stays legible whatever the image does underneath */
.inkband__text::before {
  content: '';
  position: absolute;
  inset: 0 30% 0 0;
  background: linear-gradient(90deg, rgba(14,15,18,0.75), rgba(14,15,18,0));
  pointer-events: none;
  z-index: -1;
}

/* duotone tiles that sit on the pale ground above a column or pillar */
.col__tile {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 11 / 7;
  object-fit: cover;
  filter: grayscale(1);
  margin-bottom: 1.4rem;
}

.cols--tiled { margin-top: 2.75rem; }

/* pillar header strip: wide and shallow, a band not a block */
.pillar__tile {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 32 / 7;
  object-fit: cover;
  filter: grayscale(1);
  margin-bottom: 1.75rem;
}

/* --- wider-team network device ------------------------------------------ */
.network {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  margin-top: 2.75rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--rule);
}
.network__col h4 {
  font-family: var(--display);
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--red);
  margin: 0 0 1.1rem;
}
.network__col ul { margin: 0; padding: 0; list-style: none; }
.network__col li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.7rem;
  font-size: clamp(0.9375rem, 0.9rem + 0.22vw, 1.0625rem);
  line-height: 1.6;
}
.network__col li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.7em;
  width: 0.7rem; height: 1px;
  background: var(--red);
}

/* --- representative-work credentials ------------------------------------ */
.creds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: clamp(2rem, 4vw, 3rem);
  margin-top: 2.75rem;
}
.cred {
  padding-top: 1.5rem;
  border-top: 2px solid var(--ink);
}
.cred__mark {
  display: block;
  width: 2.25rem; height: 2px;
  background: var(--red);
  margin-bottom: 1.25rem;
}
.cred p { font-size: 1.0625rem; line-height: 1.5; max-width: none; }
.cred__hold { color: var(--muted); font-style: italic; }

[dir='rtl'] .network__col li { padding-left: 0; padding-right: 1.35rem; }
[dir='rtl'] .network__col li::before { left: auto; right: 0; }

/* --- Chinese & Arabic --------------------------------------------------- */
/* Noto Sans SC is subsetted to exactly the characters used on the ZH pages —
   91KB in one file rather than 600KB across twenty unicode-range chunks.
   If the Chinese copy changes, the subset must be regenerated.             */

@font-face {
  font-family: 'Noto Sans SC';
  src: url('../fonts/NotoSansSC-subset.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Noto Sans Arabic';
  src: url('../fonts/noto-sans-arabic-arabic-400-normal.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Noto Sans Arabic';
  src: url('../fonts/noto-sans-arabic-arabic-500-normal.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}

html[lang^='zh'] {
  --display: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --mark: 'Cambria', 'Caladea', Georgia, serif;
  --measure: 40em;
}
html[lang^='zh'] body { line-height: 1.85; }
html[lang^='zh'] h1, html[lang^='zh'] h2 { letter-spacing: 0; line-height: 1.35; }
html[lang^='zh'] h1 { max-width: 20em; }
html[lang^='zh'] h2 { max-width: 22em; }
html[lang^='zh'] .lede { line-height: 1.75; max-width: 32em; }
html[lang^='zh'] .eyebrow,
html[lang^='zh'] .person__role,
html[lang^='zh'] .colophon__offices,
html[lang^='zh'] .offices { letter-spacing: 0.16em; }
/* CJK has no spaces, so break anywhere rather than overflow */
html[lang^='zh'] p, html[lang^='zh'] li { word-break: normal; overflow-wrap: anywhere; }

html[lang='ar'] {
  --display: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  --body: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  --mark: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  --measure: 38em;
}
html[lang='ar'] body { line-height: 1.9; }
html[lang='ar'] h1, html[lang='ar'] h2, html[lang='ar'] h3 { letter-spacing: 0; line-height: 1.45; }
html[lang='ar'] .lede { line-height: 1.8; max-width: 32em; }
/* Arabic has no case; uppercase transforms do nothing but letter-spacing
   breaks the joined script, so both are switched off. */
html[lang='ar'] .eyebrow,
html[lang='ar'] .numeral,
html[lang='ar'] .person__role,
html[lang='ar'] .colophon__offices,
html[lang='ar'] .offices,
html[lang='ar'] .nav,
html[lang='ar'] .wordmark,
html[lang='ar'] .person__detail h4,
html[lang='ar'] .network__col h4 {
  letter-spacing: 0;
  text-transform: none;
}
/* the wordmark stays Latin even on the Arabic pages */
html[lang='ar'] .wordmark span { font-family: 'Cambria', 'Caladea', Georgia, serif; letter-spacing: 0.14em; }

/* --- RTL layout --------------------------------------------------------- */

[dir='rtl'] .inkband__text::before {
  inset: 0 0 0 30%;
  background: linear-gradient(270deg, rgba(14,15,18,0.75), rgba(14,15,18,0));
}
[dir='rtl'] .cred { border-top-width: 2px; }
[dir='rtl'] .corridor { transform: scaleX(-1); }

/* --- language switcher -------------------------------------------------- */

[dir='rtl'] 
/* --- desktop layout ------------------------------------------------------ */
/* The narrow measure is right for reading, but on a wide screen it left two
   thirds of the row empty. Rather than stretch the text to an unreadable
   line length, the space is now used: the hero splits, and single-paragraph
   bands are set as statements rather than orphaned body copy. */

@media (min-width: 62rem) {

  /* hero: headline and lede side by side, baselines aligned */
  .hero:has(.hero__lede) {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    column-gap: clamp(3rem, 6vw, 6rem);
    align-items: end;
  }
  .hero:has(.hero__lede) h1 { max-width: 14ch; margin: 0; }
  .hero:has(.hero__lede) .hero__lede { margin-top: 0; max-width: 34ch; }
  .hero:has(.hero__lede) .eyebrow { grid-column: 1 / -1; }
  .hero:has(.hero__lede) .note { grid-column: 1 / -1; margin-top: 2.5rem; }

  /* a band holding one paragraph is a statement, not body text */
  .band.stack > p:only-child {
    font-family: var(--display);
    font-size: clamp(1.125rem, 0.98rem + 0.6vw, 1.45rem);
    line-height: 1.5;
    letter-spacing: -0.005em;
    max-width: 38ch;
  }

  /* two-paragraph bands sit side by side rather than stacking narrowly */
  .band.stack:has(> p:first-child:nth-last-child(2)) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: clamp(2.5rem, 5vw, 5rem);
    align-items: start;
  }
  .band.stack:has(> p:first-child:nth-last-child(2)) > * { margin-top: 0; }

  /* the corridor device spans the full shell, so give it room */
  .corridor { margin-block: 1rem 3.5rem; }
}

/* CJK and Arabic run wider per line, so pull the statement measure back */
html[lang^='zh'] .band.stack > p:only-child,
html[lang='ar'] .band.stack > p:only-child { max-width: 24em; line-height: 1.7; }
html[lang^='zh'] .hero:has(.hero__lede) h1,
html[lang='ar'] .hero:has(.hero__lede) h1 { max-width: 11em; }
html[lang^='zh'] .hero:has(.hero__lede) .hero__lede,
html[lang='ar'] .hero:has(.hero__lede) .hero__lede { max-width: 26em; }

/* --- language switcher --------------------------------------------------- */
/* All three sit in the masthead row rather than on a line of their own: it
   shows the reader every option at once, needs no JavaScript, and saves a
   whole row of vertical space on every page. */

.masthead__end {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 2rem;
}

.lang {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  padding-inline-start: 1.25rem;
  border-inline-start: 1px solid var(--rule);
}

.lang a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}
.lang a:hover { color: var(--ink); }
.lang a[aria-current='true'] {
  color: var(--ink);
  border-bottom-color: var(--red);
}
/* the CJK and Arabic labels need their own faces even on the English pages */
.lang a[lang='zh-Hans'] { font-family: 'Noto Sans SC', 'Inter', sans-serif; letter-spacing: 0.04em; }
.lang a[lang='ar'] { font-family: 'Noto Sans Arabic', 'Inter', sans-serif; letter-spacing: 0; }

@media (max-width: 52rem) {
  .lang {
    padding-inline-start: 0;
    border-inline-start: 0;
    width: 100%;
    padding-top: 0.35rem;
  }
}


/* the "Outcome:" label sits inside the outcome line */
.outcome strong { color: var(--ink); font-weight: 600; }
