/* ============================================
   DELTA CAPITAL — MASTER STYLESHEET
   Black & white. Serif. Institutional.
   ============================================ */

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

:root {
  --bg: #fafafa;
  --bg-dark: #f3f3f3;
  --fg: #111;
  --fg-muted: #555;
  --fg-faint: #999;
  --border: #e0e0e0;
  --serif: 'Cormorant Garamond', 'Georgia', serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.42, 0, 0.58, 1);
  --duration: 0.8s;
  --duration-slow: 1.4s;
}

body.risk-page {
  --bg: #f0f0f0;
  --bg-dark: #e8e8e8;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--serif);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background-color 0.6s var(--ease);
}

::selection {
  background: var(--fg);
  color: var(--bg);
}

a { color: inherit; text-decoration: none; }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }

p {
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  max-width: 640px;
  color: var(--fg-muted);
}

.mono {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

/* --- Layout --- */
.page-container {
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.section {
  padding: 12vh 8vw;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.section--full { min-height: 100vh; }
.section--compact { min-height: auto; padding: 8vh 8vw; }

.section--alt {
  background: var(--bg-dark);
}

/* --- Section Separator --- */
.section-sep {
  width: 1px;
  height: 6vh;
  background: linear-gradient(180deg, transparent, var(--border), transparent);
  margin: 0 auto;
}

.section-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6vw;
  align-items: start;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4vw;
}

@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 4vh; }
  .section { padding: 8vh 6vw; }
}

/* --- Canvas Background --- */
#ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.07;
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.hero-delta {
  font-size: clamp(4rem, 10vw, 8rem);
  font-family: var(--serif);
  font-weight: 300;
  opacity: 0;
  transform: scale(0.98);
  animation: hero-delta-in 2s var(--ease) 0.3s forwards;
  letter-spacing: -0.02em;
}

.hero-wordmark {
  font-size: clamp(0.7rem, 1vw, 0.9rem);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  opacity: 0;
  animation: fade-up 1.6s var(--ease) 1.2s forwards;
  color: var(--fg-muted);
  margin-top: 1.5rem;
}

.hero-philosophy {
  margin-top: 6vh;
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  font-style: italic;
  color: var(--fg-faint);
  opacity: 0;
  animation: fade-up 1.6s var(--ease) 2s forwards;
  max-width: 500px;
  line-height: 1.6;
}

/* --- Scroll Indicator --- */
.scroll-indicator {
  position: fixed;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fade-in 1.2s var(--ease) 2.8s forwards;
  z-index: 50;
  transition: opacity 0.4s var(--ease);
}

.scroll-indicator span {
  font-family: var(--mono);
  font-size: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--fg-faint);
}

.scroll-indicator::after {
  content: '';
  display: block;
  width: 1px;
  height: 32px;
  background: var(--fg-faint);
  animation: scroll-pulse 2.4s var(--ease-in-out) infinite;
  transform-origin: top;
}

.scroll-indicator.hide {
  animation: none;
  opacity: 0;
  pointer-events: none;
}

@keyframes scroll-pulse {
  0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
  40% { opacity: 0.5; transform: scaleY(1); transform-origin: top; }
  60% { opacity: 0.5; transform: scaleY(1); transform-origin: bottom; }
  100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

@keyframes hero-delta-in {
  to { opacity: 1; transform: scale(1); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration) var(--ease),
              transform var(--duration) var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease),
              transform 0.6s var(--ease);
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }
.reveal-stagger.visible > *:nth-child(7) { transition-delay: 0.35s; }
.reveal-stagger.visible > *:nth-child(8) { transition-delay: 0.4s; }

.reveal-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* --- Letter Reveal --- */
.letter-reveal .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.letter-reveal .letter.space { width: 0.3em; }

.letter-reveal.visible .letter {
  opacity: 1;
  transform: translateY(0);
}

/* --- Divider --- */
.divider {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, var(--fg-muted), transparent);
  margin: 2.5vh 0;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.visible .divider, .divider.visible {
  opacity: 1;
  transform: scaleX(1);
}

/* --- Progressive Disclosure --- */
.disclosure-block { cursor: pointer; }

.disclosure-hint {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-faint);
  margin-top: 1rem;
  transition: color 0.3s var(--ease);
}

.disclosure-block:hover .disclosure-hint { color: var(--fg-muted); }

.disclosure-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s var(--ease), opacity 0.4s var(--ease);
  opacity: 0;
}

.disclosure-content.open {
  max-height: 600px;
  opacity: 1;
  margin-top: 1.5rem;
}

.disclosure-content p {
  font-size: 0.95rem;
  color: var(--fg-muted);
  line-height: 1.8;
}

