/* ============================================================
   Project Kaizen - Dark Theme Override for Quark
   Matches the original intrac.net static site design
   ============================================================ */

/* === CSS Variables === */
:root {
  --cyan: #00FFFF;
  --cyan-bright: #00A3FF;
  --magenta: #FF1493;
  --purple: #8A2BE2;
  --white: #FFFFFF;
  --black: #000000;
  --bg-dark: #0A0F1E;
  --bg-card: #02050A;
  --bg-gradient: linear-gradient(135deg, #0A0F1E 0%, #290D40 100%);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --bg-glass-heavy: rgba(10, 15, 30, 0.98);
  --text-primary: #F0F0F0;
  --text-secondary: #A0A0A0;
  --text-accent: var(--cyan);
  --gradient-main: linear-gradient(90deg, var(--cyan) 0%, var(--magenta) 100%);
  --gradient-glow: linear-gradient(90deg, var(--cyan-bright) 0%, var(--magenta) 100%);
  --glow-cyan: 0 0 20px rgba(0, 255, 255, 0.4);
  --glow-magenta: 0 0 20px rgba(255, 20, 147, 0.4);
  --glow-text: 0 0 10px rgba(0, 255, 255, 0.5);
  --border-glow: 1px solid var(--cyan);
  --border-subtle: 1px solid rgba(255, 255, 255, 0.1);
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --container-width: 1200px;
  --header-height: 80px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

/* === Animations === */
@keyframes neonGlow {
  from {
    text-shadow: 0 0 10px var(--cyan), 0 0 20px var(--cyan);
    filter: drop-shadow(0 0 5px var(--cyan));
  }
  to {
    text-shadow: 0 0 20px var(--magenta), 0 0 40px var(--purple);
    filter: drop-shadow(0 0 10px var(--magenta));
  }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes plasma-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animate-glow { animation: neonGlow 3s ease-in-out infinite alternate; }
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-slide-up { animation: slideInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }

/* === Fix Quark white flash === */
html {
  background-color: var(--bg-dark);
}

/* === Global Body === */
body {
  font-family: var(--font-main) !important;
  background-color: var(--bg-dark) !important;
  background-image: var(--bg-gradient) !important;
  background-attachment: fixed !important;
  color: var(--text-primary) !important;
  line-height: 1.6;
  overflow-x: hidden;
}

/* === Particle Background === */
#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
}

#page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  margin-top: 0 !important;
  padding-top: 0;
}

/* === Header / Navigation === */
/* Critical header layout is centralized here so scroll and page offsets
   remain consistent across all templates. */

#header,
#header.scrolled,
.header-dark #header:not(.scrolled),
.header-dark.header-transparent #header:not(.scrolled) {
  position: sticky !important;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 99999 !important;
  background: #0A0F1E !important;
  height: var(--header-height) !important;
  padding: 0 !important;
  border-bottom: 1px solid rgba(0, 255, 255, 0.15);
}

#header .navbar {
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: transparent !important;
}

#header .navbar-section {
  height: var(--header-height) !important;
  display: flex;
  align-items: center;
}

/* Logo in nav */
#header .navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

#header .navbar-brand svg,
#header .navbar-brand img {
  filter: drop-shadow(0 0 5px var(--cyan));
  height: 40px;
  width: 40px;
  object-fit: contain;
}

.nav-brand-text {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 2px;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;
}

/* Nav links */
#header .dropmenu ul {
  list-style: none;
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
  align-items: center;
}

#header .dropmenu ul li {
  display: inline-block;
}

#header .dropmenu ul li a,
#header .navbar-section a:not(.navbar-brand),
.header-dark #header:not(.scrolled) a,
.header-dark #header:not(.scrolled) a.active {
  color: var(--text-primary) !important;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  position: relative;
  text-decoration: none;
  padding: 10px 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

#header .dropmenu ul li a:hover,
#header .dropmenu ul li a.active {
  color: var(--cyan) !important;
  text-shadow: 0 0 12px rgba(0, 255, 255, 0.6);
}

/* Nav link underline effect */
#header .dropmenu ul li a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 18px;
  right: 18px;
  width: auto;
  height: 2px;
  background: var(--gradient-main);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

#header .dropmenu ul li a:hover::after,
#header .dropmenu ul li a.active::after {
  transform: scaleX(1);
}

/* === Main Content Area === */

#body-wrapper .container {
  max-width: var(--container-width);
}

#body-wrapper.section {
  padding-top: clamp(42px, 6vw, 72px);
}

.page-shell {
  width: min(var(--container-width), calc(100vw - 32px));
  margin: 0 auto;
}

.kaizen-page {
  color: var(--text-primary);
}

.kaizen-hero {
  padding: clamp(64px, 8vw, 112px) 0 clamp(44px, 6vw, 76px);
}

.kaizen-hero.compact {
  padding-top: clamp(46px, 6vw, 72px);
}

.kaizen-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.kaizen-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
  color: #c7b7ff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.kaizen-eyebrow::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a4c7ff, #c77dff);
  box-shadow: 0 0 18px rgba(199, 125, 255, 0.5);
}

.kaizen-lede {
  max-width: 760px;
  color: var(--text-secondary) !important;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.kaizen-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.kaizen-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary) !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.kaizen-button.primary {
  border-color: rgba(199, 125, 255, 0.65);
  background: linear-gradient(135deg, #a4c7ff 0%, #c77dff 100%);
  color: #11131f !important;
  -webkit-text-fill-color: #11131f !important;
}

.kaizen-button:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.1);
  text-shadow: none;
}

.kaizen-button.primary:hover {
  background: linear-gradient(135deg, #b6d3ff 0%, #d891ff 100%);
}

.kaizen-grid {
  display: grid;
  gap: 1rem;
}

.kaizen-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kaizen-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kaizen-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kaizen-panel {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: clamp(1rem, 2vw, 1.35rem);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.18);
}

.kaizen-panel h2,
.kaizen-panel h3,
.kaizen-panel h4 {
  margin-top: 0;
}

.kaizen-panel p:last-child,
.kaizen-panel ul:last-child {
  margin-bottom: 0;
}

.kaizen-panel.accent {
  border-color: rgba(199, 125, 255, 0.38);
  background:
    linear-gradient(140deg, rgba(164, 199, 255, 0.12), rgba(199, 125, 255, 0.12)),
    rgba(255, 255, 255, 0.055);
}

.kaizen-section {
  padding: clamp(42px, 6vw, 76px) 0;
}

.kaizen-section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.kaizen-section-title h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.45rem) !important;
}

.kaizen-section-title p {
  max-width: 560px;
  margin: 0;
}

.kaizen-metric {
  display: grid;
  gap: 0.35rem;
}

.kaizen-metric span {
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kaizen-metric strong {
  color: var(--white);
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1.05;
}

.kaizen-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.kaizen-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(39, 214, 106, 0.55);
  background: rgba(39, 214, 106, 0.12);
  color: #27d66a !important;
  -webkit-text-fill-color: #27d66a !important;
  font-size: 0.78rem;
  font-weight: 800;
}

.kaizen-note {
  border-left: 3px solid rgba(164, 199, 255, 0.75);
  background: rgba(164, 199, 255, 0.08);
  padding: 1rem 1.1rem;
  color: var(--text-secondary);
}

.kaizen-shot {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.kaizen-shot img {
  display: block;
  width: 100%;
  margin: 0 !important;
  border-radius: 0 !important;
}

.kaizen-shot-caption {
  padding: 0.85rem 1rem 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.kaizen-public-frame {
  background:
    radial-gradient(circle at 20% 10%, rgba(164, 199, 255, 0.22), transparent 36%),
    radial-gradient(circle at 88% 14%, rgba(199, 125, 255, 0.2), transparent 34%),
    rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: clamp(1rem, 2.4vw, 1.5rem);
}

.kaizen-app-preview {
  display: grid;
  gap: 0.8rem;
}

.kaizen-app-preview .bar {
  height: 42px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.13);
}

.kaizen-app-preview .mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.kaizen-app-preview .mini-card {
  min-height: 90px;
  border-radius: 8px;
  background: rgba(13, 14, 24, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.13);
  padding: 0.85rem;
}

.kaizen-app-preview .mini-card strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #27d66a;
}

.kaizen-app-preview .wide-card {
  min-height: 156px;
  border-radius: 8px;
  background: rgba(13, 14, 24, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.13);
  padding: 1rem;
}

.public-chat-shell {
  display: grid;
  grid-template-rows: auto minmax(360px, 1fr) auto;
  min-height: min(760px, calc(100vh - 170px));
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 85px rgba(0, 0, 0, 0.28);
}

.public-chat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(13, 14, 24, 0.78);
}

.public-chat-title {
  display: grid;
  gap: 0.2rem;
}

.public-chat-title strong {
  font-size: 1.05rem;
}

.public-chat-title span,
.public-chat-status {
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.public-chat-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.public-chat-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f7b731;
  box-shadow: 0 0 12px rgba(247, 183, 49, 0.5);
}

.public-chat-status.online::before {
  background: #27d66a;
  box-shadow: 0 0 12px rgba(39, 214, 106, 0.5);
}

.public-chat-status.offline::before {
  background: #ff5a62;
  box-shadow: 0 0 12px rgba(255, 90, 98, 0.5);
}

.public-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.1rem;
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0)),
    rgba(5, 7, 14, 0.42);
}

.public-message {
  max-width: min(760px, 86%);
  padding: 0.95rem 1rem;
  border-radius: 8px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.public-message.user {
  align-self: flex-end;
  background: rgba(199, 125, 255, 0.2);
  border: 1px solid rgba(199, 125, 255, 0.35);
  color: var(--white);
}

.public-message.assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: var(--text-primary);
}

.public-message.system {
  align-self: center;
  max-width: 720px;
  background: rgba(164, 199, 255, 0.08);
  border: 1px solid rgba(164, 199, 255, 0.22);
  color: var(--text-secondary);
  text-align: center;
  font-size: 0.92rem;
}

.public-chat-form {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(13, 14, 24, 0.86);
}

.public-chat-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: end;
}

.public-chat-form textarea {
  width: 100%;
  min-height: 94px;
  max-height: 210px;
  resize: vertical;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.055);
  color: var(--white);
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.45;
}

.public-chat-form textarea:focus {
  outline: none;
  border-color: rgba(164, 199, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(164, 199, 255, 0.14);
}

.public-chat-form button {
  min-width: 122px;
  min-height: 46px;
  border-radius: 8px;
  border: 1px solid rgba(199, 125, 255, 0.65);
  background: linear-gradient(135deg, #a4c7ff 0%, #c77dff 100%);
  color: #11131f;
  font-weight: 900;
  cursor: pointer;
  font-family: var(--font-main);
}

.public-chat-form button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.public-chat-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.public-chat-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.public-chat-example {
  display: inline-flex;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  color: var(--text-secondary) !important;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
  cursor: pointer;
}

.public-chat-example:hover {
  border-color: rgba(164, 199, 255, 0.45);
  color: var(--white) !important;
  text-shadow: none;
}

.public-chat-guardrails {
  display: grid;
  gap: 0.7rem;
}

.public-chat-guardrail {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
}

.public-chat-guardrail span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(39, 214, 106, 0.12);
  color: #27d66a;
  font-weight: 900;
}

.public-chat-guardrail p {
  margin: 0;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  color: var(--white) !important;
  line-height: 1.2;
  font-family: var(--font-main) !important;
}

/* h1 gets gradient text */
h1 {
  font-size: 3.5rem !important;
  font-weight: 800 !important;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

/* h2-h6 stay solid color */
h2 {
  font-size: 2rem !important;
  font-weight: 700 !important;
  margin-bottom: 1.5rem;
  color: var(--white) !important;
  -webkit-text-fill-color: initial;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

h3 {
  font-size: 1.4rem !important;
  color: var(--cyan) !important;
  -webkit-text-fill-color: initial;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  margin-bottom: 1rem;
}

h4, h5, h6 {
  -webkit-text-fill-color: initial;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

a {
  color: var(--cyan);
  transition: all 0.3s ease;
  text-decoration: none;
}

a:hover {
  color: var(--magenta);
  text-shadow: var(--glow-text);
}

a:visited {
  color: var(--cyan);
}

strong, b {
  color: var(--white);
}

em, i {
  color: var(--text-secondary);
}

blockquote {
  border-left: 4px solid var(--magenta) !important;
  padding: 1rem 1.5rem !important;
  background: rgba(255, 20, 147, 0.05) !important;
  color: var(--white) !important;
  font-style: italic;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
}

blockquote p {
  color: var(--white);
}

hr {
  border: none !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  margin: 2.5rem 0 !important;
}

/* === Lists === */
ul, ol {
  color: var(--text-secondary);
}

ul li, ol li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

/* === Tables === */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 1.5rem 0;
}

table thead {
  background: rgba(0, 255, 255, 0.1) !important;
}

table thead th {
  color: var(--cyan) !important;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
  padding: 14px 16px !important;
  border-bottom: 2px solid rgba(0, 255, 255, 0.3) !important;
  text-align: left;
  background: transparent !important;
}

table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease;
}

table tbody tr:hover {
  background: rgba(0, 255, 255, 0.03);
}

table tbody td {
  padding: 12px 16px !important;
  color: var(--text-primary) !important;
  border: none !important;
  font-size: 0.95rem;
  background: transparent !important;
}

table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

/* === Code blocks === */
code {
  background: rgba(0, 255, 255, 0.1) !important;
  color: var(--cyan) !important;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
}

pre {
  background: var(--bg-card) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 1.5rem !important;
}

pre code {
  background: transparent !important;
  padding: 0;
}

/* === Images in content === */
#body-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 1rem 0;
}

/* Hero image (first image) */
#body-wrapper > section > section > p:first-child img {
  max-width: 500px;
  display: block;
  margin: 0 auto 2rem;
  filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.3));
  animation: neonGlow 3s ease-in-out infinite alternate;
}

/* === Footer === */
#footer,
#footer.section {
  background: var(--bg-card) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
  padding: 60px 0 20px !important;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: var(--white) !important;
  margin-bottom: 20px;
  font-size: 1.1rem !important;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: var(--text-secondary) !important;
  transition: color 0.3s ease;
}

.footer-col ul li a:hover {
  color: var(--cyan) !important;
}

.footer-col p {
  color: var(--text-secondary) !important;
}

.footer-copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary) !important;
  font-size: 0.9rem;
}

.admin-link {
  color: rgba(255, 255, 255, 0.2) !important;
  font-size: 0.8rem;
}

.admin-link:hover {
  color: var(--magenta) !important;
}

#footer,
#footer p,
#footer a,
.bg-gray,
.bg-gray p {
  background: var(--bg-card) !important;
}

#footer a:hover {
  color: var(--cyan) !important;
}

/* === Mobile Menu === */

/* Hamburger button — pin inside the sticky header bar */
.mobile-menu {
  position: fixed !important;
  top: 0;
  right: 0;
  height: var(--header-height) !important;
  z-index: 100000 !important;
  display: none;
}

@media (max-width: 840px) {
  .mobile-menu {
    display: block !important;
  }
  #header .navbar-section.desktop-menu {
    display: none !important;
  }
}

.mobile-menu .button_container {
  position: absolute !important;
  top: 50% !important;
  right: 1.25rem !important;
  transform: translateY(-50%);
  height: 24px;
  width: 28px;
}

.mobile-menu .button_container.active {
  position: fixed !important;
  top: 28px !important;
  right: 1.25rem !important;
  transform: none;
}

.mobile-menu .button_container span {
  background: var(--white) !important;
  height: 3px !important;
  border-radius: 2px;
}

.mobile-menu .button_container.active .top,
.mobile-menu .button_container.active .middle,
.mobile-menu .button_container.active .bottom {
  background: var(--cyan) !important;
}

/* Full-screen overlay */
.mobile-container {
  position: fixed !important;
  top: 0 !important;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999 !important;
  pointer-events: none;
}

.mobile-container .overlay {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-glass-heavy) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.mobile-container .overlay.open {
  opacity: 1 !important;
  visibility: visible !important;
  height: 100% !important;
  pointer-events: auto;
}

/* Mobile logo in overlay */
.mobile-container .mobile-logo {
  margin-bottom: 2rem;
}

/* Overlay nav links */
.mobile-container .overlay-menu {
  text-align: center;
  overflow-y: auto;
  height: auto !important;
  max-height: 60vh;
  padding: 0 2rem;
}

.mobile-container .overlay-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-container .overlay-menu ul li {
  margin: 0.25rem 0;
}

.mobile-container .overlay-menu a,
.mobile-container .overlay-menu a:visited {
  color: var(--text-primary) !important;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

.mobile-container .overlay-menu a:hover,
.mobile-container .overlay-menu a.active {
  color: var(--cyan) !important;
  text-shadow: 0 0 12px rgba(0, 255, 255, 0.6);
  background: rgba(0, 255, 255, 0.08);
}

/* Prevent body scroll when mobile nav is open */
body.mobile-nav-open {
  overflow: hidden !important;
}

/* === Spectre Framework Overrides === */
.bg-gray {
  background: var(--bg-card) !important;
}

.section {
  background: transparent;
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 255, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 255, 0.5);
}

/* === Selection highlight === */
::selection {
  background: rgba(0, 255, 255, 0.3);
  color: var(--white);
}

/* ============================================================
   HOMEPAGE - Custom Template Styles
   ============================================================ */

/* === Hero Section === */
.hero-section {
  padding: 80px 0 100px;
  text-align: center;
  position: relative;
}

.hero-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.hero-logo {
  width: 150px;
  margin-bottom: 2rem;
  filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.5));
  border-radius: 20px;
}

/* Electric Plasma Title */
.title-shine {
  position: relative;
  display: inline-block;
  width: 100%;
  text-align: center;
}

.title-futuristic {
  font-size: 6rem !important;
  font-weight: 900 !important;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: inline-block;
  color: transparent !important;
  background: linear-gradient(
    90deg,
    #00FFFF 0%,
    #ffffff 15%,
    #00FFFF 30%,
    #007AFF 50%,
    #FF1493 70%,
    #00FFFF 85%,
    #ffffff 100%
  ) !important;
  background-size: 200% auto !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  animation: plasma-flow 2s linear infinite, voltage-spike 4s ease-in-out infinite;
  margin-bottom: 1rem;
  margin-right: -0.12em;
  position: relative;
  line-height: 1.1;
  -webkit-font-smoothing: antialiased;
  transform: translateZ(0);
  will-change: transform, filter;
}

.title-futuristic::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  color: transparent;
  background: inherit;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: blur(25px);
  opacity: 0.8;
  animation: plasma-flow 2s linear infinite;
}

@keyframes voltage-spike {
  0%, 100% { filter: brightness(100%) drop-shadow(0 0 15px rgba(0,255,255,0.6)); }
  2% { filter: brightness(250%) drop-shadow(0 0 35px rgba(255,255,255,1)); }
  4% { filter: brightness(100%) drop-shadow(0 0 15px rgba(0,255,255,0.6)); }
  40% { filter: brightness(100%) drop-shadow(0 0 15px rgba(0,255,255,0.6)); }
  42% { filter: brightness(180%) drop-shadow(0 0 25px rgba(255,20,147,0.8)); }
  44% { filter: brightness(100%) drop-shadow(0 0 15px rgba(0,255,255,0.6)); }
  70% { filter: brightness(120%) drop-shadow(0 0 20px rgba(0,255,255,0.8)); }
  71% { filter: brightness(100%) drop-shadow(0 0 15px rgba(0,255,255,0.6)); }
}

.hero-subtitle {
  font-size: 1.5rem !important;
  color: var(--text-secondary) !important;
  margin-bottom: 3rem;
  text-transform: uppercase;
  letter-spacing: 4px;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 3rem !important;
  margin-bottom: 0.5rem;
  font-weight: 800 !important;
}

