.noema-btc {
  --btc-ink: #effbf6;
  --btc-muted: #a7bcb4;
  --btc-line: rgb(218 255 238 / 15%);
  --btc-panel: rgb(13 32 28 / 88%);
  --btc-green: #5de2a5;
  --btc-green-deep: #1f9665;
  --btc-amber: #ffc857;
  --btc-red: #ff6b6b;
  background:
    radial-gradient(circle at 85% 0%, rgb(35 151 103 / 24%), transparent 32rem),
    radial-gradient(circle at 0% 90%, rgb(255 200 87 / 10%), transparent 26rem),
    #07110f;
  border: 1px solid rgb(93 226 165 / 20%);
  border-radius: 1.25rem;
  box-shadow: 0 1.5rem 4rem rgb(2 12 9 / 28%);
  color: var(--btc-ink);
  margin: 2rem 0;
  overflow: hidden;
}

.noema-btc *,
.noema-btc *::before,
.noema-btc *::after {
  box-sizing: border-box;
}

.noema-btc h2,
.noema-btc h3,
.noema-btc h4,
.noema-btc p,
.noema-btc ul,
.noema-btc fieldset {
  color: inherit;
  margin-top: 0;
}

.noema-btc__hero {
  align-items: flex-end;
  border-bottom: 1px solid var(--btc-line);
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  padding: clamp(1.5rem, 4vw, 3.5rem);
}

.noema-btc__hero h2 {
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 0.92;
  margin-bottom: 1rem;
  max-width: 12ch;
}

.noema-btc__eyebrow,
.noema-btc__kicker {
  color: var(--btc-green) !important;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  margin-bottom: 0.55rem;
  text-transform: uppercase;
}

.noema-btc__lede {
  color: var(--btc-muted) !important;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.55;
  margin-bottom: 0;
  max-width: 40rem;
}

.noema-btc__provenance {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  gap: 0.45rem;
}

.noema-btc__provenance span {
  background: rgb(255 255 255 / 4%);
  border: 1px solid var(--btc-line);
  border-radius: 999px;
  color: var(--btc-muted);
  font-family: var(--pst-font-family-monospace, ui-monospace, monospace);
  font-size: 0.7rem;
  padding: 0.38rem 0.68rem;
  white-space: nowrap;
}

.noema-btc__workspace {
  display: grid;
  grid-template-columns: minmax(17rem, 0.72fr) minmax(0, 1.8fr);
  min-height: 48rem;
}