/* --- Command Palette --- */
.cmd-palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
  backdrop-filter: blur(4px);
}

.cmd-palette-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.cmd-palette {
  position: fixed;
  top: 20vh;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: min(520px, 90vw);
  background: #fff;
  border: 1px solid var(--border);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

.cmd-palette.active {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.cmd-palette input {
  width: 100%;
  border: none;
  outline: none;
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 1.2rem 1.5rem;
  background: transparent;
  color: var(--fg);
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--border);
}

.cmd-palette input::placeholder { color: var(--fg-faint); }

.cmd-palette-results {
  list-style: none;
  max-height: 320px;
  overflow-y: auto;
}

.cmd-palette-results li {
  padding: 0.8rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s;
  text-transform: uppercase;
}

.cmd-palette-results li:hover,
.cmd-palette-results li.selected {
  background: var(--bg-dark);
}

.cmd-palette-results li .shortcut {
  color: var(--fg-faint);
  font-size: 0.7rem;
}

/* --- Nav Trigger --- */
.nav-trigger {
  position: fixed;
  top: 2rem;
  right: 2rem;
  width: 32px;
  height: 32px;
  cursor: pointer;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  opacity: 0;
  animation: fade-in 1s var(--ease) 2.5s forwards;
}

.nav-trigger span {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--fg-muted);
  transition: all 0.3s var(--ease);
}

.nav-trigger:hover span {
  width: 24px;
  background: var(--fg);
}

/* --- Key Hint --- */
.key-hint {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--fg-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  animation: fade-in 1s var(--ease) 3s forwards;
  z-index: 50;
}

.key-hint kbd {
  display: inline-block;
  padding: 0.15em 0.4em;
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.65rem;
  margin: 0 0.1em;
}

/* --- Section Label --- */
.section-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--fg-faint);
  margin-bottom: 3vh;
  display: inline-block;
  padding-bottom: 0.3rem;
}

/* --- Content Blocks --- */
.content-block {
  margin-bottom: 6vh;
  padding: 2rem 2rem 2rem 2rem;
  border-left: 1px solid var(--border);
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}

.content-block:hover {
  border-color: var(--fg-faint);
  background: rgba(0, 0, 0, 0.015);
}

.content-block h3 {
  margin-bottom: 1rem;
  transition: letter-spacing 0.4s var(--ease);
}

.content-block h3:hover {
  letter-spacing: 0.02em;
}

.content-block p { margin-top: 0.8rem; }

/* --- Hover Underline --- */
.hover-underline {
  position: relative;
  display: inline;
}

.hover-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--fg-muted);
  transition: width 0.4s var(--ease);
}

.hover-underline:hover::after { width: 100%; }

/* --- Architecture Nodes --- */
.arch-node {
  position: relative;
  padding: 1.5rem 2rem;
  border: 1px solid transparent;
  margin-bottom: 0;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.8s var(--ease);
}

.arch-node.visible {
  opacity: 1;
  transform: translateX(0);
  border-color: var(--border);
}

.arch-node h4 {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
}

.arch-node p {
  font-size: 0.9rem;
  margin-top: 0.5rem;
  color: var(--fg-faint);
}

.arch-connector {
  width: 1px;
  height: 0;
  background: var(--border);
  margin: 0 0 0 3rem;
  transition: height 0.8s var(--ease);
}

.arch-connector.visible { height: 2rem; }

/* --- Architecture Canvas --- */
#arch-canvas {
  width: 100%;
  height: 500px;
  margin: 4vh 0;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}

#arch-canvas.visible { opacity: 1; }

/* --- Legal --- */
.legal-text {
  font-size: 0.9rem;
  line-height: 2;
  color: var(--fg-muted);
  max-width: 720px;
}

.legal-text h3 {
  margin-top: 4vh;
  margin-bottom: 1vh;
  font-size: 1rem;
  color: var(--fg);
}

.legal-text p {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* --- Contact --- */
.contact-email {
  font-family: var(--mono);
  font-size: clamp(0.9rem, 1.2vw, 1.1rem);
  letter-spacing: 0.05em;
  color: var(--fg-muted);
  transition: color 0.3s var(--ease), letter-spacing 0.3s var(--ease);
  display: inline-block;
}

.contact-email:hover {
  color: var(--fg);
  letter-spacing: 0.08em;
}

/* --- Secure Form --- */
.secure-form {
  max-width: 480px;
  margin-top: 4vh;
}

.secure-form .form-group { margin-bottom: 2rem; }

.secure-form label {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-faint);
  margin-bottom: 0.5rem;
}