.gradient-text {
  background: var(--gradient-main) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

.stat-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* === Section Padding === */
.section-padding {
  padding: 80px 0;
}

.section-dark {
  background: rgba(0, 0, 0, 0.3);
}

.section-title {
  font-size: 2.5rem !important;
  text-align: center;
  margin-bottom: 3rem;
  font-weight: 700 !important;
}

/* === Card Grid === */
.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

/* === Kaizen Cards === */
.kaizen-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.kaizen-card:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.1);
  transform: translateY(-5px);
}

.kaizen-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-main);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.kaizen-card:hover::before {
  opacity: 1;
}

.kaizen-card p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.card-meta {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-active {
  background: rgba(0, 255, 0, 0.2);
  color: #00FF00;
  border: 1px solid #00FF00;
}

/* Highlight card */
.highlight-card {
  text-align: center;
  border-color: var(--magenta) !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* === Two Column Layout === */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* === Check List (Why Local) === */
.check-list {
  list-style: none !important;
  padding: 0 !important;
}

.check-list li {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.check-icon {
  font-size: 1.5rem;
  color: var(--cyan);
  flex-shrink: 0;
  margin-top: 2px;
}

.check-list li strong {
  display: block;
  font-size: 1.2rem;
  color: var(--white);
}

.check-list li span {
  color: var(--text-secondary);
}

/* === Feature Cards === */
.feature-card {
  text-align: center;
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
}

/* === Feature List (iOS section) === */
.feature-list {
  list-style: none !important;
  padding: 0 !important;
}

.feature-list li {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.05rem;
}

/* === Phone Mockup === */
.phone-mockup-container {
  display: flex;
  justify-content: center;
}

.phone-mockup {
  width: 300px;
  height: 600px;
  background: #000;
  border: 4px solid #333;
  border-radius: 40px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(255, 20, 147, 0.2);
}

.phone-notch {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 25px;
  background: #000;
  border-radius: 20px;
  z-index: 10;
}

.phone-screen {
  height: 100%;
  background: linear-gradient(180deg, #1a1a1a 0%, #000 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 20px;
}

.phone-time {
  color: #fff;
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.5;
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.phone-bubble {
  background: #333;
  padding: 10px;
  border-radius: 15px;
  border-bottom-left-radius: 0;
  text-align: left;
  font-size: 0.9rem;
  color: #fff;
  margin: 0 10px;
}

.phone-orb {
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, var(--magenta) 0%, transparent 70%);
  margin: 0 auto;
  border-radius: 50%;
  filter: blur(20px);
  animation: pulse 2s infinite;
}

.phone-controls {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 1rem;
}

.phone-btn {
  width: 50px;
  height: 50px;
  background: #333;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
}

.phone-btn-end {
  background: #f00;
}

/* === Hardware Section === */
.hardware-visual {
  display: flex;
  justify-content: center;
}

.hardware-box {
  width: 300px;
  height: 300px;
  background: linear-gradient(145deg, #1a1a1a, #000);
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  position: relative;
}

.hardware-box::after {
  content: '';
  position: absolute;
  bottom: -20px;
  width: 80%;
  height: 20px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 50%;
  filter: blur(20px);
}

.spec-list {
  list-style: none !important;
  padding: 0 !important;
}

.spec-list li {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.spec-list li strong {
  color: var(--white);
  font-size: 1.2rem;
}

.spec-list li span {
  color: var(--text-secondary);
}

/* === CTA Section === */
.cta-section {
  padding: 100px 0;
  text-align: center;
  background: radial-gradient(circle at center, rgba(138, 43, 226, 0.2) 0%, rgba(10, 15, 30, 0) 70%);
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn-kaizen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 0.95rem;
  text-decoration: none;
}

.btn-primary-k {
  background: var(--gradient-main);
  color: var(--bg-dark) !important;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
  -webkit-text-fill-color: initial !important;
}

.btn-primary-k:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.4);
  color: var(--bg-dark) !important;
}

.btn-outline-k {
  background: transparent;
  border: 1px solid var(--cyan);
  color: var(--cyan) !important;
  -webkit-text-fill-color: initial !important;
}

.btn-outline-k:hover {
  background: rgba(0, 255, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
  color: var(--cyan) !important;
}

/* ============================================================
   NAV LOGIN BUTTON
   ============================================================ */

.nav-login-btn {
  background: transparent;
  border: 1px solid var(--magenta);
  color: var(--magenta) !important;
  padding: 8px 20px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 20px;
  font-family: var(--font-main);
}

.nav-login-btn:hover {
  background: rgba(255, 20, 147, 0.15);
  box-shadow: 0 0 20px rgba(255, 20, 147, 0.3);
  transform: translateY(-1px);
}

/* ============================================================
   FULL-PAGE LOGIN (KaizenAI)
   ============================================================ */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 20px 40px;
  position: relative;
}

.login-ambient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(138, 43, 226, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(0, 255, 255, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(255, 20, 147, 0.1) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.login-page-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1000px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 0 80px rgba(255, 20, 147, 0.08),
    0 0 160px rgba(0, 255, 255, 0.05),
    0 25px 60px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 1;
}

/* === Left Brand Panel === */
.login-brand-panel {
  background:
    linear-gradient(135deg, rgba(138, 43, 226, 0.2) 0%, rgba(10, 15, 30, 0.9) 50%, rgba(0, 255, 255, 0.1) 100%),
    var(--bg-dark);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.login-brand-panel::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 20, 147, 0.05) 0%, transparent 50%);
  animation: float 8s ease-in-out infinite;
}

.login-brand-content {
  position: relative;
  z-index: 1;
}

.login-brand-logo {
  width: 80px;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.4));
  border-radius: 16px;
}

.login-brand-title {
  font-size: 2.5rem !important;
  font-weight: 900 !important;
  background: var(--gradient-main) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  margin-bottom: 0.5rem;
  letter-spacing: 2px;
}

.login-brand-tagline {
  color: var(--text-secondary) !important;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 2.5rem;
}

.login-brand-stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.login-brand-stat {
  display: flex;
  flex-direction: column;
}

.login-stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
}

.login-stat-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.login-runtime-status {
  width: max-content;
  color: #f7b731;
  text-transform: none;
  letter-spacing: 0;
}

.login-runtime-status.online {
  color: #27d66a;
}

.login-runtime-status.offline {
  color: #ff5a62;
}

.login-runtime-status.checking {
  color: #f7b731;
}

.login-brand-features {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.login-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.login-feature-icon {
  color: var(--cyan);
  font-size: 0.6rem;
}

/* === Right Form Panel === */
.login-form-panel {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-form-content {
  max-width: 360px;
  margin: 0 auto;
  width: 100%;
}

.login-back-link {
  display: inline-block;
  color: var(--text-secondary) !important;
  font-size: 0.85rem;
  margin-bottom: 2rem;
  transition: color 0.3s ease;
  -webkit-text-fill-color: initial !important;
}

.login-back-link:hover {
  color: var(--cyan) !important;
}

.login-form-header {
  margin-bottom: 2rem;
}

.login-form-header h2 {
  font-size: 2rem !important;
  margin-bottom: 0.5rem;
  background: var(--gradient-main) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

.login-form-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Error */
.login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 0, 0, 0.08);
  border: 1px solid rgba(255, 0, 0, 0.25);
  color: #ff5555;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.login-error-icon {
  font-size: 1.1rem;
}

/* Form */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.login-field label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 14px;
  font-size: 1rem;
  opacity: 0.4;
  pointer-events: none;
}

.login-input-wrap input {
  width: 100%;
  padding: 14px 16px 14px 42px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: var(--font-main);
}

.login-input-wrap input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.6);
}

.login-input-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.login-toggle-pw {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  transition: color 0.2s;
}

.login-toggle-pw:hover {
  color: var(--cyan);
}

/* Options row */
.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  position: relative;
  padding-left: 26px;
}

.login-remember input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.login-checkbox-custom {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.login-remember input:checked ~ .login-checkbox-custom {
  background: var(--magenta);
  border-color: var(--magenta);
}

.login-remember input:checked ~ .login-checkbox-custom::after {
  content: '\2713';
  color: white;
  font-size: 12px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.login-forgot {
  color: var(--cyan) !important;
  font-size: 0.85rem;
  -webkit-text-fill-color: initial !important;
}

/* Submit Button */
.login-submit {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--magenta), var(--purple));
  border: none;
  border-radius: var(--radius-sm);
  color: var(--white) !important;
  -webkit-text-fill-color: var(--white) !important;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
  font-family: var(--font-main);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(255, 20, 147, 0.3);
}

.login-submit:active {
  transform: translateY(0);
}

.login-submit-text {
  -webkit-text-fill-color: var(--white) !important;
}

.login-submit-arrow {
  font-size: 1.2rem;
  -webkit-text-fill-color: var(--white) !important;
}

.login-submit-loading {
  opacity: 0.8;
}

.login-submit-denied {
  background: linear-gradient(135deg, #FF0000, #CC0000) !important;
}

/* Spinner */
.login-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Shake animation */
@keyframes loginShake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.login-shake {
  animation: loginShake 0.5s ease;
}

/* Separator */
.login-separator {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.login-separator::before,
.login-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.login-separator span {
  padding: 0 1rem;
}

/* Social buttons */
.login-social-row {
  display: flex;
  gap: 1rem;
}

.login-social-btn {
  flex: 1;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-main);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-social-btn svg {
  flex-shrink: 0;
}

.login-social-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

.login-social-btn.social-denied {
  border-color: rgba(255, 0, 0, 0.3) !important;
  color: #ff5555 !important;
}

/* Footer message */
.login-footer-msg {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.login-footer-msg a {
  color: var(--magenta) !important;
  font-weight: 600;
  -webkit-text-fill-color: initial !important;
}

/* Security note */
.login-security-note {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.login-lock-icon {
  font-size: 0.85rem;
}

/* ============================================================
   NUMBER COUNTER ANIMATION JS SUPPORT
   ============================================================ */

/* === Responsive === */
@media (max-width: 768px) {
  #body-wrapper.section {
    padding-top: 34px;
  }
  .page-shell {
    width: min(100% - 24px, var(--container-width));
  }
  .kaizen-hero {
    padding: 42px 0 34px;
  }
  .kaizen-hero-grid,
  .kaizen-grid.two,
  .kaizen-grid.three,
  .kaizen-grid.four {
    grid-template-columns: 1fr;
  }
  .kaizen-section-title {
    display: grid;
    align-items: start;
  }
  .kaizen-actions {
    align-items: stretch;
  }
  .kaizen-button {
    width: 100%;
  }
  .kaizen-app-preview .mini-grid {
    grid-template-columns: 1fr;
  }
  .public-chat-shell {
    min-height: calc(100vh - 150px);
  }
  .public-chat-top {
    display: grid;
  }
  .public-chat-input-row {
    grid-template-columns: 1fr;
  }
  .public-chat-form button {
    width: 100%;
  }
  .public-message {
    max-width: 94%;
  }
  h1 {
    font-size: 2.2rem !important;
  }
  h2 {
    font-size: 1.5rem !important;
  }
  .title-futuristic {
    font-size: 2.5rem !important;
  }
  .hero-stats {
    gap: 2rem;
  }
  .stat-number {
    font-size: 2rem !important;
  }
  .two-col {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .card-grid-3 {
    grid-template-columns: 1fr;
  }
  .phone-mockup {
    width: 250px;
    height: 500px;
  }
  .hero-section {
    padding: 120px 0 60px;
  }
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  .nav-login-btn {
    display: none;
  }
  .login-page-container {
    grid-template-columns: 1fr;
  }
  .login-brand-panel {
    display: none;
  }
  .login-form-panel {
    padding: 2rem;
  }
  #body-wrapper > section > section > p:first-child img {
    max-width: 100%;
  }
  table {
    font-size: 0.85rem;
  }
  table thead th,
  table tbody td {
    padding: 8px 10px !important;
  }
}

/* ============================================================
   DIRECTORY LISTING (dark theme override)
   ============================================================ */
.directorylist {
  background: var(--bg-glass);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.directorylist .metismenu a {
  color: var(--text-primary) !important;
  text-decoration: none;
  padding: 6px 12px;
  display: block;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.directorylist .metismenu a:hover {
  color: var(--cyan) !important;
  background: rgba(0, 255, 255, 0.08);
}

.directorylist .metismenu .directory > a {
  color: var(--cyan) !important;
  font-weight: 600;
  font-size: 1.05rem;
}

.directorylist .metismenu .file a::before {
  content: '\f15b';
  font-family: 'Line Awesome Free', 'FontAwesome';
  font-weight: 900;
  margin-right: 8px;
  color: var(--magenta);
  font-size: 0.9rem;
}

.directorylist .metismenu .directory > a::before {
  content: '\f07b';
  font-family: 'Line Awesome Free', 'FontAwesome';
  font-weight: 900;
  margin-right: 8px;
  color: var(--cyan);
}

.directorylist .metismenu ul {
  list-style: none;
  padding-left: 1.5rem;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  margin-left: 0.75rem;
}

.directorylist .metismenu > ul {
  border-left: none;
  padding-left: 0;
  margin-left: 0;
}

/* ============================================================
   INTRAC.NET PUBLIC ORCHESTRATOR SKIN
   First-pass public refresh based on the Project Kaizen dashboard UI.
   ============================================================ */

:root {
  --bg: #111118;
  --base: #1A1A24;
  --surface: #24232D;
  --elevated: #322F37;
  --border: #4B4955;
  --text: #F5F3FA;
  --text-muted: #A8A5B5;
  --text-dim: #6F6B7C;
  --cyan: #A9CEF2;
  --cyan-bright: #A9CEF2;
  --blue: #8BABD6;
  --violet: #A480DE;
  --magenta: #DB99F1;
  --green: #34C759;
  --yellow: #FF9F0A;
  --red: #FF453A;
  --white: var(--text);
  --bg-dark: var(--bg);
  --bg-card: var(--surface);
  --bg-gradient:
    radial-gradient(circle at 18% -10%, rgba(169,206,242,0.14), transparent 34%),
    radial-gradient(circle at 78% 0%, rgba(219,153,241,0.16), transparent 32%),
    linear-gradient(180deg, rgba(17,17,24,0.96), rgba(17,17,24,1));
  --bg-glass: rgba(36,35,45,0.88);
  --text-primary: var(--text);
  --text-secondary: var(--text-muted);
  --gradient-main: linear-gradient(135deg, var(--cyan), var(--violet), var(--magenta));
  --border-subtle: 1px solid rgba(75,73,85,0.78);
  --container-width: 1440px;
  --header-height: auto;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 8px;
  --shadow: 0 18px 50px rgba(0,0,0,0.32);
}

html,
body {
  background: var(--bg) !important;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg-gradient) !important;
  color: var(--text) !important;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif !important;
  letter-spacing: 0 !important;
}

#particles-js { display: none !important; }
#page-wrapper { min-height: auto; }

#header,
#header.scrolled,
.header-dark #header:not(.scrolled),
.header-dark.header-transparent #header:not(.scrolled) {
  position: sticky !important;
  top: 0;
  z-index: 99999 !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  background: rgba(17,17,24,0.92) !important;
  border-bottom: 1px solid rgba(75,73,85,0.58);
  backdrop-filter: blur(18px);
}

#header .container {
  width: min(1440px, calc(100% - 48px));
  max-width: 1440px;
  padding: 14px 0 !important;
}

#header .navbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  height: auto !important;
  background: transparent !important;
}

#header .navbar-section { height: auto !important; }
#header .navbar-section.desktop-menu {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

#header .navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  margin-right: 0 !important;
}

#header .navbar-brand img {
  width: 58px !important;
  height: 58px !important;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(169,206,242,0.46);
  box-shadow: 0 0 28px rgba(169,206,242,0.14), 0 0 34px rgba(219,153,241,0.12);
  filter: none !important;
}

.nav-brand-text {
  display: inline-flex;
  align-items: center;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
  background: none !important;
  font-size: 26px !important;
  font-weight: 650;
  letter-spacing: 0 !important;
  line-height: 1;
  text-transform: none !important;
}

#header .dropmenu { flex: 1 1 auto; min-width: 0; }
#header .dropmenu ul {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 10px;
  background: rgba(26,26,36,0.82);
  border: 1px solid rgba(75,73,85,0.78);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

#header .dropmenu ul li a,
#header .navbar-section a:not(.navbar-brand),
.header-dark #header:not(.scrolled) a,
.header-dark #header:not(.scrolled) a.active {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 9px 14px;
  border: 1px solid rgba(75,73,85,0.78);
  border-radius: 6px;
  background: rgba(50,47,55,0.78);
  color: var(--text-muted) !important;
  -webkit-text-fill-color: var(--text-muted) !important;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0 !important;
  line-height: 1;
  text-transform: none !important;
  text-shadow: none !important;
}

#header .dropmenu ul li a:hover {
  border-color: var(--cyan);
  background: rgba(169,206,242,0.10);
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}

#header .dropmenu ul li a.active {
  color: #111118 !important;
  -webkit-text-fill-color: #111118 !important;
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--violet), var(--magenta));
}

#header .dropmenu ul li a::after { display: none !important; }
.nav-login-btn { display: none !important; }

#body-wrapper.section { padding: 20px 0 46px !important; }
#body-wrapper .container {
  width: min(1440px, calc(100% - 48px));
  max-width: 1440px;
  padding: 0 !important;
}

#footer,
#footer.section {
  margin-top: 30px;
  background: rgba(17,17,24,0.78) !important;
  border-top: 1px solid rgba(75,73,85,0.58) !important;
}

h1,
.ko-title {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
  background: none !important;
  font-size: clamp(2.2rem, 5vw, 4.3rem) !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  line-height: 1.02 !important;
}

h2,
.ko-section-title {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
  background: none !important;
  font-size: clamp(1.5rem, 2.5vw, 2rem) !important;
  font-weight: 650 !important;
}

h3 { color: var(--text) !important; }
p, li { color: var(--text-muted); }
a:hover { text-shadow: none !important; }

table {
  border-radius: 8px !important;
  background: rgba(36,35,45,0.88) !important;
  border-color: rgba(75,73,85,0.78) !important;
}
table thead { background: rgba(26,26,36,0.98) !important; }
table thead th {
  color: var(--text-muted) !important;
  border-bottom: 1px solid rgba(75,73,85,0.58) !important;
}

.ko-page {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 18px 0 48px;
}
.ko-page.narrow { width: min(1040px, calc(100% - 48px)); }

.ko-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.78fr);
  gap: 18px;
  align-items: stretch;
  padding: 28px 0 18px;
}

.ko-hero-copy,
.ko-panel,
.ko-card,
.ko-summary-item,
.ko-chat-shell {
  background: rgba(36,35,45,0.88);
  border: 1px solid rgba(75,73,85,0.78);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.ko-hero-copy { padding: clamp(22px, 4vw, 42px); }
.ko-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}
.ko-eyebrow::before,
.ko-dot {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
}
.ko-lede {
  max-width: 800px;
  margin: 12px 0 0;
  color: var(--text-muted) !important;
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  line-height: 1.58;
}
.ko-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}
.ko-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(50,47,55,0.78);
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.ko-button:hover {
  border-color: var(--cyan);
  background: rgba(169,206,242,0.10);
}
.ko-button.primary {
  color: #111118 !important;
  -webkit-text-fill-color: #111118 !important;
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--violet), var(--magenta));
}

.ko-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}
.ko-summary-item { padding: 14px 16px; box-shadow: none; }
.ko-summary-item .count {
  color: var(--text);
  font-size: 24px;
  font-weight: 650;
  line-height: 1.1;
}
.ko-summary-item .count.green { color: var(--green); }
.ko-summary-item .count.yellow { color: var(--yellow); }
.ko-summary-item .count.cyan { color: var(--cyan); }
.ko-summary-item .label {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
}

.ko-summary-item .label,
.ko-summary-item .label * {
  display: inline-flex !important;
  align-items: center;
  width: fit-content;
  min-height: 20px;
  padding: 3px 7px;
  border: 1px solid rgba(75,73,85,0.76);
  border-radius: 999px;
  background: rgba(26,26,36,0.62) !important;
  color: var(--text-muted) !important;
  -webkit-text-fill-color: var(--text-muted) !important;
  font-size: 10px !important;
  font-weight: 650;
  line-height: 1;
}

