/* ConsentTrace application shell and component system.
 * Scoped with ct-* classes so legacy screens can be migrated incrementally. */

:root {
  --ct-brand-50: #ecfeff;
  --ct-brand-100: #cffafe;
  --ct-brand-500: #06b6d4;
  --ct-brand-600: #0891b2;
  --ct-brand-700: #0e7490;
  --ct-ink-950: #0b1220;
  --ct-ink-800: #1f2937;
  --ct-ink-700: #344054;
  --ct-ink-600: #52606d;
  --ct-ink-500: #687789;
  --ct-canvas: #f5f7f9;
  --ct-surface: #ffffff;
  --ct-surface-subtle: #f8fafc;
  --ct-border: #dfe5eb;
  --ct-border-strong: #cbd5df;
  --ct-success: #15803d;
  --ct-success-bg: #ecfdf3;
  --ct-warning: #a15c07;
  --ct-warning-bg: #fff8e6;
  --ct-risk: #c2410c;
  --ct-risk-bg: #fff3ed;
  --ct-critical: #b91c1c;
  --ct-critical-bg: #fef2f2;
  --ct-info: #0369a1;
  --ct-info-bg: #eff8ff;
  --ct-neutral-bg: #f1f5f9;
  --ct-shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --ct-shadow-md: 0 12px 32px rgba(15, 23, 42, .10);
  --ct-sidebar-width: 248px;
  --ct-topbar-height: 64px;
  --ct-radius-sm: 6px;
  --ct-radius-md: 10px;
  --ct-radius-lg: 14px;
  --ct-focus: 0 0 0 3px rgba(6, 182, 212, .22);
  --ct-badge-min-width: 84px;
}

html {
  background: var(--ct-canvas);
}

/* Authentication */
body.ct-auth-page {
  min-height: 100vh;
  background: #101923;
}

.ct-auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1.05fr) minmax(440px, .95fr);
}

.ct-auth-brand {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 40px clamp(36px, 6vw, 88px);
  color: #fff;
  background:
    radial-gradient(circle at 15% 82%, rgba(6, 182, 212, .16), transparent 34%),
    linear-gradient(145deg, #101923 0%, #132430 100%);
  position: relative;
  overflow: hidden;
}

.ct-auth-brand::after {
  position: absolute;
  right: -110px;
  bottom: -160px;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(72, 216, 236, .13);
  border-radius: 50%;
  box-shadow: 0 0 0 55px rgba(72, 216, 236, .035), 0 0 0 110px rgba(72, 216, 236, .025);
  content: "";
}

.ct-auth-brand-content {
  z-index: 1;
  width: 100%;
  margin: auto 0;
}

.ct-auth-logo {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 18px;
  color: #fff;
  text-decoration: none;
}

.ct-auth-logo-mark {
  width: 104px;
  height: 104px;
  display: grid;
  flex: 0 0 104px;
  place-items: center;
  overflow: hidden;
}

.ct-auth-logo-mark img {
  width: 493px;
  height: auto;
  max-width: none;
  object-fit: contain;
  transform: translate(-23px, -31px);
}

.ct-auth-wordmark {
  color: #fff;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1;
}

.ct-auth-wordmark strong {
  color: transparent;
  background: linear-gradient(90deg, #00bca6 0%, #22d3ee 58%, #0e9bc2 100%);
  background-clip: text;
  font: inherit;
  font-weight: 760;
  -webkit-background-clip: text;
}

.ct-auth-message {
  z-index: 1;
  max-width: 660px;
  margin: 24px 0 0;
  padding: 0;
}

.ct-auth-message h1 {
  margin: 0;
  color: #fff;
  background: none;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -.045em;
  -webkit-text-fill-color: currentColor;
}

.ct-auth-message > p:not(.ct-eyebrow) {
  max-width: 590px;
  margin: 24px 0 0;
  color: #aebdca;
  font-size: 16px;
  line-height: 26px;
}

.ct-auth-capabilities {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.ct-auth-capabilities span {
  padding: 6px 9px;
  color: #dffcff;
  background: rgba(6, 182, 212, .08);
  border: 1px solid rgba(72, 216, 236, .18);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .035em;
}

.ct-auth-copyright {
  position: absolute;
  z-index: 1;
  bottom: 40px;
  left: clamp(36px, 6vw, 88px);
  margin: 0;
  color: #71869a;
  font-size: 10px;
}

.ct-auth-form-region {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px;
  background: var(--ct-canvas);
}

.ct-auth-card {
  width: min(440px, 100%);
  padding: 30px;
  background: var(--ct-surface);
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-lg);
  box-shadow: 0 24px 60px rgba(15, 23, 42, .12);
}

.ct-auth-card-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  text-align: center;
}

.ct-auth-card-header h2 {
  margin: 0;
  color: var(--ct-ink-950);
  font-size: 19px;
  line-height: 24px;
}

.ct-auth-card-header p {
  margin: 3px 0 0;
  color: var(--ct-ink-500);
  font-size: 12px;
}

.ct-auth-card form {
  display: grid;
  gap: 17px;
}

.ct-auth-field {
  display: grid;
  gap: 6px;
}

.ct-auth-field label,
.ct-auth-label-row label {
  color: var(--ct-ink-700);
  font-size: 12px;
  font-weight: 650;
}

.ct-auth-field .ct-field {
  width: 100%;
  min-height: 42px;
}

.ct-auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ct-text-button {
  padding: 0;
  color: var(--ct-brand-700);
  background: transparent;
  border: 0;
  font-size: 11px;
  font-weight: 620;
  cursor: pointer;
}

.ct-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ct-ink-600);
  font-size: 11px;
  cursor: pointer;
}

.ct-checkbox input {
  width: 15px;
  height: 15px;
  accent-color: var(--ct-brand-600);
}

.ct-auth-error {
  padding: 10px 12px;
  color: var(--ct-critical);
  background: var(--ct-critical-bg);
  border: 1px solid #fecaca;
  border-radius: var(--ct-radius-sm);
  font-size: 11px;
  line-height: 17px;
}

.ct-auth-error[hidden] {
  display: none;
}

.ct-auth-submit {
  width: 100%;
  min-height: 42px;
  margin-top: 2px;
}

.ct-auth-security {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 24px;
  padding-top: 18px;
  color: var(--ct-ink-500);
  border-top: 1px solid var(--ct-border);
}

.ct-auth-security p {
  margin: 0;
  font-size: 10px;
  line-height: 16px;
}

.ct-auth-security strong {
  color: var(--ct-ink-600);
}

