: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: #1f7ae0;
  --primary-strong: #1559b8;
  --primary-soft: #d3e8ff;
  --accent: #18b5a6;
  --accent-strong: #0e8e82;
  --accent-soft: #d1f2ee;

  --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; }
html, body{ height: 100%; }

body{
  margin: 0;
  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.22), transparent 62%),
    radial-gradient(800px 420px at 92% -10%, rgba(24, 181, 166, 0.2), transparent 60%),
    radial-gradient(520px 360px at 50% 12%, rgba(255, 214, 153, 0.35), transparent 65%),
    linear-gradient(180deg, #f7fbff 0%, var(--bg-base) 55%, #f0f6ff 100%);
}

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;
}

/* Header + nav */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 251, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

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

.brand{
  font-weight: 800;
  letter-spacing: 0.4px;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
  padding-left: 8px;
}

.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);
}

/* Main */
main{
  padding: 36px 0 70px;
}

/* Hero */
.hero-card{
  text-align: left;
  padding: 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 10px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.1;
}

.hero-card p{
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 16px;
}

.hero-stats{
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-soft);
  font-size: 14px;
}

/* 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);
}

.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;
}

/* 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;
  }
}
/* One-screen hero fix */
:root {
  --header-h: 64px;
}

.site-header {
  position: sticky;
  top: 0;
  height: var(--header-h);
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.hero-section {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  padding: 24px 0;
}

.hero-card {
  text-align: center;
  padding: 32px 24px !important;
}

.hero-card h1 {
  margin: 0 0 14px 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.2;
}

.hero-card > p {
  margin: 0 0 20px 0;
  font-size: clamp(16px, 1.8vw, 20px);
  color: var(--text-muted);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

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

.cta-buttons {
  margin: 20px 0;
}

/* Features compact */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature-tile {
  padding: 20px;
}

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

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

@media (min-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 899px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .hero-section {
    min-height: auto;
  }
}

/* Content pages */
.content-block {
  max-width: 800px;
  margin: 24px 0;
}

.content-block h2 {
  margin: 28px 0 12px 0;
  font-size: 24px;
}

.content-block h3 {
  margin: 20px 0 8px 0;
  font-size: 20px;
  color: var(--primary);
}

.content-block ul {
  margin: 12px 0;
  padding-left: 24px;
}

.content-block li {
  margin: 6px 0;
}

.placeholder-media {
  margin: 32px 0;
  padding: 24px;
  background: var(--surface-elevated);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-muted);
}

.placeholder-media code {
  background: var(--primary-soft);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Icon tiles for management philosophy */
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

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

.icon-tile {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: all 0.2s ease;
}

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

.icon-tile img {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.8;
}

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

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

@media (max-width: 768px) {
  .grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

/* Feature tile styling fix */
.feature-tile {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* 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;
}
