/* SCOPE-TOWER-V1
   ScopeSentinel as the GlassCastle Gatehouse / Scope Tower.
*/
body[data-scope-tower="v1"]{
  --bg:#080A0D;
  --panel:#11151A;
  --panel2:#0B0E12;
  --line:#232930;
  --line2:#39424C;
  --text:#DCE3E9;
  --muted:#89939E;
  --ghost:#56616D;
  --green:#35FF95;
  --violet:#8B5CF6;
  --magenta:#E147FF;
  --danger:#FF6F7A;
  --hold:#D5A84A;
}
body[data-scope-tower="v1"]{
  background:
    linear-gradient(rgba(35,41,48,.12) 1px,transparent 1px),
    linear-gradient(90deg,rgba(35,41,48,.12) 1px,transparent 1px),
    radial-gradient(circle at 14% 0,rgba(53,255,149,.08),transparent 30rem),
    radial-gradient(circle at 86% 4%,rgba(139,92,246,.08),transparent 32rem),
    var(--bg);
  background-size:64px 64px,64px 64px,auto,auto,auto;
}
body[data-scope-tower="v1"] .scope-top{
  position:relative;
  top:auto;
  min-height:58px;
  border-bottom:1px solid var(--line);
  background:linear-gradient(180deg,#11151A,#0B0E12);
}
body[data-scope-tower="v1"] .brand{
  letter-spacing:.08em;
}
body[data-scope-tower="v1"] .brand b{color:var(--green)}
body[data-scope-tower="v1"] .tag{color:var(--ghost)}
body[data-scope-tower="v1"] .version{
  border-color:rgba(53,255,149,.35);
  background:rgba(53,255,149,.035);
}
.scope-tower-state{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  margin:10px 0 0;
  border:1px solid var(--line);
  border-radius:4px;
  background:rgba(11,14,18,.82);
  overflow:hidden;
}
.scope-tower-state>div{
  min-height:68px;
  padding:10px 12px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:4px;
  border-right:1px solid var(--line);
}
.scope-tower-state>div:last-child{border-right:0}
.scope-tower-state small{
  color:var(--ghost);
  font-size:7px;
  letter-spacing:.11em;
}
.scope-tower-state strong{
  color:var(--text);
  font-size:9px;
}
#towerGateState[data-state="allow"]{color:var(--green)}
#towerGateState[data-state="hold"]{color:var(--hold)}
#towerGateState[data-state="block"]{color:var(--danger)}
.scope-doctrine{
  margin-top:10px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:4px;
  background:rgba(11,14,18,.72);
}
.scope-doctrine-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-bottom:12px;
}
.scope-doctrine-head small{
  color:var(--green);
  font-size:7px;
  letter-spacing:.11em;
}
.scope-doctrine-head strong{
  display:block;
  margin-top:4px;
  color:var(--text);
  font-size:12px;
}
.scope-doctrine-head p{
  max-width:600px;
  margin:0;
  color:var(--muted);
  font-size:9px;
  text-align:right;
}
.scope-precedence{
  display:flex;
  align-items:center;
  gap:6px;
  overflow-x:auto;
}
.scope-precedence span{
  flex:1 0 130px;
  min-width:130px;
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:3px;
  background:#090C0F;
}
.scope-precedence small{
  display:block;
  color:var(--ghost);
  font-size:6px;
}
.scope-precedence b{
  display:block;
  margin-top:3px;
  color:var(--text);
  font-size:7px;
}
.scope-precedence span:first-child{
  border-color:rgba(255,111,122,.36);
}
.scope-precedence span:first-child b{color:#ff9ca4}
.scope-precedence span:nth-of-type(2){
  border-color:rgba(53,255,149,.35);
}
.scope-precedence span:nth-of-type(2) b{color:var(--green)}
.scope-precedence i{
  color:var(--green);
  font-style:normal;
  font-size:8px;
}
.decision-key{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:6px;
  margin-top:10px;
}
.decision-key>div{
  padding:10px;
  border:1px solid var(--line);
  border-radius:3px;
  background:#090C0F;
}
.decision-key b{
  display:block;
  font-size:9px;
}
.decision-key span{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:8px;
  line-height:1.4;
}
.decision-key .allow b{color:var(--green)}
.decision-key .hold b{color:var(--hold)}
.decision-key .block b{color:var(--danger)}
.scope-authority-warning{
  margin-top:10px;
  padding:10px 12px;
  border:1px solid rgba(139,92,246,.38);
  border-radius:3px;
  background:rgba(139,92,246,.04);
  color:#cbbdff;
  font-size:8px;
  line-height:1.5;
}
.scope-authority-warning b{color:var(--text)}
body[data-scope-tower="v1"] .mission{
  margin-top:10px;
  border-color:var(--line2);
  background:linear-gradient(180deg,rgba(17,21,26,.9),rgba(11,14,18,.9));
}
body[data-scope-tower="v1"] .mission h1{
  font-family:Inter,system-ui,sans-serif;
  font-size:clamp(30px,4vw,46px);
}
body[data-scope-tower="v1"] .mission p{color:var(--muted);max-width:930px}
body[data-scope-tower="v1"] .panel{
  border-color:var(--line);
  background:rgba(17,21,26,.72);
}
body[data-scope-tower="v1"] .panel-head{
  border-bottom-color:var(--line);
}
body[data-scope-tower="v1"] .panel-head span{color:var(--muted)}
body[data-scope-tower="v1"] .metrics{
  border-color:var(--line);
  background:#090C0F;
}
body[data-scope-tower="v1"] .metrics>div{border-right-color:var(--line)}
body[data-scope-tower="v1"] .contract-grid article{
  border-color:var(--line);
  background:#090C0F;
}
body[data-scope-tower="v1"] .item{
  background:#080B0E;
}
body[data-scope-tower="v1"] .decision-result{
  border-color:var(--line);
  background:#090C0F;
}
body[data-scope-tower="v1"] .decision-result.allow{border-color:rgba(53,255,149,.6)}
body[data-scope-tower="v1"] .decision-result.hold{border-color:rgba(213,168,74,.7)}
body[data-scope-tower="v1"] .decision-result.block{border-color:rgba(255,111,122,.7)}
.scope-handoff{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-top:10px;
}
.scope-handoff a{
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:3px;
  background:#090C0F;
  color:var(--text);
  font-size:8px;
  text-decoration:none;
}
.scope-handoff a:hover,.scope-handoff a:focus-visible{
  border-color:var(--green);
  color:var(--green);
  outline:none;
}
body[data-scope-tower="v1"] .statusbar{
  background:#090C0F;
  border-top-color:var(--line);
}
body[data-scope-tower="v1"] .statusbar b{color:var(--green)}
@media(max-width:900px){
  .scope-tower-state{grid-template-columns:repeat(2,1fr)}
  .scope-tower-state>div{border-bottom:1px solid var(--line)}
  .scope-tower-state>div:nth-child(2n){border-right:0}
  .scope-tower-state>div:last-child{grid-column:1/-1;border-bottom:0}
  .decision-key{grid-template-columns:1fr}
}
@media(max-width:760px){
  .scope-doctrine-head{display:block}
  .scope-doctrine-head p{margin-top:8px;text-align:left}
  .scope-precedence span{flex-basis:116px;min-width:116px}
}