.ko-section { padding: 18px 0; }
.ko-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}
.ko-section-head p {
  max-width: 620px;
  margin: 0;
  font-size: 13px;
}
.ko-grid { display: grid; gap: 12px; }
.ko-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ko-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ko-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.ko-card,
.ko-panel { padding: 16px; }
.ko-card h3,
.ko-panel h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 15px !important;
  font-weight: 650;
}
.ko-card p:last-child,
.ko-panel p:last-child { margin-bottom: 0; }

.ko-kv { display: grid; gap: 0; }
.ko-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(75,73,85,0.42);
  font-size: 13px;
}
.ko-row:last-child { border-bottom: 0; }
.ko-label { color: var(--text-muted); }
.ko-value { color: var(--text); font-weight: 650; text-align: right; }
.ko-value.green { color: var(--green); }
.ko-value.yellow { color: var(--yellow); }
.ko-value.red { color: var(--red); }

.ko-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.ko-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid rgba(75,73,85,0.72);
  border-radius: 999px;
  color: var(--text-muted);
  background: rgba(26,26,36,0.62);
  font-size: 11px;
  white-space: nowrap;
}
.ko-pill.green {
  color: var(--green);
  border-color: rgba(52,199,89,0.46);
  background: rgba(52,199,89,0.08);
}
.ko-pill.yellow {
  color: var(--yellow);
  border-color: rgba(255,159,10,0.46);
  background: rgba(255,159,10,0.08);
}

.ko-note {
  margin-top: 10px;
  padding: 10px;
  border-left: 2px solid rgba(169,206,242,0.48);
  background: rgba(169,206,242,0.06);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.ko-shot { overflow: hidden; padding: 0; }
.ko-shot img {
  display: block;
  width: 100%;
  margin: 0 !important;
  border-radius: 0 !important;
}
.ko-shot-caption {
  padding: 12px 14px 14px;
  color: var(--text-muted);
  font-size: 12px;
}

.ko-public-preview {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 420px;
}
.ko-public-preview .preview-top,
.ko-public-preview .preview-bottom {
  padding: 14px;
  border-bottom: 1px solid rgba(75,73,85,0.42);
}
.ko-public-preview .preview-bottom {
  border-top: 1px solid rgba(75,73,85,0.42);
  border-bottom: 0;
}
.ko-public-preview .preview-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
  background: rgba(17,17,24,0.42);
}
.ko-bubble {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
}
.ko-bubble.user {
  align-self: flex-end;
  color: var(--text);
  background: rgba(164,128,222,0.25);
  border: 1px solid rgba(164,128,222,0.4);
}
.ko-bubble.assistant {
  align-self: flex-start;
  color: var(--text-muted);
  background: rgba(50,47,55,0.72);
  border: 1px solid rgba(75,73,85,0.58);
}

.ko-chat-shell {
  display: grid;
  grid-template-rows: auto minmax(380px, 1fr) auto;
  min-height: min(780px, calc(100vh - 176px));
  overflow: hidden;
}
.ko-chat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(75,73,85,0.58);
  background: rgba(26,26,36,0.82);
}
.ko-chat-title { font-size: 15px; font-weight: 650; color: var(--text); }
.ko-chat-subtitle { margin-top: 3px; font-size: 12px; color: var(--text-muted); }
.ko-chat-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}
.ko-chat-status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--yellow);
}
.ko-chat-status.online::before { background: var(--green); }
.ko-chat-status.offline::before { background: var(--red); }
.ko-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  padding: 16px;
  background: rgba(17,17,24,0.42);
}
.ko-message {
  max-width: min(820px, 88%);
  padding: 11px 13px;
  border-radius: 8px;
  line-height: 1.52;
  white-space: pre-wrap;
  color: var(--text-muted);
  border: 1px solid rgba(75,73,85,0.58);
  background: rgba(50,47,55,0.72);
}
.ko-message.user {
  align-self: flex-end;
  color: var(--text);
  background: rgba(164,128,222,0.25);
  border-color: rgba(164,128,222,0.4);
}
.ko-message.system {
  align-self: center;
  max-width: 740px;
  text-align: center;
  background: rgba(169,206,242,0.07);
  border-color: rgba(169,206,242,0.25);
}
.ko-chat-form {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid rgba(75,73,85,0.58);
  background: rgba(26,26,36,0.82);
}
.ko-chat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.ko-chat-form textarea {
  width: 100%;
  min-height: 92px;
  max-height: 220px;
  resize: vertical;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--elevated);
  color: var(--text);
  font: inherit;
}
.ko-chat-form textarea:focus {
  outline: none;
  border-color: var(--cyan);
}
.ko-chat-form button {
  min-width: 120px;
  min-height: 42px;
  border-radius: 6px;
  border: 0;
  background: linear-gradient(135deg, var(--cyan), var(--violet), var(--magenta));
  color: #111118;
  font-weight: 700;
  cursor: pointer;
}
.ko-chat-form button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.ko-chat-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
}

@media (max-width: 1080px) {
  #header .navbar { grid-template-columns: 1fr; }
  #header .navbar-section.desktop-menu,
  #header .dropmenu ul { justify-content: flex-start; }
  .ko-hero { grid-template-columns: 1fr; }
  .ko-grid.four,
  .ko-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  #header .container,
  #body-wrapper .container,
  .ko-page,
  .ko-page.narrow {
    width: min(100% - 20px, 1440px);
  }
  #header .dropmenu ul {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    box-shadow: none;
  }
  .nav-brand-text { font-size: 22px !important; }
  #header .navbar-brand img {
    width: 46px !important;
    height: 46px !important;
  }
  .ko-hero { padding-top: 16px; }
  .ko-grid.two,
  .ko-grid.three,
  .ko-grid.four,
  .ko-summary { grid-template-columns: 1fr; }
  .ko-section-head {
    display: grid;
    align-items: start;
  }
  .ko-actions,
  .ko-button { width: 100%; }
  .ko-row {
    display: grid;
    gap: 3px;
  }
  .ko-value { text-align: left; }
  .ko-chat-shell {
    min-height: calc(100vh - 150px);
  }
  .ko-chat-top,
  .ko-chat-row {
    display: grid;
  }
  .ko-chat-form button {
    width: 100%;
  }
  .ko-message {
    max-width: 94%;
  }
}

/* === Public site fit pass: header owns real height, dashboard-style hover === */
#header,
#header.scrolled,
.header-dark #header:not(.scrolled),
.header-dark.header-transparent #header:not(.scrolled) {
  display: block !important;
  position: sticky !important;
  top: 0 !important;
  height: auto !important;
  min-height: 84px !important;
  overflow: visible !important;
  transform: none !important;
}

#header .container {
  display: block !important;
  min-height: 84px !important;
  padding: 12px 0 !important;
}

#header .navbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  min-height: 60px !important;
  height: auto !important;
  width: 100% !important;
}

#header .navbar-section.logo,
#header .navbar-section.desktop-menu {
  position: static !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
}

#header .navbar-section.logo {
  flex: 0 0 auto !important;
}

#header .navbar-section.desktop-menu {
  flex: 1 1 auto !important;
  display: flex !important;
  justify-content: flex-end !important;
  min-width: 0 !important;
}

#header .dropmenu {
  width: auto !important;
  max-width: 100% !important;
}

#header .dropmenu ul {
  width: auto !important;
  max-width: 100% !important;
  min-height: 48px !important;
  padding: 7px !important;
  gap: 6px !important;
  background: rgba(26,26,36,0.72) !important;
  box-shadow: none !important;
}

#header .dropmenu ul li a,
#header .navbar-section a:not(.navbar-brand),
.ko-button,
.ko-chat-form button {
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease !important;
}

#header .dropmenu ul li a,
#header .navbar-section a:not(.navbar-brand) {
  min-height: 34px !important;
  padding: 8px 12px !important;
  background: rgba(50,47,55,0.72) !important;
  border-color: rgba(75,73,85,0.78) !important;
  color: var(--text-muted) !important;
  -webkit-text-fill-color: var(--text-muted) !important;
}

#header .dropmenu ul li a:hover,
#header .navbar-section a:not(.navbar-brand):hover,
.ko-button:hover {
  background: linear-gradient(135deg, rgba(169,206,242,0.28), rgba(164,128,222,0.34), rgba(219,153,241,0.30)) !important;
  border-color: rgba(219,153,241,0.70) !important;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
  box-shadow: 0 0 0 1px rgba(219,153,241,0.15), 0 10px 26px rgba(164,128,222,0.14) !important;
  transform: translateY(-1px);
}

#header .dropmenu ul li a.active,
.ko-button.primary {
  background: linear-gradient(135deg, var(--cyan), var(--violet), var(--magenta)) !important;
  border-color: transparent !important;
  color: #111118 !important;
  -webkit-text-fill-color: #111118 !important;
}

.ko-chat-form button:hover {
  box-shadow: 0 0 0 1px rgba(219,153,241,0.18), 0 12px 30px rgba(164,128,222,0.18);
  transform: translateY(-1px);
}

#page-wrapper {
  clear: both !important;
  margin-top: 0 !important;
}

#body-wrapper.section {
  padding-top: 18px !important;
}

.ko-page {
  padding-top: 10px !important;
}

.ko-hero {
  padding-top: 8px !important;
  align-items: stretch !important;
}

.ko-hero-copy {
  min-height: 0 !important;
}

.ko-title {
  max-width: 900px;
  font-size: clamp(2.15rem, 4.1vw, 4rem) !important;
}

.ko-lede {
  font-size: clamp(1rem, 1.35vw, 1.12rem) !important;
}

.ko-public-preview {
  min-height: 360px !important;
}

.ko-chat-shell {
  min-height: min(680px, calc(100vh - 170px)) !important;
}

@media (max-width: 1180px) {
  #header .navbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  #header .navbar-section.desktop-menu,
  #header .dropmenu ul {
    justify-content: flex-start !important;
  }
}

@media (max-width: 840px) {
  #header,
  #header.scrolled,
  .header-dark #header:not(.scrolled),
  .header-dark.header-transparent #header:not(.scrolled) {
    min-height: 78px !important;
  }

  #header .container {
    min-height: 78px !important;
  }

  .mobile-menu {
    display: block !important;
    position: fixed !important;
    top: 20px !important;
    right: 18px !important;
    z-index: 100001 !important;
  }

  .mobile-menu .button_container {
    position: static !important;
    width: 42px !important;
    height: 42px !important;
    border: 1px solid rgba(75,73,85,0.78);
    border-radius: 8px;
    background: rgba(50,47,55,0.72);
  }

  .mobile-menu .button_container span {
    left: 9px !important;
    width: 22px !important;
    height: 2px !important;
    background: var(--text) !important;
  }

  .mobile-menu .button_container span:nth-of-type(1) { top: 13px !important; }
  .mobile-menu .button_container span:nth-of-type(2) { top: 20px !important; }
  .mobile-menu .button_container span:nth-of-type(3) { top: 27px !important; }
}

@media (max-width: 840px) {
  .mobile-menu {
    top: 17px !important;
    right: 12px !important;
    width: 42px !important;
    height: 42px !important;
  }

  .mobile-menu .button_container,
  .mobile-menu .button_container.active {
    position: relative !important;
    top: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: 42px !important;
    height: 42px !important;
  }
}

@media (max-width: 700px) {
  #header .navbar {
    min-height: 54px !important;
  }

  .ko-title {
    font-size: clamp(2.05rem, 12vw, 3.4rem) !important;
    line-height: 1.03 !important;
  }

  .ko-hero-copy,
  .ko-panel,
  .ko-card {
    padding: 14px !important;
  }

  .ko-chat-shell {
    min-height: calc(100vh - 120px) !important;
  }
}

/* === Public site full-fit pass: compact dashboard proportions === */
:root {
  --public-max: 1320px;
  --public-gap: 14px;
  --public-header-pad: 14px;
}

#header,
#header.scrolled,
.header-dark #header:not(.scrolled),
.header-dark.header-transparent #header:not(.scrolled) {
  min-height: 74px !important;
  border-bottom: 1px solid rgba(75,73,85,0.58) !important;
}

#header .container {
  width: min(var(--public-max), calc(100% - 40px)) !important;
  max-width: var(--public-max) !important;
  min-height: 74px !important;
  padding: 10px 0 !important;
}

#header .navbar {
  min-height: 54px !important;
  height: auto !important;
}

#header .navbar-brand {
  gap: 11px !important;
  min-height: 54px !important;
}

#header .navbar-brand img {
  width: 46px !important;
  height: 46px !important;
}

.nav-brand-text {
  font-size: 22px !important;
  line-height: 1.05 !important;
}

#header .dropmenu ul {
  min-height: 42px !important;
  padding: 5px !important;
  gap: 5px !important;
}

#header .dropmenu ul li a,
#header .navbar-section a:not(.navbar-brand) {
  min-height: 31px !important;
  padding: 7px 10px !important;
  font-size: 12px !important;
}

#body-wrapper.section {
  padding: 0 0 44px !important;
}

#body-wrapper .container:has(.ko-page) {
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
}

.ko-page,
.ko-page.narrow {
  width: min(var(--public-max), calc(100% - 40px)) !important;
  max-width: var(--public-max) !important;
  margin: 0 auto !important;
  padding: 18px 0 44px !important;
}

.ko-hero {
  grid-template-columns: minmax(0, 1.15fr) minmax(310px, 0.85fr) !important;
  gap: var(--public-gap) !important;
  padding: 6px 0 14px !important;
}

.ko-hero-copy,
.ko-panel,
.ko-card,
.ko-summary-item,
.ko-chat-shell {
  border-radius: 8px !important;
  box-shadow: none !important;
}

.ko-hero-copy {
  padding: clamp(20px, 3vw, 32px) !important;
}

.ko-title {
  max-width: 760px !important;
  font-size: clamp(2rem, 3.15vw, 3.15rem) !important;
  line-height: 1.05 !important;
}

.ko-lede {
  max-width: 720px !important;
  font-size: clamp(0.98rem, 1.15vw, 1.08rem) !important;
  line-height: 1.55 !important;
}

.ko-section {
  padding: 12px 0 !important;
}

.ko-section-head {
  margin-bottom: 10px !important;
}

.ko-section-title {
  font-size: clamp(1.35rem, 1.8vw, 1.75rem) !important;
}

.ko-grid,
.ko-summary {
  gap: var(--public-gap) !important;
}

.ko-card,
.ko-panel {
  padding: 14px !important;
}

.ko-summary-item {
  padding: 12px 14px !important;
  display: grid;
  align-content: start;
  gap: 7px;
}

.ko-summary-item .count {
  font-size: 21px !important;
  margin: 0 !important;
}

.ko-public-preview {
  min-height: 320px !important;
}

/* Chat page: app first, supporting details in dialogs. */
.ko-chat-page {
  width: min(1120px, calc(100% - 40px)) !important;
  max-width: 1120px !important;
  padding-top: 14px !important;
}

.ko-chat-stage {
  display: grid;
  grid-template-rows: auto minmax(560px, 1fr);
  gap: 12px;
  min-height: calc(100vh - 118px);
}

.ko-chat-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  background: rgba(36,35,45,0.88);
  border: 1px solid rgba(75,73,85,0.78);
  border-radius: 8px;
}

.ko-chat-intro .ko-eyebrow {
  margin-bottom: 6px;
}

.ko-chat-heading {
  margin: 0;
  color: var(--text) !important;
  font-size: clamp(1.55rem, 2.4vw, 2.2rem) !important;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: 0 !important;
}

.ko-chat-intro p {
  max-width: 720px;
  margin: 7px 0 0;
  color: var(--text-muted) !important;
  font-size: 13px;
  line-height: 1.45;
}

.ko-chat-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.ko-chat-page .ko-chat-shell {
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  min-height: 520px !important;
  height: calc(100dvh - 280px);
  max-height: 700px;
}

/* === Banner final pass: integrated nav, no clashing button boxes === */
#header .navbar {
  background:
    linear-gradient(135deg, rgba(169,206,242,0.04), rgba(164,128,222,0.06), rgba(219,153,241,0.04)),
    rgba(31,30,40,0.88) !important;
  border-color: rgba(90,87,104,0.72) !important;
  box-shadow: none !important;
}

#header .dropmenu ul {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 4px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#header .dropmenu ul li {
  margin: 0 !important;
  padding: 0 !important;
}

#header .dropmenu ul li a,
#header .navbar-section.desktop-menu a:not(.navbar-brand),
.header-dark #header:not(.scrolled) .dropmenu ul li a,
.header-dark #header:not(.scrolled) .dropmenu ul li a.active {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 36px !important;
  padding: 8px 10px !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #d9d6e6 !important;
  -webkit-text-fill-color: #d9d6e6 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
  text-shadow: none !important;
  transform: none !important;
}

#header .dropmenu ul li a:hover,
#header .navbar-section.desktop-menu a:not(.navbar-brand):hover {
  border-color: rgba(219,153,241,0.42) !important;
  background: rgba(164,128,222,0.18) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: none !important;
  transform: none !important;
}

#header .dropmenu ul li a.active,
.header-dark #header:not(.scrolled) .dropmenu ul li a.active {
  border-color: rgba(219,153,241,0.52) !important;
  background: linear-gradient(135deg, rgba(169,206,242,0.88), rgba(164,128,222,0.92), rgba(219,153,241,0.88)) !important;
  color: #111118 !important;
  -webkit-text-fill-color: #111118 !important;
  box-shadow: none !important;
}

#header .dropmenu ul li a::before,
#header .dropmenu ul li a::after {
  display: none !important;
  content: none !important;
}

@media (max-width: 1220px) {
  #header .dropmenu ul li a,
  #header .navbar-section.desktop-menu a:not(.navbar-brand) {
    min-height: 34px !important;
    padding: 8px 8px !important;
    font-size: 12px !important;
  }
}

/* === Banner final fit: separated brand + even navigation rail === */
#header .navbar {
  display: grid !important;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 9px !important;
}

#header .navbar-section.logo {
  min-width: 0 !important;
  height: 100% !important;
}

#header .navbar-brand,
#header .navbar-brand:hover,
#header .navbar-section a.navbar-brand,
#header .navbar-section a.navbar-brand:hover {
  width: 100% !important;
  min-height: 56px !important;
  padding: 0 14px !important;
  border: 1px solid rgba(75,73,85,0.60) !important;
  border-radius: 8px !important;
  background: rgba(17,17,24,0.34) !important;
}

#header .navbar-section.desktop-menu {
  height: 100% !important;
  min-width: 0 !important;
}

#header .dropmenu {
  width: 100% !important;
  height: 100% !important;
}

#header .dropmenu ul {
  display: grid !important;
  grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
  align-items: center !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 56px !important;
  gap: 4px !important;
  padding: 5px !important;
  border: 1px solid rgba(75,73,85,0.60) !important;
  border-radius: 8px !important;
  background: rgba(17,17,24,0.28) !important;
}

#header .dropmenu ul li,
#header .dropmenu ul li a {
  width: 100% !important;
}

#header .dropmenu ul li a,
#header .navbar-section.desktop-menu a:not(.navbar-brand),
.header-dark #header:not(.scrolled) .dropmenu ul li a,
.header-dark #header:not(.scrolled) .dropmenu ul li a.active {
  min-height: 44px !important;
  padding: 0 8px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  text-align: center !important;
  white-space: nowrap !important;
}

#header .dropmenu ul li a:hover,
#header .navbar-section.desktop-menu a:not(.navbar-brand):hover {
  background: rgba(164,128,222,0.16) !important;
  border-color: rgba(219,153,241,0.36) !important;
}

#header .dropmenu ul li a.active,
.header-dark #header:not(.scrolled) .dropmenu ul li a.active {
  background: linear-gradient(135deg, rgba(169,206,242,0.92), rgba(164,128,222,0.94), rgba(219,153,241,0.92)) !important;
}

