:root {
  --hl-slate-900: #24304A;
  --hl-slate: #404D67;
  --hl-slate-500: #687490;
  --hl-slate-100: #E3E6ED;
  --hl-cornflower: #7F9FEB;
  --hl-cream: #F4F3E8;
  --hl-butter: #F5F374;
  --hl-white: #FFFFFF;
  --hl-font-display: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --hl-font-body: Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --hl-shadow-focus: 0 0 0 3px rgba(127, 159, 235, 0.4);
  --hl-container: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--hl-slate);
  background: var(--hl-white);
  font-family: var(--hl-font-body);
  line-height: 1.55;
}

a {
  color: var(--hl-slate-900);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--hl-shadow-focus);
}

img {
  display: block;
  max-width: 100%;
}

.section-inner,
.not-found-shell {
  width: min(calc(100% - 3rem), var(--hl-container));
  margin: 0 auto;
}

.site-header,
.site-footer {
  width: min(calc(100% - 6.5rem), var(--hl-container));
  margin: 0 auto;
}

.site-header,
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 0.5rem;
}

.site-header {
  border-bottom: 1px solid var(--hl-slate-100);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  z-index: 20;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0;
}

.brand-logo {
  width: auto;
  height: 38px;
  flex: 0 0 auto;
}

.brand-tagline {
  display: none;
}

.site-nav,
.footer-links,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}

.site-nav a,
.footer-links a {
  text-decoration: none;
  font-weight: 700;
}

.page-main,
.chatbox-shell {
  min-height: calc(100vh - 160px);
}

.section {
  padding: 4.5rem 0;
}

.section-accent {
  background: var(--hl-butter);
}

.section-paper {
  background: var(--hl-cream);
}

.section-inner.narrow {
  max-width: 780px;
}

.hero {
  overflow: hidden;
  background: var(--hl-butter);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(260px, 0.92fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.hero,
.page-hero,
.article-hero {
  padding-top: 5.5rem;
  padding-bottom: 5.5rem;
}

.hero-copy {
  padding-left: clamp(0.75rem, 3vw, 2.5rem);
}

.article-hero {
  background: var(--hl-cream);
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--hl-slate);
}

h1,
h2,
h3 {
  margin: 0 0 1rem;
  color: var(--hl-slate-900);
  font-family: var(--hl-font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

h1 {
  font-size: clamp(2.8rem, 6vw, 4.8rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: 1.45rem;
}

p,
li,
figcaption {
  font-size: 1.05rem;
}

.lede {
  font-size: 1.25rem;
  max-width: 36rem;
}

.hero-art {
  min-height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-brand-image {
  width: clamp(220px, 27vw, 360px);
  max-width: none;
  object-fit: contain;
}

.hero-copy h1 {
  max-width: 12ch;
}

.hero-copy .button-row {
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0.8rem 1.1rem;
  border-radius: 4px;
  border: 1px solid var(--hl-slate);
  font-weight: 700;
  text-decoration: none;
}

.button-primary {
  background: var(--hl-slate-900);
  color: var(--hl-cream);
}

.button-secondary {
  background: transparent;
  color: var(--hl-slate-900);
}

.two-column,
.about-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.feature-list,
.stack-lg {
  display: grid;
  gap: 1rem;
  padding: 0;
  margin: 0;
}

.feature-list {
  list-style: none;
}

.feature-list li,
.principle-card,
.case-card,
.thinking-card,
.contact-card,
.link-card,
.group-block,
.article-panel {
  background: var(--hl-white);
  border: 1px solid var(--hl-slate-100);
  border-radius: 8px;
  padding: 1.25rem;
}

.card-grid,
.link-list {
  display: grid;
  gap: 1rem;
}

.card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.5rem;
}

.link-list {
  grid-template-columns: 1fr;
}

.link-card {
  color: inherit;
  text-decoration: none;
}

.link-card span {
  display: block;
  margin-top: 0.25rem;
  color: var(--hl-slate-500);
}

.group-block + .group-block {
  margin-top: 1.5rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}

.headshot {
  border-radius: 8px;
  background: var(--hl-butter);
}

.headshot-figure {
  margin: 0;
}

.contact-link {
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
}

.article-meta {
  color: var(--hl-slate);
  font-weight: 700;
  margin-bottom: 1rem;
}

.article-layout {
  display: grid;
  gap: 1rem;
}

.chatbox-page {
  --chat--color--primary: var(--hl-slate-900);
  --chat--color--primary-shade-50: #1d2740;
  --chat--color--primary--shade-100: #171f33;
  --chat--color--secondary: var(--hl-slate);
  --chat--color-dark: var(--hl-slate-900);
  --chat--color-light: var(--hl-white);
  --chat--font-family: var(--hl-font-body);
  --chat--header--background: var(--hl-slate-900);
  --chat--header--color: var(--hl-white);
  --chat--heading--font-family: var(--hl-font-display);
  --chat--message--bot--background: var(--hl-white);
  --chat--message--bot--color: var(--hl-slate-900);
  --chat--message--user--background: var(--hl-butter);
  --chat--message--user--color: var(--hl-slate-900);
  --chat--textarea--background: var(--hl-white);
  --chat--textarea--color: var(--hl-slate-900);
  --chat--textarea--placeholder-color: var(--hl-slate-500);
  --chat--border-radius: 0;
  background: var(--hl-cream);
}

.chatbox-shell {
  width: min(calc(100% - 3rem), var(--hl-container));
  margin: 0 auto 3rem;
}

.chatbox-intro {
  padding: 2.5rem 0 1.25rem;
}

.chatbox-intro .eyebrow,
.chatbox-intro .chatbox-fallback {
  margin-bottom: 0;
}

.chatbox-fallback {
  max-width: 36rem;
}

#n8n-chat {
  min-height: 70vh;
  border: 1px solid var(--hl-slate-100);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 243, 232, 0.88));
  box-shadow: 0 18px 44px rgba(36, 48, 74, 0.08);
  overflow: hidden;
}

#n8n-chat > * {
  min-height: 70vh;
}

