/* MTSAi — shared engagement patterns (loads after bundle; uses DS tokens) */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Architecture toggle + detail (technology platform, etc.) --- */
.eng-arch-explorer {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: start;
}
@media (min-width: 900px) {
  .eng-arch-explorer {
    grid-template-columns: minmax(240px, 1fr) minmax(280px, 1.15fr);
  }
}

.eng-arch-stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.eng-arch-layer-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--space-5) var(--space-6);
  border: 1px solid var(--blue-20);
  border-left: 3px solid var(--interactive);
  background: #fff;
  box-shadow: 0 1px 4px rgba(13, 148, 136, 0.06);
  cursor: pointer;
  font: inherit;
  transition: border-left-color 200ms, background 200ms, transform 150ms, box-shadow 200ms;
  border-radius: 0;
  min-height: 44px;
}

.eng-arch-layer-btn:hover {
  background: var(--blue-10);
  border-left-color: var(--brand-primary);
  transform: translateX(4px);
}

.eng-arch-layer-btn:focus-visible {
  outline: 2px solid var(--interactive);
  outline-offset: 2px;
}

.eng-arch-layer-btn[aria-pressed="true"] {
  border-color: var(--interactive);
  box-shadow: var(--shadow-blue, 0 4px 20px rgba(13, 148, 136, 0.12));
  transform: translateX(4px);
}

.eng-arch-layer-btn--engine {
  border-left-color: var(--brand-primary);
  background: rgba(83, 170, 0, 0.04);
  border-color: rgba(83, 170, 0, 0.25);
}

.eng-arch-layer-btn--engine:hover {
  background: rgba(83, 170, 0, 0.08);
}

.eng-arch-layer-btn--ai {
  border-left-color: var(--gray-40, #a8a8a8);
}

.eng-arch-layer-btn--ai:not([aria-pressed="true"]) {
  opacity: 0.68;
}

.eng-arch-layer-btn--ai[aria-pressed="true"] {
  opacity: 1;
}

.eng-arch-detail {
  padding: var(--space-7);
  background: #fff;
  border: 1px solid var(--blue-20);
  box-shadow: 0 4px 24px rgba(13, 148, 136, 0.08);
  min-height: 12rem;
}

.eng-arch-detail__kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--interactive);
  margin: 0 0 var(--space-3);
}

.eng-arch-detail__title {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 var(--space-4);
  line-height: 1.25;
}

.eng-arch-detail__body {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.72;
  margin: 0;
}

/* --- Framing / toggle compare --- */
.eng-framing {
  margin-bottom: var(--space-10);
  padding: var(--space-7);
  border: 1px solid var(--blue-20);
  background: var(--layer-01);
}

.eng-framing__intro {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0 0 var(--space-5);
}

.eng-framing__stack {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.eng-framing__btn {
  flex: 1 1 140px;
  min-height: 44px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--blue-20);
  background: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 160ms, background 160ms, color 160ms;
}

.eng-framing__btn[aria-pressed="true"] {
  border-color: var(--interactive);
  color: var(--interactive);
  background: var(--blue-alpha-08, rgba(13, 148, 136, 0.08));
}

.eng-framing__btn:focus-visible {
  outline: 2px solid var(--interactive);
  outline-offset: 2px;
}

.eng-framing__panel {
  padding: var(--space-6);
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--cta-primary);
}

.eng-framing__kicker {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: 0 0 var(--space-2);
}

.eng-framing__title {
  font-family: var(--font-display);
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 600;
  margin: 0 0 var(--space-3);
  color: var(--text-primary);
}

.eng-framing__body {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-secondary);
  margin: 0;
}

/* --- Phase strip (deployment roadmap) --- */
.eng-phase-strip {
  margin-bottom: var(--space-8);
  padding: var(--space-5);
  border: 1px solid var(--blue-20);
  background: #fff;
}

.eng-phase-strip__label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: var(--space-4);
}

.eng-phase-strip__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.eng-phase-strip__btn {
  flex: 1 1 120px;
  min-height: 48px;
  padding: var(--space-3) var(--space-3);
  border: 1px solid var(--blue-20);
  background: var(--layer-01);
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms, background 160ms, box-shadow 160ms;
}

.eng-phase-strip__btn[aria-pressed="true"] {
  border-color: var(--interactive);
  background: #fff;
  box-shadow: 0 2px 12px rgba(13, 148, 136, 0.1);
}

