/* ==========================================================================
   NextOne Partners — site styles
   Brand colours are fixed below; the semantic tokens (--bg, --text, …) are
   what components use, so light and dark themes only redefine those.
   Page-specific styles live in assets/css/pages/<name>.css.
   ========================================================================== */

:root {
  /* Brand palette */
  --banyan: #1f4a3d;
  --banyan-deep: #163a30;
  --terracotta: #b8643c;
  --terracotta-deep: #9a4f2c;
  --marigold: #d9a05b;
  --ivory: #faf6ef;
  --sandstone: #f2eadf;
  --sand-line: #e4d7c4;
  --ink: #2a2622;
  --stone: #6b6158;

  /* Semantic tokens: light theme */
  --bg: var(--ivory);
  --bg-alt: var(--sandstone);
  --nav-hover: var(--sandstone);
  --surface: #fffdf9;
  --surface-sunk: #f6efe4;
  --line: var(--sand-line);
  --text: var(--ink);
  --muted: var(--stone);
  --heading: var(--banyan);
  --primary: var(--banyan);
  --primary-hover: var(--banyan-deep);
  --on-primary: var(--ivory);
  --accent: var(--terracotta);
  --accent-text: var(--terracotta-deep);
  /* Accent fill behind small light text: darker in the light theme so it reaches 4.5:1 */
  --accent-strong: var(--terracotta-deep);
  --panel: var(--banyan);
  --panel-deep: var(--banyan-deep);
  --on-panel: var(--ivory);
  --on-panel-muted: rgba(250, 246, 239, 0.78);
  --panel-accent: #e3b273;
  --footer-bg: var(--banyan-deep);
  --header-bg: rgba(250, 246, 239, 0.9);
  /* Logo: the symbol, name and Partners follow the heading colour; the rule under the name is
     the one accent (Terracotta here, Marigold on dark) */
  --logo-ink: var(--heading);
  --logo-rule: var(--terracotta);
  --focus: var(--terracotta);
  /* Form field outlines: at least 3:1 against the card and the field fill */
  --field-line: #948675;
  --shadow: 0 1px 2px rgba(42, 38, 34, 0.04), 0 8px 24px rgba(42, 38, 34, 0.06);
  --shadow-lg: 0 2px 4px rgba(42, 38, 34, 0.05), 0 18px 48px rgba(42, 38, 34, 0.1);
  color-scheme: light;

  /* Type */
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --container: 1120px;
  --narrow: 760px;
  --gutter: 24px;
  --radius: 14px;
  --radius-sm: 8px;
  --header-h: 72px;
}

/* Dark theme: follows the device unless the visitor picked a theme */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121a17;
    --bg-alt: #17221e;
    --nav-hover: #2d3d36;
    --surface: #1c2924;
    --surface-sunk: #15201c;
    --line: #2d3d36;
    --text: #ebe4d8;
    --muted: #a99f92;
    --heading: #f1e7d6;
    --primary: #d9a05b;
    --primary-hover: #e6b273;
    --on-primary: #1a1612;
    --accent: #d98a5e;
    --accent-text: #e3a27c;
    --accent-strong: #d98a5e;
    --panel: #1f4a3d;
    --panel-deep: #163a30;
    --footer-bg: #0d1411;
    --header-bg: rgba(18, 26, 23, 0.88);
    --logo-rule: var(--marigold);
    --focus: #d9a05b;
    --field-line: #66786f;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 18px 48px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121a17;
  --bg-alt: #17221e;
  --nav-hover: #2d3d36;
  --surface: #1c2924;
  --surface-sunk: #15201c;
  --line: #2d3d36;
  --text: #ebe4d8;
  --muted: #a99f92;
  --heading: #f1e7d6;
  --primary: #d9a05b;
  --primary-hover: #e6b273;
  --on-primary: #1a1612;
  --accent: #d98a5e;
  --accent-text: #e3a27c;
  --accent-strong: #d98a5e;
  --panel: #1f4a3d;
  --panel-deep: #163a30;
  --footer-bg: #0d1411;
  --header-bg: rgba(18, 26, 23, 0.88);
  --logo-rule: var(--marigold);
  --focus: #d9a05b;
  --field-line: #66786f;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 18px 48px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.25s, color 0.25s;
}

