:root{
  --bg:#f7f9f8;
  --surface:#ffffff;
  --surface-soft:#f1f5f3;
  --border:#dce5e1;
  --text:#17201d;
  --muted:#68746f;
  --accent:#174c3d;
  --accent-soft:#e4efea;
  --shadow:0 8px 28px rgba(20,45,38,.05);
  --radius:14px;
}

*{
  box-sizing:border-box;
}

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

.topbar{
  height:76px;
  padding:0 34px;
  border-bottom:1px solid var(--border);
  background:rgba(255,255,255,.94);
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.brand{
  font-size:22px;
  font-weight:700;
  letter-spacing:-.03em;
}

.brand-sub{
  margin-top:2px;
  color:var(--muted);
  font-size:12px;
}

.top-status{
  color:var(--muted);
  font-size:12px;
  display:flex;
  align-items:center;
  gap:8px;
}

.status-dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--accent);
}

.page{
  width:min(1220px,calc(100% - 42px));
  margin:34px auto 70px;
}

.hero{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:30px;
  margin-bottom:25px;
}

.eyebrow,
.panel-kicker{
  font-size:10px;
  letter-spacing:.13em;
  color:var(--accent);
  font-weight:700;
}

h1{
  max-width:760px;
  margin:8px 0 10px;
  font-size:34px;
  line-height:1.12;
  letter-spacing:-.04em;
}

.hero p{
  max-width:760px;
  margin:0;
  color:var(--muted);
  line-height:1.6;
  font-size:14px;
}

.hero-badge{
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface);
  padding:11px 15px;
  min-width:90px;
}

.hero-badge span{
  display:block;
  color:var(--muted);
  font-size:10px;
}

.hero-badge strong{
  display:block;
  margin-top:3px;
  font-size:14px;
}

.input-card,
.panel,
.metric-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}

.input-card{
  padding:20px;
}

.section-head,
.input-footer,
.panel-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
}

.section-head h2,
.panel-head h3{
  margin:0;
}

.section-head h2{
  font-size:17px;
}

.section-head p{
  margin:5px 0 0;
  font-size:12px;
  color:var(--muted);
}

.sequence-meta{
  color:var(--muted);
  font-size:12px;
}

textarea{
  width:100%;
  min-height:190px;
  resize:vertical;
  margin:17px 0 14px;
  padding:16px;
  border:1px solid var(--border);
  border-radius:11px;
  outline:none;
  background:#fbfcfb;
  color:var(--text);
  font:13px/1.65 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}

textarea:focus{
  border-color:#a9c7bc;
  box-shadow:0 0 0 3px var(--accent-soft);
}

.input-footer{
  font-size:12px;
  color:var(--muted);
}

.service-notice{
  margin-top:14px;
  padding:13px 16px;
  border:1px solid #d6c28f;
  border-radius:11px;
  background:#fff9e9;
  color:#655326;
  font-size:12px;
  line-height:1.6;
}

.service-notice strong{
  display:block;
  margin-bottom:3px;
  color:#4e3d12;
}

.field-label{
  display:block;
  margin:0 0 7px;
  color:var(--text);
  font-size:12px;
  font-weight:650;
}

.field-help{
  display:block;
  margin:-7px 0 15px;
  color:var(--muted);
  font-size:11px;
  line-height:1.5;
}

#mutationInput{
  width:100%;
  min-height:42px;
  margin:0 0 13px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:9px;
  outline:none;
  background:#fbfcfb;
  color:var(--text);
  font:13px ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}

#mutationInput:focus{
  border-color:#a9c7bc;
  box-shadow:0 0 0 3px var(--accent-soft);
}

textarea[aria-invalid="true"],
#mutationInput[aria-invalid="true"]{
  border-color:#b7443e;
}

.error-text{
  color:#a5302b;
}

.primary-btn{
  border:1px solid var(--accent);
  background:var(--accent);
  color:#fff;
  border-radius:9px;
  padding:10px 15px;
  font-size:12px;
  font-weight:650;
  cursor:pointer;
}

.primary-btn:hover{
  opacity:.93;
}

.primary-btn:disabled{
  cursor:wait;
  opacity:.7;
}

.analysis-area{
  margin-top:22px;
}

.prediction-panel h2{
  margin:5px 0 0;
  font-size:18px;
}

.prediction-output{
  display:grid;
  gap:18px;
}

