/* ==================================================================
   Privlex Governance Notes — shared article (web reading) stylesheet
   Used by every /insights/<slug>/index.html. Print layouts live in
   each article's own print.html.

   Standardized per brand pass:
     · Type: Manrope (display/UI) · Source Serif 4 (reading) · JetBrains Mono (labels)
     · Color: solid brand accents only — no rainbow/gradient-filled text
   ================================================================== */

:root {
  /* Navy scale — seriousness anchor */
  --priv-navy-950: #0a0846;
  --priv-navy-900: #100b5c;
  --priv-navy-800: #150f72;
  --priv-navy-700: #1b1870;
  --priv-navy-600: #2a1f9e;
  --priv-navy-500: #4338ca;
  --priv-navy-100: #e5e4f4;

  /* Prism hues — used sparingly as solid accents (no gradient text) */
  --prism-magenta-bright: #be2bec;
  --prism-cyan-bright: #2f9dd1;
  --prism-cyan-deep: #1f88cc;
  --prism-blue-mid: #1057aa;
  --prism-indigo-deep: #1346a1;

  /* The single accent for the article system. */
  --accent: var(--prism-cyan-deep);

  /* Surfaces */
  --surface-0: #ffffff;
  --surface-1: #fafafb;
  --surface-2: #f4f4f8;
  --surface-3: #ececf3;
  --surface-4: #dddceb;

  /* Foreground */
  --fg-1: var(--priv-navy-800);
  --fg-2: #4b4969;
  --fg-3: #6c6a87;
  --fg-4: #94929f;
  --fg-inverse: #ffffff;

  /* Borders */
  --border-1: #e5e4ed;
  --border-2: #d6d4e2;
  --border-strong: #b8b5cc;

  /* Shadows — restrained, navy-tinted */
  --shadow-sm: 0 1px 3px rgba(21, 15, 114, 0.08), 0 1px 2px rgba(21, 15, 114, 0.04);
  --shadow-md: 0 4px 12px rgba(21, 15, 114, 0.08), 0 2px 4px rgba(21, 15, 114, 0.04);
  --shadow-lg: 0 12px 32px rgba(21, 15, 114, 0.12), 0 4px 8px rgba(21, 15, 114, 0.06);
  --shadow-xl: 0 24px 64px rgba(10, 8, 70, 0.18), 0 8px 16px rgba(21, 15, 114, 0.08);

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-xl: 16px;

  /* Type families */
  --font-sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Source Serif 4", "Source Serif Pro", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --hairline: var(--border-1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font-serif);
  color: var(--fg-1);
  background: var(--surface-1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}

/* ===== Site nav (matches the marketing site; works with /app.js) ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-1);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  max-width: 1320px;
  margin: 0 auto;
}
.nav-logo {
  display: inline-flex;
  align-items: center;
}
.nav-logo img {
  height: 56px;
  width: auto;
}
.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav-links a:not(.btn) {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg-3);
}
.nav-links a:not(.btn):hover {
  color: var(--fg-1);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-lg);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  border: 0;
  background: var(--priv-navy-800);
  color: #fff;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}
.btn:hover {
  transform: translateY(-1px);
  background: var(--priv-navy-600);
  box-shadow: var(--shadow-md);
}
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  width: 44px;
  height: 44px;
  padding: 0;
}
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fg-1);
  margin: 5px auto;
  border-radius: 2px;
  transition:
    transform 0.25s ease,
    opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 20px;
    border-bottom: 1px solid var(--border-1);
    box-shadow: 0 8px 24px rgba(11, 18, 32, 0.06);
    display: none;
  }
  .nav-links.is-open {
    display: flex;
  }
  .nav-links a:not(.btn) {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-1);
  }
  .nav-links a.btn {
    margin-top: 14px;
    text-align: center;
    justify-content: center;
  }
}

/* ===== Article shell ===== */
.article {
  max-width: 1040px;
  margin: 0 auto;
  background: var(--surface-0);
  box-shadow: var(--shadow-xl);
}
@media (max-width: 720px) {
  .article {
    box-shadow: none;
  }
}

/* ===== Cover — full-bleed prism hero + editorial block ===== */
.cover {
  background: var(--surface-0);
}
.cover-hero {
  position: relative;
  height: clamp(340px, 52vw, 560px);
  overflow: hidden;
  background: #e9e7f2;
}
.cover-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
}
/* soften the top so the wordmark + badge always read */
.cover-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 38%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0));
  z-index: 1;
}
/* hairline prism seam at the base of the image — the one decorative spectrum nod */
.cover-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--lex-blue, #409ce2) 0%, #8366e8 50%, #c62fee 100%);
  z-index: 2;
}
.cover-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: clamp(18px, 4vw, 34px) clamp(20px, 5vw, 48px) 0;
}
.cover-wordmark {
  height: 34px;
  width: auto;
}
.cover-issue {
  background: var(--priv-navy-900);
  color: var(--fg-inverse);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.cover-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 0 clamp(20px, 5vw, 48px) clamp(20px, 4vw, 38px);
  background: linear-gradient(
    58deg,
    rgba(255, 255, 255, 0.72) 0%,
    rgba(255, 255, 255, 0.34) 42%,
    rgba(255, 255, 255, 0) 66%
  );
}
.cover-overlay .cover-issue {
  display: inline-block;
  margin-bottom: 14px;
}
.cover-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 14px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--prism-cyan-deep);
}
.cover-meta .sep {
  color: var(--border-strong);
}
.cover-title {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
  color: var(--priv-navy-800);
  max-width: 12ch;
}
.cover-subtitle {
  display: block;
  margin-top: 0.5em;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.05rem, 2vw, 1.5rem);
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--fg-2);
  max-width: 30ch;
}
/* Accent words — solid brand color, never gradient */
.cover-title .accent,
.cover-subtitle .accent {
  color: var(--prism-cyan-deep);
}
.cover-below {
  padding: clamp(28px, 4vw, 44px) clamp(20px, 5vw, 48px);
}
.cover-dek {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  color: var(--fg-2);
  max-width: 60ch;
  margin: 0 0 28px;
}
.cover-foot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-1);
}
.cover-foot .label {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-4);
  margin-bottom: 8px;
}
.cover-foot .value {
  font-family: var(--font-sans);
  font-size: 0.96rem;
  font-weight: 500;
  color: var(--priv-navy-800);
}
.cover-foot .value small {
  display: block;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--fg-3);
  margin-top: 3px;
}
@media (max-width: 640px) {
  .cover-foot {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ===== Article body ===== */
.article-body {
  padding: clamp(32px, 5vw, 56px) clamp(20px, 5vw, 48px) 8px;
}
.running-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--border-1);
  padding-bottom: 12px;
  margin-bottom: 36px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.running-head .where {
  color: var(--prism-cyan-deep);
  display: flex;
  align-items: center;
  gap: 9px;
}
.running-head .where img {
  height: 15px;
  width: auto;
}

.body {
  max-width: 44rem;
  margin: 0 auto;
  font-family: var(--font-serif);
  font-size: 1.16rem;
  line-height: 1.72;
  color: var(--fg-1);
}
.body p {
  margin: 0 0 1.1em;
}
.body em,
.body i {
  font-style: italic;
}
.body strong,
.body b {
  color: var(--priv-navy-800);
  font-weight: 600;
}

/* Lead paragraph + drop cap (solid navy — no gradient) */
.body p.lead {
  font-size: 1.28rem;
  line-height: 1.6;
  color: var(--fg-1);
}
.body p.lead::first-letter {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 3.6em;
  line-height: 0.78;
  float: left;
  margin: 0.06em 0.1em 0 0;
  color: var(--priv-navy-800);
  letter-spacing: -0.04em;
}

/* Section heads — solid accent number, no gradient */
.body h2 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--priv-navy-800);
  margin: 2em 0 0.7em;
  padding-top: 0.8em;
  border-top: 1px solid var(--border-1);
}
.body h2 .num {
  display: inline-block;
  color: var(--prism-cyan-deep);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  vertical-align: 0.34em;
  margin-right: 10px;
}

