/* Trust Center (extends site tokens from ../../styles.css) */

.trust-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--cream);
}

.trust-topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 248, 0.92);
  backdrop-filter: saturate(1.2) blur(8px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.trust-topbar__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.trust-topbar a.home {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
}

.trust-topbar a.home:hover {
  color: var(--ink-2);
}

.trust-topbar__brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.trust-topbar__brand img {
  height: 28px;
  width: auto;
  display: block;
}
.trust-topbar__brand:hover { opacity: 0.85; }

.trust-topbar__meta {
  margin-right: auto;
  font-size: 12px;
  color: var(--muted);
}

.trust-shell {
  flex: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 64px;
  width: 100%;
}

.trust-hero {
  margin-bottom: 28px;
}

.trust-hero h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  color: var(--ink);
}

.trust-hero p {
  margin: 0;
  max-width: 72ch;
  color: var(--muted);
  font-size: 15px;
}

.trust-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 18px;
  padding: 14px 18px;
  background: var(--sage);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--ink);
}

.trust-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Tabs (Drata-style) */
.trust-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

.trust-tabs button {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  border-radius: 10px 10px 0 0;
  border: 1px solid transparent;
  border-bottom: 0;
  margin-bottom: -1px;
  background: transparent;
}

.trust-tabs button:hover {
  color: var(--ink);
  background: rgba(245, 217, 196, 0.35);
}

.trust-tabs button[aria-selected="true"] {
  color: var(--ink);
  background: var(--cream);
  border-color: var(--line);
  border-bottom-color: var(--cream);
  box-shadow: 0 -2px 0 var(--lime) inset;
}

.trust-panel {
  display: none;
  animation: trustFade 0.2s ease;
}

.trust-panel[aria-hidden="false"] {
  display: block;
}

@keyframes trustFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Overview cards */
.trust-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.trust-card {
  text-align: right;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--cream);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  font: inherit;
  color: inherit;
  width: 100%;
}

.trust-card:hover {
  border-color: rgba(46, 25, 13, 0.22);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.trust-card:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.trust-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}

.trust-card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.trust-card__go {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

/* Control category blocks */
.trust-section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  margin: 32px 0 14px;
}

.trust-section-title:first-child {
  margin-top: 0;
}

.trust-control-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--cream);
}

.trust-control-block header {
  display: block;
  padding: 14px 18px;
  background: var(--sage);
  border-bottom: 1px solid var(--line);
}

.trust-control-block__title {
  font-weight: 600;
  font-size: 15px;
  margin: 0;
}

.trust-control-block__subtitle {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.55;
  max-width: 85ch;
}

.trust-tags-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 22px;
  padding: 12px 14px;
  background: var(--mint);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12px;
}

.trust-tags-legend__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 340px;
  line-height: 1.45;
}

.trust-tags-legend__item > .trust-tag {
  flex-shrink: 0;
  margin-top: 1px;
}

/* Control type pills — Title Case labels; distinct hues (Technical / Policy / Vendor only) */
.trust-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: help;
  white-space: nowrap;
}

.trust-tag--technical {
  background: rgba(245, 217, 196, 0.9);
  color: var(--ink);
  border-color: rgba(18, 84, 92, 0.3);
}

.trust-tag--policy {
  background: rgba(232, 228, 248, 0.98);
  color: #352f4a;
  border-color: rgba(95, 75, 145, 0.28);
}

.trust-tag--vendor {
  background: rgba(255, 236, 210, 0.98);
  color: #4a3410;
  border-color: rgba(184, 118, 45, 0.4);
}

.trust-control-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.trust-control-block ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.trust-control-block li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.45;
}

.trust-control-block li:last-child {
  border-bottom: 0;
}

.trust-control-line__body {
  flex: 1;
  min-width: 0;
}

.trust-control-line__title {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  margin: 0 0 6px;
}

.trust-control-line__text {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  max-width: 75ch;
}

.trust-law-map {
  margin: 10px 0 0;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-2);
  background: rgba(0, 0, 0, 0.03);
  border-radius: 6px;
  border-right: 3px solid var(--sage, #f8ede4);
  max-width: 78ch;
}

.trust-law-map strong {
  color: var(--ink);
  font-weight: 600;
}

.trust-law-map em {
  font-style: normal;
  font-weight: 500;
  color: var(--ink);
}


/* Status emoji — tooltip via title */
.trust-status {
  flex-shrink: 0;
  width: 1.5em;
  text-align: center;
  font-size: 1rem;
  line-height: 1.4;
  cursor: help;
}

.trust-prose {
  font-size: 14px;
  color: var(--muted);
  max-width: 75ch;
  line-height: 1.6;
}

.trust-prose strong {
  color: var(--ink);
}

.trust-prose--compact {
  font-size: 13px;
  max-width: 85ch;
  margin-top: 0;
  margin-bottom: 12px;
}

.trust-subh {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  margin: 32px 0 0;
  letter-spacing: -0.02em;
}


