/* @tokens */
:root {
  --ds-color-ink: #12161c;
  --ds-color-ink-soft: #4a5361;
  --ds-color-paper: #f7f8fa;
  --ds-color-surface: #ffffff;
  --ds-color-mat: #0b5d66;
  --ds-color-mat-dark: #08444b;
  --ds-color-mat-tint: #e8f1f2;
  --ds-color-kapton: #f0a81c;
  --ds-color-kapton-deep: #8a5a00;
  --ds-color-kapton-tint: #fcefcf;
  --ds-color-line: #e1e4e8;
  --ds-color-solved: #1f7a45;
  --ds-color-on-dark: #f7f8fa;
  --ds-color-on-dark-muted: #a9b4c0;
  --ds-color-line-dark: #2b333e;
  --ds-font-heading: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --ds-font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --ds-font-mono: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --ds-text-xs: 0.75rem;
  --ds-text-sm: 0.8125rem;
  --ds-text-base: 1.0625rem;
  --ds-text-lg: 1.25rem;
  --ds-text-xl: 1.375rem;
  --ds-text-2xl: clamp(1.75rem, 1.3rem + 1.8vw, 2.125rem);
  --ds-text-display: clamp(2.75rem, 1.4rem + 6vw, 5.5rem);
  --ds-weight-regular: 400;
  --ds-weight-medium: 500;
  --ds-weight-semibold: 600;
  --ds-weight-bold: 700;
  --ds-line-tight: 1.05;
  --ds-line-snug: 1.26;
  --ds-line-body: 1.41;
  --ds-letter-tight: 0em;
  --ds-letter-mono: 0.02em;
  --ds-space-xs: 0.5rem;
  --ds-space-sm: 0.75rem;
  --ds-space-md: 1.5rem;
  --ds-space-lg: 2rem;
  --ds-space-xl: 4rem;
  --ds-space-section: clamp(4rem, 2.5rem + 6vw, 7.5rem);
  --ds-radius-sm: 8px;
  --ds-radius-md: 16px;
  --ds-radius-lg: 24px;
  --ds-radius-pill: 999px;
  --ds-shadow-card: 0 1px 2px rgba(18, 22, 28, 0.04);
  --ds-shadow-lift: 0 1px 2px rgba(18, 22, 28, 0.05), 0 12px 28px -16px rgba(18, 22, 28, 0.2);
  --ds-transition-fast: 160ms ease;
  --ds-transition-reveal: 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
  --ds-width-container: 76rem;
  --ds-width-prose: 38rem;
  --ds-system-root-font-size: 16px;
  --ds-line-title: 1.21;
  --ds-text-callout: 1rem;
  --ds-text-caption2: 0.6875rem;
  --ds-text-subhead: 0.9375rem;
  --ds-text-title1: 1.75rem;
}

