@layer brand { :root {
    --primary: 0 0% 17%;
    --primary-hover: 0 0% 12%;
    --ring: 0 0% 17%;
    --primary-foreground: 0 0% 100%;
    --trust-gradient-from: 0 0% 17%;
    --background: 0 0% 100%;
    --foreground: 0 0% 10%;
    --font-sans: 'ProximaNova regular', sans-serif;
  } }

@layer custom { /* cargo.one Trust Center: Orbiq Brand > Advanced > Brand-Extended CSS
   Built on Orbiq's stable data-tc-* hooks only. Tokens from the cargo.one design system.
   Fonts stay as uploaded in Brand settings (ProximaNova regular + TenantHeadingFont). */

/* 1. Brand tokens (HSL channels, same format Orbiq uses).
   !important is needed here: Orbiq puts this CSS in @layer custom, which loses to the
   unlayered theme colours from Brand settings unless the declaration is important. */
html:root {
  --primary: 231 44% 19% !important;          /* cadet navy #1B2145 */
  --primary-hover: 232 28% 27% !important;    /* #323758 */
  --ring: 231 44% 19% !important;
  --c1-accent: 346 92% 47% !important;        /* cargo.one red #E70A3E */
  --background: 210 25% 98% !important;       /* #FAFBFC */
  --card: 0 0% 100% !important;
  --popover: 0 0% 100% !important;
  --secondary: 0 0% 100% !important;
  --foreground: 219 31% 16% !important;       /* #1D2637 */
  --card-foreground: 219 31% 16% !important;
  --popover-foreground: 219 31% 16% !important;
  --muted: 225 40% 96% !important;            /* #F1F3F9 */
  --muted-foreground: 231 24% 39% !important; /* #4B527A */
  --border: 218 18% 88% !important;           /* #DBDFE6 */
  --input: 218 18% 88% !important;
  --success: 84 53% 40% !important;           /* #719B30 */
  --trust-gradient-from: 84 53% 40% !important;
  --security-badge: 84 53% 40% !important;
  --c1-shadow-sm: 0 2px 4px rgba(188, 191, 214, .20) !important;
  --c1-shadow-md: 0 8px 16px rgba(188, 191, 214, .15) !important;
  --c1-shadow-lg: 0 16px 48px rgba(188, 191, 214, .175) !important;
}

.trust-center-body { background: hsl(var(--background)); color: hsl(var(--foreground)); }

/* 2. Cards: white, hairline border, soft shadow, 12px radius */
[data-tc-card],
[data-tc-tab-panel="overview"] [data-tc-overview-category],
[data-tc-overview-resources],
[data-tc-overview-compliance],
[data-tc-overview-subprocessors],
[data-tc-overview-faq] {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  box-shadow: var(--c1-shadow-sm);
}

/* 3. Tabs: soft navy pill for the selected tab, red bar the same width underneath */
[data-tc-tabs-surface] {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  box-shadow: var(--c1-shadow-sm);
}
[data-tc-tabs-header] { border-bottom: 1px solid hsl(var(--border)); padding-bottom: 0; }
[data-tc-tabs-list] { gap: 6px; }
[data-tc-tab-trigger] {
  position: relative;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: hsl(var(--muted-foreground));
  font-weight: 500;
  padding: 8px 14px;
  margin: 10px 0 14px;
  box-shadow: none;
  transition: background 150ms ease, color 150ms ease;
}
[data-tc-tab-trigger]:hover {
  background: hsl(var(--muted));
  color: hsl(var(--primary));
}
[data-tc-tab-trigger][data-state="active"] {
  background: hsl(var(--primary) / 0.07);
  color: hsl(var(--primary));
  font-weight: 600;
  box-shadow: none;
}
[data-tc-tab-trigger]::after { display: none; }
[data-tc-tab-trigger][data-state="active"]::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -15px;  /* 14px margin + 1px divider: bar sits on the divider line */
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: hsl(var(--c1-accent));
}