@media (max-width: 1220px) {
  #header .navbar {
    grid-template-columns: minmax(220px, 250px) minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  #header .navbar-brand,
  #header .navbar-brand:hover,
  #header .navbar-section a.navbar-brand,
  #header .navbar-section a.navbar-brand:hover {
    padding: 0 10px !important;
  }

  #header .dropmenu ul li a,
  #header .navbar-section.desktop-menu a:not(.navbar-brand) {
    min-height: 40px !important;
    padding: 0 5px !important;
    font-size: 11px !important;
  }
}

@media (max-width: 840px) {
  #header .navbar {
    display: flex !important;
    grid-template-columns: none !important;
    padding: 8px 10px !important;
  }

  #header .navbar-brand,
  #header .navbar-brand:hover,
  #header .navbar-section a.navbar-brand,
  #header .navbar-section a.navbar-brand:hover {
    width: auto !important;
    min-height: 42px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }
}

/* === Footer final fit: quiet full-width band === */
#footer,
#footer.section {
  margin-top: 28px !important;
  padding: 28px 0 !important;
  border-top: 1px solid rgba(75,73,85,0.56) !important;
  background: rgba(12,12,18,0.78) !important;
  box-shadow: none !important;
}

#footer .container {
  width: min(var(--public-max), calc(100% - 40px)) !important;
  max-width: var(--public-max) !important;
  margin: 0 auto !important;
  padding: 0 !important;
  background: transparent !important;
}

#footer .footer-grid {
  display: grid !important;
  grid-template-columns: minmax(260px, 1.3fr) repeat(3, minmax(160px, 0.7fr)) !important;
  gap: 18px !important;
  padding: 0 !important;
  background: transparent !important;
}

#footer .footer-col {
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

#footer .footer-col p,
#footer .footer-col li,
#footer .footer-col a,
#footer .footer-copyright {
  color: var(--text-muted) !important;
  -webkit-text-fill-color: var(--text-muted) !important;
  background: transparent !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
}

#footer .footer-col h4 {
  margin: 0 0 8px !important;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

#footer ul {
  display: grid;
  gap: 5px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

#footer a:hover {
  color: var(--magenta) !important;
  -webkit-text-fill-color: var(--magenta) !important;
}

#footer .footer-copyright {
  margin-top: 18px !important;
  padding-top: 14px !important;
  border-top: 1px solid rgba(75,73,85,0.38) !important;
  text-align: left !important;
  opacity: 0.82;
}

@media (max-width: 840px) {
  #footer .container {
    width: calc(100% - 20px) !important;
  }

  #footer .footer-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 540px) {
  #footer .footer-grid {
    grid-template-columns: 1fr !important;
  }
}

.ko-chat-page .ko-chat-messages {
  min-height: 0;
}

.ko-chat-page .ko-chat-form textarea {
  min-height: 68px !important;
  max-height: 150px !important;
}

.ko-chat-page .ko-message.system {
  max-width: 680px;
}

.ko-dialog {
  width: min(560px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
}

.ko-dialog::backdrop {
  background: rgba(6,6,12,0.66);
  backdrop-filter: blur(8px);
}

.ko-dialog-card {
  padding: 16px;
  border: 1px solid rgba(75,73,85,0.86);
  border-radius: 8px;
  background: rgba(36,35,45,0.98);
  box-shadow: 0 20px 70px rgba(0,0,0,0.42);
}

.ko-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ko-dialog-head h2 {
  margin: 0;
  font-size: 1.2rem !important;
  line-height: 1.2;
}

.ko-dialog-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(75,73,85,0.78);
  border-radius: 6px;
  background: rgba(50,47,55,0.78);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.ko-dialog-close:hover {
  background: linear-gradient(135deg, rgba(169,206,242,0.28), rgba(164,128,222,0.34), rgba(219,153,241,0.30));
  border-color: rgba(219,153,241,0.70);
}

.ko-dialog-prompts {
  display: grid;
  gap: 10px;
}

.ko-dialog-prompts .ko-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.ko-example-lead {
  margin: 0 0 12px;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 800;
}

.ko-example-list {
  display: grid;
  gap: 8px;
}

.ko-example-list .ko-chat-example {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(18, 18, 29, 0.58);
  color: var(--text-primary);
  text-align: left;
  font: inherit;
  line-height: 1.3;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.ko-example-list .ko-chat-example:hover {
  border-color: rgba(219,153,241,0.70);
  background: linear-gradient(135deg, rgba(169,206,242,0.18), rgba(164,128,222,0.24), rgba(219,153,241,0.20));
}

@media (max-width: 980px) {
  #header .container,
  .ko-page,
  .ko-page.narrow {
    width: min(100% - 28px, var(--public-max)) !important;
  }

  .ko-hero,
  .ko-grid.three,
  .ko-grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .ko-hero {
    grid-template-columns: 1fr !important;
  }

  .ko-chat-page {
    width: min(100% - 28px, 1120px) !important;
  }
}

@media (max-width: 700px) {
  :root {
    --public-gap: 10px;
  }

  #header,
  #header.scrolled,
  .header-dark #header:not(.scrolled),
  .header-dark.header-transparent #header:not(.scrolled) {
    min-height: 70px !important;
  }

  #header .container {
    width: calc(100% - 20px) !important;
    min-height: 70px !important;
    padding: 8px 0 !important;
  }

  #header .navbar {
    min-height: 54px !important;
  }

  #header .navbar-brand img {
    width: 42px !important;
    height: 42px !important;
  }

  .nav-brand-text {
    font-size: 20px !important;
  }

  .ko-page,
  .ko-page.narrow,
  .ko-chat-page {
    width: calc(100% - 20px) !important;
    padding-top: 10px !important;
  }

  .ko-title {
    font-size: clamp(1.9rem, 10vw, 2.65rem) !important;
  }

  .ko-hero,
  .ko-grid.two,
  .ko-grid.three,
  .ko-grid.four,
  .ko-summary {
    grid-template-columns: 1fr !important;
  }

  .ko-chat-stage {
    grid-template-rows: auto minmax(520px, 1fr);
    min-height: calc(100vh - 96px);
    gap: 10px;
  }

  .ko-chat-intro {
    display: grid;
    padding: 12px;
  }

  .ko-chat-intro p {
    display: none;
  }

  .ko-chat-heading {
    font-size: clamp(1.35rem, 7vw, 1.9rem) !important;
  }

  .ko-chat-tools {
    justify-content: stretch;
  }

  .ko-chat-tools .ko-button {
    flex: 1 1 0;
    width: auto !important;
    min-width: 0;
    padding-left: 8px;
    padding-right: 8px;
  }

  .ko-chat-page .ko-chat-shell {
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    height: calc(100dvh - 238px);
    min-height: 440px !important;
    max-height: none;
  }

  .ko-chat-page .ko-chat-top {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ko-chat-page .ko-chat-row {
    grid-template-columns: 1fr !important;
  }

  .ko-chat-page .ko-chat-form button {
    min-height: 40px;
  }

  .ko-chat-page .ko-chat-form {
    padding: 10px !important;
    gap: 7px !important;
  }

  .ko-chat-page .ko-chat-form textarea {
    min-height: 54px !important;
    max-height: 96px !important;
  }

  .ko-chat-page .ko-chat-meta {
    display: grid;
    gap: 2px;
    font-size: 11px;
  }

  .ko-chat-page .ko-chat-meta span:last-child {
    display: none;
  }

  .ko-dialog {
    width: calc(100% - 20px);
  }
}

/* === Header audit pass: one fitted top banner === */
#header,
#header.scrolled,
.header-dark #header:not(.scrolled),
.header-dark.header-transparent #header:not(.scrolled) {
  min-height: 68px !important;
  background: rgba(17,17,24,0.94) !important;
}

#header .container {
  min-height: 68px !important;
  padding: 8px 0 !important;
}

#header .navbar {
  min-height: 52px !important;
  padding: 6px !important;
  border: 1px solid rgba(75,73,85,0.78) !important;
  border-radius: 8px !important;
  background: rgba(26,26,36,0.80) !important;
}

#header .navbar-brand,
#header .navbar-brand:hover,
#header .navbar-section a.navbar-brand,
#header .navbar-section a.navbar-brand:hover {
  min-height: 40px !important;
  padding: 0 10px 0 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

#header .navbar-brand img {
  width: 38px !important;
  height: 38px !important;
}

.nav-brand-text {
  font-size: 20px !important;
  white-space: nowrap;
}

#header .dropmenu ul {
  min-height: 38px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

#header .dropmenu ul li a,
#header .navbar-section a:not(.navbar-brand) {
  min-height: 32px !important;
  padding: 7px 10px !important;
  border-radius: 6px !important;
}

.ko-timeline {
  display: grid;
  gap: 10px;
}

.ko-timeline-item {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(75,73,85,0.78);
  border-radius: 8px;
  background: rgba(36,35,45,0.88);
}

.ko-timeline-item.active {
  border-color: rgba(219,153,241,0.58);
  background: linear-gradient(135deg, rgba(169,206,242,0.08), rgba(164,128,222,0.10), rgba(219,153,241,0.08));
}

.ko-timeline-year {
  align-self: start;
  display: inline-flex;
  justify-content: center;
  min-height: 28px;
  padding: 6px 9px;
  border: 1px solid rgba(75,73,85,0.78);
  border-radius: 999px;
  background: rgba(26,26,36,0.70);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.ko-timeline-item.active .ko-timeline-year {
  color: #111118;
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--violet), var(--magenta));
}

.ko-timeline-item h3 {
  margin: 0 0 4px;
  font-size: 15px !important;
}

.ko-timeline-item p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 1180px) {
  #header .navbar {
    display: flex !important;
  }

  #header .navbar-section.desktop-menu {
    justify-content: flex-end !important;
  }

  #header .dropmenu ul {
    justify-content: flex-end !important;
  }
}

@media (max-width: 840px) {
  #header,
  #header.scrolled,
  .header-dark #header:not(.scrolled),
  .header-dark.header-transparent #header:not(.scrolled) {
    min-height: 64px !important;
  }

  #header .container {
    min-height: 64px !important;
  }

  #header .navbar {
    min-height: 48px !important;
  }

  #header .navbar-brand img {
    width: 34px !important;
    height: 34px !important;
  }

  .nav-brand-text {
    font-size: 18px !important;
  }

  .mobile-menu {
    top: 14px !important;
    right: 12px !important;
  }

  .mobile-menu .button_container {
    width: 38px !important;
    height: 38px !important;
  }
}

@media (max-width: 700px) {
  .ko-timeline-item {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .ko-timeline-year {
    justify-self: start;
  }
}

/* === Header research pass: visible desktop nav, richer app-bar sizing === */
#header,
#header.scrolled,
.header-dark #header:not(.scrolled),
.header-dark.header-transparent #header:not(.scrolled) {
  min-height: 92px !important;
}

#header .container {
  min-height: 92px !important;
  padding: 10px 0 !important;
}

#header .navbar {
  min-height: 72px !important;
  padding: 10px 12px !important;
  gap: 20px !important;
  background:
    linear-gradient(135deg, rgba(169,206,242,0.05), rgba(164,128,222,0.08), rgba(219,153,241,0.05)),
    rgba(26,26,36,0.88) !important;
}

#header .navbar-section.logo {
  min-width: 300px !important;
}

#header .navbar-brand,
#header .navbar-brand:hover,
#header .navbar-section a.navbar-brand,
#header .navbar-section a.navbar-brand:hover {
  min-height: 52px !important;
  gap: 13px !important;
  padding-right: 16px !important;
}

#header .navbar-brand img {
  width: 50px !important;
  height: 50px !important;
}

.nav-brand-text {
  display: grid !important;
  gap: 4px;
  font-size: 24px !important;
  line-height: 1 !important;
}

.nav-brand-text::after {
  content: "Cybersecurity · Infrastructure · Intelligence";
  display: block;
  color: var(--text-muted);
  -webkit-text-fill-color: var(--text-muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

#header .navbar-section.desktop-menu {
  align-items: center !important;
}

#header .dropmenu {
  width: 100% !important;
}

#header .dropmenu ul {
  justify-content: flex-end !important;
  gap: 7px !important;
}

#header .dropmenu ul li a,
#header .navbar-section a:not(.navbar-brand) {
  min-height: 38px !important;
  padding: 9px 12px !important;
  font-size: 13px !important;
}

@media (max-width: 1220px) {
  #header .navbar {
    gap: 12px !important;
  }

  #header .navbar-section.logo {
    min-width: 258px !important;
  }

  .nav-brand-text::after {
    display: none;
  }

  #header .dropmenu ul {
    gap: 5px !important;
  }

  #header .dropmenu ul li a,
  #header .navbar-section a:not(.navbar-brand) {
    padding: 8px 9px !important;
    font-size: 12px !important;
  }
}

@media (max-width: 840px) {
  #header,
  #header.scrolled,
  .header-dark #header:not(.scrolled),
  .header-dark.header-transparent #header:not(.scrolled) {
    min-height: 76px !important;
  }

  #header .container {
    min-height: 76px !important;
    padding: 8px 0 !important;
  }

  #header .navbar {
    min-height: 58px !important;
    padding: 8px 10px !important;
  }

  #header .navbar-section.logo {
    min-width: 0 !important;
  }

  #header .navbar-brand,
  #header .navbar-brand:hover,
  #header .navbar-section a.navbar-brand,
  #header .navbar-section a.navbar-brand:hover {
    min-height: 42px !important;
  }

  #header .navbar-brand img {
    width: 40px !important;
    height: 40px !important;
  }

  .nav-brand-text {
    font-size: 20px !important;
  }

  .nav-brand-text::after {
    display: none;
  }

  .mobile-menu {
    top: 18px !important;
  }

  .mobile-menu .button_container {
    width: 42px !important;
    height: 42px !important;
  }

  .mobile-menu .button_container span:nth-of-type(1) { top: 13px !important; }
  .mobile-menu .button_container span:nth-of-type(2) { top: 20px !important; }
  .mobile-menu .button_container span:nth-of-type(3) { top: 27px !important; }
}

/* === Mobile nav safety: keep Login from overlapping the hamburger === */
@media (max-width: 840px) {
  #header .nav-login-btn,
  .nav-login-btn {
    display: none !important;
    pointer-events: none !important;
  }
}

/* === KaizenAI Open response renderer === */
.ko-message.assistant p {
  margin: 0 0 0.85rem;
}

.ko-message.assistant p:last-child {
  margin-bottom: 0;
}

.ko-message.assistant h3 {
  margin: 1.05rem 0 0.35rem !important;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
  font-size: 1.02rem !important;
  line-height: 1.25 !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
}

.ko-message.assistant h3:first-child {
  margin-top: 0 !important;
}

.ko-message.assistant ul,
.ko-message.assistant ol {
  margin: 0.35rem 0 0.9rem 1.1rem !important;
  padding: 0 !important;
}

.ko-message.assistant li {
  margin: 0.28rem 0 !important;
  padding-left: 0.15rem !important;
}

.ko-message.assistant a {
  color: var(--cyan) !important;
  -webkit-text-fill-color: var(--cyan) !important;
  text-decoration: none;
  border-bottom: 1px solid rgba(169,206,242,0.35);
}

.ko-message.assistant a:hover {
  border-bottom-color: rgba(219,153,241,0.65);
}

/* === Mobile nav final override: desktop login link never shares hamburger row === */
@media (max-width: 840px) {
  #header .navbar-section.desktop-menu a.nav-login-btn,
  .header-dark #header .navbar-section.desktop-menu a.nav-login-btn,
  body #header .navbar-section.desktop-menu a.nav-login-btn {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    width: 0 !important;
    min-width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
  }
}

/* === Footer brand: center KAIZEN logo row over centered taglines (2026-06-09) === */
#footer .footer-grid .footer-col:first-child > div:first-child {
  justify-content: center;
}

/* === Mobile overlay menu: center the Project Kaizen brand block (2026-06-09).
   Quark base gives .mobile-logo img a stray margin-left:1.4rem/margin-top:.7rem
   sized for the old corner placement, which knocks the stacked logo off the
   overlay centerline. Center the brand as a flex column instead. === */
.mobile-container .mobile-logo .navbar-brand {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.mobile-container .mobile-logo img {
  margin-left: 0 !important;
  margin-top: 0 !important;
  display: block;
}
.mobile-container .mobile-logo .nav-brand-text {
  text-align: center;
}

/* === ACT-0012: site-wide light/dark mode toggle === */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(75,73,85,0.78);
  border-radius: 8px;
  background: rgba(50,47,55,0.72);
  color: var(--text-muted);
  -webkit-text-fill-color: var(--text-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  outline: none;
  border-color: rgba(219,153,241,0.62);
  background: rgba(164,128,222,0.18);
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}

.theme-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(169,206,242,0.18);
}

#header .navbar-section.desktop-menu {
  gap: 10px !important;
}

#header .theme-toggle-desktop {
  flex: 0 0 auto;
}

.theme-toggle-mobile {
  display: none;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f8fc;
  --base: #ffffff;
  --surface: #ffffff;
  --elevated: #eef2f8;
  --border: #d7deeb;
  --text: #171923;
  --text-muted: #535d70;
  --text-dim: #788195;
  --cyan: #266fba;
  --cyan-bright: #0f7fd3;
  --blue: #426fa8;
  --violet: #7057c7;
  --magenta: #a947cf;
  --green: #167c3b;
  --yellow: #9f6200;
  --red: #b42318;
  --white: var(--text);
  --bg-dark: var(--bg);
  --bg-card: var(--surface);
  --bg-gradient:
    radial-gradient(circle at 16% -12%, rgba(38,111,186,0.12), transparent 34%),
    radial-gradient(circle at 82% -8%, rgba(169,71,207,0.10), transparent 30%),
    linear-gradient(180deg, #fbfcff 0%, #eef3f9 100%);
  --bg-glass: rgba(255,255,255,0.86);
  --bg-glass-heavy: rgba(255,255,255,0.96);
  --text-primary: var(--text);
  --text-secondary: var(--text-muted);
  --gradient-main: linear-gradient(135deg, #2d7fca, #7057c7, #a947cf);
  --gradient-glow: var(--gradient-main);
  --glow-cyan: 0 0 18px rgba(38,111,186,0.16);
  --glow-magenta: 0 0 18px rgba(169,71,207,0.14);
  --glow-text: none;
  --border-subtle: 1px solid rgba(215,222,235,0.92);
  --shadow: 0 16px 38px rgba(36,43,64,0.08);
}

html[data-theme="light"],
html[data-theme="light"] body {
  background: var(--bg-gradient) !important;
  color: var(--text) !important;
}

html[data-theme="light"] body {
  text-rendering: optimizeLegibility;
}

html[data-theme="light"] #header,
html[data-theme="light"] #header.scrolled,
html[data-theme="light"] .header-dark #header:not(.scrolled),
html[data-theme="light"] .header-dark.header-transparent #header:not(.scrolled) {
  background: rgba(246,248,252,0.94) !important;
  border-bottom-color: rgba(190,199,216,0.82) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.78), 0 10px 26px rgba(36,43,64,0.06) !important;
}

html[data-theme="light"] #header .navbar {
  border-color: rgba(199,207,223,0.88) !important;
  background:
    linear-gradient(135deg, rgba(38,111,186,0.045), rgba(112,87,199,0.055), rgba(169,71,207,0.045)),
    rgba(255,255,255,0.88) !important;
}

html[data-theme="light"] #header .navbar-brand img {
  border-color: rgba(38,111,186,0.24);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.95), 0 10px 22px rgba(36,43,64,0.10);
}

html[data-theme="light"] .nav-brand-text,
html[data-theme="light"] .nav-brand-text::after {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}

html[data-theme="light"] .nav-brand-text::after {
  color: var(--text-muted) !important;
  -webkit-text-fill-color: var(--text-muted) !important;
}