img,
svg,
video,
iframe {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  color: var(--heading);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
  font-optical-sizing: auto;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  line-height: 1.05;
}
h2 {
  font-size: clamp(2rem, 3.6vw, 2.9rem);
}
h3 {
  font-size: 1.4rem;
}
h4 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--heading);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}
/* On the dark green surfaces a light ring, so it keeps 3:1 against them in both themes */
.panel,
.quote,
.cta-band,
.site-footer {
  --focus: var(--panel-accent);
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container.narrow {
  max-width: calc(var(--narrow) + 2 * var(--gutter));
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--primary);
  color: var(--on-primary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
}
.skip-link:focus {
  left: 8px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Keeps a short phrase on one line, e.g. <span class="nowrap">20–25</span> */
.nowrap {
  white-space: nowrap;
}

.muted {
  color: var(--muted);
}
.small {
  font-size: 0.9rem;
}
.center {
  text-align: center;
}

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font: 500 0.95rem/1 var(--font-sans);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}
.btn-primary:hover {
  background: var(--primary-hover);
  color: var(--on-primary);
}
.btn-ghost {
  border-color: var(--line);
  color: var(--heading);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--heading);
  color: var(--heading);
}
.btn-light {
  background: var(--ivory);
  color: var(--banyan);
}
.btn-light:hover {
  background: #fff;
  color: var(--banyan);
}
.btn-sm {
  padding: 9px 16px;
  font-size: 0.88rem;
}
.btn svg {
  width: 16px;
  height: 16px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  text-decoration: none;
}
/* The arrows are decorative: empty alt text after the "/", so screen readers skip them (the
   first line is the fallback for browsers without alt text) */
.link-arrow::after {
  content: "→";
  content: "→" / "";
  transition: transform 0.2s;
}
.link-arrow:hover::after {
  transform: translateX(3px);
}
.link-arrow.external::after {
  content: "↗";
  content: "↗" / "";
}