/* 4. Headings and rich text */
[data-tc-overview-categories-title],
[data-tc-overview-resources-title],
[data-tc-overview-subprocessors-title],
[data-tc-overview-faq-title],
[data-tc-faq-title],
[data-tc-updates-heading],
.markdown-viewer h1,
.markdown-viewer h2,
.markdown-viewer h3 {
  color: hsl(var(--primary));
  letter-spacing: -0.01em;
}
.markdown-viewer a {
  color: hsl(var(--primary));
  text-decoration: underline;
  text-decoration-color: hsl(var(--c1-accent) / 0.5);
  text-underline-offset: 3px;
}
.markdown-viewer a:hover { text-decoration-color: hsl(var(--c1-accent)); }
.markdown-viewer table { width: 100%; border-collapse: collapse; }
.markdown-viewer th,
.markdown-viewer td { border: 1px solid hsl(var(--border)); padding: 8px 10px; text-align: left; }
.markdown-viewer thead { background: hsl(var(--muted)); color: hsl(var(--primary)); }

/* 5. Document and resource rows: quiet hover */
[data-tc-overview-resources-item],
[data-tc-overview-category-doc],
[data-tc-overview-subprocessors-item],
[data-tc-search-result] {
  border-radius: 8px;
  transition: background 150ms ease;
}
[data-tc-overview-resources-item]:hover,
[data-tc-overview-category-doc]:hover,
[data-tc-overview-subprocessors-item]:hover,
[data-tc-search-result]:hover { background: hsl(var(--muted)); }
[data-tc-overview-resources-item-title],
[data-tc-overview-category-doc-title] { font-weight: 600; color: hsl(var(--foreground)); }

/* 5b. Lock icons on restricted documents: cargo.one dark red */
[data-tc-overview-category-doc] svg.lucide-lock,
[data-tc-surface] svg.lucide-lock {
  color: #A90008;
}

/* 6. FAQ (overview preview and tab) */
[data-tc-overview-faq-item],
[data-tc-faq-item] {
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  background: hsl(var(--card));
}
[data-tc-faq-item] { margin-bottom: 8px; }
[data-tc-overview-faq-question],
[data-tc-faq-question] { font-weight: 600; color: hsl(var(--primary)); }
[data-tc-overview-faq-answer],
[data-tc-faq-answer] { color: hsl(var(--muted-foreground)); }

