/* ============================================================
   FluxNova Capital — legal documents
   Loaded AFTER styles.css, which owns the design tokens, the
   sticky header, the brand lockup and the footer. Nothing here
   redefines a token; every var() carries a literal fallback so
   the documents stay readable even if styles.css is edited.

   Register: quiet. These are documents, not marketing. The dark
   header and footer bracket a light --paper reading ground, the
   measure holds near 72 characters, and there is no motion of any kind.
   The pages are fully static and require no JavaScript.
   ============================================================ */

/* ── Reading ground ───────────────────────────────────────── */

.legal-main {
  /* One column for the whole document. --measure is deliberately in rem and
     not in ch: `ch` is the advance of "0", which in Inter Tight runs about a
     quarter wider than the average character, so a 70ch rule measured 90
     real characters per line. 34.5rem lands at ~72. --hang is the gutter
     carrying the mono section indices. */
  --measure: 34.5rem;
  --hang: 4.25rem;
  background: var(--paper, #f5f3ee);
  color: var(--ink, #0e1524);
  padding-block-end: clamp(4rem, 7vw, 6.5rem);
}

.legal-main a {
  color: var(--teal-deep, #0b6f66);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
/* The hover darkens rather than lightens: --teal is a graphics value and does
   not carry text contrast on --paper. */
.legal-main a:hover { color: var(--ink, #0e1524); }

.legal-main strong { font-weight: 600; }
.legal-main abbr { text-decoration: none; border-bottom: 1px dotted var(--rule-light, rgba(14, 21, 36, 0.14)); }

/* ── Masthead ─────────────────────────────────────────────── */

.legal-masthead > * {
  width: min(100%, calc(var(--measure) + var(--hang)));
  margin-inline: auto;
}

.legal-masthead {
  padding-block: clamp(3rem, 6vw, 5rem) clamp(2rem, 3.5vw, 3rem);
  border-bottom: 1px solid var(--rule-light, rgba(14, 21, 36, 0.14));
}

.legal-kicker {
  margin-block: 0 1.25rem;
  font-family: var(--mono, ui-monospace, Menlo, monospace);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft, #5a6478);
  line-height: 1.5;
}
.legal-kicker::before {
  content: "";
  display: inline-block;
  width: 1.75rem;
  height: 1px;
  margin-right: 0.75rem;
  vertical-align: 0.28em;
  background: linear-gradient(90deg, var(--teal, #1fb2a6), var(--sage, #8fcf9f));
}

.legal-title {
  margin-block: 0;
  font-family: var(--display, "Inter Tight", system-ui, sans-serif);
  font-weight: 600;
  font-size: clamp(2.1rem, 4.4vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--ink, #0e1524);
}

.legal-standfirst {
  margin-block: 1.5rem 0;
  font-size: clamp(1.02rem, 1.15vw, 1.12rem);
  line-height: 1.6;
  color: var(--ink-soft, #5a6478);
}

.legal-updated {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  margin-block: 1.75rem 0;
  font-family: var(--mono, ui-monospace, Menlo, monospace);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft, #5a6478);
}
.legal-updated dt {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.legal-updated dd { margin: 0; }

/* The draft-banner and unresolved-placeholder components that used to
   live here (.legal-banner, .legal-banner-mark, .tbc, .tbc-hint) were
   removed on 2026-09-22: all three legal pages are in force with every
   fact resolved, and no markup referenced them any more. If a future
   legal page ships with an unconfirmed fact, reintroduce the pattern
   then, with plain selectors. */

/* ── Table of contents ────────────────────────────────────── */

.legal-toc {
  margin-block: clamp(2rem, 3.5vw, 2.75rem) 0;
  padding: clamp(1.25rem, 2.2vw, 1.75rem);
  background: var(--paper-2, #fffdf9);
  border: 1px solid var(--rule-light, rgba(14, 21, 36, 0.14));
  border-radius: 4px;
}

.legal-toc h2 {
  margin: 0 0 1rem;
  font-family: var(--mono, ui-monospace, Menlo, monospace);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft, #5a6478);
}

.legal-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.15rem 2rem;
  counter-reset: toc;
}

.legal-toc li { counter-increment: toc; }

.legal-toc a {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 0.5rem;
  padding-block: 0.4rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink, #0e1524);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.legal-toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--mono, ui-monospace, Menlo, monospace);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft, #5a6478);
  padding-top: 0.18em;
}
.legal-toc a:hover {
  color: var(--teal-deep, #0b6f66);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

/* ── Document body ────────────────────────────────────────────
   --hang is the gutter that carries the mono section index.
   The measure itself stays near 72 characters at every desktop width.
   ──────────────────────────────────────────────────────────── */

.legal-body {
  width: min(100%, calc(var(--measure) + var(--hang)));
  margin-inline: auto;
  padding-block-start: clamp(2.5rem, 4.5vw, 4rem);
  font-size: 1.0625rem;
  line-height: 1.72;
}

.legal-section {
  padding-inline-start: var(--hang);
  padding-block-start: clamp(2rem, 3.5vw, 2.75rem);
  scroll-margin-top: 6.5rem;
}
.legal-section:first-child { padding-block-start: 0; }

.legal-section > h2 {
  display: grid;
  grid-template-columns: var(--hang) minmax(0, 1fr);
  align-items: baseline;
  margin: 0 0 1rem;
  margin-inline-start: calc(var(--hang) * -1);
  font-family: var(--display, "Inter Tight", system-ui, sans-serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.4vw, 1.95rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--ink, #0e1524);
}

.legal-index {
  font-family: var(--mono, ui-monospace, Menlo, monospace);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ink-soft, #5a6478);
  padding-top: 0.35em;
}

.legal-section h3 {
  margin: 2rem 0 0.65rem;
  font-family: var(--sans, system-ui, sans-serif);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink, #0e1524);
}

.legal-section p,
.legal-section ul,
.legal-section ol {
  margin: 0 0 1.05rem;
}
.legal-section > :last-child { margin-bottom: 0; }

.legal-section ul,
.legal-section ol { padding-inline-start: 1.35rem; }
.legal-section li { margin-bottom: 0.5rem; }
.legal-section li:last-child { margin-bottom: 0; }
.legal-section li::marker { color: var(--ink-soft, #5a6478); }

/* Term/definition pairs — the imprint's disclosure rows and the
   privacy policy's lawful-basis rows. */
.legal-dl {
  display: grid;
  grid-template-columns: minmax(7rem, 10.5rem) minmax(0, 1fr);
  gap: 0.15rem 1.5rem;
  margin: 0 0 1.05rem;
  padding-block: 0.25rem;
}
.legal-dl dt {
  padding-block: 0.55rem;
  font-family: var(--mono, ui-monospace, Menlo, monospace);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-soft, #5a6478);
  border-top: 1px solid var(--rule-light, rgba(14, 21, 36, 0.14));
}
.legal-dl dd {
  margin: 0;
  padding-block: 0.55rem;
  font-size: 0.98rem;
  line-height: 1.6;
  border-top: 1px solid var(--rule-light, rgba(14, 21, 36, 0.14));
}
.legal-dl dd p { margin: 0 0 0.5rem; }
.legal-dl dd > :last-child { margin-bottom: 0; }

/* Quiet inset for a rule that matters more than its neighbours. */
.legal-callout {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--paper-2, #fffdf9);
  border: 1px solid var(--rule-light, rgba(14, 21, 36, 0.14));
  border-left: 3px solid var(--teal-deep, #0b6f66);
  border-radius: 4px;
  font-size: 0.98rem;
  line-height: 1.62;
}
.legal-callout p { margin: 0 0 0.7rem; }
.legal-callout > :last-child { margin-bottom: 0; }

/* An unresolved question the firm must answer, inline in the text. */
.legal-open {
  margin: 1.5rem 0;
  padding: 0.9rem 1.15rem;
  background: rgba(255, 180, 92, 0.1);
  border: 1px dashed rgba(138, 79, 8, 0.45);
  border-radius: 4px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--ink, #0e1524);
}
.legal-open p { margin: 0 0 0.6rem; }
.legal-open > :last-child { margin-bottom: 0; }
.legal-open-label {
  display: block;
  margin-bottom: 0.45rem;
  font-family: var(--mono, ui-monospace, Menlo, monospace);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--nova-deep, #8a4f08);
}

/* Sibling documents, at the foot of every page. */
.legal-siblings {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: clamp(2.5rem, 4.5vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-light, rgba(14, 21, 36, 0.14));
  font-family: var(--mono, ui-monospace, Menlo, monospace);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.legal-siblings [aria-current="page"] {
  color: var(--ink-soft, #5a6478);
  text-decoration: none;
  cursor: default;
}

/* ── Footer legal row ─────────────────────────────────────────
   styles.css owns .footer-legal; this only adds the document
   links that the legal pages introduce.
   ──────────────────────────────────────────────────────────── */

.footer-legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  width: 100%;
  padding-bottom: 0.25rem;
}
.footer-legal-nav a {
  font-size: 0.78rem;
  color: var(--on-dark-soft, #8c9ec4);
  text-decoration: none;
}
.footer-legal-nav a:hover { color: #eef2f9; }
.footer-legal-nav [aria-current="page"] { color: #eef2f9; }

/* ── Responsive ───────────────────────────────────────────────
   Contract: 1280 / 1440 / 1680 desktop, 360 / 390 / 430 mobile.
   Below 720px the hanging index folds above its heading so the
   measure keeps the full column and nothing overflows at 360.
   ──────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .legal-main { --hang: 3.25rem; }
}

@media (max-width: 720px) {
  .legal-main { --hang: 0rem; }
  .legal-section { padding-inline-start: 0; }
  .legal-section > h2 {
    display: block;
    margin-inline-start: 0;
  }
  .legal-index {
    display: block;
    padding-top: 0;
    margin-bottom: 0.45rem;
  }
  .legal-dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .legal-dl dt { padding-bottom: 0.15rem; }
  .legal-dl dd { padding-top: 0; border-top: 0; }
}

@media (max-width: 560px) {
  .legal-body { font-size: 1rem; line-height: 1.68; }
  .legal-toc ol { grid-template-columns: minmax(0, 1fr); }
}

/* No motion is declared anywhere in this file; the reduced-motion
   rule in styles.css therefore has nothing to switch off here. */

/* ── Print ────────────────────────────────────────────────────
   These documents get printed and emailed to advisers, so the body
   text has to survive on paper without the site chrome.
   ──────────────────────────────────────────────────────────── */

@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .legal-toc,
  .legal-siblings { display: none; }

  .legal-main { background: #fff; color: #000; padding-block-end: 0; }
  .legal-main { --hang: 3rem; }
  .legal-body { width: 100%; font-size: 10.5pt; line-height: 1.5; }
  .legal-section { break-inside: auto; }
  .legal-section > h2 { break-after: avoid; }
  .legal-main a { color: #000; }
}