/* @reset */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, h5, h6, p, blockquote, figure { margin: 0; }
h1, h2, h3, h4, h5, h6 { color: inherit; font: inherit; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
blockquote { padding: 0; border: none; }

/* @base */
body {
  font-family: var(--ds-font-body);
  font-size: var(--ds-text-base);
  line-height: var(--ds-line-body);
  color: var(--ds-color-ink);
  background: var(--ds-color-paper);
  -webkit-font-smoothing: antialiased;
}
ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
.bb-container {
  width: 100%;
  max-width: var(--ds-width-container);
  margin: 0 auto;
  padding: 0 var(--ds-space-md);
}
.bb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-sm);
  font-family: var(--ds-font-mono);
  font-size: var(--ds-text-xs);
  font-weight: var(--ds-weight-medium);
  letter-spacing: var(--ds-letter-mono);
  text-transform: uppercase;
  color: var(--ds-color-mat);
}
.bb-eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--ds-color-mat);
  box-shadow: 0 0 0 3px var(--ds-color-mat-tint);
}
.bb-eyebrow-dark {
  color: var(--ds-color-on-dark);
}
.bb-eyebrow-dark::before {
  background: var(--ds-color-on-dark);
  box-shadow: none;
}
.bb-h2 {
  font-family: var(--ds-font-heading);
  font-size: var(--ds-text-2xl);
  font-weight: var(--ds-weight-bold);
  line-height: var(--ds-line-title);
  letter-spacing: var(--ds-letter-tight);
  margin-top: var(--ds-space-sm);
}
.bb-lede {
  font-size: var(--ds-text-lg);
  line-height: 1.35;
  color: var(--ds-color-ink-soft);
  max-width: var(--ds-width-prose);
  margin-top: var(--ds-space-md);
}
.bb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ds-space-xs);
  min-height: 48px;
  padding: 0 1.4rem;
  border: 2px solid var(--ds-color-ink);
  border-radius: var(--ds-radius-pill);
  font-family: var(--ds-font-body);
  font-size: var(--ds-text-base);
  font-weight: var(--ds-weight-semibold);
  line-height: 1;
  color: var(--ds-color-ink);
  background: transparent;
  cursor: pointer;
  transition: transform var(--ds-transition-fast), background var(--ds-transition-fast), color var(--ds-transition-fast), box-shadow var(--ds-transition-fast);
}
.bb-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 0 var(--ds-color-ink);
}
.bb-btn:focus-visible,
.bb-chip:focus-visible {
  outline: 3px solid var(--ds-color-mat);
  outline-offset: 3px;
}
.bb-btn-primary {
  background: var(--ds-color-ink);
  color: var(--ds-color-paper);
}
.bb-btn-primary:hover {
  box-shadow: 0 4px 0 var(--ds-color-mat);
}
.bb-btn-small {
  min-height: 40px;
  padding: 0 1.1rem;
  font-size: var(--ds-text-sm);
}
.bb-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 0.85rem;
  border: 1px solid var(--ds-color-line);
  border-radius: var(--ds-radius-pill);
  background: var(--ds-color-surface);
  font-size: var(--ds-text-sm);
  font-weight: var(--ds-weight-medium);
  transition: background var(--ds-transition-fast), border-color var(--ds-transition-fast), color var(--ds-transition-fast);
}
a.bb-chip:hover {
  background: var(--ds-color-mat);
  border-color: var(--ds-color-mat);
  color: var(--ds-color-paper);
}
.bb-card {
  background: var(--ds-color-surface);
  border: 1px solid var(--ds-color-line);
  border-radius: var(--ds-radius-md);
  box-shadow: var(--ds-shadow-card);
}
.bb-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: var(--ds-radius-sm);
  background: var(--ds-color-mat-tint);
  font-family: var(--ds-font-mono);
  font-size: var(--ds-text-xs);
  font-weight: var(--ds-weight-medium);
  letter-spacing: 0.02em;
  color: var(--ds-color-mat-dark);
  white-space: nowrap;
}
.bb-tag-solved {
  background: #dcefe3;
  color: #14562f;
}
.bb-tag-kapton {
  background: var(--ds-color-kapton-tint);
  color: #6b4500;
}
.bb-mono {
  font-family: var(--ds-font-mono);
  font-size: var(--ds-text-sm);
  letter-spacing: 0.01em;
}
.bb-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--ds-font-heading);
  font-size: 1.4rem;
  font-weight: var(--ds-weight-bold);
  letter-spacing: var(--ds-letter-tight);
  line-height: 1;
  color: var(--ds-color-ink);
  text-decoration: none;
}
.bb-wordmark svg {
  width: 30px;
  height: 30px;
  flex: none;
}
.bb-wordmark-lobes {
  fill: var(--ds-color-kapton);
}
.bb-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--ds-transition-reveal), transform var(--ds-transition-reveal);
}
.bb-reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .bb-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .bb-btn {
    transition: none;
  }
  .bb-btn:hover {
    transform: none;
  }
}

/* @site-header-footer — reproduces the main site's real header/footer
   chrome exactly (same rules, with the main site's per-module node-ID
   selectors stripped to plain .header / .footer so they apply via
   header.php / footer.php on every subsite). */
