

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/static/fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/static/fonts/inter-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/static/fonts/jetbrains-mono-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/static/fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

/* ========================================
   ACCESSIBILITY — SKIP LINK (WCAG 2.4.1)
   ======================================== */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: var(--primary);
  color: var(--text-on-primary, #000);
  font-family: var(--font-mono);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid currentColor;
  transition: top 0.15s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 0;
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Visually hidden but screen-reader accessible — for labels on inputs
   that have visual placeholders but no visible label. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 641px) {
  :root {
    --container-pad: 2rem;
    --section-pad-y: 5rem;
    --grid-gap: 1.5rem;
    --card-pad: 1.25rem;
    --btn-pad-y: 0.75rem;
    --btn-pad-x: 1.5rem;
  }
}

@media (min-width: 1025px) {
  :root {
    --container-pad: 3rem;
    --section-pad-y: 6rem;
    --grid-gap: 2rem;
    --card-pad: 1.5rem;
  }
}

*,
*::before,
*::after {}

svg {
  max-width: 80%;
  height: auto;
  vertical-align: middle;
}

span > svg,
.icon svg,
[class*="-icon"] svg {
  display: block;
  width: 100%;
  height: 100%;
  max-width: inherit;
  max-height: inherit;
}

html {
  overflow-y: scroll;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html:has(body.v2) {
  scrollbar-width: auto;
  -ms-overflow-style: auto;
}

@media (min-width: 769px) {
  
  html:not(:has(.seo-article)):not(:has(body.v2)) {
    scroll-snap-type: y mandatory;
  }

  html {
    scroll-padding-top: 4rem;
  }

  html:not(:has(.seo-article)):not(:has(body.v2)) section,
  html:not(:has(.seo-article)):not(:has(body.v2)) footer {
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  
  .seo-article {
    padding: 2rem 1rem;
    max-width: 67.5rem;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 13.125rem 1fr;
    gap: 0 2.5rem;
  }


  .seo-article > script,
  .seo-article > .article-breadcrumbs,
  .seo-article > h1,
  .seo-article > .article-intro,
  .seo-article > .article-intro-bukowski,
  .seo-article > .article-closer,
  .seo-article > .article-author {
    grid-column: 1 / -1;
  }

  /* CTA + asides sit in the content column alongside sections */
  .seo-article > aside,
  .seo-article > .article-cta,
  .seo-article > .article-quick-answers,
  .seo-article > .article-hank-moody {
    grid-column: 2;
  }

  
  .seo-article > .article-toc {
    grid-column: 1;
    grid-row-start: span 99;
    position: sticky;
    top: 5rem;
    align-self: start;
    max-height: calc(100vh - 6.25rem);
    overflow-y: auto;
    scrollbar-width: none;
  }
  .seo-article > .article-toc::-webkit-scrollbar { display: none; }

  
  .seo-article > section {
    grid-column: 2;
  }
}

.article-toc .toc-title {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin: 0 0 0.5rem;
}

@media (min-width: 769px) {
  .article-toc ol {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .article-toc li a {
    display: block;
    padding: 0.3rem 0 0.3rem 0.75rem;
    border-left: 2px solid #e2e8f0;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.78rem;
    line-height: 1.4;
    transition: color 0.2s, border-color 0.2s;
  }

  .article-toc li a:hover {
    color: #475569;
  }

  
  .article-toc li a.toc-active {
    color: var(--primary, #1e6b5a);
    border-left-color: var(--primary, #1e6b5a);
    font-weight: 600;
  }

  
  .article-toc li a.toc-read {
    color: #475569;
    border-left-color: #cbd5e1;
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-mono);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body {
  background-color: var(--bg-base);
  background-image:
    linear-gradient(rgba(30, 107, 90, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 107, 90, 0.035) 1px, transparent 1px);
  background-size: var(--grid-cell-size) var(--grid-cell-size);
  background-attachment: fixed;
}

body:not(.v2)::-webkit-scrollbar {
  display: none;
}

#webgl-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

body.no-webgl #webgl-canvas {
  display: none !important;
}

.grid-pattern {
  position: relative;
}

.grid-pattern::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Toned down from 0.08 → 0.025 per UX review: accountant audience
     reads stronger grid as visual noise / "experimental tech" signal
     rather than brand. Barely-visible grid still gives structure. */
  background-image:
    linear-gradient(rgba(30, 107, 90, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 107, 90, 0.025) 1px, transparent 1px);
  background-size: var(--grid-cell-size) var(--grid-cell-size);
  pointer-events: none;
  z-index: 0;
}

.grid-pattern > * {}
.grid-pattern-fine::before {
  background-size: var(--grid-pattern-fine) var(--grid-pattern-fine);
  opacity: var(--grid-pattern-fine-opacity);
}
.grid-pattern-medium::before {
  background-size: var(--grid-pattern-medium) var(--grid-pattern-medium);
  opacity: var(--grid-pattern-medium-opacity);
}
.grid-pattern-large::before {
  background-size: var(--grid-pattern-large) var(--grid-pattern-large);
  opacity: var(--grid-pattern-large-opacity);
}

.pixel-pattern {
  position: relative;
}

.pixel-pattern::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(var(--primary-20) 1px, transparent 1px),
    radial-gradient(var(--primary-20) 1px, transparent 1px);
  background-size:
    1.25rem 1.25rem,
    2.5rem 2.5rem;
  background-position:
    0 0,
    1.25rem 1.25rem;
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
}

.pixel-pattern > * {}

.braille-spinner {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--primary);
}

.braille-spinner::before {
  content: "⠋";
  animation: braille-spin 1.2s steps(9) infinite;
}

@keyframes braille-spin {
  0% {
    content: "⠋";
  }
  11% {
    content: "⠙";
  }
  22% {
    content: "⠹";
  }
  33% {
    content: "⠸";
  }
  44% {
    content: "⠼";
  }
  55% {
    content: "⠴";
  }
  66% {
    content: "⠦";
  }
  77% {
    content: "⠧";
  }
  88% {
    content: "⠇";
  }
  100% {
    content: "⠏";
  }
}

.braille-decorative {
  font-family: var(--font-mono);
  color: var(--primary-40);
  letter-spacing: 2px;
}

.braille-decorative::before {
  content: "⠿⠾⠼⠴⠦⠧⠇⠏⠹⠸⠙⠋";
}

.terminal-pixel {
  font-family: var(--font-mono);
  position: relative;
  display: inline-block;
}

.terminal-pixel::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--primary-10) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: pixel-scan 2s linear infinite;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: overlay;
}

@keyframes pixel-scan {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.pixel-grid {
  background-image:
    linear-gradient(var(--primary-10) 1px, transparent 1px),
    linear-gradient(90deg, var(--primary-10) 1px, transparent 1px);
  background-size: 8px 8px;
  background-position: -1px -1px;
}

.pixel-border {
  border: 2px solid var(--primary);
  box-shadow:
    4px 4px 0 var(--primary-40),
    0.5rem 0.5rem 0 var(--primary-20);
}

.pixel-status {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  background: var(--primary);
  margin-right: 0.5rem;
  box-shadow:
    2px 2px 0 var(--primary-40),
    4px 4px 0 var(--primary-20);
}

.pixel-status.success {
  background: var(--status-success);
  box-shadow:
    2px 2px 0 rgba(16, 185, 129, 0.4),
    4px 4px 0 rgba(16, 185, 129, 0.2);
}

.pixel-status.warning {
  background: var(--status-warning);
  box-shadow:
    2px 2px 0 rgba(245, 158, 11, 0.4),
    4px 4px 0 rgba(245, 158, 11, 0.2);
}

.pixel-status.error {
  background: var(--status-error);
  box-shadow:
    2px 2px 0 rgba(239, 68, 68, 0.4),
    4px 4px 0 rgba(239, 68, 68, 0.2);
}

.scanlines::after,
.scanline-subtle::after,
.scanline-standard::after,
.scanline-minimal::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
}
.scanlines::after,
.scanline-standard::after {
  background: repeating-linear-gradient(0deg,
    transparent, transparent var(--scanline-standard-size),
    rgba(30, 107, 90, var(--scanline-standard-opacity)) var(--scanline-standard-size),
    rgba(30, 107, 90, var(--scanline-standard-opacity)) calc(var(--scanline-standard-size) * 2));
}
.scanline-subtle::after {
  background: repeating-linear-gradient(0deg,
    transparent, transparent var(--scanline-subtle-size),
    rgba(30, 107, 90, var(--scanline-subtle-opacity)) var(--scanline-subtle-size),
    rgba(30, 107, 90, var(--scanline-subtle-opacity)) calc(var(--scanline-subtle-size) * 2));
}
.scanline-minimal::after {
  background: repeating-linear-gradient(0deg,
    transparent, transparent var(--scanline-minimal-size),
    rgba(30, 107, 90, var(--scanline-minimal-opacity)) var(--scanline-minimal-size),
    rgba(30, 107, 90, var(--scanline-minimal-opacity)) calc(var(--scanline-minimal-size) * 2));
}

.corner-frame {
  position: relative;
  overflow: visible;
}

.corner-frame::before,
.corner-frame::after {
  content: "";
  position: absolute;
  width: var(--corner-frame-size);
  height: var(--corner-frame-size);
  border-color: var(--primary);
  border-style: solid;
  pointer-events: none;
  z-index: 10;
}

.corner-frame::before {
  top: calc(-1 * var(--corner-frame-width) - 2px);
  left: calc(-1 * var(--corner-frame-width) - 2px);
  border-width: var(--corner-frame-width) 0 0 var(--corner-frame-width);
}

