:root{
  color-scheme:dark;
  --bg:#101716;
  --panel:#192220;
  --line:#35413b;
  --text:#edf2e9;
  --muted:#b1beb5;
  --green:#cae88d;
  --amber:#f1c879;
  --danger:#ffb4a8;
  font-family:Inter,Segoe UI,system-ui,sans-serif;
  color:var(--text);
  background:var(--bg);
  font-synthesis:none
}
*{
  box-sizing:border-box
}
body{
  margin:0
}
button,input,select,textarea{
  font:inherit
}
a{
  color:inherit
}
button{
  border:1px solid #536057;
  background:transparent;
  color:var(--text);
  border-radius:7px;
  padding:11px 15px;
  min-height:44px;
  font-size:13px;
  font-weight:650;
  cursor:pointer
}
button:hover{
  background:#2a3730;
  border-color:var(--muted)
}
button.primary{
  background:var(--green);
  border-color:var(--green);
  color:#1c2817
}
button.primary:hover{
  background:#e2f6b6
}
button:disabled{
  opacity:.5;
  cursor:not-allowed
}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,a:focus-visible{
  outline:3px solid var(--green);
  outline-offset:4px
}
h1,h2,h3,p{
  margin:0
}
p{
  line-height:1.6
}
h1{
  font-size:clamp(38px,5vw,64px);
  font-weight:580;
  letter-spacing:-.055em;
  line-height:1.06
}
h2{
  font-size:23px;
  font-weight:600;
  letter-spacing:-.035em;
  line-height:1.25
}
h3{
  font-size:16px;
  font-weight:650
}
.topbar{
  border-bottom:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:19px max(24px,calc((100vw - 1360px)/2));
  gap:20px
}
.brand{
  display:flex;
  gap:14px;
  align-items:center;
  text-decoration:none;
  font-size:13px;
  font-weight:750;
  letter-spacing:.09em
}
.brand small{
  display:block;
  font-size:10px;
  font-weight:450;
  color:var(--muted);
  margin-top:5px;
  letter-spacing:.18em
}
.mark{
  background:var(--green);
  color:#182413;
  border-radius:7px;
  padding:10px 8px;
  letter-spacing:-.08em;
  font-size:20px
}
.mark span{
  color:#527134
}
.local-badge{
  color:var(--muted);
  font-size:12px
}
.local-badge span{
  color:var(--green);
  margin-right:7px
}
.shell{
  max-width:1408px;
  margin:0 auto;
  padding:0 24px
}
.intro{
  display:flex;
  justify-content:space-between;
  gap:48px;
  padding:48px 0 34px;
  align-items:flex-end
}
.eyebrow,.label{
  color:var(--muted);
  font:600 10px/1.5 ui-monospace,Consolas,monospace;
  text-transform:uppercase;
  letter-spacing:.12em
}
.intro .eyebrow{
  margin-bottom:17px
}
.lede{
  color:var(--muted);
  margin-top:20px;
  font-size:16px
}
.intro-note{
  max-width:355px;
  border-left:1px solid var(--line);
  padding-left:26px;
  color:var(--muted);
  font-size:13px
}
.intro-note p+p{
  margin-top:12px
}
.intro-note .eyebrow{
  display:block;
  color:var(--green);
  font-size:9px
}
.notice{
  padding:12px 16px;
  border:1px solid #66764c;
  border-radius:7px;
  background:#222d20;
  font-size:13px;
  margin-bottom:18px;
  line-height:1.6
}
.error{
  color:var(--danger);
  background:#341f1c;
  border-color:#936052;
  padding:12px;
  border-radius:5px;
  overflow-wrap:anywhere
}
.site-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin:26px 0 22px
}
.site-bar h2{
  margin:6px 0
}
.muted,.hint{
  color:var(--muted);
  font-size:13px;
  line-height:1.6
}
.hint{
  margin:10px 0 16px
}
.actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap
}
.metrics{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  border:1px solid var(--line);
  border-radius:10px;
  margin-bottom:24px;
  overflow:hidden
}
.metrics>div{
  padding:20px 24px;
  border-right:1px solid var(--line)
}
.metrics>div:last-child{
  border-right:0
}
.metrics strong{
  display:block;
  font-weight:500;
  font-size:38px;
  line-height:1.2;
  margin:10px 0 5px
}
.metrics small{
  font-size:12px;
  color:var(--muted)
}
.workspace{
  display:grid;
  grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
  gap:20px;
  align-items:start
}
.panel{
  background:var(--panel);
  border:1px solid var(--line);
  padding:24px;
  border-radius:10px;
  min-width:0
}
.section-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  margin-bottom:20px
}
.section-head .eyebrow{
  margin-bottom:5px
}
.section-head button{
  flex-shrink:0
}
.filters{
  display:grid;
  grid-template-columns:1.6fr 1fr;
  gap:12px;
  margin-bottom:22px
}
label{
  display:grid;
  gap:7px;
  font-size:12px;
  color:var(--muted);
  line-height:1.5
}
input,select,textarea{
  width:100%;
  min-width:0;
  border:1px solid #536057;
  border-radius:6px;
  padding:11px 12px;
  color:var(--text);
  background:#111a16;
  min-height:44px
}
input::placeholder,textarea::placeholder{
  color:#8fa193
}
textarea{
  resize:vertical;
  min-height:100px
}
.incident-list{
  display:grid;
  gap:9px
}
.incident-card{
  display:block;
  width:100%;
  text-align:left;
  padding:17px;
  border:1px solid var(--line);
  border-radius:7px;
  min-width:0;
  background:#151e1a
}
.incident-card[aria-pressed=true]{
  border-color:var(--green);
  box-shadow:inset 3px 0 0 var(--green);
  background:#242e20
}
.incident-card strong{
  display:block;
  font-size:15px;
  line-height:1.45;
  font-weight:550;
  margin:10px 0;
  overflow-wrap:anywhere
}
.incident-card .meta{
  display:flex;
  justify-content:space-between;
  gap:8px;
  font-size:11px;
  color:var(--muted);
  flex-wrap:wrap
}
.tags{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:12px 0
}
.tag{
  display:inline-flex;
  font:550 10px/1.5 ui-monospace,monospace;
  letter-spacing:.03em;
  border-radius:4px;
  background:#2b3831;
  border:1px solid #485c4d;
  padding:3px 7px;
  color:#d3e6d5
}
.tag.high,.tag.critical{
  color:#ffc3a2;
  background:#38281e;
  border-color:#745239
}
.tag.open{
  color:var(--amber);
  border-color:#77663f;
  background:#332f21
}
.tag.resolved,.tag.reviewed{
  color:var(--green)
}
.empty-state{
  padding:55px 15px;
  text-align:center;
  color:var(--muted)
}
.empty-state h2{
  color:var(--text);
  margin:20px 0 10px
}
.empty-icon{
  font-size:38px;
  color:var(--green)
}
.empty{
  color:var(--muted);
  font-size:13px;
  padding:20px 0
}
.record-text{
  font-size:14px;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  margin:12px 0
}
.detail-panel{
  min-height:510px
}
#detailTitle{
  font-size:27px;
  overflow-wrap:anywhere
}
.subsection{
  border-top:1px solid var(--line);
  padding-top:20px;
  margin-top:24px
}
.subsection .section-head{
  margin-bottom:5px
}
.evidence-item,.zone-item,.finding{
  padding:14px 0;
  border-bottom:1px solid var(--line);
  overflow-wrap:anywhere
}
.evidence-item:last-child,.zone-item:last-child,.finding:last-child{
  border-bottom:0
}
.evidence-item p{
  font-size:14px;
  margin:6px 0
}
.evidence-item code{
  display:block;
  font:11px/1.6 ui-monospace,monospace;
  color:var(--green);
  overflow-wrap:anywhere;
  margin-top:7px
}
.support-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
  margin-top:20px
}
.zone-item strong{
  font-size:14px;
  font-weight:550
}
.zone-item p,.finding p{
  font-size:13px;
  color:var(--muted);
  margin:6px 0
}
.finding{
  border-left:2px solid #7f8f63;
  padding:10px 15px;
  margin:10px 0;
  background:#1e2921
}
.finding strong{
  font-size:12px
}
.export-panel{
  display:grid;
  grid-template-columns:1.4fr 1fr;
  gap:28px;
  margin-top:20px;
  padding:30px;
  background:#202c20
}
.export-panel h2{
  margin:10px 0
}
.export-panel p{
  color:var(--muted);
  font-size:14px;
  max-width:560px
}
.export-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px
}
.export-actions .primary{
  grid-column:1/-1
}
.report-preview,#receipt{
  grid-column:1/-1
}
pre{
  font:12px/1.6 ui-monospace,monospace;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  background:#111914;
  padding:18px;
  border:1px solid var(--line);
  border-radius:5px;
  max-height:400px;
  overflow:auto
}
summary{
  cursor:pointer;
  color:var(--text);
  font-size:13px;
  min-height:34px
}
.history{
  padding-left:18px;
  color:var(--muted);
  font-size:12px
}
.history li{
  padding:7px 0;
  line-height:1.6
}
footer{
  display:flex;
  justify-content:space-between;
  gap:20px;
  padding:26px 0 36px;
  color:var(--muted);
  font-size:11px
}
footer span{
  font:10px ui-monospace,monospace;
  letter-spacing:.1em
}
dialog{
  background:var(--panel);
  color:var(--text);
  border:1px solid #758762;
  border-radius:12px;
  padding:26px;
  width:min(590px,calc(100% - 24px));
  max-height:calc(100dvh - 30px);
  overflow:auto
}
dialog::backdrop{
  background:#050b08ba;
  backdrop-filter:blur(3px)
}
.dialog-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px
}
.dialog-head h2{
  font-size:25px
}
.dialog-head button{
  padding:8px 12px
}
.form-fields{
  display:grid;
  gap:15px
}
.form-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px
}
.check{
  display:flex;
  align-items:flex-start;
  gap:10px
}
.check input{
  width:18px;
  min-height:18px;
  margin:2px 0;
  flex-shrink:0
}
.dialog-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:24px
}
#confirmMessage{
  margin-top:18px;
  color:var(--muted)
}
#toast{
  position:fixed;
  bottom:22px;
  left:50%;
  transform:translateX(-50%);
  max-width:calc(100% - 30px);
  background:var(--green);
  color:#1b2814;
  padding:13px 22px;
  border-radius:8px;
  box-shadow:0 6px 25px #0006;
  font-size:13px;
  z-index:10
}
#toast:empty{
  display:none
}
[hidden]{
  display:none!important
}
.skip-link{
  position:absolute;
  top:-80px;
  left:20px;
  background:var(--green);
  color:#111;
  padding:15px;
  z-index:20
}
.skip-link:focus{
  top:12px
}
@media(max-width:1050px){
  .intro-note{
    max-width:300px
  }
  .workspace{
    grid-template-columns:1fr 1fr
  }
  .section-head{
    align-items:flex-start;
    flex-wrap:wrap
  }
  .panel{
    padding:20px
  }
  .metrics>div{
    padding:18px
  }
  .export-panel{
    grid-template-columns:1fr
  }
  .export-actions{
    max-width:550px
  }
  .intro{
    gap:24px
  }
}
@media(max-width:760px){
  .shell{
    padding:0 16px
  }
  .topbar{
    padding:16px
  }
  .intro{
    padding:34px 0 24px;
    display:block
  }
  .intro-note{
    max-width:100%;
    margin-top:25px;
    padding-left:16px
  }
  .intro-note p:last-child{
    display:none
  }
  .site-bar{
    align-items:flex-start;
    flex-direction:column
  }
  .metrics{
    grid-template-columns:1fr 1fr
  }
  .metrics>div:nth-child(2){
    border-right:0
  }
  .metrics>div:nth-child(-n+2){
    border-bottom:1px solid var(--line)
  }
  .metrics strong{
    font-size:32px
  }
  .workspace,.support-grid{
    grid-template-columns:1fr
  }
  .detail-panel{
    min-height:0
  }
  .panel{
    padding:18px
  }
  .filters{
    grid-template-columns:1.3fr 1fr
  }
  .form-row{
    grid-template-columns:1fr
  }
  .local-badge{
    font-size:10px
  }
  .brand{
    font-size:11px
  }
  .export-actions{
    grid-template-columns:1fr
  }
  .export-panel{
    gap:18px
  }
  footer{
    flex-direction:column;
    gap:10px
  }
  .empty-state{
    padding:25px 8px
  }
  dialog{
    padding:20px
  }
  .dialog-actions{
    flex-wrap:wrap
  }
  #detailTitle{
    font-size:24px
  }
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{
    scroll-behavior:auto!important;
    animation:none!important;
    transition:none!important
  }
}
