/* Base reset-ish */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

/* Colours – no blue */
:root {
  --bg-main: #050608;
  --bg-elevated: #101827;
  --bg-card: #111827;
  --border-subtle: #1f2933;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --accent: #fbbf24;
  /* Logo sizing: increase for legibility of lockup tagline */
  --logo-multiplier: 2.55;
}

/* Typography */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
}

/* Header + top nav */
.site-header {
  border-bottom: 1px solid var(--border-subtle);
  background: radial-gradient(circle at top left, #111827 0, #02030a 55%);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  height: calc(46px * var(--logo-multiplier));
  width: auto;
  max-height: none;
}

/* Lockup (logo + byline) in header */
.brand-logo.lockup{
  height: calc(50px * var(--logo-multiplier));
  max-height: none;
}

@media (max-width: 560px){
  :root{ --logo-multiplier: 1.85; }
  .brand-logo.lockup{height: calc(50px * var(--logo-multiplier));}
}



.brand-home{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-home{
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

/* Mark + tagline (kept as HTML text for true legibility) */
.brand-logo.mark{
  height: calc(44px * var(--logo-multiplier));
  width: auto;
  flex: 0 0 auto;
}

.brand-tagline{
  font-size: 16.5px; /* tuned so tagline is not smaller than nav labels */
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-main);
  opacity: 0.96;
  white-space: nowrap;
}

@media (max-width: 560px){
  .brand-logo.mark{ height: calc(36px * var(--logo-multiplier)); }
  .brand-tagline{ font-size: 13px; }
}
.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  letter-spacing: 0.16em;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-main);
}

.brand-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.top-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

.top-nav a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.top-nav li.active a,
.top-nav a:hover {
  color: var(--accent);
}

/* Layout shell */
.page-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 1.5rem;
}

/* Sidebar */
.sidebar {
  border-right: 1px solid var(--border-subtle);
}

.sidebar-inner {
  position: sticky;
  top: 1.5rem;
}

.sidebar-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin: 0 0 0.75rem 0;
}

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

.practice-nav li {
  margin: 0.15rem 0;
}

.practice-nav a {
  display: block;
  padding: 0.4rem 0.5rem;
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-radius: 0.45rem;
}

.practice-nav li.active a {
  background: linear-gradient(to right, #1f2937, #111827);
  color: var(--accent);
}

.practice-nav a:hover {
  background-color: #111827;
  color: var(--text-main);
}

/* Content area */
.content {
  min-width: 0;
}

.content-article {
  background-color: var(--bg-card);
  border-radius: 0.75rem;
  padding: 1.75rem 1.75rem 2rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  border: 1px solid #111827;
}

/* Headings & text */
.content-header h1,
.content-article h1 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.6rem;
}

.lead {
  font-size: 0.98rem;
  color: var(--text-muted);
  margin-top: 0;
}

.content-section {
  margin-top: 1.75rem;
}

.content-section h2 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.content-section p {
  margin: 0.35rem 0;
}

.content-section ul,
.content-section ol {
  padding-left: 1.2rem;
  margin: 0.5rem 0;
}

.content-section li {
  margin: 0.25rem 0;
}

/* Key terms block */
.key-terms {
  /* Theme-aware default (esp. Crème reading mode) */
  background: var(--bg-elevated);
  border-radius: 0.75rem;
  padding: 1.2rem 1.3rem 1.3rem;
  border: 1px solid var(--border-subtle);
}

.key-terms h2 {
  margin-top: 0;
}

.key-terms dl {
  margin: 0.6rem 0 0;
}

.key-terms dt {
  font-weight: 600;
  margin-top: 0.6rem;
  color: var(--accent);
}