html[data-theme="light"] #header .dropmenu ul li a,
html[data-theme="light"] #header .navbar-section.desktop-menu a:not(.navbar-brand),
html[data-theme="light"] .header-dark #header:not(.scrolled) .dropmenu ul li a,
html[data-theme="light"] .header-dark #header:not(.scrolled) .dropmenu ul li a.active,
html[data-theme="light"] .theme-toggle {
  color: var(--text-muted) !important;
  -webkit-text-fill-color: var(--text-muted) !important;
}

html[data-theme="light"] #header .dropmenu ul li a:hover,
html[data-theme="light"] #header .navbar-section.desktop-menu a:not(.navbar-brand):hover,
html[data-theme="light"] .theme-toggle:hover,
html[data-theme="light"] .theme-toggle:focus-visible {
  border-color: rgba(112,87,199,0.34) !important;
  background: rgba(112,87,199,0.08) !important;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}

html[data-theme="light"] #header .dropmenu ul li a.active,
html[data-theme="light"] .header-dark #header:not(.scrolled) .dropmenu ul li a.active,
html[data-theme="light"] .ko-button.primary,
html[data-theme="light"] .ko-chat-form button,
html[data-theme="light"] .login-submit {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: var(--gradient-main) !important;
}

html[data-theme="light"] .ko-hero-copy,
html[data-theme="light"] .ko-panel,
html[data-theme="light"] .ko-card,
html[data-theme="light"] .ko-summary-item,
html[data-theme="light"] .ko-chat-shell,
html[data-theme="light"] .ko-chat-intro,
html[data-theme="light"] .login-page-container,
html[data-theme="light"] .login-form-panel,
html[data-theme="light"] .ko-dialog-card,
html[data-theme="light"] .ko-timeline-item {
  background: rgba(255,255,255,0.88) !important;
  border-color: rgba(215,222,235,0.94) !important;
  box-shadow: var(--shadow) !important;
}

html[data-theme="light"] .ko-hero-copy,
html[data-theme="light"] .ko-panel,
html[data-theme="light"] .ko-card,
html[data-theme="light"] .ko-summary-item,
html[data-theme="light"] .ko-chat-shell,
html[data-theme="light"] .login-page-container {
  backdrop-filter: blur(10px);
}

html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] h5,
html[data-theme="light"] h6,
html[data-theme="light"] .ko-title,
html[data-theme="light"] .ko-section-title,
html[data-theme="light"] .ko-chat-heading,
html[data-theme="light"] .ko-chat-title,
html[data-theme="light"] .login-brand-title,
html[data-theme="light"] .login-form-header h2,
html[data-theme="light"] .ko-summary-item .count {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
  background: none !important;
  text-shadow: none !important;
}

html[data-theme="light"] p,
html[data-theme="light"] li,
html[data-theme="light"] .ko-lede,
html[data-theme="light"] .ko-eyebrow,
html[data-theme="light"] .ko-section-head p,
html[data-theme="light"] .ko-label,
html[data-theme="light"] .ko-note,
html[data-theme="light"] .ko-chat-subtitle,
html[data-theme="light"] .ko-chat-status,
html[data-theme="light"] .ko-chat-meta,
html[data-theme="light"] .login-brand-tagline,
html[data-theme="light"] .login-stat-label,
html[data-theme="light"] .login-feature-item,
html[data-theme="light"] .login-form-header p,
html[data-theme="light"] .login-field label,
html[data-theme="light"] .login-remember,
html[data-theme="light"] .login-footer-msg,
html[data-theme="light"] .login-security-note {
  color: var(--text-muted) !important;
  -webkit-text-fill-color: var(--text-muted) !important;
}

html[data-theme="light"] .ko-value,
html[data-theme="light"] .ko-message.user,
html[data-theme="light"] .ko-bubble.user,
html[data-theme="light"] .login-input-wrap input {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}

html[data-theme="light"] .ko-button:not(.primary),
html[data-theme="light"] .ko-chat-tools .ko-button:not(.primary) {
  background: rgba(255,255,255,0.92) !important;
  border-color: rgba(199,207,223,0.94) !important;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}

html[data-theme="light"] .ko-button:not(.primary):hover,
html[data-theme="light"] .ko-chat-tools .ko-button:not(.primary):hover {
  background: rgba(112,87,199,0.08) !important;
  border-color: rgba(112,87,199,0.34) !important;
}

html[data-theme="light"] .ko-public-preview .preview-top,
html[data-theme="light"] .ko-public-preview .preview-bottom,
html[data-theme="light"] .ko-chat-top,
html[data-theme="light"] .ko-chat-form {
  background: rgba(247,249,253,0.90) !important;
  border-color: rgba(215,222,235,0.88) !important;
}

html[data-theme="light"] .ko-public-preview .preview-body,
html[data-theme="light"] .ko-chat-messages {
  background: rgba(239,243,249,0.74) !important;
}

html[data-theme="light"] .ko-bubble,
html[data-theme="light"] .ko-message,
html[data-theme="light"] .ko-example-list .ko-chat-example,
html[data-theme="light"] .ko-dialog-close {
  background: rgba(255,255,255,0.90) !important;
  border-color: rgba(215,222,235,0.94) !important;
  color: var(--text-muted) !important;
  -webkit-text-fill-color: var(--text-muted) !important;
}

html[data-theme="light"] .ko-bubble.user,
html[data-theme="light"] .ko-message.user {
  background: rgba(112,87,199,0.12) !important;
  border-color: rgba(112,87,199,0.24) !important;
}

html[data-theme="light"] .ko-message.system,
html[data-theme="light"] .ko-note {
  background: rgba(38,111,186,0.07) !important;
  border-color: rgba(38,111,186,0.20) !important;
}

html[data-theme="light"] .ko-summary-item .label,
html[data-theme="light"] .ko-summary-item .label *,
html[data-theme="light"] .ko-pill,
html[data-theme="light"] .ko-timeline-year {
  background: rgba(246,248,252,0.88) !important;
  border-color: rgba(215,222,235,0.94) !important;
  color: var(--text-muted) !important;
  -webkit-text-fill-color: var(--text-muted) !important;
}

html[data-theme="light"] .ko-row,
html[data-theme="light"] .ko-public-preview .preview-top,
html[data-theme="light"] .ko-public-preview .preview-bottom,
html[data-theme="light"] .ko-chat-top,
html[data-theme="light"] .ko-chat-form {
  border-color: rgba(215,222,235,0.86) !important;
}

html[data-theme="light"] table,
html[data-theme="light"] pre,
html[data-theme="light"] .directorylist {
  background: rgba(255,255,255,0.90) !important;
  border-color: rgba(215,222,235,0.94) !important;
}

html[data-theme="light"] table thead {
  background: rgba(239,243,249,0.95) !important;
}

html[data-theme="light"] table thead th,
html[data-theme="light"] table tbody td,
html[data-theme="light"] code,
html[data-theme="light"] pre code {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}

html[data-theme="light"] table tbody tr:hover,
html[data-theme="light"] table tbody tr:nth-child(even) {
  background: rgba(38,111,186,0.045) !important;
}

html[data-theme="light"] code {
  background: rgba(38,111,186,0.08) !important;
  color: #184f86 !important;
  -webkit-text-fill-color: #184f86 !important;
}

html[data-theme="light"] blockquote {
  background: rgba(169,71,207,0.06) !important;
  border-left-color: rgba(169,71,207,0.42) !important;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}

html[data-theme="light"] .ko-chat-form textarea,
html[data-theme="light"] .login-input-wrap,
html[data-theme="light"] .login-input-wrap input,
html[data-theme="light"] .login-social-btn {
  background: rgba(255,255,255,0.94) !important;
  border-color: rgba(199,207,223,0.92) !important;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}

html[data-theme="light"] .ko-chat-form textarea:focus,
html[data-theme="light"] .login-input-wrap:focus-within,
html[data-theme="light"] .login-input-wrap input:focus {
  border-color: rgba(38,111,186,0.58) !important;
  box-shadow: 0 0 0 3px rgba(38,111,186,0.11) !important;
}

html[data-theme="light"] .login-page {
  background:
    radial-gradient(circle at 18% 8%, rgba(38,111,186,0.10), transparent 34%),
    radial-gradient(circle at 86% 18%, rgba(169,71,207,0.08), transparent 32%),
    transparent !important;
}

html[data-theme="light"] .login-brand-panel {
  background:
    linear-gradient(135deg, rgba(38,111,186,0.08), rgba(112,87,199,0.08), rgba(169,71,207,0.08)),
    rgba(247,249,253,0.94) !important;
  border-color: rgba(215,222,235,0.94) !important;
}

html[data-theme="light"] .login-ambient,
html[data-theme="light"] #particles-js {
  opacity: 0.18 !important;
}

html[data-theme="light"] .mobile-menu .button_container {
  border-color: rgba(199,207,223,0.92) !important;
  background: rgba(255,255,255,0.92) !important;
}

html[data-theme="light"] .mobile-menu .button_container span {
  background: var(--text) !important;
}

html[data-theme="light"] .mobile-container .overlay {
  background: rgba(248,250,253,0.98) !important;
}

html[data-theme="light"] .mobile-container .overlay-menu a,
html[data-theme="light"] .mobile-container .overlay-menu a:visited {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}

html[data-theme="light"] #footer,
html[data-theme="light"] #footer.section {
  background: rgba(247,249,253,0.92) !important;
  border-top-color: rgba(215,222,235,0.94) !important;
}

html[data-theme="light"] #footer .footer-col h4 {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}

html[data-theme="light"] #footer .footer-col p,
html[data-theme="light"] #footer .footer-col li,
html[data-theme="light"] #footer .footer-col a,
html[data-theme="light"] #footer .footer-copyright {
  color: var(--text-muted) !important;
  -webkit-text-fill-color: var(--text-muted) !important;
}

html[data-theme="light"] a,
html[data-theme="light"] .ko-message.assistant a {
  color: var(--cyan) !important;
  -webkit-text-fill-color: var(--cyan) !important;
}

@media (max-width: 840px) {
  #header .theme-toggle-desktop {
    display: none !important;
  }

  .theme-toggle-mobile {
    display: inline-flex !important;
    position: fixed !important;
    top: 17px !important;
    right: 62px !important;
    z-index: 100002 !important;
    min-width: 58px;
    min-height: 38px;
    padding: 7px 10px;
  }
}

@media (max-width: 700px) {
  .theme-toggle-mobile {
    top: 14px !important;
    right: 58px !important;
    min-width: 54px;
    min-height: 36px;
    padding: 7px 9px;
    font-size: 11px;
  }
}

/* === Dashboard visual alignment: ai.lan:11440 Services Dashboard === */
:root {
  color-scheme: light;
  --bg: #F7F7F8;
  --base: #FFFFFF;
  --surface: #FFFFFF;
  --elevated: #F9FAFB;
  --raised: #F3F4F6;
  --border: #E5E7EB;
  --border-soft: #E5E7EB;
  --divider: #D1D5DB;
  --text: #111827;
  --text-muted: #6B7280;
  --text-dim: #9CA3AF;
  --cyan: #2563EB;
  --cyan-bright: #2563EB;
  --blue: #2563EB;
  --violet: #4F46E5;
  --magenta: #F38020;
  --pink: #F38020;
  --green: #16A34A;
  --yellow: #D97706;
  --red: #DC2626;
  --orange: #F38020;
  --ok: var(--green);
  --warn: var(--yellow);
  --bad: var(--red);
  --info: var(--cyan);
  --accent: var(--cyan);
  --aurora: var(--cyan);
  --aurora-soft: rgba(37,99,235,0.08);
  --white: var(--text);
  --bg-dark: var(--bg);
  --bg-card: var(--surface);
  --bg-gradient: var(--bg);
  --bg-glass: var(--surface);
  --bg-glass-heavy: var(--surface);
  --text-primary: var(--text);
  --text-secondary: var(--text-muted);
  --gradient-main: linear-gradient(135deg, var(--cyan), var(--orange));
  --gradient-glow: var(--gradient-main);
  --glow-cyan: none;
  --glow-magenta: none;
  --glow-text: none;
  --border-subtle: 1px solid var(--border);
  --container-width: 1440px;
  --radius-sm: 8px;
  --radius-md: 8px;
  --radius-lg: 8px;
  --radius: 8px;
  --r: 8px;
  --r-sm: 8px;
  --r-xs: 6px;
  --shadow: 0 1px 2px rgba(17,24,39,0.06);
  --glow: 0 1px 2px rgba(17,24,39,0.08);
  --font-main: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  --dashboard-font-family: var(--font-main);
  --dashboard-font-size: 15px;
  --fs-3xs: 10px;
  --fs-xxs: 11px;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 22px;
  --fs-hero: 30px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

:root[data-theme="cloudflare"],
:root[data-theme="light"],
html[data-theme="cloudflare"],
html[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"],
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0F1117;
  --base: #151821;
  --surface: #171A23;
  --elevated: #1F2430;
  --raised: #242B38;
  --border: #303746;
  --border-soft: #303746;
  --divider: #475569;
  --text: #F8FAFC;
  --text-muted: #CBD5E1;
  --text-dim: #94A3B8;
  --cyan: #60A5FA;
  --cyan-bright: #60A5FA;
  --blue: #60A5FA;
  --violet: #A78BFA;
  --magenta: #F97316;
  --pink: #F97316;
  --green: #22C55E;
  --yellow: #F59E0B;
  --red: #F87171;
  --orange: #F97316;
  --aurora-soft: rgba(96,165,250,0.12);
  --white: var(--text);
  --bg-dark: var(--bg);
  --bg-card: var(--surface);
  --bg-gradient: var(--bg);
  --bg-glass: var(--surface);
  --bg-glass-heavy: var(--surface);
  --text-primary: var(--text);
  --text-secondary: var(--text-muted);
  --shadow: 0 18px 45px rgba(0,0,0,0.35);
  --glow: 0 8px 24px rgba(0,0,0,0.28);
}

:root[data-theme="high-contrast"],
html[data-theme="high-contrast"] {
  color-scheme: light;
  --bg: #FFFFFF;
  --base: #FFFFFF;
  --surface: #FFFFFF;
  --elevated: #F3F4F6;
  --raised: #E5E7EB;
  --border: #111827;
  --border-soft: #374151;
  --divider: #111827;
  --text: #000000;
  --text-muted: #111827;
  --text-dim: #374151;
  --cyan: #1D4ED8;
  --cyan-bright: #1D4ED8;
  --blue: #1D4ED8;
  --violet: #4338CA;
  --magenta: #C2410C;
  --pink: #C2410C;
  --green: #15803D;
  --yellow: #A16207;
  --red: #B91C1C;
  --orange: #C2410C;
  --aurora-soft: rgba(29,78,216,0.10);
  --white: var(--text);
  --bg-dark: var(--bg);
  --bg-card: var(--surface);
  --bg-gradient: var(--bg);
  --bg-glass: var(--surface);
  --bg-glass-heavy: var(--surface);
  --text-primary: var(--text);
  --text-secondary: var(--text-muted);
  --shadow: none;
  --glow: none;
}

html,
body {
  background: var(--bg) !important;
  color: var(--text) !important;
  font-family: var(--dashboard-font-family) !important;
  font-size: var(--dashboard-font-size);
  letter-spacing: 0 !important;
}

body {
  background-image: none !important;
  text-rendering: optimizeLegibility;
}

#particles-js,
.login-ambient {
  display: none !important;
}

#page-wrapper {
  background: var(--bg);
}

#header,
#header.scrolled,
.header-dark #header:not(.scrolled),
.header-dark.header-transparent #header:not(.scrolled),
html[data-theme="light"] #header,
html[data-theme="light"] #header.scrolled,
html[data-theme="light"] .header-dark #header:not(.scrolled),
html[data-theme="light"] .header-dark.header-transparent #header:not(.scrolled) {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

#header .container,
#body-wrapper .container,
#footer .container {
  width: min(var(--container-width), calc(100% - 36px)) !important;
  max-width: var(--container-width) !important;
}

#header .container {
  padding: 0 !important;
}

#header .navbar,
html[data-theme="light"] #header .navbar {
  min-height: 60px;
  padding: 0 !important;
  display: flex;
  align-items: center;
  gap: 18px;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#header .navbar-section.logo {
  flex: 0 0 auto;
}

#header .navbar-section.desktop-menu {
  align-items: center;
  gap: 10px !important;
}

#header .navbar-brand {
  gap: 12px;
}

#header .navbar-brand img,
html[data-theme="light"] #header .navbar-brand img {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50%;
  object-fit: contain;
  background: #FFFFFF;
  border: 1px solid var(--border);
  box-shadow: none !important;
  filter: none !important;
}

.nav-brand-text,
html[data-theme="light"] .nav-brand-text {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
  background: none !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  line-height: 1.08 !important;
  text-transform: none !important;
}

.nav-brand-text::after {
  content: 'Cybersecurity. Infrastructure. Intelligence.';
  display: block;
  margin-top: 2px;
  color: var(--text-dim);
  -webkit-text-fill-color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
}

#header .dropmenu {
  flex: 1 1 auto;
  min-width: 0;
}

#header .dropmenu ul,
html[data-theme="light"] #header .dropmenu ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  padding: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#header .dropmenu ul li a,
#header .navbar-section a:not(.navbar-brand),
.header-dark #header:not(.scrolled) a,
.header-dark #header:not(.scrolled) a.active,
html[data-theme="light"] #header .dropmenu ul li a,
html[data-theme="light"] #header .navbar-section.desktop-menu a:not(.navbar-brand) {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid transparent !important;
  border-radius: var(--radius);
  background: transparent !important;
  color: var(--text-muted) !important;
  -webkit-text-fill-color: var(--text-muted) !important;
  font-family: var(--dashboard-font-family) !important;
  font-size: var(--fs-sm) !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
}

#header .dropmenu ul li a:hover,
#header .navbar-section.desktop-menu a:not(.navbar-brand):hover,
html[data-theme="light"] #header .dropmenu ul li a:hover,
html[data-theme="light"] #header .navbar-section.desktop-menu a:not(.navbar-brand):hover {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}

#header .dropmenu ul li a.active,
html[data-theme="light"] #header .dropmenu ul li a.active,
html[data-theme="light"] .header-dark #header:not(.scrolled) .dropmenu ul li a.active {
  background: var(--aurora-soft) !important;
  border-color: var(--border) !important;
  color: var(--cyan) !important;
  -webkit-text-fill-color: var(--cyan) !important;
  box-shadow: inset 2px 0 0 var(--cyan) !important;
}

.theme-toggle,
html[data-theme="light"] .theme-toggle {
  min-width: 34px;
  min-height: 34px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius);
  background: var(--base) !important;
  color: var(--text-muted) !important;
  -webkit-text-fill-color: var(--text-muted) !important;
  font-family: var(--dashboard-font-family);
  font-size: var(--fs-sm);
  font-weight: 600;
  box-shadow: none !important;
}

.theme-toggle:hover,
.theme-toggle:focus-visible,
html[data-theme="light"] .theme-toggle:hover,
html[data-theme="light"] .theme-toggle:focus-visible {
  border-color: var(--cyan) !important;
  background: var(--raised) !important;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}

.nav-login-btn {
  display: none !important;
}

#body-wrapper.section {
  padding: 22px 0 50px !important;
}

.ko-page,
.kaizen-page {
  color: var(--text);
}

.ko-hero,
.kaizen-hero {
  padding: 18px 0 24px !important;
}

.ko-hero-copy,
.ko-panel,
.ko-card,
.ko-summary-item,
.ko-chat-shell,
.ko-chat-intro,
.ko-dialog-card,
.ko-timeline-item,
.kaizen-panel,
.kaizen-card,
.highlight-card,
.stat-card,
.feature-card,
.article-card,
.login-page-container,
.login-form-panel,
.login-brand-panel,
table,
pre,
.directorylist {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
  color: var(--text) !important;
  backdrop-filter: none !important;
}