/* Pull quote — solid accent rule, no gradient */
.pullquote {
  margin: 1.6em 0;
  padding: 0.2em 0 0.2em 1.2em;
  border-left: 3px solid var(--accent);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.34;
  color: var(--priv-navy-800);
  letter-spacing: -0.005em;
}
.pullquote .attr {
  display: block;
  margin-top: 0.6em;
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--prism-cyan-deep);
}

/* Footnote references + list */
.fnref {
  font-family: var(--font-sans);
  font-size: 0.62em;
  font-weight: 600;
  vertical-align: super;
  color: var(--prism-cyan-deep);
  padding: 0 1px;
}
.footnotes {
  max-width: 44rem;
  margin: 3em auto 0;
  padding-top: 1.4em;
  border-top: 1px solid var(--border-1);
}
.footnotes .fn-head {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-4);
  margin-bottom: 14px;
}
.footnotes ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: fn;
}
.footnotes li {
  position: relative;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--fg-2);
  padding-left: 1.8em;
  margin-bottom: 0.9em;
}
.footnotes li .num {
  position: absolute;
  left: 0;
  top: 0.15em;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--prism-cyan-deep);
}
.footnotes li .fnref {
  margin-left: 4px;
  vertical-align: baseline;
}

/* ===== Subscribe aside ===== */
.article-subscribe {
  max-width: 44rem;
  margin: 3.2em auto 0;
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 4vw, 36px);
}
.article-subscribe .sub-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--prism-cyan-deep);
  margin-bottom: 10px;
}
.article-subscribe .sub-title {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: -0.02em;
  color: var(--priv-navy-800);
  margin: 0 0 10px;
}
.article-subscribe .sub-letter p {
  font-family: var(--font-serif);
  color: var(--fg-2);
  margin: 0 0 18px;
}
.sub-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sub-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.sub-form input {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.96rem;
  padding: 11px 13px;
  background: var(--surface-0);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  color: var(--fg-1);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.sub-form input::placeholder {
  color: var(--fg-4);
}
.sub-form input:focus {
  outline: none;
  border-color: var(--prism-cyan-deep);
  box-shadow: 0 0 0 3px rgba(31, 136, 204, 0.18);
}
.sub-form button {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.96rem;
  padding: 12px 18px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--priv-navy-800);
  color: #fff;
  cursor: pointer;
  transition:
    transform 0.2s,
    background 0.2s;
}
.sub-form button:hover {
  transform: translateY(-1px);
  background: var(--priv-navy-600);
}
.sub-status {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.88rem;
}
.sub-status.ok {
  background: rgba(31, 136, 204, 0.1);
  border: 1px solid rgba(31, 136, 204, 0.4);
  color: var(--prism-cyan-deep);
}
.sub-status.err {
  background: rgba(190, 43, 236, 0.1);
  border: 1px solid rgba(190, 43, 236, 0.4);
  color: var(--prism-magenta-bright);
}
.sub-status.err a {
  color: inherit;
  text-decoration: underline;
}
.article-subscribe .hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.article-subscribe .sub-sign {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--fg-3);
  margin: 16px 0 0;
}
@media (max-width: 540px) {
  .sub-fields {
    grid-template-columns: 1fr;
  }
}