.corner-frame::after {
  bottom: calc(-1 * var(--corner-frame-width) - 2px);
  right: calc(-1 * var(--corner-frame-width) - 2px);
  border-width: 0 var(--corner-frame-width) var(--corner-frame-width) 0;
}

.corner-frame--sm {
  --corner-frame-size: 0.625rem;
  --corner-frame-width: 2px;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: var(--glass-border);
}

.status-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--status-success);
  animation: status-pulse 2s infinite;
}
.status-dot--degraded { background: var(--status-warning); }
.status-dot--offline { background: var(--status-error); animation: none; }
@keyframes status-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.terminal-cursor::after {
  content: '_';
  animation: cursor-blink 1s step-end infinite;
  color: var(--primary);
  font-weight: var(--font-weight-bold);
}
@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border-default);
}
.badge--success { color: var(--status-success); border-color: var(--status-success); background: var(--status-success-bg); }
.badge--warning { color: var(--status-warning); border-color: var(--status-warning); background: var(--status-warning-bg); }
.badge--error { color: var(--status-error); border-color: var(--status-error); background: var(--status-error-bg); }
.badge--info { color: var(--status-info); border-color: var(--status-info); background: var(--status-info-bg); }
.badge--primary {}

.btn--icon {}
.btn--icon svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: var(--text-body-sm);
}
.table th {
  text-align: left;
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 2px solid var(--border-strong);
}
.table td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border-default);
  color: var(--text-primary);
}
.table tr:hover td {
  background: var(--primary-05);
}

.toast {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  font-family: var(--font-mono);
  font-size: var(--text-body-sm);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  box-shadow: var(--shadow-md);
  z-index: var(--z-toast);
  animation: toast-in var(--duration-normal) var(--ease-default);
}
.toast--success { border-left: 4px solid var(--status-success); }
.toast--error { border-left: 4px solid var(--status-error); }
.toast--warning { border-left: 4px solid var(--status-warning); }
.toast--info { border-left: 4px solid var(--status-info); }
@keyframes toast-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.input, .textarea, .select {
  font-family: var(--font-mono);
  font-size: var(--text-body-sm);
  color: var(--text-primary);
  background: var(--bg-surface);
  border: var(--input-border);
  padding: var(--input-pad);
  width: 100%;
  height: var(--input-height);
  transition: border-color var(--duration-fast) var(--ease-default);
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border: var(--input-focus-border);
}
.textarea {
  height: auto;
  min-height: 6rem;
  resize: vertical;
}
.input-group {}
.input-group + .input-group {
  margin-top: var(--space-lg);
}
.input-label {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.search-input {
  position: relative;
}
.search-input .input {
  padding-left: 2.5rem;
}
.search-input::before {
  content: '';
  position: absolute;
  left: var(--space-sm);
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2378716c' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat center;
  pointer-events: none;
  z-index: 1;
}

.grid {
  display: grid;
  gap: var(--grid-gutter);
  max-width: var(--grid-max-width);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}
.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
.grid-cols-12 { grid-template-columns: repeat(12, 1fr); }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.col-span-4 { grid-column: span 4; }
.col-span-6 { grid-column: span 6; }
.col-span-8 { grid-column: span 8; }
.col-span-12 { grid-column: span 12; }
@media (max-width: 640px) {
  .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: 1fr; }
  .col-span-2, .col-span-3, .col-span-4, .col-span-6, .col-span-8 { grid-column: span 1; }
}
@media (min-width: 641px) and (max-width: 1024px) {
  .grid-cols-3, .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

.layout-2col { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-2xl); align-items: start; }
.layout-2col-equal { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2xl); align-items: start; }
.layout-3col {}
@media (max-width: 640px) {
  .layout-2col, .layout-2col-equal, .layout-3col { grid-template-columns: 1fr; }
}

.container {
  max-width: var(--grid-max-width);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.section {
  padding: var(--section-pad-y) 0;
}

.code-block {
  font-family: var(--font-mono);
  font-size: var(--text-body-sm);
  line-height: 1.5;
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: var(--space-md);
  overflow-x: auto;
  tab-size: 2;
}
.code-block .keyword { color: var(--primary-active); }
.code-block .string { color: var(--accent); }
.code-block .comment { color: var(--grey-500); }
.code-block .number { color: var(--status-info); }

@keyframes glitch {
  0% {
    transform: translate(0);
    filter: none;
  }
  20% {
    transform: translate(-2px, 1px);
    filter: blur(0.0.3125rem);
  }
  40% {
    transform: translate(2px, -1px);
    filter: none;
  }
  60% {
    transform: translate(-1px, -1px);
    filter: blur(0.0.3125rem);
  }
  80% {
    transform: translate(1px, 1px);
    filter: none;
  }
  100% {
    transform: translate(0);
    filter: none;
  }
}

@keyframes glitch-auto {
  0%,
  95%,
  100% {
    transform: translate(0);
    filter: none;
  }
  96% {
    transform: translate(-2px, 1px);
    filter: blur(0.0.3125rem);
  }
  97% {
    transform: translate(2px, -1px);
    filter: none;
  }
  98% {
    transform: translate(-1px, -1px);
    filter: blur(0.0.3125rem);
  }
  99% {
    transform: translate(1px, 1px);
    filter: none;
  }
}

.glitch-hover:hover {
  animation: glitch 0.2s ease-in-out;
}

.glitch-auto {
  animation: glitch-auto 5s infinite;
}

.glow-soft {
  text-shadow: var(--text-glow-soft);
}

.glow-medium {
  text-shadow: var(--text-glow-medium);
}

.glow-strong {
  text-shadow: 0 0 30px rgba(30, 107, 90, 0.9);
}

.box-glow {
  box-shadow: var(--box-glow);
}

.box-glow-hover:hover {
  box-shadow: var(--box-glow);
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

.cursor,
.terminal-cursor::after {
  animation: blink 1s infinite;
}

.terminal-cursor::after {
  content: "_";
  color: var(--primary);
}

.terminal-cursor-block::after {
  content: "█";
  color: var(--primary);
  animation: blink 1s infinite;
}

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

.loading-spinner {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--primary-20);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}

@keyframes terminal-spin {
  0% {
    content: "|";
  }
  25% {
    content: "/";
  }
  50% {
    content: "—";
  }
  75% {
    content: "\\";
  }
  100% {
    content: "|";
  }
}

.terminal-spinner::after {
  content: "|";
  color: var(--primary);
  font-family: var(--font-mono);
  animation: terminal-spin 0.5s steps(1) infinite;
}

.loading-text {
  font-family: var(--font-mono);
  font-size: var(--text-body-sm);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.loading-text::after {
  content: "_";
  color: var(--primary);
  animation: blink 1s ease-in-out infinite;
}

@keyframes loading-dots {
  0%,
  20% {
    content: ".";
  }
  40% {
    content: "..";
  }
  60%,
  100% {
    content: "...";
  }
}

.loading-dots::after {
  content: "";
  animation: loading-dots 1.5s infinite;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--border-default);
  border-radius: 0;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary);
  transition: width 0.3s ease;
}

.progress-bar.indeterminate .progress-bar-fill {
  width: 30%;
  animation: progress-indeterminate 1.5s ease-in-out infinite;
}

@keyframes progress-indeterminate {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(400%);
  }
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 25%,
    var(--border-default) 50%,
    var(--bg-elevated) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius);
}

.skeleton-text {
  height: 1rem;
  margin-bottom: var(--space-sm);
}

.skeleton-text.sm {
  height: 0.75rem;
  width: 60%;
}

.skeleton-text.lg {
  height: 1.5rem;
}

.skeleton-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
}

.skeleton-card {
  height: 7.5rem;
  width: 100%;
}

.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  z-index: 9999;
}

.page-loader-text {
  font-family: var(--font-mono);
  font-size: var(--text-body);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.inline-loader {
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-elevated);
  border: 2px solid var(--border-default);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  text-transform: uppercase;
  letter-spacing: 0.0.3125rem;
  color: var(--text-secondary);
}

