/* Build 006E — Nordic Role Engine */

.role-mode-card{
  display:grid;
  gap:10px;
  margin:10px 12px 4px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:16px;
  background:color-mix(in srgb,var(--solid) 94%,var(--accent) 6%);
}

.role-mode-head{
  display:grid;
  grid-template-columns:38px minmax(0,1fr);
  gap:10px;
  align-items:center;
}

.role-mode-head>span{
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border-radius:50%;
  background:color-mix(in srgb,var(--accent) 16%,var(--solid));
  color:var(--text);
  font-weight:800;
}

.role-mode-head strong,
.role-mode-head small{
  display:block;
}

.role-mode-head small{
  color:var(--muted);
  margin-top:2px;
}

.role-mode-toggle{
  display:grid;
  grid-template-columns:30px minmax(0,1fr) 38px;
  gap:9px;
  align-items:center;
  width:100%;
  padding:10px;
  border:1px solid var(--line);
  border-radius:13px;
  color:var(--text);
  background:var(--solid);
  text-align:left;
  cursor:pointer;
}

.role-mode-toggle>span:first-child{
  font-size:20px;
}

.role-mode-toggle strong,
.role-mode-toggle small{
  display:block;
}

.role-mode-toggle small{
  color:var(--muted);
  margin-top:2px;
  line-height:1.3;
}

.role-mode-toggle i{
  position:relative;
  width:38px;
  height:22px;
  border-radius:999px;
  background:color-mix(in srgb,var(--muted) 35%,var(--solid));
  transition:background .2s ease;
}

.role-mode-toggle i::after{
  content:"";
  position:absolute;
  top:3px;
  left:3px;
  width:16px;
  height:16px;
  border-radius:50%;
  background:var(--text);
  transition:transform .2s ease;
}

.role-mode-toggle.active i{
  background:color-mix(in srgb,var(--accent) 72%,var(--solid));
}

.role-mode-toggle.active i::after{
  transform:translateX(16px);
}

.developer-mode-badge{
  border-color:color-mix(in srgb,var(--accent) 34%,var(--line));
  color:var(--accent);
}

.header-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  align-items:center;
  gap:8px;
}

/* Ordinary users do not see build and development language. */
html[data-role-mode="user"] .view>.intro p,
html[data-role-mode="user"] #project,
html[data-role-mode="user"] #designqa,
html[data-role-mode="user"] #uikit,
html[data-role-mode="user"] #cards,
html[data-role-mode="user"] #test,
html[data-role-mode="user"] #engine,
html[data-role-mode="user"] #intelligence,
html[data-role-mode="user"] #calmos{
  display:none!important;
}

html[data-role-mode="user"] nav button[hidden]{
  display:none!important;
}

html[data-role-mode="user"] main>header{
  border-bottom-color:color-mix(in srgb,var(--accent) 12%,var(--line));
}

@media(max-width:760px){
  .role-mode-card{
    margin-inline:8px;
  }

  .header-actions{
    justify-content:flex-start;
  }
}

@media(prefers-reduced-motion:reduce){
  .role-mode-toggle i,
  .role-mode-toggle i::after{
    transition:none!important;
  }
}