.secure-form input,
.secure-form textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  font-family: var(--serif);
  font-size: 1rem;
  padding: 0.6rem 0;
  color: var(--fg);
  outline: none;
  transition: border-color 0.3s var(--ease);
}

.secure-form input:focus,
.secure-form textarea:focus {
  border-color: var(--fg-muted);
}

.secure-form textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.secure-form button {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: none;
  border: 1px solid var(--border);
  padding: 0.8rem 2rem;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.secure-form button:hover {
  border-color: var(--fg);
  color: var(--fg);
}

/* --- Footer --- */
.page-footer {
  padding: 8vh 8vw 4vh;
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-faint);
  border-top: 1px solid var(--border);
  background: var(--bg-dark);
}

.footer-nav {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-bottom: 4vh;
}

.footer-nav a {
  transition: color 0.3s var(--ease), letter-spacing 0.3s var(--ease);
}

.footer-nav a:hover {
  color: var(--fg);
  letter-spacing: 0.14em;
}

.footer-nav a.active {
  color: var(--fg);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-footer a { transition: color 0.3s; }
.page-footer a:hover { color: var(--fg); }

@media (max-width: 768px) {
  .footer-nav {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.8rem 1.5rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* --- Contact People --- */
.contact-list {
  margin-top: 4vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
}

.contact-person {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.2rem;
}

.contact-person .photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(100%);
  opacity: 0.85;
  transition: filter 0.4s var(--ease), opacity 0.4s var(--ease);
  flex-shrink: 0;
}

.contact-person:hover .photo {
  filter: grayscale(0%);
  opacity: 1;
}

.contact-person .info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.contact-person .name {
  font-size: 1.05rem;
  color: var(--fg);
  font-weight: 400;
}

.contact-person .email {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: var(--fg-faint);
  transition: color 0.3s var(--ease);
}

.contact-person .email:hover {
  color: var(--fg);
}

@media (max-width: 768px) {
  .contact-list {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* --- Team Grid (animated) --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 6vh;
  position: relative;
}

/* Connecting line behind photos */
.team-grid::before {
  content: '';
  position: absolute;
  top: 70px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), var(--border), transparent);
  z-index: 0;
}

.team-card {
  text-align: center;
  position: relative;
  z-index: 1;
  cursor: default;
}

.team-avatar {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 1.5rem;
}

/* Spinning ring on hover */
.team-avatar::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: var(--fg-faint);
  border-right-color: var(--fg-faint);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  animation: spin-ring 4s linear infinite;
  pointer-events: none;
}

.team-card:hover .team-avatar::after {
  opacity: 1;
}

@keyframes spin-ring {
  to { transform: rotate(360deg); }
}

/* Photo clip-path reveal */
.team-photo-wrap {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  clip-path: circle(0% at 50% 50%);
  transition: clip-path 1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 0.15s);
}

.team-card.visible .team-photo-wrap {
  clip-path: circle(50% at 50% 50%);
}

.team-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  opacity: 0.8;
  transform: scale(1.1);
  transition: filter 0.6s var(--ease), opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.team-card:hover .team-photo-wrap img {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1);
}

/* Node dot below avatar */
.team-card::after {
  content: '';
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border);
  margin: -0.8rem auto 1rem;
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s var(--ease), background 0.4s var(--ease), transform 0.4s var(--ease);
  transition-delay: calc(var(--i, 0) * 0.15s + 0.6s);
}

.team-card.visible::after {
  opacity: 1;
}

.team-card:hover::after {
  background: var(--fg-muted);
  transform: scale(1.6);
}

/* Name & role — staggered fade-in */
.team-name {
  display: block;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--fg);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: calc(var(--i, 0) * 0.15s + 0.4s);
}

.team-card.visible .team-name {
  opacity: 1;
  transform: translateY(0);
}

.team-card:hover .team-name {
  transform: translateY(-2px);
}

.team-role {
  display: block;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-top: 0.3rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), color 0.4s var(--ease);
  transition-delay: calc(var(--i, 0) * 0.15s + 0.55s);
}

.team-card.visible .team-role {
  opacity: 1;
  transform: translateY(0);
}

.team-card:hover .team-role {
  color: var(--fg-muted);
}

/* Team responsive */
@media (max-width: 768px) {
  .team-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem 1.5rem;
  }
  .team-grid::before { display: none; }
  .team-card::after { display: none; }
  .team-avatar { width: 110px; height: 110px; }
}

@media (max-width: 480px) {
  .team-grid { grid-template-columns: 1fr; gap: 4rem; }
  .team-avatar { width: 120px; height: 120px; }
}