body.ct-app {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  color: var(--ct-ink-800);
  background: var(--ct-canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.ct-app button,
.ct-app input,
.ct-app select,
.ct-app textarea {
  font: inherit;
}

.ct-skip-link {
  position: fixed;
  z-index: 10000;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: var(--ct-ink-950);
  background: var(--ct-surface);
  border: 2px solid var(--ct-brand-600);
  border-radius: var(--ct-radius-sm);
  transform: translateY(-150%);
}

.ct-skip-link:focus {
  transform: none;
}

.ct-shell {
  min-height: 100vh;
}

.ct-sidebar {
  position: fixed;
  z-index: 120;
  inset: 0 auto 0 0;
  width: var(--ct-sidebar-width);
  display: flex;
  flex-direction: column;
  color: #d8e1ea;
  background: #101923;
  border-right: 1px solid #202d39;
  transition: transform 160ms ease;
}

.ct-brand {
  height: var(--ct-topbar-height);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 18px;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid #202d39;
}

.ct-product-logo-mark {
  width: 34px;
  height: 34px;
  display: block;
  flex: 0 0 34px;
  overflow: hidden;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .16);
}

.ct-product-logo-mark img {
  width: 161px;
  height: auto;
  max-width: none;
  display: block;
  transform: translate(-8px, -10px);
}

.ct-brand-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.ct-brand-name {
  font-size: 15px;
  line-height: 20px;
  font-weight: 720;
  letter-spacing: -.01em;
}

.ct-brand-product {
  color: #91a4b5;
  font-size: 11px;
  line-height: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ct-nav {
  display: block;
  flex: 1;
  overflow-y: auto;
  padding: 14px 10px;
  background: transparent;
  border-radius: 0;
}

.ct-nav-label {
  margin: 14px 10px 6px;
  color: #71869a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.ct-nav .nav-btn,
.ct-nav-link {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 2px 0;
  padding: 8px 10px;
  color: #b9c7d3;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 540;
  line-height: 18px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}

.ct-nav .nav-btn:hover,
.ct-nav-link:hover {
  color: #fff;
  background: #172431;
  border-color: #243443;
}

.ct-nav .nav-btn.active,
.ct-nav .nav-btn[aria-current="page"] {
  color: #e9fdff;
  background: rgba(6, 182, 212, .12);
  border-color: rgba(34, 211, 238, .24);
}

.ct-nav .nav-btn.active .ct-nav-icon,
.ct-nav .nav-btn[aria-current="page"] .ct-nav-icon {
  color: #48d8ec;
}

.ct-nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: #8094a6;
}

.ct-nav-icon svg,
.ct-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ct-sidebar-footer {
  padding: 10px;
  border-top: 1px solid #202d39;
}

.ct-sidebar-footer .ct-nav-link {
  color: #91a4b5;
}

.ct-main-shell {
  min-width: 0;
  min-height: 100vh;
  margin-left: var(--ct-sidebar-width);
}

.ct-topbar {
  position: sticky;
  z-index: 100;
  top: 0;
  height: var(--ct-topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  margin: 0;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--ct-border);
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.ct-topbar-start,
.ct-topbar-end,
.ct-user-summary {
  display: flex;
  align-items: center;
}

.ct-topbar-start,
.ct-topbar-end {
  gap: 12px;
}

.ct-breadcrumb {
  display: grid;
  gap: 1px;
}

.ct-breadcrumb-product {
  color: var(--ct-ink-500);
  font-size: 11px;
  line-height: 14px;
}

.ct-breadcrumb-page {
  color: var(--ct-ink-950);
  font-size: 14px;
  line-height: 18px;
  font-weight: 650;
}

.ct-user-summary {
  gap: 9px;
  min-width: 0;
  padding-left: 12px;
  border-left: 1px solid var(--ct-border);
}

.ct-user-avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #0b4f5c;
  background: var(--ct-brand-100);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 750;
}

.ct-user-copy {
  display: grid;
  max-width: 180px;
  min-width: 0;
}

.ct-user-copy .user-name {
  overflow: hidden;
  color: var(--ct-ink-800);
  font-size: 12px;
  font-weight: 620;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct-app .role-badge {
  width: fit-content;
  padding: 0;
  color: var(--ct-ink-500);
  background: none;
  border: 0;
  font-size: 10px;
  line-height: 13px;
  letter-spacing: .04em;
}

.ct-content {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 28px 30px 48px;
}

.ct-plan-expiry-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 22px;
  padding: 14px 16px;
  color: var(--ct-ink-800);
  background: var(--ct-warning-bg);
  border: 1px solid #f5d99c;
  border-left: 4px solid var(--ct-warning);
  border-radius: var(--ct-radius-md);
}

.ct-plan-expiry-banner[hidden] {
  display: none;
}

.ct-plan-expiry-banner__icon {
  display: inline-grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #fff;
  background: var(--ct-warning);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 750;
}

.ct-plan-expiry-banner strong {
  display: block;
  color: var(--ct-ink-950);
  font-size: 14px;
  line-height: 20px;
}

.ct-plan-expiry-banner p {
  margin: 2px 0 0;
  color: var(--ct-ink-700);
  font-size: 13px;
  line-height: 19px;
}

.ct-view[hidden] {
  display: none !important;
}

.ct-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.ct-page-header h1 {
  margin: 0;
  color: var(--ct-ink-950);
  background: none;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.22;
  letter-spacing: -.025em;
  -webkit-text-fill-color: currentColor;
}

.ct-page-header p {
  max-width: 760px;
  margin: 7px 0 0;
  color: var(--ct-ink-600);
  font-size: 14px;
  line-height: 21px;
}

.ct-actions,
.ct-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ct-app .btn,
.ct-button,
.ct-icon-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  color: var(--ct-ink-700);
  background: var(--ct-surface);
  border: 1px solid var(--ct-border-strong);
  border-radius: var(--ct-radius-sm);
  box-shadow: var(--ct-shadow-sm);
  font-size: 13px;
  font-weight: 620;
  line-height: 18px;
  text-decoration: none;
  cursor: pointer;
}

.ct-icon-button {
  width: 36px;
  padding: 0;
}

.ct-icon-button .ct-icon,
.ct-button .ct-icon {
  width: 16px;
  height: 16px;
}

.ct-app .btn:hover,
.ct-button:hover,
.ct-icon-button:hover {
  color: var(--ct-ink-950);
  background: var(--ct-surface-subtle);
  border-color: #aebbc7;
}

.ct-app .btn.primary,
.ct-button--primary {
  color: #fff;
  background: var(--ct-brand-600);
  border-color: var(--ct-brand-600);
  box-shadow: 0 1px 2px rgba(8, 145, 178, .22);
}

.ct-app .btn.primary:hover,
.ct-button--primary:hover {
  color: #fff;
  background: var(--ct-brand-700);
  border-color: var(--ct-brand-700);
}

.ct-button--danger {
  color: var(--ct-critical);
  background: var(--ct-critical-bg);
  border-color: #fecaca;
}

.ct-button--danger:hover {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fca5a5;
}

.ct-app .btn.ghost {
  background: transparent;
  box-shadow: none;
}

.ct-app button:disabled,
.ct-app .btn:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.ct-app a:focus-visible,
.ct-app button:focus-visible,
.ct-app input:focus-visible,
.ct-app select:focus-visible,
.ct-app textarea:focus-visible,
.ct-clickable-row:focus-visible {
  outline: 2px solid var(--ct-brand-600);
  outline-offset: 2px;
  box-shadow: var(--ct-focus);
}

.ct-mobile-menu,
.ct-sidebar-scrim {
  display: none;
}

.ct-search-trigger {
  min-width: 190px;
  justify-content: flex-start;
  color: var(--ct-ink-500);
}

.ct-search-trigger kbd {
  margin-left: auto;
  padding: 1px 5px;
  color: var(--ct-ink-500);
  background: var(--ct-surface-subtle);
  border: 1px solid var(--ct-border);
  border-radius: 4px;
  font-size: 10px;
  box-shadow: none;
}

.ct-card {
  min-width: 0;
  background: var(--ct-surface);
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-md);
  box-shadow: var(--ct-shadow-sm);
}

.ct-card__header,
.ct-card__body,
.ct-card__footer {
  padding: 18px 20px;
}

.ct-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--ct-border);
}

.ct-card__header h2,
.ct-card__header h3 {
  margin: 0;
  color: var(--ct-ink-950);
  font-size: 15px;
  line-height: 20px;
  font-weight: 680;
}

.ct-card__header p {
  margin: 4px 0 0;
  color: var(--ct-ink-500);
  font-size: 12px;
  line-height: 18px;
}

.ct-card__footer {
  border-top: 1px solid var(--ct-border);
  color: var(--ct-ink-500);
  font-size: 12px;
}

.ct-grid {
  display: grid;
  gap: 16px;
}

.ct-grid--hero {
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr);
}

.ct-grid--main {
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, .65fr);
}

.ct-stack {
  display: grid;
  gap: 16px;
}

.ct-assurance-card {
  min-height: 210px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  padding: 26px;
}

.ct-outcome-summary {
  --ct-outcome-colour: var(--ct-brand-600);
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--ct-surface);
  border: 10px solid var(--ct-outcome-colour);
  border-radius: 50%;
  position: relative;
}

.ct-outcome-summary__value {
  display: grid;
  text-align: center;
}

.ct-outcome-summary__value strong {
  color: var(--ct-ink-950);
  font-size: 32px;
  line-height: 34px;
  font-weight: 730;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}