/* 7. Buttons and badges */
[data-tc-button] { border-radius: 8px; font-weight: 600; }
[data-tc-button="default"] { background: hsl(var(--primary)); color: #fff; }
[data-tc-button="default"]:hover { background: hsl(var(--primary-hover)); }
[data-tc-button="outline"] { border-color: hsl(var(--border)); color: hsl(var(--primary)); }
[data-tc-button="link"] { color: hsl(var(--primary)); }
[data-tc-badge] { border-radius: 999px; font-weight: 600; letter-spacing: 0.02em; }
[data-tc-badge="success"] { background: hsl(var(--success) / 0.12); color: hsl(84 53% 28%); border-color: transparent; }

/* 8. Search */
[data-tc-search-input] {
  border-radius: 8px;
  border-color: hsl(var(--border));
  background: hsl(var(--card));
}
[data-tc-search-input]:focus { border-color: hsl(var(--primary)); box-shadow: 0 0 0 3px hsl(var(--primary) / 0.12); }
[data-tc-search-results] {
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  box-shadow: var(--c1-shadow-lg);
}

/* 9. "Trusted by": greyscale logos, colour on hover */
[data-tc-overview-trusted-by] img {
  filter: grayscale(1);
  opacity: 0.7;
  transition: filter 200ms ease, opacity 200ms ease;
}
[data-tc-overview-trusted-by] img:hover { filter: none; opacity: 1; }

/* 10. Modals: keep light (Orbiq warns dark modals hide NDA text) */
[data-tc-modal] {
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  background: hsl(var(--card));
  box-shadow: var(--c1-shadow-lg);
}
[data-tc-modal="nda"],
[data-tc-modal="request-access"] { border-top: 3px solid hsl(var(--c1-accent)); }

/* 12. Custom tabs (e.g. "At a glance"): make the column cards stand out.
   Orbiq gives these no data-tc hook, so target the sections inside custom tab panels. */
[data-tc-tab-panel^="custom-"] .grid > section,
[data-tc-tab-panel^="custom-"] section:has([data-tc-overview-category-doc]) {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  box-shadow: var(--c1-shadow-md);
}
[data-tc-tab-panel^="custom-"] .grid > section:hover {
  border-color: hsl(var(--primary) / 0.35);
}

/* 13. FAQ tab: align the list with the heading instead of centring it */
[data-tc-faq-list] {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}
[data-tc-faq-question],
[data-tc-faq-item] h3 {
  font-family: var(--font-body);
}

/* 14. Search: stretch the search field all the way to the Get Access button */
[data-tc-search] {
  max-width: none;
  min-width: 0;
  flex: 1 1 auto;
}
/* keep the logo and Get Access button from being squeezed (sticky header) */
div:has(> [data-tc-search]) > :not([data-tc-search]) {
  flex-shrink: 0;
}

/* 15. Documentation tab: category sidebar as a calm list, red marker on the selected one.
   Orbiq gives the sidebar no data-tc hook; the selected item carries aria-current="true". */
[data-tc-tab-panel="documentation"] aside > div {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  box-shadow: var(--c1-shadow-sm);
  padding: 10px;
}
[data-tc-tab-panel="documentation"] aside > div > div:empty { display: none; }
[data-tc-tab-panel="documentation"] aside nav { display: flex; flex-direction: column; gap: 2px; }
[data-tc-tab-panel="documentation"] aside nav > * { margin: 0; }
[data-tc-tab-panel="documentation"] aside nav > button {
  position: relative;
  border: 0;
  border-radius: 8px;
  padding: 9px 12px 9px 16px;
  background: transparent;
  box-shadow: none;
  color: hsl(var(--muted-foreground));
  font-weight: 500;
  transition: background 150ms ease, color 150ms ease;
}
[data-tc-tab-panel="documentation"] aside nav > button:hover {
  background: hsl(var(--muted));
  color: hsl(var(--primary));
}
[data-tc-tab-panel="documentation"] aside nav > button:focus { outline: none; box-shadow: none; }
[data-tc-tab-panel="documentation"] aside nav > button:focus-visible { box-shadow: 0 0 0 2px hsl(var(--primary) / 0.25); }
[data-tc-tab-panel="documentation"] aside nav > button[aria-current="true"] {
  background: hsl(var(--primary) / 0.07);
  color: hsl(var(--primary));
  font-weight: 600;
}
[data-tc-tab-panel="documentation"] aside nav > button[aria-current="true"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: hsl(var(--c1-accent));
}
[data-tc-tab-panel="documentation"] aside nav [data-tc-badge] {
  min-width: 28px;
  padding: 1px 8px;
  border: 0;
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  font-weight: 600;
}
[data-tc-tab-panel="documentation"] aside nav > button[aria-current="true"] [data-tc-badge] {
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
}
[data-tc-tab-panel="documentation"] aside + div > div:last-child {
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  box-shadow: var(--c1-shadow-sm);
}

/* 16. Document dialog as a drawer that slides in from the right */
[data-tc-modal="document"] {
  top: 0;
  bottom: 0;
  right: 0;
  left: auto;
  translate: none;
  transform: none;
  width: min(640px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  border: 0;
  border-left: 1px solid hsl(var(--border));
  border-radius: 16px 0 0 16px;
  box-shadow: -24px 0 64px -24px rgba(11, 14, 20, .30);
}
/* documents with an embedded file viewer get more room */
[data-tc-modal="document"]:has(iframe, embed, object, canvas) { width: min(960px, 100vw); }
/* Orbiq builds this dialog twice when a document opens (40 to 250ms apart), which restarts any
   entry animation. So: a short slide with a fade and a 70ms delay, which keeps the first build
   invisible and turns any late rebuild into a fade, not a jump across the screen. */
[data-tc-modal="document"][data-state="open"] { animation: c1-drawer-in 260ms cubic-bezier(.2, .8, .2, 1) 70ms both; }
[data-tc-modal="document"][data-state="closed"] { animation: c1-drawer-out 180ms ease-in both; }
/* lighter, slightly blurred backdrop behind the drawer */
div:has(+ [data-tc-modal="document"]) { background: rgba(11, 14, 20, .35); backdrop-filter: blur(2px); }
@keyframes c1-drawer-in { from { transform: translateX(48px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes c1-drawer-out { from { transform: none; opacity: 1; } to { transform: translateX(48px); opacity: 0; } }

/* 11. Mobile */
@media (max-width: 640px) {
  [data-tc-card] { padding: 14px; }
  [data-tc-tab-trigger] { padding: 8px 10px; }
  [data-tc-modal="document"] { border-radius: 0; }
} }