/* ==========================================================
   Trust Center — visual design mirrors the Vanta/Paradino
   layout but uses the AdviceStudio.ai brand palette. Tabs are
   page sections toggled by trust.js (no client-side router).
   ========================================================== */

:root {
  --navy: #244554;
  --navy-deep: #1b3644;
  --teal: #29dec7;
  --teal-tint: #eefffc;
  --neutral-900: #1d2a33;
  --neutral-700: #506a76;
  --neutral-500: #7b7c7c;
  --neutral-400: #a1a8af;
  --neutral-300: #c6cbcf;
  --neutral-200: #dddddc;
  --neutral-100: #f3f5f7;
  --neutral-50: #f8fafb;
  --paper: #ffffff;
  --ok: #10b981;
  --ok-bg: #ecfdf5;
  --warn: #f59e0b;
  --warn-bg: #fffbeb;
  --plan: #6b7280;
  --plan-bg: #f3f4f6;
  --unverified: #dc2626;
  --unverified-bg: #fef2f2;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--neutral-100);
  color: var(--neutral-900);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy); }

/* ============ TOP BAR ============ */
.tc-top {
  position: sticky; top: 0; z-index: 30;
  background: var(--paper);
  border-bottom: 1px solid var(--neutral-200);
  padding: 12px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.tc-brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--navy);
}
.tc-brand-logo { height: 28px; width: auto; display: block; }
.tc-brand-divider { color: var(--neutral-300); font-weight: 300; }
.tc-brand-name { font-weight: 500; font-size: 15px; }

.tc-top-actions { display: flex; align-items: center; gap: 16px; }
.tc-top-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--neutral-700); text-decoration: none;
}
.tc-top-link:hover { color: var(--navy); }
.tc-btn-primary {
  display: inline-flex; align-items: center;
  background: var(--navy); color: var(--paper);
  padding: 8px 16px; border-radius: 6px;
  font-weight: 500; font-size: 13px; text-decoration: none;
  border: none;
}
.tc-btn-primary:hover { background: var(--navy-deep); }

/* ============ HERO ============ */
.tc-hero {
  background: linear-gradient(180deg, #b8e5f1 0%, #dff2f8 60%, var(--neutral-100) 100%);
  padding: 36px 28px 60px;
}
.tc-hero-inner { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.tc-hero h1 {
  margin: 0 0 16px;
  font-size: 28px; font-weight: 700;
  color: var(--neutral-900);
  letter-spacing: -0.01em;
}
.tc-hero-tagline {
  margin: 0 0 18px; max-width: 720px;
  font-size: 14px; color: var(--neutral-900);
}
.tc-hero-links {
  display: flex; gap: 22px; flex-wrap: wrap;
  font-size: 13px;
}
.tc-hero-links a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--neutral-900); text-decoration: none;
}
.tc-hero-links a:hover { text-decoration: underline; }

/* ============ TAB BAR ============ */
.tc-tabs {
  background: var(--paper);
  border-bottom: 1px solid var(--neutral-200);
  margin-top: -24px;
  border-radius: 8px 8px 0 0;
}
.tc-tabs-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; gap: 4px;
  padding: 0 16px;
}
.tc-tab {
  background: transparent; border: none; cursor: pointer;
  padding: 14px 18px;
  font: inherit; font-size: 14px; color: var(--neutral-700);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tc-tab:hover { color: var(--navy); }
.tc-tab[aria-selected="true"] {
  color: var(--navy); font-weight: 600;
  border-bottom-color: var(--navy);
}

/* ============ MAIN ============ */
.tc-main {
  max-width: 1080px; margin: 0 auto;
  padding: 32px 28px 80px;
}

.tc-pane { display: block; }
.tc-pane[hidden] { display: none; }

.tc-pane-title {
  margin: 0 0 6px;
  font-size: 22px; font-weight: 700; color: var(--navy);
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 12px;
}
.tc-pane-intro {
  margin: 0 0 24px;
  font-size: 14px; color: var(--neutral-700);
  max-width: 760px;
}

.tc-section-title {
  font-size: 16px; font-weight: 700; color: var(--navy);
  margin: 28px 0 12px;
  display: flex; align-items: center; gap: 10px;
}
.tc-section-title-wide { margin-top: 40px; }
.tc-section-link {
  margin-left: auto;
  font-size: 13px; font-weight: 500;
  color: var(--navy); text-decoration: none;
}
.tc-section-link:hover { text-decoration: underline; }
.tc-update-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--ok-bg); color: var(--ok);
  padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 500;
}
.tc-update-pill::before { content: ''; width: 6px; height: 6px; background: var(--ok); border-radius: 50%; }