.ct-outcome-summary__value span {
  color: var(--ct-ink-500);
  font-size: 10px;
  line-height: 14px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.ct-eyebrow {
  margin: 0 0 7px;
  color: var(--ct-ink-500);
  font-size: 11px;
  font-weight: 720;
  line-height: 14px;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.ct-assurance-copy h2 {
  margin: 0;
  color: var(--ct-ink-950);
  font-size: clamp(21px, 2.2vw, 30px);
  line-height: 1.2;
  letter-spacing: -.03em;
}

.ct-assurance-copy > p:not(.ct-eyebrow) {
  max-width: 640px;
  margin: 9px 0 16px;
  color: var(--ct-ink-600);
  font-size: 14px;
  line-height: 21px;
}

.ct-metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
}

.ct-metric {
  min-width: 0;
  padding: 17px 18px;
  border-right: 1px solid var(--ct-border);
}

.ct-metric:last-child {
  border-right: 0;
}

.ct-metric__label {
  display: block;
  overflow: hidden;
  color: var(--ct-ink-500);
  font-size: 11px;
  line-height: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct-metric__value {
  display: block;
  margin-top: 5px;
  color: var(--ct-ink-950);
  font-size: 23px;
  line-height: 28px;
  font-weight: 710;
  letter-spacing: -.025em;
  font-variant-numeric: tabular-nums;
}

.ct-metric__meta {
  display: block;
  margin-top: 3px;
  color: var(--ct-ink-500);
  font-size: 11px;
  line-height: 15px;
}

.ct-badge {
  width: fit-content;
  min-width: var(--ct-badge-min-width);
  min-height: 24px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 3px 9px;
  color: var(--ct-ink-600);
  background: var(--ct-neutral-bg);
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  line-height: 16px;
  text-align: center;
  white-space: nowrap;
}

.ct-badge::before {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  background: currentColor;
  border-radius: 50%;
  content: "";
}

.ct-badge--success { color: var(--ct-success); background: var(--ct-success-bg); border-color: #bbebcb; }
.ct-badge--warning { color: var(--ct-warning); background: var(--ct-warning-bg); border-color: #f5d99c; }
.ct-badge--risk { color: var(--ct-risk); background: var(--ct-risk-bg); border-color: #fed7c3; }
.ct-badge--critical { color: var(--ct-critical); background: var(--ct-critical-bg); border-color: #fecaca; }
.ct-badge--info { color: var(--ct-info); background: var(--ct-info-bg); border-color: #c6e6fa; }

.ct-priority-list,
.ct-activity-list,
.ct-region-list {
  display: grid;
}

.ct-priority-item,
.ct-activity-item,
.ct-region-item {
  display: grid;
  gap: 3px;
  padding: 13px 20px;
  color: inherit;
  border-bottom: 1px solid var(--ct-border);
  text-decoration: none;
}

.ct-priority-item:last-child,
.ct-activity-item:last-child,
.ct-region-item:last-child {
  border-bottom: 0;
}

.ct-priority-item:hover {
  background: var(--ct-surface-subtle);
}

.ct-priority-item__top,
.ct-region-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.ct-priority-item strong,
.ct-region-item strong,
.ct-activity-item strong {
  color: var(--ct-ink-800);
  font-size: 13px;
  line-height: 18px;
  font-weight: 640;
}

.ct-priority-item p,
.ct-activity-item p {
  margin: 0;
  color: var(--ct-ink-500);
  font-size: 12px;
  line-height: 18px;
}

.ct-region-item span,
.ct-activity-time {
  color: var(--ct-ink-500);
  font-size: 11px;
}

.ct-table-wrap {
  width: 100%;
  overflow: auto;
}

.ct-data-table {
  width: 100%;
  min-width: 820px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  margin-top: 0;
}

.ct-data-table th,
.ct-data-table td {
  width: auto !important;
  min-width: 0;
  padding: 11px 12px;
  vertical-align: middle;
  border-right: 0;
  border-bottom: 1px solid var(--ct-border);
  text-align: left;
}

.ct-data-table th {
  position: sticky;
  z-index: 2;
  top: 0;
  color: var(--ct-ink-500);
  background: var(--ct-surface-subtle);
  font-size: 10px;
  font-weight: 730;
  line-height: 14px;
  letter-spacing: .055em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ct-data-table td {
  color: var(--ct-ink-700);
  background: var(--ct-surface);
  font-size: 12px;
  line-height: 17px;
}

.ct-data-table tbody tr:last-child td {
  border-bottom: 0;
}

.ct-data-table tbody tr:hover td,
.ct-data-table .ct-clickable-row:focus td {
  background: #f8fcfd;
}

.ct-clickable-row {
  cursor: pointer;
}

.ct-cell-primary {
  display: block;
  color: var(--ct-ink-800);
  font-weight: 640;
  white-space: nowrap;
}

.ct-cell-secondary {
  display: block;
  max-width: 190px;
  overflow: hidden;
  margin-top: 1px;
  color: var(--ct-ink-500);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
}

.ct-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px;
  background: var(--ct-surface);
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-md);
  box-shadow: var(--ct-shadow-sm);
}

.ct-field {
  min-height: 36px;
  padding: 7px 10px;
  color: var(--ct-ink-700);
  background: var(--ct-surface);
  border: 1px solid var(--ct-border-strong);
  border-radius: var(--ct-radius-sm);
  font-size: 12px;
}

.ct-field:hover {
  border-color: #aebbc7;
}

.ct-field--search {
  min-width: min(250px, 100%);
  flex: 1 1 220px;
  padding-left: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23687789' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-position: 10px center;
  background-repeat: no-repeat;
}

.ct-filter-summary {
  margin-left: auto;
  color: var(--ct-ink-500);
  font-size: 11px;
  white-space: nowrap;
}

.ct-empty,
.ct-error {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 32px;
  text-align: center;
}

.ct-empty__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  color: var(--ct-brand-700);
  background: var(--ct-brand-50);
  border-radius: 10px;
}

.ct-empty h2,
.ct-empty h3,
.ct-error h2 {
  margin: 0;
  color: var(--ct-ink-950);
  font-size: 16px;
}

.ct-empty p,
.ct-error p {
  max-width: 520px;
  margin: 7px auto 0;
  color: var(--ct-ink-500);
  font-size: 13px;
  line-height: 20px;
}

.ct-error {
  color: var(--ct-critical);
  background: var(--ct-critical-bg);
  border: 1px solid #fecaca;
  border-radius: var(--ct-radius-md);
}

.ct-skeleton {
  overflow: hidden;
  background: #e9eef2;
  border-radius: 5px;
  position: relative;
}

.ct-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .68), transparent);
  transform: translateX(-100%);
  animation: ct-shimmer 1.35s infinite;
}

@keyframes ct-shimmer { to { transform: translateX(100%); } }

.ct-chart {
  width: 100%;
  min-height: 150px;
  display: grid;
  align-items: end;
  grid-template-columns: repeat(7, minmax(24px, 1fr));
  gap: 12px;
  padding: 16px 20px 12px;
}

.ct-chart__day {
  height: 122px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 7px;
  align-items: end;
}

.ct-chart__bar {
  width: 100%;
  min-height: 3px;
  align-self: end;
  background: var(--ct-brand-500);
  border-radius: 4px 4px 1px 1px;
  opacity: .8;
}

.ct-chart__day span {
  color: var(--ct-ink-500);
  font-size: 10px;
  text-align: center;
}

.ct-drawer-scrim {
  position: fixed;
  z-index: 300;
  inset: 0;
  background: rgba(11, 18, 32, .38);
  backdrop-filter: blur(1px);
}

.ct-drawer {
  position: fixed;
  z-index: 310;
  inset: 0 0 0 auto;
  width: min(680px, calc(100vw - 24px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  color: var(--ct-ink-800);
  background: var(--ct-surface);
  border-left: 1px solid var(--ct-border);
  box-shadow: var(--ct-shadow-md);
  animation: ct-drawer-in 160ms ease-out;
}

@keyframes ct-drawer-in { from { transform: translateX(18px); opacity: .75; } }

.ct-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  margin: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ct-border);
  border-radius: 0;
  box-shadow: none;
}

.ct-drawer__header h2 {
  margin: 2px 0 0;
  color: var(--ct-ink-950);
  font-size: 18px;
  line-height: 24px;
}

.ct-drawer__header p {
  margin: 4px 0 0;
  color: var(--ct-ink-500);
  font-size: 12px;
}

.ct-tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  padding: 0 16px;
  border-bottom: 1px solid var(--ct-border);
}

.ct-tab {
  padding: 12px 8px 10px;
  color: var(--ct-ink-500);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  font-size: 12px;
  font-weight: 620;
  white-space: nowrap;
  cursor: pointer;
}

.ct-tab[aria-selected="true"] {
  color: var(--ct-brand-700);
  border-bottom-color: var(--ct-brand-600);
}

.ct-drawer__body {
  overflow: auto;
  padding: 20px 22px 36px;
}

.ct-definition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ct-definition {
  min-width: 0;
  padding: 11px 12px;
  background: var(--ct-surface-subtle);
  border: 1px solid var(--ct-border);
  border-radius: 8px;
}

.ct-definition dt {
  margin: 0 0 4px;
  color: var(--ct-ink-500);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.ct-definition dd {
  overflow-wrap: anywhere;
  margin: 0;
  color: var(--ct-ink-800);
  font-size: 12px;
  line-height: 17px;
}

.ct-code {
  overflow: auto;
  padding: 14px;
  color: #d7e4ee;
  background: #101923;
  border-radius: 8px;
  font: 11px/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.ct-import-panel {
  margin-bottom: 16px;
}

.ct-import-panel > summary {
  list-style: none;
  cursor: pointer;
}

.ct-import-panel > summary::-webkit-details-marker { display: none; }

.ct-import-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
}

.ct-import-summary strong {
  display: block;
  color: var(--ct-ink-950);
  font-size: 13px;
}

.ct-import-summary span {
  display: block;
  margin-top: 2px;
  color: var(--ct-ink-500);
  font-size: 11px;
}

#ctEvidenceImport {
  margin: 0 !important;
  padding: 20px !important;
  border: 0 !important;
  border-top: 1px solid var(--ct-border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.ct-import-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: import-step;
}

.ct-import-steps li {
  position: relative;
  padding-top: 26px;
  color: var(--ct-ink-500);
  font-size: 11px;
  font-weight: 620;
  text-align: center;
  counter-increment: import-step;
}

.ct-import-steps li::before {
  position: absolute;
  z-index: 1;
  top: 0;
  left: calc(50% - 10px);
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: var(--ct-ink-500);
  background: var(--ct-surface);
  border: 1px solid var(--ct-border-strong);
  border-radius: 50%;
  content: counter(import-step);
  font-size: 10px;
}

.ct-import-steps li:not(:last-child)::after {
  position: absolute;
  top: 10px;
  left: calc(50% + 10px);
  width: calc(100% - 20px);
  height: 1px;
  background: var(--ct-border);
  content: "";
}

.ct-import-steps li.active {
  color: var(--ct-brand-700);
}

.ct-import-steps li.active::before {
  color: #fff;
  background: var(--ct-brand-600);
  border-color: var(--ct-brand-600);
}

.ct-dropzone {
  margin-top: 16px;
  padding: 28px;
  color: var(--ct-ink-700);
  background: #f7fcfd;
  border: 1px dashed #71bccc;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}

.ct-dropzone:hover {
  background: var(--ct-brand-50);
  border-color: var(--ct-brand-600);
}

.ct-dropzone strong {
  display: block;
  font-size: 13px;
}

.ct-dropzone div {
  margin-top: 4px;
  color: var(--ct-ink-500);
  font-size: 12px;
}

.ct-import-textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
}

.ct-import-message {
  color: var(--ct-ink-600);
  font-size: 12px;
}

.ct-legacy-view > .tools,
.ct-legacy-view > table,
.ct-legacy-view > .panel {
  margin-left: 0;
  margin-right: 0;
}

.ct-staged-page {
  min-height: calc(100vh - 164px);
  display: grid;
  place-items: center;
}

/* Cookie inventory */
.ct-inventory-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px;
  border-bottom: 1px solid var(--ct-border);
}

.ct-inventory-toolbar .ct-field--search {
  max-width: 340px;
}

.ct-inventory-automation {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.ct-inventory-table {
  min-width: 1120px;
}

.ct-inventory-table td:nth-child(5) {
  min-width: 260px;
  white-space: normal;
}

.ct-inventory-table .btn-sm {
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--ct-border-strong);
  border-radius: 5px;
  font-size: 11px;
  box-shadow: none;
}

/* Classification review */
.ct-review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  align-items: start;
  gap: 16px;
  min-height: 520px;
}

