:root{
  --bg-base: #f2f7ff;
  --bg-accent: #e9f1ff;
  --surface: #ffffff;
  --surface-elevated: #f3f8ff;
  --border: #d7e3f2;
  --border-strong: #c2d4e8;

  --text: #0c1a2b;
  --text-muted: #42526b;
  --text-soft: #6f7f96;

  --primary: #669ED7;
  --primary-strong: #3f7fbf;
  --primary-soft: #dcecfb;
  --accent: #1F8A70;
  --accent-strong: #176b57;
  --accent-soft: #d6eee8;

  --radius: 18px;
  --radius-lg: 22px;
  --shadow: 0 18px 42px rgba(17, 33, 68, 0.14);
  --shadow-soft: 0 10px 26px rgba(17, 33, 68, 0.1);

  --container: 1120px;
}

*{ box-sizing: border-box; }

/* Fixed Header/Footer Layout - One Page View */
html {
  height: 100%;
  overflow: hidden;
}

body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "header"
    "main"
    "footer";
  font-family: "Manrope", "Avenir Next", "Segoe UI Variable", "Noto Sans", sans-serif;
  color: var(--text);
  line-height: 1.6;
  background:
    radial-gradient(900px 420px at 10% -8%, rgba(31, 122, 224, 0.24), transparent 62%),
    radial-gradient(800px 420px at 92% -10%, rgba(24, 181, 166, 0.45), transparent 60%),
    radial-gradient(520px 360px at 50% 12%, rgba(255, 214, 153, 0.55), transparent 65%),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.65) 55%, transparent 75%),
    image-set(url("/img/system-network.webp") type("image/webp"), url("/img/system-network.png") type("image/png")),
    linear-gradient(180deg, #f7fbff 0%, var(--bg-base) 55%, #f0f6ff 100%);
  background-size: 900px 420px, 800px 420px, 520px 360px, auto, cover, auto;
  background-repeat: no-repeat;
  background-position: 10% -8%, 92% -10%, 50% 12%, center, center, center;
  background-blend-mode: normal, normal, normal, screen, normal, normal;
}