/* --- Visualization Canvases --- */
.viz-container {
  width: 100%;
  margin: 4vh 0;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.viz-container.visible {
  opacity: 1;
  transform: translateY(0);
}

.viz-container canvas {
  display: block;
  width: 100%;
}

.viz-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4vw;
  margin: 4vh 0;
}

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

/* --- D3FC Charts --- */
.d3fc-wrap {
  width: 100%;
  position: relative;
}

.d3fc-chart {
  height: 380px;
  width: 100%;
}

.d3fc-chart--sm {
  height: 220px;
}

/* --- Section Graphics --- */
.section-graphic-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

#convergence-canvas,
#flow-canvas,
#network-canvas,
#walks-canvas,
#constraints-canvas,
#trajectory-canvas,
#branching-canvas,
#ripple-canvas {
  display: block;
  width: 100%;
}

/* Geometric accent — animated line + delta */
.geo-accent {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2vh 0;
}

.geo-line {
  display: block;
  height: 1px;
  width: 0;
  background: linear-gradient(90deg, transparent, var(--border));
  transition: width 1.8s var(--ease);
}

.geo-line--right {
  background: linear-gradient(90deg, var(--border), transparent);
}

.reveal.visible .geo-line {
  width: 100px;
}

.geo-delta {
  font-size: 2.4rem;
  font-weight: 300;
  color: var(--fg-faint);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 1s var(--ease) 0.6s, transform 1s var(--ease) 0.6s;
}

.reveal.visible .geo-delta {
  opacity: 1;
  transform: scale(1);
}

@media (max-width: 600px) {
  .geo-delta { font-size: 1.8rem; }
  .reveal.visible .geo-line { width: 60px; }
}

.section-graphic {
  display: block;
  max-width: 100%;
  height: auto;
  width: 100%;
}

.section-graphic--full {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  height: auto;
  min-height: 120px;
}

.chart-label {
  display: block;
  margin-top: 0.8rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

/* d3fc layout */
d3fc-group {
  display: flex;
  height: 100%;
  width: 100%;
}

/* Axes */
.d3fc-chart .x-axis text,
.d3fc-chart .y-axis text {
  font-family: var(--mono);
  font-size: 10px;
  fill: var(--fg-faint);
}

.d3fc-chart .x-axis .domain,
.d3fc-chart .y-axis .domain {
  stroke: var(--border);
}

.d3fc-chart .x-axis .tick line,
.d3fc-chart .y-axis .tick line {
  stroke: var(--border);
  stroke-opacity: 0.5;
}

/* Candlestick */
.d3fc-chart .up path {
  fill: var(--bg);
  stroke: var(--fg-muted);
  stroke-width: 1;
}

.d3fc-chart .down path {
  fill: var(--fg);
  stroke: var(--fg);
  stroke-width: 1;
}

/* Streaming line */
.d3fc-chart .line path {
  stroke: var(--fg-muted);
  stroke-width: 1.5;
  fill: none;
}

.d3fc-chart .area path {
  fill: rgba(17, 17, 17, 0.04);
  stroke: none;
}

/* --- Memo Blocks (Insights) --- */
.memo-block {
  max-width: 720px;
}

.memo-classification {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--fg-faint);
  border: 1px solid var(--border);
  padding: 0.25em 0.8em;
  margin-bottom: 2.5vh;
}

.memo-block h2 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  margin-bottom: 0;
}

.memo-block p {
  line-height: 1.9;
}

/* --- Principle Blocks --- */
.principle-block {
  max-width: 720px;
  padding-left: 2rem;
  border-left: 1px solid var(--border);
}

.principle-number {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--fg-faint);
}

.principle-block h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  margin-top: 0.5rem;
  font-style: italic;
}

.principle-block p {
  line-height: 1.9;
}

/* --- FAQ --- */
.faq-item {
  max-width: 720px;
  padding: 3vh 0;
  border-bottom: 1px solid var(--border);
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-question {
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  font-weight: 400;
  margin-bottom: 1rem;
  color: var(--fg);
}

.faq-answer {
  line-height: 1.9;
  color: var(--fg-muted);
}

/* --- Globe Canvas --- */
#globe-canvas {
  width: 100%;
  display: block;
}

/* ==========================================
   TICKER TAPE
   ========================================== */
.ticker-tape {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 30px;
  background: #0a0a0a;
  z-index: 9995;
  overflow: hidden;
  border-bottom: 1px solid #1a1a1a;
}

body.has-ticker {
  padding-top: 30px;
}

body.has-ticker .scroll-progress { top: 30px; }
body.has-ticker .nav-trigger { top: calc(30px + 2rem); }
body.has-ticker .key-hint { /* unchanged */ }
body.has-ticker .page-loader { top: 0; }
body.has-ticker .cmd-palette { top: calc(30px + 15vh); }