.ct-review-queue {
  min-width: 0;
  overflow: hidden;
}

.ct-review-filters {
  border: 0;
  border-bottom: 1px solid var(--ct-border);
  border-radius: 0;
  box-shadow: none;
}

.ct-review-table-wrap {
  max-height: calc(100vh - 300px);
}

.ct-review-table {
  min-width: 720px;
}

.ct-review-form {
  position: sticky;
  top: calc(var(--ct-topbar-height) + 16px);
  max-height: calc(100vh - var(--ct-topbar-height) - 32px);
  overflow: hidden;
}

.ct-review-form-header {
  position: sticky;
  z-index: 2;
  top: 0;
  background: var(--ct-surface);
}

.ct-review-form-body {
  max-height: calc(100vh - 220px);
  overflow-y: auto;
  padding: 18px 20px 88px;
}

.ct-review-form-body > div {
  margin-bottom: 16px !important;
}

.ct-review-form-body label {
  display: block !important;
  margin-bottom: 6px !important;
  color: var(--ct-ink-600) !important;
  font-size: 11px !important;
  font-weight: 680 !important;
  letter-spacing: .025em;
}

.ct-review-form-body input,
.ct-review-form-body select,
.ct-review-form-body textarea {
  width: 100% !important;
  padding: 8px 10px !important;
  color: var(--ct-ink-800);
  background: var(--ct-surface) !important;
  border: 1px solid var(--ct-border-strong) !important;
  border-radius: var(--ct-radius-sm) !important;
  font-size: 12px;
}

.ct-review-form-body input[readonly] {
  background: var(--ct-surface-subtle) !important;
}

.ct-review-form-actions {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--ct-border);
  backdrop-filter: blur(8px);
}

/* Findings */
.findings-container {
  display: grid !important;
  gap: 16px !important;
  padding: 0 !important;
}

.findings-toolbar {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px !important;
  border-radius: var(--ct-radius-md) !important;
}

.findings-toolbar strong {
  color: var(--ct-ink-800);
  font-size: 13px;
}

.findings-toolbar .ct-eyebrow {
  margin-bottom: 3px;
}

.summary-badge {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px !important;
  padding: 0 !important;
  color: var(--ct-ink-600) !important;
  background: transparent !important;
  border-radius: 0 !important;
  white-space: nowrap;
}

.summary-badge span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 13px 15px;
  background: var(--ct-surface);
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-md);
  box-shadow: var(--ct-shadow-sm);
  color: var(--ct-ink-500);
  font-size: 10px;
  line-height: 14px;
}

.summary-badge strong {
  color: var(--ct-ink-950);
  font-size: 17px;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
}

.summary-badge span:first-child {
  border-top-color: #f0a3a3;
}

.findings-vendor-disclosure {
  overflow: hidden;
}

.findings-vendor-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  list-style: none;
  cursor: pointer;
}

.findings-vendor-disclosure > summary::-webkit-details-marker {
  display: none;
}

.findings-vendor-disclosure > summary > span:first-child {
  display: grid;
  gap: 2px;
}

.findings-vendor-disclosure > summary strong {
  color: var(--ct-ink-800);
  font-size: 12px;
}

.findings-vendor-disclosure > summary small {
  color: var(--ct-ink-500);
  font-size: 10px;
}

.findings-vendor-disclosure[open] > summary {
  border-bottom: 1px solid var(--ct-border);
}

.ct-filter-notice {
  padding: 10px 12px;
  color: var(--ct-info);
  background: var(--ct-info-bg);
  border: 1px solid #c6e6fa;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 620;
}

.findings-filters {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(120px, 1fr)) auto;
  align-items: end !important;
  gap: 10px !important;
  padding: 12px !important;
  background: var(--ct-surface) !important;
  border: 1px solid var(--ct-border) !important;
  border-radius: var(--ct-radius-md) !important;
}

.ct-filter-control {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: var(--ct-ink-500);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.findings-filters .filter-input,
.findings-filters .filter-select {
  min-height: 36px;
  padding: 7px 10px;
  color: var(--ct-ink-700);
  background: var(--ct-surface);
  border: 1px solid var(--ct-border-strong);
  border-radius: var(--ct-radius-sm);
  font-size: 12px;
}

.findings-filters .filter-input {
  width: 100%;
  min-width: 0;
}

.findings-filters .filter-select {
  width: 100%;
  min-width: 0;
}

.findings-table-wrapper {
  overflow: auto !important;
  border: 1px solid var(--ct-border) !important;
  border-radius: var(--ct-radius-md) !important;
}

.findings-table {
  min-width: 1380px;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
}

.findings-table th,
.findings-table td {
  width: auto !important;
  min-width: 0;
  padding: 11px 12px !important;
}

.findings-table th a {
  padding: 0 !important;
  color: var(--ct-ink-500) !important;
  font-size: 10px;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.findings-table th a:hover {
  color: var(--ct-brand-700) !important;
  background: transparent !important;
}

.findings-container .severity-badge,
.findings-container .status-badge {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  padding: 3px 7px !important;
  border: 1px solid currentColor;
  border-radius: 999px !important;
  font-size: 10px !important;
  font-weight: 680 !important;
  white-space: nowrap;
}

.findings-container .severity-badge::before,
.findings-container .status-badge::before {
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
  content: "";
}

.findings-detail-drawer {
  z-index: 310 !important;
  top: 0 !important;
  width: min(620px, calc(100vw - 24px)) !important;
  height: 100vh !important;
  background: var(--ct-surface) !important;
  border-left: 1px solid var(--ct-border);
  box-shadow: var(--ct-shadow-md) !important;
}

.findings-detail-header {
  min-height: 72px;
  padding: 18px 20px !important;
}

.findings-detail-tabs {
  padding: 0 16px !important;
  background: var(--ct-surface) !important;
}

.findings-detail-tabs .tab-btn {
  padding: 12px 9px 10px !important;
  color: var(--ct-ink-500);
  font-size: 12px;
}

.findings-detail-tabs .tab-btn.active {
  color: var(--ct-brand-700) !important;
  border-bottom-color: var(--ct-brand-600) !important;
}

.findings-detail-body {
  padding: 20px !important;
}

.detail-field {
  padding: 12px;
  background: var(--ct-surface-subtle);
  border: 1px solid var(--ct-border);
  border-radius: 8px;
}

.findings-detail-actions {
  padding: 12px 16px !important;
  background: var(--ct-surface) !important;
}

.findings-vendor-disclosure .vendor-risk-overview {
  gap: 14px;
  padding: 18px;
}

.findings-vendor-disclosure .vendor-risk-header {
  gap: 3px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ct-border);
}

.findings-vendor-disclosure .vendor-risk-header h2 {
  color: var(--ct-ink-800);
  font-size: 14px;
  font-weight: 680;
}

.findings-vendor-disclosure .vendor-card {
  gap: 12px;
  padding: 14px;
  border-width: 1px 1px 1px 3px;
  border-radius: 8px;
  box-shadow: none;
}

.findings-vendor-disclosure .vendor-card:hover {
  box-shadow: var(--ct-shadow-sm);
  transform: none;
}

.findings-vendor-disclosure .vendor-badge {
  border-radius: 999px;
  font-size: 9px;
}

.findings-vendor-disclosure .score-number {
  font-size: 25px;
}

.findings-vendor-disclosure .vendor-card-action {
  width: fit-content;
  align-self: flex-end;
  padding: 7px 10px;
  font-size: 11px;
}

/* Toast feedback for long-running finding actions */
.ct-toast {
  position: fixed;
  z-index: 10000;
  top: 20px;
  right: 20px;
  width: min(390px, calc(100vw - 32px));
  padding: 15px 16px;
  color: var(--ct-ink-700);
  background: var(--ct-surface);
  border: 1px solid var(--ct-border-strong);
  border-left: 3px solid var(--ct-info);
  border-radius: 9px;
  box-shadow: var(--ct-shadow-md);
}

.ct-toast--success { border-left-color: var(--ct-success); }
.ct-toast--critical { border-left-color: var(--ct-critical); }

.ct-toast__layout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ct-toast__content {
  display: grid;
  gap: 6px;
}

.ct-toast__content strong {
  color: var(--ct-ink-950);
  font-size: 12px;
}

.ct-toast__content p {
  margin: 0;
  color: var(--ct-ink-600);
  font-size: 11px;
  line-height: 17px;
}

.ct-toast__content code {
  padding: 2px 4px;
  color: var(--ct-ink-700);
  background: var(--ct-surface-subtle);
  border: 1px solid var(--ct-border);
  border-radius: 4px;
  font-size: 10px;
}

.ct-toast__progress {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ct-info);
  font-size: 10px;
  font-weight: 620;
}

.ct-inline-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid #c6e6fa;
  border-top-color: var(--ct-info);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.ct-toast__close {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  color: var(--ct-ink-500);
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 17px;
  cursor: pointer;
}