/* Keep a darker "spotlight" feel in dark themes, while staying readable in Crème */
html[data-theme="ocean"] .key-terms,
html[data-theme="purple"] .key-terms{
  background: radial-gradient(circle at top left, #161f2e 0, #050608 70%);
}
.key-terms dd {
  margin: 0.1rem 0 0.2rem 0;
  color: var(--text-main);
  font-size: 0.92rem;
}

/* Simple content-only layout for non-notebook pages */
.content-only {
  max-width: 1120px;
  margin: 2rem auto;
  padding: 0 1.5rem 2rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  margin-top: 2rem;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1rem 1.5rem 2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Responsive tweaks */
@media (max-width: 900px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-nav ul {
    gap: 1rem;
    flex-wrap: wrap;
  }

  .page-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
  }

  .sidebar-inner {
    position: static;
  }
}

@media (max-width: 600px) {
  .content-article {
    padding: 1.25rem 1.2rem 1.5rem;
  }

  .header-inner {
    padding: 0.9rem 1rem;
  }

  .page-shell {
    padding: 1rem;
  }

  .content-only {
    padding: 0 1rem 2rem;
  }
}


/* Hero visual blocks (SVG diagrams) */
.hero-visual {
  margin-top: 1rem;
  padding: 1rem 1rem 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}



html[data-theme="ocean"] .hero-visual,
html[data-theme="purple"] .hero-visual{
  background: radial-gradient(circle at top left, #161f2e 0, #050608 70%);
}
.hero-diagram {
  display: block;
  width: 100%;
  max-width: 1100px;
  height: auto;
  margin: 0 auto;
}

.hero-caption {
  margin: 0.75rem auto 0;
  max-width: 820px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Contact page */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 1.25rem;
  margin-top: 1rem;
}

.card {
  background-color: var(--bg-card);
  border-radius: 0.75rem;
  padding: 1.25rem 1.25rem 1.35rem;
  border: 1px solid var(--border-subtle);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.7rem 0.75rem;
  border-radius: 0.6rem;
  border: 1px solid #223043;
  background: #0b1220;
  color: var(--text-main);
  outline: none;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: #2b3a52;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 0.95rem;
  border-radius: 0.65rem;
  border: 1px solid #2b3a52;
  background: #0b1220;
  color: var(--text-main);
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.small-muted {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Credibility & Governance (Pattern B) */
.cg-hero{
  width:100%;
  max-width:980px;
  height:auto;
  display:block;
  margin:14px auto 18px;
}

.cg-cap{
  max-width:980px;
  margin:0 auto;
  opacity:.85;
  font-size:.95rem;
}


/* Founder page callout */
.callout{
  margin: 18px 0;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
}
.callout ul{
  margin: 10px 0 0 18px;
}
.callout li{
  margin: 8px 0;
}
/* WordPress-style FAQ (click / press effect) */
.wp-accordion{
  margin-top: 0.75rem;
}
.wp-accordion details{
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  padding: 0.65rem 0.9rem;
  transition: transform 120ms ease, border-color 120ms ease;
}
.wp-accordion details + details{
  margin-top: 0.75rem;
}
.wp-accordion details:active{
  transform: translateY(1px);
}
.wp-accordion summary{
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--text-main);
  outline: none;
}
.wp-accordion summary::-webkit-details-marker{
  display: none;
}
.wp-accordion summary::after{
  content: "▾";
  float: right;
  color: var(--text-muted);
}
.wp-accordion details[open] summary::after{
  content: "▴";
}
.wp-accordion .answer{
  margin-top: 0.55rem;
  color: var(--text-muted);
  line-height: 1.55;
}


@media (min-width: 992px){
  header .brand-tagline{ font-size: 17px; }
}



/* =========================================================
   Theme Control Panel + Palettes (Ocean / Crème / Purple)
   - Uses existing AltVector variables: --bg-main, --bg-card, --text-main, --accent, etc.
   - Theme is selected via <html data-theme="...">, persisted in localStorage.
   ========================================================= */

/* Defaults for header gradient, overridden per theme */
:root {
  --header-grad-start: #111827;
  --header-grad-end: #02030a;
}

/* Make header gradient theme-aware */
.site-header {
  background: radial-gradient(circle at top left, var(--header-grad-start) 0, var(--header-grad-end) 55%);
}

/* Ocean (dark, calm) */
html[data-theme="ocean"]{
  --bg-main: #071a2b;
  --bg-elevated: #0a2238;
  --bg-card: #0c2942;
  --border-subtle: rgba(226,232,240,0.14);
  --text-main: rgba(241,245,249,0.92);
  --text-muted: rgba(226,232,240,0.72);
  --accent: #38bdf8;
  --accent-2: #22c55e;
  --shadow: 0 10px 28px rgba(0,0,0,0.35);
  --header-grad-start: rgba(56,189,248,0.22);
  --header-grad-end: rgba(168,85,247,0.18);
}

/* Crème (reading mode) */
html[data-theme="creme"]{
  --bg-main: #fbf3e6;
  --bg-elevated: #fffaf2;
  --bg-card: #fffdf8;
  --border-subtle: rgba(16,24,40,0.14);
  --text-main: rgba(16,24,40,0.92);
  --text-muted: rgba(16,24,40,0.68);
  --accent: #38bdf8;
  --header-grad-start: #fffdf8;
  --header-grad-end: #fbf3e6;
}

/* Purple (signature) */
html[data-theme="purple"]{
  --bg-main: #0b0b10;
  --bg-elevated: #121826;
  --bg-card: #111827;
  --border-subtle: rgba(255,255,255,0.12);
  --text-main: rgba(255,255,255,0.92);
  --text-muted: rgba(255,255,255,0.70);
  --accent: #7c3aed;
  --header-grad-start: #111827;
  --header-grad-end: #02030a;
}

/* Minor legibility polish in Crème */
html[data-theme="creme"] body{
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* === Theme panel UI === */
.theme-panel{
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 9999;
  padding: 10px 12px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg-card) 88%, transparent);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
  max-width: 260px;
}

.theme-panel .row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.theme-panel label{
  font-size: 12px;
  color: var(--text-muted);
}

.theme-panel select,
.theme-panel button{
  font: inherit;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-main);
  padding: 6px 8px;
}

.theme-panel button{ cursor:pointer; }

@media (max-width: 520px){
  .theme-panel{
    right: 10px;
    bottom: 10px;
    max-width: 220px;
  }
}