.inline-loader .spinner {
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid var(--border-default);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.cli-loader {
  font-family: var(--font-mono);
  font-size: var(--text-body-sm);
  color: var(--text-secondary);
  padding: var(--space-md);
  background: var(--bg-elevated);
  border: 2px solid var(--border-default);
}

.cli-loader-line {
  margin-bottom: var(--space-xs);
}

.cli-loader-line:last-child {
  margin-bottom: 0;
}

.cli-loader-prefix {
  color: var(--primary);
}

.cli-loader-command {
  color: var(--text-primary);
}

.cli-loader-status {
  color: var(--status-success);
}

.cli-loader-status.pending {
  color: var(--accent);
}

.cli-loader-cursor {
  color: var(--primary);
  animation: blink 1s ease-in-out infinite;
}

.app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

.container {
  max-width: var(--grid-max-width);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.header {
  height: calc(4rem + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) calc(var(--container-pad) + env(safe-area-inset-right, 0px)) 0 calc(var(--container-pad) + env(safe-area-inset-left, 0px));
  background: var(--bg-surface);
  border-bottom: 2px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: height 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  will-change: height;
}

/* Scroll-shrink — body.scrolled set by scroll listener when scrollY > 80px.
   Header compresses vertically + picks up frosted-glass background. */
body.scrolled .header {
  height: calc(3rem + env(safe-area-inset-top, 0px));
  background: color-mix(in srgb, var(--bg-surface) 82%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom-color: color-mix(in srgb, var(--border-default) 60%, transparent);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.04);
}
body.scrolled .logo-mark { transform: scale(0.88); transition: transform 0.2s ease; }

.header.header-landing {
  position: sticky;
}

.header-inner {
  width: 100%;
  max-width: var(--grid-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-mono);
  font-size: var(--text-h4);
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* Larger logo variant.  Frain-compliant: no raw px; sizes scale with root
   em + CSS variables.  Logo-mark size is overridden via the --logo-* tokens
   so any descendant rule picks up the new dimensions automatically. */
.logo-lg {
  --logo-width: 3.5rem;
  --logo-height: 3rem;
  font-size: 1.5rem;
  gap: var(--space-md);
}

.logo-text {
  display: inline-flex;
  align-items: center;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.03em;
}

/* `>` sits between RUN and DONE as the brand mark.  Emerald, slightly
   displaced, inherits hover/rotate vibe from the nav dropdown chevrons. */
.logo-sep {
  color: var(--primary);
  margin: 0 0.08em;
  display: inline-block;
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.logo:hover .logo-sep,
.logo:focus-visible .logo-sep {
  transform: rotate(90deg);
}

.logo:hover {
  color: var(--primary);
}

@media (max-width: 640px) {
  .logo-lg { font-size: 1.125rem; gap: var(--space-sm); }
}

.logo-mark {
  width: var(--logo-width);
  height: var(--logo-height);
  min-width: var(--logo-min-width);
  min-height: var(--logo-min-height);
  align-items: center;
  justify-content: center;
}

.logo-mark svg {}

.logo-mark canvas {}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav.nav-hidden {
  display: none;
}

.app-wrapper-fullscreen {
  padding-top: 0;
}

.app-wrapper-fullscreen #content {
  min-height: 100vh;
}

.header-landing .header-inner {
  justify-content: space-between;
}

.landing-nav {}

.landing-section-indicator {
  font-family: var(--font-mono);
  font-size: var(--text-body-sm);
  color: var(--text-secondary);
  padding: var(--space-xs) var(--space-md);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  min-width: 0;
  flex: 0 1 auto;
}

.landing-section-number {
  color: var(--primary);
  font-weight: 700;
  font-size: var(--text-body);
}

.landing-section-divider {
  color: var(--border-default);
}

.landing-section-total {
  color: var(--text-muted);
}

.landing-section-name {
  margin-left: var(--space-sm);
  color: var(--text-primary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03125rem;
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landing-cta {
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 2.75rem;
  min-height: 2.75rem;
}

.landing-cta svg {
  transition: transform 0.2s ease;
}

.landing-cta:hover svg {
  transform: translateX(4px);
}

.landing-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border-default);
}

.landing-progress-bar {
  height: 100%;
  width: 100%;
  background: var(--primary);
  transition: transform 0.3s ease;
  transform: scaleX(0.1);
  transform-origin: left;
  box-shadow: 0 0 10px var(--primary);
}

@media (max-width: 640px) {
  .landing-section-indicator {
    display: none;
  }

  .landing-nav {
    justify-content: flex-end;
  }

  .landing-cta span {
    display: none;
  }

  .landing-cta {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    justify-content: center;
  }
}

.nav-link {
  position: relative;
  font-family: var(--font-mono);
  font-size: var(--text-body-sm);
  color: var(--text-secondary);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.03125rem;
  transition: color 0.2s ease;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-sm);
  outline: none;
}

/* Visible focus ring for keyboard users (Tab-nav).  Hidden when navigating
   with mouse so the chrome stays quiet. */
.nav-link:focus-visible,
.nav-dropdown-toggle:focus-visible,
.header-lang:focus-visible,
.logo:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* `>` prefix slides in on hover/active — feels more intentional than
   permanent chrome and matches awwwards-style minimal polish. */
.nav-link::before {
  content: ">";
  color: var(--primary);
  opacity: 0;
  max-width: 0;
  margin-right: 0;
  overflow: hidden;
  transition: opacity 0.25s ease, max-width 0.25s ease, margin-right 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover::before,
.nav-link.active::before {
  opacity: 1;
  max-width: 1em;
  margin-right: 0.35em;
}

/* Active state signalled by: `>` prefix (via ::before) + primary color +
   bold weight.  Three complementary cues, no underline bar — keeps the
   terminal-monospace vibe consistent with the `run>done` brand mark. */
.nav-link.active {
  font-weight: 700;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs) var(--space-sm);
  min-height: 2.75rem;
}
.nav-dropdown-toggle .dropdown-chevron {
  transition: transform 0.2s;
}

.nav-dropdown:hover .dropdown-chevron,
.nav-dropdown.open .dropdown-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 10rem;
  padding: var(--space-xs) 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.5rem);
  transition:
    opacity 0.15s,
    transform 0.15s,
    visibility 0.15s;
  z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(4px);
}

.nav-dropdown-item {
  display: block;
  padding: var(--space-xs) var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--text-body-sm);
  color: var(--text-secondary);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.0.3125rem;
  transition:
    background 0.15s,
    color 0.15s;
  
  min-height: 2.75rem;
  display: flex;
  align-items: center;
}

.nav-dropdown-item::before {
  content: "> ";
  color: var(--text-muted);
}

.nav-dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--primary);
}

.nav-dropdown-item:hover::before {
  color: var(--primary);
}

.nav-dropdown-item.active {
  color: var(--primary);
}

.nav-dropdown-item.active::before {
  color: var(--primary);
}

.btn {
  min-height: var(--btn-height);
  padding: var(--btn-pad-y) var(--btn-pad-x);
  font-family: var(--font-mono);
  font-size: var(--text-body-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.btn svg {
  width: 1rem;
  height: 1rem;
}

.btn-primary {
  background: var(--primary-btn);
  color: var(--text-on-primary);
  border-color: var(--primary-btn);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--box-glow);
}

.btn-primary:active {
  animation: glitch 0.1s ease-in-out;
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-secondary:hover {
  background: var(--primary-10);
  box-shadow: var(--glow-soft);
}

.btn-accent {
  background: transparent;
  color: var(--text-on-primary);
  border-color: var(--text-on-primary);
}

.btn-accent:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-sm {
  min-height: var(--btn-height-sm);
  padding: var(--btn-pad-y) var(--btn-pad-x);
  font-size: var(--text-body-sm);
}

.btn-lg {
  min-height: var(--btn-height-lg);
  padding: calc(var(--btn-pad-y) + 2px) calc(var(--btn-pad-x) + 0.375rem);
}

.btn-disabled,
.btn:disabled {
  background: transparent;
  color: var(--primary-40);
  border-color: var(--primary-40);
  cursor: not-allowed;
}

.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.25rem;
  height: 1.25rem;
  margin: -0.625rem 0 0 -0.625rem;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn-primary.btn-loading::after {
  border-top-color: var(--text-on-primary);
}

.btn-secondary.btn-loading::after {
  border-top-color: var(--primary);
}

.btn-loading-cursor {
  position: relative;
}

.btn-loading-cursor .btn-text {
  visibility: hidden;
}

.btn-loading-cursor::after {
  content: "LOADING_";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  animation: blink 1s ease-in-out infinite;
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-body-sm);
  font-weight: 500;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.0.3125rem;
  margin-bottom: var(--space-sm);
}

.form-input {
  width: 100%;
  height: var(--input-height);
  padding: 0 var(--space-md);
  background: var(--bg-surface);
  border: 2px solid var(--border-muted);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  /* iOS Safari: font-size >= 16px prevents auto-zoom on focus */
  font-size: 1rem;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.form-input:focus {}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  min-height: 7.5rem;
  padding: var(--space-md);
  resize: vertical;
}

.form-input.error {
  border-color: var(--status-error);
}

.form-input.error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
}

.form-error {}

.dropdown {
  position: relative;
  width: 100%;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: var(--input-height);
  padding: 0 var(--space-md);
  background: var(--bg-surface);
  border: 2px solid var(--border-muted);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  /* iOS Safari: font-size >= 16px prevents auto-zoom on focus */
  font-size: 1rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropdown-trigger:hover {
  border-color: var(--primary);
}

.dropdown-trigger:focus {}

.dropdown-trigger.open {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-30);
}

.dropdown-trigger .placeholder {
  color: var(--text-muted);
}

.dropdown-trigger .chevron {
  width: 1rem;
  height: 1rem;
  transition: transform 0.2s ease;
  color: var(--text-secondary);
}

.dropdown-trigger.open .chevron {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: var(--z-dropdown);
  max-height: 15rem;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.5rem);
  transition: all 0.2s ease;
}

.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu::before,
.dropdown-menu::after {
  content: "";
  position: absolute;
  width: 0.75rem;
  height: 0.75rem;
  border-style: solid;
  border-color: var(--primary);
  pointer-events: none;
}

.dropdown-menu::before {}

.dropdown-menu::after {}

.dropdown-option {
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--text-body-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.dropdown-option:hover {}

.dropdown-option.selected {}

.dropdown-option.selected::before {
  content: ">";
  color: var(--primary);
  font-weight: 600;
}

.dropdown-option.disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}

.dropdown-option.disabled:hover {
  background: transparent;
}

.dropdown-option .option-icon {
  width: 1rem;
  height: 1rem;
  color: var(--text-secondary);
}

.dropdown-option:hover .option-icon,
.dropdown-option.selected .option-icon {
  color: var(--primary);
}

.dropdown-label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.0.3125rem;
  margin-bottom: var(--space-sm);
}

.dropdown-group-header {
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.0.3125rem;
  border-bottom: 1px solid var(--border-default);
  background: var(--bg-elevated);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-default);
  margin: var(--space-xs) 0;
}

.dropdown-search {
  position: relative;
}

.dropdown-search-input {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  padding-left: 2.25rem;
  border: none;
  border-bottom: 2px solid var(--border-default);
  font-family: var(--font-mono);
  /* iOS Safari: font-size >= 16px prevents auto-zoom on focus */
  font-size: 1rem;
  background: var(--bg-surface);
  color: var(--text-primary);
}