/* Reports */
.reports-container {
  display: grid;
  gap: 16px;
  min-height: calc(100vh - 140px);
}

.reports-header {
  margin: 0 !important;
}

.reports-controls {
  padding: 16px 18px;
}

.reports-controls-grid {
  display: grid;
  grid-template-columns: minmax(130px, .7fr) minmax(210px, 1.2fr) minmax(210px, 1.2fr) minmax(170px, 1fr) auto;
  align-items: end;
  gap: 14px;
}

.reports-controls .control-group {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.reports-controls label {
  color: var(--ct-ink-600);
  font-size: 11px;
  font-weight: 680;
}

.reports-controls .form-control {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  color: var(--ct-ink-700);
  background: var(--ct-surface);
  border: 1px solid var(--ct-border-strong);
  border-radius: var(--ct-radius-sm);
  font-size: 12px;
}

.reports-controls-grid > .btn {
  min-width: 132px;
  height: 36px;
}

.reports-controls-note {
  margin: 10px 0 0;
  padding-top: 10px;
  color: var(--ct-ink-500);
  border-top: 1px solid var(--ct-border);
  font-size: 10px;
  line-height: 15px;
}

.reports-view {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(260px, .7fr) minmax(0, 1.7fr);
  gap: 16px;
}

.reports-list-panel,
.reports-detail-panel {
  min-width: 0;
  overflow: hidden;
}

.reports-list {
  max-height: 620px;
  overflow-y: auto;
}

.report-item {
  margin: 0 !important;
  padding: 13px 16px !important;
  background: var(--ct-surface) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ct-border) !important;
  border-left: 3px solid transparent !important;
  border-radius: 0 !important;
  cursor: pointer;
}

.report-item:hover {
  background: var(--ct-surface-subtle) !important;
}

.report-item.active {
  background: var(--ct-brand-50) !important;
  border-left-color: var(--ct-brand-600) !important;
}

.report-item-site {
  color: var(--ct-ink-800);
  font-size: 12px;
  font-weight: 680;
}

.report-item-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 3px;
  color: var(--ct-ink-500);
  font-size: 10px;
}

.report-detail {
  min-height: 520px;
  max-height: 680px;
  overflow-y: auto;
  padding: 20px;
}

.reports-container .empty-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 28px;
  color: var(--ct-ink-500);
  font-size: 12px;
  text-align: center;
}

.report-header-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.report-info-item {
  padding: 11px 12px;
  background: var(--ct-surface-subtle);
  border: 1px solid var(--ct-border);
  border-radius: 8px;
}

.report-info-label {
  margin-bottom: 4px;
  color: var(--ct-ink-500);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.report-info-value {
  overflow-wrap: anywhere;
  color: var(--ct-ink-800);
  font-size: 12px;
}

.report-summary-box {
  margin-bottom: 18px;
  padding: 14px 16px;
  color: var(--ct-warning);
  background: var(--ct-warning-bg);
  border: 1px solid #f5d99c;
  border-left: 3px solid var(--ct-warning);
  border-radius: 8px;
  font-size: 12px;
}

.report-summary-box.high {
  color: var(--ct-critical);
  background: var(--ct-critical-bg);
  border-color: #fecaca;
  border-left-color: var(--ct-critical);
}

.report-summary-box h4,
.findings-section h4 {
  margin: 0 0 10px;
  color: var(--ct-ink-800);
  font-size: 12px;
}

.findings-section {
  margin-bottom: 18px;
}

.report-findings-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.report-finding-count {
  display: grid;
  gap: 2px;
  padding: 10px 11px;
  background: var(--ct-surface-subtle);
  border: 1px solid var(--ct-border);
  border-radius: 7px;
}

.report-finding-count strong {
  color: var(--ct-ink-950);
  font-size: 18px;
  line-height: 22px;
  font-variant-numeric: tabular-nums;
}

.report-finding-count span {
  color: var(--ct-ink-500);
  font-size: 9px;
  font-weight: 650;
  text-transform: uppercase;
}

.report-finding-count.critical { border-top-color: var(--ct-critical); }
.report-finding-count.high { border-top-color: var(--ct-risk); }
.report-finding-count.medium { border-top-color: var(--ct-warning); }
.report-finding-count.low { border-top-color: var(--ct-success); }

.finding-card {
  margin-bottom: 8px;
  padding: 12px;
  background: var(--ct-surface-subtle);
  border: 1px solid var(--ct-border);
  border-left: 3px solid var(--ct-critical);
  border-radius: 7px;
  font-size: 12px;
}

.finding-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  color: var(--ct-ink-800);
  font-weight: 650;
}

.finding-desc {
  margin-bottom: 6px;
  color: var(--ct-ink-500);
}

.risk-badge {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 680;
}

.risk-badge.HIGH { color: var(--ct-critical); background: var(--ct-critical-bg); }
.risk-badge.MEDIUM { color: var(--ct-warning); background: var(--ct-warning-bg); }
.risk-badge.LOW { color: var(--ct-success); background: var(--ct-success-bg); }

.report-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--ct-border);
}

.reports-container .btn-primary {
  color: #fff;
  background: var(--ct-brand-600);
  border: 1px solid var(--ct-brand-600);
}

.reports-container .btn-secondary {
  color: var(--ct-ink-700);
  background: var(--ct-surface);
  border: 1px solid var(--ct-border-strong);
}

.reports-container .loading {
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ct-ink-500);
  font-size: 12px;
}

.reports-container .spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin .65s linear infinite;
}

@media (max-width: 1180px) {
  .ct-grid--hero,
  .ct-grid--main {
    grid-template-columns: 1fr;
  }

  .ct-metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ct-metric:nth-child(2) {
    border-right: 0;
  }

  .ct-metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--ct-border);
  }

  .ct-review-layout,
  .reports-view {
    grid-template-columns: 1fr;
  }

  .ct-review-form {
    position: relative;
    top: auto;
    max-height: none;
  }

  .reports-controls-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .findings-filters {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }
}

@media (max-width: 920px) {
  .ct-auth-shell {
    grid-template-columns: 1fr;
  }

  .ct-auth-brand {
    min-height: auto;
    padding: 28px 24px 34px;
  }

  .ct-auth-brand-content {
    margin: 0;
  }

  .ct-auth-message {
    margin: 24px 0 34px;
    padding: 0;
  }

  .ct-auth-message h1 {
    font-size: clamp(34px, 9vw, 52px);
  }

  .ct-auth-copyright {
    display: none;
  }

  .ct-auth-form-region {
    min-height: auto;
    padding: 36px 20px 60px;
  }

  .ct-sidebar {
    transform: translateX(-100%);
  }

  body.ct-sidebar-open .ct-sidebar {
    transform: none;
  }

  .ct-sidebar-scrim {
    position: fixed;
    z-index: 110;
    inset: 0;
    display: none;
    background: rgba(11, 18, 32, .45);
  }

  body.ct-sidebar-open .ct-sidebar-scrim {
    display: block;
  }

  .ct-main-shell {
    margin-left: 0;
  }

  .ct-mobile-menu {
    display: inline-flex;
  }

  .ct-content {
    padding: 24px 20px 40px;
  }
}

@media (max-width: 420px) {
  .ct-auth-logo {
    gap: 11px;
  }

  .ct-auth-logo-mark {
    width: 78px;
    height: 78px;
    flex-basis: 78px;
  }

  .ct-auth-logo-mark img {
    width: 370px;
    height: auto;
    transform: translate(-16px, -24px);
  }

  .ct-auth-wordmark {
    font-size: 26px;
  }
}

.ct-integration-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(330px, .7fr);
  gap: 16px;
  align-items: start;
  margin-top: 18px;
}

.ct-integrations-page {
  width: 100%;
  display: block;
}

.ct-integrations-page > .ct-page-header {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  justify-self: stretch;
  align-items: center;
  margin-bottom: 18px;
}

.ct-integrations-page > .ct-page-header > :first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.ct-integrations-page > .ct-page-header .ct-actions {
  max-width: 100%;
  min-width: 0;
  flex: 0 1 auto;
  margin-left: auto;
  justify-content: flex-end;
}

.ct-integrations-page > .ct-page-header .ct-actions .ct-field {
  max-width: 100%;
}

.ct-integration-metrics {
  width: 100%;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ct-integration-table {
  min-width: 880px;
}

.ct-integration-form {
  display: grid;
  gap: 14px;
}

.ct-integration-form > label,
.ct-webhook-create label {
  display: grid;
  gap: 6px;
  color: var(--ct-ink-700);
  font-size: 12px;
  font-weight: 640;
}

.ct-integration-form > [data-property-field][hidden] {
  display: none;
}

.ct-integration-form .ct-field,
.ct-webhook-create .ct-field {
  width: 100%;
}

.ct-integration-form textarea {
  min-height: 70px;
  resize: vertical;
}

.ct-integration-form small,
.ct-scope-field small,
.ct-muted {
  margin: 0;
  color: var(--ct-ink-500);
  font-size: 11px;
  font-weight: 450;
  line-height: 17px;
}

.ct-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ct-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--ct-ink-700);
  font-size: 12px;
  font-weight: 640;
}

.ct-scope-field {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  background: var(--ct-surface-subtle);
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-sm);
}

.ct-scope-field legend {
  padding: 0 5px;
  color: var(--ct-ink-600);
  font-size: 11px;
  font-weight: 700;
}