/* ===== Colophon (author) ===== */
.colophon {
  max-width: 44rem;
  margin: 3.2em auto 0;
  padding-top: 1.8em;
  border-top: 2px solid var(--priv-navy-800);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 28px;
}
.colophon .headshot {
  width: 100%;
  max-width: 150px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-1);
  box-shadow: var(--shadow-sm);
  margin: 0 0 12px;
}
.colophon .role {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--prism-cyan-deep);
  margin-bottom: 6px;
}
.colophon h4 {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: var(--priv-navy-800);
  margin: 0 0 6px;
}
.colophon p {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--fg-2);
  margin: 0 0 10px;
}
.colophon .signoff {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--priv-navy-800);
  margin-top: 8px;
}
@media (max-width: 600px) {
  .colophon {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* ===== Return strip + site footer ===== */
.article-foot {
  background: var(--surface-2);
  border-top: 1px solid var(--border-1);
  margin-top: clamp(40px, 6vw, 72px);
  padding: clamp(40px, 6vw, 64px) 0;
}
.article-foot-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 28px;
}
.article-foot .eyebrow {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--prism-cyan-deep);
  margin-bottom: 10px;
}
.article-foot h3 {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: -0.02em;
  color: var(--priv-navy-800);
  margin: 0 0 20px;
}
.return-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 0.95rem;
}
.return-actions .primary {
  font-weight: 600;
  color: var(--priv-navy-800);
}
.return-actions a:not(.primary) {
  color: var(--fg-3);
}
.return-actions a:hover {
  color: var(--prism-cyan-deep);
}

.site-foot {
  background: var(--priv-navy-900);
  color: rgba(255, 255, 255, 0.6);
  padding: 36px 28px;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  position: relative;
}
.site-foot::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, #409ce2 0%, #8366e8 50%, #c62fee 100%);
  opacity: 0.7;
}
.site-foot .row1 {
  margin-bottom: 8px;
}
.site-foot a {
  color: rgba(255, 255, 255, 0.75);
}
.site-foot a:hover {
  color: #fff;
}