.dropdown-search-input:focus {
  outline: none;
  border-bottom-color: var(--primary);
}

.dropdown-search-input::placeholder {
  color: var(--text-muted);
}

.dropdown-search-icon {
  position: absolute;
  left: var(--space-sm);
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--text-muted);
}

.dropdown-no-results {
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--text-body-sm);
  color: var(--text-muted);
}

.dropdown-multi .selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  flex: 1;
}

.dropdown-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 0.5rem;
  background: var(--primary-10);
  border: 1px solid var(--primary-30);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--primary-text);
}

.dropdown-tag-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.875rem;
  height: 0.875rem;
  cursor: pointer;
  color: var(--primary);
  transition: color 0.15s;
}

.dropdown-tag-remove:hover {
  color: var(--status-error);
}

.dropdown-option.multi {
  padding-left: var(--space-md);
}

.dropdown-checkbox {
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--border-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.dropdown-option:hover .dropdown-checkbox {
  border-color: var(--primary);
}

.dropdown-option.selected .dropdown-checkbox {
  background: var(--primary);
  border-color: var(--primary);
}

.dropdown-option.selected .dropdown-checkbox::after {
  content: "";
  width: 0.5rem;
  height: 0.3125rem;
  border: 2px solid var(--text-on-primary);
  border-top: none;
  border-right: none;
  transform: rotate(-45deg);
  margin-bottom: 2px;
}

.dropdown-sm .dropdown-trigger {
  height: var(--btn-height-sm);
  font-size: var(--text-caption);
}

.dropdown-lg .dropdown-trigger {
  height: var(--btn-height-lg);
  font-size: var(--text-body);
}

.dropdown.disabled .dropdown-trigger {
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: not-allowed;
  border-color: var(--border-default);
}

.dropdown.error .dropdown-trigger {
  border-color: var(--status-error);
}

.dropdown.error .dropdown-trigger:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.dropdown-error-message {}

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--status-success);
  animation: pulse 2s ease-in-out infinite;
  position: relative;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.status-dot.pulse-ring::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid currentColor;
  transform: translate(-50%, -50%);
  animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
  0% {
    width: 100%;
    height: 100%;
    opacity: 0.6;
  }
  100% {
    width: 300%;
    height: 300%;
    opacity: 0;
  }
}

.status-dot.pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 8px currentColor;
  }
  50% {
    box-shadow: 0 0 16px currentColor;
  }
}

.status-dot.success {
  background: var(--status-success);
  color: var(--status-success);
}

.status-dot.warning {
  background: var(--status-warning);
  color: var(--status-warning);
}

.status-dot.error {
  background: var(--status-error);
  color: var(--status-error);
  animation-duration: 1s;
}

.status-dot.info {
  background: var(--status-info);
  color: var(--status-info);
}

.status-dot.offline {}

.status-dot.pending {
  background: var(--accent);
  color: var(--accent);
  animation: pulse-fast 1s ease-in-out infinite;
}

@keyframes pulse-fast {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.2;
  }
}

.status-dot.lg {
  width: 0.75rem;
  height: 0.75rem;
}

.status-dot.sm {
  width: 0.375rem;
  height: 0.375rem;
}

.status-badge {
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  text-transform: uppercase;
  letter-spacing: 0.0.3125rem;
  transition: all 0.2s ease;
}

.status-badge:hover {
  box-shadow: var(--glow-soft);
}

.status-badge .dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--text-muted);
}

.status-badge.success {
  color: var(--status-success-text);
  border-color: var(--status-success);
}

.status-badge.success .dot {
  background: var(--status-success);
  animation: pulse 2s ease-in-out infinite;
}

.status-badge.warning {
  color: var(--status-warning-text);
  border-color: var(--status-warning);
}

.status-badge.warning .dot {
  background: var(--status-warning);
  animation: pulse 2s ease-in-out infinite;
}

.status-badge.error {}

.status-badge.error .dot {
  background: var(--status-error);
  animation: pulse-fast 1s ease-in-out infinite;
}

.status-badge.info {
  color: var(--status-info-text);
  border-color: var(--status-info);
}

.status-badge.info .dot {
  background: var(--status-info);
  animation: pulse 2s ease-in-out infinite;
}

.status-badge.pending {
  color: var(--status-warning-text);
  border-color: var(--accent);
}

.status-badge.pending .dot {
  background: var(--accent);
  animation: pulse-fast 1s ease-in-out infinite;
}

.status-badge.offline {
  color: var(--text-muted);
  border-color: var(--border-default);
}

.status-badge.offline .dot {}

.card {
  background: var(--bg-surface);
  border: 2px solid var(--border-default);
  padding: var(--space-xl);
  transition: all 0.2s ease;
}

.card:hover {}

.card-title {
  font-family: var(--font-mono);
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.0.3125rem;
}

.card-description {}

.system-label {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.system-label::before {
  content: "[";
  color: var(--primary);
}

.system-label::after {
  content: "]";
  color: var(--primary);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-label {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: var(--space-sm);
}

.section-label::before {
  content: "// ";
}

.section-title {
  font-family: var(--font-mono);
  font-size: var(--text-h2);
  font-weight: 400;
  color: var(--text-primary);
}

.section-title:hover {
  text-shadow: var(--glow-soft);
}

.footer {
  background: var(--bg-elevated);
  border-top: 2px solid var(--border-default);
  padding: var(--space-2xl) var(--space-xl);
  
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--space-2xl));
  margin-top: auto;
}

.footer-inner {
  max-width: var(--grid-max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: var(--text-body-sm);
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-link {
  font-family: var(--font-mono);
  font-size: var(--text-body-sm);
  color: var(--text-secondary);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.0.3125rem;
  transition: color 0.2s;
  
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xs) var(--space-sm);
}

.footer-link:hover {
  color: var(--primary);
}

.footer-socials {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.footer-social {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
  border-radius: 2px;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.footer-social > .ph {
  font-size: 1.125rem;
  line-height: 1;
}

.footer-social:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}
.footer-social:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Overlay; does not participate in header flow.  Pinned right-of-utility
   so it doesn't push account widget or nav items sideways during requests. */
.htmx-indicator {
  position: absolute;
  right: var(--container-pad);
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.htmx-request .htmx-indicator {
  opacity: 1;
}

#content {
  transition: opacity 0.2s;
}

#content.htmx-swapping {
  opacity: 0;
}

.font-mono {
  font-family: var(--font-mono);
}

.font-sans {
  font-family: var(--font-sans);
}

.text-xs {
  font-size: var(--text-caption);
}
.text-sm {
  font-size: var(--text-body-sm);
}
.text-base {
  font-size: var(--text-body);
}
.text-lg {
  font-size: var(--text-body-lg);
}
.text-xl {
  font-size: var(--text-h4);
}
.text-2xl {
  font-size: var(--text-h3);
}
.text-3xl {
  font-size: var(--text-h2);
}
.text-4xl {
  font-size: var(--text-h1);
}

.font-normal {
  font-weight: 400;
}
.font-medium {
  font-weight: 500;
}
.font-semibold {
  font-weight: 600;
}
.font-bold {
  font-weight: 700;
}

.text-left {
  text-align: left;
}
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}

.text-primary {
  color: var(--text-primary);
}
.text-secondary {
  color: var(--text-secondary);
}
.text-muted {
  color: var(--text-muted);
}
.text-accent {
  color: var(--primary);
}
.text-success {
  color: var(--status-success-text);
}
.text-warning {
  color: var(--status-warning-text);
}
.text-error {
  color: var(--status-error-text);
}

.uppercase {
  text-transform: uppercase;
}
.lowercase {
  text-transform: lowercase;
}
.capitalize {
  text-transform: capitalize;
}

.tracking-tight {
  letter-spacing: -0.025em;
}
.tracking-normal {
  letter-spacing: 0;
}
.tracking-wide {
  letter-spacing: 0.0.3125rem;
}
.tracking-wider {
  letter-spacing: 1px;
}