.ct-scope-field label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ct-ink-700);
  font-size: 12px;
  font-weight: 500;
}

.ct-scope-field input {
  accent-color: var(--ct-brand-600);
}

.ct-endpoint,
.ct-webhook-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-sm);
}

.ct-endpoint > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.ct-endpoint strong {
  color: var(--ct-ink-800);
  font-size: 12px;
}

.ct-endpoint .ct-mono {
  overflow: hidden;
  color: var(--ct-ink-500);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct-webhook-create {
  grid-template-columns: minmax(0, 1fr) auto;
}

.ct-contract-links {
  display: grid;
  gap: 9px;
}

.ct-contract-links a {
  color: var(--ct-brand-700);
  font-size: 12px;
  font-weight: 640;
  text-decoration: none;
}

.ct-contract-links code,
.ct-secret-reveal code {
  overflow-wrap: anywhere;
  padding: 8px 10px;
  color: var(--ct-ink-700);
  background: var(--ct-surface-subtle);
  border: 1px solid var(--ct-border);
  border-radius: 6px;
  font-size: 11px;
}

.ct-secret-reveal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding: 16px 18px;
  color: var(--ct-ink-800);
  background: var(--ct-info-bg);
  border: 1px solid #a8dcf3;
  border-radius: var(--ct-radius-md);
}

.ct-secret-reveal > div:first-child {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.ct-secret-reveal p {
  margin: 0;
  color: var(--ct-ink-600);
  font-size: 12px;
}

.ct-integration-message {
  position: fixed;
  z-index: 500;
  right: 22px;
  bottom: 22px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 14px;
  color: var(--ct-ink-800);
  background: var(--ct-surface);
  border: 1px solid var(--ct-border);
  border-left: 3px solid var(--ct-info);
  border-radius: var(--ct-radius-sm);
  box-shadow: var(--ct-shadow-md);
  font-size: 12px;
}

.ct-integration-message--success { border-left-color: var(--ct-success); }
.ct-integration-message--critical { border-left-color: var(--ct-critical); }
.ct-empty--compact { min-height: 140px; }

/* Organisation governance workspace */
.ct-organisation-page {
  width: 100%;
  display: block;
}

.ct-organisation-page > .ct-page-header {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  justify-self: stretch;
  align-items: center;
  margin-bottom: 18px;
}

.ct-organisation-page > .ct-page-header > :first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.ct-organisation-page > .ct-page-header .ct-actions {
  max-width: 100%;
  min-width: 0;
  flex: 0 1 auto;
  margin-left: auto;
  justify-content: flex-end;
}

.ct-organisation-page > .ct-page-header .ct-actions .ct-field {
  max-width: 100%;
}

.ct-organisation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(340px, .72fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.ct-organisation-metrics {
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ct-organisation-summary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  padding: 16px 18px;
}

.ct-organisation-summary + .ct-card {
  width: 100%;
  margin-top: 16px;
}

.ct-organisation-summary > div:first-child {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ct-organisation-summary h2,
.ct-organisation-summary p {
  margin: 0;
}

.ct-organisation-summary h2 {
  color: var(--ct-ink-950);
  font-size: 17px;
}

.ct-organisation-summary p {
  margin-top: 3px;
  color: var(--ct-ink-500);
  font-size: 11px;
}

.ct-organisation-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--ct-ink-950);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 760;
  letter-spacing: .04em;
}

.ct-ownership-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ct-ownership-grid label,
.ct-member-add label {
  display: grid;
  gap: 6px;
  color: var(--ct-ink-700);
  font-size: 12px;
  font-weight: 650;
}

.ct-ownership-grid small,
.ct-member-add small {
  color: var(--ct-ink-500);
  font-size: 11px;
  font-weight: 450;
  line-height: 16px;
}

.ct-ownership-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.ct-member-table {
  min-width: 820px;
}

.ct-member-role {
  min-width: 170px;
}

.ct-member-add {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, .65fr) auto;
  align-items: end;
  gap: 10px;
}

.ct-member-add > small {
  grid-column: 1 / -1;
}

.ct-brand-list,
.ct-role-list {
  display: grid;
  gap: 10px;
}

.ct-brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: var(--ct-surface-subtle);
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-sm);
}

.ct-brand-row > div {
  min-width: 0;
}

.ct-brand-row strong {
  color: var(--ct-ink-900);
  font-size: 13px;
}

.ct-brand-row .ct-mono,
.ct-brand-row small {
  display: block;
  margin-top: 4px;
  color: var(--ct-ink-500);
  font-size: 10px;
}

.ct-brand-row p {
  margin: 7px 0 0;
  color: var(--ct-ink-600);
  font-size: 11px;
  line-height: 16px;
}

.ct-role-list > div {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ct-border);
}

.ct-role-list > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.ct-role-list strong {
  color: var(--ct-ink-800);
  font-size: 12px;
}

.ct-role-list p {
  margin: 3px 0 0;
  color: var(--ct-ink-500);
  font-size: 11px;
  line-height: 16px;
}

.ct-role-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  color: var(--ct-brand-700);
  background: var(--ct-brand-50);
  border: 1px solid #c8e3ed;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 760;
}

@media (max-width: 1100px) {
  .ct-organisation-layout {
    grid-template-columns: 1fr;
  }

  .ct-organisation-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .ct-organisation-page > .ct-page-header {
    align-items: stretch;
  }

  .ct-organisation-page > .ct-page-header .ct-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .ct-ownership-grid,
  .ct-member-add {
    grid-template-columns: 1fr;
  }

  .ct-ownership-actions,
  .ct-member-add > small {
    grid-column: auto;
  }

  .ct-organisation-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .ct-brand-row {
    flex-direction: column;
  }
}

/* Property, settings, and access governance workspaces */
.ct-sites-page,
.ct-roles-page {
  width: 100%;
  display: block;
}

.ct-sites-page > .ct-page-header,
.ct-roles-page > .ct-page-header {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  justify-self: stretch;
  align-items: center;
  margin-bottom: 18px;
}

.ct-sites-page > .ct-page-header > :first-child,
.ct-roles-page > .ct-page-header > :first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.ct-sites-page > .ct-page-header .ct-actions,
.ct-roles-page > .ct-page-header .ct-actions {
  max-width: 100%;
  min-width: 0;
  flex: 0 1 auto;
  margin-left: auto;
  justify-content: flex-end;
}

.ct-sites-page > .ct-page-header .ct-actions .ct-field,
.ct-roles-page > .ct-page-header .ct-actions .ct-field {
  max-width: 100%;
}

.ct-sites-metrics,
.ct-roles-metrics {
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ct-site-toolbar {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  padding: 12px;
}

.ct-site-toolbar label,
.ct-site-toolbar .ct-field {
  width: 100%;
}

.ct-sites-layout {
  width: 100%;
}

.ct-sites-layout,
.ct-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(340px, .72fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.ct-property-list {
  display: grid;
  gap: 10px;
}

.ct-property-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  background: var(--ct-surface-subtle);
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-sm);
}

.ct-property-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--ct-brand-700);
  background: var(--ct-brand-50);
  border: 1px solid #c8e3ed;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 760;
}

.ct-property-main {
  min-width: 0;
}

.ct-property-main h3 {
  margin: 0;
  color: var(--ct-ink-900);
  font-size: 14px;
}

.ct-property-main > .ct-mono {
  display: block;
  margin-top: 3px;
  color: var(--ct-ink-500);
  font-size: 10px;
}

.ct-property-identifiers {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.ct-property-identifiers code {
  padding: 3px 6px;
  color: var(--ct-ink-700);
  background: var(--ct-surface);
  border: 1px solid var(--ct-border);
  border-radius: 5px;
  font-size: 10px;
}

.ct-property-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--ct-border);
}

.ct-property-meta span {
  color: var(--ct-ink-600);
  font-size: 11px;
  line-height: 16px;
}

.ct-property-meta strong {
  display: block;
  color: var(--ct-ink-500);
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ct-property-actions {
  display: flex;
  gap: 6px;
}

.ct-site-editor {
  position: sticky;
  top: 76px;
}

.ct-settings-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 16px 18px;
}

.ct-settings-banner > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ct-settings-banner h2,
.ct-settings-banner p,
.ct-settings-save p {
  margin: 0;
}

.ct-settings-banner h2 {
  color: var(--ct-ink-900);
  font-size: 16px;
}

.ct-settings-banner p,
.ct-settings-save p {
  margin-top: 3px;
  color: var(--ct-ink-500);
  font-size: 11px;
}

.ct-settings-fields {
  display: grid;
  gap: 16px;
}

.ct-settings-fields > label:not(.ct-preference) {
  display: grid;
  gap: 6px;
  color: var(--ct-ink-700);
  font-size: 12px;
  font-weight: 650;
}

.ct-settings-fields small {
  color: var(--ct-ink-500);
  font-size: 11px;
  font-weight: 450;
  line-height: 16px;
}

.ct-preference-list {
  display: grid;
}

.ct-preference {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--ct-border);
  cursor: pointer;
}

.ct-preference:first-child {
  padding-top: 0;
}

.ct-preference:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.ct-preference > span:first-child {
  display: grid;
  gap: 3px;
}

.ct-preference strong {
  color: var(--ct-ink-800);
  font-size: 12px;
}

