:root {
  color: #2e1b54;
  background: #fbf9ff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
.container { width: min(1160px, calc(100% - 48px)); margin: 0 auto; }

.site-header {
  border-bottom: 1px solid rgba(76, 47, 133, .12);
  background: rgba(251, 249, 255, .94);
}

.nav { display: flex; min-height: 86px; align-items: center; gap: 28px; }
.brand { display: block; width: 148px; line-height: 0; }
.brand img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; }
.nav-label { color: #766b89; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.back-link { margin-left: auto; color: #4c2f85; font-size: 12px; font-weight: 800; text-decoration: none; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 84px;
  background: #eee7ff;
}

.hero::after {
  position: absolute;
  top: -190px;
  right: -90px;
  width: 470px;
  height: 470px;
  border: 1px solid rgba(107, 71, 185, .2);
  border-radius: 50%;
  box-shadow: 0 0 0 52px rgba(255, 255, 255, .2), 0 0 0 105px rgba(255, 255, 255, .12);
  content: "";
}

.hero .container { position: relative; z-index: 1; }
.eyebrow, .kicker { margin: 0; color: #6847b9; font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 9px; }
.eyebrow i { width: 26px; height: 3px; border-radius: 99px; background: #d65ab3; }
.hero h1 { max-width: 820px; margin: 23px 0 25px; font-size: clamp(50px, 7vw, 86px); letter-spacing: -.07em; line-height: .98; }
.hero h1 em { color: #9b3fc2; font-style: normal; }
.lead { max-width: 740px; margin: 0; color: #514568; font-size: 18px; line-height: 1.65; }
.local-badge { display: inline-flex; align-items: center; gap: 9px; margin: 30px 0 0; border: 1px solid rgba(68, 134, 108, .3); border-radius: 999px; padding: 10px 15px; background: rgba(255, 255, 255, .58); color: #356e57; font-size: 11px; font-weight: 800; }

.laboratory { padding: 72px 0 100px; }
.model-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.model-tabs button { display: flex; min-height: 88px; align-items: flex-start; justify-content: space-between; gap: 18px; border: 1px solid rgba(76, 47, 133, .15); border-radius: 16px; padding: 18px 20px; background: rgba(255, 255, 255, .76); color: #2e1b54; text-align: left; }
.model-tabs button.selected { border-color: #4c2f85; background: #4c2f85; color: white; }
.model-tabs code { color: inherit; font-size: 11px; opacity: .72; }

.workspace { display: grid; grid-template-columns: minmax(250px, .32fr) minmax(0, 1fr); overflow: hidden; border: 1px solid rgba(76, 47, 133, .15); border-radius: 22px; background: #fbf9ff; box-shadow: 0 24px 70px rgba(46, 27, 84, .12); }
.controls { padding: 28px; border-right: 1px solid rgba(76, 47, 133, .15); background: #f4effd; }
.controls h2 { margin: 10px 0 8px; font-size: 25px; letter-spacing: -.04em; }
.description { min-height: 63px; margin: 0 0 24px; color: #766b89; font-size: 13px; line-height: 1.55; }
.slider { display: block; margin-top: 20px; }
.slider > span { display: flex; justify-content: space-between; gap: 14px; color: #766b89; font-size: 12px; }
.slider output { color: #2e1b54; font-family: ui-monospace, monospace; font-size: 11px; }
.slider input { width: 100%; margin-top: 8px; accent-color: #4c2f85; }
.slider input:disabled { opacity: .35; }

.boundary { margin: 23px 0 0; border: 0; padding: 0; }
.boundary legend { margin-bottom: 8px; padding: 0; color: #766b89; font-size: 12px; }
.boundary div { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid rgba(76, 47, 133, .15); border-radius: 10px; }
.boundary button { border: 0; padding: 8px; background: rgba(255, 255, 255, .5); color: #766b89; font-size: 11px; font-weight: 800; }
.boundary button.selected { background: #4c2f85; color: white; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 28px; }
.actions button { border: 0; border-radius: 10px; padding: 10px 12px; background: rgba(76, 47, 133, .1); color: #4c2f85; font-size: 12px; font-weight: 700; }
.actions .primary { background: #4c2f85; color: white; }
.actions button:last-child { grid-column: 1 / -1; background: transparent; }
.actions button:disabled { cursor: not-allowed; opacity: .4; }
.local-note { display: flex; gap: 8px; margin: 22px 0 0; border-top: 1px solid rgba(76, 47, 133, .15); padding-top: 16px; color: #766b89; font-size: 10px; line-height: 1.45; }
.local-note span { color: #44866c; font-weight: 800; }

.visual { min-width: 0; padding: 22px; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; margin-bottom: 14px; border: 1px solid rgba(76, 47, 133, .15); border-radius: 13px; }
.metrics div { padding: 13px 16px; border-right: 1px solid rgba(76, 47, 133, .15); }
.metrics div:last-child { border: 0; }
.metrics span { display: block; color: #766b89; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.metrics strong { display: block; margin-top: 5px; font-family: ui-monospace, monospace; font-size: 20px; font-weight: 500; }
.metrics small { display: block; margin-top: 2px; color: #91869f; font-size: 8px; }
.chart { border: 1px solid rgba(76, 47, 133, .15); border-radius: 15px; background: white; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 14px 16px 0; color: #766b89; font-size: 9px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { display: block; width: 18px; height: 2px; background: #2e1b54; }
.legend .history { background: #6b47b9; opacity: .4; }
.legend .mean { height: 0; border-top: 2px dotted #d65ab3; background: transparent; }
.legend .proposal { height: 0; border-top: 2px dashed #9b93aa; background: transparent; }
#trajectory { display: block; width: 100%; height: 360px; }
.decision { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; border-left: 4px solid #a79caf; border-radius: 10px; padding: 12px 14px; background: #f3f0f7; }
.decision strong { font-size: 12px; letter-spacing: .06em; }
.decision code { color: #766b89; font-size: 10px; }
.decision.accepted { border-left-color: #44866c; background: #f0f8f4; }
.decision.rejected { border-left-color: #bd5a62; background: #fff3f4; }

.method { padding: 100px 0; background: #2e1b54; color: white; }
.method .kicker { color: #d5bdf4; }
.method h2 { max-width: 680px; margin: 17px 0 48px; font-size: clamp(35px, 4.6vw, 57px); letter-spacing: -.06em; line-height: 1.03; }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.method-grid article { min-height: 190px; border: 1px solid rgba(213, 189, 244, .24); border-radius: 16px; padding: 23px; background: rgba(255, 255, 255, .04); }
.method-grid span { color: #d65ab3; font-size: 10px; font-weight: 800; }
.method-grid h3 { margin: 30px 0 10px; font-size: 20px; }
.method-grid p { margin: 0; color: #d3c9e5; font-size: 13px; line-height: 1.65; }
.technical-note { max-width: 850px; margin: 35px 0 0; border-left: 3px solid #d65ab3; padding-left: 18px; color: #bfb2d2; font-size: 12px; line-height: 1.65; }
footer { padding: 58px 0; background: #fbf9ff; }
.footer-content { display: flex; justify-content: space-between; gap: 40px; }
.footer-logo { display: block; width: 130px; height: auto; mix-blend-mode: multiply; }
.footer-content p, .footer-content span { color: #766b89; font-size: 11px; }
.footer-content a { display: block; margin-top: 9px; color: #4c2f85; font-size: 12px; font-weight: 800; text-decoration: none; }

@media (max-width: 820px) {
  .workspace { grid-template-columns: 1fr; }
  .controls { border-right: 0; border-bottom: 1px solid rgba(76, 47, 133, .15); }
  .method-grid { grid-template-columns: 1fr; }
  .method-grid article { min-height: auto; }
}

@media (max-width: 560px) {
  .container { width: min(100% - 32px, 1160px); }
  .nav-label { display: none; }
  .hero { padding: 70px 0 66px; }
  .hero h1 { font-size: clamp(43px, 14vw, 65px); }
  .lead { font-size: 16px; }
  .local-badge { align-items: flex-start; border-radius: 15px; line-height: 1.4; }
  .laboratory { padding: 52px 0 75px; }
  .model-tabs { grid-template-columns: 1fr; }
  .model-tabs button { min-height: 72px; }
  .metrics div { padding: 11px 9px; }
  .metrics strong { font-size: 16px; }
  .decision { align-items: flex-start; flex-direction: column; }
  .footer-content { flex-direction: column; }
}