#n8n-chat [class*="chat-layout"],
#n8n-chat [class*="chat-window"],
#n8n-chat [class*="chat-body"],
#n8n-chat [class*="messages-list"] {
  background: transparent;
}

#n8n-chat [class*="chat-header"] {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  letter-spacing: -0.02em;
}

#n8n-chat [class*="message-bubble"] {
  border-radius: 0;
  box-shadow: none;
  border: 1px solid var(--hl-slate-100);
}

#n8n-chat [class*="chat-footer"],
#n8n-chat [class*="chat-input"],
#n8n-chat textarea,
#n8n-chat input {
  border-radius: 0;
}

#n8n-chat button:focus-visible,
#n8n-chat textarea:focus-visible,
#n8n-chat input:focus-visible {
  box-shadow: var(--hl-shadow-focus);
}

@media (max-width: 640px) {
  .chatbox-shell {
    width: min(calc(100% - 1.25rem), var(--hl-container));
    margin-bottom: 2rem;
  }

  .chatbox-intro {
    padding-top: 1.5rem;
  }
}

.not-found-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1rem;
  padding-top: clamp(3.5rem, 8vw, 6rem);
}

.not-found-heading {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

.not-found-title-block {
  display: grid;
  gap: 0.4rem;
}

.not-found-title-block .eyebrow,
.not-found-title-block h1 {
  margin-bottom: 0;
}

.not-found-logo {
  width: auto;
  height: clamp(2.8rem, 6vw, 4.8rem);
  flex: 0 0 auto;
}

.not-found-actions {
  margin-top: clamp(2.5rem, 9vh, 6rem);
  align-self: center;
  display: grid;
  justify-items: center;
  gap: 1rem;
  text-align: center;
}

.not-found-actions p {
  margin: 0;
}

.not-found-actions .button-row {
  justify-content: center;
}

@media (max-width: 900px) {
  .hero,
  .hero-inner,
  .two-column,
  .about-grid,
  .contact-grid,
  .card-grid,
  .section-head,
  .site-header,
  .site-footer {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header {
    position: static;
  }

  .brand-logo {
    height: 32px;
  }

  .hero-copy {
    padding-left: 0;
  }

  .hero-art {
    min-height: 280px;
    width: 100%;
  }

  .site-header,
  .site-footer,
  .section-inner,
  .not-found-shell {
    width: min(calc(100% - 2rem), var(--hl-container));
  }

  .not-found-heading {
    align-items: center;
  }
}

@media (max-width: 640px) {
  .not-found-heading {
    gap: 1rem;
  }

  .not-found-logo {
    height: clamp(2.8rem, 6vw, 4.8rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}