.ct-preference small {
  color: var(--ct-ink-500);
  font-size: 11px;
  line-height: 16px;
}

.ct-preference input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ct-switch {
  position: relative;
  width: 36px;
  height: 20px;
  flex: 0 0 36px;
  background: var(--ct-ink-300);
  border-radius: 999px;
  transition: background .15s ease;
}

.ct-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(16, 25, 35, .25);
  transition: transform .15s ease;
}

.ct-preference input:checked + .ct-switch {
  background: var(--ct-brand-600);
}

.ct-preference input:checked + .ct-switch::after {
  transform: translateX(16px);
}

.ct-preference input:focus-visible + .ct-switch {
  outline: 2px solid var(--ct-brand-600);
  outline-offset: 2px;
}

.ct-preference input:disabled + .ct-switch {
  opacity: .55;
}

.ct-policy-lock {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  background: var(--ct-surface-subtle);
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-sm);
}

.ct-policy-lock strong,
.ct-policy-lock p {
  margin: 0;
}

.ct-policy-lock strong {
  color: var(--ct-ink-800);
  font-size: 12px;
}

.ct-policy-lock p {
  margin-top: 3px;
  color: var(--ct-ink-500);
  font-size: 11px;
  line-height: 16px;
}

.ct-settings-save {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.ct-settings-save strong {
  color: var(--ct-ink-900);
  font-size: 12px;
}

.ct-role-catalog {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.ct-role-card {
  padding: 14px;
}

.ct-role-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ct-role-icon--large {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

.ct-role-card h2 {
  margin: 12px 0 0;
  color: var(--ct-ink-900);
  font-size: 13px;
}

.ct-role-card p {
  min-height: 51px;
  margin: 5px 0 10px;
  color: var(--ct-ink-500);
  font-size: 11px;
  line-height: 17px;
}

.ct-role-card small {
  color: var(--ct-ink-500);
  font-size: 10px;
}

.ct-role-matrix-card {
  width: 100%;
  margin-top: 16px;
}

.ct-roles-page > .ct-role-matrix-card + .ct-card {
  width: 100%;
  margin-top: 16px;
}

.ct-role-matrix {
  min-width: 1040px;
}

.ct-role-matrix th:not(:first-child),
.ct-role-matrix td {
  width: 135px;
  text-align: center;
}

.ct-role-matrix tbody th {
  color: var(--ct-ink-700);
  font-size: 11px;
  font-weight: 560;
}

.ct-matrix-group {
  display: block;
  min-height: 13px;
  color: var(--ct-brand-700);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ct-permission-yes {
  display: inline-grid;
  min-width: 31px;
  place-items: center;
  padding: 3px 7px;
  color: var(--ct-success);
  background: var(--ct-success-bg);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 760;
  text-transform: uppercase;
}

.ct-permission-no {
  color: var(--ct-ink-300);
}

@media (max-width: 1180px) {
  .ct-role-catalog {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1000px) {
  .ct-sites-layout,
  .ct-settings-layout {
    grid-template-columns: 1fr;
  }

  .ct-site-editor {
    position: static;
  }

  .ct-site-toolbar {
    grid-template-columns: minmax(220px, 1fr) auto auto;
  }

  .ct-site-toolbar > .ct-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .ct-sites-page > .ct-page-header,
  .ct-roles-page > .ct-page-header {
    align-items: stretch;
  }

  .ct-sites-page > .ct-page-header .ct-actions,
  .ct-roles-page > .ct-page-header .ct-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .ct-sites-metrics,
  .ct-roles-metrics,
  .ct-role-catalog,
  .ct-property-meta,
  .ct-site-toolbar {
    grid-template-columns: 1fr;
  }

  .ct-property-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .ct-property-actions {
    grid-column: 1 / -1;
  }

  .ct-settings-banner,
  .ct-settings-save {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Customer documentation */
.ct-docs-page {
  min-height: 100vh;
  color: var(--ct-ink-700);
  background: #f5f8fa;
}

.ct-docs-page code,
.ct-docs-page pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.ct-docs-header {
  position: sticky;
  z-index: 100;
  top: 0;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 max(24px, calc((100vw - 1480px) / 2));
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--ct-border);
  box-shadow: 0 1px 2px rgba(11, 18, 32, .03);
  backdrop-filter: blur(12px);
}

.ct-docs-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ct-ink-950);
  text-decoration: none;
}

.ct-docs-brand-copy {
  display: grid;
  line-height: 1.1;
}

.ct-docs-brand strong {
  font-size: 14px;
  font-weight: 730;
}

.ct-docs-brand small {
  margin-top: 3px;
  color: var(--ct-ink-500);
  font-size: 10px;
  font-weight: 680;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.ct-docs-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ct-docs-shell {
  width: min(1480px, 100%);
  min-height: calc(100vh - 66px);
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  margin: 0 auto;
}

.ct-docs-sidebar {
  position: sticky;
  top: 66px;
  height: calc(100vh - 66px);
  align-self: start;
  overflow-y: auto;
  padding: 30px 24px 34px;
  border-right: 1px solid var(--ct-border);
}

.ct-docs-sidebar-title {
  margin: 0 0 12px;
  color: var(--ct-ink-950);
  font-size: 13px;
  font-weight: 720;
}

.ct-docs-sidebar nav {
  display: grid;
  gap: 2px;
}

.ct-docs-sidebar nav a {
  display: block;
  padding: 7px 10px;
  color: var(--ct-ink-600);
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  font-size: 12px;
  font-weight: 540;
  line-height: 17px;
  text-decoration: none;
}

.ct-docs-sidebar nav a:hover,
.ct-docs-sidebar nav a.active {
  color: var(--ct-brand-700);
  background: var(--ct-brand-50);
  border-left-color: var(--ct-brand-600);
}

.ct-docs-sidebar-meta {
  display: grid;
  gap: 5px;
  margin-top: 24px;
  padding: 14px 10px;
  color: var(--ct-ink-500);
  border-top: 1px solid var(--ct-border);
  font-size: 10px;
  line-height: 14px;
}

.ct-docs-main {
  min-width: 0;
  padding: 42px clamp(28px, 5vw, 80px) 56px;
}

.ct-docs-article {
  max-width: 930px;
  margin: 0 auto;
}

.ct-docs-hero {
  padding: 28px 0 46px;
  border-bottom: 1px solid var(--ct-border);
  scroll-margin-top: 90px;
}

.ct-docs-hero h1 {
  max-width: 800px;
  margin: 8px 0 0;
  color: var(--ct-ink-950);
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 730;
  line-height: 1.08;
  letter-spacing: -.04em;
}

.ct-docs-lead {
  max-width: 780px;
  margin: 18px 0 0;
  color: var(--ct-ink-600);
  font-size: 17px;
  line-height: 28px;
}

.ct-docs-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
  color: var(--ct-ink-500);
  font-size: 11px;
}

.ct-docs-meta > span:not(:last-child)::after {
  margin-left: 10px;
  color: var(--ct-border-strong);
  content: "·";
}

.ct-docs-meta .ct-badge::after {
  display: none;
}

.ct-docs-section {
  padding: 44px 0 10px;
  scroll-margin-top: 82px;
}

.ct-docs-section + .ct-docs-section {
  margin-top: 28px;
  border-top: 1px solid var(--ct-border);
}

.ct-docs-section h2 {
  margin: 7px 0 16px;
  color: var(--ct-ink-950);
  font-size: clamp(23px, 3vw, 30px);
  line-height: 1.24;
  letter-spacing: -.025em;
}

.ct-docs-section h3 {
  margin: 26px 0 9px;
  color: var(--ct-ink-900);
  font-size: 16px;
  line-height: 22px;
}

.ct-docs-section p,
.ct-docs-section li {
  color: var(--ct-ink-650, var(--ct-ink-600));
  font-size: 14px;
  line-height: 23px;
}

.ct-docs-section p {
  margin: 10px 0;
}

.ct-docs-section ul {
  margin: 10px 0;
  padding-left: 20px;
}

.ct-docs-section li + li {
  margin-top: 5px;
}

.ct-docs-section p code,
.ct-docs-section li code,
.ct-docs-table code {
  padding: 2px 5px;
  color: #155e75;
  background: #ecfeff;
  border: 1px solid #cffafe;
  border-radius: 4px;
  font-size: 12px;
}

.ct-docs-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0;
}

.ct-docs-flow > div {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 16px;
  background: var(--ct-surface);
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-md);
  box-shadow: var(--ct-shadow-sm);
}

.ct-docs-flow > div > span,
.ct-docs-steps > li > span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  color: var(--ct-brand-800);
  background: var(--ct-brand-50);
  border: 1px solid #bae6fd;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 740;
}

.ct-docs-flow strong {
  color: var(--ct-ink-850, var(--ct-ink-800));
  font-size: 13px;
}

.ct-docs-flow small {
  color: var(--ct-ink-500);
  font-size: 11px;
  line-height: 17px;
}

.ct-docs-callout {
  margin: 22px 0;
  padding: 16px 18px;
  color: var(--ct-ink-700);
  background: var(--ct-info-bg);
  border: 1px solid #bae6fd;
  border-left: 3px solid var(--ct-info);
  border-radius: var(--ct-radius-sm);
}

.ct-docs-callout--important {
  background: #f0fdfa;
  border-color: #99f6e4;
  border-left-color: #0f766e;
}

.ct-docs-callout--warning {
  background: var(--ct-warning-bg);
  border-color: #f5d99c;
  border-left-color: var(--ct-warning);
}

.ct-docs-callout strong {
  color: var(--ct-ink-850, var(--ct-ink-800));
  font-size: 13px;
}

.ct-docs-callout p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 19px;
}

