/* Trust & Environment Centre, version 2.
   A topic rail with one open panel: every item in a topic is readable at once.
   Without JavaScript the rail is a list of links and all seven panels show in order. */

.managed-trust-v2 .site-header {
  position: sticky;
  top: 0;
}

.managed-trust-v2 {
  --tc-line: #465348;
  --tc-card: #252e29;
  --tc-card-line: #47534b;
  --tc-top: 117px;
}

/* ---------- commitment banner and heading ---------- */
.tc-commitment {
  background: #28352e;
  border-bottom: 1px solid #445348;
  color: var(--ink);
  padding-block: 15px;
  font-size: 15px;
  line-height: 1.5;
}
.tc-commitment p { max-width: 106ch; }
.tc-commitment strong { font-weight: 650; }

.tc-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: end;
  padding: clamp(20px, 2.2vw, 32px) 0 clamp(18px, 2vw, 26px);
}
.tc-heading h1 {
  font-family: var(--f-head);
  font-size: clamp(34px, 3.4vw, 48px);
  font-weight: 590;
  line-height: 1.07;
  letter-spacing: -.043em;
  text-wrap: balance;
}
.tc-heading p {
  color: var(--reading);
  line-height: 1.53;
}
.tc-heading h1 + p {
  max-width: 68ch;
  margin-top: 12px;
}
.tc-aside {
  padding-left: 22px;
  border-left: 2px solid var(--amber);
}
.tc-aside p { font-size: 16px; }
.tc-aside .tc-owner {
  margin-top: 10px;
  font-size: 14px;
}

/* ---------- explorer: rail and panels ---------- */
.tc-explorer {
  display: grid;
  grid-template-columns: 318px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding-bottom: clamp(38px, 5vw, 72px);
}