.ticker-track {
  display: flex;
  align-items: center;
  height: 100%;
  white-space: nowrap;
  animation: ticker-scroll 90s linear infinite;
  will-change: transform;
}

.ticker-tape:hover .ticker-track {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.tk-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 20px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: #666;
  border-right: 1px solid #1a1a1a;
  height: 100%;
}

.tk-sym {
  color: #999;
  font-weight: 400;
}

.tk-price {
  color: #bbb;
}

.tk-up {
  color: #4a9e4a;
}

.tk-down {
  color: #c45454;
}

/* ==========================================
   SCREENER TABLE
   ========================================== */
.screener-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  margin: 3vh 0;
}

.screener-search-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 200px;
}

#screener-search {
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.6rem 1rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg);
  outline: none;
  width: 100%;
  max-width: 360px;
  transition: border-color 0.3s var(--ease);
  letter-spacing: 0.02em;
}

#screener-search:focus {
  border-color: var(--fg-muted);
}

#screener-search::placeholder {
  color: var(--fg-faint);
}

.screener-count {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--fg-faint);
  white-space: nowrap;
}

.sector-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.sector-filter {
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg-faint);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.sector-filter:hover {
  border-color: var(--fg-muted);
  color: var(--fg-muted);
}

.sector-filter.active {
  border-color: var(--fg);
  color: var(--fg);
  background: var(--bg-dark);
}

.screener-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 2vh 0;
}

#screener-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.75rem;
  white-space: nowrap;
}

#screener-table th {
  text-align: left;
  padding: 0.7rem 1rem;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-faint);
  border-bottom: 1px solid var(--fg-muted);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
  position: sticky;
  top: 0;
  background: var(--bg);
}

#screener-table th:hover {
  color: var(--fg);
}

#screener-table th.sort-asc::after {
  content: ' \25B2';
  font-size: 0.5rem;
}

#screener-table th.sort-desc::after {
  content: ' \25BC';
  font-size: 0.5rem;
}

#screener-table td {
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: 0.75rem;
}

#screener-table tr:hover td {
  background: var(--bg-dark);
}

#screener-table .sc-sym {
  color: var(--fg);
  font-weight: 400;
}

#screener-table .sc-name {
  color: var(--fg-faint);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

#screener-table .sc-sector {
  color: var(--fg-faint);
  font-size: 0.65rem;
}

.screener-up { color: #4a9e4a; }
.screener-down { color: #c45454; }

/* ==========================================
   SENTIMENT GAUGE
   ========================================== */
#sentiment-gauge {
  margin-top: 3vh;
}

.sent-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2.5vh;
}

