@import url("tokens.css");

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-body);
  line-height: 1.65;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.container { width: var(--container); margin-inline: auto; }
.container-wide { width: var(--container-wide); margin-inline: auto; }

/* Typography */
h1, .h1 { font-size: var(--text-h1); line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; color: var(--navy); margin: 0 0 var(--space-4); }
h2, .h2 { font-size: var(--text-h2); line-height: 1.25; font-weight: 650; letter-spacing: -0.015em; color: var(--navy); margin: 0 0 var(--space-4); }
h3, .h3 { font-size: var(--text-h3); line-height: 1.3; font-weight: 600; color: var(--navy); margin: 0 0 var(--space-3); }
.display { font-size: var(--text-display); line-height: 1.1; font-weight: 700; letter-spacing: -0.03em; color: var(--navy); }
.lead { font-size: 1.2rem; line-height: 1.55; color: var(--muted); max-width: 40rem; }
.eyebrow { font-size: var(--text-label); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal-dark); margin: 0 0 var(--space-3); }
.muted { color: var(--muted); }
.prose { max-width: var(--prose-width); }
.prose p { margin: 0 0 var(--space-4); }
.prose ul, .prose ol { margin: 0 0 var(--space-4); padding-left: 1.25rem; }

/* Header */
.site-header {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 200;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-5); min-height: var(--header-h); padding: var(--space-2) 0;
}
.logo img { height: 32px; width: auto; }
.main-nav ul { display: flex; gap: var(--space-1); list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.main-nav a {
  color: var(--navy); font-weight: 500; font-size: var(--text-small);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
}
.main-nav a:hover, .main-nav a.active { color: var(--teal-dark); background: var(--teal-soft); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); cursor: pointer; font-size: 1.1rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 0.7rem 1.2rem; border-radius: var(--radius-md); font-weight: 600; font-size: var(--text-small);
  border: 1.5px solid transparent; cursor: pointer; transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
  text-decoration: none; line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); box-shadow: var(--shadow-sm); }