.tc-rail {
  position: sticky;
  top: calc(var(--tc-top) + 14px);
  border-top: 1px solid var(--tc-line);
}
.tc-tab {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 2px 8px;
  align-items: baseline;
  padding: 9px 12px 10px 12px;
  border-bottom: 1px solid var(--tc-line);
  border-left: 2px solid transparent;
  color: var(--ink);
  text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease;
}
.tc-tab:hover { background: #1c2320; }
.tc-tab:focus-visible { outline-offset: -3px; }
.tc-num {
  font: 500 12px/1 var(--f-mono);
  color: var(--amber);
}
.tc-tab-title {
  font-size: 16px;
  font-weight: 590;
  line-height: 1.26;
  letter-spacing: -.016em;
}
.tc-tab-sum {
  grid-column: 2;
  color: var(--reading);
  font-size: 12.5px;
  line-height: 1.38;
}
.tc-tab[aria-selected="true"] {
  background: var(--sheet);
  border-left-color: var(--amber);
}
.tc-tab[aria-selected="true"] .tc-tab-sum { color: #dfe4de; }

.tc-panel {
  background: var(--sheet);
  border: 1px solid #39423c;
  border-radius: 14px;
  padding: clamp(20px, 2.2vw, 30px);
  scroll-margin-top: calc(var(--tc-top) + 14px);
}
.tc-panel + .tc-panel { margin-top: 22px; }
.tc-panel[hidden] { display: none; }
.js .tc-panel { min-height: var(--tc-rail-h, 0px); }
.js .tc-panel + .tc-panel { margin-top: 0; }

.tc-panel-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px;
  align-items: baseline;
  margin-bottom: 20px;
}
.tc-panel-head h2 {
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 585;
  line-height: 1.14;
  letter-spacing: -.032em;
}
.tc-panel-sum {
  grid-column: 2;
  color: var(--reading);
  font-size: 15px;
  line-height: 1.45;
}
@media (min-width: 861px) {
  .js .tc-panel-sum { display: none; }
}

/* ---------- cards ---------- */
.tc-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.tc-cards > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.tc-card {
  padding: 16px 18px 18px;
  background: var(--tc-card);
  border: 1px solid var(--tc-card-line);
  border-top: 2px solid #78633c;
  border-radius: 10px;
  scroll-margin-top: calc(var(--tc-top) + 20px);
}
.tc-card h3 {
  font-size: 17px;
  font-weight: 590;
  line-height: 1.28;
  letter-spacing: -.018em;
  color: var(--ink);
}
.tc-card p,
.tc-card li {
  color: var(--reading);
  font-size: 15px;
  line-height: 1.56;
}
.tc-card p { margin-top: 8px; }
.tc-card strong { color: var(--ink); font-weight: 590; }
.tc-card--wide { grid-column: 1 / -1; }
.tc-card.is-target {
  border-color: var(--amber);
  box-shadow: 0 0 0 1px var(--amber);
}

/* rows inside a card: supplier name, then what its certificate covers */
.tc-rows { margin-top: 8px; }
.tc-rows li {
  padding: 8px 0;
  border-top: 1px solid var(--tc-line);
}
.tc-rows li:first-child { border-top: 0; padding-top: 0; }
.tc-rows li:last-child { padding-bottom: 0; }

/* ---------- hosting sketch (labels repeat the supplier table) ---------- */
.tc-sites {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(44px, 9%, 96px) minmax(0, 1fr);
  align-items: center;
  margin-bottom: 12px;
}
.tc-site {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 2px 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #67776b;
  border-radius: 10px;
  background: #1b221e;
}
.tc-site::before {
  content: "";
  grid-row: span 2;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--amber);
}
.tc-site--standby::before {
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--amber);
}
.tc-site b {
  font-size: 16px;
  font-weight: 590;
  color: var(--ink);
}
.tc-site span {
  grid-column: 2;
  font-size: 13px;
  color: var(--reading);
}
.tc-site i {
  grid-column: 3;
  grid-row: 1 / span 2;
  padding: 3px 8px;
  border: 1px solid #67776b;
  border-radius: 5px;
  font: 500 12px/1.2 var(--f-mono);
  font-style: normal;
  color: var(--ink);
}
.tc-link {
  height: 1px;
  background: repeating-linear-gradient(90deg, #87978a 0 6px, transparent 6px 11px);
}

/* ---------- traffic: one lead line, eight protections ---------- */
.tc-lead {
  max-width: 78ch;
  color: var(--reading);
  font-size: 16px;
  line-height: 1.56;
}
.tc-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 22px;
  margin-top: 18px;
}
.tc-tiles li {
  padding: 13px 0 15px;
  border-top: 1px solid var(--tc-line);
  color: var(--reading);
  font-size: 14px;
  line-height: 1.5;
}
.tc-tiles strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 590;
  line-height: 1.3;
}
.tc-tiles strong::before {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  margin-bottom: 10px;
  background: var(--amber);
}

/* ---------- environment ---------- */
.tc-env {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(22px, 3.4vw, 44px);
  align-items: start;
}
.tc-env h3 {
  font-size: 19px;
  font-weight: 590;
  letter-spacing: -.02em;
  color: var(--ink);
}
.tc-env p {
  margin-top: 9px;
  color: var(--reading);
  font-size: 16px;
  line-height: 1.58;
}
.tc-reports {
  padding: 16px 18px 6px;
  background: var(--tc-card);
  border: 1px solid var(--tc-card-line);
  border-radius: 10px;
}
.tc-reports p {
  margin: 0;
  font-size: 15px;
  color: var(--ink);
}
.tc-reports ul { margin-top: 10px; }
.tc-reports li {
  position: relative;
  padding: 10px 0 10px 22px;
  border-top: 1px solid var(--tc-line);
  color: var(--reading);
  font-size: 15px;
  line-height: 1.45;
}
.tc-reports li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 17px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
}