.sent-score-wrap {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.sent-score {
  font-family: var(--mono);
  font-size: 3rem;
  font-weight: 300;
  line-height: 1;
}

.sent-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.sent-xfear { color: #c45454; }
.sent-fear { color: #d4836a; }
.sent-neutral { color: var(--fg-muted); }
.sent-greed { color: #7ab648; }
.sent-xgreed { color: #4a9e4a; }

.sent-bar-wrap {
  margin-bottom: 3vh;
  max-width: 500px;
}

.sent-bar {
  height: 6px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}

.sent-fill {
  height: 100%;
  background: linear-gradient(90deg, #c45454 0%, #d4836a 25%, #999 50%, #7ab648 75%, #4a9e4a 100%);
  transition: width 0.8s var(--ease);
}

.sent-scale {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.55rem;
  color: var(--fg-faint);
  margin-top: 0.4rem;
}

.sent-indicators {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2vh;
}

.sent-ind {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.sent-ind-label {
  font-family: var(--mono);
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-faint);
}

.sent-ind-val {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--fg);
}

/* --- Delta Breathe --- */
.delta-breathe {
  animation: breathe 8s var(--ease-in-out) infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 1; }
}

/* --- Risk Page Overrides --- */
body.risk-page .section { padding: 10vh 8vw; }
body.risk-page h2 { font-weight: 500; }
body.risk-page .content-block p { line-height: 1.9; }

/* --- Scroll Progress --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 1px;
  background: var(--fg-faint);
  z-index: 200;
  transform-origin: left;
  transform: scaleX(0);
  width: 100%;
  opacity: 0.3;
}

/* --- Page Loader --- */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease);
}

.page-loader.done {
  opacity: 0;
  pointer-events: none;
}

.page-loader .delta-mark {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 300;
  opacity: 0;
  animation: loader-pulse 1.5s var(--ease-in-out) infinite;
}

@keyframes loader-pulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.6; }
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

/* --- Tablet (max-width: 900px) --- */
@media (max-width: 900px) {
  .section { padding: 8vh 6vw; min-height: auto; }
  .section--full { min-height: 90vh; }
  .section--compact { padding: 6vh 6vw; }

  #arch-canvas { height: 350px; }
  #globe-canvas { height: 320px; }

  .arch-node { padding: 1.2rem 1.5rem; }
  .arch-connector { margin-left: 2rem; }

  body.risk-page .section { padding: 8vh 6vw; }
}

/* --- Mobile (max-width: 600px) --- */
@media (max-width: 600px) {
  html { font-size: 15px; }

  .section {
    padding: 6vh 5vw;
    min-height: auto;
  }

  .section--full {
    min-height: 85vh;
    padding: 10vh 5vw;
  }

  .section--compact { padding: 5vh 5vw; }

  /* Hero */
  .hero {
    min-height: 85vh;
    padding: 0 5vw;
  }

  .hero-delta {
    font-size: clamp(3rem, 15vw, 5rem);
  }

  .hero-wordmark {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    margin-top: 1rem;
  }

  .hero-philosophy {
    margin-top: 4vh;
    padding: 0 2vw;
    font-size: 1rem;
  }

  /* Typography */
  h1 { font-size: clamp(1.8rem, 7vw, 2.4rem); }
  h2 { font-size: clamp(1.4rem, 5vw, 1.8rem); }
  h3 { font-size: clamp(1.1rem, 4vw, 1.3rem); }

  p { font-size: 0.95rem; }

  /* Nav trigger — larger tap target on mobile */
  .nav-trigger {
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
  }

  /* Hide Ctrl+K hint and scroll indicator on mobile */
  .key-hint { display: none; }
  .scroll-indicator { display: none; }

  /* Command palette — full width on mobile */
  .cmd-palette {
    top: 10vh;
    width: 94vw;
  }

  .cmd-palette input {
    font-size: 0.9rem;
    padding: 1rem 1.2rem;
  }

  .cmd-palette-results li {
    padding: 0.9rem 1.2rem;
    font-size: 0.75rem;
  }

  .cmd-palette-results {
    max-height: 50vh;
  }

  /* Grids — already 1fr via 768px rule */

  /* Architecture */
  #arch-canvas { height: 260px; }
  #globe-canvas { height: 260px; }

  .arch-node {
    padding: 1rem 1.2rem;
  }

  .arch-node h4 { font-size: 0.7rem; }
  .arch-node p { font-size: 0.85rem; }

  .arch-connector { margin-left: 1.5rem; }

  /* Contact */
  .contact-list {
    gap: 1.5rem;
  }

  .contact-person {
    gap: 1rem;
  }

  .contact-person .photo {
    width: 48px;
    height: 48px;
  }

  .contact-person .name { font-size: 0.95rem; }

  .contact-person .email {
    font-size: 0.65rem;
    word-break: break-all;
  }

  /* Visualization canvases — allow horizontal scroll on very small screens */
  .viz-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 3vh 0;
  }

  .viz-container canvas {
    min-width: 320px;
  }

  .viz-row {
    gap: 3vh;
    margin: 3vh 0;
  }

  /* d3fc charts */
  .d3fc-chart { height: 260px; }
  .d3fc-chart--sm { height: 180px; }

  /* Secure form */
  .secure-form { max-width: 100%; }

  .secure-form button {
    width: 100%;
    padding: 0.9rem 2rem;
  }

  /* Footer */
  .page-footer {
    padding: 5vh 5vw 3vh;
  }

  .footer-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
  }

  .footer-nav a {
    font-size: 0.6rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
    margin-top: 2vh;
  }

  /* Divider */
  .divider { margin: 2vh 0; }

  /* Section label */
  .section-label { font-size: 0.6rem; }

  /* Content blocks */
  .content-block { margin-bottom: 4vh; }

  /* Disclosure */
  .disclosure-content.open { max-height: 800px; }

  /* Legal */
  .legal-text { font-size: 0.85rem; }
  .legal-text h3 { margin-top: 3vh; }

  /* Memo blocks */
  .memo-block h2 { font-size: clamp(1.2rem, 5vw, 1.6rem); }
  .memo-classification { font-size: 0.55rem; }

  /* Principle blocks */
  .principle-block h2 { font-size: clamp(1.1rem, 5vw, 1.5rem); }

  /* FAQ */
  .faq-item { padding: 2.5vh 0; }
  .faq-question { font-size: clamp(1rem, 4vw, 1.2rem); }
  .faq-answer { font-size: 0.9rem; }

  /* Risk page */
  body.risk-page .section { padding: 6vh 5vw; }

  /* Scroll progress — slightly thicker for visibility */
  .scroll-progress { height: 2px; }

  /* Ticker — smaller on mobile */
  .ticker-tape { height: 26px; }
  body.has-ticker { padding-top: 26px; }
  body.has-ticker .scroll-progress { top: 26px; }
  body.has-ticker .nav-trigger { top: calc(26px + 1rem); }
  .tk-item { padding: 0 12px; font-size: 9px; gap: 4px; }

  /* Screener */
  .screener-controls { flex-direction: column; gap: 1rem; }
  .screener-search-wrap { width: 100%; }
  #screener-search { max-width: 100%; }
  .sector-filters { width: 100%; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .sector-filter { flex-shrink: 0; font-size: 0.6rem; padding: 0.35rem 0.6rem; }
  #screener-table { font-size: 0.7rem; }
  #screener-table th { font-size: 0.55rem; padding: 0.5rem 0.6rem; }
  #screener-table td { padding: 0.45rem 0.6rem; font-size: 0.7rem; }
  #screener-table .sc-name { display: none; }

  /* Sentiment */
  .sent-score { font-size: 2.2rem; }
  .sent-indicators { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .sent-ind-val { font-size: 0.8rem; }
}

/* ============================================
   BLOG SIDEBARS — MULTIPLE VARIANTS
   ============================================ */

.article-container {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.article-container > .reveal {
  flex: 1;
  min-width: 0;
}

.article-container article {
  max-width: none;
}

/* --- Sidebar Container --- */
.blog-sidebar {
  flex: 0 0 260px;
  font-size: 0.9rem;
  line-height: 1.6;
  position: sticky;
  top: 8vh;
}

/* --- Variant A: Accent Border --- */
.blog-sidebar.variant-a {
  border-left: 5px solid #111;
  padding-left: 1.2rem;
  padding: 1.2rem;
  padding-left: 1.2rem;
  border-left: 5px solid #111;
  background: rgba(17, 17, 17, 0.02);
  margin-left: -1.2rem;
}

.blog-sidebar.variant-a h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #333;
  margin-bottom: 1rem;
  margin-top: 0;
  font-family: var(--mono);
  font-weight: 400;
}

.blog-sidebar.variant-a .sidebar-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.blog-sidebar.variant-a .sidebar-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* --- Variant B: Minimal --- */
.blog-sidebar.variant-b {
  border-top: 2px solid #d0d0d0;
  padding-top: 1.2rem;
  background: transparent;
}

.blog-sidebar.variant-b h3 {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 1rem;
  margin-top: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.02em;
}

.blog-sidebar.variant-b .sidebar-item {
  margin-bottom: 1.5rem;
}

.blog-sidebar.variant-b .sidebar-item:last-child {
  margin-bottom: 0;
}

/* --- Variant C: Bold --- */
.blog-sidebar.variant-c {
  background: #f8f8f8;
  padding: 1.2rem;
  border: 1px solid #ddd;
}

.blog-sidebar.variant-c h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #111;
  margin-bottom: 1rem;
  margin-top: 0;
  font-family: var(--mono);
  font-weight: 400;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.8rem;
}