.eyebrow {
  font: 600 0.75rem/1.2 var(--font-sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 1.1em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: 500 0.86rem/1.2 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.chip:hover {
  border-color: var(--heading);
  color: var(--heading);
}
.chip[aria-pressed="true"],
.chip.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}
.chip .count {
  opacity: 0.7;
  font-size: 0.75rem;
}
.chip[aria-pressed="true"] .count,
.chip.is-active .count {
  opacity: 0.85;
}

.tag {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Separated runs: ".meta" (Section · 12 Oct 2026 · 5 min read), the breadcrumbs (Home / Insights),
   the footer's last line (© year NextOne Partners · Privacy · Terms) and any ".sep-run" (a book
   note's "Title · by Author"; set --sep, --sep-w and --sep-clip to change it).
   Every item has a left padding of one separator's width (--sep-w) with its separator in it; the
   run is pulled left by the same width and its left edge is clipped. So the separator of whichever
   item starts a line, the first item or one that wrapped, is hidden and no line starts with a
   stray "·" or "/"; an item whose own text wraps keeps its later lines clear of the clip (such an
   item always starts its line, so its separator, centred on the item's height, is hidden). The
   separators are decorative: the @supports rule below gives them empty alt text (after the "/")
   where browsers support it. It is kept apart because a browser without that syntax drops a
   var() value it can't parse, which would hide the separators there. Clip at --sep-clip: past
   the glyph but short of --sep-w, so a focus ring on the first link is not cut off. Set item
   padding with padding-top/-bottom, not the shorthand. */
.meta,
.breadcrumbs ol,
.footer-bottom,
.sep-run {
  display: flex;
  flex-wrap: wrap;
  margin-left: calc(-1 * var(--sep-w));
  clip-path: inset(-1em -1em -1em var(--sep-clip));
}
.meta > *,
.sep-run > *,
.breadcrumbs li,
.footer-bottom > span,
.footer-bottom li {
  position: relative;
  padding-left: var(--sep-w);
}
.meta > *::before,
.sep-run > *::before,
.breadcrumbs li::before,
.footer-bottom > span::before,
.footer-bottom li::before {
  content: var(--sep);
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--sep-w);
  display: flex;
  align-items: center;
  justify-content: center;
  text-indent: 0;
  letter-spacing: 0;
}
@supports (content: "x" / "") {
  .meta > *::before,
  .sep-run > *::before,
  .breadcrumbs li::before,
  .footer-bottom > span::before,
  .footer-bottom li::before {
    content: var(--sep) / "";
  }
}
.sep-run {
  --sep: "·";
  --sep-w: 1.6em;
  --sep-clip: 1em;
}

.meta {
  --sep: "·";
  --sep-w: 1.75em;
  --sep-clip: 1.1em;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-top: 0;
  margin-right: 0;
  margin-bottom: 12px;
  row-gap: 4px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background-color 0.25s;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}

/* The logo (partials/logo-small.svg in the header, logo-full.svg in the footer) is inline SVG,
   so it takes the theme's colours: the fill attributes in the files are only a fallback */
.logo-svg {
  display: block;
  height: 100%;
  width: auto;
}
.logo-svg path {
  fill: var(--logo-ink);
}
.logo-svg .logo-rule {
  fill: var(--logo-rule);
}
/* High-contrast modes repaint the header and footer but not SVG fills, so the Ivory footer logo
   would vanish on a forced white background: draw the whole logo in the system text colour */
@media (forced-colors: active) {
  .logo-svg path,
  .logo-svg .logo-rule {
    fill: CanvasText;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex: none;
}
.brand .logo-svg {
  height: 44px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list a {
  display: block;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text);
  font-size: 0.92rem;
  text-decoration: none;
  white-space: nowrap;
}
.nav-list a:hover,
.nav-list a.is-active,
.nav-list a[aria-current] {
  color: var(--heading);
  background: var(--nav-hover);
}
/* The current page or section (aria-current "page" or "true"): accent text and an underline,
   so it shows in both themes */
.nav-list a[aria-current]:not(.nav-cta) {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.nav-list .nav-cta {
  margin-left: 8px;
  background: var(--primary);
  color: var(--on-primary);
  padding: 9px 18px;
}
.nav-list .nav-cta:hover,
.nav-list .nav-cta[aria-current] {
  background: var(--primary-hover);
  color: var(--on-primary);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--heading);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  flex: none;
  transition: border-color 0.2s, background-color 0.2s;
}
.icon-btn:hover {
  border-color: var(--heading);
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}
.theme-toggle .i-moon {
  display: none;
}
:root[data-theme="dark"] .theme-toggle .i-sun-icon {
  display: none;
}
:root[data-theme="dark"] .theme-toggle .i-moon {
  display: block;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun-icon {
    display: none;
  }
  :root:not([data-theme="light"]) .theme-toggle .i-moon {
    display: block;
  }
}

.nav-toggle {
  display: none;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--heading);
  position: relative;
  transition: transform 0.2s, background-color 0.2s;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle span::before {
  top: -6px;
}
.nav-toggle span::after {
  top: 6px;
}
.nav-toggle[aria-expanded="true"] span {
  background: transparent;
}
.nav-toggle[aria-expanded="true"] span::before {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Page structure ---------- */

.section {
  padding: clamp(72px, 10vw, 120px) 0;
}
.section-sm {
  padding: clamp(48px, 7vw, 80px) 0;
}
.section-alt {
  background: var(--bg-alt);
}
.section-head {
  max-width: 720px;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.section-head.center {
  margin-left: auto;
  margin-right: auto;
}
.section-head.split {
  max-width: none;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  flex-wrap: wrap;
}
.section-head.split > div {
  max-width: 720px;
}
.lead {
  font-size: 1.12rem;
  color: var(--muted);
}

/* Inner page header */
.page-hero {
  padding: clamp(48px, 8vw, 96px) 0 clamp(36px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.page-hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  max-width: 18em;
}
.page-hero .lead {
  font-size: 1.18rem;
  max-width: 40em;
  margin-bottom: 0;
}
.page-hero .hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}
/* Decoration: the logo's two-L frame (#i-frame), large and in the hairline colour, rising from the
   hero's bottom edge so its open top-left corner shows. Hidden below 1100px (see Responsive). */
.page-hero-art {
  --art: clamp(220px, 20vw, 280px);
  position: absolute;
  right: 32px;
  bottom: calc(var(--art) * -0.36);
  width: var(--art);
  height: var(--art);
  fill: var(--line);
  pointer-events: none;
}

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 18px;
}
/* Separators: see "Separated runs" above */
.breadcrumbs ol {
  --sep: "/";
  --sep-w: 1.4em;
  --sep-clip: 0.95em;
  list-style: none;
  padding: 0;
  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0;
  row-gap: 6px;
}
.breadcrumbs li::before {
  opacity: 0.6;
}
.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumbs a:hover {
  color: var(--heading);
}

/* Grids & cards */
.grid {
  display: grid;
  gap: 20px;
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
}
a.card {
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
a.card:hover {
  color: var(--text);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.card h3 {
  font-size: 1.25rem;
}
.card p {
  color: var(--muted);
}
.card > :last-child {
  margin-bottom: 0;
}
.card .link-arrow {
  margin-top: auto;
  color: var(--accent-text);
}

.panel {
  background: var(--panel);
  color: var(--on-panel);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 48px);
  position: relative;
  overflow: hidden;
}
.panel h2,
.panel h3,
.panel h4 {
  color: var(--on-panel);
}
.panel p {
  color: var(--on-panel-muted);
}
.panel a:not(.btn) {
  color: var(--panel-accent);
}

.icon-tile {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-alt);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  color: var(--accent);
}
.icon-tile svg {
  width: 22px;
  height: 22px;
}

.ticks {
  list-style: none;
  padding: 0;
  margin: 4px 0 24px;
  display: grid;
  gap: 10px;
  font-size: 0.96rem;
}
.ticks li {
  padding-left: 24px;
  position: relative;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.6em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
/* Each step spans three rows of the list (number, title, text) through subgrid, so the texts
   in a row start level even where one title wraps to two lines */
.steps li {
  padding: 24px 24px 0 0;
  grid-row: span 3;
  display: grid;
  grid-template-rows: subgrid;
  row-gap: 0;
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  color: var(--accent-text);
  font: 500 0.85rem/1 var(--font-serif);
  margin-bottom: 14px;
}
.steps h3,
.steps h4 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}
.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Quote block */
.quote {
  margin: 0;
  padding: clamp(28px, 4vw, 44px);
  background: var(--panel);
  color: var(--on-panel);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.quote p {
  font: 400 clamp(1.4rem, 2.6vw, 2rem) / 1.3 var(--font-serif);
  margin: 0 0 14px;
  max-width: 26em;
  position: relative;
  color: var(--on-panel);
}
.quote cite {
  font-style: normal;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--panel-accent);
  position: relative;
}

/* Decoration on the green panels (the quote block and the CTA band): the logo's two-L frame, drawn just
   inside the panel's edge in a darker green and open at the top-left and bottom-right like the symbol.
   ::before is the top-and-right stroke, ::after the left-and-bottom one. The panels' padding keeps
   it clear of the text. */
.quote,
.cta-band {
  --frame-inset: 16px;
  --frame-gap: 40px;
  --frame-stroke: 3px;
}
.quote::before,
.quote::after,
.cta-band::before,
.cta-band::after {
  content: "";
  position: absolute;
  border: 0 solid var(--panel-deep);
  pointer-events: none;
}
.quote::before,
.cta-band::before {
  top: var(--frame-inset);
  right: var(--frame-inset);
  bottom: calc(var(--frame-inset) + var(--frame-gap));
  left: calc(var(--frame-inset) + var(--frame-gap) + var(--frame-stroke));
  border-top-width: var(--frame-stroke);
  border-right-width: var(--frame-stroke);
}
.quote::after,
.cta-band::after {
  top: calc(var(--frame-inset) + var(--frame-gap));
  right: calc(var(--frame-inset) + var(--frame-gap) + var(--frame-stroke));
  bottom: var(--frame-inset);
  left: var(--frame-inset);
  border-left-width: var(--frame-stroke);
  border-bottom-width: var(--frame-stroke);
}
/* High-contrast modes force borders to full text colour, which would box the copy in */
@media (forced-colors: active) {
  .quote::before,
  .quote::after,
  .cta-band::before,
  .cta-band::after {
    content: none;
  }
}

/* Article cards (Insights) */
.article-card {
  display: flex;
  flex-direction: column;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.article-card:hover {
  color: var(--text);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.article-card h3,
.article-card .insight-card-title {
  font-size: 1.18rem;
  line-height: 1.3;
}
.article-card p:not(.meta) {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 18px;
}
.article-card .card-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--muted);
}
.article-card .card-foot .link-arrow {
  color: var(--accent-text);
}
.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}
.source-badge svg {
  width: 13px;
  height: 13px;
}

/* Featured essay */
.featured {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  background: var(--panel);
  color: var(--on-panel);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.featured:hover {
  color: var(--on-panel);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.featured-art {
  background: var(--panel-deep);
  display: grid;
  place-items: center;
  padding: 36px;
  min-height: 240px;
}
.featured-art svg {
  width: 100%;
  max-width: 260px;
}
.featured-body {
  padding: clamp(28px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured .meta {
  color: var(--panel-accent);
}
.featured h3 {
  color: var(--on-panel);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
}
.featured p {
  color: var(--on-panel-muted);
}
.featured .link-arrow {
  color: var(--panel-accent);
}

/* Testimonials */
.testimonial {
  margin: 0;
  padding: 32px 28px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
}
/* The opening quote mark is decorative (empty alt text after the "/") */
.testimonial::before {
  content: "\201C";
  content: "\201C" / "";
  font: 500 4rem/0.6 var(--font-serif);
  color: var(--accent);
  display: block;
  height: 28px;
  margin-bottom: 8px;
}
.testimonial blockquote {
  margin: 0 0 24px;
  font: 400 1.12rem/1.55 var(--font-serif);
  color: var(--text);
}
.testimonial blockquote p {
  margin: 0 0 0.8em;
}
.testimonial blockquote p:last-child {
  margin-bottom: 0;
}
.testimonial figcaption {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}
.testimonial figcaption strong {
  display: block;
  color: var(--heading);
  font-weight: 600;
}
.testimonial figcaption span {
  color: var(--muted);
}
/* With a photo (partials/testimonial.njk): photo beside name, role and city */
.testimonial-who {
  display: flex;
  align-items: center;
  gap: 14px;
}
.testimonial-who > span {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.45;
}
.testimonial-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: var(--bg-alt);
  /* A hairline ring, so a photo with a white background keeps its edge on the card */
  box-shadow: 0 0 0 1px var(--line);
}

/* Insights item card (partials/insight-card.njk), built on .article-card */
.card-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.card-list > li {
  display: flex;
  min-width: 0;
}
.card-list > li > * {
  flex: 1;
}
.insight-card {
  overflow: hidden;
}
.insight-card-media {
  display: block;
  width: calc(100% + 52px);
  max-width: none;
  margin: -26px -26px 20px;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  background: var(--surface-sunk);
  border-bottom: 1px solid var(--line);
}
/* Art for items without a cover image (threads on X, on-site memos): the hero's frame in small, rising
   from the bottom edge, with the source's icon (our mark, or X) in the top-left corner */
.insight-card-art {
  position: relative;
  overflow: hidden;
  background: var(--bg-alt);
}
.insight-card-frame {
  position: absolute;
  left: 25%;
  bottom: 0;
  width: 50%;
  transform: translateY(34%);
  fill: var(--line);
}
.insight-card-icon {
  position: absolute;
  top: 18px;
  left: 20px;
  width: 26px;
  height: 26px;
  color: var(--heading);
  fill: currentColor;
}
.insight-card-art-x {
  background: var(--panel);
}
.insight-card-art-x .insight-card-frame {
  fill: var(--panel-deep);
}
.insight-card-art-x .insight-card-icon {
  color: var(--on-panel);
}
/* Source on the left, "Read on Substack ↗" on the right; on a narrow card the link drops
   to its own line (kept whole, still on the right) instead of squeezing the source */
.insight-card .card-foot {
  flex-wrap: wrap;
  row-gap: 8px;
}
.insight-card .card-foot .source-badge {
  min-width: 0;
}
.insight-card .card-foot .link-arrow {
  margin-left: auto;
  white-space: nowrap;
}
.source-badge svg {
  fill: currentColor;
}

/* CTA band */
.cta-band {
  background: var(--panel);
  color: var(--on-panel);
  border-radius: var(--radius);
  padding: clamp(32px, 5vw, 56px);
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 24px 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
/* The copy and buttons sit above the decorative frame (.cta-band::before and ::after, under Quote block) */
.cta-band > div {
  position: relative;
  z-index: 1;
}
.cta-band h2 {
  color: var(--on-panel);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 8px;
}
.cta-band p {
  color: var(--on-panel-muted);
  margin: 0;
  max-width: 36em;
}
.cta-band .actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.cta-band .btn-ghost {
  color: var(--on-panel);
  border-color: rgba(250, 246, 239, 0.35);
}
.cta-band .btn-ghost:hover {
  border-color: var(--on-panel);
  color: var(--on-panel);
}

/* Newsletter band */
.newsletter {
  padding: 28px 32px;
  border: 1px dashed var(--accent);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.newsletter p {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--heading);
}
.newsletter small {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 4px;
}

/* ---------- Forms ---------- */

.card-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: var(--shadow);
}
.card-form h2,
.card-form h3 {
  font-size: 1.4rem;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.field.full {
  grid-column: 1 / -1;
}
.field label,
.field .label {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text);
}
.field .hint {
  font-size: 0.8rem;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--field-line);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea {
  min-height: 120px;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--heading);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--heading) 15%, transparent);
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.88rem;
  color: var(--muted);
}
.check input {
  margin-top: 4px;
  accent-color: var(--primary);
}
.form-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.form-note {
  font-size: 0.84rem;
  color: var(--muted);
  margin: 0;
  flex: 1 1 220px;
}
.form-status {
  width: 100%;
  margin: 12px 0 0;
  font-size: 0.92rem;
  color: var(--heading);
}
.form-status:empty {
  display: none;
}
.hp-field {
  position: absolute;
  left: -9999px;
}

/* ---------- Prose (articles, legal pages) ---------- */

.prose {
  font-size: 1.06rem;
  line-height: 1.8;
}
.prose > * + * {
  margin-top: 1em;
}
.prose h2 {
  font-size: 1.75rem;
  margin-top: 1.8em;
}
.prose h3 {
  font-size: 1.3rem;
  margin-top: 1.6em;
}
.prose ul,
.prose ol {
  padding-left: 1.3em;
}
.prose li + li {
  margin-top: 0.4em;
}
.prose blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--accent);
  font: 400 1.3rem/1.5 var(--font-serif);
  color: var(--heading);
}
.prose img {
  border-radius: var(--radius);
  margin: 1.6em 0;
}
.prose code {
  font-size: 0.9em;
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-weight: 600;
  color: var(--heading);
  background: var(--bg-alt);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
tr:last-child td {
  border-bottom: 0;
}
td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Notice / callout */
.callout {
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  font-size: 0.95rem;
  color: var(--text);
}
.callout p:last-child {
  margin: 0;
}

/* Socials */
.socials {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.socials a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--heading);
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s;
}
.socials a:hover {
  border-color: var(--heading);
  background: var(--bg-alt);
}
.socials svg {
  width: 15px;
  height: 15px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--line);
  color: rgba(250, 246, 239, 0.78);
  padding: 64px 0 36px;
  font-size: 0.92rem;
  --logo-ink: var(--ivory);
  --logo-rule: var(--marigold);
}
.site-footer a {
  color: var(--ivory);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--marigold);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(250, 246, 239, 0.14);
}
.footer-brand .logo-svg {
  height: 60px;
  margin-bottom: 18px;
}
.footer-brand p {
  max-width: 28em;
}
.site-footer .socials {
  margin-top: 18px;
}
/* Slightly tighter pills keep all three on one row down to tablet widths */
.site-footer .socials a {
  padding: 8px 12px;
  color: var(--ivory);
  border-color: rgba(250, 246, 239, 0.25);
}
.site-footer .socials a:hover {
  color: var(--ivory);
  border-color: var(--marigold);
  background: rgba(250, 246, 239, 0.06);
}
.site-footer h2 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--marigold);
  margin-bottom: 14px;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, max-content);
  grid-template-rows: repeat(4, auto);
  grid-auto-flow: column;
  gap: 8px 32px;
}
.footer-contact p {
  margin: 0 0 8px;
}
.footer-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.footer-email svg {
  width: 16px;
  height: 16px;
  flex: none;
}
/* The short risk note */
.footer-risk {
  margin: 24px 0 0;
  max-width: 62em;
  font-size: 0.84rem;
  line-height: 1.6;
  color: rgba(250, 246, 239, 0.7);
}
.footer-risk a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
/* "© year NextOne Partners · Privacy · Terms". Separators: see "Separated runs" above; on a
   narrow phone "Privacy · Terms" wraps to its own line with no stray "·" in front */