.ko-card,
.ko-panel,
.kaizen-panel,
.kaizen-card,
.highlight-card,
.stat-card,
.feature-card,
.article-card {
  padding: 14px !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.ko-title,
.ko-section-title,
.ko-chat-heading,
.ko-chat-title,
.login-brand-title,
.login-form-header h2,
.ko-summary-item .count,
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] h5,
html[data-theme="light"] h6,
html[data-theme="light"] .ko-title,
html[data-theme="light"] .ko-section-title,
html[data-theme="light"] .ko-chat-heading,
html[data-theme="light"] .ko-chat-title,
html[data-theme="light"] .login-brand-title,
html[data-theme="light"] .login-form-header h2,
html[data-theme="light"] .ko-summary-item .count {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
  background: none !important;
  font-family: var(--dashboard-font-family) !important;
  letter-spacing: 0 !important;
  text-shadow: none !important;
}

h1,
.ko-title,
.ko-chat-heading {
  font-size: clamp(2rem, 4vw, 3.2rem) !important;
  font-weight: 650 !important;
  line-height: 1.06 !important;
}

h2,
.ko-section-title {
  font-size: clamp(1.45rem, 2.4vw, 2rem) !important;
  font-weight: 650 !important;
}

h3 {
  font-size: var(--fs-xl) !important;
  font-weight: 650 !important;
}

p,
li,
.ko-lede,
.ko-eyebrow,
.ko-section-head p,
.ko-label,
.ko-note,
.ko-chat-subtitle,
.ko-chat-status,
.ko-chat-meta,
.login-brand-tagline,
.login-stat-label,
.login-feature-item,
.login-form-header p,
.login-field label,
.login-remember,
.login-footer-msg,
.login-security-note,
html[data-theme="light"] p,
html[data-theme="light"] li,
html[data-theme="light"] .ko-lede,
html[data-theme="light"] .ko-eyebrow,
html[data-theme="light"] .ko-section-head p,
html[data-theme="light"] .ko-label,
html[data-theme="light"] .ko-note,
html[data-theme="light"] .ko-chat-subtitle,
html[data-theme="light"] .ko-chat-status,
html[data-theme="light"] .ko-chat-meta {
  color: var(--text-muted) !important;
  -webkit-text-fill-color: var(--text-muted) !important;
}

.ko-eyebrow,
.kaizen-eyebrow,
.ctitle,
.login-field label {
  color: var(--text-dim) !important;
  -webkit-text-fill-color: var(--text-dim) !important;
  font-size: var(--fs-xxs) !important;
  letter-spacing: .06em !important;
  text-transform: uppercase;
  font-weight: 700;
}

.ko-eyebrow::before,
.kaizen-eyebrow::before {
  background: var(--cyan) !important;
  box-shadow: none !important;
}

a,
a:visited,
html[data-theme="light"] a,
html[data-theme="light"] .ko-message.assistant a {
  color: var(--cyan) !important;
  -webkit-text-fill-color: var(--cyan) !important;
  text-shadow: none !important;
}

a:hover {
  color: var(--orange) !important;
  -webkit-text-fill-color: var(--orange) !important;
  text-shadow: none !important;
}

.ko-button,
.kaizen-button,
.btn-kaizen,
.btn-outline-k,
.login-social-btn,
.ko-chat-example,
.ko-dialog-close {
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--radius) !important;
  border: 1px solid var(--border) !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
  font-family: var(--dashboard-font-family) !important;
  font-size: var(--fs-sm) !important;
  font-weight: 600 !important;
  text-shadow: none !important;
  box-shadow: none !important;
}

.ko-button:hover,
.kaizen-button:hover,
.btn-kaizen:hover,
.btn-outline-k:hover,
.login-social-btn:hover,
.ko-chat-example:hover,
.ko-dialog-close:hover {
  border-color: var(--cyan) !important;
  background: var(--raised) !important;
  transform: none !important;
}

.ko-button.primary,
.kaizen-button.primary,
.btn-primary-k,
.login-submit,
.ko-chat-form button,
.public-chat-form button,
html[data-theme="light"] .ko-button.primary,
html[data-theme="light"] .ko-chat-form button,
html[data-theme="light"] .login-submit {
  border-color: transparent !important;
  background: var(--cyan) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  box-shadow: none !important;
}

.ko-button.primary:hover,
.kaizen-button.primary:hover,
.btn-primary-k:hover,
.login-submit:hover,
.ko-chat-form button:hover {
  background: var(--blue) !important;
  filter: brightness(.96);
}

.ko-row,
.kv,
.public-chat-top,
.public-chat-form,
.ko-chat-top,
.ko-chat-form {
  border-color: var(--border-soft) !important;
}

.ko-label,
.kv .k {
  color: var(--text-dim) !important;
  -webkit-text-fill-color: var(--text-dim) !important;
}

.ko-value,
.kv .v,
.metric .v,
code,
pre,
table,
.ko-summary-item .count {
  font-family: var(--mono) !important;
}

.ko-value,
.metric .v,
.ko-summary-item .count {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}

.ko-value.green,
.green,
.count.green,
.ko-pill.green,
.public-chat-status.online {
  color: var(--ok) !important;
  -webkit-text-fill-color: var(--ok) !important;
}

.ko-value.yellow,
.yellow,
.count.yellow,
.ko-pill.yellow {
  color: var(--warn) !important;
  -webkit-text-fill-color: var(--warn) !important;
}

.ko-value.red,
.red,
.count.red,
.ko-pill.red {
  color: var(--bad) !important;
  -webkit-text-fill-color: var(--bad) !important;
}

.ko-pill,
.kaizen-pill,
.chip,
.tag,
.ko-timeline-year {
  background: var(--elevated) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-muted) !important;
  -webkit-text-fill-color: var(--text-muted) !important;
  border-radius: 20px !important;
  font-family: var(--mono) !important;
  font-size: var(--fs-3xs) !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

.ko-note,
.public-message.system,
blockquote {
  background: var(--aurora-soft) !important;
  border-color: color-mix(in srgb, var(--cyan) 22%, transparent) !important;
  color: var(--text-muted) !important;
  -webkit-text-fill-color: var(--text-muted) !important;
}

.ko-chat-messages,
.public-chat-messages {
  background: var(--base) !important;
}

.ko-message,
.public-message,
.ko-bubble {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-muted) !important;
  -webkit-text-fill-color: var(--text-muted) !important;
  border-radius: var(--radius) !important;
}

.ko-message.user,
.public-message.user,
.ko-bubble.user {
  background: var(--aurora-soft) !important;
  border-color: color-mix(in srgb, var(--cyan) 22%, transparent) !important;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}

input,
select,
textarea,
.ko-chat-form textarea,
.public-chat-form textarea,
.login-input-wrap,
.login-input-wrap input,
html[data-theme="light"] .ko-chat-form textarea,
html[data-theme="light"] .login-input-wrap,
html[data-theme="light"] .login-input-wrap input,
html[data-theme="light"] .login-social-btn {
  background: var(--base) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
  font-family: var(--dashboard-font-family) !important;
  box-shadow: none !important;
}

input:focus,
select:focus,
textarea:focus,
.ko-chat-form textarea:focus,
.public-chat-form textarea:focus,
.login-input-wrap:focus-within,
html[data-theme="light"] .ko-chat-form textarea:focus,
html[data-theme="light"] .login-input-wrap:focus-within,
html[data-theme="light"] .login-input-wrap input:focus {
  outline: 2px solid var(--accent) !important;
  outline-offset: 1px;
  border-color: var(--cyan) !important;
  box-shadow: none !important;
}

table thead,
html[data-theme="light"] table thead {
  background: var(--elevated) !important;
}

table thead th,
table tbody td,
html[data-theme="light"] table thead th,
html[data-theme="light"] table tbody td,
html[data-theme="light"] code,
html[data-theme="light"] pre code {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
  border-color: var(--border-soft) !important;
}

table tbody tr:hover,
table tbody tr:nth-child(even),
html[data-theme="light"] table tbody tr:hover,
html[data-theme="light"] table tbody tr:nth-child(even) {
  background: var(--elevated) !important;
}

code,
html[data-theme="light"] code {
  background: var(--elevated) !important;
  color: var(--cyan) !important;
  -webkit-text-fill-color: var(--cyan) !important;
}

#body-wrapper img {
  border-radius: var(--radius) !important;
  box-shadow: none !important;
  filter: none !important;
}

.login-page,
html[data-theme="light"] .login-page {
  background: var(--bg) !important;
}

.login-brand-logo,
.footer-brand-logo {
  border-radius: 50%;
  object-fit: contain;
  background: #FFFFFF;
  border: 1px solid var(--border);
  filter: none !important;
  box-shadow: none !important;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.footer-brand-logo {
  width: 30px;
  height: 30px;
  display: block;
}

.footer-brand-text {
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  font-size: 15px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
}

#footer,
#footer.section,
html[data-theme="light"] #footer,
html[data-theme="light"] #footer.section {
  background: var(--surface) !important;
  border-top: 1px solid var(--border) !important;
  color: var(--text-muted) !important;
}

#footer .footer-col h4,
html[data-theme="light"] #footer .footer-col h4 {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}

#footer .footer-col p,
#footer .footer-col li,
#footer .footer-col a,
#footer .footer-copyright,
html[data-theme="light"] #footer .footer-col p,
html[data-theme="light"] #footer .footer-col li,
html[data-theme="light"] #footer .footer-col a,
html[data-theme="light"] #footer .footer-copyright {
  color: var(--text-muted) !important;
  -webkit-text-fill-color: var(--text-muted) !important;
}

::selection {
  background: color-mix(in srgb, var(--cyan) 22%, transparent);
  color: var(--text);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--elevated);
  border-radius: 20px;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--raised);
  background-clip: content-box;
}

@media (max-width: 840px) {
  #header .navbar {
    min-height: 60px;
  }

  #header .navbar-brand img {
    width: 36px !important;
    height: 36px !important;
  }

  .nav-brand-text {
    font-size: 14px !important;
  }

  .nav-brand-text::after {
    font-size: 11px;
  }

  .theme-toggle-mobile {
    background: var(--base) !important;
    color: var(--text-muted) !important;
    border-color: var(--border) !important;
  }

  .mobile-menu .button_container {
    background: var(--base) !important;
    border-color: var(--border) !important;
  }

  .mobile-menu .button_container span {
    background: var(--text) !important;
  }

  .mobile-container .overlay {
    background: var(--bg) !important;
  }

  .mobile-container .overlay-menu a,
  .mobile-container .overlay-menu a:visited {
    color: var(--text) !important;
    -webkit-text-fill-color: var(--text) !important;
  }
}

/* Final parity pass: remove older Aurora-gradient button treatments that were
   intentionally superseded by the dashboard console controls. */
body #header .dropmenu.animated ul li a.active,
body.header-dark #header .dropmenu.animated ul li a.active,
html[data-theme="cloudflare"] body #header .dropmenu.animated ul li a.active,
html[data-theme="dark"] body #header .dropmenu.animated ul li a.active,
html[data-theme="high-contrast"] body #header .dropmenu.animated ul li a.active {
  background-color: var(--aurora-soft) !important;
  background-image: none !important;
  border-color: var(--border) !important;
  color: var(--cyan) !important;
  -webkit-text-fill-color: var(--cyan) !important;
  box-shadow: inset 2px 0 0 var(--cyan) !important;
}

.ko-button.primary,
.kaizen-button.primary,
.btn-primary-k,
.login-submit,
.ko-chat-form button,
.public-chat-form button,
#header .dropmenu.animated ul li a.active {
  background-image: none !important;
}

.theme-toggle,
html[data-theme="light"] .theme-toggle {
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border-radius: var(--radius) !important;
  background: var(--base) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-muted) !important;
  -webkit-text-fill-color: var(--text-muted) !important;
  overflow: hidden;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
  border-color: var(--cyan) !important;
  background: var(--raised) !important;
}

.theme-toggle .ic {
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.theme-toggle-label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.theme-toggle-icon {
  display: none;
  line-height: 0;
}

html[data-theme="dark"] .theme-icon-moon {
  display: grid;
  place-items: center;
}

html:not([data-theme="dark"]) .theme-icon-sun {
  display: grid;
  place-items: center;
}

@media (max-width: 840px) {
  .theme-toggle-mobile {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
  }
}

html[data-theme="cloudflare"] #header .dropmenu.animated ul li a:not(.active),
html[data-theme="cloudflare"] #header .navbar-section.desktop-menu a:not(.navbar-brand):not(.active),
html[data-theme="high-contrast"] #header .dropmenu.animated ul li a:not(.active),
html[data-theme="high-contrast"] #header .navbar-section.desktop-menu a:not(.navbar-brand):not(.active) {
  color: #4B5563 !important;
  -webkit-text-fill-color: #4B5563 !important;
}

body #header .navbar-section.desktop-menu a.nav-login-btn,
body #header .nav-login-btn,
a.nav-login-btn {
  display: none !important;
}

body #header .navbar {
  min-height: 64px !important;
}

body #header .navbar-brand img {
  width: 42px !important;
  height: 42px !important;
}

body .nav-brand-text {
  font-size: 17px !important;
}

body .nav-brand-text::after {
  font-size: 13px !important;
}

body #header .dropmenu.animated ul li a,
body #header .navbar-section.desktop-menu a:not(.navbar-brand) {
  font-size: 14px !important;
}

html[data-theme="cloudflare"] .mock-tile,
html[data-theme="cloudflare"] .mock-list,
html[data-theme="cloudflare"] .mock-row,
html[data-theme="high-contrast"] .mock-tile,
html[data-theme="high-contrast"] .mock-list,
html[data-theme="high-contrast"] .mock-row {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
  box-shadow: var(--shadow) !important;
}

html[data-theme="cloudflare"] .mock-tile span,
html[data-theme="cloudflare"] .mock-row span,
html[data-theme="cloudflare"] .mock-row p,
html[data-theme="high-contrast"] .mock-tile span,
html[data-theme="high-contrast"] .mock-row span,
html[data-theme="high-contrast"] .mock-row p {
  color: var(--text-muted) !important;
  -webkit-text-fill-color: var(--text-muted) !important;
}

html[data-theme="cloudflare"] .mock-tile strong,
html[data-theme="cloudflare"] .mock-row strong,
html[data-theme="high-contrast"] .mock-tile strong,
html[data-theme="high-contrast"] .mock-row strong {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}

html[data-theme="cloudflare"] .ko-chat-page .ko-chat-top,
html[data-theme="cloudflare"] .ko-chat-page .ko-chat-form,
html[data-theme="high-contrast"] .ko-chat-page .ko-chat-top,
html[data-theme="high-contrast"] .ko-chat-page .ko-chat-form {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

html[data-theme="cloudflare"] .ko-chat-page .ko-chat-messages,
html[data-theme="high-contrast"] .ko-chat-page .ko-chat-messages {
  background: var(--base) !important;
}

html[data-theme="cloudflare"] .ko-chat-page .ko-chat-subtitle,
html[data-theme="cloudflare"] .ko-chat-page .ko-chat-meta,
html[data-theme="cloudflare"] .ko-chat-page .kaio-top-links button,
html[data-theme="high-contrast"] .ko-chat-page .ko-chat-subtitle,
html[data-theme="high-contrast"] .ko-chat-page .ko-chat-meta,
html[data-theme="high-contrast"] .ko-chat-page .kaio-top-links button {
  color: var(--text-muted) !important;
  -webkit-text-fill-color: var(--text-muted) !important;
}

html[data-theme="cloudflare"] .ko-public-preview .preview-body,
html[data-theme="high-contrast"] .ko-public-preview .preview-body {
  background: var(--base) !important;
  border: 1px solid var(--border) !important;
}

html[data-theme="cloudflare"] .ko-public-preview .preview-top,
html[data-theme="cloudflare"] .ko-public-preview .preview-bottom,
html[data-theme="high-contrast"] .ko-public-preview .preview-top,
html[data-theme="high-contrast"] .ko-public-preview .preview-bottom {
  border-color: var(--border) !important;
}

html[data-theme="cloudflare"] .ko-summary-item .label,
html[data-theme="high-contrast"] .ko-summary-item .label {
  background: var(--base) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-muted) !important;
  -webkit-text-fill-color: var(--text-muted) !important;
}

html[data-theme="cloudflare"] .visual-card,
html[data-theme="high-contrast"] .visual-card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow) !important;
}

html[data-theme="cloudflare"] .visual-card span,
html[data-theme="high-contrast"] .visual-card span {
  color: var(--text-muted) !important;
  -webkit-text-fill-color: var(--text-muted) !important;
}

html[data-theme="cloudflare"] .visual-card strong,
html[data-theme="high-contrast"] .visual-card strong {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}

body #header .dropmenu.animated ul li a,
body #header.scrolled .dropmenu.animated ul li a,
body #header:not(.scrolled) .dropmenu.animated ul li a,
body.header-dark #header:not(.scrolled) .dropmenu.animated ul li a,
body.header-dark #header.scrolled .dropmenu.animated ul li a,
body #header .dropmenu.animated ul li a.active,
body #header.scrolled .dropmenu.animated ul li a.active,
body #header:not(.scrolled) .dropmenu.animated ul li a.active,
body.header-dark #header:not(.scrolled) .dropmenu.animated ul li a.active,
body.header-dark #header.scrolled .dropmenu.animated ul li a.active,
body #header .navbar-section.desktop-menu a:not(.navbar-brand),
body #header.scrolled .navbar-section.desktop-menu a:not(.navbar-brand),
body #header:not(.scrolled) .navbar-section.desktop-menu a:not(.navbar-brand),
body.header-dark #header:not(.scrolled) .navbar-section.desktop-menu a:not(.navbar-brand),
body.header-dark #header.scrolled .navbar-section.desktop-menu a:not(.navbar-brand) {
  font-size: 14px !important;
  line-height: 14px !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.ko-hero-copy .ko-home-lede {
  max-width: 760px !important;
  margin-top: 18px !important;
  padding: 18px 20px 18px 22px !important;
  border-left: 4px solid var(--cyan) !important;
  border-radius: 8px !important;
  background: color-mix(in srgb, var(--cyan) 9%, var(--surface)) !important;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
  box-shadow: 0 10px 24px rgba(17,24,39,0.08) !important;
  font-size: clamp(1.12rem, 1.55vw, 1.34rem) !important;
  line-height: 1.52 !important;
  font-weight: 600 !important;
}

.ko-hero-copy .ko-home-lede strong {
  color: var(--cyan) !important;
  -webkit-text-fill-color: var(--cyan) !important;
  font-weight: 800 !important;
}

html[data-theme="dark"] .ko-hero-copy .ko-home-lede {
  background: color-mix(in srgb, var(--cyan) 13%, var(--surface)) !important;
  box-shadow: none !important;
}

@media (max-width: 700px) {
  .ko-hero-copy .ko-home-lede {
    padding: 15px 16px !important;
    font-size: 1.04rem !important;
  }
}