.blog-sidebar.variant-c .sidebar-item {
  margin-bottom: 1.2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid #efefef;
}

.blog-sidebar.variant-c .sidebar-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* --- Sidebar Content --- */
.sidebar-item-content {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.6;
}

.sidebar-item-content ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-item-content li {
  margin-bottom: 0.6rem;
  padding-left: 1rem;
  position: relative;
}

.sidebar-item-content li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: #aaa;
}

.sidebar-item-content p {
  margin: 0;
}

.sidebar-item-content a {
  color: #111;
  text-decoration: underline;
  transition: opacity 0.3s;
}

.sidebar-item-content a:hover {
  opacity: 0.7;
}

@media (max-width: 1100px) {
  .article-container {
    flex-direction: column;
    gap: 3rem;
  }

  .blog-sidebar {
    flex: 1;
    position: static;
  }
}

/* --- Very small screens (max-width: 380px) --- */
@media (max-width: 380px) {
  .section { padding: 5vh 4vw; }
  .section--full { padding: 8vh 4vw; }
  .section--compact { padding: 4vh 4vw; }

  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }

  .hero-delta { font-size: 3rem; }
  .hero-philosophy { font-size: 0.9rem; }

  .footer-nav {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .contact-person .email { font-size: 0.6rem; }

  #arch-canvas,
  #globe-canvas { height: 200px; }
}

/* --- Touch device adjustments --- */
@media (hover: none) {
  .hover-underline::after { display: none; }
  .content-block h3:hover { letter-spacing: -0.01em; }
  .footer-nav a:hover { letter-spacing: 0.1em; }
  .contact-person .photo {
    filter: grayscale(50%);
    opacity: 0.9;
  }
}