.footer-bottom {
  --sep: "·";
  --sep-w: 2.2em;
  --sep-clip: 1.4em;
  align-items: center;
  margin-top: 16px;
  margin-right: 0;
  margin-bottom: 0;
  font-size: 0.82rem;
}
.footer-bottom ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-bottom > span::before,
.footer-bottom li::before {
  color: rgba(250, 246, 239, 0.5);
}

/* ---------- Responsive ---------- */

/* Below 1100px the hero text would run into the hero's frame art */
@media (max-width: 1100px) {
  .page-hero-art {
    display: none;
  }
}

/* The full header menu needs about 980px; below 1024px it folds into the menu button
   (keep in sync with the matchMedia query in main.js) */
@media (max-width: 1023px) {
  .nav-toggle {
    display: inline-grid;
  }
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 12px var(--gutter) 24px;
    display: none;
    box-shadow: var(--shadow);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .site-nav.is-open {
    display: block;
  }
  /* While the menu is open the page behind it is dimmed and does not scroll; tapping the
     dimmed area closes the menu (main.js adds the backdrop and the class). The lock sits on
     body so it carries to the viewport, as body's overflow-x does. Where scrollbars take up
     space (not on phones), main.js sets --scrollbar-w to the scrollbar's width: the page is
     padded by it so nothing shifts when the scrollbar hides, and the menu panel (placed
     inside the header) reaches the window's edge. scrollbar-gutter would instead leave an
     undimmed strip beside the backdrop. */
  .nav-open {
    padding-right: var(--scrollbar-w, 0px);
  }
  .nav-open .site-nav {
    right: calc(-1 * var(--scrollbar-w, 0px));
    padding-right: calc(var(--gutter) + var(--scrollbar-w, 0px));
  }
  .nav-open body {
    overflow: hidden;
  }
  .nav-backdrop {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    z-index: 49;
    background: rgba(13, 20, 17, 0.5);
    touch-action: none;
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
  }
  .nav-list a {
    padding: 12px 14px;
    font-size: 1rem;
  }
  .nav-list .nav-cta {
    margin: 8px 0 0;
    text-align: center;
  }
}