/* === Article markdown style migration: 2026-06-22 === */
/* Source: user/pages/16.articles/agent-citadel/default.md */
.article-header {
  text-align: center;
  padding: 40px 0 30px;
  max-width: 800px;
  margin: 0 auto;
}
.article-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(90deg, #00FFFF, #FF1493);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}
.article-header .article-subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1.5rem;
}
.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.article-meta .meta-author {
  color: var(--cyan);
  font-weight: 600;
}
.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 0 3rem;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.article-body h2 {
  color: var(--cyan) !important;
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 255, 255, 0.1);
  letter-spacing: 0.01em;
}
.article-body p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 1.35rem;
  text-wrap: pretty;
  hyphens: auto;
}
.article-body > p:first-of-type {
  font-size: 1.12rem;
  line-height: 1.9;
  color: var(--text-primary);
}
.article-body h2 + p,
.article-body h3 + p {
  margin-top: 0.45rem;
}
.article-body strong {
  color: var(--text-primary);
}
.article-body ul,
.article-body ol {
  margin-bottom: 1.35rem;
  padding-left: 1.25rem;
}
.article-body li {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 0.42rem;
}
.article-body li strong {
  color: var(--text-primary);
}
.article-body hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 2rem 0;
}
.article-body code {
  background: rgba(0, 255, 255, 0.08);
  border: 1px solid rgba(0, 255, 255, 0.12);
  border-radius: 4px;
  padding: 2px 7px;
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--cyan);
}
.diagram-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 255, 255, 0.12);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin: 1.75rem 0;
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.55);
  overflow-x: auto;
  white-space: pre;
}
.diagram-box .hl-cyan { color: #00FFFF; }
.diagram-box .hl-magenta { color: #FF1493; }
.diagram-box .hl-green { color: #00FF00; }
.diagram-box .hl-purple { color: #8A2BE2; }
.diagram-box .hl-dim { color: #555; }
.diagram-box .hl-white { color: rgba(255, 255, 255, 0.85); }
.diagram-box .hl-yellow { color: #FFD700; }
.diagram-box .hl-orange { color: #FF8C00; }
.diagram-label {
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.3);
  margin-top: -0.5rem;
  margin-bottom: 1.75rem;
  font-style: italic;
}
.callout-box {
  background: rgba(0, 255, 255, 0.04);
  border: 1px solid rgba(0, 255, 255, 0.15);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.callout-box p {
  margin: 0 !important;
  font-size: 0.95rem !important;
}
.scenario-box {
  background: rgba(138, 43, 226, 0.05);
  border: 1px solid rgba(138, 43, 226, 0.15);
  border-left: 3px solid #8A2BE2;
  border-radius: 0 10px 10px 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.scenario-box p {
  font-size: 0.95rem !important;
  margin-bottom: 0.5rem !important;
}
.scenario-box p:last-child {
  margin-bottom: 0 !important;
}
.scenario-box .scenario-label {
  color: #8A2BE2;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: block;
}
.article-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}
.article-footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0.25rem 0;
}
.article-footer .back-link {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 8px 24px;
  border: 1px solid var(--cyan);
  border-radius: var(--radius-sm);
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}
.article-footer .back-link:hover {
  background: rgba(0, 255, 255, 0.1);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}
.screenshot-row {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin: 2rem 0;
  flex-wrap: wrap;
}
.screenshot-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 255, 255, 0.12);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  max-width: 280px;
  flex: 1 1 250px;
}
.screenshot-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}
.screenshot-card .screenshot-caption {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 0.75rem;
  font-style: italic;
  line-height: 1.4;
}
.screenshot-single {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}
.screenshot-single .screenshot-card {
  max-width: 300px;
}
@media (max-width: 768px) {
  .article-header h1 { font-size: 1.8rem; }
  .article-header .article-subtitle { font-size: 1.1rem; }
  .article-meta { flex-direction: column; gap: 0.5rem; }
  .diagram-box { font-size: 0.7rem; padding: 1rem; }
  .screenshot-row { flex-direction: column; align-items: center; }
  .screenshot-card { max-width: 260px; }
}

/* Source: user/pages/16.articles/apple-silicon-ai-infrastructure/default.md */
.article-header {
  text-align: center;
  padding: 40px 0 30px;
  max-width: 800px;
  margin: 0 auto;
}
.article-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(90deg, #00FFFF, #FF1493);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}
.article-header .article-subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1.5rem;
}
.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.article-meta .meta-author {
  color: var(--cyan);
  font-weight: 600;
}
.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 0 3rem;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.article-body h2 {
  color: var(--cyan) !important;
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 255, 255, 0.1);
  letter-spacing: 0.01em;
}
.article-body p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 1.35rem;
  text-wrap: pretty;
  hyphens: auto;
}
.article-body > p:first-of-type {
  font-size: 1.12rem;
  line-height: 1.9;
  color: var(--text-primary);
}
.article-body h2 + p,
.article-body h3 + p {
  margin-top: 0.45rem;
}
.article-body strong {
  color: var(--text-primary);
}
.article-body ul,
.article-body ol {
  margin-bottom: 1.35rem;
  padding-left: 1.25rem;
}
.article-body li {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 0.42rem;
}
.article-body li strong {
  color: var(--text-primary);
}
.article-body hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 2rem 0;
}
.article-body code {
  background: rgba(0, 255, 255, 0.08);
  border: 1px solid rgba(0, 255, 255, 0.12);
  border-radius: 4px;
  padding: 2px 7px;
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--cyan);
}
.diagram-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 255, 255, 0.12);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin: 1.75rem 0;
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.55);
  overflow-x: auto;
  white-space: pre;
}
.diagram-box .hl-cyan { color: #00FFFF; }
.diagram-box .hl-magenta { color: #FF1493; }
.diagram-box .hl-green { color: #00FF00; }
.diagram-box .hl-purple { color: #8A2BE2; }
.diagram-box .hl-dim { color: #555; }
.diagram-box .hl-white { color: rgba(255, 255, 255, 0.85); }
.diagram-box .hl-yellow { color: #FFD700; }
.diagram-box .hl-orange { color: #FF8C00; }
.diagram-label {
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.3);
  margin-top: -0.5rem;
  margin-bottom: 1.75rem;
  font-style: italic;
}
.callout-box {
  background: rgba(0, 255, 255, 0.04);
  border: 1px solid rgba(0, 255, 255, 0.15);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.callout-box p {
  margin: 0 !important;
  font-size: 0.95rem !important;
}
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.spec-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: rgba(0, 255, 255, 0.06);
  color: var(--cyan);
  border-bottom: 1px solid rgba(0, 255, 255, 0.15);
  font-weight: 600;
}
.spec-table td {
  padding: 0.65rem 1rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.spec-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}
.article-body a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 255, 255, 0.3);
  transition: all 0.3s ease;
}
.article-body a:hover {
  color: var(--white);
  border-bottom-color: var(--white);
}
.article-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 0 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}
.article-footer p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-style: italic;
}
.article-footer .back-link {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 8px 24px;
  border: 1px solid var(--cyan);
  border-radius: var(--radius-sm);
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}
.article-footer .back-link:hover {
  background: rgba(0, 255, 255, 0.1);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

/* Source: user/pages/16.articles/default.md */
.articles-hero {
  text-align: center;
  padding: 40px 0 50px;
}
.articles-hero h1 {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(90deg, #00FFFF, #FF1493);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
}
.articles-hero .subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}
.article-list {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 0 3rem;
}
.article-entry {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 2rem 2.5rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  text-decoration: none;
  display: block;
  border-left: 3px solid transparent;
}
.article-entry:hover {
  border-color: rgba(0, 255, 255, 0.3);
  border-left-color: var(--cyan);
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.08);
  transform: translateY(-2px);
}
.article-entry .article-date {
  font-size: 0.8rem;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.article-entry h2 {
  font-size: 1.4rem;
  color: var(--text-primary) !important;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}
.article-entry .article-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
}
.article-entry .read-more {
  display: inline-block;
  margin-top: 1rem;
  color: var(--cyan);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}
@media (max-width: 768px) {
  .articles-hero h1 { font-size: 2.2rem; }
  .article-entry { padding: 1.5rem; }
  .article-entry h2 { font-size: 1.2rem; }
}

/* Source: user/pages/16.articles/emby-roku-apple-silicon-fix/default.md */
.article-header {
  text-align: center;
  padding: 40px 0 30px;
  max-width: 800px;
  margin: 0 auto;
}
.article-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(90deg, #00FFFF, #FF1493);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}
.article-header .article-subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1.5rem;
}
.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.article-meta .meta-author {
  color: var(--cyan);
  font-weight: 600;
}
.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 0 3rem;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.article-body h2 {
  color: var(--cyan) !important;
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 255, 255, 0.1);
  letter-spacing: 0.01em;
}
.article-body p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 1.35rem;
  text-wrap: pretty;
  hyphens: auto;
}
.article-body > p:first-of-type {
  font-size: 1.12rem;
  line-height: 1.9;
  color: var(--text-primary);
}
.article-body h2 + p,
.article-body h3 + p {
  margin-top: 0.45rem;
}
.article-body strong {
  color: var(--text-primary);
}
.article-body ul,
.article-body ol {
  margin-bottom: 1.35rem;
  padding-left: 1.25rem;
}
.article-body li {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 0.42rem;
}
.article-body li strong {
  color: var(--text-primary);
}
.article-body hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 2rem 0;
}
.article-body code {
  background: rgba(0, 255, 255, 0.08);
  border: 1px solid rgba(0, 255, 255, 0.12);
  border-radius: 4px;
  padding: 2px 7px;
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--cyan);
}
.article-body a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-body a:hover {
  color: #FF1493;
}
.callout-box {
  background: rgba(0, 255, 255, 0.04);
  border: 1px solid rgba(0, 255, 255, 0.15);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}
.callout-box p {
  margin: 0 !important;
  font-size: 0.95rem !important;
}
.article-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}
.article-footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0.25rem 0;
}
.article-footer .back-link {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 8px 24px;
  border: 1px solid var(--cyan);
  border-radius: var(--radius-sm);
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}
.article-footer .back-link:hover {
  background: rgba(0, 255, 255, 0.1);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}
@media (max-width: 768px) {
  .article-header h1 { font-size: 1.8rem; }
  .article-header .article-subtitle { font-size: 1.1rem; }
  .article-meta { flex-direction: column; gap: 0.5rem; }
}

/* Source: user/pages/16.articles/fortified-noc/default.md */
.article-header {
  text-align: center;
  padding: 40px 0 30px;
  max-width: 800px;
  margin: 0 auto;
}
.article-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(90deg, #00FFFF, #FF1493);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}
.article-header .article-subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1.5rem;
}
.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.article-meta .meta-author {
  color: var(--cyan);
  font-weight: 600;
}
.article-banner {
  max-width: 800px;
  margin: 0 auto 2rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(0, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.article-banner img {
  width: 100%;
  height: auto;
  display: block;
}
.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 0 3rem;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.article-body h2 {
  color: var(--cyan) !important;
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 255, 255, 0.1);
  letter-spacing: 0.01em;
}
.article-body p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 1.35rem;
  text-wrap: pretty;
  hyphens: auto;
}
.article-body > p:first-of-type {
  font-size: 1.12rem;
  line-height: 1.9;
  color: var(--text-primary);
}
.article-body h2 + p,
.article-body h3 + p {
  margin-top: 0.45rem;
}
.article-body strong {
  color: var(--text-primary);
}
.article-body ul,
.article-body ol {
  margin-bottom: 1.35rem;
  padding-left: 1.25rem;
}
.article-body li {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 0.42rem;
}
.article-body li strong {
  color: var(--text-primary);
}
.article-body hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 2rem 0;
}
.article-body code {
  background: rgba(0, 255, 255, 0.08);
  border: 1px solid rgba(0, 255, 255, 0.12);
  border-radius: 4px;
  padding: 2px 7px;
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--cyan);
}
.callout-box {
  background: rgba(0, 255, 255, 0.04);
  border: 1px solid rgba(0, 255, 255, 0.15);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}
.callout-box p {
  margin: 0 !important;
  font-size: 0.95rem !important;
}
.score-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 255, 255, 0.12);
  border-radius: 10px;
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 6px 20px rgba(0, 0, 0, 0.2);
}
.score-card .score-number {
  font-size: 5rem;
  font-weight: 800;
  background: linear-gradient(90deg, #00FFFF, #FF1493);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.score-card .score-label {
  font-size: 1.1rem;
  color: var(--text-secondary);
}
.audit-list {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 255, 255, 0.12);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin: 1.75rem 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 6px 20px rgba(0, 0, 0, 0.2);
}
.audit-list ol {
  padding-left: 1.5rem;
  margin: 0;
}
.audit-list li {
  font-size: 0.95rem !important;
  line-height: 1.7 !important;
  margin-bottom: 0.25rem !important;
}
.article-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}
.article-footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0.25rem 0;
}
.article-footer .back-link {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 8px 24px;
  border: 1px solid var(--cyan);
  border-radius: var(--radius-sm);
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}
.article-footer .back-link:hover {
  background: rgba(0, 255, 255, 0.1);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}
@media (max-width: 768px) {
  .article-header h1 { font-size: 1.8rem; }
  .article-header .article-subtitle { font-size: 1.1rem; }
  .article-meta { flex-direction: column; gap: 0.5rem; }
}

/* Source: user/pages/16.articles/i-built-a-private-ai-platform-in-my-closet/default.md */
.article-header {
  text-align: center;
  padding: 40px 0 30px;
  max-width: 800px;
  margin: 0 auto;
}
.article-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(90deg, #00FFFF, #FF1493);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}
.article-header .article-subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1.5rem;
}
.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.article-meta .meta-author {
  color: var(--cyan);
  font-weight: 600;
}
.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 0 3rem;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.article-body h2 {
  color: var(--cyan) !important;
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 255, 255, 0.1);
  letter-spacing: 0.01em;
}
.article-body p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 1.35rem;
  text-wrap: pretty;
  hyphens: auto;
}
.article-body > p:first-of-type {
  font-size: 1.12rem;
  line-height: 1.9;
  color: var(--text-primary);
}
.article-body h2 + p,
.article-body h3 + p {
  margin-top: 0.45rem;
}
.article-body strong {
  color: var(--text-primary);
}
.article-body ul,
.article-body ol {
  margin-bottom: 1.35rem;
  padding-left: 1.25rem;
}
.article-body li {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 0.42rem;
}
.article-body li strong {
  color: var(--text-primary);
}
.article-body hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 2rem 0;
}
.article-body code {
  background: rgba(0, 255, 255, 0.08);
  border: 1px solid rgba(0, 255, 255, 0.12);
  border-radius: 4px;
  padding: 2px 7px;
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--cyan);
}
.article-body blockquote {
  border-left: 3px solid var(--cyan) !important;
  background: rgba(0, 255, 255, 0.03) !important;
  padding: 1.25rem 1.5rem !important;
  margin: 2rem 0 !important;
  border-radius: 0 8px 8px 0 !important;
}
.article-body blockquote p {
  color: var(--text-primary) !important;
  font-size: 1.15rem;
  font-style: italic;
  margin: 0;
}
.diagram-box {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 255, 255, 0.12);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin: 1.75rem 0;
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.55);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  contain: inline-size;
  white-space: pre;
}
.diagram-box .hl-cyan { color: #00FFFF; }
.diagram-box .hl-magenta { color: #FF1493; }
.diagram-box .hl-green { color: #00FF00; }
.diagram-box .hl-purple { color: #8A2BE2; }
.diagram-box .hl-dim { color: #555; }
.diagram-box .hl-white { color: rgba(255, 255, 255, 0.85); }
.diagram-label {
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.3);
  margin-top: -0.5rem;
  margin-bottom: 1.75rem;
  font-style: italic;
}
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}
.spec-table th {
  text-align: left;
  padding: 0.6rem 1rem;
  color: var(--cyan);
  border-bottom: 1px solid rgba(0, 255, 255, 0.15);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.spec-table td {
  padding: 0.55rem 1rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.spec-table tr:hover td {
  background: rgba(0, 255, 255, 0.02);
}
.callout-box {
  background: rgba(0, 255, 255, 0.04);
  border: 1px solid rgba(0, 255, 255, 0.15);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.callout-box p {
  margin: 0 !important;
  font-size: 0.95rem !important;
}
.article-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}
.article-footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0.25rem 0;
}
.article-footer .back-link {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 8px 24px;
  border: 1px solid var(--cyan);
  border-radius: var(--radius-sm);
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}
.article-footer .back-link:hover {
  background: rgba(0, 255, 255, 0.1);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}
@media (max-width: 768px) {
  .article-header h1 { font-size: 1.8rem; }
  .article-header .article-subtitle { font-size: 1.1rem; }
  .article-meta { flex-direction: column; gap: 0.5rem; }
  .diagram-box { font-size: 0.7rem; padding: 1rem; }
  .spec-table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .spec-table tbody {
    display: table;
    min-width: 100%;
  }
  .spec-table th,
  .spec-table td {
    white-space: nowrap;
  }
}

/* Source: user/pages/16.articles/local-git-universal-ai-context/default.md */
.article-header {
  text-align: center;
  padding: 40px 0 30px;
  max-width: 860px;
  margin: 0 auto;
}
.article-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(90deg, #00FFFF, #FF1493);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}
.article-header .article-subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1.5rem;
}
.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.article-meta .meta-author {
  color: var(--cyan);
  font-weight: 600;
}
.article-banner {
  max-width: 900px;
  margin: 0 auto 2rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(0, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.article-banner img {
  width: 100%;
  height: auto;
  display: block;
}
.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 0 3rem;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.article-body h2 {
  color: var(--cyan) !important;
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 255, 255, 0.1);
  letter-spacing: 0.01em;
}
.article-body p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 1.35rem;
  text-wrap: pretty;
  hyphens: auto;
}
.article-body > p:first-of-type {
  font-size: 1.12rem;
  line-height: 1.9;
  color: var(--text-primary);
}
.article-body h2 + p,
.article-body h3 + p {
  margin-top: 0.45rem;
}
.article-body strong {
  color: var(--text-primary);
}
.article-body ul,
.article-body ol {
  margin-bottom: 1.35rem;
  padding-left: 1.25rem;
}
.article-body li {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 0.42rem;
}
.article-body li strong {
  color: var(--text-primary);
}
.article-body code {
  background: rgba(0, 255, 255, 0.08);
  border: 1px solid rgba(0, 255, 255, 0.12);
  border-radius: 4px;
  padding: 2px 7px;
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--cyan);
}
.callout-box {
  background: rgba(0, 255, 255, 0.04);
  border: 1px solid rgba(0, 255, 255, 0.15);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}
.callout-box p {
  margin: 0 !important;
  font-size: 0.95rem !important;
}
.diagram-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 255, 255, 0.12);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin: 1.75rem 0;
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.62);
  overflow-x: auto;
  white-space: pre;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 6px 20px rgba(0, 0, 0, 0.2);
}
.diagram-box .hl-cyan { color: #00FFFF; }
.diagram-box .hl-magenta { color: #FF1493; }
.diagram-box .hl-green { color: #00FF88; }
.diagram-box .hl-dim { color: rgba(255, 255, 255, 0.35); }
.diagram-box .hl-white { color: rgba(255, 255, 255, 0.9); }
.workflow-embed {
  max-width: 1180px;
  margin: 2rem auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(0, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.workflow-embed img {
  width: 100%;
  height: auto;
  display: block;
  background: #05070B;
}
.runtime-gallery {
  max-width: 1180px;
  margin: 2.25rem auto;
  padding: 1.75rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.32);
}
.runtime-gallery h2 {
  color: var(--cyan) !important;
  font-size: 1.5rem;
  margin: 0 0 0.65rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 255, 255, 0.1);
}
.runtime-gallery > p {
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.75;
  max-width: 760px;
  margin: 0 0 1.4rem;
}
.runtime-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.runtime-shot {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}
.runtime-shot img {
  width: 100%;
  height: auto;
  display: block;
  background: #ffffff;
}
.runtime-shot figcaption {
  padding: 0.75rem 0.85rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
  line-height: 1.45;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.diagram-label {
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.35);
  margin-top: -0.5rem;
  margin-bottom: 1.75rem;
  font-style: italic;
}
.article-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}
.article-footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0.25rem 0;
}
.article-footer .back-link {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 8px 24px;
  border: 1px solid var(--cyan);
  border-radius: var(--radius-sm);
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}
.article-footer .back-link:hover {
  background: rgba(0, 255, 255, 0.1);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}
@media (max-width: 768px) {
  .article-header h1 { font-size: 1.8rem; }
  .article-header .article-subtitle { font-size: 1.1rem; }
  .article-meta { flex-direction: column; gap: 0.5rem; }
  .diagram-box { font-size: 0.72rem; padding: 1rem; }
  .runtime-gallery { padding: 1rem; }
}

/* Source: user/pages/16.articles/shared-world-context-layer/default.md */
.article-header {
  text-align: center;
  padding: 40px 0 30px;
  max-width: 860px;
  margin: 0 auto;
}
.article-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(90deg, #00FFFF, #FF1493);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}
.article-header .article-subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1.5rem;
}
.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.article-meta .meta-author {
  color: var(--cyan);
  font-weight: 600;
}
.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 0 3rem;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.article-body h2 {
  color: var(--cyan) !important;
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 255, 255, 0.1);
  letter-spacing: 0.01em;
}
.article-body p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 1.35rem;
  text-wrap: pretty;
  hyphens: auto;
}
.article-body > p:first-of-type {
  font-size: 1.12rem;
  line-height: 1.9;
  color: var(--text-primary);
}
.article-body h2 + p,
.article-body h3 + p {
  margin-top: 0.45rem;
}
.article-body strong {
  color: var(--text-primary);
}
.article-body ul,
.article-body ol {
  margin-bottom: 1.35rem;
  padding-left: 1.25rem;
}
.article-body li {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 0.42rem;
}
.article-body li strong {
  color: var(--text-primary);
}
.article-body code {
  background: rgba(0, 255, 255, 0.08);
  border: 1px solid rgba(0, 255, 255, 0.12);
  border-radius: 4px;
  padding: 2px 7px;
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--cyan);
}
.article-body a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 255, 255, 0.3);
}
.article-body a:hover {
  border-bottom-color: var(--cyan);
}
.callout-box {
  background: rgba(0, 255, 255, 0.04);
  border: 1px solid rgba(0, 255, 255, 0.15);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}
