/* KONAI v27 — single source of truth for page rails, section rhythm and graphic readability. */
:root{
  --v27-header-h:72px;
  --v27-edge:clamp(18px,2.25vw,34px);
  --v27-dock-safe:0px;
  --v27-section-gap:12px;
  --v27-content-max:1480px;
  --v27-grid-gap:clamp(18px,2.4vw,34px);
  --v27-card-pad:clamp(18px,2vw,28px);
  --v27-soft:#c9d9e8;
  --v27-soft-strong:#dce8f3;
  --v27-tiny:clamp(.72rem,.18vw + .66rem,.82rem);
  --v27-small:clamp(.82rem,.22vw + .73rem,.94rem);
}

html,body{max-width:100%!important;overflow-x:clip!important}
body.lustro-inspired{background:#06101d!important}

/* One shared safe canvas. The right edge stops before the floating chapter dock. */
.lustro-inspired main>section{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:100%!important;
  margin:0 0 var(--v27-section-gap)!important;
  padding-left:var(--v27-edge)!important;
  padding-right:calc(var(--v27-edge) + var(--v27-dock-safe))!important;
  position:relative!important;
}
.lustro-inspired main>section:last-child{margin-bottom:0!important}
.lustro-inspired main>section>.v27-section-inner{
  width:100%!important;
  max-width:var(--v27-content-max)!important;
  min-width:0!important;
  margin:0 auto!important;
  transform-origin:top center!important;
}
.lustro-inspired main>section>.v27-section-inner>:where(.container,.narrow),
.lustro-inspired main>section :where(.container,.narrow){
  width:100%!important;
  max-width:100%!important;
  margin-left:auto!important;
  margin-right:auto!important;
  min-width:0!important;
  box-sizing:border-box!important;
}

/* Header uses the same left rail and cannot be pushed outside the viewport. */
.lustro-inspired .site-header{left:0!important;right:0!important;width:100%!important;max-width:100%!important;margin:0!important;transform:none!important}
.lustro-inspired .header-inner{
  width:calc(100% - (2 * var(--v27-edge)))!important;
  max-width:var(--v27-content-max)!important;
  margin:0 auto!important;
  padding-left:0!important;padding-right:0!important;
}

/* Consistent section heading geometry everywhere. */
.lustro-inspired .section-heading{
  display:grid!important;
  grid-template-columns:clamp(150px,14vw,190px) minmax(0,1fr)!important;
  align-items:start!important;
  gap:clamp(18px,2.6vw,38px)!important;
  width:100%!important;
  max-width:100%!important;
  padding:0!important;
  margin:0 0 clamp(16px,2.2vh,26px)!important;
}
.lustro-inspired .section-heading>div,
.lustro-inspired .section-heading>h2{margin-top:0!important;padding-top:0!important}
.lustro-inspired .section-heading .section-index{margin:0!important}
.lustro-inspired .section-heading .section-note{margin:.45rem 0 0!important}
.lustro-inspired .section-heading h2{margin:0!important;line-height:.98!important}

/* Shared spacing/alignment for the principal two-column compositions. */
.lustro-inspired :where(.problem-intro,.trust-stack,.bridge-shell,.story-layout,.pilot-layout,.audience-hero-layout,.risk-layout,.solution-grid,.workflow-shell,.contract-layout,.benefits-layout,.founding-grid){
  gap:var(--v27-grid-gap)!important;
  min-width:0!important;
}
.lustro-inspired :where(.problem-intro,.trust-stack,.bridge-shell,.story-layout,.audience-hero-layout,.risk-layout,.workflow-shell){align-items:stretch!important}

/* No truncation; all text must stay inside its own component. */
.lustro-inspired main :where(h1,h2,h3,h4,h5,h6,p,li,span,small,b,strong,em,a,button){
  min-width:0!important;
  max-width:100%!important;
  overflow-wrap:break-word!important;
  word-break:normal!important;
  text-overflow:clip!important;
  -webkit-line-clamp:unset!important;
}
.lustro-inspired main :where(p,li,h1,h2,h3,h4,h5,h6,small,b,strong,em){white-space:normal!important}

/* A minimum readable floor for small labels embedded in visual systems. */
.lustro-inspired main :where(
  .trust-endpoint,.gap-label,.gap-key span,.gap-node small,.gap-node span,
  .risk-scene__head span,.risk-scene__head b,.risk-scene__focus small,.risk-scene__tags span,
  .workflow-stage-top span,.workflow-stage-top b,.workflow-stage-result small,
  .bridge-lattice__side>small,.bridge-lattice__hub>small,.bridge-lattice__tokens span,
  .history-mode span,.history-stops,.history-notes,.hero-readout small,
  .identity-stack-foot span,.identity-photo-label span,.visual-toolbar>span,.visual-toolbar button
){
  font-size:var(--v27-tiny)!important;
  line-height:1.28!important;
  color:var(--v27-soft)!important;
  letter-spacing:.08em!important;
}
.lustro-inspired main :where(
  .gap-node small,.risk-scene__focus p,.workflow-stage-result b,
  .bridge-lattice__side>span,.bridge-lattice__hub>b,.history-mode b,.hero-readout b
){font-size:var(--v27-small)!important;line-height:1.35!important}

/* Trust Layer: smaller graphic, larger labels, more room for the explanatory cards. */
.lustro-inspired #protocol .trust-stack{
  grid-template-columns:minmax(310px,.78fr) minmax(500px,1.22fr)!important;
  gap:clamp(22px,2.7vw,38px)!important;
  align-items:stretch!important;
}
.lustro-inspired #protocol .trust-visual,
.lustro-inspired #protocol .trust-steps{min-height:430px!important;height:430px!important;max-height:430px!important}
.lustro-inspired #protocol .trust-visual{border-radius:24px!important}
.lustro-inspired #protocol .trust-word{
  width:clamp(150px,14vw,178px)!important;
  height:clamp(150px,14vw,178px)!important;
  border-radius:30px!important;
}
.lustro-inspired #protocol .trust-word small{font-size:clamp(.72rem,.25vw + .63rem,.84rem)!important}
.lustro-inspired #protocol .trust-word span{font-size:clamp(1.45rem,1.65vw,1.9rem)!important}
.lustro-inspired #protocol .trust-endpoint{
  font-size:clamp(.76rem,.22vw + .68rem,.88rem)!important;
  line-height:1!important;
  font-weight:750!important;
  letter-spacing:.11em!important;
  color:#c6d9ea!important;
}
.lustro-inspired #protocol .trust-endpoint--left{left:20px!important}
.lustro-inspired #protocol .trust-endpoint--right{right:20px!important}
.lustro-inspired #protocol .trust-status{left:20px!important;right:20px!important;bottom:15px!important;min-height:52px!important;padding-top:10px!important}
.lustro-inspired #protocol .trust-status span{font-size:clamp(.70rem,.2vw + .64rem,.8rem)!important;color:#afc3d6!important}
.lustro-inspired #protocol .trust-status b[data-trust-state]{font-size:clamp(.82rem,.25vw + .74rem,.96rem)!important;color:#e5eff8!important}
.lustro-inspired #protocol .trust-steps{gap:10px!important}
.lustro-inspired #protocol .trust-step{padding:clamp(16px,1.45vw,21px)!important}
.lustro-inspired #protocol .trust-step small{font-size:clamp(.71rem,.2vw + .64rem,.81rem)!important}
.lustro-inspired #protocol .trust-step h3{font-size:clamp(1.08rem,1.12vw,1.32rem)!important}
.lustro-inspired #protocol .trust-step-detail{font-size:clamp(.82rem,.22vw + .75rem,.94rem)!important;line-height:1.42!important;color:#cfdeeb!important}