/* Tables */
.trust-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 16px;
}

.trust-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.trust-table th,
.trust-table td {
  padding: 12px 14px;
  text-align: right;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.trust-table th {
  background: var(--sage);
  font-weight: 600;
  white-space: nowrap;
}

.trust-table tr:last-child td {
  border-bottom: 0;
}

.trust-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.trust-resources {
  display: grid;
  gap: 12px;
  max-width: 56ch;
}

.trust-resources a {
  display: block;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--cream);
  font-weight: 600;
  font-size: 14px;
  transition: background 0.15s, border-color 0.15s;
}

.trust-resources a:hover {
  background: var(--mint);
  border-color: rgba(46, 25, 13, 0.2);
}

.trust-footnote {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  max-width: 80ch;
}

/* Inline term popovers — see tooltips.js */
.tt-term {
  border-bottom: 1px dotted rgba(46, 25, 13, 0.55);
  cursor: help;
  text-decoration: none;
}

.tt-term:hover,
.tt-term:focus-visible {
  border-bottom-color: var(--ink);
  background: rgba(245, 217, 196, 0.5);
  border-radius: 2px;
}

.tt-term:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.tt-bubble {
  position: absolute;
  z-index: 1000;
  max-width: 320px;
  padding: 10px 12px;
  background: var(--ink, #2e190d);
  color: #fffaf8;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
  text-transform: none;
  font-style: normal;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  white-space: normal;
}

.tt-bubble--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Headline result + citation — the accuracy benchmark pages (each region's
   validation report and methodology document, and the all-region junction).
   Someone citing the benchmark needs one number and one copy-paste line
   without scrolling, so both ship as real text in the page: they are in the
   HTML, and in the page's markdown twin, for a reader who runs no JS. */

.trust-headline {
  margin: 20px 0 24px;
  padding: 20px 22px;
  max-width: 80ch;
  border: 1px solid var(--line);
  border-right: 4px solid var(--lime);
  border-radius: var(--radius);
  background: #fff;
}

.trust-headline__value {
  margin: 0;
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(2.1rem, 6vw, 3rem);
  font-weight: 600;
  line-height: 1;
}

.trust-headline__unit {
  display: block;
  margin-top: 8px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.trust-headline__meta {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.trust-headline__detail {
  margin: 12px 0 0;
  max-width: 70ch;
  font-size: 14px;
  line-height: 1.6;
}

/* Several results rather than one — the junction page, where three regional
   stacks are graded separately and no single figure stands for all of them. */
.trust-headline__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 18px 24px;
}

.trust-headline__row .trust-headline__value { font-size: clamp(1.8rem, 5vw, 2.4rem); }

/* "How it was measured" — the method in the form a reviewer would need to
   criticise or replicate it. A description list, so each term is addressable. */
.trust-method {
  display: grid;
  grid-template-columns: minmax(11rem, 15rem) 1fr;
  gap: 10px 24px;
  margin: 0 0 18px;
  max-width: 90ch;
  font-size: 14px;
  line-height: 1.6;
}

.trust-method dt { font-weight: 600; }
.trust-method dd { margin: 0; color: var(--muted); }

@media (max-width: 620px) {
  .trust-method { grid-template-columns: 1fr; gap: 2px 0; }
  .trust-method dd { margin-bottom: 12px; }
}

/* Cite this — one plain-text line, selectable in a single drag. */
.trust-cite {
  margin: 36px 0 0;
  padding: 18px 20px;
  max-width: 80ch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--mint);
}

.trust-cite__label {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.trust-cite__line {
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--cream);
  border: 1px solid var(--line);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.trust-cite__note {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* Per-cohort WER table. Sits under "How this was measured" on a regional
   validation report: what each condition the corpus deliberately exercises
   actually costs. Cohorts overlap and several are a single recording, so the
   count and word total are columns rather than footnotes — the caption says
   the rows do not sum to the headline. Scrolls in its own box on a phone so
   the page body never scrolls sideways. */

.trust-cohorts {
  margin: 24px 0 0;
  max-width: 80ch;
}

.trust-cohorts__title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
}

.trust-cohorts__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.trust-cohorts__table caption {
  caption-side: bottom;
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  text-align: right;
}

.trust-cohorts__table th,
.trust-cohorts__table td {
  padding: 8px 0 8px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  vertical-align: baseline;
}

.trust-cohorts__table thead th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.trust-cohorts__table tbody th {
  font-weight: 500;
}

.trust-cohorts__table td:nth-child(2),
.trust-cohorts__table td:nth-child(3),
.trust-cohorts__table td:nth-child(4) {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Framework crosswalk (AU): seven dense columns, scrolls inside .trust-table-wrap */
.trust-table--crosswalk {
  min-width: 1080px;
  font-size: 13px;
}

.trust-table--crosswalk th {
  white-space: normal;
}

.trust-table--crosswalk td:first-child {
  min-width: 170px;
}