@media (max-width: 1000px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }
  .steps {
    grid-template-columns: 1fr 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .cta-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  :root {
    --gutter: 16px;
    --header-h: 64px;
  }
  body {
    font-size: 16px;
  }
  .brand .logo-svg {
    height: 38px;
  }
  /* The panels' padding is smaller here, so their frame sits closer to the edge */
  .quote,
  .cta-band {
    --frame-inset: 11px;
    --frame-gap: 32px;
  }
  .grid-2,
  .grid-3,
  .grid-4,
  .form-grid {
    grid-template-columns: 1fr;
  }
  /* Footer: brand, then the links in two columns, then contact, one above the other */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .steps li {
    padding-right: 0;
  }
  .featured {
    grid-template-columns: 1fr;
  }
  .featured-art {
    min-height: 160px;
    padding: 28px;
  }
  .featured-art svg {
    max-width: 180px;
  }
  .card {
    padding: 24px;
  }
  /* One column: decorative card art only adds scrolling, so keep real covers and drop the rest */
  .insight-card-art {
    display: none;
  }
  .insight-card-media {
    aspect-ratio: 2 / 1;
  }
  /* Tap targets of at least 40px. Footer and breadcrumb links get padding in place of the
     gaps between them, so the text keeps its spacing. */
  .chip,
  .btn-sm {
    min-height: 40px;
  }
  .footer-links {
    gap: 0 32px;
  }
  .footer-links a,
  .footer-bottom nav a,
  .footer-email {
    display: inline-block;
    padding: 8px 0;
  }
  .footer-email {
    display: inline-flex;
  }
  .footer-contact p {
    margin: 0;
  }
  .footer-bottom {
    line-height: 24px;
  }
  .breadcrumbs {
    margin: -9px 0 9px;
  }
  .breadcrumbs ol {
    row-gap: 0;
  }
  /* Every crumb, link or not, is a 40px row, so the current page stays on the links' line
     and a wrapped trail keeps even spacing; each link's padding fills its row */
  .breadcrumbs li {
    padding-top: 9px;
    padding-bottom: 9px;
  }
  .breadcrumbs a {
    display: inline-block;
    padding: 9px 0;
    margin: -9px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .site-header,
  .site-footer .footer-top,
  .newsletter,
  .cta-band {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
}