/* Permission-gap graphic: keep it compact while improving its embedded text. */
.lustro-inspired .problem-visual{min-height:330px!important;padding:clamp(12px,1.3vw,18px)!important}
.lustro-inspired .permission-gap-card{min-height:300px!important;padding:clamp(18px,2vw,28px)!important}
.lustro-inspired .gap-node{width:clamp(120px,11vw,146px)!important;height:clamp(120px,11vw,146px)!important}
.lustro-inspired .gap-node b{font-size:clamp(1.02rem,1.35vw,1.32rem)!important}
.lustro-inspired .gap-node small{color:#c8d7e5!important}
.lustro-inspired .gap-key span{padding:7px 9px!important}

/* Other dense visual labels audited across audience pages. */
.lustro-inspired .workflow-stage-top{font-size:var(--v27-tiny)!important}
.lustro-inspired .workflow-stage-result small{color:#b9ccdd!important}
.lustro-inspired .risk-scene__focus small,.lustro-inspired .risk-scene__tags span{color:#c1d2e1!important}
.lustro-inspired .bridge-lattice__side>small{color:#b8cada!important}
.lustro-inspired .bridge-lattice__side>span{color:#d4e1ec!important}
.lustro-inspired .bridge-lattice__hub>small{color:#bfd0df!important}
.lustro-inspired .history-mode span{color:#ffe16f!important}

/* Cards use a consistent internal spacing rhythm. */
.lustro-inspired :where(.gateway-card,.perspective-card,.trust-step,.founding-card,.solution-column,.risk-card,.contract-card,.benefit-card){box-sizing:border-box!important}
.lustro-inspired .gateway-card{padding:var(--v27-card-pad)!important}

@media (min-width:861px){
  .lustro-inspired main>section{
    height:calc(100svh - var(--v27-header-h) - var(--v27-section-gap))!important;
    min-height:calc(100svh - var(--v27-header-h) - var(--v27-section-gap))!important;
    max-height:calc(100svh - var(--v27-header-h) - var(--v27-section-gap))!important;
    padding-top:clamp(14px,1.8vh,22px)!important;
    padding-bottom:clamp(14px,1.8vh,22px)!important;
    overflow:hidden!important;
    scroll-margin-top:var(--v27-header-h)!important;
  }
  .lustro-inspired main>section>.v27-section-inner{height:auto!important;min-height:0!important}
}

@media (max-width:1100px) and (min-width:861px){
  .lustro-inspired #protocol .trust-stack{grid-template-columns:minmax(280px,.8fr) minmax(430px,1.2fr)!important}
  .lustro-inspired #protocol .trust-visual,.lustro-inspired #protocol .trust-steps{height:410px!important;min-height:410px!important;max-height:410px!important}
}

@media (max-width:860px){
  :root{--v27-dock-safe:0px;--v27-section-gap:10px}
  .lustro-inspired main>section{
    height:auto!important;min-height:0!important;max-height:none!important;
    padding:clamp(30px,6vw,54px) var(--v27-edge)!important;
    overflow:visible!important;
  }
  .lustro-inspired main>section>.v27-section-inner{width:100%!important;max-width:100%!important;zoom:1!important;padding-top:0!important}
  .lustro-inspired .section-heading{grid-template-columns:1fr!important;gap:8px!important;margin-bottom:20px!important}
  .lustro-inspired #protocol .trust-stack{grid-template-columns:1fr!important}
  .lustro-inspired #protocol .trust-visual{height:400px!important;min-height:400px!important;max-height:none!important}
  .lustro-inspired #protocol .trust-steps{height:auto!important;min-height:0!important;max-height:none!important;grid-template-columns:1fr!important;grid-template-rows:none!important}
  .lustro-inspired #protocol .trust-step{min-height:145px!important}
}