.prediction-primary{
  padding:17px;
  border:1px solid var(--border);
  border-radius:11px;
  background:var(--surface-soft);
}

.prediction-primary span{
  display:block;
  color:var(--muted);
  font-size:11px;
}

.prediction-primary strong{
  display:block;
  margin-top:6px;
  font-size:26px;
  overflow-wrap:anywhere;
}

.prediction-details{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin:0;
}

.prediction-details div{
  min-width:0;
  padding:12px;
  border:1px solid var(--border);
  border-radius:9px;
}

.prediction-details dt{
  color:var(--muted);
  font-size:10px;
}

.prediction-details dd{
  margin:5px 0 0;
  font-size:13px;
  font-weight:650;
  overflow-wrap:anywhere;
}

.prediction-error{
  margin:0 0 15px;
  padding:13px 15px;
  border:1px solid #e1b5b2;
  border-radius:10px;
  background:#fff3f2;
  color:#8e2e28;
  font-size:12px;
  line-height:1.55;
}

.scientific-note{
  margin:0;
  color:var(--muted);
  font-size:11px;
  line-height:1.6;
}

.service-notice.hidden,
.prediction-output.hidden{
  display:none;
}

.hidden{
  display:none;
}

.summary-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:13px;
  margin-bottom:13px;
}

.metric-card{
  padding:17px;
}

.metric-card span{
  display:block;
  color:var(--muted);
  font-size:11px;
}

.metric-card strong{
  display:block;
  margin-top:9px;
  font-size:20px;
}

.metric-card small{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:10px;
}

.workspace{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:13px;
  margin-bottom:13px;
}

.panel{
  padding:19px;
}

.panel-head{
  margin-bottom:18px;
}

.panel-head h3{
  margin-top:5px;
  font-size:16px;
}

.panel-state{
  padding:5px 8px;
  border-radius:999px;
  background:var(--accent-soft);
  color:var(--accent);
  font-size:9px;
  font-weight:700;
  letter-spacing:.08em;
}

.panel-state.muted{
  background:var(--surface-soft);
  color:var(--muted);
}

.signal-row{
  display:flex;
  justify-content:space-between;
  color:var(--muted);
  font-size:11px;
  margin-bottom:7px;
}

.signal-bar{
  height:8px;
  border-radius:99px;
  background:#edf1ef;
  overflow:hidden;
  margin-bottom:17px;
}

.signal-bar div{
  width:30%;
  height:100%;
  background:#9bbcae;
  border-radius:99px;
}

.representation-placeholder p,
.empty-state{
  color:var(--muted);
  font-size:12px;
  line-height:1.6;
}

.empty-state{
  min-height:150px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  border:1px dashed var(--border);
  border-radius:10px;
  padding:22px;
}

.wide-panel{
  overflow:hidden;
}

.pipeline{
  display:flex;
  align-items:center;
  gap:9px;
  overflow:auto;
  padding-bottom:4px;
}

.pipeline-step{
  min-width:135px;
  padding:12px;
  border:1px solid var(--border);
  background:#fbfcfb;
  border-radius:10px;
}

.pipeline-step.active{
  border-color:#adcabd;
  background:var(--accent-soft);
}

.pipeline-step span,
.pipeline-step strong,
.pipeline-step small{
  display:block;
}

.pipeline-step span{
  color:var(--muted);
  font-size:9px;
  margin-bottom:8px;
}

.pipeline-step strong{
  font-size:12px;
}

.pipeline-step small{
  color:var(--muted);
  font-size:9px;
  margin-top:3px;
}

.pipeline-line{
  width:20px;
  height:1px;
  background:var(--border);
  flex:0 0 auto;
}

@media(max-width:850px){
  .summary-grid{
    grid-template-columns:repeat(2,1fr);
  }

  .workspace{
    grid-template-columns:1fr;
  }

  .hero{
    flex-direction:column;
  }
}

@media(max-width:560px){
  .topbar{
    padding:0 18px;
  }

  .page{
    width:min(100% - 24px,1220px);
    margin-top:22px;
  }

  h1{
    font-size:28px;
  }

  .summary-grid{
    grid-template-columns:1fr;
  }

  .prediction-details{
    grid-template-columns:1fr;
  }

  .input-footer{
    align-items:flex-start;
    flex-direction:column;
  }
}