/* =========================================================
   Task 34.4 — Council Trust Final A+ (visual only)
   Approved Heritage Instrument + Manuscript history cues.
   Overrides polish.css / mkm-polish-27.2 Trust chrome only.
   Does NOT alter CTI algorithm, thresholds semantics (25/50/75),
   Seal 26.4, Convocation modal logic, or other sections.
   ========================================================= */

html.mkm-polish-27-2 #trust-view .trust-container {
  background: linear-gradient(180deg, #1a1b1f 0%, #15161a 100%);
  border-color: rgba(212, 175, 55, 0.16);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

html.mkm-polish-27-2 #trust-view .trust-header {
  border-bottom: 1px solid rgba(212, 175, 55, 0.16);
  padding-bottom: 16px;
  margin-bottom: 18px;
}

html.mkm-polish-27-2 #trust-view .trust-metrics {
  background: transparent;
  padding: 4px 0 16px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
  margin-bottom: 20px;
  gap: 24px;
}

html.mkm-polish-27-2 #trust-view .trust-tier {
  font-size: 28px;
  letter-spacing: 0.12em;
  font-weight: 600;
}

html.mkm-polish-27-2 #trust-view .trust-cti {
  font-size: 36px;
  letter-spacing: 0.02em;
  color: #F2EBD8;
}

html.mkm-polish-27-2 #trust-view .trust-cti-of {
  font-size: 15px;
  color: #A39C90 !important;
  font-weight: 500;
}

/* —— CTI scale: shared coordinate box; labels at exact % —— */
html.mkm-polish-27-2 #trust-view .trust-scale {
  margin-bottom: 22px;
  padding: 6px 0 0;
  position: relative;
  box-sizing: border-box;
}

html.mkm-polish-27-2 #trust-view .trust-track {
  position: relative !important;
  width: 100%;
  box-sizing: border-box;
  height: 4px !important;
  border-radius: 999px !important;
  overflow: visible !important;
  /* Real thresholds 25 / 50 / 75 (not polish 28/62 decorative stops) */
  background:
    linear-gradient(90deg,
      #6E1F2F 0%,
      #6E1F2F 25%,
      #8A7340 25%,
      #8A7340 50%,
      #3F6B4A 50%,
      #3F6B4A 75%,
      #C4A45A 75%,
      #C4A45A 100%) !important;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) !important;
  margin-bottom: 0 !important;
}

html.mkm-polish-27-2 #trust-view .trust-track::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  border-radius: inherit !important;
  opacity: 1 !important;
  z-index: 1;
  /* Replace polish dark veil with exact-percent hairline ticks */
  background-image:
    linear-gradient(90deg, transparent 0, transparent calc(25% - 0.5px), rgba(255,255,255,0.22) calc(25% - 0.5px), rgba(255,255,255,0.22) calc(25% + 0.5px), transparent calc(25% + 0.5px)),
    linear-gradient(90deg, transparent 0, transparent calc(50% - 0.5px), rgba(255,255,255,0.22) calc(50% - 0.5px), rgba(255,255,255,0.22) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(90deg, transparent 0, transparent calc(75% - 0.5px), rgba(255,255,255,0.22) calc(75% - 0.5px), rgba(255,255,255,0.22) calc(75% + 0.5px), transparent calc(75% + 0.5px)) !important;
  background-color: transparent !important;
}

html.mkm-polish-27-2 #trust-view .trust-marker {
  width: 11px !important;
  height: 11px !important;
  min-width: 11px !important;
  border-radius: 50% !important;
  z-index: 2;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  background:
    radial-gradient(circle at 35% 30%, #F6E7B2 0%, #D4AF37 42%, #8A6F28 100%) !important;
  border: 1px solid rgba(10, 10, 10, 0.85) !important;
  box-shadow:
    0 0 0 1px rgba(212, 175, 55, 0.35),
    0 1px 3px rgba(0, 0, 0, 0.55) !important;
  transition: left 600ms var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1)) !important;
}

html.mkm-polish-27-2 #trust-view .trust-scale-labels {
  display: block !important;
  position: relative;
  width: 100%;
  height: 1.35em;
  margin-top: 12px;
  padding: 0 !important;
  box-sizing: border-box;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #8F877C;
  justify-content: unset !important;
  gap: 0 !important;
}

html.mkm-polish-27-2 #trust-view .trust-scale-labels span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  line-height: 1.2;
  text-align: center;
}

html.mkm-polish-27-2 #trust-view .trust-scale-labels span:nth-child(1) { left: 0%; }
html.mkm-polish-27-2 #trust-view .trust-scale-labels span:nth-child(2) { left: 25%; }
html.mkm-polish-27-2 #trust-view .trust-scale-labels span:nth-child(3) { left: 50%; }
html.mkm-polish-27-2 #trust-view .trust-scale-labels span:nth-child(4) { left: 75%; }
html.mkm-polish-27-2 #trust-view .trust-scale-labels span:nth-child(5) { left: 100%; }

html.mkm-polish-27-2 #trust-view .trust-scale-labels span::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 1px;
  height: 6px;
  background: rgba(212, 175, 55, 0.4);
  transform: translateX(-50%);
  pointer-events: none;
}

/* —— Access / pills (Convocation remains clickable) —— */
html.mkm-polish-27-2 #trust-view .trust-access {
  background: rgba(255, 255, 255, 0.015);
  border: 0;
  border-top: 1px solid rgba(212, 175, 55, 0.14);
  border-bottom: 1px solid rgba(212, 175, 55, 0.14);
  border-radius: 0;
  box-shadow: none;
  padding: 6px 0;
  margin-bottom: 18px;
}

