/* Public Trust Center (CMR-2026-11-17-677).

   Every selector is prefixed trust_ and scoped under .trust_page. That is not tidiness: the
   approved design uses names like card, tile, mark, wrap and badge, every one of which already
   means something to Bootstrap 5 or to global.css, and an unprefixed .card here would restyle
   components across the whole platform.

   Tokens come from css/design_system.css, which header_files.php loads on every page. Nothing
   here declares a :root variable, so this file cannot change any other page. */

.trust_page
{
  font-family: var(--font);
  color: var(--ink);

  /* the fixed top navbar overlays the viewport, so both the sticky rail and the landing point of
     an anchor jump have to clear it. declared once here and read by both: restating it in two
     places is how a heading ends up pinned underneath the navbar. */
  --trust_sticky_top: 84px;
}

.trust_wrap
{
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---- hero ---- */

/* longhands, deliberately. this element also carries .trust_wrap, and a padding shorthand here
   overrides that rule's horizontal gutter -- which is how the hero came to sit flush against the
   screen edge on a phone and 16px out of line with every section below it on desktop. */
.trust_hero
{
  padding-top: 24px;
  padding-bottom: 26px;
}

.trust_hero h1
{
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

.trust_lede
{
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

/* the verified chip. a live-looking dot beside a date that is a real observation, not a build time */
.trust_live
{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius_pill);
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  box-shadow: var(--shadow_xs);
}

.trust_dot
{
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex: 0 0 auto;
}

/* ---- sections ---- */

.trust_section
{
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

.trust_section h2
{
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

/* ---- category rail beside the control list ---- */

.trust_controls_layout
{
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 36px;
  margin: 22px 0 0;
  align-items: start;
}

/* align-items: start on the grid is load-bearing, not cosmetic. a grid item is stretched to the
   row by default, which here is the full height of the control list -- a sticky box with no room
   to travel inside its own grid area never pins at all. */
.trust_catcol
{
  position: sticky;
  top: var(--trust_sticky_top);
}

.trust_catnav
{
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 2px solid var(--line);

  /* the link's own vertical padding, read back below and again by the pull-up, so the first label
     sits level with the first category heading. restating the number in three places is how that
     alignment drifts the day the padding changes. */
  --trust_rail_pad_y: 9px;
  margin-top: calc(var(--trust_rail_pad_y) * -1);
}

.trust_catnav a
{
  display: block;
  padding: var(--trust_rail_pad_y) 14px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--muted);
  text-decoration: none;
}

.trust_catnav a:hover
{
  color: var(--ink);
  text-decoration: none;
}

.trust_catnav a.trust_cat_on
{
  border-left-color: var(--brand);
  color: var(--brand);
}

/* the first heading sits level with the top of the rail; the rest keep their separation */
.trust_catlist > .trust_cathead:first-child
{
  margin-top: 0;
}

/* ---- category heading ---- */

.trust_cathead
{
  scroll-margin-top: var(--trust_sticky_top);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 10px;
  flex-wrap: wrap;
}

.trust_cathead h3
{
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

/* 41px puts this count on the same right edge as every group count below it: the card's 1px
   border, the summary's 16px padding, the 12px gap and the 12px marker column. */
.trust_cathead .trust_cnt
{
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  padding-right: 41px;
}

.trust_cathead p
{
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  flex: 1 0 100%;
}

/* ---- the control card ---- */

.trust_card
{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow_xs);
  overflow: hidden;
}

details.trust_dom
{
  border-top: 1px solid var(--line);
}

details.trust_dom:first-of-type
{
  border-top: none;
}

details.trust_dom > summary
{
  padding: 13px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
  color: var(--ink);
}

details.trust_dom > summary::-webkit-details-marker
{
  display: none;
}

/* the group name takes the slack. a three-item row spread edge to edge would put the count in
   the middle, where it drifts with the length of the name and no two counts line up. */
details.trust_dom > summary > span:first-child
{
  flex: 1 1 auto;
  min-width: 0;
}

details.trust_dom > summary .trust_dc
{
  flex: 0 0 auto;
  min-width: 78px;
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

details.trust_dom > summary::after
{
  content: '+';
  color: var(--muted);
  font-weight: 600;
  flex: 0 0 12px;
  width: 12px;
  text-align: right;
}

details.trust_dom[open] > summary::after
{
  content: '−';
}

details.trust_dom > summary:hover
{
  background: var(--page);
}

/* ---- the control rows ---- */

.trust_table
{
  width: 100%;
  border-collapse: collapse;
}

.trust_table td
{
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 13.5px;
}

.trust_table tr:last-child td
{
  border-bottom: none;
}

.trust_cname
{
  font-weight: 600;
  color: var(--ink);
}

.trust_cdesc
{
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 3px;
  max-width: 620px;
  line-height: 1.55;
}

.trust_mcell
{
  width: 56px;
  text-align: right;
  vertical-align: middle;
}

/* the mark asserts one thing only -- that this is a control we operate. the page says so once,
   at the head of the list, rather than repeating a word on every row. */
.trust_mark
{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

/* ---- requests ---- */

.trust_grid3
{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.trust_tile
{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow_xs);
}

.trust_tile h4
{
  margin: 0 0 5px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.trust_tile p
{
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.trust_tile .trust_meta
{
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
}

.trust_tile .trust_meta b
{
  color: var(--ink);
  font-weight: 600;
}

/* ---- unavailable ---- */

.trust_unavailable
{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin: 28px 0 40px;
  color: var(--muted);
  font-size: 14.5px;
}

@media (max-width: 860px)
{
  .trust_grid3
  {
    grid-template-columns: 1fr;
  }

  .trust_controls_layout
  {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  /* a sticky rail here would compete with the fixed bottom nav for the same screen, so the
     categories go back to a row that scrolls sideways */
  .trust_catcol
  {
    position: static;
  }

  .trust_catnav
  {
    flex-direction: row;
    gap: 8px;
    border-left: none;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .trust_catnav a
  {
    flex: 0 0 auto;
    margin-left: 0;
    border-left: none;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius_pill);
    padding: 7px 14px;
    font-size: 12.5px;
    color: var(--ink);
    box-shadow: var(--shadow_xs);
  }

  .trust_catnav a.trust_cat_on
  {
    border-color: var(--brand);
    color: var(--brand);
  }

  .trust_hero h1
  {
    font-size: 27px;
  }

  .trust_table td
  {
    padding-left: 13px;
    padding-right: 13px;
  }
}