/* ============ OVERVIEW: BANNER ============ */
.tc-banner {
  background: var(--paper);
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 14px;
  color: var(--neutral-900);
  margin-bottom: 16px;
}

/* ============ OVERVIEW: two-column grid ============ */
.tc-overview-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 820px) {
  .tc-overview-grid { grid-template-columns: 1fr; }
}

/* ============ COMPLIANCE CARD ============ */
.tc-compliance-card {
  background: var(--paper);
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  padding: 14px;
  display: flex; flex-direction: column; gap: 14px;
}
.tc-comp-badge {
  display: flex; gap: 12px; align-items: center;
}
.tc-comp-ring {
  position: relative;
  width: 56px; height: 56px;
  flex: 0 0 56px;
}
.tc-comp-ring svg { width: 100%; height: 100%; display: block; }
.tc-comp-pct {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--navy);
}
.tc-comp-body { display: flex; flex-direction: column; min-width: 0; }
.tc-comp-title { font-weight: 600; font-size: 14px; color: var(--navy); }
.tc-comp-sub { font-size: 12px; color: var(--neutral-500); line-height: 1.4; }

/* ============ RESOURCE SNIPPET (overview) ============ */
.tc-resource-snippet {
  background: var(--paper);
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  padding: 8px;
  display: flex; flex-direction: column;
}
.tc-resource-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 6px;
  font-size: 13px; color: var(--navy); text-decoration: none;
}
.tc-resource-row:hover { background: var(--neutral-100); }
.tc-resource-icon { font-size: 14px; }

/* ============ CONTROLS GRID (overview cards) ============ */
.tc-controls-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 640px) { .tc-controls-grid { grid-template-columns: 1fr; } }
.tc-control-card {
  background: var(--paper);
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  padding: 14px 16px;
}
.tc-control-card-head {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; color: var(--navy); font-size: 14px;
  margin-bottom: 10px;
}
.tc-control-card-head .tc-arrow { color: var(--neutral-400); font-size: 18px; line-height: 1; }
.tc-control-mini {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 0; font-size: 13px; color: var(--neutral-900);
}
.tc-control-card-foot {
  margin-top: 10px;
  font-size: 12px; color: var(--neutral-500);
}
.tc-control-card-foot a { color: var(--navy); text-decoration: none; }
.tc-control-card-foot a:hover { text-decoration: underline; }

/* ============ STATUS DOTS ============ */
.tc-status {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  font-size: 11px; font-weight: 700; color: var(--paper);
  flex: 0 0 16px;
}
.tc-status-done { background: var(--ok); }
.tc-status-progress { background: var(--warn); }
.tc-status-planned { background: var(--plan); }

/* ============ DATA CARD ============ */
.tc-data-card {
  background: var(--paper);
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  padding: 12px 18px;
}
.tc-data-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; font-size: 14px;
  border-bottom: 1px solid var(--neutral-200);
}
.tc-data-row:last-child { border-bottom: none; }
.tc-data-mark {
  width: 18px; flex: 0 0 18px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.tc-data-yes .tc-data-mark { color: var(--ok); }
.tc-data-no .tc-data-mark { color: var(--neutral-400); }
.tc-data-note { color: var(--neutral-500); font-size: 13px; font-weight: 400; margin-left: 4px; }

/* ============ SUB-PROCESSORS PREVIEW (overview) ============ */
.tc-sub-card {
  background: var(--paper);
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  padding: 6px;
}
.tc-sub-row {
  display: flex; gap: 14px; align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--neutral-200);
}
.tc-sub-row:last-child { border-bottom: none; }
.tc-sub-logo {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  background: var(--neutral-100);
  color: var(--navy);
  font-weight: 700; font-size: 13px;
  flex: 0 0 28px;
}
.tc-sub-body { display: flex; flex-direction: column; min-width: 0; }
.tc-sub-name { font-weight: 600; font-size: 14px; color: var(--neutral-900); }
.tc-sub-name .tc-sub-role { font-weight: 400; color: var(--neutral-500); margin-left: 6px; }
.tc-sub-purpose { font-size: 12px; color: var(--neutral-700); margin-top: 2px; }