.site-header {
  grid-area: header;
  position: relative;
  z-index: 200;
  overflow: visible;
  background: rgba(247, 251, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

main {
  grid-area: main;
  min-height: 0;           /* Critical: prevents grid overflow */
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.site-footer,
.footer {
  grid-area: footer;
  flex-shrink: 0;          /* Prevent footer from shrinking */
}

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

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

.section{
  padding: 32px 0;
}

.section-header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-title{
  margin: 0;
  font-size: clamp(22px, 2.5vw, 32px);
}

.section-subtitle{
  margin: 6px 0 0;
  color: var(--text-muted);
  max-width: 700px;
}

.back-link{
  display: inline-block;
  margin-bottom: 14px;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
}

.back-link:hover{
  color: var(--text);
}

.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 26px;
}

.card-soft{
  background: var(--surface-elevated);
  border-color: #e5edf6;
}

.grid{
  display: grid;
  gap: 18px;
}

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

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

.grid-auto{
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.two-col{
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
  gap: 24px;
  align-items: start;
}

/* System page compact layout */
.system-compact .card{
  padding: 20px;
}

.system-compact.section{
  padding: 24px 0;
}

.system-compact .section-title{
  font-size: clamp(20px, 2.2vw, 28px);
}

.system-compact .section-subtitle{
  font-size: 15px;
  margin-top: 4px;
}

.system-compact .feature-tile{
  padding: 16px;
}

.system-compact .feature-tile h3{
  margin: 0 0 6px;
  font-size: 16px;
}

.system-compact .feature-tile p{
  font-size: 14px;
}

.system-compact .grid{
  gap: 14px;
}

.system-compact .two-col{
  gap: 18px;
}

.system-compact .screenshot-card{
  padding: 14px;
}

.system-compact .form-card{
  padding: 6px;
}

.system-compact form{
  gap: 6px;
}

.system-compact form p{
  gap: 3px;
}

.system-compact input,
.system-compact textarea,
.system-compact select{
  padding: 7px 9px;
  font-size: 12.5px;
}

.system-compact textarea{
  min-height: 50px;
}

.system-compact .form-card .btn{
  padding: 8px 12px;
  font-size: 13px;
}

.system-compact .form-card .section-title{
  font-size: 18px;
  margin-bottom: 4px;
}

.system-compact .form-card .section-subtitle{
  font-size: 13px;
  margin: 4px 0 0;
}

/* Navigation */

.nav-wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  overflow: visible;
}

.brand{
  font-weight: 800;
  letter-spacing: 0.4px;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}

.nav-links{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links a{
  display: inline-block;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 650;
  padding: 8px 12px;
  border-radius: 12px;
  transition: background 0.18s ease, color 0.18s ease, transform 0.06s ease;
}

.nav-links a:hover{
  background: rgba(43, 110, 219, 0.12);
  color: var(--text);
}

.nav-links a:active{
  transform: translateY(1px);
}



/* Hero Section - compact for single viewport */
.hero-section{
  flex: 1;
  display: flex;
  align-items: center;
  padding: 48px 0 24px;
}

.hero-card{
  text-align: center;
  padding: 48px 36px;
  background:
    linear-gradient(135deg, rgba(31, 122, 224, 0.12), rgba(24, 181, 166, 0.12)),
    var(--surface);
}

.hero-card h1{
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
}

.hero-card p{
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 17px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stats{
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  color: var(--text-soft);
  font-size: 14px;
  margin-top: 24px;
}

/* CTA Section - compact */
.cta-section{
  padding: 24px 0 48px;
}

.cta-row{
  text-align: center;
  padding: 32px 28px;
}

.cta-row .section-title{
  margin: 0 0 8px;
}

.cta-row .section-subtitle{
  margin: 0 0 24px;
}

.cta-row .cta-buttons{
  justify-content: center;
}

/* Buttons */
.cta-buttons{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.18s ease, filter 0.18s ease;
  color: #fff;
  background: linear-gradient(135deg, #1f7ae0 0%, #1559b8 100%);
  box-shadow: 0 12px 22px rgba(31, 122, 224, 0.32);
}

.btn-primary{
  background: linear-gradient(135deg, #1f7ae0 0%, #1559b8 100%);
  box-shadow: 0 12px 22px rgba(31, 122, 224, 0.32);
}

.btn-primary:hover{
  filter: brightness(1.05);
}

.btn-secondary{
  color: var(--accent-strong);
  border-color: rgba(24, 181, 166, 0.45);
  background: #fff;
}

.btn-secondary:hover{
  border-color: var(--accent);
  box-shadow: 0 10px 18px rgba(24, 181, 166, 0.16);
}

/* Feature tiles */
.feature-tile{
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.feature-tile h3{
  margin: 0 0 8px;
}

.feature-tile p{
  margin: 0;
  color: var(--text-muted);
}

/* Icon tiles */
.icon-card-link{
  text-decoration: none;
  color: inherit;
  display: block;
}

.icon-card-link:focus-visible{
  outline: 3px solid rgba(31, 122, 224, 0.3);
  outline-offset: 4px;
  border-radius: 18px;
}

.icon-tile{
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  padding: 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.icon-tile img{
  width: 40px;
  height: 40px;
  color: var(--accent);
}

.icon-tile h4{
  margin: 0;
}

.icon-tile p{
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* Kaizen detail */
.kaizen-definition h2{
  margin-top: 0;
}

.kaizen-flow-line{
  margin: 0 0 14px;
  color: var(--text-muted);
  font-weight: 600;
}

.kaizen-flow{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.kaizen-step{
  flex: 1 1 160px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
}

.kaizen-step h4{
  margin: 0 0 6px;
  font-size: 15px;
}

.kaizen-step p{
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.kaizen-workflow{
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--text-muted);
}

.kaizen-variant.is-hidden{
  display: none;
}

.example-grid{
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.example-grid--before-after{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.example-card{
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow-soft);
  text-align: left;
  color: inherit;
  font: inherit;
}

button.example-card{
  cursor: pointer;
}

.example-card img{
  width: 100%;
  border-radius: 12px;
  background: var(--surface-elevated);
  min-height: 140px;
  object-fit: cover;
}

.example-card h4{
  margin: 12px 0 6px;
}

.example-card p{
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* Kaizen compact layout for single-screen view */
.kaizen-compact{
  padding: 12px 0;
}

.kaizen-card{
  padding: 16px;
}

.kaizen-compact .section-title{
  font-size: clamp(20px, 2.1vw, 28px);
}

.kaizen-compact .section-subtitle{
  font-size: 13px;
  margin-top: 4px;
}

.kaizen-compact .grid{
  gap: 10px;
}

.kaizen-compact .kaizen-definition{
  padding: 14px;
}

.kaizen-compact .kaizen-flow-line{
  margin-bottom: 8px;
  font-size: 12px;
}

.kaizen-compact .kaizen-step{
  padding: 8px 10px;
}

.kaizen-compact .kaizen-step h4{
  font-size: 13px;
}

.kaizen-compact .kaizen-step p{
  font-size: 11.5px;
}

.kaizen-compact .kaizen-workflow{
  margin-top: 6px;
  font-size: 12.5px;
}

.kaizen-compact .kaizen-block{
  margin-top: 8px;
}

.kaizen-compact .example-grid{
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.kaizen-compact .example-card{
  padding: 8px;
}

.kaizen-compact .example-card img{
  min-height: 90px;
}

.kaizen-compact .cta-buttons{
  margin-top: 8px;
}

.kaizen-compact .kaizen-bottom{
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
}

.kaizen-compact .kaizen-top img{
  width: 34px;
  height: 34px;
}

.kaizen-compact .example-card h4{
  margin: 8px 0 4px;
  font-size: 12.5px;
}

.kaizen-compact .example-card p{
  font-size: 11.5px;
}

.kaizen-compact .kaizen-definition h2{
  font-size: 16px;
}

.kaizen-compact .kaizen-definition{
  gap: 8px;
}

.modal{
  position: fixed;
  inset: 0;
  background: rgba(12, 26, 43, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
}

.modal.is-open{
  display: flex;
}

.modal-content{
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  width: min(720px, 100%);
  box-shadow: var(--shadow);
  position: relative;
}

.modal-content img{
  width: 100%;
  border-radius: 12px;
  background: var(--surface-elevated);
}

.modal-close{
  position: absolute;
  top: 10px;
  right: 14px;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-close:hover{
  color: var(--text);
}

body.modal-open{
  overflow: hidden;
}

/* Lean section compact on system page */
.system-lean .grid-auto{
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.system-lean{
  margin-top: -50px;
}

.system-lean .icon-tile{
  padding: 14px;
  gap: 10px;
}

.system-lean .icon-tile img{
  width: 34px;
  height: 34px;
}

.system-lean .icon-tile h4{
  font-size: 14px;
}

.system-lean .icon-tile p{
  font-size: 12px;
}

/* System page */
.module-grid .feature-tile{
  background: var(--surface-elevated);
}

.screenshot-card{
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

/* CTA row */
.cta-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.cta-row .cta-buttons{
  justify-content: flex-start;
}

/* Forms */
form{
  display: grid;
  gap: 14px;
}

form p{
  margin: 0;
  display: grid;
  gap: 8px;
}

label{
  display: block;
  font-weight: 650;
  margin-bottom: 6px;
}

input, textarea, select{
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus, textarea:focus, select:focus{
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 122, 224, 0.2);
}

.form-card .btn{
  width: 100%;
}

/* Toast */
.toast{
  position: fixed;
  top: 90px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  color: var(--text);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 120;
}

.toast-success{
  border-color: rgba(24, 181, 166, 0.45);
  background: linear-gradient(120deg, rgba(24, 181, 166, 0.12), rgba(255, 255, 255, 0.95));
}

.toast.is-visible{
  opacity: 1;
  transform: translateY(0);
}

.toast-close{
  border: none;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
}

/* ============================================
   RESPONSIVE / MOBILE-FIRST STYLES
   Breakpoints:
   - Mobile: 0–767px (default)
   - Tablet: 768–1023px
   - Desktop: 1024px+
   ============================================ */

/* Base mobile-first setup */
html {
  font-size: 16px; /* Ensure readable base font size */
}

body {
  overflow-x: hidden; /* Prevent horizontal scroll */
  -webkit-text-size-adjust: 100%; /* Prevent font scaling in landscape */
}

/* Responsive images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Touch-friendly interactive elements */
a, button, .btn, input, textarea, select {
  min-height: 44px; /* Minimum touch target */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

input, textarea, select {
  display: block;
  width: 100%;
}

/* Mobile navigation */
.mobile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  z-index: 101;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: background 0.3s ease;
}

.mobile-menu-toggle span::before,
.mobile-menu-toggle span::after {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  position: absolute;
  transition: transform 0.3s ease;
}

.mobile-menu-toggle span::before {
  top: -7px;
}

.mobile-menu-toggle span::after {
  bottom: -7px;
}

.mobile-menu-toggle.is-active span {
  background: transparent;
}

.mobile-menu-toggle.is-active span::before {
  transform: rotate(45deg);
  top: 0;
}

.mobile-menu-toggle.is-active span::after {
  transform: rotate(-45deg);
  bottom: 0;
}

/* Mobile: 0-767px (default styles) */
.container {
  padding: 0 16px;
}

.nav-wrap {
  position: relative;
}

.nav-links {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 0 0 16px 16px;
  box-shadow: var(--shadow);
  flex-direction: column;
  gap: 0;
  padding: 12px 0;
  margin: 8px 16px 0;
  z-index: 100;
}

.nav-links.is-open {
  display: flex;
}

.nav-links li {
  border-bottom: 1px solid var(--border);
}

.nav-links li:last-child {
  border-bottom: none;
}

.nav-links a {
  width: 100%;
  padding: 14px 20px;
  border-radius: 0;
  justify-content: flex-start;
}

/* Hero section mobile */
.hero-section{
  padding: 32px 0 20px;
}

.hero-card {
  padding: 32px 24px;
}

.hero-card h1 {
  font-size: 32px;
}

.hero-card p {
  font-size: 15px;
}

.hero-stats {
  font-size: 13px;
  gap: 14px;
}

.cta-buttons {
  flex-direction: column;
  width: 100%;
}

.cta-buttons .btn {
  width: 100%;
}

/* CTA section mobile */
.cta-section{
  padding: 20px 0 32px;
}

.cta-row{
  padding: 24px 20px;
}

/* Grid layouts mobile */
.grid-2,
.grid-3,
.grid-auto {
  grid-template-columns: 1fr;
  gap: 14px;
}

.two-col {
  grid-template-columns: 1fr;
  gap: 16px;
}

/* Section spacing mobile */
.section {
  padding: 24px 0;
}

.section-title {
  font-size: 22px;
}

.section-subtitle {
  font-size: 14px;
}

/* Cards mobile */
.card {
  padding: 20px;
  border-radius: 16px;
}

/* CTA row mobile */
.cta-row {
  flex-direction: column;
  align-items: flex-start;
}

.cta-row .cta-buttons {
  width: 100%;
}

/* Feature tiles mobile */
.feature-tile {
  padding: 16px;
}

.feature-tile h3 {
  font-size: 18px;
}

.feature-tile p {
  font-size: 14px;
}

/* Icon tiles mobile */
.icon-tile {
  padding: 14px;
}

/* Forms mobile */
.form-card {
  padding: 20px;
}

/* Toast mobile */
.toast {
  right: 12px;
  left: 12px;
  top: 80px;
}

/* Modal mobile */
.modal {
  padding: 16px;
}

.modal-content {
  padding: 16px;
}

/* Footer mobile (if exists) */
footer {
  padding: 24px 0;
}

/* System page compact adjustments */
.system-lean .grid-auto {
  grid-template-columns: 1fr;
}

.system-compact .two-col {
  grid-template-columns: 1fr;
}

/* ============================================
   TABLET: 768px - 1023px
   ============================================ */
@media (min-width: 768px) {
  .container {
    padding: 0 24px;
  }

  /* Show desktop nav, hide mobile toggle */
  .mobile-menu-toggle {
    display: none;
  }

  .nav-links {
    display: flex !important;
    position: static;
    flex-direction: row;
    background: transparent;
    border: none;
    box-shadow: none;
    margin: 0;
    padding: 0;
    gap: 10px;
  }

  .nav-links li {
    border-bottom: none;
  }

  .nav-links a {
    width: auto;
    padding: 8px 12px;
    border-radius: 12px;
  }

  /* Hero tablet */
  .hero-section{
    padding: 48px 0 32px;
  }

  .hero-card {
    padding: 42px 36px;
  }

  .hero-card h1 {
    font-size: 42px;
  }

  .hero-card p {
    font-size: 17px;
  }

  .hero-stats{
    gap: 18px;
  }

  /* CTA section tablet */
  .cta-section{
    padding: 32px 0 48px;
  }

  .cta-row{
    padding: 32px 28px;
  }

  /* Grid layouts tablet */
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  /* Section spacing tablet */
  .section {
    padding: 28px 0;
  }

  .section-title {
    font-size: 26px;
  }

  /* CTA buttons tablet */
  .cta-buttons {
    flex-direction: row;
    width: auto;
  }

  .cta-buttons .btn {
    width: auto;
  }

  /* CTA row tablet */
  .cta-row {
    flex-direction: row;
    align-items: center;
  }

  /* System lean */
  .system-lean .grid-auto {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Two column layout */
  .two-col {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   DESKTOP: 1024px+
   ============================================ */
@media (min-width: 1024px) {
  /* Hero desktop */
  .hero-section{
    padding: 64px 0 40px;
  }

  .hero-card {
    padding: 54px 48px;
  }

  .hero-card h1 {
    font-size: 52px;
  }

  .hero-card p{
    font-size: 18px;
  }

  .hero-stats{
    gap: 22px;
    font-size: 15px;
  }

  /* CTA section desktop */
  .cta-section{
    padding: 40px 0 64px;
  }

  .cta-row{
    padding: 36px 32px;
  }

  /* Grid layouts desktop */
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  /* Section spacing desktop */
  .section {
    padding: 32px 0;
  }

  .section-title {
    font-size: 32px;
  }

  /* Two column with specific ratio */
  .two-col {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
    gap: 24px;
  }

  /* System lean desktop */
  .system-lean .grid-auto {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Kaizen examples */
  .example-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

/* ============================================
   ACCESSIBILITY & PERFORMANCE
   ============================================ */

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border: #000;
    --border-strong: #000;
  }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}


.toast-close:hover{
  color: var(--text);
}

/* Footer */
.footer{
  background: rgba(248, 251, 255, 0.88);
  border-top: 1px solid var(--border);
  padding: 22px 0;
  color: var(--text-muted);
  text-align: center;
  position: relative;
  z-index: 10;
}

/* Responsive */
@media (max-width: 980px){
  .grid-3{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-col{
    grid-template-columns: 1fr;
  }

  .system-lean .grid-auto{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .example-grid--before-after{
    grid-template-columns: 1fr;
  }

  .kaizen-compact .example-grid{
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 720px){
  .nav-wrap{
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-card{
    padding: 24px;
  }

  .grid-2, .grid-3{
    grid-template-columns: 1fr;
  }

  .system-lean .grid-auto{
    grid-template-columns: 1fr;
  }

  .kaizen-flow{
    flex-direction: column;
  }
}

/* Back link styling */
.back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--primary);
  text-decoration: none;
  font-size: 15px;
}

.back-link:hover {
  text-decoration: underline;
}

/* Philosophy tiles with emoji icons */
.philosophy-tile {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: all 0.2s ease;
}

.philosophy-tile:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.philosophy-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.philosophy-tile h3,
.philosophy-tile h4 {
  font-size: 16px;
  font-weight: 700;
  margin: 8px 0;
  color: var(--primary);
}

.philosophy-tile p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* Compact one-screen layout for systems page */
.systems-compact .section {
  padding: 12px 0;
}

.systems-compact h1 {
  font-size: 24px;
  margin: 8px 0 6px 0;
}

.systems-compact .section-subtitle {
  font-size: 13px;
  margin-bottom: 12px;
}

.systems-compact .section-header {
  margin-bottom: 12px;
}

.systems-compact .feature-tile {
  padding: 10px;
}

.systems-compact .feature-tile h3 {
  font-size: 14px;
  margin: 0 0 3px 0;
}

.systems-compact .feature-tile p {
  font-size: 12px;
  line-height: 1.4;
}

.systems-compact .philosophy-tile {
  padding: 8px;
}

.systems-compact .philosophy-icon {
  font-size: 24px;
  margin-bottom: 2px;
}

.systems-compact .philosophy-tile h3,
.systems-compact .philosophy-tile h4 {
  font-size: 12px;
  margin: 3px 0 2px 0;
}

.systems-compact .philosophy-tile p {
  font-size: 11px;
  line-height: 1.3;
}

.systems-compact .grid-auto {
  gap: 8px;
}

.systems-compact .grid-3 {
  gap: 8px;
}

.systems-compact .cta-row {
  padding: 12px;
  margin-top: 8px;
}

.systems-compact .btn {
  padding: 6px 12px;
  font-size: 13px;
}

/* Systems tabs and accordion */
.systems-tabs {
  margin-top: 2rem;
}

.systems-tablist {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.systems-tab {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.systems-tab:hover,
.systems-tab:focus {
  border-color: var(--primary);
  color: var(--primary);
}

.systems-tab.is-active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

.systems-panel {
  display: block;
}

.systems-panel[hidden] {
  display: none;
}

.systems-panel-title {
  margin: 0 0 0.75rem;
  font-size: 1.3rem;
  font-weight: 600;
}

.systems-panel-intro {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.systems-panel-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text);
}

.systems-panel-cta .cta-buttons {
  margin-top: 1rem;
}

.systems-accordion {
  display: grid;
  gap: 0.75rem;
}

.systems-accordion details {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  background: #fff;
}

.systems-accordion summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.systems-accordion summary::-webkit-details-marker {
  display: none;
}

.systems-accordion summary::after {
  content: "+";
  float: right;
  color: var(--text-muted);
  font-weight: 700;
}

.systems-accordion details[open] summary::after {
  content: "–";
}

.systems-accordion ul {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text);
}

@media (max-width: 720px) {
  .systems-tablist {
    flex-direction: column;
    align-items: stretch;
  }

  .systems-tab {
    width: 100%;
    justify-content: center;
  }
}



/* Philosophy tile as clickable link */
a.philosophy-tile {
  display: block;
  cursor: pointer;
}

a.philosophy-tile:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px);
}

/* Philosophy-driven Hero Typography */
.hero-philosophy .hero-tagline {
  margin: 0 0 1rem;
  color: var(--primary-strong);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-philosophy {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  padding: 4rem 1.5rem;
}

.hero-philosophy .hero-headline {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 2rem 0;
  color: var(--text-primary);
}

.hero-philosophy .hero-subheadline {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.6;
  margin: 0 0 2rem 0;
  color: var(--text-primary);
}

.hero-philosophy .hero-manifest {
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 2rem 0;
  color: var(--text-muted);
}

.hero-philosophy .hero-closing {
  font-size: 0.875rem;
  font-style: italic;
  font-weight: 300;
  line-height: 1.6;
  margin: 0;
  color: var(--text-muted);
  opacity: 0.85;
}

@media (max-width: 768px) {
  .hero-philosophy {
    padding: 3rem 1rem;
  }
  
  .hero-philosophy .hero-headline {
    font-size: 1.75rem;
  }
  
  .hero-philosophy .hero-subheadline {
    font-size: 1.125rem;
  }
  
  .hero-philosophy .hero-manifest {
    font-size: 0.9375rem;
  }
  
  .hero-philosophy .hero-closing {
    font-size: 0.8125rem;
  }
}

@media (max-width: 480px) {
  .hero-philosophy .hero-headline {
    font-size: 1.5rem;
  }
  
  .hero-philosophy .hero-subheadline {
    font-size: 1rem;
  }
}



/* Core Elements Section */
.core-elements-section {
  padding: 4rem 0;
  background: linear-gradient(to bottom, transparent, var(--surface-elevated) 30%, var(--surface-elevated) 70%, transparent);
}

.core-elements-section .section-title {
  text-align: center;
  margin: 0 0 1rem;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 700;
  color: var(--text);
}

.section-intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.core-elements-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.core-element-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  transition: all 0.25s ease;
}

.core-element-card:hover {
  border-color: var(--primary-soft);
  box-shadow: 0 6px 20px rgba(31, 122, 224, 0.12);
  transform: translateY(-2px);
}

.core-element-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

.core-element-card p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.core-elements-closing {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  font-size: 0.9375rem;
  font-style: italic;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-soft);
  opacity: 0.9;
}

/* Responsive: Tablet (2 columns) */
@media (max-width: 1024px) {
  .core-elements-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
  
  .core-elements-section {
    padding: 3rem 0;
  }
}

/* Responsive: Mobile (1 column) */
@media (max-width: 768px) {
  .core-elements-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .core-elements-section {
    padding: 2.5rem 0;
  }
  
  .section-intro {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
  
  .core-element-card {
    padding: 1.5rem 1.25rem;
  }
  
  .core-element-card h3 {
    font-size: 1.0625rem;
  }
  
  .core-element-card p {
    font-size: 0.875rem;
  }
}

/* Ensure no horizontal scrolling on smallest screens */
@media (max-width: 480px) {
  .core-elements-section .section-title {
    font-size: 24px;
  }
  
  .core-element-card {
    padding: 1.25rem 1rem;
  }
}

/* Language Switcher - Text Only */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.lang-link {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.25rem 0.375rem;
  border-radius: 4px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.lang-link:hover {
  color: var(--text);
  background-color: var(--primary-soft);
}

.lang-link:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.lang-link.active {
  color: var(--text);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.lang-divider {
  color: var(--border-strong);
  user-select: none;
}

/* Brand logo sizing */
.brand-logo {
  max-height: 36px;
  width: auto;
  display: block;
}

@media (max-width: 768px) {
  .brand-logo {
    max-height: 32px;
  }
}


/* ========================================
   ASOW Integration Blocks (Shell + Core)
   ======================================== */

.asow-principle-block {
    margin-top: 16px;
}

.asow-principle-card {
    padding: 24px;
}

.asow-principle-card .section-title {
    margin-top: 0;
}

.asow-principle-section + .asow-principle-section {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.asow-principle-list {
    margin: 12px 0 0;
    padding-left: 18px;
    color: var(--text-muted);
}

.asow-principle-list li {
    margin-bottom: 8px;
}

.asow-instrument-grid {
    margin-top: 12px;
}

.asow-instrument-card h4 {
    margin: 0 0 6px;
}

.asow-fit-grid {
    margin-top: 12px;
    gap: 16px;
}

.asow-fit-column {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.asow-fit-column h4 {
    margin-top: 0;
}

.asow-principle-cta {
    background: var(--surface-elevated);
    border-radius: var(--radius);
    padding: 18px;
}

.asow-principle-cta .cta-buttons {
    margin-top: 12px;
}

.asow-principle-block .asow-note {
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Language Shell Styling */
.lang-shell {
    background: var(--surface-elevated);
    border-left: 4px solid var(--primary);
    padding: 20px;
    margin-bottom: 32px;
    border-radius: var(--radius);
}

.lang-shell h1 {
    margin-top: 0;
}

.lang-shell .lang-note {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 16px;
}

@media (max-width: 768px) {
    .asow-fit-grid {
        grid-template-columns: 1fr;
    }
    
    .lang-shell {
        padding: 16px;
    }
}

/* ===================================
   PDCA Navigation
   =================================== */

.pdca-nav {
    align-items: center;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pdca-nav .dropdown,
.pdca-nav .pdca-dd {
    display: block;
}

.pdca-item {
    position: relative;
}

.pdca-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    padding: 0.55rem 1rem;
    text-decoration: none;
    cursor: pointer;
    border-radius: 14px;
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.pdca-link:hover,
.pdca-link:focus,
.pdca-item:focus-within > .pdca-link {
    background-color: rgba(31, 122, 224, 0.1);
    box-shadow: inset 0 0 0 1px rgba(31, 122, 224, 0.12);
}

.nav-main {
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text);
    transition: color 0.2s;
}

.pdca-link:hover .nav-main,
.pdca-link:focus .nav-main,
.pdca-item:focus-within > .pdca-link .nav-main {
    color: var(--primary);
}

.nav-sub {
    font-size: 0.65rem;
    font-weight: 400;
    color: transparent;
    letter-spacing: 0.02em;
    max-height: 0;
    overflow: hidden;
    transition: color 0.2s, max-height 0.2s;
}

.pdca-link:hover .nav-sub,
.pdca-link:focus .nav-sub,
.pdca-item:focus-within .nav-sub {
    color: var(--primary);
    max-height: 1.2em;
}

.pdca-dd {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 240px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(194, 212, 232, 0.95);
    border-radius: 12px;
    box-shadow: 0 18px 42px rgba(12, 26, 43, 0.14), 0 4px 12px rgba(12, 26, 43, 0.08);
    padding: 0.55rem;
    z-index: 9999;
    list-style: none;
    margin: 0;
    backdrop-filter: blur(14px);
    /* Animation */
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.pdca-dd::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 28px;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.98);
    border-left: 1px solid rgba(194, 212, 232, 0.95);
    border-top: 1px solid rgba(194, 212, 232, 0.95);
    transform: rotate(45deg);
}

.pdca-item:hover > .pdca-dd,
.pdca-item:focus-within > .pdca-dd {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.pdca-dd li {
    margin: 0;
    padding: 0;
}

.pdca-dd a {
    display: block;
    padding: 0.55rem 0.75rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 560;
    line-height: 1.35;
    transition: background-color 0.15s, color 0.15s, padding-left 0.15s;
    white-space: nowrap;
    border-left: 3px solid transparent;
    border-radius: 8px;
}

.pdca-dd a:hover,
.pdca-dd a:focus {
    color: var(--primary);
    padding-left: 0.95rem;
    border-left-color: var(--primary);
    background: rgba(31, 122, 224, 0.08);
}

.dropdown-section-label {
    padding: 0.55rem 0.75rem 0.25rem;
    font-size: 0.68rem;
    font-weight: 750;
    color: var(--text-soft);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

.dropdown-section-label:first-child {
    margin-top: 0;
}

@media (max-width: 820px) {
    .pdca-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .pdca-item {
        width: 100%;
    }

    .pdca-link {
        align-items: flex-start;
        width: 100%;
        padding: 0.875rem 1rem;
        border-radius: 10px;
    }

    .nav-main {
        font-size: 1rem;
    }

    .nav-sub {
        font-size: 0.75rem;
    }

    .pdca-dd {
        position: static;
        opacity: 0;
        transform: none;
        pointer-events: none;
        max-height: 0;
        overflow: hidden;
        box-shadow: none;
        border: none;
        border-left: 2px solid rgba(31, 122, 224, 0.18);
        border-radius: 0;
        margin-left: 1rem;
        padding: 0;
        background: rgba(31, 122, 224, 0.04);
        backdrop-filter: none;
        transition: opacity 0.18s ease, max-height 0.25s ease, padding 0.18s ease;
    }

    .pdca-dd::before {
        display: none;
    }

    .pdca-item.open > .pdca-dd {
        opacity: 1;
        pointer-events: auto;
        max-height: 400px;
        padding: 0.25rem 0;
    }

    .pdca-dd a {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        border-left: none;
    }
    .pdca-dd a:hover {
        padding-left: 1.2rem;
    }
}

@media (min-width: 821px) and (max-width: 1024px) {
    .pdca-link {
        padding: 0.625rem 1rem;
    }

    .nav-main {
        font-size: 0.875rem;
    }

    .nav-sub {
        font-size: 0.65rem;
    }
}
















/* Breadcrumb navigation */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span.sep { margin: 0 0.4rem; }

/* ============================================
   Homepage — Features Section
   ============================================ */

.features-section {
  background: linear-gradient(to bottom, transparent, var(--surface-elevated) 20%, var(--surface-elevated) 80%, transparent);
}

.features-cta {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* ============================================
   Contact page layout utilities
   ============================================ */

.contact-grid {
  gap: 2rem;
  margin-top: 2rem;
  align-items: start;
}

.col-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.card--center {
  text-align: center;
  padding: 2rem;
}

.card--form {
  padding: 2rem;
}

.card--info {
  padding: 1.5rem;
}

.card--what {
  margin-top: 1.5rem;
  padding: 2rem;
}

.btn-full {
  width: 100%;
  min-height: 44px;
}

.contact-direct {
  margin: 1rem 0 0;
  display: grid;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.contact-what-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.contact-what-grid strong {
  display: block;
  margin-bottom: 0.25rem;
}

.contact-what-grid span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .contact-what-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.card--center h2,
.card--form h2 {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
}

.card--center h2 { font-size: 1.2rem; }

.card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.card-info-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.contact-email-link {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
}

.contact-status-msg {
  display: none;
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
}