.btn-secondary, .btn-outline { background: transparent; color: var(--navy); border-color: var(--border); }
.btn-secondary:hover, .btn-outline:hover { border-color: var(--navy); background: var(--surface-alt); }
.btn-ghost { background: transparent; color: var(--navy); border-color: transparent; }
.btn-ghost:hover { background: var(--surface-alt); }
.btn-danger { background: var(--alert); color: #fff; border-color: var(--alert); }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-loading { position: relative; pointer-events: none; opacity: 0.75; }

/* Sections */
.section { padding: var(--space-8) 0; }
.section-alt { background: var(--surface-alt); }
.section-navy { background: var(--navy); color: #fff; }
.section-navy h2, .section-navy .h2, .section-navy a { color: #fff; }
.section-intro { color: var(--muted); max-width: 40rem; margin-bottom: var(--space-6); }
.page-hero {
  padding: var(--space-9) 0 var(--space-7);
  background: linear-gradient(180deg, var(--surface-alt) 0%, var(--surface) 100%);
  border-bottom: 1px solid var(--border);
}
.page-hero .lead { margin-bottom: var(--space-5); }

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-5);
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); border-color: #d0d7de; }
.card h3 { margin-top: 0; }
.card p { color: var(--muted); font-size: var(--text-small); margin: 0 0 var(--space-3); }

/* Badges */
.badge {
  display: inline-flex; align-items: center;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 0.25rem 0.55rem; border-radius: var(--radius-sm); text-transform: uppercase;
}
.badge-production { background: #dcfce7; color: #166534; }
.badge-production-adjacent { background: var(--teal-soft); color: #0d7a68; }
.badge-research { background: #e8f0fe; color: #1a56db; }
.badge-concept { background: #fef3e8; color: #c2410c; }
.badge-simulation { background: #f3e8ff; color: #6b21a8; }
.badge-deployed { background: #dcfce7; color: #14532d; }

/* Forms — unified system */
.form-group, .field { margin-bottom: var(--space-5); }
.field-label, .form-group label {
  display: block; font-size: var(--text-label); font-weight: 600; color: var(--navy);
  margin-bottom: var(--space-2);
}
.field-hint { display: block; font-size: var(--text-small); color: var(--muted); margin-top: var(--space-2); }
.field-error {
  display: block; font-size: var(--text-small); color: var(--alert); margin-top: var(--space-2); font-weight: 500;
}
.form-control, .field-input, input[type="text"], input[type="email"], input[type="password"],
input[type="url"], input[type="tel"], input[type="number"], input[type="file"],
select, textarea {
  width: 100%; max-width: 100%;
  padding: 0.75rem 0.9rem;
  font: inherit; font-size: var(--text-body); color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:hover { border-color: #c5ced6; }
.form-control:focus, .field-input:focus, input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(16, 191, 165, 0.2);
}
.form-control.is-invalid, .field-invalid {
  border-color: var(--alert);
  box-shadow: 0 0 0 3px rgba(255, 51, 102, 0.15);
}
.form-control.is-valid { border-color: #22c55e; }
.form-control:disabled { background: var(--offwhite); color: var(--muted); cursor: not-allowed; }
textarea.form-control { min-height: 120px; resize: vertical; }
.form-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-5); }
.alert {
  padding: var(--space-4); border-radius: var(--radius-md); margin-bottom: var(--space-5);
  border: 1px solid var(--border); font-size: var(--text-small);
}
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-warning { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-info { background: var(--teal-soft); border-color: #a7e8db; color: #0d7a68; }

/* Continuum pipeline */
.continuum-flow {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: var(--space-5) 0;
}
.continuum-step {
  background: var(--navy); color: #fff; font-size: var(--text-small); font-weight: 600;
  padding: 0.5rem 0.85rem; border-radius: var(--radius-sm); letter-spacing: 0.02em;
}
.continuum-arrow { color: var(--muted); font-weight: 600; }
.maturity-note { font-size: var(--text-small); color: var(--muted); font-style: italic; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); }
table.data { width: 100%; border-collapse: collapse; font-size: var(--text-small); }
table.data th, table.data td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
table.data th { background: var(--surface-alt); font-weight: 600; color: var(--navy); }
table.data tr:last-child td { border-bottom: 0; }

/* Footer */
.site-footer {
  background: var(--navy); color: rgba(255,255,255,.85); padding: var(--space-8) 0 var(--space-5); margin-top: var(--space-8);
}
.site-footer a { color: rgba(255,255,255,.8); }
.site-footer a:hover { color: var(--teal); }
.site-footer h4 {
  color: #fff; font-size: var(--text-label); letter-spacing: 0.06em; text-transform: uppercase;
  margin: 0 0 var(--space-4);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: var(--space-2); font-size: var(--text-small); }
.footer-grid, .footer-grid-6 {
  display: grid; gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-bottom: var(--space-6);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding-top: var(--space-5); margin-top: var(--space-5);
  font-size: var(--text-small); color: rgba(255,255,255,.65);
}
.footer-brand-tag { font-size: 1rem; color: rgba(255,255,255,.9); max-width: 28rem; margin-bottom: var(--space-6); }
.tagline { font-size: var(--text-small); color: rgba(255,255,255,.7); line-height: 1.5; }
kbd {
  font-family: var(--font-mono); font-size: 0.75em;
  border: 1px solid rgba(255,255,255,.25); padding: 0.1em 0.35em; border-radius: 4px;
}

/* Home narrative */
.home-hero {
  padding: var(--space-10) 0 var(--space-8);
  background:
    radial-gradient(ellipse 80% 60% at 70% 0%, rgba(16,191,165,.12), transparent 55%),
    linear-gradient(180deg, var(--surface-alt), var(--surface));
}
.home-hero .display { margin-bottom: var(--space-4); }
.home-cta { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.pipeline-vertical {
  display: grid; gap: 0; max-width: 280px;
}
.pipeline-vertical .step {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) 0; border-left: 2px solid var(--teal); padding-left: var(--space-4);
  font-weight: 600; font-size: var(--text-small); color: var(--navy);
}
.two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-7); align-items: start;
}
@media (max-width: 800px) {
  .two-col { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .main-nav.is-open { display: block; position: absolute; left: 0; right: 0; top: var(--header-h);
    background: #fff; border-bottom: 1px solid var(--border); padding: var(--space-4); }
  .main-nav.is-open ul { flex-direction: column; }
  .nav-toggle { display: inline-flex; }
  .home-hero { padding: var(--space-8) 0 var(--space-6); }
}

/* Command palette hint */
.cmd-hint { font-size: 0.75rem; color: var(--muted); }

/* Status strip */
.footer-status-strip { font-size: 0.8rem; display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; }

/* Mega navigation */
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; align-items: center; flex-wrap: wrap; }
.nav-item { position: relative; }
.nav-item > a {
  display: block; padding: 0.55rem 0.75rem; color: var(--text); text-decoration: none;
  font-weight: 500; font-size: 0.92rem; border-radius: var(--radius-sm);
}
.nav-item > a:hover, .nav-item:focus-within > a { background: var(--surface-alt); color: var(--teal-dark, #0f766e); }
.mega-panel {
  display: none; position: absolute; top: 100%; left: 0; min-width: 520px;
  background: var(--surface, #fff); border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius-md, 10px); box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
  padding: 1.25rem; z-index: 50;
}
.mega-panel-sm { min-width: 220px; display: none; flex-direction: column; gap: 0.35rem; }
.mega-panel-sm a { display: block; padding: 0.4rem 0.5rem; color: var(--text); text-decoration: none; border-radius: 6px; font-size: 0.9rem; }
.mega-panel-sm a:hover { background: var(--surface-alt); }
.nav-item.has-mega:hover > .mega-panel,
.nav-item.has-mega:focus-within > .mega-panel { display: block; }
.nav-item.has-mega:hover > .mega-panel-sm,
.nav-item.has-mega:focus-within > .mega-panel-sm { display: flex; }
.mega-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.mega-heading { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 0.5rem; font-weight: 600; }
.mega-grid a { display: block; padding: 0.35rem 0; color: var(--text); text-decoration: none; font-size: 0.9rem; }
.mega-grid a:hover { color: var(--teal-dark, #0f766e); }
@media (max-width: 900px) {
  .mega-panel, .mega-panel-sm { position: static; min-width: 0; box-shadow: none; border: 0; padding: 0.25rem 0 0.5rem 0.75rem; display: none; }
  .nav-item.has-mega.open > .mega-panel,
  .nav-item.has-mega.open > .mega-panel-sm { display: block; }
  .mega-grid { grid-template-columns: 1fr 1fr; }
}

/* Image shape system */
.img-frame { overflow: hidden; background: var(--surface-alt, #0a1628); }
.img-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-rect { border-radius: 12px; aspect-ratio: 16/10; }
.img-wide { border-radius: 16px; aspect-ratio: 21/9; }
.img-square { border-radius: 16px; aspect-ratio: 1; }
.img-portrait { border-radius: 16px; aspect-ratio: 3/4; }
.img-circle { border-radius: 50%; aspect-ratio: 1; }
.img-hex { clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%); aspect-ratio: 1; }
.img-diamond { clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); aspect-ratio: 1; }
.img-arch { border-radius: 50% 50% 12px 12px; aspect-ratio: 4/5; }
.img-soft { border-radius: 24px; aspect-ratio: 16/10; }
.product-logo-dark { background: #0a0a0a; border-radius: 14px; padding: 10px; }

/* Signed-in chip */
.user-chip { font-size: 0.85rem; color: var(--text); padding: 0.35rem 0.65rem; border-radius: 999px; background: var(--surface-alt); }

/* Product brand heroes */
.product-hero-brand { position: relative; color: #fff; padding: 3.5rem 0 2.5rem; overflow: hidden; }
.product-hero-brand-sm { padding: 2.75rem 0 2rem; }
.product-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.product-hero-inner { position: relative; display: flex; gap: 2rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.product-hero-copy { max-width: 36rem; }
.product-hero-copy h1 { color: #fff; font-size: clamp(1.75rem, 4vw, 2.75rem); margin: 0.35rem 0 0.75rem; }
.product-hero-copy .lead { color: rgba(255,255,255,.88); }
.product-hero-logo img { width: 180px; height: 180px; object-fit: contain; background: #0a0a0a; border-radius: 20px; padding: 12px; border: 1px solid rgba(45,212,191,.25); }
.product-subnav { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.75rem; }
.product-layout { display: grid; grid-template-columns: 1fr 280px; gap: 2rem; align-items: start; }
@media (max-width: 900px) { .product-layout { grid-template-columns: 1fr; } }
.capability-list { display: grid; gap: 0.5rem; padding-left: 1.1rem; }
.brand-card { border-top: 3px solid var(--teal, #2dd4bf); }
.product-card { text-align: center; }
.product-card .product-logo-dark { margin: 0 auto 0.75rem; }
.product-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.text-link { font-weight: 600; color: var(--teal-dark, #0f766e); }
.page-hero-compact { padding-top: 2rem; padding-bottom: 1rem; }

/* ===== Global performance & polish ===== */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--surface);
  line-height: var(--lh-body);
  margin: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; }
img[loading="lazy"] { content-visibility: auto; }
.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }

/* Header elevation */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  min-height: var(--header-h);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: var(--header-h); }
.brand img, .site-logo { height: 36px; width: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.6rem 1.15rem; border-radius: 999px; font-weight: 600; font-size: var(--fs-sm);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--fh-teal-dark); color: #fff; }
.btn-primary:hover { background: #0d9488; box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--fh-teal-dark); color: var(--fh-teal-dark); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.35); }
.btn-outline { background: transparent; color: var(--fh-teal-dark); border-color: var(--fh-teal-dark); }
.btn-sm { padding: 0.35rem 0.75rem; font-size: var(--fs-xs); }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); border-color: rgba(15, 118, 110, 0.25); }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

/* Sections */
.section { padding: var(--space-8) 0; }
.page-hero {
  background: linear-gradient(135deg, var(--fh-navy-deep), var(--fh-navy) 55%, #134e4a);
  color: #fff; padding: 3rem 0 2.5rem;
}
.page-hero h1 { font-size: var(--fs-hero); line-height: var(--lh-tight); margin: 0.25rem 0 0.75rem; color: #fff; }
.page-hero .lead { color: rgba(255,255,255,0.88); max-width: 40rem; font-size: var(--fs-lg); }
.eyebrow {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--fh-teal); margin: 0;
}

/* Hero slider performance */
.hero-slider { position: relative; overflow: hidden; background: var(--fh-navy-deep); color: #fff; min-height: 420px; }
.hero-slide {
  display: none; padding: 4rem 0 3.5rem;
  min-height: 420px;
}
.hero-slide.is-active { display: block; animation: fhFade 0.45s ease; }
@keyframes fhFade { from { opacity: 0.6; } to { opacity: 1; } }
.hero-slide h1 { font-size: var(--fs-hero); color: #fff; max-width: 18ch; }
.hero-dots { display: flex; gap: 0.4rem; justify-content: center; padding: 0 0 1.25rem; }
.hero-dots button {
  width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.35); cursor: pointer;
}
.hero-dots button[aria-selected="true"] { background: var(--fh-teal); }

/* Forms */
.form-control {
  width: 100%; padding: 0.65rem 0.85rem; border: 1px solid var(--border);
  border-radius: var(--radius-md); font: inherit; background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
  outline: none; border-color: var(--fh-teal-dark);
  box-shadow: 0 0 0 3px var(--fh-teal-soft);
}
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: var(--fs-sm); }
.field-hint { display: block; font-size: var(--fs-xs); color: var(--muted); margin-top: 0.25rem; }
.alert { padding: 0.85rem 1rem; border-radius: var(--radius-md); margin-bottom: 1rem; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: #f0fdfa; color: #115e59; border: 1px solid #99f6e4; }

/* Footer brand */
.site-footer {
  background: var(--fh-navy-deep); color: rgba(255,255,255,0.85);
  padding: 3rem 0 1.5rem; margin-top: 3rem;
}
.site-footer a { color: rgba(255,255,255,0.8); text-decoration: none; }
.site-footer a:hover { color: var(--fh-teal); }
.footer-grid-6 {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1.5rem;
}
.footer-grid-6 h4 { color: #fff; font-size: var(--fs-sm); margin: 0 0 0.75rem; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); }
table.data { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
table.data th, table.data td { padding: 0.65rem 0.85rem; text-align: left; border-bottom: 1px solid var(--border); }
table.data th { background: var(--surface-alt); font-weight: 600; }

/* Maturity badges */
.badge {
  display: inline-block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 0.2rem 0.5rem; border-radius: 999px;
}
.badge-production-adjacent, .badge-production { background: #d1fae5; color: #065f46; }
.badge-prototype { background: #e0f2fe; color: #075985; }
.badge-research { background: #ede9fe; color: #5b21b6; }
.badge-concept { background: #ffedd5; color: #9a3412; }
.badge-2050-vision, .badge-vision { background: #fce7f3; color: #9d174d; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-slide.is-active { animation: none; }
  .btn:hover { transform: none; }
}

/* Search experience */
.search-form-hero { display: flex; gap: 0.75rem; flex-wrap: wrap; max-width: 640px; margin-top: 1.25rem; }
.search-input-lg { flex: 1; min-width: 220px; font-size: 1.05rem; padding: 0.85rem 1rem; }
.search-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; align-items: center; }
.chip {
  display: inline-block; padding: 0.3rem 0.7rem; border-radius: 999px; font-size: 0.78rem;
  background: rgba(45,212,191,0.15); color: #fff; text-decoration: none; border: 1px solid rgba(45,212,191,0.35);
}
.page-hero .chip:hover { background: rgba(45,212,191,0.3); }
.chip-soft { background: var(--fh-teal-soft, #f0fdfa); color: var(--fh-teal-dark, #0f766e); border-color: #99f6e4; }
.search-layout { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; align-items: start; }
@media (max-width: 800px) { .search-layout { grid-template-columns: 1fr; } }
.facet-block { margin-bottom: 0.5rem; border: 1px solid var(--border); border-radius: 8px; padding: 0.4rem 0.6rem; }
.facet-block summary { cursor: pointer; font-weight: 600; font-size: 0.8rem; }
.facet-block ul { list-style: none; padding: 0.4rem 0 0; margin: 0; }
.facet-block a { font-size: 0.8rem; color: var(--text); text-decoration: none; }
.facet-block a:hover { color: var(--fh-teal-dark); }
.search-hit { margin-bottom: 0.85rem; }
.search-hit h2 { font-size: 1.15rem; margin: 0.35rem 0; }
.search-hit-top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.search-score { font-size: 0.75rem; font-weight: 700; color: var(--fh-teal-dark); background: var(--fh-teal-soft); padding: 0.15rem 0.5rem; border-radius: 999px; }
.search-matched { font-size: 0.8rem; color: var(--fh-teal-dark); }
.search-meta { margin-bottom: 1rem; }
.related-links { margin-top: 2rem; }
.related-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.related-list a {
  display: inline-block; padding: 0.35rem 0.75rem; border-radius: 999px;
  background: var(--surface-alt); color: var(--text); text-decoration: none; font-size: 0.85rem;
}
.related-list a:hover { background: var(--fh-teal-soft); color: var(--fh-teal-dark); }
.main-nav.is-open { display: block; }
@media (max-width: 900px) {
  .main-nav { display: none; }
  .main-nav.is-open { display: block; width: 100%; }
}

/* Ad slots */
.fh-ad-slot { margin: 1rem 0; text-align: center; }
.fh-ad-placeholder {
  border: 1px dashed var(--border, #cbd5e1);
  background: var(--surface-alt, #f8fafc);
  color: var(--muted, #64748b);
  padding: 1.25rem;
  border-radius: 8px;
  font-size: 0.85rem;
}
.fh-ad-badge {
  display: inline-block; background: #fef3c7; color: #92400e;
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  padding: 0.15rem 0.4rem; border-radius: 4px; margin-right: 0.35rem;
}
.fh-ad-muted { opacity: 0.75; }

/* Leadership */
.leadership-layout { max-width: 900px; }
.founder-card {
  display: grid; grid-template-columns: 200px 1fr; gap: 2rem; align-items: center;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-sm);
}
@media (max-width: 640px) { .founder-card { grid-template-columns: 1fr; text-align: center; } }
.founder-portrait-wrap {
  width: 180px; height: 180px; margin: 0 auto;
  border-radius: 50%; overflow: hidden;
  border: 3px solid var(--color-accent);
  box-shadow: var(--shadow-md);
}
.founder-portrait {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
  display: block;
}
.founder-quote {
  border-left: 3px solid var(--color-accent-strong);
  margin: 1rem 0; padding: 0.75rem 1rem;
  background: var(--color-bg-subtle); border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.founder-quote footer { margin-top: 0.5rem; display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }

/* Hero slider containment */
.hero-slider { position: relative; z-index: 1; overflow: hidden; isolation: isolate; }
.hero-slide { box-sizing: border-box; background-size: cover; background-position: center; }
.hero-dots { position: relative; z-index: 2; }

/* Knowledge graph */
.kg-canvas-wrap {
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--color-bg-subtle); max-width: 100%;
}
#kg-canvas { width: 100%; height: auto; display: block; touch-action: none; }
.kg-toolbar { display: flex; gap: 1rem; align-items: center; margin-bottom: 0.75rem; flex-wrap: wrap; }

/* Article editorial */
.article-body { font-size: 1.05rem; line-height: 1.75; }
.article-body h2 { margin-top: 2rem; }
.article-figure { margin: 1.5rem 0; }
.article-figure img { width: 100%; height: auto; border-radius: var(--radius-md); }
.article-hero-img { border-radius: var(--radius-lg); overflow: hidden; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.5rem; }

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}
.blog-list { display: flex; flex-direction: column; gap: 1rem; }
.blog-list-item { display: grid; grid-template-columns: 160px 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 640px) { .blog-list-item { grid-template-columns: 1fr; } }
.blog-list-thumb { max-height: 110px; }
.blog-featured-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.auth-card-wrap { max-width: 420px; margin: 0 auto; }
.auth-card { padding: 1.75rem; }
.section-alt { background: var(--color-bg-subtle); }
.fh-wysiwyg {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  line-height: 1.65;
  min-height: 320px;
}
.fh-wysiwyg:focus {
  outline: 2px solid var(--color-focus);
  outline-offset: 1px;
}
.fh-wysiwyg h2 { font-size: 1.35rem; margin: 1rem 0 0.5rem; }
.fh-wysiwyg h3 { font-size: 1.15rem; margin: 0.85rem 0 0.4rem; }
.fh-wysiwyg img { max-width: 100%; height: auto; border-radius: 8px; }
.fh-wysiwyg blockquote {
  border-left: 3px solid var(--color-accent-strong);
  margin: 0.75rem 0; padding: 0.35rem 0.75rem;
  background: var(--color-bg-subtle);
}
.fh-wysiwyg-toolbar { margin-bottom: 0.5rem; }
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 10000;
  background: var(--color-accent-strong); color: #fff; padding: 0.5rem 1rem;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }
.reading-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 9999;
  background: transparent; pointer-events: none;
}
.reading-progress-bar {
  height: 100%; width: 0; background: var(--color-accent-strong);
  transition: width 60ms linear;
}