html.mkm-polish-27-2 #trust-view .trust-access-row {
  background: transparent !important;
  border-color: transparent;
  border-radius: 0;
  padding: 10px 6px !important;
}

html.mkm-polish-27-2 #trust-view .trust-access-row--clickable {
  cursor: pointer;
}

html.mkm-polish-27-2 #trust-view .trust-access-row--clickable:hover {
  background: rgba(212, 175, 55, 0.05) !important;
  border-color: transparent;
  transform: none;
}

html.mkm-polish-27-2 #trust-view .trust-pill {
  background: transparent;
  color: #D4AF37;
  border: 1px solid rgba(212, 175, 55, 0.45);
  box-shadow: none;
  font-weight: 600;
}

/* —— Compact factor cards —— */
html.mkm-polish-27-2 #trust-view .trust-factors {
  gap: 12px;
  margin-bottom: 18px;
}

html.mkm-polish-27-2 #trust-view .trust-factor-card {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-top: 1px solid rgba(212, 175, 55, 0.18);
  box-shadow: none;
  padding: 14px 16px !important;
  border-radius: 4px;
}

html.mkm-polish-27-2 #trust-view .trust-factor-header {
  margin-bottom: 6px;
}

html.mkm-polish-27-2 #trust-view .trust-chip {
  background: transparent !important;
  color: #D4AF37 !important;
  border: 1px solid rgba(212, 175, 55, 0.45) !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  font-weight: 600;
  font-size: 13px !important;
  padding: 3px 10px !important;
  letter-spacing: 0.04em;
}

html.mkm-polish-27-2 #trust-view .trust-factor-sub {
  font-size: 12px;
  line-height: 1.35;
}

html.mkm-polish-27-2 #trust-view .trust-log {
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(212, 175, 55, 0.14);
  border-radius: 0;
  box-shadow: none;
  padding: 14px 0 0;
  margin-bottom: 4px;
}

/* —— Trust History —— */
html.mkm-polish-27-2 #trust-view .trust-history {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
}

html.mkm-polish-27-2 #trust-view .trust-history-title {
  font-family: "Cormorant Garamond", serif;
  letter-spacing: 0.14em;
  font-weight: 600;
  font-size: 1.05rem;
}

html.mkm-polish-27-2 #trust-view .trust-history-note {
  letter-spacing: 0.1em;
}

html.mkm-polish-27-2 #trust-view .trust-history-head {
  margin-bottom: 10px;
}

html.mkm-polish-27-2 #trust-view .trust-history-timeline {
  padding-left: 20px;
}

html.mkm-polish-27-2 #trust-view .trust-history-timeline::before {
  left: 3px;
  width: 1px;
  top: 6px;
  bottom: 6px;
  background: linear-gradient(
    to bottom,
    rgba(212, 175, 55, 0.55),
    rgba(212, 175, 55, 0.22) 40%,
    rgba(212, 175, 55, 0.08)
  );
}

html.mkm-polish-27-2 #trust-view .trust-history-item {
  padding: 11px 4px 11px 8px;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  border-radius: 0;
}

html.mkm-polish-27-2 #trust-view .trust-history-item:last-child {
  border-bottom: 0;
}

html.mkm-polish-27-2 #trust-view .trust-history-item:hover {
  background: rgba(212, 175, 55, 0.03);
}

html.mkm-polish-27-2 #trust-view .trust-history-dot {
  left: -20px;
  width: 6px;
  height: 6px;
  background: rgba(212, 175, 55, 0.65);
  box-shadow: 0 0 0 2px #15161a;
}

html.mkm-polish-27-2 #trust-view .trust-history-item:first-child .trust-history-dot {
  background: #D4AF37;
  box-shadow: 0 0 0 2px #15161a, 0 0 0 3px rgba(212, 175, 55, 0.25);
}

html.mkm-polish-27-2 #trust-view .trust-history-date {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #B0A898;
}

html.mkm-polish-27-2 #trust-view .trust-history-label {
  font-size: 14px;
  line-height: 1.35;
}

html.mkm-polish-27-2 #trust-view .trust-history-amount {
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  min-width: 3.4em;
  text-align: right;
  letter-spacing: 0.02em;
}

html.mkm-polish-27-2 #trust-view .trust-history-value {
  min-width: 4.75rem;
}

html.mkm-polish-27-2 #trust-view .trust-history-unit {
  font-size: 10px;
  letter-spacing: 0.12em;
}

@media (max-width: 900px) {
  html.mkm-polish-27-2 #trust-view .trust-metrics {
    flex-wrap: wrap;
  }
  html.mkm-polish-27-2 #trust-view .trust-meta {
    margin-left: 0;
    width: 100%;
  }
  html.mkm-polish-27-2 #trust-view .trust-factors {
    grid-template-columns: 1fr;
  }
  html.mkm-polish-27-2 #trust-view .trust-tier {
    font-size: 24px;
  }
  html.mkm-polish-27-2 #trust-view .trust-cti {
    font-size: 30px;
  }
  html.mkm-polish-27-2 #trust-view .trust-history-date {
    font-size: 11px;
  }
  html.mkm-polish-27-2 #trust-view .trust-history-label,
  html.mkm-polish-27-2 #trust-view .trust-history-amount {
    font-size: 13px;
  }
}