.touch-target {
  min-width: 2.75rem;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.m-0 {
  margin: 0;
}
.m-xs {
  margin: var(--space-xs);
}
.m-sm {
  margin: var(--space-sm);
}
.m-md {
  margin: var(--space-md);
}
.m-lg {
  margin: var(--space-lg);
}
.m-xl {
  margin: var(--space-xl);
}

.mt-0 {
  margin-top: 0;
}
.mt-sm {
  margin-top: var(--space-sm);
}
.mt-md {
  margin-top: var(--space-md);
}
.mt-lg {
  margin-top: var(--space-lg);
}
.mt-xl {
  margin-top: var(--space-xl);
}
.mt-2xl {
  margin-top: var(--space-2xl);
}
.mt-3xl {
  margin-top: var(--space-3xl);
}

.mb-0 {
  margin-bottom: 0;
}
.mb-xs {
  margin-bottom: var(--space-xs);
}
.mb-sm {
  margin-bottom: var(--space-sm);
}
.mb-md {
  margin-bottom: var(--space-md);
}
.mb-lg {
  margin-bottom: var(--space-lg);
}
.mb-xl {
  margin-bottom: var(--space-xl);
}
.mb-2xl {
  margin-bottom: var(--space-2xl);
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.p-0 {
  padding: 0;
}
.p-xs {
  padding: var(--space-xs);
}
.p-sm {
  padding: var(--space-sm);
}
.p-md {
  padding: var(--space-md);
}
.p-lg {
  padding: var(--space-lg);
}
.p-xl {
  padding: var(--space-xl);
}
.p-2xl {
  padding: var(--space-2xl);
}

.px-md {
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}
.px-lg {
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}
.px-xl {
  padding-left: var(--space-xl);
  padding-right: var(--space-xl);
}

.py-md {
  padding-top: var(--space-md);
  padding-bottom: var(--space-md);
}
.py-lg {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}
.py-xl {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}
.py-2xl {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}
.py-3xl {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
}
.py-4xl {
  padding-top: var(--space-4xl);
  padding-bottom: var(--space-4xl);
}

.block {
  display: block;
}
.inline {
  display: inline;
}
.inline-block {
  display: inline-block;
}
.flex {
  display: flex;
}
.inline-flex {
  display: inline-flex;
}
.grid {
  display: grid;
}
.hidden {
  display: none;
}

.flex-row {
  flex-direction: row;
}
.flex-col {
  flex-direction: column;
}
.flex-wrap {
  flex-wrap: wrap;
}

.items-start {
  align-items: flex-start;
}
.items-center {
  align-items: center;
}
.items-end {
  align-items: flex-end;
}
.items-stretch {
  align-items: stretch;
}

.justify-start {
  justify-content: flex-start;
}
.justify-center {
  justify-content: center;
}
.justify-end {
  justify-content: flex-end;
}
.justify-between {
  justify-content: space-between;
}

.gap-xs {
  gap: var(--space-xs);
}
.gap-sm {
  gap: var(--space-sm);
}
.gap-md {
  gap: var(--space-md);
}
.gap-lg {
  gap: var(--space-lg);
}
.gap-xl {
  gap: var(--space-xl);
}

.flex-1 {
  flex: 1;
}
.flex-auto {
  flex: auto;
}
.flex-none {
  flex: none;
}

.w-full {
  width: 100%;
}
.h-full {
  height: 100%;
}
.min-h-screen {
  min-height: 100vh;
}

.bg-base {
  background-color: var(--bg-base);
}
.bg-surface {
  background-color: var(--bg-surface);
}
.bg-elevated {
  background-color: var(--bg-elevated);
}
.bg-dark {
  background-color: var(--bg-dark);
}
.bg-primary {
  background-color: var(--primary);
}

.border {
  border: 2px solid var(--border-default);
}
.border-primary {
  border-color: var(--primary);
}
.border-muted {
  border-color: var(--border-muted);
}
.border-none {
  border: none;
}

.opacity-0 {
  opacity: 0;
}
.opacity-50 {
  opacity: 0.5;
}
.opacity-100 {
  opacity: 1;
}

.relative {
  position: relative;
}
.absolute {
  position: absolute;
}
.fixed {
  position: fixed;
}
.sticky {
  position: sticky;
}

.inset-0 {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}
.top-0 {
  top: 0;
}
.right-0 {
  right: 0;
}
.bottom-0 {
  bottom: 0;
}
.left-0 {
  left: 0;
}

.z-10 {
  z-index: 10;
}
.z-20 {
  z-index: 20;
}
.z-50 {
  z-index: 50;
}
.z-100 {
  z-index: 100;
}

.cursor-pointer {
  cursor: pointer;
}
.cursor-not-allowed {
  cursor: not-allowed;
}
.pointer-events-none {
  pointer-events: none;
}
.select-none {
  user-select: none;
}

.overflow-auto {
  overflow: auto;
}
.overflow-hidden {
  overflow: hidden;
}
.overflow-visible {
  overflow: visible;
}

.transition {
  transition: all 0.2s ease;
}
.transition-fast {
  transition: all 0.1s ease;
}
.transition-slow {
  transition: all 0.3s ease;
}
.transition-none {
  transition: none;
}

@media (max-width: 1024px) {
  :root {
    --text-h1: 3rem;
    --text-h2: 2.25rem;
    --text-h3: 1.5rem;
  }

  .header {
    padding: 0 var(--space-md);
  }

  .nav {
    gap: var(--space-md);
  }

  .container {
    padding: 0 var(--space-md);
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: row;
    gap: var(--space-sm);
  }

  .header {
    height: 3.5rem;
    padding: 0 var(--space-md);
    
    padding-top: calc(env(safe-area-inset-top, 0px) + 0px);
    padding-left: calc(env(safe-area-inset-left, 0px) + var(--space-md));
    padding-right: calc(env(safe-area-inset-right, 0px) + var(--space-md));
  }

  .nav {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
    
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
  }
  
  
  .footer-link {
    min-height: 2.75rem;
    padding: var(--space-sm) var(--space-md);
  }

  
  .md\:hidden {
    display: none;
  }
  .md\:block {
    display: block;
  }
  .md\:flex {
    display: flex;
  }
  .md\:flex-col {
    flex-direction: column;
  }

  .logo-mark {
    width: 2rem;
    height: 1.75rem;
  }

  .logo-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
  }

  
  .container {
    padding: 0 calc(env(safe-area-inset-left, 0px) + var(--space-sm));
    padding-right: calc(env(safe-area-inset-right, 0px) + var(--space-sm));
  }

  
  .chat-widget {
    bottom: calc(env(safe-area-inset-bottom, 0px) + var(--space-md));
    right: calc(env(safe-area-inset-right, 0px) + var(--space-md));
  }

  .chat-button {
    width: 3rem;
    height: 3rem;
  }

  .chat-button svg {
    width: 1.375rem;
    height: 1.375rem;
  }

  .chat-window {
    width: calc(100vw - 2rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
    max-width: calc(100vw - 2rem);
    height: 25rem;
    right: calc(env(safe-area-inset-right, 0px) - 0.5rem);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 4rem);
  }
}

@media (max-width: 640px) {
  :root {
    --text-h1: 1.75rem;
    --text-h2: 1.375rem;
    --text-h3: 1.125rem;
    
    --space-md: 0.75rem;
    --space-lg: 1rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
    --space-3xl: 3rem;
    --space-4xl: 4rem;
    --container-pad: 0.75rem;
    --grid-gutter: 0.75rem;
    --grid-gap: 0.75rem;
    --card-pad: 0.75rem;
    
    --touch-target-gap: 0.5rem;
  }

  
  .sm\:hidden {
    display: none;
  }
  .sm\:block {
    display: block;
  }
  .sm\:flex {
    display: flex;
  }
  .sm\:flex-col {
    flex-direction: column;
  }
  .sm\:text-center {
    text-align: center;
  }
  
  
  .btn-sm {
    min-height: 2.75rem;
    padding: var(--space-sm) var(--space-md);
  }
  
  
  .btn + .btn {
    margin-left: var(--touch-target-gap);
  }
  
  
  .logo {
    min-height: 2.75rem;
    min-width: 2.75rem;
    display: inline-flex;
    align-items: center;
    padding: var(--space-xs) 0;
  }
  
  
  a:not(.btn):not(.logo) {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
  }
  
  
  .button-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
  }
  
  
  .form-group {
    margin-bottom: var(--space-lg);
  }
  
  .form-group label {
    display: block;
    margin-bottom: var(--space-sm);
  }
  
  
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea,
  select {
    min-height: 2.75rem;
    padding: var(--space-sm) var(--space-md);
  }
}

@media print {
  .no-print {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .header,
  .footer {
    display: none;
  }
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--bg-elevated);
  z-index: 1000;
}

.scroll-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform-origin: left;
  transform: scaleX(0);
  box-shadow:
    0 0 0.625rem var(--primary),
    0 0 1.25rem var(--primary);
}

[data-scroll] {
  will-change: transform, opacity;
}

[data-parallax] {
  will-change: transform;
}

.char,
.word {
  display: inline-block;
  will-change: transform, opacity;
}

[data-magnetic] {
  will-change: transform;
  transition: none !important;
}

html {
  scroll-behavior: smooth;
}

::-webkit-scrollbar {
  width: 0.5rem;
  height: 0.5rem;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-40);
  border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-40) var(--bg-base);
}

.text-display {
  font-size: 6rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
}
.text-caption {
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.33;
}
.text-label {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.33;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.text-micro {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.text-micro-number {
  font-family: var(--font-mono);
  font-size: 0.4375rem;
  font-weight: 400;
  letter-spacing: 0.1em;
}
.text-micro-code {
  font-family: var(--font-mono);
  font-size: 0.375rem;
  font-weight: 400;
}

.btn-sm { padding: 0.5rem 1rem; }
.btn-lg { padding: 1rem 2rem; }

.reveal {
  opacity: 0;
  transform: translateY(1.875rem);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-1.875rem);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.reveal-left.active {}

.reveal-right {
  opacity: 0;
  transform: translateX(1.875rem);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.reveal-right.active {}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

.delay-100 {
  transition-delay: 0.1s;
}
.delay-200 {
  transition-delay: 0.2s;
}
.delay-300 {
  transition-delay: 0.3s;
}
.delay-400 {
  transition-delay: 0.4s;
}
.delay-500 {
  transition-delay: 0.5s;
}
.delay-600 {
  transition-delay: 0.6s;
}
.delay-700 {
  transition-delay: 0.7s;
}
.delay-800 {
  transition-delay: 0.8s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOutUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-1.25rem);
  }
}

.page-enter {
  animation: fadeInUp 0.4s ease forwards;
}

.page-exit {
  animation: fadeOutUp 0.3s ease forwards;
}

#content {
  animation: fadeInUp 0.4s ease;
}

