/**
 * BI Trust Demo — Presence
 * Paper / ink / forest. Interactive executive-pack rebuild.
 */
.bi-demo-page {
  background: var(--bg-primary);
}

.bi-atmosphere {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
  background:
    linear-gradient(165deg, rgba(243, 241, 236, 0.9) 24%, rgba(243, 241, 236, 0.72) 100%),
    url('/assets/presence-atmosphere.jpg') center 35% / cover no-repeat;
}

.bi-atmosphere::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 4rem;
  background: linear-gradient(to bottom, transparent, var(--bg-primary));
  pointer-events: none;
}

.bi-shell {
  position: relative;
  z-index: 1;
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.75rem 1.25rem 1.5rem;
}

.bi-hero__title {
  margin: 0.4rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 3.1rem);
  font-weight: 560;
  line-height: 1.05;
  max-width: 14ch;
  color: var(--text-heading);
}

.bi-hero__lede {
  margin-top: 1rem;
  max-width: 36rem;
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.bi-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 1.1rem 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.bi-hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.bi-hero__meta span::before {
  content: '';
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--accent-start);
}

.bi-hero__note {
  margin: 1.25rem 0 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 36rem;
}

.bi-body {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1.25rem 4.5rem;
}

.bi-panel {
  margin-top: 0.5rem;
  padding: 1.65rem 1.4rem 1.45rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

.bi-panel.is-entering {
  animation: bi-enter 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes bi-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bi-panel.is-entering {
    animation: none;
  }
}

.bi-progress {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.bi-progress__bar {
  height: 3px;
  background: rgba(18, 18, 18, 0.08);
  margin-bottom: 1.35rem;
}

.bi-progress__fill {
  height: 100%;
  width: 0;
  background: var(--accent-start);
  transition: width 320ms ease;
}

.bi-steps {
  list-style: none;
  display: flex;
  gap: 0.35rem;
  margin: 0 0 1.35rem;
  padding: 0;
}

.bi-steps li {
  flex: 1;
  height: 3px;
  background: rgba(18, 18, 18, 0.1);
}

.bi-steps li.is-done,
.bi-steps li.is-current {
  background: var(--accent-start);
}

.bi-steps li.is-current {
  opacity: 0.55;
}

.bi-scene-label {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.bi-pack {
  padding: 1.15rem 1.1rem 1.2rem;
  background: var(--bg-primary);
  border-left: 2px solid var(--accent-start);
}

.bi-pack__org {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.bi-pack__title {
  margin: 0.25rem 0 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 560;
  line-height: 1.2;
}

.bi-pack__asof {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.bi-metrics {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.bi-metric {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1rem;
  padding: 0.75rem 0.85rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  transition: border-color 200ms ease, background 200ms ease;
}

.bi-metric.is-conflict {
  border-color: rgba(139, 46, 46, 0.35);
}

.bi-metric.is-trusted {
  border-color: rgba(31, 74, 67, 0.45);
  background: rgba(31, 74, 67, 0.04);
}

.bi-metric__name {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.bi-metric__src {
  margin: 0;
  grid-column: 1;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.bi-metric__value {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 560;
  line-height: 1;
  color: var(--text-heading);
}

.bi-metric.is-conflict .bi-metric__value {
  color: #8b2e2e;
}

.bi-metric.is-trusted .bi-metric__value {
  color: var(--accent-start);
}

.bi-pack__ask {
  margin: 1.1rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.95rem;
  line-height: 1.45;
}

.bi-pack__ask strong {
  color: var(--accent-start);
}

.bi-copy {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.bi-copy--muted {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.bi-choices {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.bi-choice {
  display: block;
  cursor: pointer;
}

.bi-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bi-choice__face {
  display: block;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-primary);
  font-size: 0.95rem;
  line-height: 1.4;
  transition: border-color 160ms ease, background 160ms ease;
}

.bi-choice input:focus-visible + .bi-choice__face {
  outline: 2px solid var(--accent-start);
  outline-offset: 2px;
}

.bi-choice input:checked + .bi-choice__face,
.bi-choice:hover .bi-choice__face {
  border-color: var(--accent-start);
  background: rgba(31, 74, 67, 0.05);
}

.bi-glossary {
  margin: 1.15rem 0 0;
  padding: 1rem 1.05rem;
  background: var(--bg-primary);
  border-left: 2px solid var(--accent-start);
}

.bi-glossary h3 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.bi-glossary dl {
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.bi-glossary dt {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.bi-glossary dd {
  margin: 0.15rem 0 0;
  font-size: 0.92rem;
  line-height: 1.4;
}

.bi-leave {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  counter-reset: leave;
}

.bi-leave li {
  position: relative;
  padding: 0.95rem 1rem 1rem;
  background: var(--bg-primary);
  border-left: 2px solid var(--accent-start);
  counter-increment: leave;
}

.bi-leave strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.bi-leave strong::before {
  content: counter(leave) '. ';
  color: var(--accent-start);
}

.bi-leave span {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.bi-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.bi-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 8rem;
  padding: 0.85rem 1.2rem;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-heading);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  text-decoration: none;
}

.bi-btn-secondary:hover {
  border-color: var(--accent-start);
  color: var(--accent-start);
}

.bi-error {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: #8a4b16;
  min-height: 1.2em;
}

.bi-foot {
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.bi-related {
  margin-top: 0.85rem;
  font-size: 0.9rem;
}

.bi-related a {
  color: var(--accent-start);
  font-weight: 600;
}

@media (min-width: 640px) {
  .bi-shell {
    padding-top: 3.5rem;
  }

  .bi-panel {
    padding: 2rem 1.85rem 1.65rem;
  }

  .bi-metrics {
    grid-template-columns: 1fr;
  }
}
