/* =========================================================================
   JPC Private Bank — Prospect Portal / K&E Module
   Shared design system. Aesthetic reference: a leading private bank.
   Pure white ground · near-black ink · single mint-teal accent ·
   classical serif (Newsreader) + clean sans (Inter).
   ========================================================================= */

/* ---- Tokens ---------------------------------------------------------- */
:root {
  /* Color */
  --paper:        #ffffff;
  --page:         #ffffff;
  --page-alt:     #fafaf9;   /* barely-there alt section */
  --ink:          #1c1c1c;   /* body text */
  --ink-strong:   #0f0f0f;   /* headings */
  --muted:        #6c6c6c;   /* eyebrows, secondary */
  --faint:        #767066;   /* tertiary (AA on white) */
  --hairline:     #e4e2dd;   /* rules, borders */
  --hairline-2:   #d8d5ce;
  --accent:       #15c79a;   /* mint-teal — used sparingly */
  --accent-ink:   #0a7d5f;   /* accent for text on white (AA) */
  --dark:         #1a1a1a;   /* dark sections / footer */
  --dark-card:    #1d1d1d;
  --dark-line:    #343434;
  --on-dark:      #f4f3f0;
  --on-dark-mut:  #a9a59d;

  /* Type */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Spacing scale */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;

  /* Layout */
  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 64px);

  /* Motion (crisp, not slow) */
  --t-screen: 220ms cubic-bezier(.22,.61,.36,1);
  --t-state:  140ms cubic-bezier(.22,.61,.36,1);
}

/* ---- Reset ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv05";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1,h2,h3,h4 { margin: 0; font-weight: 400; }

/* ---- Type primitives ------------------------------------------------- */
.serif { font-family: var(--serif); }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow--accent { color: var(--accent-ink); }

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 72;
  line-height: 1.06;
  letter-spacing: -0.006em;
  color: var(--ink-strong);
}
.display--xl { font-size: clamp(2.6rem, 6vw, 5rem); }
.display--l  { font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.08; }
.display--m  { font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.14; }

.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
  line-height: 1.55;
  color: var(--ink);
  max-width: 60ch;
}
.body { max-width: 62ch; }
.small { font-size: 0.86rem; }
.muted { color: var(--muted); }

/* accent bar above headings (the accent cue) */
.accent-bar {
  width: 56px; height: 4px;
  background: var(--accent);
  border: 0; margin: 0 0 var(--s5);
}

/* ---- Layout ---------------------------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(56px, 9vw, 120px); }
.section--alt { background: var(--page-alt); }
.section--dark { background: var(--dark); color: var(--on-dark); }
.section--dark .display { color: var(--on-dark); }
.section--dark .muted, .section--dark .eyebrow { color: var(--on-dark-mut); }
.section--dark .eyebrow--accent, .section--dark .cite-inline { color: var(--accent); } /* brighter accent on dark for legibility */
.divider { border: 0; border-top: 1px solid var(--hairline); margin: 0; }

/* ---- Top nav --------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.86);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.nav__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s5);
}
.wordmark { display: flex; flex-direction: column; line-height: 1; }
.wordmark__name {
  font-family: var(--serif); font-weight: 420; font-size: 1.32rem;
  letter-spacing: 0.005em; color: var(--ink-strong);
  font-variation-settings: "opsz" 40;
}
.wordmark__sub {
  font-family: var(--sans); font-size: 0.6rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted);
  margin-top: 5px;
}
.nav__links { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 40px); }
.nav__link {
  font-size: 0.92rem; color: var(--ink); position: relative; padding: 4px 0;
  transition: color var(--t-state);
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px;
  background: var(--accent); transition: right var(--t-screen);
}
.nav__link:hover { color: var(--ink-strong); }
.nav__link:hover::after, .nav__link[aria-current="page"]::after { right: 0; }
.nav__cta {
  font-size: 0.9rem; padding: 9px 18px; background: var(--ink-strong); color: #fff;
  border-radius: 1px; transition: background var(--t-state);
}
.nav__cta:hover { background: #000; }
.nav__toggle { display: none; border: 0; background: none; padding: 8px; }
.nav__toggle span { display:block; width: 22px; height: 1.5px; background: var(--ink-strong); margin: 5px 0; transition: var(--t-state); }

/* ---- Hero ------------------------------------------------------------ */
.hero { padding-top: clamp(48px, 8vw, 104px); padding-bottom: clamp(36px, 6vw, 72px); }
.hero__eyebrow { margin-bottom: var(--s5); }
.hero .display--xl { max-width: 16ch; }
.hero__lede { margin-top: var(--s6); }