/* Mobile: disable heavy decorations — book: "start with base, add complexity for wider" */
@media (max-width: 640px) {
  .scanline-subtle::after,
  .scanline-standard::after,
  .scanline-minimal::after,
  .scanlines::after {
    display: none !important;
  }

  .grid-pattern::before,
  .pixel-pattern::before,
  .pattern-grid-corner::before,
  .pattern-scanlines::after {
    opacity: 0.03 !important;
  }

  .glitch-hover::before,
  .glitch-hover::after {
    display: none !important;
  }

  .terminal-cursor::after {
    display: none;
  }

  .corner-frame::before,
  .corner-frame::after {
    --corner-frame-size: 0.5rem;
    --corner-frame-width: 2px;
  }

  .s4-shield-bg,
  .hero-shield-label {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .scroll-progress {
    display: none;
  }

  [data-scroll],
  [data-parallax],
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
  }
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(0.625rem);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

.modal-content {
  background: var(--bg-dark);
  border: 2px solid var(--primary);
  width: 100%;
  max-width: 37.5rem;
  position: relative;
  padding: var(--space-2xl);
  box-shadow: var(--glow-medium);
  animation: fadeInUp 0.3s ease;
}

.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: transparent;
  border: none;
  color: var(--primary);
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.modal-close:hover {}

.chat-widget {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  z-index: var(--z-toast);
}

.chat-button {
  width: 3.75rem;
  height: 3.75rem;
  background: var(--bg-surface);
  border: 2px solid var(--primary);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--glow-soft);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-button:hover {
  transform: scale(1.1);
  box-shadow: var(--glow-medium);
  background: var(--primary);
  color: var(--text-on-primary);
}

.chat-button svg {
  width: 1.75rem;
  height: 1.75rem;
}

.chat-badge {
  position: absolute;
  top: -0.3125rem;
  right: -0.3125rem;
  width: 0.75rem;
  height: 0.75rem;
  background: var(--secondary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--secondary);
  animation: pulse 2s infinite;
}

.chat-window {
  position: absolute;
  bottom: 5rem;
  right: 0;
  width: 21.875rem;
  height: 31.25rem;
  background: var(--bg-panel);
  backdrop-filter: blur(0.75rem);
  border: 2px solid var(--primary);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(1.25rem) scale(0.95);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--glow-soft);
  overflow: hidden;
}

.chat-window::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(30, 107, 90, 0.03) 2px,
    rgba(30, 107, 90, 0.03) 4px
  );
  pointer-events: none;
  z-index: 5;
}

.chat-widget.open .chat-window {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.chat-header {
  padding: var(--space-md);
  background: var(--primary-10);
  border-bottom: 2px solid var(--primary-30);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 10;
}

.chat-status {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--status-success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--status-success);
}

.chat-close {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 1.25rem;
  font-family: var(--font-mono);
  transition: transform 0.2s;
}

.chat-close:hover {}

.chat-messages {
  flex: 1;
  padding: var(--space-md);
  overflow-y: auto;
  z-index: 10;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-30) transparent;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--primary-30);
}

.message {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-body-sm);
  max-width: 85%;
  line-height: 1.4;
  font-family: var(--font-mono);
  position: relative;
  animation: messageSlide 0.3s ease-out;
}

.message::before {
  content: attr(data-sender);
  display: block;
  font-size: 0.625rem;
  text-transform: uppercase;
  margin-bottom: 4px;
  opacity: 0.6;
  letter-spacing: 1px;
}