.ct-docs-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.ct-docs-columns:has(> :nth-child(3)) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ct-docs-panel {
  min-width: 0;
  padding: 18px;
  background: var(--ct-surface);
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-md);
}

.ct-docs-panel h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.ct-docs-panel ul {
  margin-bottom: 0;
}

.ct-docs-panel li {
  font-size: 12px;
  line-height: 19px;
}

.ct-docs-endpoint {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 12px 14px;
  background: #101923;
  border-radius: var(--ct-radius-sm);
}

.ct-docs-endpoint span {
  color: #91a4b5;
  font-size: 10px;
  font-weight: 680;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ct-docs-endpoint code {
  overflow: hidden;
  color: #e9fdff;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct-docs-endpoint button,
.ct-docs-code-header button {
  color: var(--ct-brand-700);
  background: transparent;
  border: 0;
  font-size: 11px;
  font-weight: 680;
  cursor: pointer;
}

.ct-docs-endpoint button {
  color: #67e8f9;
}

.ct-docs-steps {
  display: grid;
  gap: 0;
  margin: 22px 0;
  padding: 0;
  list-style: none;
}

.ct-docs-steps > li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  padding: 0 0 26px;
  position: relative;
}

.ct-docs-steps > li:not(:last-child)::before {
  position: absolute;
  top: 30px;
  bottom: 0;
  left: 12px;
  width: 1px;
  background: var(--ct-border-strong);
  content: "";
}

.ct-docs-steps h3,
.ct-docs-steps p {
  margin-top: 0;
}

.ct-docs-example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 18px 0;
  background: var(--ct-border);
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-sm);
}

.ct-docs-example-grid > div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  background: var(--ct-surface);
}

.ct-docs-example-grid span {
  color: var(--ct-ink-500);
  font-size: 10px;
  font-weight: 680;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.ct-docs-example-grid code {
  color: var(--ct-ink-800);
  font-size: 11px;
}

.ct-docs-resource-actions {
  margin: 16px 0;
}

.ct-docs-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 9px 12px;
  color: #a9bac8;
  background: #172431;
  border-bottom: 1px solid #2d3d4b;
  border-radius: 8px 8px 0 0;
  font-size: 10px;
  font-weight: 680;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.ct-docs-code-header button {
  color: #67e8f9;
  text-transform: none;
}

.ct-docs-section pre {
  overflow: auto;
  margin: 18px 0;
  padding: 16px 18px;
  color: #d9e6ee;
  background: #101923;
  border: 1px solid #202d39;
  border-radius: 8px;
  font-size: 11px;
  line-height: 18px;
  tab-size: 2;
}

.ct-docs-code-header + pre {
  margin-top: 0;
  border-top: 0;
  border-radius: 0 0 8px 8px;
}

.ct-docs-table-wrap {
  overflow: auto;
  margin: 18px 0;
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-sm);
}

.ct-docs-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: var(--ct-surface);
}

.ct-docs-table th,
.ct-docs-table td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--ct-border);
  text-align: left;
  vertical-align: top;
}

.ct-docs-table th {
  color: var(--ct-ink-500);
  background: var(--ct-surface-subtle);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.ct-docs-table td {
  color: var(--ct-ink-600);
  font-size: 12px;
  line-height: 19px;
}

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

.ct-docs-headers {
  display: grid;
  gap: 8px;
  background: #101923;
  border-color: #202d39;
}

.ct-docs-headers code {
  overflow-wrap: anywhere;
  color: #d9e6ee;
  font-size: 11px;
}

.ct-docs-check-list,
.ct-docs-task-list {
  padding: 0 !important;
  list-style: none;
}

.ct-docs-check-list li,
.ct-docs-task-list li {
  position: relative;
  padding-left: 25px;
}

.ct-docs-check-list li::before {
  position: absolute;
  top: 6px;
  left: 0;
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  color: #0f766e;
  background: #ccfbf1;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 800;
  content: "✓";
}

.ct-docs-task-list li::before {
  position: absolute;
  top: 5px;
  left: 0;
  width: 13px;
  height: 13px;
  border: 1px solid var(--ct-border-strong);
  border-radius: 3px;
  content: "";
}

.ct-docs-footer {
  max-width: 930px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 52px auto 0;
  padding-top: 20px;
  color: var(--ct-ink-500);
  border-top: 1px solid var(--ct-border);
  font-size: 11px;
}

.ct-docs-footer a {
  color: var(--ct-brand-700);
  text-decoration: none;
}

.ct-docs-toast {
  position: fixed;
  z-index: 500;
  right: 20px;
  bottom: 20px;
  padding: 10px 13px;
  color: #fff;
  background: #101923;
  border-radius: var(--ct-radius-sm);
  box-shadow: var(--ct-shadow-md);
  font-size: 12px;
}

.ct-docs-toast[hidden] {
  display: none;
}

@media (max-width: 1180px) {
  .ct-integration-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ct-integration-metrics .ct-metric {
    border-right: 1px solid var(--ct-border);
    border-bottom: 1px solid var(--ct-border);
  }

  .ct-integration-metrics .ct-metric:nth-child(2n) {
    border-right: 0;
  }

  .ct-integration-metrics .ct-metric:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
  }
}

@media (max-width: 1100px) {
  .ct-integration-layout { grid-template-columns: 1fr; }
  .ct-docs-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .ct-docs-main { padding-inline: 34px; }
  .ct-docs-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-docs-columns:has(> :nth-child(3)) { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .ct-auth-capabilities {
    display: none;
  }

  .ct-auth-card {
    padding: 24px 20px;
  }

  .ct-topbar {
    padding: 0 14px;
  }

  .ct-content {
    padding: 20px 14px 36px;
  }

  .ct-page-header {
    display: grid;
    gap: 14px;
  }

  .ct-search-trigger,
  .ct-user-copy,
  .ct-topbar .btn.ghost {
    display: none;
  }

  .ct-user-summary {
    padding-left: 0;
    border-left: 0;
  }

  .ct-assurance-card {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 22px;
  }

  .ct-outcome-summary {
    width: 110px;
    height: 110px;
  }

  .ct-metric-strip {
    grid-template-columns: 1fr 1fr;
  }

  .ct-metric {
    padding: 14px;
  }

  .ct-definition-grid {
    grid-template-columns: 1fr;
  }

  .ct-drawer {
    width: 100vw;
  }

  .ct-inventory-automation {
    width: 100%;
    margin-left: 0;
  }

  .findings-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary-badge {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-badge span:first-child {
    border-left: 0;
  }

  .reports-controls-grid,
  .report-header-info {
    grid-template-columns: 1fr;
  }

  .findings-filters {
    grid-template-columns: 1fr;
  }

  .report-findings-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .findings-detail-drawer {
    width: 100vw !important;
  }

  .ct-integration-metrics,
  .ct-form-grid {
    grid-template-columns: 1fr;
  }

  .ct-integration-metrics .ct-metric {
    border-right: 0;
    border-bottom: 1px solid var(--ct-border);
  }

  .ct-integration-metrics .ct-metric:last-child {
    grid-column: auto;
    border-bottom: 0;
  }

  .ct-integrations-page > .ct-page-header {
    align-items: stretch;
  }

  .ct-integrations-page > .ct-page-header .ct-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .ct-secret-reveal,
  .ct-endpoint,
  .ct-webhook-create {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .ct-secret-reveal {
    display: grid;
  }

  .ct-docs-header {
    height: auto;
    min-height: 62px;
    padding: 10px 14px;
  }

  .ct-docs-header-actions .ct-button:not(.ct-button--primary) {
    display: none;
  }

  .ct-docs-shell {
    display: block;
  }

  .ct-docs-sidebar {
    display: none;
  }

  .ct-docs-main {
    padding: 24px 16px 40px;
  }

  .ct-docs-hero {
    padding-top: 18px;
  }

  .ct-docs-hero h1 {
    font-size: 34px;
  }

  .ct-docs-lead {
    font-size: 15px;
    line-height: 24px;
  }

  .ct-docs-flow,
  .ct-docs-columns,
  .ct-docs-columns:has(> :nth-child(3)),
  .ct-docs-example-grid {
    grid-template-columns: 1fr;
  }

  .ct-docs-endpoint {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .ct-docs-endpoint span {
    grid-column: 1 / -1;
  }
}

@media print {
  .ct-docs-header,
  .ct-docs-sidebar,
  .ct-docs-hero .ct-actions,
  .ct-docs-code-header button,
  .ct-docs-endpoint button,
  .ct-docs-toast {
    display: none !important;
  }

  .ct-docs-page {
    background: #fff;
  }

  .ct-docs-shell {
    display: block;
  }

  .ct-docs-main {
    padding: 0;
  }

  .ct-docs-article {
    max-width: none;
  }

  .ct-docs-section {
    break-inside: avoid;
  }

  .ct-docs-section pre,
  .ct-docs-headers {
    color: #111827;
    background: #f8fafc;
    border-color: #cbd5e1;
    white-space: pre-wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

.ct-legacy-cookie-summary {
  margin: 16px 0;
  color: var(--ct-text-muted, #64748b);
  font-size: 14px;
}

.ct-legacy-cookie-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
}