.eng-phase-strip__btn:focus-visible {
  outline: 2px solid var(--interactive);
  outline-offset: 2px;
}

.eng-phase-strip__num {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--interactive);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.eng-phase-strip__name {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.eng-phase-strip__meta {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.eng-phase-panel {
  padding: var(--space-5);
  background: var(--layer-01);
  border: 1px solid var(--border-subtle);
}

.eng-phase-panel__title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 var(--space-2);
  color: var(--text-primary);
}

.eng-phase-panel__meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--interactive);
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
}

.eng-phase-panel__body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}

/* --- TOC spy active (side nav + toc list) --- */
.mts-side-nav__item.active,
.toc-list a.active,
.mts-article-toc a.active {
  color: var(--interactive) !important;
  border-left-color: var(--interactive) !important;
  font-weight: 600;
}

/* --- In-view highlight (cards, list rows) --- */
[data-inview-item].eng-inview-active {
  box-shadow: 0 4px 24px rgba(15, 98, 254, 0.1);
  border-color: var(--interactive) !important;
  transform: translateY(-1px);
  transition: box-shadow 200ms ease, border-color 200ms ease, transform 200ms ease;
}

@media (prefers-reduced-motion: reduce) {
  [data-inview-item].eng-inview-active {
    transition: none;
    transform: none;
  }
}

/* --- Filter chips (capability map) --- */
.eng-filter {
  padding: var(--space-6);
  border: 1px solid var(--blue-20);
  background: #fff;
  box-shadow: 0 4px 24px rgba(13, 148, 136, 0.08);
}

.eng-filter__label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: var(--space-4);
}

.eng-filter__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.eng-chip {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--blue-20);
  background: var(--layer-01);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: border-color 160ms, background 160ms, color 160ms;
}

.eng-chip[aria-pressed="true"] {
  border-color: var(--interactive);
  background: #fff;
  color: var(--interactive);
}

.eng-chip:focus-visible {
  outline: 2px solid var(--interactive);
  outline-offset: 2px;
}

.eng-filter__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 900px) {
  .eng-filter__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.eng-cap-card {
  padding: var(--space-6);
  border: 1px solid var(--border-subtle);
  background: #fff;
}

.eng-cap-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--interactive);
  margin-bottom: var(--space-3);
}

.eng-cap-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--space-3);
}

.eng-cap-body {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

/* --- Legal / policy disclosure stack --- */
.policy-fold {
  border: 1px solid var(--border-subtle);
  background: #fff;
  margin-bottom: var(--space-4);
  scroll-margin-top: 88px;
}

.policy-fold:first-of-type {
  margin-top: 0;
}

.policy-fold__summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-5) var(--space-6);
  font-family: var(--font-display);
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 48px;
}

.policy-fold__summary::-webkit-details-marker {
  display: none;
}

.policy-fold__summary::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-saffron);
  flex-shrink: 0;
}

.policy-fold[open] .policy-fold__summary {
  border-bottom: 1px solid var(--border-subtle);
  background: var(--layer-01);
}

.policy-fold__panel {
  padding: var(--space-5) var(--space-6) var(--space-6);
}

.policy-fold__panel p,
.policy-fold__panel ul,
.policy-fold__panel ol {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

.policy-fold__panel ul li {
  list-style-type: disc;
}

.policy-fold__summary:focus-visible {
  outline: 2px solid var(--interactive);
  outline-offset: -2px;
}

@media (prefers-reduced-motion: reduce) {
  .eng-arch-layer-btn,
  .eng-framing__btn,
  .eng-phase-strip__btn {
    transition: none;
  }
  .eng-arch-layer-btn:hover,
  .eng-arch-layer-btn[aria-pressed="true"] {
    transform: none;
  }
}

/* Trust centre pages — policy folds in prose stack */
.mts-policy-disclosure > .policy-fold:first-child {
  margin-top: 0;
}

.trust-disclosure-stack {
  border-bottom: 1px solid var(--border-subtle);
}

.trust-policy-fold {
  margin-bottom: 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
}

.trust-policy-fold .policy-fold__panel .trust-body {
  margin-bottom: var(--space-5);
}

.trust-policy-fold .policy-fold__panel .trust-body:last-child {
  margin-bottom: 0;
}

.trust-policy-fold .policy-fold__panel .trust-card {
  margin: 0;
}

@media print {
  .policy-fold {
    break-inside: avoid;
  }
}