@keyframes messageSlide {
  from {
    opacity: 0;
    transform: translateY(0.625rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.system {
  align-self: flex-start;
  background: var(--primary-10);
  color: var(--text-primary);
  border: 1px solid var(--primary-30);
  border-left: 4px solid var(--primary);
}

.message.user {
  align-self: flex-end;
  background: var(--primary);
  color: var(--text-on-primary);
  border: 1px solid var(--primary);
  box-shadow: var(--glow-soft);
}

.typing-indicator {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 0.75rem 1rem;
  background: var(--primary-10);
  border: 1px solid var(--primary-30);
  width: fit-content;
  margin-bottom: var(--space-sm);
  animation: messageSlide 0.3s ease-out;
}

.typing-dot {
  width: 0.375rem;
  height: 0.375rem;
  background: var(--primary);
  border-radius: 50%;
  animation: typingBlink 1s infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBlink {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

.chat-input {
  padding: var(--space-md);
  background: var(--bg-surface);
  border-top: 2px solid var(--border-default);
  z-index: 10;
}

.chat-input::before {
  content: ">";
  color: var(--primary);
  font-family: var(--font-mono);
  font-weight: bold;
  font-size: var(--text-body);
}

.chat-input input {
  flex: 1;
  background: transparent;
  border: none;
  padding: var(--space-xs);
  color: var(--text-primary);
  font-family: var(--font-mono);
  /* iOS Safari: font-size >= 16px prevents auto-zoom on focus */
  font-size: 1rem;
}

.chat-input input:focus {
  outline: none;
}

.chat-input button {
  background: var(--primary);
  border: 2px solid var(--primary);
  color: var(--text-on-primary);
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.chat-input button:hover {
  background: var(--primary-hover);
  box-shadow: var(--glow-soft);
  transform: translateY(-2px);
}

.chat-action-highlight {
  animation: chatHighlight 0.4s ease;
  box-shadow: 0 0 0 3px var(--primary-40);
  transition: box-shadow 0.3s ease;
}
@keyframes chatHighlight {
  from { box-shadow: 0 0 0 6px var(--primary-60); }
  to { box-shadow: 0 0 0 3px var(--primary-40); }
}

.chat-text-highlight {
  background: linear-gradient(135deg, var(--primary-60), var(--primary-40));
  color: white;
  padding: 2px 0.375rem;
  border-radius: 4px;
  animation: chatTextPulse 0.6s ease infinite alternate;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.4);
}
@keyframes chatTextPulse {
  from { 
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.4);
    transform: scale(1);
  }
  to { 
    box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.6);
    transform: scale(1.05);
  }
}

@media (max-width: 480px) {
  .chat-window {
    width: calc(100vw - 2.5rem);
    right: -1.25rem;
  }
}

/* ============================================
   Hamburger + off-canvas drawer (< 768px)
   ============================================ */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.75rem;
  background: transparent;
  border: 1px solid var(--border-default);
  cursor: pointer;
  flex-shrink: 0;
}
.nav-hamburger .hamburger-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
body.drawer-open .nav-hamburger .hamburger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.drawer-open .nav-hamburger .hamburger-bar:nth-child(2) { opacity: 0; }
body.drawer-open .nav-hamburger .hamburger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-backdrop {
  position: fixed;
  top: calc(-1 * env(safe-area-inset-top, 0px));
  right: calc(-1 * env(safe-area-inset-right, 0px));
  bottom: calc(-1 * env(safe-area-inset-bottom, 0px));
  left: calc(-1 * env(safe-area-inset-left, 0px));
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 998;
}
body.drawer-open .nav-backdrop {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: calc(min(86vw, 360px) + env(safe-area-inset-right, 0px));
  background: var(--bg-surface);
  border-left: 1px solid var(--border-default);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 999;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
body.drawer-open .nav-drawer {
  transform: translateX(0) !important;
}

.nav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-default);
  flex-shrink: 0;
}
.nav-drawer-title {
  font-family: var(--font-mono);
  font-size: var(--text-body-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.nav-drawer-close {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
}
.nav-drawer-close:hover { color: var(--primary); }

.nav-drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
  flex: 1 1 auto;
}
.nav-drawer-link {
  display: block !important;
  width: 100%;
  padding: 1rem 1.5rem;
  min-height: 2.75rem;
  box-sizing: border-box;
  font-family: var(--font-mono);
  font-size: var(--text-body);
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.nav-drawer-link:hover,
.nav-drawer-link:focus {
  background: var(--bg-subtle, rgba(0,0,0,0.03));
  color: var(--primary);
  border-bottom-color: var(--border-default);
  outline: none;
}
.nav-drawer-link.active {}
.nav-drawer-link.sub {
  padding-left: 2.5rem;
  font-size: var(--text-body-sm);
  color: var(--text-secondary);
}
.nav-drawer-link.muted { color: var(--text-muted); }

.nav-drawer-group {
  padding-top: 0.5rem;
}
.nav-drawer-group-title {
  padding: 0.75rem 1.5rem 0.25rem;
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.nav-drawer-foot {
  border-top: 1px solid var(--border-default);
  padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom, 0px));
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .nav-hamburger { display: inline-flex; }
  .nav.primary-nav { display: none; }
  .account-widget { display: none; }
}

/* ============================================
   Header utility bar — sits right of primary nav.
   Contains: language toggle + account widget.
   Stepanov split: primary nav = content routing,
   utility = user state (language, auth).
   ============================================ */
/* `.header-utility` now composes `.cluster` + these two semantic properties.
   Flex/gap/align-items are algorithm (defined once in the primitive).  This
   rule only describes what makes *this* cluster special. */
.header-utility {
  flex-shrink: 0;
  margin-left: var(--space-md);
}

.header-lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  min-height: 2.25rem;
  padding: 0 var(--space-xs);
  font-family: var(--font-mono);
  font-size: var(--text-body-sm, 0.875rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--border-default);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  will-change: transform;
}
.header-lang:hover,
.header-lang:focus {}

/* Remove old standalone account-widget margin — it's now inside header-utility. */
.header-utility .account-widget { margin-left: 0; }

@media (max-width: 768px) {
  .header-utility { display: none; }
}

/* ============================================
   Header drill-down views (Stepanov-style).
   The header hosts interchangeable panels that
   share the same shape: `[back?, ...items]`.
   Toggling `body.header-view-<name>` swaps which
   view is active.  Primary (nav + utility) is
   the default; other views fade/slide in.
   ============================================ */

.header-auth-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0 var(--space-sm);
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.header-auth-toggle:hover,
.header-auth-toggle:focus-visible {}

/* Alternate views: positioned where primary row would be.  Hidden by
   default via opacity + pointer-events so keyboard nav doesn't hit them. */
.header-view {
  position: absolute;
  inset: 0;
  margin: 0 auto;
  max-width: var(--grid-max-width);
  padding: 0 calc(var(--container-pad) + env(safe-area-inset-right, 0px)) 0 calc(var(--container-pad) + env(safe-area-inset-left, 0px));
  background: var(--bg-surface);
  opacity: 0;
  pointer-events: none;
  transform: translateX(1rem);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 10;
}

/* Primary row transitions out when any drill-down view is active. */
body.header-view-auth .header-inner > .logo,
body.header-view-auth .header-inner > nav.primary-nav,
body.header-view-auth .header-inner > .header-utility,
body.header-view-account .header-inner > .logo,
body.header-view-account .header-inner > nav.primary-nav,
body.header-view-account .header-inner > .header-utility {
  opacity: 0.15;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

body.header-view-auth #header-view-auth,
body.header-view-account #header-view-account {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}
body.header-view-auth #header-view-auth { aria-hidden: false; }

.header-view-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  min-height: 2.75rem;
  padding: 0 var(--space-sm);
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: var(--text-body-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  margin-right: auto;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.header-view-back-glyph {
  color: var(--primary);
  display: inline-block;
  transition: transform 0.2s ease;
}
.header-view-back:hover .header-view-back-glyph {
  transform: translateX(-0.25em);
}
.header-view-back:hover,
.header-view-back:focus-visible {
  color: var(--text-primary);
  border-color: var(--primary);
  outline: none;
}

.header-view-greeting {
  font-family: var(--font-mono);
  font-size: var(--text-body-sm);
  color: var(--text-secondary);
  max-width: 18ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: var(--space-sm);
}

/* ============================================
   Stream-in animation — each top-level <section>
   cascades in with a staggered delay.  Gives a
   "server-streaming" perceptual effect without
   requiring HTTP chunked transfer.

   Stepanov-clean: one rule, generic across all
   sections.  `--stream-delay` is computed from
   CSS `nth-of-type(n)` so no per-section wiring.

   Respects `prefers-reduced-motion`.
   ============================================ */
@keyframes stream-in {
  from { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0);  }
}

.app-wrapper > header.site-header,
#content > section,
#content > div,
#content > article,
footer {
  animation: stream-in 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* Stagger top-level sections inside #content via child index.
   First section starts at 0ms, each next +80ms.  Caps at 8 items so
   long pages don't feel slow — everything past #8 shares the same delay. */
#content > *:nth-child(1) { animation-delay: 0ms; }
#content > *:nth-child(2) { animation-delay: 80ms; }
#content > *:nth-child(3) { animation-delay: 160ms; }
#content > *:nth-child(4) { animation-delay: 240ms; }
#content > *:nth-child(5) { animation-delay: 320ms; }
#content > *:nth-child(6) { animation-delay: 400ms; }
#content > *:nth-child(7) { animation-delay: 480ms; }
#content > *:nth-child(n+8) { animation-delay: 560ms; }

/* Header always first (no delay) so nav is immediately usable. */
.app-wrapper > header.site-header {
  animation-duration: 0.35s;
  animation-delay: 0ms;
}

@media (prefers-reduced-motion: reduce) {
  .app-wrapper > header.site-header,
  #content > *,
  footer {
    animation: none !important;
  }
}

/* ============================================================
   LAYOUT PRIMITIVES (Stepanov-style)

   Generic algorithms over element trees.  One class, any content.
   Composable via algebraic laws: `.stack.center` == `.center.stack`
   (declaration order doesn't change semantics).  Minimal requirements:
   a block-level element with children.  No coupling to theme, colors,
   or specific component structure.

   Each primitive solves exactly one problem:
     .stack          — vertical rhythm
     .cluster        — horizontal group with wrap + gap
     .center         — centre content (block + inline)
     .frame          — fixed aspect ratio
     .switcher       — horizontal→vertical at container threshold
     .grid-auto      — responsive auto-fit grid
     .sidebar        — 1-fixed / 1-fluid split
     .reel           — horizontal scrolling strip

   Default `--gap` token = `--space-md`.  Override per instance via
   `style="--gap: 2rem"` or nested rules.  No magic numbers.
   ============================================================ */

.stack {
  --gap: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.cluster {
  --gap: var(--space-sm);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap);
}

.cluster--start  { justify-content: flex-start; }
.cluster--center { justify-content: center; }
.cluster--end    { justify-content: flex-end; }
.cluster--between { justify-content: space-between; }

.center {}

.frame {
  --aspect: 16 / 9;
  aspect-ratio: var(--aspect);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.frame > * { max-width: 100%; max-height: 100%; }

.switcher {
  --gap: var(--space-md);
  --threshold: 40rem;
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
}
.switcher > * {
  flex-grow: 1;
  flex-basis: calc((var(--threshold) - 100%) * 999);
}

.grid-auto {
  --gap: var(--space-md);
  --min: 18rem;
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(min(var(--min), 100%), 1fr));
}

.sidebar {
  --gap: var(--space-md);
  --side-width: 20rem;
  --content-min: 50%;
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
}
.sidebar > :first-child { flex-basis: var(--side-width); flex-grow: 1; }
.sidebar > :last-child  { flex-basis: 0; flex-grow: 999; min-inline-size: var(--content-min); }

.reel {
  --gap: var(--space-md);
  display: flex;
  overflow-x: auto;
  gap: var(--gap);
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
}
.reel > * { flex-shrink: 0; scroll-snap-align: start; }


/* ============================================================
   CONSOLIDATED FLEX PATTERNS (auto-generated Stepanov dedup)

   Each `:where(...)` selector below is the single authoritative
   definition of a flex algorithm shared by the components listed.
   The components' own rules no longer carry display/gap/align-items —
   they keep only their unique properties (padding, border, color, etc).

   To add a new component to a group: append its selector here.
   To change the algorithm for a group: edit the body here once.
   ============================================================ */
/* Shared cluster — gap:var(--space-sm) align:center justify:flex-start wrap:nowrap (22 components) */
:where(.btn--icon,
.toast,
.inline-loader,
.cli-loader-line,
.logo,
.landing-cta,
.dropdown-option,
.status-badge,
.system-label,
/* Overlay; does not participate in header flow.  Pinned right-of-utility
   so it doesn't push account widget or nav items sideways during requests. */
.htmx-indicator,
.chat-header,
.chat-input,
.hero-bullets li,
.package-features li,
.page-badge,
.feature-list li,
.pricing-badge,
.plan-features li,
.demo-badge,
.component-item,
.news-search,
.news-actions) {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Shared stack — gap:var(--space-xs) align:stretch justify:flex-start wrap:nowrap (2 components) */
:where(.input-group,
.hero-bullets) {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

/* Shared cluster — gap:var(--space-xs) align:center justify:flex-start wrap:nowrap (5 components) */
:where(.loading-text,
.landing-section-indicator,
.flow-badge,
.ai-proof-header,
.metric-trend) {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* Shared cluster — gap:var(--space-md) align:center justify:flex-end wrap:nowrap (2 components) */
:where(.landing-nav,
/* Alternate views: positioned where primary row would be.  Hidden by
   default via opacity + pointer-events so keyboard nav doesn't hit them. */
.header-view) {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-md);
}

/* Shared cluster — gap:var(--space-sm) align:center justify:center wrap:nowrap (2 components) */
:where(.btn,
.workflow-preview) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

/* Shared stack — gap:var(--space-md) align:stretch justify:flex-start wrap:nowrap (3 components) */
:where(.chat-messages,
.faq-container,
.analytics-preview) {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* Shared cluster — gap:var(--space-md) align:stretch justify:flex-start wrap:nowrap (3 components) */
:where(.feature-card,
.docs-callout,
.docs-step) {
  display: flex;
  gap: var(--space-md);
}

/* Shared stack — gap:0 align:stretch justify:flex-start wrap:nowrap (2 components) */
:where(.hero-price,
.cta-rotate-menu) {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Shared cluster — gap:0.375rem align:center justify:flex-start wrap:nowrap (2 components) */
:where(.mockup-limit-bar,
.mockup-company) {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* Shared cluster — gap:0.625rem align:center justify:flex-start wrap:nowrap (2 components) */
:where(.cta-rotate-menu button,
.pc-features li) {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

/* Shared cluster — gap:0.5rem align:center justify:center wrap:nowrap (2 components) */
:where(.pc-cta,
.sidebar-submit) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Shared cluster — gap:var(--space-md) align:stretch justify:center wrap:nowrap (2 components) */
:where(.cta-content .btn,
.features-cta-actions,
.demo-cta-actions) {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
}

/* Shared cluster — gap:var(--space-sm) align:stretch justify:flex-start wrap:nowrap (2 components) */
:where(.canvas-actions,
.console-line) {
  display: flex;
  gap: var(--space-sm);
}


/* ================================================================
   AUTO-DEDUPED SHARED RULES

   Each rule below originally appeared 2+ times with identical property
   sets.  Consolidated via comma-grouping (specificity preserved — a
   hover/focus still wins over its base at the same specificity level).
   ================================================================ */
*,
*::before,
*::after,
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.grid-pattern > *,
.pixel-pattern > *,
.pattern-grid-corner > *,
.pattern-grid-bottom-left > *,
.pattern-scanlines > *,
.pattern-pixels > * {
  position: relative;
  z-index: 1;
}
.badge--primary,
.lang-btn.active {
  background: var(--primary-10);
  border-color: var(--primary);
  color: var(--primary);
}
.layout-3col,
.features-mini-grid,
.more-features-grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: repeat(3, 1fr);
}
.logo-mark svg,
.logo-mark canvas {
  height: var(--logo-height);
  width: var(--logo-width);
}
.landing-nav,
.sb-tx-info,
.push-notif-content,
.pn-cal-grid {
  flex: 1;
  min-width: 0;
}
.form-input:focus,
.dropdown-trigger:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-30);
  outline: none;
}
.form-error,
.dropdown-error-message {
  color: var(--status-error-text);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  margin-top: var(--space-xs);
}
.dropdown-menu::before,
.sb-scorecard-total::before {
  border-width: 2px 0 0 2px;
  left: -2px;
  top: -2px;
}
.dropdown-menu::after,
.sb-scorecard-total::after {
  border-width: 0 2px 2px 0;
  bottom: -2px;
  right: -2px;
}
.dropdown-option:hover,
.dropdown-option.selected {
  background: var(--primary-10);
  color: var(--primary-text);
}
.status-dot.offline,
.status-badge.offline .dot {
  animation: none;
  background: var(--text-muted);
}
.status-badge.error,
.comparison-step--error {
  border-color: var(--status-error);
  color: var(--status-error-text);
}
.card:hover,
.demo-feature:hover,
.workflow-node:hover,
.mini-feature:hover,
.more-feature-card:hover,
.stat-card:hover,
.feature-card:hover,
.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: var(--box-glow);
}
.card-description,
.feature-content p {
  color: var(--text-secondary);
  font-size: var(--text-body-sm);
  line-height: 1.5;
}
.reveal-left.active,
.reveal-right.active,
.sb-btn--good-primary:hover::after {
  opacity: 1;
  transform: translateX(0);
}
.modal-close:hover,
.chat-close:hover {
  color: var(--secondary);
  transform: rotate(90deg);
}
.nav-drawer-link.active,
.news-source {
  color: var(--primary);
  font-weight: 700;
}
.header-lang:hover,
.header-lang:focus,
.header-auth-toggle:hover,
.header-auth-toggle:focus-visible {
  border-color: var(--primary);
  color: var(--primary);
  outline: none;
}
.center,
.cw-button,
.cw-invoice_header,
.ce-pw-invoice_header {
  align-items: center;
  display: flex;
  justify-content: center;
}
.modal-box::before,
.modal-box::after {
  border-color: var(--primary);
  border-style: solid;
  content: "";
  height: 16px;
  pointer-events: none;
  position: absolute;
  width: 16px;
  z-index: 10;
}
.modal-box::before,
.sb-explanation-inner::before,
.sb-scorecard-card::before {
  border-width: 2px 0 0 2px;
  left: -1px;
  top: -1px;
}
.modal-box::after,
.sb-explanation-inner::after,
.sb-scorecard-card::after {
  border-width: 0 2px 2px 0;
  bottom: -1px;
  right: -1px;
}
.auth-form,
.templates-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-form input:focus,
.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus,
.search-input:focus {
  border-color: var(--primary);
  box-shadow: var(--glow);
}
.auth-buttons,
.template-card-actions {
  display: flex;
  gap: 8px;
}
.btn-ghost:hover,
.row-actions button:hover {
  background: var(--surface2);
  border-color: var(--border);
  color: var(--text);
}
.table-list .row-count,
.dl-msg-date {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}
.ctx-menu-item:hover,
.undo-toast button:hover {
  background: var(--primary);
  color: var(--bg);
}
.ctx-menu-config,
.period-sep {
  color: var(--text-muted);
  font-size: 11px;
}
.action-toast-ok,
.file-input-btn:hover,
.file-input-wrap:hover .file-input-btn,
.cell-upload-btn:hover,
.hidden-col-tag:hover,
.flow-action-done,
.config-add-btn:hover,
.pn-add-line:hover,
.pc-tag--primary,
.pc-stamp--primary {
  border-color: var(--primary);
  color: var(--primary);
}
.trigger-list,
.xs-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.toolbar-menu-item:hover,
.mockup-status.is-ok {
  background: var(--primary-10);
  color: var(--primary);
}
table.data-table,
.mapping-table {
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 13px;
  width: 100%;
}
.file-input-wrap input[type="file"],
.cell-upload-btn input[type="file"] {
  cursor: pointer;
  height: 100%;
  inset: 0;
  opacity: 0;
  position: absolute;
  width: 100%;
}
.sidebar-actions,
.hook-item-actions {
  display: flex;
  gap: 4px;
}
.ce-header-actions,
.hook-item-header {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cw-divider,
.ce-pw-divider {
  align-items: center;
  display: flex;
}
.xv-status .xf-value,
.ctx-menu-flow,
.ai-proof-quote strong {
  color: var(--primary);
  font-weight: 600;
}
.xv-link:hover,
.dl-tab-active, .dl-tab.htmx-request,
.pn-panel-right .pn-panel-header {
  border-bottom-color: var(--primary);
  color: var(--primary);
}
.dl-error,
.expl-error {
  color: var(--danger);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 12px;
}
.dl-empty,
.expl-empty {
  color: var(--text-muted);
  font-size: 13px;
  padding: 24px;
  text-align: center;
}
.demo-hero,
.pricing-hero {
  padding: var(--space-3xl) var(--space-lg);
  text-align: center;
}
.demo-title,
.docs-section h1,
.page-title,
.pricing-title {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: var(--text-h2);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: var(--space-md);
  text-transform: uppercase;
}
.component-item:hover,
.integration-icon:hover {
  background: var(--primary-10);
  border-color: var(--primary);
}
.demo-feature h4,
.mini-feature h4,
.more-feature-card h3,
.faq-item h4 {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: var(--text-body);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
}
.demo-feature p,
.plan-description {
  color: var(--text-secondary);
  font-size: var(--text-body-sm);
}
.demo-cta h2,
.cta-content h2,
.features-cta h2 {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: var(--text-h3);
  font-weight: 700;
  margin-bottom: var(--space-md);
  text-transform: uppercase;
}
.dark-patterns-article .article-sources a,
.dark-patterns-article a,
.article-breadcrumbs a {
  color: var(--primary, #2563eb);
  text-decoration: none;
}
.sb-keep-col ul, .sb-lose-col ul,
.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sb-success,
.sb-deadend {
  padding: 2rem 0.5rem;
  text-align: center;
}
.sb-scorecard-sub a,
.censorship-links-list a,
.censorship-article a {
  color: var(--primary, #1e6b5a);
  text-decoration: none;
}
.sb-app-icon .sb-icon,
.sb-push-icon .sb-icon {
  height: 20px;
  width: 20px;
}
.censorship-quote-block blockquote ul,
.seo-article ul {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}
.debunk-label--claim,
.tc-cat--violation .tc-cat-status {
  background: #e11d48;
  color: #fff;
}
.debunk-label--fact,
.tc-cat--safe .tc-cat-status {
  background: #16a34a;
  color: #fff;
}
.censorship-steps,
.censorship-links-list {
  margin: 1rem 0;
  padding-left: 1.5rem;
}
.page-badge,
.pricing-badge {
  background: var(--primary-10);
  border: 2px solid var(--primary-20);
  color: var(--primary-text);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-lg);
  padding: var(--space-sm) var(--space-md);
  text-transform: uppercase;
}
.badge-icon,
.feature-list .check {
  align-items: center;
  display: inline-flex;
  flex-shrink: 0;
  height: 20px;
  justify-content: center;
  max-height: 20px;
  max-width: 20px;
  min-height: 20px;
  min-width: 20px;
  overflow: hidden;
  width: 20px;
}
.feature-visual,
.analytics-preview {
  background: var(--bg-elevated);
  border: 2px solid var(--border-default);
  padding: var(--space-lg);
}
.workflow-node .node-icon svg,
.mini-icon svg,
.more-feature-icon svg {
  flex-shrink: 0;
  height: 24px;
  max-height: 24px;
  max-width: 24px;
  min-height: 24px;
  min-width: 24px;
  stroke: var(--primary);
  width: 24px;
}
.section-title,
.more-features-title,
.faq-title {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: var(--text-h3);
  font-weight: 700;
  margin-bottom: var(--space-2xl);
  text-align: center;
  text-transform: uppercase;
}
.mini-feature,
.more-feature-card,
.faq-item {
  background: var(--bg-surface);
  border: 2px solid var(--border-default);
  padding: var(--space-lg);
  transition: all 0.2s ease;
}
.stats-section,
.essence-section {
  background: var(--bg-base);
  padding: var(--space-3xl) var(--space-xl);
}
.stat-value,
.social-proof-value {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: var(--text-h2);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}
.essence-text,
.faq-item p {
  color: var(--text-secondary);
  font-size: var(--text-body-sm);
  line-height: 1.6;
}
.pn-remove-line:hover,
.pc-tag--red,
.pc-stamp--red {
  border-color: #ef4444;
  color: #ef4444;
}
.plan-name,
.enterprise-cta h3 {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: var(--text-h4);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
}
.hero-bullets .bullet-icon svg,
.flow-arrow svg {
  display: block;
  flex-shrink: 0;
  height: var(--icon-size-md);
  max-height: var(--icon-size-md);
  max-width: var(--icon-size-md);
  min-height: var(--icon-size-md);
  min-width: var(--icon-size-md);
  width: var(--icon-size-md);
}
.eur-rate-tip.is-visible .eur-rate-tip-text,
.bracket-tooltip:focus .bracket-examples span {
  animation: blink-caret 0.7s step-end infinite;
  clip-path: inset(0 0 0 0);
}
.bracket-tooltip:focus .bracket-examples,
.bracket-tooltip:focus::after {
  opacity: 1;
  visibility: visible;
}
.pn-px-compose,
.px-selected {
  background: var(--primary-20, rgba(30, 107, 90, 0.2));
  border-color: var(--primary-40, rgba(30, 107, 90, 0.4));
}
.tc-btn--check,
.tc-btn--publish {
  background: #0f766e;
  color: #fff;
}
.tc-btn--copy,
.tc-verdict--unknown {
  background: #f1f5f9;
  color: #475569;
}