.callout-box p {
  margin: 0 !important;
  font-size: 0.95rem !important;
}
.pull-quote {
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 2.25rem auto;
  max-width: 640px;
  background: linear-gradient(90deg, #00FFFF, #FF1493);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.article-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}
.article-footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0.25rem 0;
}
.article-footer .back-link {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 8px 24px;
  border: 1px solid var(--cyan);
  border-radius: var(--radius-sm);
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}
.article-footer .back-link:hover {
  background: rgba(0, 255, 255, 0.1);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}
@media (max-width: 768px) {
  .article-header h1 { font-size: 1.8rem; }
  .article-header .article-subtitle { font-size: 1.1rem; }
  .article-meta { flex-direction: column; gap: 0.5rem; }
  .pull-quote { font-size: 1.15rem; }
}

/* Source: user/pages/16.articles/the-weird-guy/default.md */
.article-header {
  text-align: center;
  padding: 40px 0 30px;
  max-width: 800px;
  margin: 0 auto;
}
.article-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(90deg, #00FFFF, #FF1493);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}
.article-header .article-subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1.5rem;
}
.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.article-meta .meta-author {
  color: var(--cyan);
  font-weight: 600;
}
.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 0 3rem;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.article-body h2 {
  color: var(--cyan) !important;
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 255, 255, 0.1);
  letter-spacing: 0.01em;
}
.article-body p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 1.35rem;
  text-wrap: pretty;
  hyphens: auto;
}
.article-body > p:first-of-type {
  font-size: 1.12rem;
  line-height: 1.9;
  color: var(--text-primary);
}
.article-body h2 + p,
.article-body h3 + p {
  margin-top: 0.45rem;
}
.article-body strong {
  color: var(--text-primary);
}
.article-body ul,
.article-body ol {
  margin-bottom: 1.35rem;
  padding-left: 1.25rem;
}
.article-body li {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 0.42rem;
}
.article-body li strong {
  color: var(--text-primary);
}
.article-body hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 2rem 0;
}
.article-body code {
  background: rgba(0, 255, 255, 0.08);
  border: 1px solid rgba(0, 255, 255, 0.12);
  border-radius: 4px;
  padding: 2px 7px;
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--cyan);
}
.callout-box {
  background: rgba(0, 255, 255, 0.04);
  border: 1px solid rgba(0, 255, 255, 0.15);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}
.callout-box p {
  margin: 0 !important;
  font-size: 0.95rem !important;
}
.article-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}
.article-footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0.25rem 0;
}
.article-footer .back-link {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 8px 24px;
  border: 1px solid var(--cyan);
  border-radius: var(--radius-sm);
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}
.article-footer .back-link:hover {
  background: rgba(0, 255, 255, 0.1);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}
@media (max-width: 768px) {
  .article-header h1 { font-size: 1.8rem; }
  .article-header .article-subtitle { font-size: 1.1rem; }
  .article-meta { flex-direction: column; gap: 0.5rem; }
}

/* Source: user/pages/16.articles/using-ai-to-build-better-health-habits/default.md */
.article-header {
  text-align: center;
  padding: 40px 0 30px;
  max-width: 860px;
  margin: 0 auto;
}
.article-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(90deg, #00FFFF, #FF1493);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}
.article-header .article-subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1.5rem;
}
.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.article-meta .meta-author {
  color: var(--cyan);
  font-weight: 600;
}
.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 0 3rem;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.article-body h2 {
  color: var(--cyan) !important;
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 255, 255, 0.1);
  letter-spacing: 0.01em;
}
.article-body p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 1.35rem;
  text-wrap: pretty;
  hyphens: auto;
}
.article-body > p:first-of-type {
  font-size: 1.12rem;
  line-height: 1.9;
  color: var(--text-primary);
}
.article-body h2 + p,
.article-body h3 + p {
  margin-top: 0.45rem;
}
.article-body strong {
  color: var(--text-primary);
}
.article-body ul,
.article-body ol {
  margin-bottom: 1.35rem;
  padding-left: 1.25rem;
}
.article-body li {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 0.42rem;
}
.article-body li strong {
  color: var(--text-primary);
}
.article-body a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 255, 255, 0.3);
}
.article-body a:hover {
  border-bottom-color: var(--cyan);
}
.article-body blockquote {
  border-left: 3px solid var(--cyan) !important;
  background: rgba(0, 255, 255, 0.03) !important;
  padding: 1.25rem 1.5rem !important;
  margin: 2rem 0 !important;
  border-radius: 0 8px 8px 0 !important;
}
.article-body blockquote p {
  color: var(--text-primary) !important;
  font-size: 1.15rem;
  font-style: italic;
  margin: 0;
}
.callout-box {
  background: rgba(0, 255, 255, 0.04);
  border: 1px solid rgba(0, 255, 255, 0.15);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}
.callout-box p {
  margin: 0 !important;
  font-size: 0.95rem !important;
}
.example-stack {
  max-width: 980px;
  margin: 2rem auto;
  display: grid;
  gap: 1.2rem;
}
.example-panel {
  border: 1px solid rgba(0, 255, 255, 0.16);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(8, 12, 28, 0.95), rgba(14, 6, 30, 0.95));
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.example-panel .panel-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(0, 255, 255, 0.12);
}
.example-panel .eyebrow {
  display: block;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.example-panel h2 {
  color: var(--text-primary) !important;
  font-size: 1.25rem;
  margin: 0;
  padding: 0;
  border: 0;
}
.example-panel .example-note {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.84rem;
  margin: 0.45rem 0 0;
  line-height: 1.55;
}
.mock-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.08);
}
.mock-tile {
  background: rgba(2, 7, 18, 0.78);
  padding: 1rem;
  min-height: 110px;
}
.mock-tile strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.9rem;
  margin-bottom: 0.45rem;
}
.mock-tile span {
  color: rgba(255, 255, 255, 0.66);
  display: block;
  font-size: 0.86rem;
  line-height: 1.55;
}
.mock-list {
  padding: 1rem 1.25rem 1.15rem;
}
.mock-row {
  display: grid;
  grid-template-columns: 90px 1fr 120px;
  gap: 1rem;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}
.mock-row:last-child {
  border-bottom: 0;
}
.mock-row .slot {
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.08em;
}
.mock-row .status {
  color: #FF1493;
  font-weight: 800;
  text-align: right;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.08);
}
.visual-card {
  background: rgba(2, 7, 18, 0.82);
  padding: 1rem;
  min-height: 150px;
}
.visual-card .card-label {
  display: block;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}
.visual-card strong {
  display: block;
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 0.55rem;
}
.visual-card span {
  display: block;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.88rem;
  line-height: 1.58;
}
.visual-card .mini-metric {
  color: #FF1493;
  font-weight: 800;
  margin-top: 0.75rem;
}
.prompt-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 255, 255, 0.12);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  color: rgba(255, 255, 255, 0.78);
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-x: auto;
}
.article-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}
.article-footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0.25rem 0;
}
.article-footer .back-link {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 8px 24px;
  border: 1px solid var(--cyan);
  border-radius: var(--radius-sm);
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}
.article-footer .back-link:hover {
  background: rgba(0, 255, 255, 0.1);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}
@media (max-width: 768px) {
  .article-header h1 { font-size: 1.8rem; }
  .article-header .article-subtitle { font-size: 1.1rem; }
  .article-meta { flex-direction: column; gap: 0.5rem; }
  .mock-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .mock-row { grid-template-columns: 1fr; gap: 0.25rem; }
  .mock-row .status { text-align: left; }
}

/* === Mobile header fit: 2026-06-22 === */
@media (max-width: 840px) {
  #header .container,
  #header .navbar {
    width: 100% !important;
    max-width: 100% !important;
  }

  #header .navbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 96px !important;
    align-items: center !important;
    column-gap: 8px !important;
    padding: 10px 12px !important;
  }

  #header .navbar-section.logo {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  #header .navbar-brand,
  #header .navbar-brand:hover,
  #header .navbar-section a.navbar-brand,
  #header .navbar-section a.navbar-brand:hover {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    padding-right: 0 !important;
  }

  .nav-brand-text {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 18px !important;
  }

  .nav-brand-text::after {
    display: none !important;
    content: none !important;
  }

  .mobile-menu {
    width: 96px !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    right: 12px !important;
  }
}

@media (max-width: 420px) {
  #header .navbar {
    grid-template-columns: minmax(0, 1fr) 88px !important;
  }

  #header .navbar-brand img {
    width: 42px !important;
    height: 42px !important;
  }

  .nav-brand-text {
    font-size: 17px !important;
  }

  .mobile-menu {
    width: 88px !important;
  }
}

/* === Mobile toggle spacing fix: 2026-06-22 === */
@media (max-width: 840px) {
  .mobile-menu {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    width: 102px !important;
    right: 12px !important;
  }

  .mobile-menu .theme-toggle,
  .mobile-menu .button_container {
    position: relative !important;
    flex: 0 0 42px !important;
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    margin: 0 !important;
    inset: auto !important;
  }

  .mobile-menu .button_container span {
    left: 10px !important;
    width: 22px !important;
  }

  .mobile-menu .button_container span:nth-of-type(1) { top: 12px !important; }
  .mobile-menu .button_container span:nth-of-type(2) { top: 20px !important; }
  .mobile-menu .button_container span:nth-of-type(3) { top: 28px !important; }
}

@media (max-width: 420px) {
  #header .navbar {
    grid-template-columns: minmax(0, 1fr) 102px !important;
  }

  .mobile-menu {
    width: 102px !important;
  }
}

/* === Article prose readability fit: 2026-06-22 === */
.article-body p,
.article-body li,
.article-entry .article-excerpt {
  -webkit-hyphens: none !important;
  hyphens: none !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

@media (max-width: 520px) {
  .article-body p,
  .article-body li {
    line-height: 1.78 !important;
  }
}

/* === Chat mobile full-screen app fit: 2026-06-22 === */
@media (max-width: 700px) {
  html:has(.ko-chat-page),
  body:has(.ko-chat-page) {
    height: var(--kaio-viewport-height, 100dvh) !important;
    min-height: var(--kaio-viewport-height, 100dvh) !important;
    overflow: hidden !important;
    background: var(--surface) !important;
  }

  body:has(.ko-chat-page) #header,
  body:has(.ko-chat-page) .mobile-menu,
  body:has(.ko-chat-page) .mobile-container,
  body:has(.ko-chat-page) #footer,
  body:has(.ko-chat-page) #particles-js {
    display: none !important;
  }

  body:has(.ko-chat-page) #page-wrapper,
  body:has(.ko-chat-page) #start,
  body:has(.ko-chat-page) #body-wrapper,
  body:has(.ko-chat-page) #body-wrapper.section,
  body:has(.ko-chat-page) #body-wrapper .container,
  body:has(.ko-chat-page) main.ko-chat-page,
  body:has(.ko-chat-page) .ko-chat-stage {
    width: 100% !important;
    max-width: 100% !important;
    height: var(--kaio-viewport-height, 100dvh) !important;
    min-height: var(--kaio-viewport-height, 100dvh) !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  body:has(.ko-chat-page) #body-wrapper .container:has(.ko-chat-page),
  body:has(.ko-chat-page) .ko-chat-page {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body:has(.ko-chat-page) .ko-chat-stage {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }

  html body:has(.ko-chat-page) #page-wrapper #body-wrapper .container .ko-chat-page .ko-chat-shell {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: var(--kaio-viewport-height, 100dvh) !important;
    min-height: var(--kaio-viewport-height, 100dvh) !important;
    max-height: var(--kaio-viewport-height, 100dvh) !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  body:has(.ko-chat-page) .ko-chat-top,
  body:has(.ko-chat-page) .ko-chat-form {
    border-radius: 0 !important;
  }

  body:has(.ko-chat-page) .ko-chat-messages {
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  body:has(.ko-chat-page) .ko-chat-form {
    padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
  }

  body:has(.ko-chat-page) .ko-chat-row {
    display: flex !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  body:has(.ko-chat-page) .ko-chat-form textarea {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
  }
}

/* === Dashboard interface screenshot gallery: 2026-06-23 === */
.ko-interface-showcase {
  scroll-margin-top: 84px;
}

.ko-interface-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  gap: 14px;
}

.ko-interface-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 14px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.ko-interface-shot,
.ko-shot-strip button {
  appearance: none;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--base);
  color: inherit;
  cursor: pointer;
  overflow: hidden;
}

.ko-interface-shot {
  position: relative;
  min-height: 220px;
}

.ko-interface-shot img,
.ko-shot-strip img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ko-interface-shot-wide {
  aspect-ratio: 16 / 9;
}

.ko-interface-shot-phone {
  width: min(280px, 100%);
  aspect-ratio: 9 / 19.6;
  justify-self: center;
}

.ko-interface-shot:hover,
.ko-shot-strip button:hover,
.ko-interface-shot:focus-visible,
.ko-shot-strip button:focus-visible {
  border-color: var(--cyan);
  outline: none;
}

.ko-shot-kicker {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  font-size: var(--fs-xs);
  font-weight: 700;
}

.ko-interface-copy {
  display: grid;
  gap: 10px;
}

.ko-interface-copy h3 {
  margin: 0;
  font-size: clamp(1.2rem, 2.2vw, 1.7rem) !important;
  line-height: 1.14 !important;
}

.ko-interface-copy p {
  margin: 0;
  line-height: 1.58;
}

.ko-interface-copy .ko-button {
  justify-self: start;
  margin-top: 2px;
}

.ko-shot-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.ko-shot-strip button {
  aspect-ratio: 16 / 9;
}

.ko-shot-strip-phone button {
  aspect-ratio: 9 / 16;
}

.ko-shot-dialog {
  width: min(1180px, calc(100vw - 32px));
  max-width: 1180px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
}

.ko-shot-dialog::backdrop {
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(4px);
}

.ko-shot-dialog-card {
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 32px);
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .42);
  overflow: hidden;
}

.ko-shot-dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.ko-shot-dialog-head h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2.2vw, 1.8rem) !important;
}

.ko-shot-close {
  appearance: none;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--base);
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 700;
  cursor: pointer;
}

.ko-shot-close:hover,
.ko-shot-close:focus-visible {
  border-color: var(--cyan);
  outline: none;
}

.ko-shot-figure {
  display: grid;
  gap: 10px;
  min-height: 0;
  margin: 0;
}

.ko-shot-image-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  max-height: min(72vh, 760px);
  background: var(--base);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.ko-shot-image-frame img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(72vh, 760px);
  object-fit: contain;
}

.ko-shot-dialog[data-gallery="ios"] {
  width: min(860px, calc(100vw - 32px));
}

.ko-shot-dialog[data-gallery="ios"] .ko-shot-image-frame img {
  max-height: min(76vh, 800px);
}

#ko-shot-caption {
  color: var(--text-muted);
  -webkit-text-fill-color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.ko-shot-controls {
  display: grid;
  grid-template-columns: auto minmax(72px, 1fr) auto;
  align-items: center;
  gap: 10px;
}

#ko-shot-counter {
  justify-self: center;
  color: var(--text-dim);
  -webkit-text-fill-color: var(--text-dim);
  font-size: var(--fs-sm);
  font-weight: 700;
}

body.ko-shot-open {
  overflow: hidden;
}

@media (max-width: 980px) {
  .ko-interface-panels {
    grid-template-columns: 1fr;
  }

  .ko-interface-panel-ios {
    grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
    align-items: start;
  }

  .ko-interface-panel-ios .ko-shot-strip {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .ko-interface-panel,
  .ko-interface-panel-ios {
    grid-template-columns: 1fr;
  }

  .ko-interface-shot {
    min-height: 0;
  }

  .ko-interface-shot-phone {
    width: min(250px, 100%);
  }

  .ko-shot-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ko-shot-dialog {
    width: calc(100vw - 18px);
  }

  .ko-shot-dialog-card {
    max-height: calc(100dvh - 18px);
    padding: 10px;
  }

  .ko-shot-dialog-head {
    align-items: center;
  }

  .ko-shot-image-frame,
  .ko-shot-image-frame img {
    max-height: 62dvh;
  }

  .ko-shot-dialog[data-gallery="ios"] .ko-shot-image-frame img {
    max-height: 66dvh;
  }

  .ko-shot-controls {
    grid-template-columns: 1fr auto 1fr;
  }

  .ko-shot-controls .ko-button {
    width: auto;
  }
}

/* Screen recordings in the mobile gallery (2026-07-25). They sit above the
   still strip and share its phone-shaped rhythm; tapping plays inline. */
.ko-video-strip { margin-bottom: 10px; }
.ko-video-strip .ko-demo-video {
  width: 100%;
  max-width: 190px;
  border-radius: 14px;
  border: 1px solid var(--ko-border, #e2e5ea);
  background: #000;
  display: block;
  cursor: pointer;
  aspect-ratio: 1206 / 2622;
  object-fit: cover;
}

.ko-callmax-copy { flex: 1 1 340px; min-width: 0; }
.ko-callmax-copy h2 { margin: 4px 0 8px; }
.ko-callmax-copy p { margin: 0; }
.ko-callmax-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  flex: 0 1 auto;
}
.ko-callmax-actions .ko-button { white-space: nowrap; }
.ko-callmax-fine { font-size: .78rem; opacity: .72; max-width: 280px; }
@media (max-width: 720px) {
  
/* Second hero line — the four-part ownership statement reads as its own beat. */
.ko-home-lede-kicker { font-weight: 600; margin-top: -4px; }

/* Public voice/SMS banner (2026-07-25). Layout only — .ko-card supplies the
   surface, so it tracks the theme in light and dark without duplicating colour. */
.ko-callmax {
  display: flex;
  gap: 22px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.ko-callmax-copy { flex: 1 1 340px; min-width: 0; }
.ko-callmax-copy h2 { margin: 4px 0 8px; }
.ko-callmax-copy p { margin: 0; }
.ko-callmax-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ko-callmax-actions .ko-button { white-space: nowrap; }
.ko-callmax-fine { font-size: .78rem; opacity: .72; max-width: 300px; }
@media (max-width: 720px) {
  .ko-callmax-actions { width: 100%; }
  .ko-callmax-actions .ko-button { width: 100%; text-align: center; }
}

/* Release-note media rows (2026-07-25). Phone captures sit side by side and
   collapse to a single column on small screens. */
.rn-media { margin: 22px 0 26px; }
.rn-media-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
}
.rn-media-row video,
.rn-media-row img {
  width: 100%;
  max-width: 230px;
  border-radius: 14px;
  border: 1px solid rgba(128,128,128,0.28);
  background: #000;
  display: block;
}
.rn-media-stills img { background: transparent; }
.rn-media figcaption {
  margin-top: 12px;
  font-size: .88rem;
  opacity: .78;
  line-height: 1.5;
  text-align: center;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 640px) {
  .rn-media-row video, .rn-media-row img { max-width: 260px; }
}