/* ---------- suppliers table ---------- */
.tc-table {
  margin-top: 16px;
  border: 1px solid #536156;
  border-radius: 10px;
  overflow: hidden;
}
.tc-table table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
  line-height: 1.42;
}
.tc-table th,
.tc-table td {
  padding: 9px 14px;
  vertical-align: top;
  border-bottom: 1px solid var(--tc-line);
}
.tc-table thead th {
  background: #2a372f;
  color: var(--ink);
  font-size: 12px;
  font-weight: 620;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.tc-table tbody th {
  color: var(--ink);
  font-weight: 590;
  white-space: nowrap;
}
.tc-table td { color: var(--reading); }
.tc-table tbody tr:last-child > * { border-bottom: 0; }
.tc-table tbody tr:hover > * { background: #232c27; }
.tc-table .tc-later { color: #9ba79e; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .tc-panel.is-entering { animation: tc-in .2s ease-out both; }
  @keyframes tc-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
  }
}

/* ---------- narrower laptops and tablets ---------- */
@media (max-width: 1100px) {
  .tc-explorer { grid-template-columns: 270px minmax(0, 1fr); gap: 18px; }
  .tc-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- phones: the rail becomes a strip of topics that scrolls sideways ---------- */
@media (max-width: 860px) {
  .tc-heading { grid-template-columns: 1fr; gap: 18px; align-items: start; }
  .tc-explorer { display: block; }
  .tc-rail {
    display: flex;
    gap: 4px 18px;
    top: var(--tc-top);
    z-index: 5;
    margin-inline: calc(50% - 50vw);
    padding-inline: calc(50vw - 50%);
    overflow-x: auto;
    scrollbar-width: none;
    background: #171d1a;
    border-top: 0;
    border-bottom: 1px solid var(--tc-line);
  }
  .tc-rail::-webkit-scrollbar { display: none; }
  .no-js .tc-rail { flex-wrap: wrap; position: static; }
  .tc-tab {
    flex: none;
    grid-template-columns: auto auto;
    gap: 7px;
    padding: 12px 0 10px;
    border-left: 0;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
  }
  .tc-tab:hover { background: none; }
  .tc-tab-title { font-size: 15px; font-weight: 540; color: var(--reading); }
  .tc-tab-sum { display: none; }
  .tc-tab[aria-selected="true"] { background: none; border-bottom-color: var(--amber); }
  .tc-tab[aria-selected="true"] .tc-tab-title { color: var(--ink); }
  .tc-panel {
    margin-top: 16px;
    padding: 18px 16px 20px;
    scroll-margin-top: calc(var(--tc-top) + 60px);
  }
  .js .tc-panel { min-height: 0; }
  .js .tc-panel + .tc-panel { margin-top: 16px; }
  .tc-cards { grid-template-columns: 1fr; }
  .tc-sites { grid-template-columns: 1fr; }
  .tc-link {
    width: 1px;
    height: 16px;
    margin-left: 20px;
    background: repeating-linear-gradient(180deg, #87978a 0 5px, transparent 5px 9px);
  }
  .tc-env { grid-template-columns: 1fr; }
  .tc-commitment { font-size: 14px; }

  /* the table becomes one small record per supplier */
  .tc-table { border: 0; border-radius: 0; overflow: visible; }
  .tc-table table, .tc-table tbody, .tc-table tr, .tc-table th, .tc-table td { display: block; }
  .tc-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .tc-table tbody tr {
    padding: 12px 14px;
    border: 1px solid var(--tc-card-line);
    border-radius: 10px;
    background: var(--tc-card);
  }
  .tc-table tbody tr + tr { margin-top: 10px; }
  .tc-table tbody tr:hover > * { background: none; }
  .tc-table th, .tc-table td { padding: 0; border: 0; }
  .tc-table tbody th { font-size: 16px; white-space: normal; }
  .tc-table td {
    display: grid;
    grid-template-columns: 6.4rem minmax(0, 1fr);
    gap: 10px;
    margin-top: 6px;
  }
  .tc-table td::before {
    content: attr(data-label);
    color: #9ba79e;
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding-top: 2px;
  }
}
@media (max-width: 520px) {
  .tc-tiles { grid-template-columns: 1fr; }
  .tc-site { padding: 12px 14px; }
}

/* item heading where a panel holds a single item */
.tc-sub {
  font-size: 19px;
  font-weight: 590;
  letter-spacing: -.02em;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 8px;
}