/* ============ FAQ ACCORDION ============ */
.tc-faq-card { background: var(--paper); border: 1px solid var(--neutral-200); border-radius: 8px; padding: 4px; }
.tc-faq-item {
  border-bottom: 1px solid var(--neutral-200);
}
.tc-faq-item:last-child { border-bottom: none; }
.tc-faq-q {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  font-size: 14px; font-weight: 500; color: var(--navy);
  cursor: pointer;
  background: transparent; border: none; width: 100%; text-align: left;
}
.tc-faq-q::before {
  content: '›';
  display: inline-block;
  width: 14px;
  font-size: 18px; line-height: 1;
  color: var(--neutral-500);
  transition: transform 0.15s;
}
.tc-faq-item[open] .tc-faq-q::before { transform: rotate(90deg); }
.tc-faq-a {
  padding: 0 16px 16px 40px;
  font-size: 13px; color: var(--neutral-900);
  display: none;
}
.tc-faq-item[open] .tc-faq-a { display: block; }
.tc-faq-a ul { margin: 6px 0; padding-left: 20px; }
.tc-faq-a li { margin: 4px 0; }
.tc-faq-a strong { color: var(--navy); }

/* ============ UPDATES ============ */
.tc-updates-card,
.tc-updates-list {
  background: var(--paper);
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  padding: 4px;
}
.tc-update-item {
  padding: 14px 18px;
  border-bottom: 1px solid var(--neutral-200);
}
.tc-update-item:last-child { border-bottom: none; }
.tc-update-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 4px;
}
.tc-update-title { font-weight: 600; font-size: 14px; color: var(--navy); }
.tc-update-tag {
  margin-left: auto;
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 500;
  background: var(--neutral-100); color: var(--neutral-700);
}
.tc-update-tag-compliance { background: var(--warn-bg); color: var(--warn); }
.tc-update-tag-engineering { background: #e0f2fe; color: #0369a1; }
.tc-update-tag-security { background: var(--ok-bg); color: var(--ok); }
.tc-update-date {
  font-size: 12px; color: var(--neutral-500);
  margin-bottom: 6px;
}
.tc-update-body {
  font-size: 13px; color: var(--neutral-900);
}

/* ============ RESOURCES PANE ============ */
.tc-res-list {
  background: var(--paper);
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  padding: 4px;
}
.tc-res-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--neutral-200);
}
.tc-res-row:last-child { border-bottom: none; }
.tc-res-row .tc-res-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tc-res-name { font-weight: 500; color: var(--navy); font-size: 14px; }
.tc-res-desc { font-size: 12px; color: var(--neutral-500); }
.tc-res-actions { display: flex; gap: 8px; }
.tc-res-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 6px;
  font-size: 12px; font-weight: 500; text-decoration: none;
  border: 1px solid var(--neutral-200); background: var(--paper); color: var(--navy);
}
.tc-res-btn:hover { background: var(--neutral-100); }
.tc-res-btn-locked { color: var(--neutral-500); }

/* ============ CONTROLS PANE ============ */
.tc-controls-header { margin-bottom: 18px; }
.tc-controls-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 820px) {
  .tc-controls-layout { grid-template-columns: 1fr; }
  .tc-controls-side { display: none; }
}
.tc-controls-side {
  position: sticky; top: 78px;
  display: flex; flex-direction: column; gap: 2px;
}
.tc-controls-side-link {
  padding: 8px 12px; border-radius: 6px;
  font-size: 13px; color: var(--neutral-700); text-decoration: none;
  border-left: 2px solid transparent;
}
.tc-controls-side-link:hover { background: var(--neutral-100); color: var(--navy); }
.tc-controls-side-link[aria-current="true"] {
  color: var(--navy); font-weight: 600;
  border-left-color: var(--navy);
  background: var(--neutral-100);
}