.noema-btc__controls {
  background: rgb(4 17 14 / 55%);
  border-right: 1px solid var(--btc-line);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.noema-btc__section-heading {
  align-items: flex-start;
  display: flex;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.noema-btc__section-heading h3,
.noema-btc__diagnosis h3 {
  font-size: 1.18rem;
  line-height: 1.25;
  margin-bottom: 0;
}

.noema-btc__step {
  align-items: center;
  border: 1px solid rgb(93 226 165 / 45%);
  border-radius: 50%;
  color: var(--btc-green);
  display: inline-flex;
  flex: 0 0 auto;
  font-family: var(--pst-font-family-monospace, ui-monospace, monospace);
  font-size: 0.68rem;
  height: 2rem;
  justify-content: center;
  width: 2rem;
}

.noema-btc__select-label,
.noema-btc__faults legend {
  color: var(--btc-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.noema-btc select {
  appearance: none;
  background: var(--btc-panel)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8'%3E%3Cpath fill='none' stroke='%235de2a5' stroke-width='2' d='m1 1 6 6 6-6'/%3E%3C/svg%3E")
    right 0.9rem center / 0.7rem auto no-repeat;
  border: 1px solid var(--btc-line);
  border-radius: 0.65rem;
  color: var(--btc-ink);
  display: block;
  font: inherit;
  font-size: 0.92rem;
  margin-top: 0.45rem;
  min-height: 2.8rem;
  padding: 0.6rem 2.4rem 0.6rem 0.8rem;
  width: 100%;
}

.noema-btc__faults {
  border: 0;
  margin-bottom: 1rem;
  margin-top: 1.75rem;
  padding: 0;
}

.noema-btc__faults legend {
  margin-bottom: 0.55rem;
}

.noema-btc__fault {
  align-items: center;
  border-bottom: 1px solid var(--btc-line);
  cursor: pointer;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 5rem;
  padding: 0.8rem 0;
  position: relative;
}

.noema-btc__fault strong,
.noema-btc__fault small {
  display: block;
}

.noema-btc__fault strong {
  font-size: 0.9rem;
  line-height: 1.35;
}

.noema-btc__fault small {
  color: var(--btc-muted);
  font-size: 0.73rem;
  line-height: 1.4;
  margin-top: 0.18rem;
}

.noema-btc__fault input {
  height: 1.9rem;
  opacity: 0;
  position: absolute;
  right: 0;
  width: 3.4rem;
}

.noema-btc__switch {
  background: #263c35;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 999px;
  height: 1.65rem;
  position: relative;
  transition: background 160ms ease;
  width: 3rem;
}

.noema-btc__switch::after {
  background: #d8e6e0;
  border-radius: 50%;
  content: "";
  height: 1.15rem;
  left: 0.22rem;
  position: absolute;
  top: 0.2rem;
  transition: transform 160ms ease;
  width: 1.15rem;
}

.noema-btc__fault input:checked + .noema-btc__switch {
  background: #a6373c;
}

.noema-btc__fault input:checked + .noema-btc__switch::after {
  transform: translateX(1.32rem);
}

.noema-btc__fault input:focus-visible + .noema-btc__switch,
.noema-btc select:focus-visible,
.noema-btc button:focus-visible,
.noema-btc a:focus-visible {
  outline: 3px solid var(--btc-amber);
  outline-offset: 3px;
}

.noema-btc__reset {
  background: transparent;
  border: 1px solid rgb(93 226 165 / 45%);
  border-radius: 0.6rem;
  color: var(--btc-green);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  min-height: 2.65rem;
  padding: 0.55rem 0.8rem;
  width: 100%;
}

.noema-btc__reset:disabled,
.noema-btc select:disabled,
.noema-btc__faults:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.noema-btc__result {
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 2.25rem);
}

.noema-btc__verdict {
  align-items: center;
  background: rgb(93 226 165 / 8%);
  border: 1px solid rgb(93 226 165 / 28%);
  border-radius: 0.85rem;
  display: flex;
  gap: 1rem;
  padding: 1rem 1.15rem;
}

.noema-btc__verdict[data-verdict="broken"] {
  background: rgb(255 107 107 / 9%);
  border-color: rgb(255 107 107 / 35%);
}

.noema-btc__verdict-icon {
  align-items: center;
  border: 2px solid var(--btc-green);
  border-radius: 50%;
  display: flex;
  flex: 0 0 auto;
  height: 2.8rem;
  justify-content: center;
  width: 2.8rem;
}

.noema-btc__verdict-icon span {
  border-bottom: 2px solid var(--btc-green);
  border-right: 2px solid var(--btc-green);
  height: 0.8rem;
  transform: rotate(45deg) translate(-0.15rem, -0.1rem);
  width: 0.42rem;
}

.noema-btc__verdict[data-verdict="broken"] .noema-btc__verdict-icon {
  border-color: var(--btc-red);
}

.noema-btc__verdict[data-verdict="broken"] .noema-btc__verdict-icon span {
  border: 0;
  height: 1.1rem;
  position: relative;
  transform: none;
  width: 1.1rem;
}

.noema-btc__verdict[data-verdict="broken"] .noema-btc__verdict-icon span::before,
.noema-btc__verdict[data-verdict="broken"] .noema-btc__verdict-icon span::after {
  background: var(--btc-red);
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  top: 0.5rem;
  width: 1.1rem;
}

.noema-btc__verdict[data-verdict="broken"] .noema-btc__verdict-icon span::before {
  transform: rotate(45deg);
}

.noema-btc__verdict[data-verdict="broken"] .noema-btc__verdict-icon span::after {
  transform: rotate(-45deg);
}

.noema-btc__verdict h3,
.noema-btc__verdict p:last-child {
  margin-bottom: 0;
}

.noema-btc__verdict p:last-child {
  color: var(--btc-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.noema-btc__comparison {
  align-items: stretch;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: minmax(0, 1fr) minmax(9rem, 0.72fr) minmax(0, 1fr);
  margin-top: 1rem;
}

.noema-btc__metric-card,
.noema-btc__claim {
  background: var(--btc-panel);
  border: 1px solid var(--btc-line);
  border-radius: 0.8rem;
  min-width: 0;
  padding: 1rem;
}

.noema-btc__metric-card--candidate {
  border-color: rgb(93 226 165 / 35%);
}

.noema-btc__metric-role,
.noema-btc__claim > span {
  color: var(--btc-muted) !important;
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.noema-btc__metric-card h4 {
  font-size: 0.85rem;
  margin-bottom: 1.3rem;
  min-height: 2.15rem;
}

.noema-btc__metric-card > strong,
.noema-btc__claim > strong {
  display: block;
  font-family: var(--pst-font-family-monospace, ui-monospace, monospace);
  font-size: clamp(1.35rem, 2.6vw, 2.25rem);
  letter-spacing: -0.05em;
  line-height: 1;
  overflow-wrap: anywhere;
}

.noema-btc__metric-card > p:last-child,
.noema-btc__claim p {
  color: var(--btc-muted);
  font-size: 0.7rem;
  line-height: 1.4;
  margin-bottom: 0;
  margin-top: 0.7rem;
}

.noema-btc__claim {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.noema-btc__claim > strong {
  color: var(--btc-green);
  font-family: inherit;
  font-size: clamp(1.15rem, 2.2vw, 1.85rem);
  letter-spacing: -0.025em;
}

.noema-btc[data-state="broken"] .noema-btc__claim > strong {
  color: var(--btc-red);
}

.noema-btc__bars {
  border-bottom: 1px solid var(--btc-line);
  padding: 1.4rem 0 1.6rem;
}

.noema-btc__bars > div {
  align-items: center;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: minmax(8rem, 0.42fr) minmax(0, 1fr);
  margin-top: 0.6rem;
}

.noema-btc__bars > div > span:first-child {
  color: var(--btc-muted);
  font-size: 0.7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.noema-btc__bar-track {
  background: rgb(255 255 255 / 5%);
  border-radius: 999px;
  display: block;
  height: 0.52rem;
  overflow: hidden;
}

.noema-btc__bar-track > span {
  background: #8ca59c;
  border-radius: inherit;
  display: block;
  height: 100%;
  min-width: 2%;
  transition: width 220ms ease;
}

#btc-candidate-bar {
  background: var(--btc-green);
}

.noema-btc[data-state="broken"] #btc-candidate-bar {
  background: var(--btc-red);
}

.noema-btc__bars > p {
  color: var(--btc-muted);
  font-size: 0.68rem;
  line-height: 1.4;
  margin: 0.7rem 0 0;
}

.noema-btc__audit {
  padding-top: 1.6rem;
}

.noema-btc__checks {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin-bottom: 0;
  padding-left: 0;
}

.noema-btc__checks li {
  align-items: flex-start;
  background: rgb(255 255 255 / 3%);
  border: 1px solid var(--btc-line);
  border-radius: 0.65rem;
  display: flex;
  gap: 0.65rem;
  margin: 0;
  padding: 0.75rem;
}

.noema-btc__checks li > span {
  align-items: center;
  background: rgb(93 226 165 / 14%);
  border-radius: 50%;
  color: var(--btc-green);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 800;
  height: 1.35rem;
  justify-content: center;
  width: 1.35rem;
}

.noema-btc__checks li[data-check="fail"] {
  border-color: rgb(255 107 107 / 35%);
}

.noema-btc__checks li[data-check="fail"] > span {
  background: rgb(255 107 107 / 15%);
  color: var(--btc-red);
}

.noema-btc__checks strong,
.noema-btc__checks small {
  display: block;
}

.noema-btc__checks strong {
  font-size: 0.75rem;
  line-height: 1.35;
}

.noema-btc__checks small {
  color: var(--btc-muted);
  font-size: 0.66rem;
  line-height: 1.4;
  margin-top: 0.16rem;
}

.noema-btc__diagnosis {
  background: rgb(255 255 255 / 3%);
  border-left: 3px solid var(--btc-green);
  margin-top: 1rem;
  padding: 1rem 1rem 0.9rem;
}

.noema-btc[data-state="broken"] .noema-btc__diagnosis {
  border-left-color: var(--btc-red);
}

.noema-btc__diagnosis ul {
  color: var(--btc-muted);
  font-size: 0.76rem;
  line-height: 1.5;
  margin-bottom: 0;
  margin-top: 0.65rem;
  padding-left: 1.1rem;
}

.noema-btc__diagnosis li {
  margin: 0.28rem 0;
}

.noema-btc__boundary {
  align-items: center;
  background: rgb(255 200 87 / 7%);
  border-top: 1px solid rgb(255 200 87 / 22%);
  display: grid;
  gap: 0.8rem 1.25rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 1rem clamp(1.25rem, 3vw, 2rem);
}

.noema-btc__boundary strong {
  color: var(--btc-amber);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.noema-btc__boundary p {
  color: var(--btc-muted);
  font-size: 0.72rem;
  line-height: 1.4;
  margin-bottom: 0;
}

.noema-btc__boundary a {
  color: var(--btc-green);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .noema-btc__workspace {
    grid-template-columns: 1fr;
  }

  .noema-btc__controls {
    border-bottom: 1px solid var(--btc-line);
    border-right: 0;
  }

  .noema-btc__faults {
    display: grid;
    gap: 0 1.2rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .noema-btc__boundary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .noema-btc__hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .noema-btc__provenance {
    align-items: flex-start;
  }

  .noema-btc__comparison,
  .noema-btc__checks,
  .noema-btc__faults {
    grid-template-columns: 1fr;
  }

  .noema-btc__claim {
    min-height: 8rem;
    order: -1;
  }

  .noema-btc__bars > div {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .noema-btc__switch,
  .noema-btc__switch::after,
  .noema-btc__bar-track > span {
    transition: none;
  }
}