.header {
  background: var(--ds-color-paper);
  border-bottom: 1px solid var(--ds-color-line);
}
.header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-lg);
  min-height: 72px;
}
.header .bb-wordmark-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.header .header-brand {
  display: grid;
  gap: 3px;
}
.header .header-name {
  /* Inherits font/size/weight/color from .bb-wordmark (confirmed to
     match the real site exactly: 1.4rem / 700 / var(--ds-color-ink)) —
     no override needed here. */
}
.header .header-tag {
  font-family: var(--ds-font-mono);
  font-size: 0.6875rem;
  font-weight: var(--ds-weight-medium);
  letter-spacing: var(--ds-letter-mono);
  line-height: 1;
  text-transform: uppercase;
  color: var(--ds-color-ink-soft);
}
.header .header-nav {
  display: flex;
  align-items: center;
  gap: var(--ds-space-lg);
}
.header .header-links {
  display: flex;
  gap: var(--ds-space-lg);
  list-style: none;
  margin: 0;
  padding: 0;
}
.header .header-links a,
.header .header-signin {
  color: var(--ds-color-ink);
  text-decoration: none;
  font-size: var(--ds-text-sm);
  font-weight: var(--ds-weight-medium);
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color var(--ds-transition-fast);
}
.header .header-links a:hover,
.header .header-signin:hover {
  border-bottom-color: var(--ds-color-ink);
}
.header .header-actions {
  display: flex;
  align-items: center;
  gap: var(--ds-space-md);
}
.header .header-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid var(--ds-color-ink);
  border-radius: var(--ds-radius-sm);
  background: transparent;
  cursor: pointer;
}
.header .header-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--ds-color-ink);
}
@media (max-width: 860px) {
  .header .header-inner {
    flex-wrap: wrap;
  }
  .header .header-toggle {
    display: block;
  }
  .header .header-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--ds-space-md);
    padding-bottom: var(--ds-space-md);
  }
  .header .header-nav.is-open {
    display: flex;
  }
  .header .header-links {
    flex-direction: column;
    gap: var(--ds-space-xs);
  }
}

.footer {
  padding: var(--ds-space-xl) 0 var(--ds-space-lg);
  background: var(--ds-color-ink);
  color: var(--ds-color-on-dark);
}
.footer .footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: var(--ds-space-xl);
}
.footer .footer-blurb {
  max-width: 22rem;
  margin-top: var(--ds-space-md);
  color: var(--ds-color-on-dark-muted);
}
.footer .bb-wordmark {
  color: var(--ds-color-on-dark);
}
.footer .bb-wordmark svg {
  color: var(--ds-color-line-dark);
}
.footer .footer-logo-icon {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
}
.footer .footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: var(--ds-space-lg);
}
.footer .footer-col-title {
  font-size: var(--ds-text-xs);
  letter-spacing: var(--ds-letter-mono);
  text-transform: uppercase;
  color: var(--ds-color-on-dark-muted);
  margin: 0;
}
.footer .footer-links {
  display: grid;
  gap: var(--ds-space-xs);
  margin-top: var(--ds-space-sm);
  list-style: none;
  padding: 0;
}
.footer .footer-links a {
  color: var(--ds-color-on-dark);
  text-decoration: none;
  display: inline-block;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
}
.footer .footer-links a:hover {
  border-bottom-color: var(--ds-color-on-dark);
}
.footer .footer-legal {
  display: grid;
  gap: var(--ds-space-sm);
  margin-top: var(--ds-space-xl);
  padding-top: var(--ds-space-md);
  border-top: 1px solid var(--ds-color-line-dark);
  font-size: var(--ds-text-sm);
  line-height: 1.5;
  color: var(--ds-color-on-dark-muted);
}
.footer .footer-legal p {
  margin: 0;
}
@media (max-width: 760px) {
  .footer .footer-top {
    grid-template-columns: 1fr;
  }
}