/* --- Landscape mobile --- */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { min-height: auto; padding: 8vh 8vw; }
  .section--full { min-height: auto; }
  .hero-delta { font-size: 3rem; }
  .hero-philosophy { margin-top: 2vh; }
}

/* ============================================
   COOKIE NOTICE STYLING
   ============================================ */
.cookie-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--fg);
  color: var(--bg);
  padding: 1.5rem 2rem;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
  font-size: clamp(0.85rem, 1vw, 0.95rem);
  line-height: 1.6;
  z-index: 999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.cookie-notice.hidden {
  display: none;
}

.cookie-notice-content {
  flex: 1;
  max-width: 1000px;
}

.cookie-notice a {
  color: var(--bg);
  text-decoration: underline;
  transition: opacity 0.3s var(--ease);
}

.cookie-notice a:hover {
  opacity: 0.8;
}

.cookie-notice-actions {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.cookie-accept {
  background: var(--bg);
  color: var(--fg);
  border: none;
  padding: 0.7rem 1.5rem;
  font-family: var(--serif);
  font-size: clamp(0.85rem, 1vw, 0.95rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
}

.cookie-accept:hover {
  opacity: 0.85;
}

.cookie-learn-more {
  background: transparent;
  color: var(--bg);
  border: 1px solid var(--bg);
  padding: 0.7rem 1.5rem;
  font-family: var(--serif);
  font-size: clamp(0.85rem, 1vw, 0.95rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
  display: inline-block;
}

.cookie-learn-more:hover {
  background: var(--bg);
  color: var(--fg);
}

@media (max-width: 768px) {
  .cookie-notice {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .cookie-notice-actions {
    width: 100%;
    flex-direction: column;
  }

  .cookie-accept,
  .cookie-learn-more {
    flex: 1;
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .cookie-notice {
    padding: 1rem 1.25rem;
    gap: 0.75rem;
  }

  .cookie-notice-content {
    font-size: 0.8rem;
  }

  .cookie-accept {
    font-size: 0.75rem;
    padding: 0.6rem 1rem;
  }
}

/* ============================================
   PRINT STYLESHEET
   ============================================ */
@media print {
  /* Hide interactive and navigation elements */
  nav,
  footer,
  .page-loader,
  .scroll-progress,
  .cookie-notice,
  .cta-button,
  button,
  [role="button"],
  .interactive,
  .animation,
  .slide-show,
  .carousel,
  .modal,
  .popup {
    display: none !important;
  }

  /* Color adjustments for print */
  body,
  .section,
  article {
    background: #fff !important;
    color: #000 !important;
  }

  a {
    color: #000 !important;
    text-decoration: underline;
  }

  /* Show URLs for external links */
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-family: var(--mono);
    font-size: 0.8em;
  }

  /* Page breaks */
  .section,
  article {
    page-break-inside: avoid;
  }

  h1, h2, h3 {
    page-break-after: avoid;
  }

  /* Typography adjustments */
  body {
    font-size: 11pt;
    line-height: 1.5;
  }

  h1 {
    font-size: 24pt;
    margin-bottom: 0.5em;
  }

  h2 {
    font-size: 18pt;
    margin-bottom: 0.4em;
    margin-top: 1em;
  }

  h3 {
    font-size: 14pt;
    margin-bottom: 0.3em;
  }

  p {
    margin-bottom: 1em;
    max-width: none;
  }

  /* Images and media */
  img,
  svg {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Tables */
  table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
  }

  th, td {
    border: 1px solid #000;
    padding: 0.5em;
    text-align: left;
  }

  /* Lists */
  ul, ol {
    margin-left: 2em;
    margin-bottom: 1em;
  }

  li {
    margin-bottom: 0.3em;
  }

  /* Code blocks */
  pre, code {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 0.5em;
    font-size: 10pt;
    overflow: visible;
  }

  /* Accessibility */
  .sr-only {
    position: static;
    clip: auto;
    width: auto;
    height: auto;
  }

  /* No backgrounds for print */
  * {
    background-attachment: fixed !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  /* Margin and padding adjustments */
  body {
    margin: 0;
    padding: 0;
  }

  .section {
    padding: 0;
    margin: 0 0 2em 0;
  }

  /* Special styling for specific content */
  .glossary-term {
    page-break-inside: avoid;
    margin-bottom: 1em;
    border-bottom: 1px solid #ddd;
    padding-bottom: 1em;
  }

  /* Header with title */
  @page {
    margin: 1in;
    @bottom-center {
      content: "Page " counter(page);
      font-size: 10pt;
    }
  }
}