.tc-controls-cat {
  margin-bottom: 36px;
  scroll-margin-top: 76px;
}
.tc-controls-cat h3 {
  margin: 0 0 8px;
  font-size: 17px; font-weight: 700; color: var(--navy);
}
.tc-controls-table {
  background: var(--paper);
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  overflow: hidden;
}
.tc-controls-table .tc-th {
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 10px 18px;
  background: var(--neutral-100);
  color: var(--neutral-500);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  border-bottom: 1px solid var(--neutral-200);
}
.tc-controls-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--neutral-200);
  align-items: start;
}
.tc-controls-row:last-child { border-bottom: none; }
.tc-controls-name {
  font-weight: 600; color: var(--navy); font-size: 14px;
  margin-bottom: 4px;
}
.tc-controls-desc { color: var(--neutral-700); font-size: 13px; }
.tc-controls-status-cell { display: flex; justify-content: flex-end; }

.tc-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
  white-space: nowrap;
}
.tc-pill-done { background: var(--ok-bg); color: var(--ok); }
.tc-pill-progress { background: var(--warn-bg); color: var(--warn); }
.tc-pill-planned { background: var(--plan-bg); color: var(--plan); }
.tc-pill::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
}
.tc-pill-done::before { background: var(--ok); }
.tc-pill-progress::before { background: var(--warn); }
.tc-pill-planned::before { background: var(--plan); }

/* ---- operator-attested-but-unverified marker (loud red) ----
   Orthogonal to status: a control can be Implemented AND unverified
   ("we say so; nobody outside engineering has confirmed it"). Surfaced
   so the operator can see exactly what still needs human verification. */
.tc-unverified {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
  white-space: nowrap;
  background: var(--unverified-bg); color: var(--unverified);
  border: 1px solid var(--unverified);
  margin-left: 8px;
}
.tc-unverified::before {
  content: '!'; display: inline-flex; align-items: center; justify-content: center;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--unverified); color: #fff;
  font-size: 9px; font-weight: 800; line-height: 1;
}
.tc-legend-unverified { font-size: 12px; color: var(--neutral-700); margin-top: 6px; }
.tc-legend-unverified .tc-unverified { margin-left: 0; vertical-align: middle; }
.tc-controls-row.is-unverified { border-left: 3px solid var(--unverified); padding-left: 15px; }
.tc-control-mini.is-unverified { border-left: 3px solid var(--unverified); padding-left: 7px; }
/* the overview-card status dot gets a red ring when unverified */
.tc-status.is-unverified { box-shadow: 0 0 0 2px var(--unverified); }

/* ============ SUBPROCESSORS PANE ============ */
.tc-sub-list {
  background: var(--paper);
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
}
.tc-sub-list .tc-sub-row { padding: 16px 18px; }

/* ============ FAQ PANE ============ */
.tc-faq-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 820px) {
  .tc-faq-layout { grid-template-columns: 1fr; }
  .tc-faq-side { display: none; }
}
.tc-faq-side {
  position: sticky; top: 78px;
  display: flex; flex-direction: column; gap: 2px;
}
.tc-faq-side-link {
  padding: 8px 12px; border-radius: 6px;
  font-size: 13px; color: var(--neutral-700); text-decoration: none;
  border-left: 2px solid transparent;
}
.tc-faq-side-link:hover { background: var(--neutral-100); color: var(--navy); }
.tc-faq-cat {
  margin-bottom: 28px;
  scroll-margin-top: 76px;
}
.tc-faq-cat h3 {
  margin: 0 0 10px;
  font-size: 16px; font-weight: 700; color: var(--navy);
}

/* ============ FOOTER ============ */
.tc-footer {
  text-align: center;
  padding: 28px 16px 40px;
  font-size: 12px; color: var(--neutral-500);
}
.tc-footer a { color: var(--neutral-700); text-decoration: none; }
.tc-footer a:hover { text-decoration: underline; }
.tc-footer-fine { margin-top: 6px; }