/* ---- Editorial list (editorial "trending topics" pattern) ------------------ */
.edlist { border-top: 1px solid var(--hairline); }
.edrow {
  display: grid; grid-template-columns: 1fr auto; align-items: start; gap: var(--s5);
  padding: clamp(22px, 3vw, 34px) 0;
  border-bottom: 1px solid var(--hairline);
  transition: background var(--t-state);
}
.edrow:hover { background: #fcfcfb; }
.edrow__eyebrow { margin-bottom: 12px; }
.edrow__title {
  font-family: var(--serif); font-weight: 380; font-size: clamp(1.25rem, 2.1vw, 1.7rem);
  line-height: 1.18; color: var(--ink-strong); letter-spacing: -0.01em;
  font-variation-settings: "opsz" 60;
}
.edrow__desc { margin-top: 10px; color: var(--muted); max-width: 56ch; font-size: 0.98rem; }
.edrow__arrow {
  align-self: center; width: 40px; height: 40px; flex: none;
  display: grid; place-items: center; border: 1px solid var(--hairline-2); border-radius: 50%;
  color: var(--ink-strong); transition: transform var(--t-screen), border-color var(--t-state), background var(--t-state);
}
.edrow:hover .edrow__arrow { transform: translateX(4px); border-color: var(--accent); }
.edrow__arrow svg { width: 16px; height: 16px; }

/* ---- Dark stat card -------------------------------------------------- */
.statcard {
  background: var(--dark-card); color: var(--on-dark);
  padding: clamp(28px, 4vw, 44px); display: flex; flex-direction: column; gap: var(--s4);
}
.statcard__label { color: var(--on-dark-mut); }
.statcard__num {
  font-family: var(--serif); font-weight: 360; font-size: clamp(3.2rem, 7vw, 5.2rem);
  line-height: 0.96; letter-spacing: -0.02em; color: #fff;
}
.statcard__body { color: var(--on-dark-mut); font-size: 0.96rem; max-width: 34ch; }

/* ---- Generic card grid ----------------------------------------------- */
.grid { display: grid; gap: var(--s5); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.card {
  border: 1px solid var(--hairline); padding: clamp(24px, 3vw, 36px);
  background: var(--paper); display: flex; flex-direction: column; gap: var(--s3);
}
.card__title { font-family: var(--serif); font-size: 1.3rem; font-weight: 400; color: var(--ink-strong); font-variation-settings:"opsz" 48; }

/* ---- Inline link with arrow ------------------------------------------ */
.arrowlink {
  display: inline-flex; align-items: center; gap: 9px; font-size: 0.92rem;
  font-weight: 500; color: var(--ink-strong);
}
.arrowlink svg { width: 15px; height: 15px; transition: transform var(--t-screen); }
.arrowlink:hover svg { transform: translateX(4px); }
.arrowlink--accent { color: var(--accent-ink); }

/* ---- Footer ---------------------------------------------------------- */
.footer { background: var(--dark); color: var(--on-dark); padding-block: clamp(48px, 7vw, 88px); }
.footer__top {
  display: grid; grid-template-columns: 1fr auto; gap: var(--s7);
  padding-bottom: var(--s7); border-bottom: 1px solid var(--dark-line);
}
.footer__links { display: grid; gap: var(--s4); }
.footer__link {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s6);
  padding: 14px 0; border-bottom: 1px solid var(--dark-line); color: var(--on-dark);
  min-width: min(440px, 70vw);
}
.footer__link:first-child { border-top: 1px solid var(--dark-line); }
.footer__link span { transition: transform var(--t-screen); }
.footer__link:hover span { transform: translateX(4px); }
.footer__mark { margin-top: var(--s7); }
.footer__mark .wordmark__name { color: #fff; }
.footer__mark .wordmark__sub { color: var(--on-dark-mut); }
.footer__legal { margin-top: var(--s5); color: var(--on-dark-mut); font-size: 0.8rem; max-width: 72ch; }

/* ---- Evidence chips (STANDARD.md provenance, shown tastefully) -------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 8px; border: 1px solid var(--hairline-2); color: var(--muted); border-radius: 2px;
}
.chip--v { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 45%, var(--hairline-2)); }
.chip--h { color: var(--faint); }
.chip__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---- Utility --------------------------------------------------------- */
.stack > * + * { margin-top: var(--s5); }
.stack-sm > * + * { margin-top: var(--s3); }
.measure { max-width: 62ch; }
.center { text-align: center; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 520ms ease, transform 520ms cubic-bezier(.22,.61,.36,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---- Comparison matrix + verdict marks (shared) ---------------------- */
.vd { font-weight: 700; font-style: normal; }
.vd--ok   { color: var(--accent-ink); }
.vd--cond { color: #8a6a22; }
.vd--no   { color: #a3433a; }
.table-scroll { overflow-x: auto; border: 1px solid var(--hairline); }
.ctable { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 760px; }
.ctable thead th {
  text-align: left; vertical-align: bottom; padding: 16px 18px;
  border-bottom: 1px solid var(--ink-strong); background: var(--page-alt);
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600;
}
.ctable thead th:first-child { background: #fff; }
.ctable tbody th {
  text-align: left; vertical-align: top; padding: 15px 18px; font-weight: 600;
  color: var(--ink-strong); border-bottom: 1px solid var(--hairline); width: 160px;
}
.ctable tbody td { vertical-align: top; padding: 15px 18px; border-bottom: 1px solid var(--hairline); color: var(--ink); line-height: 1.45; }
.ctable tbody tr:hover td, .ctable tbody tr:hover th { background: #fcfcfb; }
.ctable .sub { display: block; color: var(--muted); font-size: 0.84rem; margin-top: 4px; }
.ctable .grp td { background: var(--ink-strong); color: #fff; font-weight: 600; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 9px 18px; }

/* ---- Responsive ------------------------------------------------------ */
@media (max-width: 900px) {
  .grid--3 { grid-template-columns: 1fr 1fr; }
  .footer__top { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .nav.open .nav__links {
    display: flex; flex-direction: column; align-items: flex-start; gap: var(--s4);
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--hairline);
    padding: var(--s5) var(--gutter);
  }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .edrow { grid-template-columns: 1fr; }
  .edrow__arrow { display: none; }
  .footer__link { min-width: 0; }
}
